From 31a319d73100c50a6d77825a27730997042c7060 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Wed, 24 Feb 2010 22:58:53 +0100 Subject: [PATCH 001/300] Imported Debian patch 2.4.3-1 --- debian/Makefile.am | 8 + debian/Makefile.in | 381 +++++++++ debian/changelog | 1307 +++++++++++++++++++++++++++++ debian/compat | 1 + debian/control | 130 +++ debian/copyright | 69 ++ debian/description.subst | 1 + debian/hotplug | 24 + debian/libupsclient1-dev.dirs | 1 + debian/libupsclient1-dev.install | 5 + debian/libupsclient1-dev.links | 1 + debian/libupsclient1-dev.manpages | 1 + debian/libupsclient1.install | 1 + debian/libupsclient1.postinst | 29 + debian/libupsclient1.postrm | 41 + debian/nut-cgi.README.Debian | 39 + debian/nut-cgi.docs | 1 + debian/nut-cgi.install | 6 + debian/nut-cgi.manpages | 6 + debian/nut-cgi.postinst | 55 ++ debian/nut-cgi.postrm | 46 + debian/nut-hal-drivers.docs | 1 + debian/nut-hal-drivers.install | 3 + debian/nut-hal-drivers.postinst | 24 + debian/nut-hal-drivers.preinst | 18 + debian/nut-powerman-pdu.install | 1 + debian/nut-powerman-pdu.manpages | 1 + debian/nut-snmp.install | 1 + debian/nut-snmp.lintian-overrides | 6 + debian/nut-snmp.manpages | 1 + debian/nut-xml.install | 1 + debian/nut-xml.manpages | 1 + debian/nut.README.Debian | 155 ++++ debian/nut.TODO.Debian | 11 + debian/nut.dirs | 4 + debian/nut.docs | 5 + debian/nut.init | 204 +++++ debian/nut.install | 56 ++ debian/nut.link | 2 + debian/nut.lintian-overrides | 2 + debian/nut.manpages | 51 ++ debian/nut.postinst | 136 +++ debian/nut.postrm | 53 ++ debian/nut.preinst | 26 + debian/nut.prerm | 42 + debian/rules | 138 +++ debian/watch | 2 + 47 files changed, 3098 insertions(+) create mode 100644 debian/Makefile.am create mode 100644 debian/Makefile.in create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/description.subst create mode 100644 debian/hotplug create mode 100644 debian/libupsclient1-dev.dirs create mode 100644 debian/libupsclient1-dev.install create mode 100644 debian/libupsclient1-dev.links create mode 100644 debian/libupsclient1-dev.manpages create mode 100644 debian/libupsclient1.install create mode 100644 debian/libupsclient1.postinst create mode 100644 debian/libupsclient1.postrm create mode 100644 debian/nut-cgi.README.Debian create mode 100644 debian/nut-cgi.docs create mode 100644 debian/nut-cgi.install create mode 100644 debian/nut-cgi.manpages create mode 100644 debian/nut-cgi.postinst create mode 100644 debian/nut-cgi.postrm create mode 100644 debian/nut-hal-drivers.docs create mode 100644 debian/nut-hal-drivers.install create mode 100644 debian/nut-hal-drivers.postinst create mode 100644 debian/nut-hal-drivers.preinst create mode 100644 debian/nut-powerman-pdu.install create mode 100644 debian/nut-powerman-pdu.manpages create mode 100644 debian/nut-snmp.install create mode 100644 debian/nut-snmp.lintian-overrides create mode 100644 debian/nut-snmp.manpages create mode 100644 debian/nut-xml.install create mode 100644 debian/nut-xml.manpages create mode 100644 debian/nut.README.Debian create mode 100644 debian/nut.TODO.Debian create mode 100644 debian/nut.dirs create mode 100644 debian/nut.docs create mode 100644 debian/nut.init create mode 100644 debian/nut.install create mode 100644 debian/nut.link create mode 100644 debian/nut.lintian-overrides create mode 100644 debian/nut.manpages create mode 100644 debian/nut.postinst create mode 100644 debian/nut.postrm create mode 100644 debian/nut.preinst create mode 100644 debian/nut.prerm create mode 100755 debian/rules create mode 100644 debian/watch diff --git a/debian/Makefile.am b/debian/Makefile.am new file mode 100644 index 0000000..031e44b --- /dev/null +++ b/debian/Makefile.am @@ -0,0 +1,8 @@ +EXTRA_DIST = changelog control copyright description.subst hotplug \ + nut-cgi.config nut-cgi.docs nut-cgi.examples nut-cgi.postinst nut-cgi.postrm \ + nut-cgi.preinst nut-cgi.README.Debian nut-cgi.templates nut.config \ + nut.default nut.dirs nut.docs nut.examples nut-hal-drivers.docs \ + nut.init nut.links nut.postinst nut.postrm nut.preinst nut.prerm \ + nut.README.Debian nut.templates nut.TODO.Debian \ + rules watch po/ca.po po/cs.po po/de.po po/fr.po po/POTFILES.in \ + po/pt.po po/pt_BR.po po/templates.pot po/vi.po diff --git a/debian/Makefile.in b/debian/Makefile.in new file mode 100644 index 0000000..aca9924 --- /dev/null +++ b/debian/Makefile.in @@ -0,0 +1,381 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = packaging/debian +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/nut_arg_with.m4 \ + $(top_srcdir)/m4/nut_check_hiddev.m4 \ + $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_libgd.m4 \ + $(top_srcdir)/m4/nut_check_libhal.m4 \ + $(top_srcdir)/m4/nut_check_libneon.m4 \ + $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ + $(top_srcdir)/m4/nut_check_libssl.m4 \ + $(top_srcdir)/m4/nut_check_libusb.m4 \ + $(top_srcdir)/m4/nut_report_feature.m4 \ + $(top_srcdir)/m4/nut_type_socklen_t.m4 \ + $(top_srcdir)/configure.in +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 = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFPATH = @CONFPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ +DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ +DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ +HAL_FDI_PATH = @HAL_FDI_PATH@ +HAL_USER = @HAL_USER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBGD_CFLAGS = @LIBGD_CFLAGS@ +LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ +LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ +LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ +LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ +LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ +LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBTOOL = @LIBTOOL@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LINUX_HIDDEV = @LINUX_HIDDEV@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NETLIBS = @NETLIBS@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +RUN_AS_GROUP = @RUN_AS_GROUP@ +RUN_AS_USER = @RUN_AS_USER@ +SED = @SED@ +SERLIBS = @SERLIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STATEPATH = @STATEPATH@ +STRIP = @STRIP@ +SUN_LIBUSB = @SUN_LIBUSB@ +VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cgiexecdir = @cgiexecdir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverexecdir = @driverexecdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +hotplugdir = @hotplugdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +udevdir = @udevdir@ +EXTRA_DIST = changelog control copyright description.subst hotplug \ + nut-cgi.config nut-cgi.docs nut-cgi.examples nut-cgi.postinst nut-cgi.postrm \ + nut-cgi.preinst nut-cgi.README.Debian nut-cgi.templates nut.config \ + nut.default nut.dirs nut.docs nut.examples nut-hal-drivers.docs \ + nut.init nut.links nut.postinst nut.postrm nut.preinst nut.prerm \ + nut.README.Debian nut.templates nut.TODO.Debian \ + rules watch po/ca.po po/cs.po po/de.po po/fr.po po/POTFILES.in \ + po/pt.po po/pt_BR.po po/templates.pot po/vi.po + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packaging/debian/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu packaging/debian/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-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 +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +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 + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir 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 maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + +# 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. +.NOEXPORT: diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..914c006 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,1307 @@ +nut (2.4.3-1) unstable; urgency=low + + * New upstream release (Closes: #544390, #528222, #539747, #526811, + #562064) + * debian/nut.install, debian/nut.manpages: + - remove cyberpower driver and manpage + - add bestfortress, clone and ivtscd drivers and manpages + * debian/rules: + - change udev dir to /lib/udev (Closes: #522327) + - replace deprecated calls to 'dh_clean -k' by dh_prep (Closes: #536599) + * debian/rules, debian/nut.install, debian/nut.install, + debian/nut.README.Debian: install configuration files, without the + sample suffix (Closes: #528641) + * debian/nut.links: restored (Closes: #522506) + * debian/nut.init: + - source nut.conf instead of default/nut for POWEROFF_WAIT(Closes: + #538173) + - fix status checking (Closes: #538785) + - improve detection of non configured system and beautify related + output (Closes: #563112) + - use 'invoke-rc.d' instead of calling the reboot script directly + - add $remote_fs to Required-Start and Required-Stop + * debian/nut.postrm: remove udev files and simplify cleanup (Closes: + #541629) + * debian/control: + - remove Luca Filipozzi from the Uploaders list (Closes: #568987) + - update Standards-Version to 3.8.4 + - remove the debconf dependency + - bump debhelper version to (>= 7) in Build-Depends, for dh_prep + - add Breaks on nut-hal-drivers to ensure we have correct udev version + * Remove debconf support since it was related to really old nut + version (Closes: #518056): + - remove nut-cgi.config, nut.config, nut-cgi.templates, nut.templates, + and po/ directory + - update nut-cgi.postinst + * debian/nut.dirs: remove /var/run/nut to conform to Debian Policy + * debian/nut.postint: + - create /var/run/nut if needed + - improve security checks + * debian/nut.README.Debian: add a security note for ups.conf + * debian/watch: URL update + + -- Arnaud Quette Wed, 24 Feb 2010 22:58:53 +0100 + +nut (2.4.1-3.2) unstable; urgency=low + + * Non-maintainer upload. + * nut.postinst: fix post-processing of nut.conf to avoid overriding + user settings (Closes: #531220) + + -- Stefano Zacchiroli Thu, 26 Nov 2009 09:30:45 +0100 + +nut (2.4.1-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix length of extended descriptions of packages + in debian/control + * Fix pending l10n issues. Debconf translations: + - Galician (marce villarino). Closes: #524263 + - Spanish (Noel David Torres Taño). Closes: #525125 + - Vietnamese (Clytie Siddall). Closes: #548170 + + -- Christian Perrier Tue, 20 Oct 2009 21:45:21 +0200 + +nut (2.4.1-3) unstable; urgency=low + + * Debconf templates and debian/control reviewed by the debian-l10n- + english team as part of the Smith review project. Closes: #520591 + * [Debconf translation updates] + - Japanese. Closes: #521350, #518602 + - Czech. Closes: #521662 + - German. Closes: #518005 + - Basque. Closes: #522390 + - French. Closes: #522677 + - Finnish. Closes: #522837 + - Swedish. Closes: #522973 + - Italian. Closes: #522987 + - Russian. Closes: #523122 + - Portuguese. Closes: #523600 + + -- Christian Perrier Sat, 21 Mar 2009 08:08:59 +0100 + +nut (2.4.1-2) unstable; urgency=low + + * debian/control: + - add Build-Depends libwrap0-dev to enable TCP wrappers support, + - remove again dpatch from Build-Depends, + - move back debconf to Depends since we don't use it anymore in the preinst, + - add udev to nut-hal-drivers Depends so that it can use udevadm. + * debian/rules: + - pre merge the needed changes for Ubuntu (udev path and version), + - deactivate again dpatch rules + - move the nut-cgi HTML files off /var/www to /usr/share/nut/www + - set dh_installdocs to ignore Makefile + - remove dh_installexamples + * debian/patches/*: removed since it doesn't address the issue + * debian/nut-snmp.lintian-overrides: added to address NetSNMP overlinking + * debian/nut.install: + - add an precise list of the configuration files (Closes: #254355), + - use a wildcard to specify the udev rules installation path + * debian/nut-hal-drivers.install: use a wildcard to specify the udev rules + installation path (either /etc or /lib) + * debian/nut-cgi.install: add an precise list of the configuration files + * debian/nut.preinst: + - remove previous udev rule if unchanged, otherwise move to new filename (ie + with a dash), + - don't call adduser or addgroup *at all*, since these operations should be + handled in the postinst, + - migrate /etc/default/nut content to /etc/nut/nut.conf (part #1) + * debian/nut-cgi.preinst: removed since its content is addressed by postinst. + * debian/nut-hal-drivers.preinst: + - remove previous udev rule if unchanged, otherwise move to new filename (ie + with a dash), + * debian/nut-hal-drivers.postinst: + - reinstate since it was lost in the 2.2.2-10 merge, + - use the safe way to install udev rules (udevadm trigger --action=change). + * debian/nut.postinst: + - use the safe way to install udev rules, as for nut-hal-drivers.postinst + (udevadm trigger --action=change) + - rework the user/group creation, and a commented add to the dialout group, + - migrate /etc/default/nut content to /etc/nut/nut.conf (part #2) + * debian/nut-cgi.postinst: rework the user/group creation, and a commented add + to the dialout group. + * debian/nut.postinst: reactivate the nut user removal upon purge + * debian/nut.init: + - use nut.conf instead of /etc/default/nut to start the right component(s) + - enforce the configuration checking + - add basic support for the status option (as required per LSB) + * debian/nut.default: removed since its content has been incorporated into + nut.conf + * debian/{nut-cgi,nut}.examples: removed since the sample configuration files + are now installed. + * debian/nut.README.Debian: reworked with a lot of update and completion. + * debian/nut-cgi.README.Debian: reworked with a lot of update and completion. + + -- Arnaud Quette Fri, 20 Feb 2009 10:09:52 +0100 + +nut (2.4.1-1) unstable; urgency=low + + * New upstream release + * Acknowledge the use of debhelpers (Closes: #506583) + * debian/copyright: authors and licensing (GPL2+ and GPL3+) completion + * debian/control: + - add a Pre-Depends on debconf for nut and nut-cgi, and remove the according + Depends + - add ${misc:Depends} to all Depends + - add libpowerman0-dev to the Build-Depends + - add a new nut-powerman-pdu package + - add a Recommends on bash-completion for nut + - remove Shaul Karl from the Uploaders as per his request + * debian/nut-powerman-pdu.install, debian/nut-powerman-pdu.manpages: added for + the nut-powerman-pdu package + * debian/nut.install: + - also list the bash_completion entry + - list update due to upstream changes + * debian/nut.manpages: list update due to upstream changes + * debian/rules: + - comment the patching rules + - install the nut.bash_completion script + * debian/patches/*: removed the previous patches since fixed upstream + * debian/patches/01_snmp_ups_no_lcrypto.dpatch: add a patch to fix snmp-ups + overlinking with lcrypto (lintian possible-gpl-code-linked-with-openssl) + * debian/po/es.po: added Spanish debconf template translation (Closes: + 512494) + * debian/po/ja.po: added Japanese debconf template translation (Closes: + 512865) + * debian/watch: updated for the new 2.4 tree + * debian/nut.prerm: replace the direct call to the init script by invoke-rc.d + + -- Arnaud Quette Tue, 17 Feb 2009 14:15:24 +0100 + +nut (2.2.2-10) unstable; urgency=low + + * Merge from Ubuntu (Morten Kjeldgaard): + * debian/compat: changed to 6 + * debian/control: + - bump Build-Depends on debhelper to (>= 6.0.7~) since we are now using + dh_lintian. + - add hal to Build-Depends since configure attempts to locate /usr/lib/hal + in order to define callouts path and device information path + * debian/rules: --prefix is back to /usr, --exec-prefix=/ and --libdir=/lib + instead, which has the desired effect of moving the libraries to /lib. + The many shell commands in debian/rules, for moving files from the + install directory to the package directories have all been replaced by + dh_* calls and matching .* files. + * debian/{libupsclient1-dev.install, libupsclient1-dev.manpages, + libupsclient1.install, nut-cgi.install, nut-cgi.manpages, + nut-hal-drivers.install, nut-snmp.install, nut-snmp.manpages, + nut-xml.install, nut-xml.manpages, nut.install, nut.lintian-overrides, + nut.manpages}: added debhelper files. + * debian/nut.dirs: modified debhelper files + * debian/libupsclient1-dev.links: added to provide a link from + /usr/lib/libupsclient.so -> /lib/libupsclient.so.1.0.0 + This is a transitional measure, to salvage packages that have not yet + been updated to the new library location. Can be removed sometime in the + future. + * debian/patches/03-configure.in.dpatch: patch to configure.in adding + AC_CONFIG_MACRO_DIR([m4]) + + -- Arnaud Quette Thu, 27 Nov 2008 21:43:59 +0100 + +nut (2.2.2-9) unstable; urgency=low + + * debian/rules: also move libupsclient.so to /lib, otherwise the link is + broken (Closes: #505101) + * debian/nut-cgi.postinst: test if /etc/nut exists before chmod'ing (Closes: + #502757) + * debian/nut.TODO.Debian: some update and completion + + -- Arnaud Quette Wed, 15 Oct 2008 17:20:29 +0200 + +nut (2.2.2-8) unstable; urgency=high + + * debian/nut.links: restored since it's now handled by insserv (Closes: + #500190) + * debian/changelog: fix a typo error + * debian/rules: move libupsclient.so.1 from /usr/lib to /lib (Closes: + #491591) + * debian/nut-cgi.README.Debian: fix the permissions on /etc/nut (Closes: + #492277) + * debian/control: add Vcs-Browser and Vcs-Svn fields + + -- Arnaud Quette Tue, 30 Sep 2008 21:37:59 +0200 + +nut (2.2.2-7) unstable; urgency=high + + * debian/nut.links: removed to satisfy insserv (Closes: #492734) + * debian/po/it.po: add Italian debconf template translation (Closes: + #495781) + * debian/nut.preinst: force the nut user to be part of the extra group nut + (Closes: #493159) + + -- Arnaud Quette Mon, 15 Sep 2008 17:18:28 +0200 + +nut (2.2.2-6) unstable; urgency=low + + * tag this bug as closed by the 2.2.2 release (Closes: #490048) + * debian/nut.README.Debian: + - fix the serial udev advice (Closes: #490182) + - mention the UPS compatibility list (Closes: #447187) + * debian/po/de.po: update German debconf template translation (Closes: + #490128) + * debian/changelog: fix a typo on 2.2.2-2 release urgency + + -- Arnaud Quette Fri, 11 Jul 2008 11:30:55 +0200 + +nut (2.2.2-5) unstable; urgency=low + + * debian/po/eu.po: add Basque debconf template translation (Closes: + #489580) + * debian/control: + - add a Build-Depends on autoconfi, automake, libtool for the below patch + - bump Depends on udev to 0.124-1 to complete the fix of #489831 + * debian/rules: call autoreconf after patches application + * debian/patches/02_g_timeout_add_seconds_patch.dpatch: fix compilation + issue in the nut-hal-drivers code, when using a Glib older than 2.14 + (Closes: #489742) + * debian/nut.postint: replace the call to udevtrigger by udevadm trigger + (Closes: #489831) + + -- Arnaud Quette Mon, 07 Jul 2008 11:04:52 +0200 + +nut (2.2.2-4) unstabl e; urgency=low + + * debian/rules: fix a Lintian warning + (debian-rules-calls-debhelper-in-odd-order) + * debian/po/fi.po: add Finnish debconf template translation (Closes: + #489123) + * debian/po/ru.po: add Russian debconf template translation (Closes: + #489285) + * debian/po/vi.po: update Vietnamese debconf template translation (Closes: + #489393) + * debian/nut.templates: remove nut/change_system_user since it is not used + anymore (Closes: #486783) + + -- Arnaud Quette Sat, 05 Jul 2008 22:56:35 +0200 + +nut (2.2.2-3) unstable; urgency=low + + * debian/rules: reactivate dpatch support + * debian/control: add dpatch back to Build-Depends + * debian/patches/00list: fix the matching of the NUT HAL .fdi file (Closes: + #471828) + * debian/po/fr.po: update French debconf template translation (Closes: + #486740) + * debian.po/de.po: update the German debconf template translation (Closes: + #487187) + * debian/po/sv.po: add Swedish debconf template translation (Closes: #488217) + * debian.po/cs.po: update the Czech debconf template translation (Closes: + #488355) + * debian/po/pt.po: update the Portuguese debconf template translation (Closes: + #488403) + * debian/po/sv.po: add Galician debconf template translation (Closes: #488380) + * debian/nut.config: fix a typo in comment + + -- Arnaud Quette Fri, 27 Jun 2008 16:18:29 +0200 + +nut (2.2.2-2) unstable; urgency=low + + * debian/rules: fix HAL files installation paths (Closes: #486362) + * debian/control: + - fix conflicts (Closes: #486704, #486705) + - update Standards-Version to 3.8.0 + + -- Arnaud Quette Fri, 20 Jun 2008 21:29:31 +0200 + +nut (2.2.2-1) unstable; urgency=low + + * New upstream release (Closes: #471828, #462468, #334105, #463150) + * acknowledges NMUs (Closes: #469855) + * debian/control: + - add the new nut-xml package and its libneon dependency + - add the new libupsclient1 and libupsclient1-dev packages, with the latter + replacing nut-dev (Closes: #419684) + - remove dpatch dependency + * debian/rules: update according to upstream changes + - replace --with-lib by --with-dev + - update HAL integration + - update for the nut-xml package + - distribute the shared version of libupsclient + - comment dpatch calls + * debian/nut.postinst, debian/nut-hal-drivers.postinst: use udevtrigger to + refresh the devices permissions (Closes: #469601, #475262) + * debian/changelog: fix a typo + * debian/nut.templates: fix the short and long descriptions + * debian/libupsclient1.postinst, debian/libupsclient1.postrm: added to + handle the calls to ldconfig + * debian/nut.init: fix the call to /etc/init.d/reboot by adding the missing + "stop" parameter (Closes: 482022) + * debian/*.template: minor rework of the Debconf templates (Closes: 444151) + + -- Arnaud Quette Wed, 04 Jun 2008 13:35:41 +0200 + +nut (2.2.1-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Skip udev restart logic within chroots, closes: #469855. + + -- Joe Nahmias Sun, 09 Mar 2008 13:12:12 -0400 + +nut (2.2.1-2) unstable; urgency=low + + * debian/po/de.po: update the German po-debconf translation (Closes: + #464466) + * nut-hal-drivers.preinst: created to add to HAL user to the NUT group + (Closes: #460392) + * debian/nut-hal-drivers.postinst: created to complete the above by + restarting udev after the rules file installation + * debian/changelog: Fix some Lintian reports (syntax and spelling errors) + * debian/nut.README.Debian: completed a bit more for #334105 + + -- Arnaud Quette Fri, 8 Feb 2008 13:48:23 +0100 + +nut (2.2.1-1) unstable; urgency=low + + * New upstream release (Closes: #439986) + * acknowledges NMUs (Closes: #447961, #445000) + * debian/watch: update the URL to point the 2.2 tree + * debian/rules: + - force --udev-dir to remove udev from Build-Depends while + keeping the feature (complete #447961 fix) + - limit the above fix to linux systems not to break build on + bsd and hurd these architectures (Closes: #460732) + - fix lintian debian-rules-ignores-make-clean-error and do some more + cleanup + - remove the empty directories /usr/{include,lib} from the nut package + * debian/nut.postinst: call invoke-rc.d instead of the udev init script + (Closes: #442331) + * debian/control: + - remove udev from Build-Depends + - update Standards-Version to 3.7.3 + - remove Homepage from description and add it as a tag + - add libsnmp-dev as an alternate Build-Depends to libsnmp9-dev + * debian/po/nl.po: update the Dutch po-debconf translation (Closes: #447720) + * debian/po/fr.po: update the French po-debconf translation (Closes: #442102) + * debian/patches/*: removed since these have been applied upstream + * debian/patches/00list: emptied but kept for future use + + -- Arnaud Quette Wed, 23 Jan 2008 17:13:13 +0100 + +nut (2.2.0-2.1) unstable; urgency=low + + * Non-maintainer upload with Arnaud's permission. + * debian/nut.postinst: restart udev only if it is running already + (Closes: #447961). + * debian/nut.preinst: ignore db_get errors for nut/remove_debian_conf, + thanks to Alexander Gerasiov for the patch (Closes: #445000). + * Fixed typo in the date of the 2.2.0-2 changelog entry (Augl -> Aug). + + -- Sebastian Harl Tue, 8 Jan 2008 13:50:11 +0100 + +nut (2.2.0-2) unstable; urgency=low + + * debian/control: list udev as Build-Depends to allow the udev rules + inclusion (Closes: #437811) + * debian/nut.default: fix a typo error on UPSMON options comment (Closes: + #439407) + * debian/po/: + - add Brazilian Portuguese debconf templates translation (Closes: + #439793) + - update Portuguese debconf templates translation (Closes: 440369) + - update French debconf templates translation (Closes: 440524) + * debian/Makefile.am: update with the missing files + * debian/patches/03_libupsclient-config.dpatch: patch for the missing FLAGS + (Closes: #439985) + + -- Arnaud Quette Wed, 29 Aug 2007 16:14:11 +0200 + +nut (2.2.0-1) unstable; urgency=low + + * New upstream release (Closes: #432909, #420016, #426033) + * debian/control: + - merge the nut-usb package into nut, and update the various needed + fields (Depends, Provides, Conflicts, Suggests and Description) + - requires at least libhal-dev 0.5.8 + - complete the nut-hal-drivers Description (Homepage) + - update to policy 3.7.2 + - add po-debconf to Build-Depends + * debian/rules: + - general rewrite since the upstream now use automake + - force the evaluation of DEB_HOST_ARCH_OS for dh_gencontrol + - force udev to empty on non Linux system, for dh_gencontrol + - remove the DH_COMPAT export + - update the nut-usb specifics, not needed anymore + - nut-hal-drivers also needs the udev rules + - call debconf-updatepo to clean debconf translations + * debian/compat: creation + * debian/nut-usb.*: remove these files, and put the content in the + matching nut.* files + * debian/nut.preinst: remove the old udev rule file (025_nut...) which + was manually installed, and now addressed upstream and called 52_nut. + * debian/nut.postinst: restart udev to apply the USB rules to the + already plugged devices + * debian/nut-hal-drivers.preinst: created to add the HAL user to + the nut group + * debian/po/nl.po: added Dutch po-debconf translation (Closes: #414756) + * debian/po/pt.po: added Portuguese po-debconf translation (Closes: #415189) + * debian/patches/01_udev_rules_subsystem_usb.dpatch: update the patch + * debian/patches/02_libupsclient.dpatch: patch for the missing FLAGS + * debian/nut.templates: rewrite and simplification + * debian/nut.config: rewrite and simplification + * debian/rules: call dh_installinit with the priority set to 50 to (Closes: + #385694) + * debian/nut.default, debian/nut.init: allow to specify options for upsd and + upsmon (Closes: #420020, #434503) + + -- Arnaud Quette Tue, 17 Jul 2007 09:14:11 +0200 + +nut (2.0.5-3) unstable; urgency=low + + * debian/patches/01_udev_rules_subsystem_usb.dpatch: rework that + patch to be more generic + + -- Arnaud Quette Fri, 02 Feb 2007 15:38:59 +0100 + +nut (2.0.5-2) unstable; urgency=low + + * debian/patches/*: add a patch to fix the udev rule SUBSYSTEM from + usb_device to usb (thanks to Joey Hess) (Closes: #409080) + * debian/control: + - replace the udev substvar by udev + - nut Conflicts with nut-{usb,snmps} <= 2.0.4 and nut-{usb,snmp} + Depends upon 2.0.5 (Closes: #407882) + * debian/rules: dh_gencontrol no more calls -V for udev + + -- Arnaud Quette Thu, 01 Feb 2007 14:50:49 +0100 + +nut (2.0.5-1) unstable; urgency=low + + * New upstream release (Closes: #406045, #380304, #399741) + * debian/rules: + - replaces CHANGES by ChangeLog + - replace the dummycons installation by dummy-ups + - integrate the --with-htmlpath option + * debian/nut-cgi.docs: created to install data/html/README + * debian/nut.init: LSB compliance update + * debian/control: add lsb-base (>= 3.0-6) to Depends for LSB compliance + + -- Arnaud Quette Tue, 16 Jan 2007 10:42:36 +0100 + +nut (2.0.4-3) unstable; urgency=high + + * acknowledges NMUs (Closes: #396704, #389350) + * debian/nut-usb.postinst: remove the symlinking of the udev file since it's + not useful anymore (Closes: #400215) + * native udev rules are now used (Closes: #359802, #380304) + * debian/po/de.po: add German po-debconf template translation (Closes: + #400285) + * debian/nut.config: change the medium priorities to high (Closes: #388945) + * debian/nut.init: improve drivers startup report + + -- Arnaud Quette Wed, 20 Dec 2006 11:07:30 +0100 + +nut (2.0.4-2.3) unstable; urgency=high + + * Non-maintainer upload. + * Some polish on top of the previous NMU. + * Remove the hotplug alternative; we no longer support it, so it's no + longer acceptable in place of udev. Correspondingly, rename the + substvar to ${udev}. (Closes: #396704) + * Drop debian/nut-usbups.rules and use upstream's rules instead. Modify + debian/rules correspondigly, patch from Arnaud Quette. + + -- Steinar H. Gunderson Fri, 17 Nov 2006 01:12:54 +0100 + +nut (2.0.4-2.2) unstable; urgency=high + + * Non-maintainer upload. + * In the udev script, replace the RUN actions by MODE and GROUP actions, as + per suggestion from the maintainer; should fix permission issues. + (Closes: #396704) + + -- Steinar H. Gunderson Thu, 16 Nov 2006 15:38:43 +0100 + +nut (2.0.4-2.1) unstable; urgency=low + + * NMU + * not removing nut user on purge (Closes: #389350) + + -- Florian M. Weps Thu, 12 Oct 2006 11:19:37 +0200 + +nut (2.0.4-2) unstable; urgency=low + + * debian/rules: replace $PWD by CURDIR to satisfy buildd + * debian/nut.default, debian/nut.init: make the bug 358696 workaround + optional as it might be dangerous under some circumstances (closes: + #358696) + + -- Arnaud Quette Tue, 01 Aug 2006 08:50:26 +0200 + +nut (2.0.4-1) unstable; urgency=low + + * New upstream release + - driver do not use /var anymore when called for shutdown/poweroff + (closes: #332846) + - fixes the newhidups crash upon device reconnexion (closes: #354305, + #359769) + * debian/nut.preinst: syntax enhancement to avoid issue when the nut user + already exists (closes: #378970) + * debian/nut-cgi.postinst: fix wrong permissions (closes: #378818) + * debian/po/cs.po: update Czech translation of nut debconf messages (closes: + #366738) + * debian/nut.default, debian/nut.init: "poweroff" workaround to deal with + BIOS default of "On/Off state: Last state" and system halting itself + before the UPS cuts power (closes: #358696) + * debian/nut-usbups.rules: fix the broken udev rules (closes: #359801) + + -- Arnaud Quette Thu, 27 Jul 2006 15:20:46 +0200 + +nut (2.0.3-4) unstable; urgency=low + + * debian/nut-usb.postinst: generate the /etc/udev/rules/ file + * debian/rules: + - install the right udev rule file (not the upstream one) + - install the debian/hotplug file as libhidups, as it's compatible + with hotplug and udev styles + + -- Arnaud Quette Mon, 13 Mar 2006 08:52:25 +0100 + +nut (2.0.3-3) unstable; urgency=low + + * debian/rules: + - fix a wrong symlink for the udev rule files (closes: #354262) + - add a temporary workaround to clean drivers/tripplite_usb + + -- Arnaud Quette Mon, 27 Feb 2006 15:35:32 +0100 + +nut (2.0.3-2) unstable; urgency=low + + * debian/nut.init: fix the creation of the PID directory, as /var is now volative. + This bug has been identified in Ubuntu (Launchpad #6679) + * debian/nut-cgi.postrm: suppress the deletion of the nut user as it's not + needed (closes: #319395) + * debian/nut-cgi.preinst: suppress that file as we do not need to check and create + the nut user and group for nut-cgi + * debian/nut-cgi.postinst: enhanced to ensure the /etc/nut directory and nut-cgi + configuration files are readable by others + * debian/nut-cgi.README.Debian: improve the documentation about configuration + files permissions + + -- Arnaud Quette Fri, 24 Feb 2006 10:05:25 +0100 + +nut (2.0.3-1) unstable; urgency=low + + * New upstream release + - include the improved USB driver (closes: #300115) + - fix mge-utalk regression (closes: #315431) + - fix USB device claiming and logging (closes: #322901) + * debian/nut-cgi.config: complete the typo fixes from 2.0.2-1 and remove exit + calls (closes: #308215) + * debian/nut.config: remove exit calls + * debian/hotplug: add this file to manage hotplug and udev style permissions settings + * debian/nut-usbups.rules: embed a modified version of the upstream file + * debian/control: + - make hotplug | udev Depends conditionnal, from rules + - remove libusb-0.1-4 Depends as it is already listed with shlibs:Depends + * debian/rules: + - generate debian/control Depends for hotplug | udev + - also install udev files (closes: #338738, #332939) + - call the clean rule before distclean + * debian/nut.README.Debian: + - update the Installation §2 to reflect udev changes on serial port permissions. + Users need to manually add the nut group to the dialout group (closes: #325878, + #334105) + - some other minor update + + -- Arnaud Quette Tue, 21 Feb 2006 13:57:35 +0100 + +nut (2.0.2-2) unstable; urgency=low + + * debian/nut-cgi.postinst: load confmodule + * debian/nut-hidups/*: remove this unneeded directory + * debian/control: + - Update build dependency from libsnmp5-dev to libsnmp9-dev (closes: + #326410) + - Changes nut-usb wrong dependency from libusb-dev to libusb-0.1-4 (closes: + #320315) + - add debconf (>= 0.5.00) and adduser to nut/nut-cgi Depends + * debian/copyright: update the FSF address and the Authors + * debian/po/vi.po: add the Vietnamese translation for debconf, from Clytie + Siddall ((closes: #316327) + + -- Arnaud Quette Fri, 07 Oct 2005 23:35:55 +0200 + +nut (2.0.2-1) unstable; urgency=low + + * New upstream release: + - build respect LDFLAGS (closes: #265439) + - fix etapro brokeness (closes: #305730) + - fix shutdown/restart problems with mge-shut (closes: #302190) + - fix mge-utalk support for older units (closes: #315431) + * debian/po/fr.po: update the French debconf templates, thanks to Michel + Grentzinger (closes: #306541) + * debian/rules: + - install hotplug files for the newhidups USB driver + - suppress the snmp-ups.8 manpage workaround + * debian/nut-usb.prerm: created to remove hotplug files + * debian/control: + - add hotplug Depends for nut-usb + - upgrade Debian Policy to 3.6.2 + * debian/patches/*: remove all patch and empty 00list as all has + been fixed upstream + * debian/nut-cgi.config: integrate the typo fixes that was blocking + upgrade from woody to sarge + * debian/nut-cgi.preinst: remove an unneeded blank line + * acknowledge NMU from Craig Small (closes: #302189) + + -- Arnaud Quette Mon, 27 Jun 2005 11:29:52 +0200 + +nut (2.0.1-3) unstable; urgency=low + + * debian/patches/01_cleanSourceFromlibupsclient.dpatch: removed as it + has been fixed upstream in 2.0.1 + * debian/patches/00list: re enabled for the below patch + * debian/patches/01_upsstatsCgiNoHostCrash.dpatch: added while waiting + for the upstream fix (closes: #302902) + * debian/nut-cgi.templates: added nut-cgi/major_template_changes + * debian/nut-cgi.config: use nut-cgi/major_template_changes (closes: + #301184) + * debian/nut-cgi.README.Debian: reworked, and mention upgrade and + installation. + * debian/nut.README.Debian: mention the missing UPGRADING file, and complete + the upsmon.conf lines with the mandatory POWERDOWNFLAG and SHUTDOWNCMD + (closes: #302182) + * debian/nut.templates: add nut/2_0_upstream_changes to deal with the new + changes + * debian/nut.config: use the above nut/2_0_upstream_changes (closes: + #301060) + + -- Arnaud Quette Fri, 15 Apr 2005 13:52:32 +0100 + +nut (2.0.1-2.1) unstable; urgency=low + + * Non-maintainer upload + * NUT nows powersdown Closes: #302189 + + -- Craig Small Thu, 7 Apr 2005 11:47:58 +1000 + +nut (2.0.1-2) unstable; urgency=low + + * debian/control: add missing Build-Depends for dpatch, thanks to Kurt + Roeckx (closes: #298218) + + -- Arnaud Quette Mon, 07 Mar 2005 16:29:32 +0100 + +nut (2.0.1-1) unstable; urgency=low + + * New upstream release (closes: #247671, #283539) + * debian/watch: update URL to match the current 2.0 stable tree + * debian/rules: + - change install-misc target to install-lib following the upstream rule + name change + - error reporting enhancements, thanks to Karl Shaul (inserted a set -e at + the start of every for loop ; from Debian Policy §4.5). + - workaround to include dummycons test driver and its manpage in nut-dev + while waiting for an upstream rule + - workaround to remove snmp-ups manpage from the nut package, to avoid a + file conflict with nut-snmp, while waiting for an upstream rule + - remove the workaround from 1.4.2-2 to suppress libupsclient.a and + newhidups upon make clean + - comment the "conf files workaround" as it's no more needed + * debian/control: + - add nut-dev to nut Suggests + - complete nut-dev to include dummycons testing driver + - add libusb (>= 0.1.8) nut-usb Depends to benefit of the kernel driver + unbind feature (needed for USB models other than MGE UPSs) + - suppress libgd1 from Build-Depends to fix a DebCheck warning, as it + is listed in Section oldlibs + * debian/nut.README.Debian: add a section "(3) /etc/nut/upsd.conf" + and add references to sample config files and UPGRADING information + (closes: #269485) + * debian/nut.TODO.Debian: add this file to track planned and unfinished + tasks + * debian/nut-cgi.README.Debian: improve a bit the text + * debian/nut.init: test powerdown flag (upsmon -K) and use the new + upsdrvctl exit codes (thanks to Karl Shaul) + * debian/po/cs.po: add Czech translation of debconf templates (patch from + Miroslav Kure) (closes: #283225) + * debian/patches: add basic infrastructure for dpatch + + -- Arnaud Quette Fri, 04 Mar 2005 11:40:13 +0100 + +nut (1.4.3-2) unstable; urgency=low + + * debian/control: add nut-dev package with NUT lib and headers (closes: + #263937) + * debian/rules: change install-misc for the above nut-dev. + * debian/control: invert apache and httpd in nut-cgi Recommends to solve a + lintian warning + + -- Arnaud Quette Sun, 08 Aug 2004 16:07:04 +0200 + +nut (1.4.3-1) unstable; urgency=low + + * New upstream release + * debian/control: change Homepage URL to "www" instead of "random" and + remove trailing slash / dot (closes: #254084) + * debian/control: add apache to nut-cgi Recommends to have a non-virtual + package alternative + + -- Arnaud Quette Thu, 29 Jul 2004 22:58:03 +0200 + +nut (1.4.2-3) unstable; urgency=low + + * debian/control: add libusb-dev version in Build-Depends (closes: #248952) + * debian/copyright: update upstream URL and copyright owners (closes: + #242422) + * debian/po/ca.po: add Catalan translation of debconf templates (patch from + Aleix Badia i Bosch) (closes: #248741) + * debian/nut-cgi.README.Debian: added to describe nut-cgi configuration + (thanks to Marius Gedminas) (closes: #249825) + * debian/nut.README.Debian: minor change + + -- Arnaud Quette Fri, 28 May 2004 13:10:01 +0200 + +nut (1.4.2-2) unstable; urgency=low + + * debian/control: add libusb-dev to Build-Depends (closes: #240586) + * debian/rules: workaround to clean libupsclient.a and newhidups (complete + the above) + + -- Arnaud Quette Sun, 28 Mar 2004 18:30:01 +0100 + +nut (1.4.2-1) unstable; urgency=low + + * New upstream release + * Fixes mge-shut settings and shutdown problems (closes: #232402, #234037) + * debian/nut.init: fixes powerdown rule to prevent from forced UPS shutoff + upon normal shutdown, and add a warning when POWERDOWN flags isn't + defined, thanks to Loic Le Loarer (closes: #236092) + * debian/control: update nut-usb Description to reflect the add of newhidups + and energizerups drivers. + * debian/rules: update nut-usb build and install rules to match the new ones + + -- Arnaud Quette Thu, 25 Mar 2004 16:30:01 +0100 + +nut (1.4.1-release-2) unstable; urgency=low + + * recall previously malformed closed bug (closes: #227965, #227964) + * debian/control: Build-Depends to allow libgd*-noxpm (closes: #231153) + * debian/control: update Homepage address + * debian/watch: update target address + + -- Arnaud Quette Thu, 05 Feb 2004 19:19:56 +0100 + +nut (1.4.1-release-1) unstable; urgency=low + + * New upstream release + * debian/po/*: add gettext support for debconf templates (patch from Michel + Grentzinger) (Close: #227965) + * debian/po/fr.po: add French translation of debconf templates (patch from + Michel Grentzinger) (Close: #227964) + + -- Arnaud Quette Sun, 18 Jan 2004 21:19:56 +0100 + +nut (1.4.1-pre3-5) unstable; urgency=low + + * debian/nut.postrm: fix inverted test with -z (fix a purge error) + * debian/nut.postrm: same as above + * debian/nut.postrm: suppress check_and_delete_group() as it is not useful + * debian/nut-cgi.postrm: same as above + * debian/nut.postinst: test if /etc/nut exists before chmod'ing (fix an + install error) + + -- Arnaud Quette Sat, 15 Nov 2003 22:10:23 +0100 + +nut (1.4.1-pre3-4) unstable; urgency=low + + * debian/nut.preinst: wider check for user/group creation (closes: #217980) + * debian/nut.postrm: rework purge rule for user/group deletion (2nd part of + the above fix) + * debian/nut-cgi.postrm: rework purge rule for user/group deletion (2nd part of + the above fix) + * debian/nut-cgi.preinst: wider check for user/group creation (same as + above) + * debian/rules: suppress {nut,nut-cgi}/etc/nut/*.sample that were wrongly + installed (linked to #172217) + * debian/nut.examples: created to complete above fix + * debian/nut-cgi.examples: created to complete above fix + * debian/nut.postrm: suppress /etc/nut/*.sample file (to correct above + problem) + * debian/nut-cgi.postrm: suppress /etc/nut/*.sample file (same as above) + * Maintainer upload (forgotten previously), closes: #200182, #203061 + + -- Arnaud Quette Sat, 15 Nov 2003 10:10:23 +0100 + +nut (1.4.1-pre3-3) unstable; urgency=low + + * clients/Makefile.in: install parseconf.h to fix compilation error with wmnut + * man/Makefile.in: fix a broken upstream rule (hidups manpages installed two + times) that prevent from installing nut-usb package. This will be fixed in + the next upstream + + -- Arnaud Quette Mon, 10 Nov 2003 17:10:23 +0100 + +nut (1.4.1-pre3-2) unstable; urgency=low + + * man/Makefile.in: fix a broken upstream rule (powernet and snmp-ups + manpages installed two times) that prevent from installing nut-snmp package + + -- Arnaud Quette Mon, 10 Nov 2003 12:59:23 +0100 + +nut (1.4.1-pre3-1) unstable; urgency=low + + * New upstream release + * clients/Makefile.in: suppress the one line patch to install parseconf.o + (from 1.4.1-pre2-1). This is now cleanly addressed by the upstream source + by installing libupsclient.a (closes: #216496) + * debian/rules: change dh_shlibdeps's exclude from upsfetch.o to libupsclient.a + * debian/nut.preinst: fix install rule to catch all cases of nut user and group + needed creation. Previously, post purge install case was not (closes: #217980) + * debian/rules: suppress the work-around for nut-usb package following + the upstream correction (from 1.4.1-pre1-2) + * debian/control: Final package take over ; switch Luca Filipozzi as + co maintainer, and Arnaud Quette as new maintainer. + * debian/watch: point the authoritative download server (penguin.harrison) + and stable releases ("nut/release/1.4/" directory ; it won't work for + final 1.4.1, but for 1.4.2) + * debian/nut.postrm: rework purge rule to suppress a warning + + -- Arnaud Quette Sat, 8 Nov 2003 12:15:23 +0100 + +nut (1.4.1-pre2-1) unstable; urgency=low + + * New upstream release + * debian/control: created package nut-usb for finer deps management + * debian/rules: added rules for nut-usb package, and a work-around + for install directories creation while waiting for upstream correction. + * drivers/Makefile.in: suppressed hidups from PROGS, thanks to the above + * debian/control: repeat Homepage for every sub-package + * debian/control: completed nut Suggests + * debian/control: changed Arnaud Quette address to the good Debian one + * debian/rules: suppress the work-around for nut-snmp package following + the upstream correction(from 1.4.1-pre1-1) + * debian/nut-cgi.preinst: always test if nut user exist as nut-cgi + can be installed without nut, so not having nut user created (closes: + Bug#213730) + * debian/nut-cgi.postinst: chown root:nut to address a potential security + issue (see 1.2.1-2) + * clients/Makefile.in: one line patch to install parseconf.o. This solve + a problem with wmnut package (can't build anymore due to unresolved + symbols). This point will be more cleanly address in next upstream + + -- Arnaud Quette Sat, 18 Oct 2003 09:05:01 +0200 + +nut (1.4.1-pre1-2) unstable; urgency=low + + * debian/control: rewrotte descriptions to follow Debian Policy. A + further enhancement will be to use debian/nut.substvars (thanks + to Shaul Karl) (closes: Bug#209569) + * drivers/Makefile.in: added back hidups to PROGS (closes: Bug#208248) + * debian/control: added libgd2-* to Build-Depends to allow more choices + * debian/control: added Shaul Karl as co-maintainer + * debian/control: changed Arnaud Quette address to Debian's one + + -- Arnaud Quette Sun, 14 Sep 2003 12:11:45 +0200 + +nut (1.4.1-pre1-1) unstable; urgency=low + + * New upstream release (closes: Bug#203856) + * recall ignored 1.4.0-2 changes (closes: Bug#204193, Bug#199895) + * debian/nut.preinst: already solved bug in 1.4.0-3 (closes:Bug#206229) + * debian/control: created package nut-snmp (closes: Bug#195645) + * debian/rules: added rules for nut-snmp package, and a work-around + for install directories creation while waiting for upstream correction. + * debian/control: change Build-Depends to "libgd-xpm-dev | libgd-dev" to + allow easy woody backport (thanks to Martin Maney) + * debian/nut.prerm: wait for upsd stop before calling the remove tempo + + -- Arnaud Quette Sat, 23 Aug 2003 13:55:32 +0200 + +nut (1.4.0-3) unstable; urgency=low + + * debian/nut.prerm: fix a post removal warning by adding a tempo + (1 sec) before removing /var/run/nut + * debian/nut.preinst: reworked install rule (thanks Shaul) (closes:Bug#204153) + + -- Arnaud Quette Fri, 8 Aug 2003 23:14:26 +0200 + +nut (1.4.0-2) unstable; urgency=low + + * debian/watch: update URL to point NUT 1.4 (thanks to Shaul Karl) + * debian/nut.dirs: add /var/run/nut (thanks Shaul) (closes: Bug#204193) + * debian/nut-cgi.preinst: created for allowing separate installation + (without nut) (closes: Bug#199895) + * debian/rules: remove the "--with-group=nut" call to configure as it + is obsolete (thanks Shaul) + * debian/control: add Arnaud Quette as co-maintainer + + -- Arnaud Quette Thu, 7 Aug 2003 20:14:26 +0200 + +nut (1.4.0-1) unstable; urgency=low + + * New upstream release (closes: Bug#203061) + * debian/nut.init: change Init-script ordering (start_stop_server) to + address data stale warning (closes: Bug#200182) + + -- Arnaud Quette Fri, 1 Aug 2003 18:42:22 +0200 + +nut (1.2.2-1) unstable; urgency=low + + * New upstream release + * debian/rules: gidNumber of group 'nobody' is 65534 not 65535 + (thanks Shaul) (closes: Bug#180532) + + -- Luca Filipozzi Fri, 18 Apr 2003 20:12:17 -0700 + +nut (1.2.1-2) unstable; urgency=low + + * debian/nut.README.Debian: s/smartapc/apcsmart/ (closes: Bug#177713) + * debian/nut.postinst: chown root:nut instead of chown nut:nut for files + in /etc/nut/* and for the dirs /etc/nut, /var/run/nut, /var/lib/nut; + this addresses a potential security issue as described in the comments + contained in /etc/nut/upsmon.conf (closes: Bug#180059) + * debian/nut.init: sysadmins might modify POWERDOWNFLAG in + /etc/nut/upsmon.conf without realizing that it is hard coded in the + /etc/init.d/nut init script; fix the init script to parse the + configuration file for the value of POWERDOWNFLAG (closes: Bug#179686) + * debian/nut.init: print a message prior to shutdown (closes: Bug#180242) + + -- Luca Filipozzi Sat, 8 Feb 2003 18:12:11 -0800 + +nut (1.2.1-1) unstable; urgency=low + + * New upstream release + * debian/control: nut provides/conflicts ups-monitor (closes: Bug#170655) + * debian/nut.postinst and debian/nut-cgi.postinst: + test -f file before chown/chmod (closes: Bug#170553) + * debian/nut.postinst: fix permissions on /var/lib/nut (closes: Bug#173318) + * debian/nut.preinst: change how the 'nut' user/group are detected and + created (closes: Bug#173321) + * between 1.1.11-1 incorrectly installed conffiles into /etc/nut + with the extension .sample; fortunately, this release of the package + did not migrate to testing and since 1.1.11-2 the .sample extension + has not been used (closes: Bug#172217) + * debian/nut.preinst: change the way the nut user/group are detected + before adduser is called (closes: Bug#170653) + * debian/nut.README.Debian: fixed minor doc error (Closes: Bug#173673) + + -- Luca Filipozzi Wed, 11 Dec 2002 19:39:02 -0800 + +nut (1.2.0-1) unstable; urgency=low + + * New upstream release + * debian/nut-cgi.postinst: fix permissions on /etc/nut/hosts.conf and + /etc/nut/upsset.conf so that they are world readable (Closes: Bug#167332) + * debian/nut.init: added sleep 5 to allow for an orderly restart (thanks + to Shaul Karl for pointing this out) + + -- Luca Filipozzi Tue, 19 Nov 2002 09:44:25 -0800 + +nut (1.1.12-1) unstable; urgency=high + + * New upstream release (urgency high due to SECURITY FIX) + * SECURITY FIX: a file permission problem potentially exposes + non-system usernames/passwords in /etc/nut/upsd.users that can be used + to DoS a machine running nut by contacting the nut daemon and instructing + it to power off the machine; fixed. + * debian/nut.postinst: change permissions of /etc/nut/upsd.users and + other conffiles to 640 (Closes: Bug#165445) + * debian/nut.config: use db_fset to reset the boolean question that prompts + users to accept whether to continue with the installation of this version + of nut should they answer no (Closes: Bug#165376) + * debian/control: make nut-cgi Replace nut so that conflicting files + can be installed (Closes: Bug#165049) + * drivers/Makefile.in: restored original version that doesn't build + hidups, snmp-ups or powernet; hidups doesn't build on m68k; snmp-ups + and powernet require libsnmp5-dev but libsnmp5-dev requires OpenSSL; + unfortunately, upstream's license doesn't have the OpenSSL exclusion + clause... work is proceeding on porting to gnutls + * drivers/Makefile.in + debian/rules: figured out a mechanism to build + hidups on those architectures that have /usr/include/linux/hiddev.h + * debian/control: build-depend on libgd-xpm-dev (really closes Bug#164832) + + -- Luca Filipozzi Sat, 19 Oct 2002 16:47:35 -0700 + +nut (1.1.11-2) unstable; urgency=low + + * changed build dependencies to avoid depending on a pure-virtual package + without providing a default (thanks Junichi Uekawa) (Closes: Bug#164832) + * debian/rules calls $(MAKE) install-misc so that the header and the .o file + are released with the nut package (too small for a nut-dev package?) + + -- Luca Filipozzi Tue, 15 Oct 2002 08:50:18 -0700 + +nut (1.1.11-1) unstable; urgency=low + + * New upstream release + (Closes: Bug#151047, Bug#155943, Bug#153174, Bug#160178, Bug#164024) + * the "Hey Dorothy, you aren't in Kansas anymore" release + * warning: significant changes since nut 0.45.5; specifically: + - upsd listens on a different port (was 3305; now 3493 (IANA-assigned)) + - configuration file formats have changed + - ups driver internals haved changed: 'common main.c' + upsdrvctl + - some ups drivers that were not ported to the new common model have + been dropped by the upstream author (submit a patch to rectify) + - the init script is significantly simpler + - the daemons will NOT restart on upgrade from from 0.45.5 or earlier + - there is an /etc/default/nut file that defines whether the daemons + will be started + - removed nut-doc package... far too small to merit being on its own + + -- Luca Filipozzi Mon, 14 Oct 2002 13:33:58 -0700 + +nut (0.45.5-rel-3) unstable; urgency=low + + * "unlink .sock file before starting up; this was keeping the drivers down + after a system crash where the .sock files remained" -- upstream + (Closes: Bug#149150, Bug#139859) + + -- Luca Filipozzi Fri, 7 Jun 2002 22:34:53 -0700 + +nut (0.45.5-rel-2) unstable; urgency=low + + * debian/control: nut and nut-cgi suggest rather than recommend + the documentation package, nut-doc (Closes: Bug#144763) + * debian/nut-cgi.dirs: change absolute paths to relative (Closes: Bug#144746) + * debian/rules: remove upsdrvctl.8 from package (Closes: Bug#143099) + + -- Luca Filipozzi Sun, 2 Jun 2002 21:39:14 -0700 + +nut (0.45.5-rel-1) unstable; urgency=low + + * New upstream release + * debian/rules: moved model daemons to /lib/nut to reduce chance of + namespace conflicts (Closes: Bug#141209) + * debian/rules: moved sample configuration files to + /usr/share/doc/nut/examples (Closes: Bug#140472) + # debian/postinst: change mode and ownership of files in /etc/nut/ on + configure to allow ready by nut/nut (Closes: Bug#142116) + + -- Luca Filipozzi Sun, 14 Apr 2002 13:37:13 -0700 + +nut (0.45.4-rel-3) unstable; urgency=low + + * added runtime dependency on adduser (Closes: Bug#137887) + + -- Luca Filipozzi Sat, 16 Mar 2002 21:41:53 -0800 + +nut (0.45.4-rel-2) unstable; urgency=low + + * Changed debian/rules to call install-misc which installs the development + files upsfetch.[oh]. There are too few development files to merit a + nut-dev package. + + -- Luca Filipozzi Sun, 24 Feb 2002 15:47:56 -0800 + +nut (0.45.4-rel-1) unstable; urgency=low + + * New upstream release + + -- Luca Filipozzi Sun, 24 Feb 2002 11:56:46 -0800 + +nut (0.45.4-pre5-1) unstable; urgency=low + + * New upstream release (Closes: Bug#131673) + + -- Luca Filipozzi Sun, 17 Feb 2002 17:31:32 -0800 + +nut (0.45.1-release-2) unstable; urgency=low + + * applied POWERDOWNFLAG upstream-patch (Closes: Bug#111979) + * applied apcsmart calibration user-patch (Closes: Bug#111978) + * modified models/main.c so that it does a forceshutdown *before* + attempting to chdir into /var/lib/nut (Closes: Bug#112540) + + -- Luca Filipozzi Tue, 23 Oct 2001 16:22:57 -0700 + +nut (0.45.1-release-1) unstable; urgency=low + + * New upstream release + * Fixed conffile problem with nut-cgi package (Closes: #108687) + + -- Luca Filipozzi Sat, 18 Aug 2001 11:58:57 -0700 + +nut (0.45.1-pre4-1) unstable; urgency=low + + * New upstream release (Closes: #101105) + + -- Luca Filipozzi Sun, 5 Aug 2001 13:59:12 -0700 + +nut (0.44.3-pre6-3) unstable; urgency=low + + * Init script now poweroffs the UPS' correctly. (Closes: #96790) + * Changed section of nut-doc to 'doc' (Closes: #94842) + * Not upgrading to new upstream source (0.45.0) until it is released. + * Not upgrading to upstream source (0.44.3) since (0.45.0) is coming soon. + + -- Luca Filipozzi Sun, 3 Jun 2001 16:05:01 -0700 + +nut (0.44.3-pre6-2) unstable; urgency=low + + * init script follows policy (Closes: #90346) + + -- Luca Filipozzi Mon, 19 Mar 2001 15:21:44 -0800 + +nut (0.44.3-pre6-1) unstable; urgency=low + + * New upstream release + * modified configure.in so that it doesn't produce an error when it tests + for the existance of group "nut" (Closes: #88126) + + -- Luca Filipozzi Sun, 11 Mar 2001 11:48:54 -0800 + +nut (0.44.3-pre4-1) unstable; urgency=low + + * New upstream release + * create pidfile modifications reworked to use upstream's writepid() function + * modified init script to support these changes... note that users MUST + follow the convention for the UPS directives in the sample upsd.conf; + a warning has been placed in said file + + -- Luca Filipozzi Sun, 25 Feb 2001 19:19:29 -0800 + +nut (0.44.2-6) unstable; urgency=low + + * modified prerm and postinst so that the daemon(s) is restarted only in the + postinst rather than stopped in prerm and started later in postinst thereby + stopping the daemon(s) shortest possible time (Closes: #83614) + * modified all the daemon(s)' source code so that they create pidfiles + * modified the init script so that it uses the pidfiles + + -- Luca Filipozzi Sun, 11 Feb 2001 18:23:44 -0800 + +nut (0.44.2-5) unstable; urgency=low + + * removed "function" keyword from init script (Closes: #83569) + * modified the pre and post scripts so that #DEBHELPER# is at the bottom + * modified debian/rules so that nut-doc is created (Closes: #85059) + * added support for MGE UPS (thanks to Ryan Murray) (Closes: #83743) + + -- Luca Filipozzi Sat, 10 Feb 2001 20:09:35 -0800 + +nut (0.44.2-4) unstable; urgency=low + + * control file changed such that arch=any for nut-doc (Closes: #83323) + + -- Luca Filipozzi Tue, 23 Jan 2001 17:49:25 -0800 + +nut (0.44.2-3) unstable; urgency=low + + * Added a build conflict against libgd-gif1-dev because it provides + libgd-dev but does not have PNG support. (Closes: #82607) + * Fixed a path problem in debian/rules that had manpages installing + in /share/man/man8 instead of /usr/share/man/man8. + + -- Luca Filipozzi Wed, 17 Jan 2001 19:11:56 -0800 + +nut (0.44.2-2) unstable; urgency=low + + * Modified README.Debian to address bad doc path (Closes: #82460) + * Slight improvements to README.Debian, as well. + + -- Luca Filipozzi Mon, 15 Jan 2001 21:11:39 -0800 + +nut (0.44.2-1) unstable; urgency=low + + * New upstream release + + -- Luca Filipozzi Tue, 9 Jan 2001 08:33:56 -0800 + +nut (0.44.1-4) unstable; urgency=low + + * fixed path problem with cgi files; they *are* in /usr/lib/cgi-bin/nut now + + -- Luca Filipozzi Wed, 22 Nov 2000 08:47:54 -0800 + +nut (0.44.1-3) unstable; urgency=low + + * the following changes suggested by Patrik Rak (Closes: #77144, #77195) + * added better preinst(install) checks for group membership + * modified upstream upsd.conf to use correct paths in the UPS directives + * modified upstream upsd.conf to have better ACCESS directive examples + * modified upstream upsmon.conf to have better MONITOR directive examples + * modified upstream upsmon.conf to use a different POWERDOWNFLAG location + (location must be on the root filesystem... otherwise powerdownflag is + not found!) + * modified init script to parse upsmon.conf for the POWERDOWNFLAG location + * modified init script's poweroff section so that all args are recognized + * improved the documentation, primarily README.Debian + * installation scripts modified so that the dependency on adduser >= 3.14 + can be removed; this allows for the creation of potato packages + * the nut user is no longer part of the dialout group; users will have to + manually change the permissions on the serial port devices; + a nut group is created at the same time as the nut user; users should use + the nut group for the serial port permissions: chown root.nut /dev/ttyS0 + (suggested by Shaul Karl and Patrik Rak) + * the cgi scripts are moved to /usr/lib/cgi-bin/nut/* + (suggested by Shaul Karl) + * init script changed significantly to address argument passing problems + (reported by Shaul Karl) + + -- Luca Filipozzi Thu, 16 Nov 2000 11:42:42 -0800 + +nut (0.44.1-2) unstable; urgency=low + + * removed else clause on detection of existing "nut" user (Closes: #76721) + "install" creates the user nut; "remove" doesn't remove it, "purge" does; + a re-"install" would find an existing "nut" user and exit on error; fixed + * fixed a possible bashism (Closes: #72711) + + -- Luca Filipozzi Fri, 10 Nov 2000 10:06:05 -0800 + +nut (0.44.1-1) unstable; urgency=low + + * New upstream release + * serious repurcussion to existing users of nut... the configuration files + have changed somewhat... a critical debconf warning informs the user of + this fact + * binaries are to remains in /sbin (Closes: #69525) + * init script no longer relies on /usr being mounted (Closes: #70033) + * + + -- Luca Filipozzi Fri, 10 Nov 2000 10:05:55 -0800 + +nut (0.44.0-4) unstable; urgency=low + + * Moved man pages from section 1 to section 8. (Closes: #68819) + * nut-doc suggest rather than recommends nut and nut-cgi. (Closes: #69400) + + -- Luca Filipozzi Fri, 18 Aug 2000 23:15:18 -0700 + +nut (0.44.0-3) unstable; urgency=low + + * Minor fixes to packaging scripts (Closes: #67649). + * Created new doc package: nut-doc. + + -- Luca Filipozzi Mon, 24 Jul 2000 10:18:19 -0700 + +nut (0.44.0-2) unstable; urgency=low + + * Minor fixes to init script and to list of undocumented binaries. + + -- Luca Filipozzi Sat, 22 Jul 2000 19:11:42 -0700 + +nut (0.44.0-1) unstable; urgency=low + + * New upstream release + + -- Luca Filipozzi Thu, 20 Jul 2000 09:26:04 -0700 + +nut (0.43.2-2) unstable; urgency=low + + * fixes: Bug#67316: nut: default permissions could reveal passwords + Files in /etc/nut are now 600 by default. + * fixes: Bug#67314: nut: uses old FHS directory /var/state + Now uses /var/lib as per FHS guidelines. + * fixes: Bug#66988: nut_0.43.2-1(unstable): Missing build dependencies + Added debhelper to the build dependencies. + + -- Luca Filipozzi Tue, 18 Jul 2000 14:55:03 -0700 + +nut (0.43.2-1) unstable; urgency=low + + * Initial Release. + * Modification to upstream source: configure.in, common/common.c, + and models/upscommon.c changed to support different configuration + options... --with-user and --with-group which accept a username + and a groupname (rather than a uid/gid as before). + * Modification to upstream source: /var/state/nut is used instead + of /var/state/ups in conf/upsd.conf. + + -- Luca Filipozzi Wed, 3 May 2000 20:50:30 -0700 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +6 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..2af1da2 --- /dev/null +++ b/debian/control @@ -0,0 +1,130 @@ +Source: nut +Section: admin +Priority: optional +Maintainer: Arnaud Quette +Build-Depends: debhelper (>= 7), autoconf, automake, libtool, libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libhal-dev (>= 0.5.8), hal, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, libneon27-gnutls-dev | libneon26-gnutls-dev | libneon-dev | libneon27-dev | libneon26-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6) +Standards-Version: 3.8.4 +Homepage: http://www.networkupstools.org +Vcs-Browser: http://svn.debian.org/wsvn/nut +Vcs-Svn: svn://svn.debian.org/nut/trunk + +Package: nut +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev} +Recommends: bash-completion +Suggests: nut-cgi, nut-snmp, nut-dev, nut-xml +Provides: ups-monitor, nut-doc, nut-usb +Conflicts: ups-monitor, nut-doc, nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) +Replaces: nut-doc +Description: network UPS tools - core system + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides NUT's core system, and the serial and USB UPS + drivers. In most cases it is sufficient for a basic UPS monitoring + system. + +Package: nut-cgi +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser +Recommends: apache | httpd +Suggests: nut +Replaces: nut (<< 1.1.11) +Description: network UPS tools - web interface + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides an HTTP interface for Network UPS Tools which makes + it possible to monitor the core NUT system with a web browser. + +Package: nut-snmp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 1.4.1-pre1) +Conflicts: nut (<= 1.4.0) +Description: network UPS tools - SNMP driver + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides snmp-ups, the SNMP multi-MIB driver for UPS, which + supports various MIBs including IETF, MGE, and APC. It adds an SNMP + Manager interface to the core NUT system. + +Package: nut-hal-drivers +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${udev} +Conflicts: nut +Provides: hal-ups-support +Breaks: udev (<< 124-1) +Description: network UPS tools - HAL interface + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides add-ons for the hardware abstraction layer (HAL) that + allow desktop environments to monitor locally-connected UPS equipment. The + HAL drivers cannot be used at the same time as the normal NUT upsd. + +Package: nut-xml +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 2.2.2) +Description: network UPS tools - XML/HTTP driver + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides netxml-ups, which supports UPS models from + Eaton or MGE that use an XML/HTTP-based Network Management Card or + Proxy. + +Package: nut-powerman-pdu +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 2.4.0), powerman (>= 2.3.3) +Description: network UPS tools - PowerMan PDU driver + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides powerman-pdu, which allows NUT clients to communicate + with the PowerMan daemon to support PDUs. + +Package: libupsclient1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: network UPS tools - client library + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the shared client library. + +Package: libupsclient1-dev +Section: libdevel +Architecture: any +Depends: libupsclient1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Provides: nut-dev +Conflicts: nut-dev (<< 2.2.2) +Description: network UPS tools - development files + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the development files. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..418b4ae --- /dev/null +++ b/debian/copyright @@ -0,0 +1,69 @@ +This package was debianized by Luca Filipozzi on +Wed Jun 28 19:48:05 PDT 2000 + +It was downloaded from http://www.networkupstools.org/ + +Upstream Authors: + + Russell Kroll + Arnaud Quette + Arjen de Korte + Charles Lepple + Kjell Claesson + David Goncalves + and the NUT Team + +Copyright: + + Copyright (C) 2000-2008 Russell Kroll, Arnaud Quette and the NUT Team + +Licenses: + + Most files are licensed under the GNU General Public License (GPL) version 2, + or (at your option) any later version. + + The files in the scripts/python/ directory are released under GNU General + Public License (GPL) version 3, or (at your option) any later version. + + GPL-2 + ----- + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + On Debian systems, the full text of the GNU General Public License v2 + may be found in /usr/share/common-licenses/GPL-2. + + GPL-3 + ----- + + 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 3 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, see . + + On Debian systems, the full text of the GNU General Public License v3 + may be found in /usr/share/common-licenses/GPL-3. + + +The Debian packaging is (C) 2008, Arnaud Quette and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/debian/description.subst b/debian/description.subst new file mode 100644 index 0000000..1ba1c3d --- /dev/null +++ b/debian/description.subst @@ -0,0 +1 @@ +description=nut is a client/server uninterruptible power supply (UPS) monitoring system${Newline}${Space}that permits the sharing of one (or more) UPS between several machines. The${Newline}${Space}'server' monitors the UPS and notifies the 'clients' when the UPS is on${Newline}${Space}battery or has a low battery. diff --git a/debian/hotplug b/debian/hotplug new file mode 100644 index 0000000..36069fe --- /dev/null +++ b/debian/hotplug @@ -0,0 +1,24 @@ +#!/bin/bash +# taken from libgphoto2 + +GROUP=nut + +# for previous udev versions +if [ "$ACTION" = "add" ] && [ -f "$DEVICE" ] +then + # check if $GROUP really exists + if getent group $GROUP > /dev/null; then + chmod 660 "$DEVICE" + chown root:$GROUP "$DEVICE" + fi +fi + +# for recent udev versions +if [ "$ACTION" = "add" ] && [ -r "$DEVNAME" ] +then + # check if $GROUP really exists + if getent group $GROUP > /dev/null; then + chmod 660 "$DEVNAME" + chown root:$GROUP "$DEVNAME" + fi +fi diff --git a/debian/libupsclient1-dev.dirs b/debian/libupsclient1-dev.dirs new file mode 100644 index 0000000..502167f --- /dev/null +++ b/debian/libupsclient1-dev.dirs @@ -0,0 +1 @@ +/lib diff --git a/debian/libupsclient1-dev.install b/debian/libupsclient1-dev.install new file mode 100644 index 0000000..2eabfc9 --- /dev/null +++ b/debian/libupsclient1-dev.install @@ -0,0 +1,5 @@ +debian/tmp/lib/libupsclient.so +debian/tmp/lib/libupsclient.a +debian/tmp/lib/libupsclient.la +debian/tmp/usr/lib/pkgconfig/ +debian/tmp/usr/include diff --git a/debian/libupsclient1-dev.links b/debian/libupsclient1-dev.links new file mode 100644 index 0000000..107c217 --- /dev/null +++ b/debian/libupsclient1-dev.links @@ -0,0 +1 @@ +/lib/libupsclient.so.1.0.0 /usr/lib/libupsclient.so diff --git a/debian/libupsclient1-dev.manpages b/debian/libupsclient1-dev.manpages new file mode 100644 index 0000000..242943a --- /dev/null +++ b/debian/libupsclient1-dev.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man3/*.3 diff --git a/debian/libupsclient1.install b/debian/libupsclient1.install new file mode 100644 index 0000000..7ba3ff0 --- /dev/null +++ b/debian/libupsclient1.install @@ -0,0 +1 @@ +debian/tmp/lib/libupsclient.so.* diff --git a/debian/libupsclient1.postinst b/debian/libupsclient1.postinst new file mode 100644 index 0000000..b86f95b --- /dev/null +++ b/debian/libupsclient1.postinst @@ -0,0 +1,29 @@ +#!/bin/sh -e + +case "$1" in + + configure) + ldconfig + ;; + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + diff --git a/debian/libupsclient1.postrm b/debian/libupsclient1.postrm new file mode 100644 index 0000000..53a6b2d --- /dev/null +++ b/debian/libupsclient1.postrm @@ -0,0 +1,41 @@ +#!/bin/sh -e + +case "$1" in + + remove) + ldconfig + ;; + + purge) + # do nothing + ;; + + upgrade) + # do nothing + ;; + + failed-upgrade) + # do nothing + ;; + + abort-install) + # do nothing + ;; + + abort-upgrade) + # do nothing + ;; + + disappear) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + diff --git a/debian/nut-cgi.README.Debian b/debian/nut-cgi.README.Debian new file mode 100644 index 0000000..0327717 --- /dev/null +++ b/debian/nut-cgi.README.Debian @@ -0,0 +1,39 @@ +Network UPS Tools - CGI Interface - Quick Start for Debian +---------------------------------------------------------- + +(I) Installation +================= + +1) Sample configuration files are provided in /etc/nut/ +Rename without the ".sample" suffix the files hosts.conf, upsstats.html, +upsstats-single.html and optionaly upsset.conf. +Then edit these to match your configuration. + +2) Ensure these configuration files are readable by others + + chmod 755 /etc/nut + chmod 644 /etc/nut/upsset.conf + chmod 644 /etc/nut/hosts.conf + chmod 644 /etc/nut/upsstats.html + chmod 644 /etc/nut/upsstats-single.html + +3) You will then be able to access NUT CGI through a Web browser. +The URL, which depends on your httpd configuration, is: + + http://localhost/cgi-bin/nut/upsstats.cgi + +4) NUT also provides a set of HTML files to wrap the CGIs. +To use it, create a new virtual host with your preferred webserver, and point the +Document Root to: /usr/share/nut/www/ + + You can also add an alias to an existing site, if it is supported: + Alias /nut/ "/usr/share/nut/www/" + + Also ensure that the files in this directory have the suitable permissions. + +For more information on nut-cgi configuration, have a look at the following +manual pages: +- upsstats.html (5) +- hosts.conf (5) +- upsset.conf (5) + diff --git a/debian/nut-cgi.docs b/debian/nut-cgi.docs new file mode 100644 index 0000000..80796c9 --- /dev/null +++ b/debian/nut-cgi.docs @@ -0,0 +1 @@ +data/html/README diff --git a/debian/nut-cgi.install b/debian/nut-cgi.install new file mode 100644 index 0000000..3dc88cc --- /dev/null +++ b/debian/nut-cgi.install @@ -0,0 +1,6 @@ +debian/tmp/etc/nut/hosts.conf +debian/tmp/etc/nut/upsset.conf +debian/tmp/etc/nut/upsstats.html +debian/tmp/etc/nut/upsstats-single.html +debian/tmp/usr/lib/cgi-bin/ +debian/tmp/usr/share/nut/www diff --git a/debian/nut-cgi.manpages b/debian/nut-cgi.manpages new file mode 100644 index 0000000..36a1449 --- /dev/null +++ b/debian/nut-cgi.manpages @@ -0,0 +1,6 @@ +debian/tmp/usr/share/man/man5/hosts.conf.5 +debian/tmp/usr/share/man/man5/upsset.conf.5 +debian/tmp/usr/share/man/man5/upsstats.html.5 +debian/tmp/usr/share/man/man8/upsimage.cgi.8 +debian/tmp/usr/share/man/man8/upsset.cgi.8 +debian/tmp/usr/share/man/man8/upsstats.cgi.8 diff --git a/debian/nut-cgi.postinst b/debian/nut-cgi.postinst new file mode 100644 index 0000000..e082532 --- /dev/null +++ b/debian/nut-cgi.postinst @@ -0,0 +1,55 @@ +#!/bin/sh -e + +case "$1" in + + configure) + + # make sure the nut user exists and has correct memberships + if ! getent group nut >/dev/null; then + addgroup --quiet --system nut + fi + if ! getent passwd nut >/dev/null; then + adduser --quiet --system --ingroup nut --home /var/lib/nut --no-create-home nut + elif ! groups nut | grep -qw nut; then + adduser nut nut + fi +# for Ubuntu, while waiting for a proper debconf +# if ! groups nut | grep -qw dialout; then +# adduser nut dialout +# fi + + # Ensure /etc/nut is readable/crossable for others + if [ -d /etc/nut/ ] ; then + chmod 755 /etc/nut + fi + + # Ensure nut-cgi configuration files are readable by others + for file in upsset.conf hosts.conf upsstats.html upsstats-single.html ; do + if [ -f /etc/nut/$file ] ; then + chmod 644 /etc/nut/$file + fi + done + ;; + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/nut-cgi.postrm b/debian/nut-cgi.postrm new file mode 100644 index 0000000..bdfecf0 --- /dev/null +++ b/debian/nut-cgi.postrm @@ -0,0 +1,46 @@ +#!/bin/sh -e + +case "$1" in + + remove) + # remove sample file if those were previously (wrongly) installed + for file in upsset.conf hosts.conf upsstats.html upsstats-single.html ; do + if [ -f /etc/nut/${file}.sample ] ; then + rm -f /etc/nut/${file}.sample + fi + done + ;; + + purge) + # do nothing + ;; + + upgrade) + # do nothing + ;; + + failed-upgrade) + # do nothing + ;; + + abort-install) + # do nothing + ;; + + abort-upgrade) + # do nothing + ;; + + disappear) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + diff --git a/debian/nut-hal-drivers.docs b/debian/nut-hal-drivers.docs new file mode 100644 index 0000000..78279fb --- /dev/null +++ b/debian/nut-hal-drivers.docs @@ -0,0 +1 @@ +docs/nut-hal.txt diff --git a/debian/nut-hal-drivers.install b/debian/nut-hal-drivers.install new file mode 100644 index 0000000..1ef47a2 --- /dev/null +++ b/debian/nut-hal-drivers.install @@ -0,0 +1,3 @@ +debian/tmp/lib/hal/ /usr/lib/ +debian/tmp/usr/share/hal +debian/tmp/*/udev/ diff --git a/debian/nut-hal-drivers.postinst b/debian/nut-hal-drivers.postinst new file mode 100644 index 0000000..414d5f3 --- /dev/null +++ b/debian/nut-hal-drivers.postinst @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +case "$1" in + + configure) + # ask udev to check for new udev rules + [ -x /etc/init.d/udev ] && pidof udevd > /dev/null \ + && udevadm trigger --action=change + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# diff --git a/debian/nut-hal-drivers.preinst b/debian/nut-hal-drivers.preinst new file mode 100644 index 0000000..2de4425 --- /dev/null +++ b/debian/nut-hal-drivers.preinst @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +if [ "$1" = install ] || [ "$1" = upgrade ]; then + # Remove previous rules if unchanged, otherwise move to new filename. + if [ -e "/etc/udev/rules.d/52_nut-usbups.rules" ]; then + if [ "`md5sum \"/etc/udev/rules.d/52_nut-usbups.rules\" | sed -e \"s/ .*//\"`" = \ + "`dpkg-query -W -f='${Conffiles}' nut-hal-drivers | sed -n -e \"\\\\' /etc/udev/rules.d/52_nut-usbups.rules's/.* //p\"`" ] + then + rm -f "/etc/udev/rules.d/52_nut-usbups.rules" + else + mv "/etc/udev/rules.d/52_nut-usbups.rules" "/etc/udev/rules.d/52-nut-usbups.rules" + fi + fi +fi + +#DEBHELPER# diff --git a/debian/nut-powerman-pdu.install b/debian/nut-powerman-pdu.install new file mode 100644 index 0000000..f0acaa4 --- /dev/null +++ b/debian/nut-powerman-pdu.install @@ -0,0 +1 @@ +debian/tmp/lib/nut/powerman-pdu diff --git a/debian/nut-powerman-pdu.manpages b/debian/nut-powerman-pdu.manpages new file mode 100644 index 0000000..43bbc81 --- /dev/null +++ b/debian/nut-powerman-pdu.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/powerman-pdu.8 diff --git a/debian/nut-snmp.install b/debian/nut-snmp.install new file mode 100644 index 0000000..02dee18 --- /dev/null +++ b/debian/nut-snmp.install @@ -0,0 +1 @@ +debian/tmp/lib/nut/snmp-ups diff --git a/debian/nut-snmp.lintian-overrides b/debian/nut-snmp.lintian-overrides new file mode 100644 index 0000000..24e3f05 --- /dev/null +++ b/debian/nut-snmp.lintian-overrides @@ -0,0 +1,6 @@ +# due to libnetsnmp.la overlinking on dependency_libs +# dpkg-shlibdeps: warning: dependency on libcrypto.so.0.9.8 could be avoided if +# "debian/nut-snmp/lib/nut/snmp-ups" were not uselessly linked against it (they +# use none of its symbols).. +# This will be cleanly solved upstream... +nut-snmp: possible-gpl-code-linked-with-openssl diff --git a/debian/nut-snmp.manpages b/debian/nut-snmp.manpages new file mode 100644 index 0000000..3c9644e --- /dev/null +++ b/debian/nut-snmp.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/snmp-ups.8 diff --git a/debian/nut-xml.install b/debian/nut-xml.install new file mode 100644 index 0000000..9c6d56d --- /dev/null +++ b/debian/nut-xml.install @@ -0,0 +1 @@ +debian/tmp/lib/nut/netxml-ups diff --git a/debian/nut-xml.manpages b/debian/nut-xml.manpages new file mode 100644 index 0000000..91a537e --- /dev/null +++ b/debian/nut-xml.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/netxml-ups.8 diff --git a/debian/nut.README.Debian b/debian/nut.README.Debian new file mode 100644 index 0000000..7ca7e60 --- /dev/null +++ b/debian/nut.README.Debian @@ -0,0 +1,155 @@ +Network UPS Tools - Quick Start for Debian +------------------------------------------ + +Anyway, here are the quick start instructions for using nut: + +These Quick Start instructions are useful for a UPS connected to a single +machine. For a UPS connected to multiple machines, additional steps must be +taken, as outlined at the end of this file, including the notice regarding +SECURITY CONSIDERATIONS. + +(I) Upgrading +============= + +In case of upgrading, follow instructions given in: +/usr/share/doc/nut/UPGRADING + +Note that service(s) (driver(s), upsd, upsmon) are not restarted upon +upgrade, to avoid service disruption. You have to manually do it. + +(II) Installation +================= + +Configuration files are located in /etc/nut/ +In order to tune NUT configuration according to your needs, follow the below +information, along with the one provided inside these files. + +(1) /etc/nut/nut.conf (see 'man 5 nut.conf' for more information) + Edit /etc/nut/nut.conf and modify the "MODE" variable according to your + configuration. + + You can also fine tune the daemons options through UPSD_OPTIONS and + UPSMON_OPTIONS. + +The steps 2 to 5 are only required if you use a "standalone" or "netserver" +MODE. If you are running in "netclient" MODE, jump directly to section 6. + +(2) /etc/nut/ups.conf (see 'man 5 ups.conf' for more information) + + Edit /etc/nut/ups.conf and add something like: + [myups] + driver = usbhid-ups + port = auto + Use the appropriate driver for your UPS and select the correct port. + To select the driver, take a look at the UPS compatibility list: + /usr/share/nut/driver.list + + If you have more than one UPS, add as many entries as needed. + + If you wish to test manually whether your configuration of ups.conf is + correct, you may invoke upsdrvctl by hand (as root): + /sbin/upsdrvctl start [myups] + /sbin/upsdrvctl stop [myups] + + Ensure that the permissions of ups.conf do not permit the world to + read it. It should already be thus, but the following command + accomplishes this: + chown root:nut /etc/nut/ups.conf + chmod 640 /etc/nut/ups.conf + +(3) device port permissions + The nut user need to be able to access the device port both for reading and + writing. + + For serial devices, there are two possibilities: + + a) You can add the nut user to the dialout group. + The following command accomplishes this: + addgroup nut dialout + + This is not done by default for security reason on Debian, but is applied + on Ubuntu. + + b) Another solution, for system supporting udev, is to create a file + (for example /etc/udev/rules.d/52_nut-serialups.rules), placed + after 020_permissions.rules and to add something like: + KERNEL=="ttyS1", GROUP="nut" + + where 'ttyS1' has to be replaced by the exact name of your serial port. + + For USB devices, permissions are automatically set by the + 52-nut-usbups.rules udev rules file. + +(4) /etc/nut/upsd.conf (see 'man 5 upsd.conf' for more information) + the default /etc/nut/upsd.conf is fine for a "standalone" configuration. + If you are in "netserver" MODE, you will have to modify the LISTEN option + to something suitable. + + Ensure that the permissions of upsd.conf do not permit the world to + read it. It should already be thus, but the following command + accomplishes this: + chown root:nut /etc/nut/upsd.conf + chmod 640 /etc/nut/upsd.conf + +(5) /etc/nut/upsd.users (see 'man 5 upsd.users' for more information) + Edit /etc/nut/upsd.users and add something like the following, + without the comments, in order to define a user: + [monmaster] + password = blah + upsmon master + Please use *different* usernames and passwords than you use on your + system; see the note regarding SECURITY CONSIDERATIONS at the end + of this file. + + Ensure that the permissions of upsd.users do not permit the world to + read it. It should already be thus, but the following command + accomplishes this: + chown root:nut /etc/nut/upsd.users + chmod 640 /etc/nut/upsd.users + +(6) /etc/nut/upsmon.conf (see 'man 5 upsmon.conf' for more information) + Edit /etc/nut/upsmon.conf and add something like the following: + MONITOR myups@localhost 1 monmaster blah master + POWERDOWNFLAG /etc/killpower + SHUTDOWNCMD "/sbin/shutdown -h +0" + + Ensure that the permissions of upsmon.conf do not permit the world to + read it. It should already be thus, but the following commands + accomplishes this: + chown root:nut /etc/nut/upsmon.conf + chmod 640 /etc/nut/upsmon.conf + +(7) /etc/default/nut + This file is not used anymore. + nut.conf provides all the needed features to replace this file. + +(8) start the daemon + Invoke '/etc/init.d/nut start' to start the daemon(s). Check + /var/log/syslog to ensure that upsd, appropriate drivers, and upsmon + started up correctly. + + +Additional Notes for Sharing a UPS +---------------------------------- +If you have multiple machines connected to the same UPS, you will need to +(a) modify the access control lists in upsd.conf on the server; +(b) add additional users to upsd.users on the server; and +(c) configure upsmon.conf on the clients. + +Please note that upsmon on a client machine and upsd on a server machine need +to communicate via your network. This means that you need to ensure that all +the networking equipment (hub, switch, router, etc.) between the client and the +server is powered by the UPS. Otherwise, when the power goes down, the network +connection between the client machine will be broken and the client will not +be told to shut down. + +SECURITY CONSIDERATIONS +----------------------- +Finally, please be aware of the following SECURITY CONSIDERATIONS: the TCP +communications between the client daemon, upsmon, and the server daemon, upsd, +send the username and passwords defined in upsd.users and used in upsmon.conf +over the wire UNENCRYPTED. This means that somebody could sniff the username +and password. A version that encrypts the connection using SSL should be +available someday. + +Please see the documentation in /usr/share/doc/nut/docs for more information. diff --git a/debian/nut.TODO.Debian b/debian/nut.TODO.Debian new file mode 100644 index 0000000..3a35bbc --- /dev/null +++ b/debian/nut.TODO.Debian @@ -0,0 +1,11 @@ +- address the /var/www issue with upstream +- rewrite and enhance the init script (log output, LSB, ...) +- audit and solve the lintian reports... +- factorise install rules (possibly use CDBS) +- consider an SSL/TLS set of packages (ie nut-ssl, ...) + or help the port to NSS +- apply when available the NUT Packaging Standard (NPS) + ie create a nut-client package +- install the device-recorder.sh script (with nut-client or nut-dev?) +- consider joining the powermgt effort: + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=55123 diff --git a/debian/nut.dirs b/debian/nut.dirs new file mode 100644 index 0000000..0082856 --- /dev/null +++ b/debian/nut.dirs @@ -0,0 +1,4 @@ +/etc/nut +/bin +/sbin +/var/lib/nut diff --git a/debian/nut.docs b/debian/nut.docs new file mode 100644 index 0000000..90f2328 --- /dev/null +++ b/debian/nut.docs @@ -0,0 +1,5 @@ +AUTHORS +MAINTAINERS +README +UPGRADING +docs diff --git a/debian/nut.init b/debian/nut.init new file mode 100644 index 0000000..50706ed --- /dev/null +++ b/debian/nut.init @@ -0,0 +1,204 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: nut +# Required-Start: $local_fs $syslog $network $remote_fs +# Required-Stop: $local_fs $syslog $network $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Network UPS Tools initscript +# Description: This script take care of starting and stopping the +# Network UPS Tools components. When needed, it also +# handle the UPS hardware shutdown. +### END INIT INFO + +# Author: Arnaud Quette + +PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin + +NAME=nut +DESC="Network UPS Tools" +DEFAULT=/etc/default/nut +CONFIG=/etc/nut/nut.conf + +. /lib/lsb/init-functions + +# set upsd specific options. use "man upsd" for more info +UPSD_OPTIONS="" + +# set upsmon specific options. use "man upsmon" for more info +UPSMON_OPTIONS="" + +# Include defaults if available (transition period) +if [ -f $DEFAULT ] ; then + . $DEFAULT +fi + +# Include NUT nut.conf +if [ -f $CONFIG ] ; then + . $CONFIG +fi + +# Explicitly require the configuration to be done in /etc/nut/nut.conf +if [ "x$MODE" = "xnone" -o -z "$MODE" ] ; then + log_action_msg "$NAME disabled, please adjust the configuration to your needs" + log_action_msg "Then set MODE to a suitable value in $CONFIG to enable it" + # exit success to avoid breaking the install process! + exit 0 +fi + +pid_dir=/var/run/nut +upsmon_pid=${pid_dir}/upsmon.pid +upsd_pid=${pid_dir}/upsd.pid +upsd=/sbin/upsd +upsdrvctl=/sbin/upsdrvctl +upsmon=/sbin/upsmon +log=">/dev/null 2>/dev/null" + +# Check if /var/run/nut exists and has the correct perms +check_var_directory() { + [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ + && chown root:nut ${pid_dir} \ + && chmod 770 ${pid_dir} +} + +# check if the right components are running +check_status() { + case "$MODE" in + standalone|netserver) + status_of_proc -p $upsd_pid $upsd upsd + status_of_proc -p $upsmon_pid $upsmon upsmon + ;; + netclient) + status_of_proc -p $upsmon_pid $upsmon upsmon + ;; + none|*) + ;; + esac +} + +start_stop_server () { + case "$MODE" in + standalone|netserver) + case "$1" in + start) + ! $upsdrvctl start >/dev/null 2>&1 && \ + log_progress_msg "(driver(s) failed)" || log_progress_msg "driver(s)" + start-stop-daemon -S -q -p $upsd_pid -x $upsd \ + -- $UPSD_OPTIONS >/dev/null 2>&1 + ;; + stop) + start-stop-daemon -K -o -q -p $upsd_pid -n upsd >/dev/null 2>&1 + ! /sbin/upsdrvctl stop >/dev/null 2>&1 && \ + log_progress_msg "(driver(s) failed)" || log_progress_msg "driver(s)" + ;; + esac + ;; + none|netclient|*) + return 1 + ;; + esac +} + +start_stop_client () { + case "$MODE" in + standalone|netserver|netclient) + case "$1" in + start) + start-stop-daemon -S -q -p $upsmon_pid -x $upsmon \ + -- $UPSMON_OPTIONS >/dev/null 2>&1 + ;; + stop) + start-stop-daemon -K -o -q -p $upsmon_pid -n upsmon >/dev/null 2>&1 + ;; + esac + ;; + none|*) + return 1 + ;; + esac +} + +case "$1" in + + start) + log_daemon_msg "Starting $DESC" + check_var_directory + start_stop_server start && log_progress_msg "upsd" + start_stop_client start && log_progress_msg "upsmon" + log_end_msg 0 + ;; + + stop) + log_daemon_msg "Stopping $DESC" + start_stop_server stop && log_progress_msg "upsd" + start_stop_client stop && log_progress_msg "upsmon" + log_end_msg 0 + ;; + + reload) + $upsd -c reload >/dev/null 2>&1 + $upsmon -c reload >/dev/null 2>&1 + ;; + + restart|force-reload) + log_daemon_msg "Restarting $DESC" + start_stop_client stop + start_stop_server stop + sleep 5 + check_var_directory + start_stop_server start && log_progress_msg "upsd" + start_stop_client start && log_progress_msg "upsmon" + log_end_msg 0 + ;; + + status) + #log_daemon_msg "Checking status of $DESC" + echo "Checking status of $DESC" + check_status + exit $? + ;; + + poweroff) + flag=`sed -ne 's#^ *POWERDOWNFLAG *\(.*\)$#\1#p' /etc/nut/upsmon.conf` + wait_delay=`sed -ne 's#^ *POWEROFF_WAIT= *\(.*\)$#\1#p' /etc/nut/nut.conf` + if [ -f "$flag" ] ; then + if $upsmon -K >/dev/null 2>&1 ; then + log_daemon_msg "Shutting down the UPS ..." + sleep 1 + if $upsdrvctl shutdown ; then + sleep 5 + log_progress_msg "Waiting for UPS to cut the power" + log_end_msg 0 + else + log_progress_msg "Shutdown failed." + log_progress_msg "Waiting for UPS batteries to run down" + log_end_msg 0 + fi + if [ "$wait_delay" ] ; then + log_daemon_msg " (will reboot after $wait_delay) ..." + sleep "$wait_delay" + invoke-rc.d reboot stop + fi + else + log_daemon_msg "Power down flag is not set (UPS shutdown not needed)" + fi + else + if [ -z "$flag" ] ; then + log_daemon_msg "##########################################################" + log_progress_msg "## POWERDOWNFLAG is not defined in /etc/nut/upsmon.conf ##" + log_progress_msg "## ##" + log_progress_msg "## Please read the Manual page upsmon.conf(5) ##" + log_progress_msg "##########################################################" + log_end_msg 0 + fi + fi + ;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|reload|restart|force-reload|status|poweroff}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/nut.install b/debian/nut.install new file mode 100644 index 0000000..ad72c3c --- /dev/null +++ b/debian/nut.install @@ -0,0 +1,56 @@ +debian/tmp/bin/upslog +debian/tmp/bin/upsc +debian/tmp/bin/upsrw +debian/tmp/bin/upscmd +debian/tmp/sbin/ +debian/tmp/usr/share/nut/cmdvartab +debian/tmp/usr/share/nut/driver.list +debian/tmp/*/udev/ +debian/tmp/etc/nut/nut.conf +debian/tmp/etc/nut/ups.conf +debian/tmp/etc/nut/upsd.conf +debian/tmp/etc/nut/upsd.users +debian/tmp/etc/nut/upsmon.conf +debian/tmp/etc/nut/upssched.conf +debian/tmp/etc/bash_completion.d/nut +debian/tmp/lib/nut/genericups +debian/tmp/lib/nut/mge-shut +debian/tmp/lib/nut/rhino +debian/tmp/lib/nut/bestups +debian/tmp/lib/nut/bestfortress +debian/tmp/lib/nut/usbhid-ups +debian/tmp/lib/nut/apcsmart +debian/tmp/lib/nut/belkin +debian/tmp/lib/nut/blazer_ser +debian/tmp/lib/nut/blazer_usb +debian/tmp/lib/nut/clone +debian/tmp/lib/nut/ivtscd +debian/tmp/lib/nut/metasys +debian/tmp/lib/nut/etapro +debian/tmp/lib/nut/tripplite_usb +debian/tmp/lib/nut/bcmxcp +debian/tmp/lib/nut/bestuferrups +debian/tmp/lib/nut/gamatronic +debian/tmp/lib/nut/newmge-shut +debian/tmp/lib/nut/safenet +debian/tmp/lib/nut/isbmex +debian/tmp/lib/nut/masterguard +debian/tmp/lib/nut/belkinunv +debian/tmp/lib/nut/tripplite +debian/tmp/lib/nut/upscode2 +debian/tmp/lib/nut/solis +debian/tmp/lib/nut/oneac +debian/tmp/lib/nut/mge-utalk +debian/tmp/lib/nut/powerpanel +debian/tmp/lib/nut/bestfcom +debian/tmp/lib/nut/liebert +debian/tmp/lib/nut/powercom +debian/tmp/lib/nut/bcmxcp_usb +debian/tmp/lib/nut/victronups +debian/tmp/lib/nut/tripplitesu +debian/tmp/lib/nut/optiups +debian/tmp/lib/nut/megatec_usb +debian/tmp/lib/nut/upsdrvctl /sbin +debian/tmp/lib/nut/megatec +debian/tmp/lib/nut/everups +debian/tmp/lib/nut/dummy-ups diff --git a/debian/nut.link b/debian/nut.link new file mode 100644 index 0000000..8453f4f --- /dev/null +++ b/debian/nut.link @@ -0,0 +1,2 @@ +etc/init.d/nut etc/init.d/ups-monitor + diff --git a/debian/nut.lintian-overrides b/debian/nut.lintian-overrides new file mode 100644 index 0000000..432491d --- /dev/null +++ b/debian/nut.lintian-overrides @@ -0,0 +1,2 @@ +nut: script-in-etc-init.d-not-registered-via-update-rc.d + diff --git a/debian/nut.manpages b/debian/nut.manpages new file mode 100644 index 0000000..a377aa9 --- /dev/null +++ b/debian/nut.manpages @@ -0,0 +1,51 @@ +debian/tmp/usr/share/man/man5/ups.conf.5 +debian/tmp/usr/share/man/man5/upsd.conf.5 +debian/tmp/usr/share/man/man5/upsd.users.5 +debian/tmp/usr/share/man/man5/upsmon.conf.5 +debian/tmp/usr/share/man/man5/upssched.conf.5 +debian/tmp/usr/share/man/man8/apcsmart.8 +debian/tmp/usr/share/man/man8/bcmxcp.8 +debian/tmp/usr/share/man/man8/bcmxcp_usb.8 +debian/tmp/usr/share/man/man8/belkin.8 +debian/tmp/usr/share/man/man8/belkinunv.8 +debian/tmp/usr/share/man/man8/bestfcom.8 +debian/tmp/usr/share/man/man8/bestuferrups.8 +debian/tmp/usr/share/man/man8/bestups.8 +debian/tmp/usr/share/man/man8/bestfortress.8 +debian/tmp/usr/share/man/man8/blazer.8 +debian/tmp/usr/share/man/man8/clone.8 +debian/tmp/usr/share/man/man8/dummy-ups.8 +debian/tmp/usr/share/man/man8/etapro.8 +debian/tmp/usr/share/man/man8/everups.8 +debian/tmp/usr/share/man/man8/gamatronic.8 +debian/tmp/usr/share/man/man8/genericups.8 +debian/tmp/usr/share/man/man8/isbmex.8 +debian/tmp/usr/share/man/man8/liebert.8 +debian/tmp/usr/share/man/man8/masterguard.8 +debian/tmp/usr/share/man/man8/megatec.8 +debian/tmp/usr/share/man/man8/megatec_usb.8 +debian/tmp/usr/share/man/man8/metasys.8 +debian/tmp/usr/share/man/man8/mge-shut.8 +debian/tmp/usr/share/man/man8/mge-utalk.8 +debian/tmp/usr/share/man/man8/nutupsdrv.8 +debian/tmp/usr/share/man/man8/oneac.8 +debian/tmp/usr/share/man/man8/optiups.8 +debian/tmp/usr/share/man/man8/powercom.8 +debian/tmp/usr/share/man/man8/powerpanel.8 +debian/tmp/usr/share/man/man8/rhino.8 +debian/tmp/usr/share/man/man8/safenet.8 +debian/tmp/usr/share/man/man8/solis.8 +debian/tmp/usr/share/man/man8/tripplite.8 +debian/tmp/usr/share/man/man8/tripplitesu.8 +debian/tmp/usr/share/man/man8/tripplite_usb.8 +debian/tmp/usr/share/man/man8/upsc.8 +debian/tmp/usr/share/man/man8/upscmd.8 +debian/tmp/usr/share/man/man8/upscode2.8 +debian/tmp/usr/share/man/man8/upsd.8 +debian/tmp/usr/share/man/man8/upsdrvctl.8 +debian/tmp/usr/share/man/man8/upslog.8 +debian/tmp/usr/share/man/man8/upsmon.8 +debian/tmp/usr/share/man/man8/upsrw.8 +debian/tmp/usr/share/man/man8/upssched.8 +debian/tmp/usr/share/man/man8/usbhid-ups.8 +debian/tmp/usr/share/man/man8/victronups.8 diff --git a/debian/nut.postinst b/debian/nut.postinst new file mode 100644 index 0000000..55d88cb --- /dev/null +++ b/debian/nut.postinst @@ -0,0 +1,136 @@ +#!/bin/sh -e + +case "$1" in + + configure) + + # make sure the nut user exists and has correct memberships + if ! getent group nut >/dev/null; then + addgroup --quiet --system nut + fi + if ! getent passwd nut >/dev/null; then + adduser --quiet --system --ingroup nut --home /var/lib/nut --no-create-home nut + elif ! groups nut | grep -qw nut; then + adduser nut nut + fi +# for Ubuntu, while waiting for a proper debconf +# if ! groups nut | grep -qw dialout; then +# adduser nut dialout +# fi + + # make sure that conffiles are secured and have the correct ownerships + if [ -d /etc/nut/ ] ; then + chown root:nut /etc/nut/ + fi + for file in nut.conf ups.conf upsd.conf upsmon.conf upsd.users upssched.conf ; do + if [ -f /etc/nut/$file ] ; then + chown root:nut /etc/nut/$file + chmod 640 /etc/nut/$file + fi + done + + # make sure that /var/run/nut exists and has the correct ownerships + if [ ! -d /var/run/nut ] ; then + mkdir -p /var/run/nut + fi + if [ -d /var/run/nut ] ; then + chown root:nut /var/run/nut + chmod 770 /var/run/nut + fi + + # make sure that /var/lib/nut has the correct permissions and ownerships + if [ -d /var/lib/nut ] ; then + chown root:nut /var/lib/nut + chmod 770 /var/lib/nut + fi + + # ask udev to check for new udev rules + [ -x /etc/init.d/udev ] && pidof udevd > /dev/null \ + && udevadm trigger --action=change + + # 557178 udevadm trigger --subsystem-match=usb + + # migrate /etc/default/nut to /etc/nut/nut.conf (part #2) + if dpkg --compare-versions "$2" lt-nl "2.4.1-2" ; then + # source the temporary /etc/default/nut.bak file + if [ -f /etc/default/nut.bak ] ; then + . /etc/default/nut.bak + + # FIXME: use a template (and debconf to output?) + echo "migrating /etc/default/nut to /etc/nut/nut.conf" + + # pre process the config + case "$START_UPSD" in + y|Y|yes|YES|Yes) + START_UPSD=yes + ;; + *) + START_UPSD=no + ;; + esac + case "$START_UPSMON" in + y|Y|yes|YES|Yes) + START_UPSMON=yes + ;; + *) + START_UPSMON=no + ;; + esac + + # now process the result + if [ "x$START_UPSD" = "xyes" ] ; then + if [ "x$START_UPSMON" = "xyes" ] ; then + # can also be netserver + NUT_MODE=standalone + #else not processed since it should be an error! + fi + else + if [ "x$START_UPSMON" = "xyes" ] ; then + NUT_MODE=netclient + else + NUT_MODE=none + fi + fi + + # output back the MODE to nut.conf + sed "s/^MODE\(.*\)/MODE=$NUT_MODE/" /etc/nut/nut.conf > /etc/nut/nut.conf.new + + # append the content of default, removing START_* / start... + grep -iv 'START' /etc/default/nut.bak >> /etc/nut/nut.conf.new + # move back to nut.conf + mv /etc/nut/nut.conf.new /etc/nut/nut.conf + # and to init.d/nut + #if [ -f /etc/init.d/nut ] ; then + # sed "s/^UPSD_OPTIONS\(.*\)/UPSD_OPTIONS=\"$UPSD_OPTIONS\"/" /etc/init.d/nut > /etc/init.d/nut.new + # sed "s/^UPSMON_OPTIONS\(.*\)/UPSMON_OPTIONS=\"$UPSMON_OPTIONS\"/" /etc/init.d/nut.new > /etc/init.d/nut + #fi + rm -f /etc/default/nut.bak /etc/default/nut + fi + else + # re process nut.conf MODE so that it can be sourced + NUT_MODE=`grep -e '^ *MODE' /etc/nut/nut.conf | tr -d " "` + sed "s/^ *MODE.*/$NUT_MODE/" /etc/nut/nut.conf > /etc/nut/nut.conf.new + mv /etc/nut/nut.conf.new /etc/nut/nut.conf + fi + ;; + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# diff --git a/debian/nut.postrm b/debian/nut.postrm new file mode 100644 index 0000000..385c39f --- /dev/null +++ b/debian/nut.postrm @@ -0,0 +1,53 @@ +#!/bin/sh -e + +case "$1" in + + remove) + # remove sample file if those were previously (wrongly) installed + for file in ups.conf upsd.conf upsmon.conf upsd.users upssched.conf ; do + rm -f /etc/nut/${file}.sample + done + ;; + + purge) + # remove udev rules files + rm -f /etc/udev/rules.d/025_nut-usbups.rules + rm -f /etc/udev/rules.d/52_nut-usbups.rules + rm -f /etc/udev/rules.d/52-nut-usbups.rules + # remove the nut user + if getent passwd nut >/dev/null; then + deluser --quiet nut + fi + # handle a dpkg bug + [ -d /etc/nut ] && rmdir --ignore-fail-on-non-empty /etc/nut >/dev/null 2>&1 + ;; + + upgrade) + # do nothing + ;; + + failed-upgrade) + # do nothing + ;; + + abort-install) + # do nothing + ;; + + abort-upgrade) + # do nothing + ;; + + disappear) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + diff --git a/debian/nut.preinst b/debian/nut.preinst new file mode 100644 index 0000000..9999abe --- /dev/null +++ b/debian/nut.preinst @@ -0,0 +1,26 @@ +#!/bin/sh -e + +if [ "$1" = upgrade ]; then + # remove the obsolete udev file + [ -f /etc/udev/rules.d/025_nut-usbups.rules ] && rm -f /etc/udev/rules.d/025_nut-usbups.rules + + # Remove previous rules if unchanged, otherwise move to new filename. + if [ -e "/etc/udev/rules.d/52_nut-usbups.rules" ]; then + if [ "`md5sum \"/etc/udev/rules.d/52_nut-usbups.rules\" | sed -e \"s/ .*//\"`" = \ + "`dpkg-query -W -f='${Conffiles}' nut | sed -n -e \"\\\\' /etc/udev/rules.d/52_nut-usbups.rules's/.* //p\"`" ] + then + rm -f "/etc/udev/rules.d/52_nut-usbups.rules" + else + mv "/etc/udev/rules.d/52_nut-usbups.rules" "/etc/udev/rules.d/52-nut-usbups.rules" + fi + fi + + # migrate /etc/default/nut to /etc/nut/nut.conf (part #1) + # we need to do this before default gets trashed + if [ -f /etc/default/nut ] ; then + # backup /etc/default/nut + cp /etc/default/nut /etc/default/nut.bak + fi +fi + +#DEBHELPER# diff --git a/debian/nut.prerm b/debian/nut.prerm new file mode 100644 index 0000000..2c9c2e1 --- /dev/null +++ b/debian/nut.prerm @@ -0,0 +1,42 @@ +#!/bin/sh -e + +# the DEBHELPER token is purposely not used +# because we don't want the daemon to be +# stopped during an upgrade + +case "$1" in + + remove) + # nut-usb specifics + [ -f /etc/hotplug/usb/libhid.usermap ] && rm -f /etc/hotplug/usb/libhid.usermap + [ -f /etc/hotplug/usb/libhidups ] && rm -f /etc/hotplug/usb/libhidups + + [ -L /usr/doc/nut ] && rm -f /usr/doc/nut + # do stop the daemon on remove + invoke-rc.d nut stop && sleep 1 + [ -d /var/run/nut ] && rm -f /var/run/nut/*.pid + ;; + + upgrade) + [ -L /usr/doc/nut ] && rm -f /usr/doc/nut + # do not stop the daemon on upgrade + ;; + + failed-upgrade) + # do nothing + ;; + + deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..f7373d6 --- /dev/null +++ b/debian/rules @@ -0,0 +1,138 @@ +#!/usr/bin/make -f + +#export DH_VERBOSE=1 +export DH_OPTIONS= + +DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) +CFLAGS+=$(if $(findstring debug,$(DEB_BUILD_OPTIONS)),-g) +CFLAGS+=$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),-O0,-O2) +CONFIGUREFLAGS+=$(if $(findstring nostrip,$(DEB_BUILD_OPTIONS)),,--enable-strip) +CONFIGUREFLAGS+=--build=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +CONFIGUREFLAGS+=--host=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +CONFIGUREFLAGS+=$(if $(wildcard /usr/include/linux/hiddev.h),--with-linux-hiddev=/usr/include/linux/hiddev.h,--without-linux-hiddev) +ifeq (linux,$(DEB_HOST_ARCH_OS)) + CONFIGUREFLAGS+=--with-udev-dir=/lib/udev +endif + +configure: patch configure-stamp +configure-stamp: + dh_testdir + CFLAGS='$(CFLAGS)' ./configure $(CONFIGUREFLAGS) \ + --prefix=/usr \ + --exec-prefix=/ \ + --sysconfdir=/etc/nut \ + --mandir=/usr/share/man \ + --libdir=/lib \ + --includedir=/usr/include \ + --without-ssl \ + --with-hal \ + --with-cgi \ + --with-dev \ + --enable-static \ + --with-statepath=/var/run/nut \ + --with-altpidpath=/var/run/nut \ + --with-drvpath=/lib/nut \ + --with-cgipath=/usr/lib/cgi-bin/nut \ + --with-htmlpath=/usr/share/nut/www \ + --with-pidpath=/var/run/nut \ + --datadir=/usr/share/nut \ + --with-pkgconfig-dir=/usr/lib/pkgconfig \ + --with-user=nut --with-group=nut + touch $@ + +build: configure +build: build-stamp +build-stamp: + dh_testdir + $(MAKE) + touch $@ + +clean: clean-patched unpatch +clean-patched: + dh_testdir + dh_testroot + rm -f configure-stamp build-stamp install-stamp + [ ! -f Makefile ] || $(MAKE) distclean + dh_clean +# debconf-updatepo +# -test -r /usr/share/misc/config.sub && \ +# cp -f /usr/share/misc/config.sub config.sub +# -test -r /usr/share/misc/config.guess && \ +# cp -f /usr/share/misc/config.guess config.guess + +patch: patch-stamp +patch-stamp: +# dpatch apply-all +# touch $@ + # run autoreconf for dpatch +# autoreconf + +unpatch: +# dpatch deapply-all +# rm -rf patch-stamp debian/patched + +uninstall: + dh_testdir + dh_testroot + rm -f install-stamp + dh_prep + +install: build +install: install-stamp +install-stamp: DH_OPTIONS= +install-stamp: + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + $(MAKE) install \ + DESTDIR=$(CURDIR)/debian/tmp RUNUID=65534 RUNGID=65534 + + # install the bash completion script + mkdir -p $(CURDIR)/debian/tmp/etc/bash_completion.d + cp $(CURDIR)/scripts/misc/nut.bash_completion \ + $(CURDIR)/debian/tmp/etc/bash_completion.d/nut + + # install the default configuration + for f in $(CURDIR)/debian/tmp/etc/nut/*; do \ + nf=`basename $${f} | sed 's/\(.*\).sample/\1/'`; \ + mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \ + done + + dh_installchangelogs ChangeLog + dh_installinit -- start 50 2 3 4 5 . stop 50 0 1 6 . + dh_install + dh_installman + dh_installdocs -XMakefile + dh_link + touch $@ + +binary-indep: DH_OPTIONS=-i +binary-indep: install + +binary-arch: DH_OPTIONS=-a +binary-arch: install + dh_testdir + dh_testroot +# dh_installdebconf + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_lintian -pnut + dh_installdeb + dh_shlibdeps +# dh_shlibdeps -Xlibupsclient.a +ifeq (linux,$(DEB_HOST_ARCH_OS)) + dh_gencontrol -- -Vudev="udev (>= 0.124-1)" +# for Ubuntu +# dh_gencontrol -- -Vudev="udev (>= 136-1)" +else + dh_gencontrol -- -Vudev="" +endif + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary configure install uninstall patch unpatch diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..68b0632 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://www.networkupstools.org/source/2.4/nut-(.*)\.tar\.gz debian uupdate From 69151f849c3e8f7a4564ce7e16abe90348e69010 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 21 Dec 2010 14:11:23 +0100 Subject: [PATCH 002/300] Commit NMU changes from Tim Retout --- debian/changelog | 8 ++++++++ drivers/libhid.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 914c006..e8982c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +nut (2.4.3-1.1) unstable; urgency=low + + * Non-maintainer upload. + * drivers/libhid.c: Apply r2407 from upstream to fix bug with some + low speed UPS devices. (Closes: #583371) + + -- Tim Retout Fri, 15 Oct 2010 19:31:39 +0100 + nut (2.4.3-1) unstable; urgency=low * New upstream release (Closes: #544390, #528222, #539747, #526811, diff --git a/drivers/libhid.c b/drivers/libhid.c index 9387657..f2e8fbb 100644 --- a/drivers/libhid.c +++ b/drivers/libhid.c @@ -141,7 +141,7 @@ static int refresh_report_buffer(reportbuf_t *rbuf, hid_dev_handle_t udev, HIDDa { int id = pData->ReportID; int r; - unsigned char buf[SMALLBUF]; + unsigned char buf[8]; if (rbuf->ts[id] + age > time(NULL)) { /* buffered report is still good; nothing to do */ @@ -469,7 +469,7 @@ bool_t HIDSetItemValue(hid_dev_handle_t udev, const char *hidpath, double Value, */ int HIDGetEvents(hid_dev_handle_t udev, HIDData_t **event, int eventsize) { - unsigned char buf[SMALLBUF]; + unsigned char buf[8]; int itemCount = 0; int buflen, r, i; HIDData_t *pData; From 5bc443a878f83661def30275292dd98c4be6805d Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 21 Dec 2010 14:30:25 +0100 Subject: [PATCH 003/300] Bump Standards-Version to 3.9.1 --- debian/changelog | 6 ++++++ debian/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e8982c6..8cd6ddf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nut (2.4.3-2) UNRELEASED; urgency=low + + * Bump Standards-Version to 3.9.1 + + -- Laurent Bigonville Tue, 21 Dec 2010 14:29:47 +0100 + nut (2.4.3-1.1) unstable; urgency=low * Non-maintainer upload. diff --git a/debian/control b/debian/control index 2af1da2..e495ceb 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Arnaud Quette Build-Depends: debhelper (>= 7), autoconf, automake, libtool, libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libhal-dev (>= 0.5.8), hal, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, libneon27-gnutls-dev | libneon26-gnutls-dev | libneon-dev | libneon27-dev | libneon26-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6) -Standards-Version: 3.8.4 +Standards-Version: 3.9.1 Homepage: http://www.networkupstools.org Vcs-Browser: http://svn.debian.org/wsvn/nut Vcs-Svn: svn://svn.debian.org/nut/trunk From f3d62f13024619d83386c94664fa4138cad18647 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 21 Dec 2010 14:32:39 +0100 Subject: [PATCH 004/300] Update Vcs-* fields to new GIT repository --- debian/changelog | 6 ++++-- debian/control | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8cd6ddf..f25c33d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ nut (2.4.3-2) UNRELEASED; urgency=low - * Bump Standards-Version to 3.9.1 + * debian/control: + - Bump Standards-Version to 3.9.1 + - Update Vcs-* fields to new GIT repository - -- Laurent Bigonville Tue, 21 Dec 2010 14:29:47 +0100 + -- Laurent Bigonville Tue, 21 Dec 2010 14:31:24 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/control b/debian/control index e495ceb..4ad3aba 100644 --- a/debian/control +++ b/debian/control @@ -5,8 +5,8 @@ Maintainer: Arnaud Quette Build-Depends: debhelper (>= 7), autoconf, automake, libtool, libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libhal-dev (>= 0.5.8), hal, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, libneon27-gnutls-dev | libneon26-gnutls-dev | libneon-dev | libneon27-dev | libneon26-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6) Standards-Version: 3.9.1 Homepage: http://www.networkupstools.org -Vcs-Browser: http://svn.debian.org/wsvn/nut -Vcs-Svn: svn://svn.debian.org/nut/trunk +Vcs-Browser: http://git.debian.org/?p=collab-maint/nut.git;a=summary +Vcs-Git: git://git.debian.org/git/collab-maint/nut.git Package: nut Architecture: any From d71a946e5635808e5f653f14caf779feaef09160 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 21 Dec 2010 14:49:53 +0100 Subject: [PATCH 005/300] Switch to dpkg-source 3.0 (quilt) format (Closes: #573601) --- debian/changelog | 3 ++- debian/source/format | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog index f25c33d..5ab4bb2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low * debian/control: - Bump Standards-Version to 3.9.1 - Update Vcs-* fields to new GIT repository + * Switch to dpkg-source 3.0 (quilt) format (Closes: #573601) - -- Laurent Bigonville Tue, 21 Dec 2010 14:31:24 +0100 + -- Laurent Bigonville Tue, 21 Dec 2010 14:42:34 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) From 2f40c02cd5f91bd49c68ea76bcacee586f1bf3df Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 21 Dec 2010 14:50:30 +0100 Subject: [PATCH 006/300] debian/patches/0001-low_speed_usb_ups.patch: Use patch system for changes that were applied directly in the source --- debian/changelog | 4 +++- debian/patches/0001-low_speed_usb_ups.patch | 22 +++++++++++++++++++++ debian/patches/series | 1 + drivers/libhid.c | 4 ++-- 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 debian/patches/0001-low_speed_usb_ups.patch create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 5ab4bb2..09b8a70 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,10 @@ nut (2.4.3-2) UNRELEASED; urgency=low - Bump Standards-Version to 3.9.1 - Update Vcs-* fields to new GIT repository * Switch to dpkg-source 3.0 (quilt) format (Closes: #573601) + * debian/patches/0001-low_speed_usb_ups.patch: Use patch system for changes + that were applied directly in the source - -- Laurent Bigonville Tue, 21 Dec 2010 14:42:34 +0100 + -- Laurent Bigonville Tue, 21 Dec 2010 14:50:09 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/patches/0001-low_speed_usb_ups.patch b/debian/patches/0001-low_speed_usb_ups.patch new file mode 100644 index 0000000..f16f5ab --- /dev/null +++ b/debian/patches/0001-low_speed_usb_ups.patch @@ -0,0 +1,22 @@ +diff --git a/drivers/libhid.c b/drivers/libhid.c +index 9387657..f2e8fbb 100644 +--- a/drivers/libhid.c ++++ b/drivers/libhid.c +@@ -141,7 +141,7 @@ static int refresh_report_buffer(reportbuf_t *rbuf, hid_dev_handle_t udev, HIDDa + { + int id = pData->ReportID; + int r; +- unsigned char buf[SMALLBUF]; ++ unsigned char buf[8]; + + if (rbuf->ts[id] + age > time(NULL)) { + /* buffered report is still good; nothing to do */ +@@ -469,7 +469,7 @@ bool_t HIDSetItemValue(hid_dev_handle_t udev, const char *hidpath, double Value, + */ + int HIDGetEvents(hid_dev_handle_t udev, HIDData_t **event, int eventsize) + { +- unsigned char buf[SMALLBUF]; ++ unsigned char buf[8]; + int itemCount = 0; + int buflen, r, i; + HIDData_t *pData; diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..167a520 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-low_speed_usb_ups.patch diff --git a/drivers/libhid.c b/drivers/libhid.c index f2e8fbb..9387657 100644 --- a/drivers/libhid.c +++ b/drivers/libhid.c @@ -141,7 +141,7 @@ static int refresh_report_buffer(reportbuf_t *rbuf, hid_dev_handle_t udev, HIDDa { int id = pData->ReportID; int r; - unsigned char buf[8]; + unsigned char buf[SMALLBUF]; if (rbuf->ts[id] + age > time(NULL)) { /* buffered report is still good; nothing to do */ @@ -469,7 +469,7 @@ bool_t HIDSetItemValue(hid_dev_handle_t udev, const char *hidpath, double Value, */ int HIDGetEvents(hid_dev_handle_t udev, HIDData_t **event, int eventsize) { - unsigned char buf[8]; + unsigned char buf[SMALLBUF]; int itemCount = 0; int buflen, r, i; HIDData_t *pData; From fbab08eae5d5e79121472c84d87ecd023c440eff Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 21 Dec 2010 15:35:43 +0100 Subject: [PATCH 007/300] Add debian/gbp.conf file --- debian/changelog | 3 ++- debian/gbp.conf | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 debian/gbp.conf diff --git a/debian/changelog b/debian/changelog index 09b8a70..7476967 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low * Switch to dpkg-source 3.0 (quilt) format (Closes: #573601) * debian/patches/0001-low_speed_usb_ups.patch: Use patch system for changes that were applied directly in the source + * Add debian/gbp.conf file - -- Laurent Bigonville Tue, 21 Dec 2010 14:50:09 +0100 + -- Laurent Bigonville Tue, 21 Dec 2010 15:35:05 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..6837223 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,8 @@ +[DEFAULT] +debian-branch = debian +upstream-branch = upstream +pristine-tar = True + +[git-buildpackage] +tarball-dir = ../tarballs/ +export-dir = ../build-area/ From 00b3b334a9b175c39876be6394940e9d844d43cf Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 21 Dec 2010 15:36:05 +0100 Subject: [PATCH 008/300] debian/watch: Bump version to 3 --- debian/changelog | 3 ++- debian/watch | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7476967..545b908 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low * debian/patches/0001-low_speed_usb_ups.patch: Use patch system for changes that were applied directly in the source * Add debian/gbp.conf file + * debian/watch: Bump version to 3 - -- Laurent Bigonville Tue, 21 Dec 2010 15:35:05 +0100 + -- Laurent Bigonville Tue, 21 Dec 2010 15:35:52 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/watch b/debian/watch index 68b0632..cfb143e 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,2 @@ -version=2 +version=3 http://www.networkupstools.org/source/2.4/nut-(.*)\.tar\.gz debian uupdate From 58a98cfddc65b35f3cea31a7532a456cf7c4e2cc Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Wed, 22 Dec 2010 18:29:42 +0100 Subject: [PATCH 009/300] Add debian/patches/0002-fix_udev_action.patch: Also set permission for "change" udev ACTION (Closes: #557178) --- debian/changelog | 4 +++- debian/patches/0002-fix_udev_action.patch | 10 ++++++++++ debian/patches/series | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0002-fix_udev_action.patch diff --git a/debian/changelog b/debian/changelog index 545b908..d95568b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,8 +8,10 @@ nut (2.4.3-2) UNRELEASED; urgency=low that were applied directly in the source * Add debian/gbp.conf file * debian/watch: Bump version to 3 + * Add debian/patches/0002-fix_udev_action.patch: Also set permission for + "change" udev ACTION (Closes: #557178) - -- Laurent Bigonville Tue, 21 Dec 2010 15:35:52 +0100 + -- Laurent Bigonville Wed, 22 Dec 2010 18:28:42 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/patches/0002-fix_udev_action.patch b/debian/patches/0002-fix_udev_action.patch new file mode 100644 index 0000000..b83a601 --- /dev/null +++ b/debian/patches/0002-fix_udev_action.patch @@ -0,0 +1,10 @@ +--- nut-2.4.3.orig/scripts/udev/nut-usbups.rules.in ++++ nut-2.4.3/scripts/udev/nut-usbups.rules.in +@@ -1,6 +1,6 @@ + # This file is generated and installed by the Network UPS Tools package. + +-ACTION!="add", GOTO="nut-usbups_rules_end" ++ACTION!="add|change", GOTO="nut-usbups_rules_end" + SUBSYSTEM=="usb_device", GOTO="nut-usbups_rules_real" + SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real" + BUS!="usb", GOTO="nut-usbups_rules_end" diff --git a/debian/patches/series b/debian/patches/series index 167a520..e0cdd37 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-low_speed_usb_ups.patch +0002-fix_udev_action.patch From 9a6e44c40be3268e54d53399312ffe797e078503 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Wed, 22 Dec 2010 18:55:46 +0100 Subject: [PATCH 010/300] debian/nut.postrm: Do not try to remove nut user is deluser is not installed anymore --- debian/changelog | 4 +++- debian/nut.postrm | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index d95568b..6afa8ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,10 @@ nut (2.4.3-2) UNRELEASED; urgency=low * debian/watch: Bump version to 3 * Add debian/patches/0002-fix_udev_action.patch: Also set permission for "change" udev ACTION (Closes: #557178) + * debian/nut.postrm: Do not try to remove nut user is deluser is not + installed anymore - -- Laurent Bigonville Wed, 22 Dec 2010 18:28:42 +0100 + -- Laurent Bigonville Wed, 22 Dec 2010 18:53:16 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/nut.postrm b/debian/nut.postrm index 385c39f..38b8d52 100644 --- a/debian/nut.postrm +++ b/debian/nut.postrm @@ -15,9 +15,11 @@ case "$1" in rm -f /etc/udev/rules.d/52_nut-usbups.rules rm -f /etc/udev/rules.d/52-nut-usbups.rules # remove the nut user - if getent passwd nut >/dev/null; then - deluser --quiet nut - fi + if [ -x "$(command -v deluser)" ]; then + deluser --quiet --system nut > /dev/null || true + else + echo >&2 "not removing nut system account because deluser command was not found" + fi # handle a dpkg bug [ -d /etc/nut ] && rmdir --ignore-fail-on-non-empty /etc/nut >/dev/null 2>&1 ;; From 582ac2bbfd56ad41e6d3d1529655733487bbdf32 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Wed, 22 Dec 2010 18:58:51 +0100 Subject: [PATCH 011/300] debian/nut.manpages: Install manpage nut.conf.5 (Closes: #528222) --- debian/changelog | 3 ++- debian/nut.manpages | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6afa8ff..cd00a1d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,8 +12,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low "change" udev ACTION (Closes: #557178) * debian/nut.postrm: Do not try to remove nut user is deluser is not installed anymore + * debian/nut.manpages: Install manpage nut.conf.5 (Closes: #528222) - -- Laurent Bigonville Wed, 22 Dec 2010 18:53:16 +0100 + -- Laurent Bigonville Wed, 22 Dec 2010 18:57:20 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/nut.manpages b/debian/nut.manpages index a377aa9..68c624a 100644 --- a/debian/nut.manpages +++ b/debian/nut.manpages @@ -1,3 +1,4 @@ +debian/tmp/usr/share/man/man5/nut.conf.5 debian/tmp/usr/share/man/man5/ups.conf.5 debian/tmp/usr/share/man/man5/upsd.conf.5 debian/tmp/usr/share/man/man5/upsd.users.5 From 9675a8feb9b3b4c6efdc256054330a9f7fc109b9 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 23 Dec 2010 22:45:05 +0100 Subject: [PATCH 012/300] Add myself as Uploaders --- debian/changelog | 3 ++- debian/control | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cd00a1d..8968a0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ nut (2.4.3-2) UNRELEASED; urgency=low * debian/control: - Bump Standards-Version to 3.9.1 - Update Vcs-* fields to new GIT repository + - Add myself as Uploaders * Switch to dpkg-source 3.0 (quilt) format (Closes: #573601) * debian/patches/0001-low_speed_usb_ups.patch: Use patch system for changes that were applied directly in the source @@ -14,7 +15,7 @@ nut (2.4.3-2) UNRELEASED; urgency=low installed anymore * debian/nut.manpages: Install manpage nut.conf.5 (Closes: #528222) - -- Laurent Bigonville Wed, 22 Dec 2010 18:57:20 +0100 + -- Laurent Bigonville Thu, 23 Dec 2010 22:43:01 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/control b/debian/control index 4ad3aba..8aea926 100644 --- a/debian/control +++ b/debian/control @@ -2,6 +2,7 @@ Source: nut Section: admin Priority: optional Maintainer: Arnaud Quette +Uploaders: Laurent Bigonville Build-Depends: debhelper (>= 7), autoconf, automake, libtool, libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libhal-dev (>= 0.5.8), hal, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, libneon27-gnutls-dev | libneon26-gnutls-dev | libneon-dev | libneon27-dev | libneon26-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6) Standards-Version: 3.9.1 Homepage: http://www.networkupstools.org From 45abd239cf1e5a5c1bd0e3bdef42d39de6417a21 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 23 Dec 2010 23:00:11 +0100 Subject: [PATCH 013/300] debian/copyright: Fix copyright-with-old-dh-make-debian-copyright --- debian/changelog | 3 ++- debian/copyright | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8968a0c..d29f846 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,8 +14,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low * debian/nut.postrm: Do not try to remove nut user is deluser is not installed anymore * debian/nut.manpages: Install manpage nut.conf.5 (Closes: #528222) + * debian/copyright: Fix copyright-with-old-dh-make-debian-copyright - -- Laurent Bigonville Thu, 23 Dec 2010 22:43:01 +0100 + -- Laurent Bigonville Thu, 23 Dec 2010 22:59:39 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/copyright b/debian/copyright index 418b4ae..01fea18 100644 --- a/debian/copyright +++ b/debian/copyright @@ -65,5 +65,5 @@ Licenses: may be found in /usr/share/common-licenses/GPL-3. -The Debian packaging is (C) 2008, Arnaud Quette and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. +The Debian packaging is Copyright (C) 2008, Arnaud Quette +and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. From 0b9baae4e9564f0e8dced693e9126c00251112ed Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 23 Dec 2010 23:03:05 +0100 Subject: [PATCH 014/300] Remove nut-snmp.lintian-overrides, not needed anymore --- debian/changelog | 3 ++- debian/nut-snmp.lintian-overrides | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 debian/nut-snmp.lintian-overrides diff --git a/debian/changelog b/debian/changelog index d29f846..a8f9ee6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,8 +15,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low installed anymore * debian/nut.manpages: Install manpage nut.conf.5 (Closes: #528222) * debian/copyright: Fix copyright-with-old-dh-make-debian-copyright + * Remove nut-snmp.lintian-overrides, not needed anymore - -- Laurent Bigonville Thu, 23 Dec 2010 22:59:39 +0100 + -- Laurent Bigonville Thu, 23 Dec 2010 23:02:40 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/nut-snmp.lintian-overrides b/debian/nut-snmp.lintian-overrides deleted file mode 100644 index 24e3f05..0000000 --- a/debian/nut-snmp.lintian-overrides +++ /dev/null @@ -1,6 +0,0 @@ -# due to libnetsnmp.la overlinking on dependency_libs -# dpkg-shlibdeps: warning: dependency on libcrypto.so.0.9.8 could be avoided if -# "debian/nut-snmp/lib/nut/snmp-ups" were not uselessly linked against it (they -# use none of its symbols).. -# This will be cleanly solved upstream... -nut-snmp: possible-gpl-code-linked-with-openssl From 44b38c4ff644578ae14f0b5a4355c27ef264c5f1 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 23 Dec 2010 23:18:44 +0100 Subject: [PATCH 015/300] debian/patches/0003-fix_spelling_and_typo.patch: Fix some spelling errors --- debian/changelog | 3 +- .../patches/0003-fix_spelling_and_typo.patch | 275 ++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 278 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0003-fix_spelling_and_typo.patch diff --git a/debian/changelog b/debian/changelog index a8f9ee6..35fc75c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low * debian/nut.manpages: Install manpage nut.conf.5 (Closes: #528222) * debian/copyright: Fix copyright-with-old-dh-make-debian-copyright * Remove nut-snmp.lintian-overrides, not needed anymore + * debian/patches/0003-fix_spelling_and_typo.patch: Fix some spelling errors - -- Laurent Bigonville Thu, 23 Dec 2010 23:02:40 +0100 + -- Laurent Bigonville Thu, 23 Dec 2010 23:18:27 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/patches/0003-fix_spelling_and_typo.patch b/debian/patches/0003-fix_spelling_and_typo.patch new file mode 100644 index 0000000..f46093b --- /dev/null +++ b/debian/patches/0003-fix_spelling_and_typo.patch @@ -0,0 +1,275 @@ +--- a/man/powercom.8 ++++ b/man/powercom.8 +@@ -46,53 +46,53 @@ + loadPercentage and validationSequence. + + .IP "numOfBytesFromUPS=\fIvalue\fR" +-The number of bytes in a UPS frame. The default is type dependant and ++The number of bytes in a UPS frame. The default is type dependent and + is given below. + + .IP "methodOfFlowControl=\fIname\fR" + The method of serial communication flow control that is engaged by the +-UPS. The default is type dependant and is given below. Acceptable names ++UPS. The default is type dependent and is given below. Acceptable names + are dtr0rts1, dtr1 or no_flow_control. + + .IP "shutdownArguments=\fI{{minutes,seconds},whether_minutes_should_be_used}\fR" + The minutes and seconds that the UPS should wait between receiving the + shutdown command and actually shutting off. The other argument should + be set to the character \fIn\fR only when the minutes value should be +-skipped and not sent to the UPS. The default is type dependant and is ++skipped and not sent to the UPS. The default is type dependent and is + given below. The braces and commas are mandatory. Note that there should + be no white space characters. + + .IP "voltage=\fI{coefficient1,coefficient2,coefficient3,coefficient4}\fR" + Only for KP625AP, Trust, Egys, BNT-other + A quad that is used convert the raw data to human readable voltage +-reading. The default is type dependant and is given below. Do note that ++reading. The default is type dependent and is given below. Do note that + the braces and commas are mandatory, as well as the lack of white space + characters. + + .IP "frequency=\fI{coefficient1,coefficient2}\fR" + Only for KP625AP, Trust, Egys + A pair to convert the raw data to human readable frequency reading. The +-default is type dependant and is given below. Do note that the braces ++default is type dependent and is given below. Do note that the braces + and commas are mandatory as well, as the lack of white space characters. + + .IP "batteryPercentage=\fI{coefficient1,coefficient2,coefficient3,coefficient4,coefficient5}\fR" + Only for KP625AP, Trust, Egys, BNT-other + A 5 tuple to convert the raw data to human readable battery percentage +-reading. The default is type dependant and is given below. Do note that ++reading. The default is type dependent and is given below. Do note that + the braces and commas are mandatory, as the lack of white space + characters. + + .IP "loadPercentage=\fI{coefficient1,coefficient2,coefficient3,coefficient4}\fR" + Only for KP625AP, Trust, Egys, BNT-other + A quad to convert the raw data to human readable load percentage +-reading. The default is type dependant and is given below. Do note that ++reading. The default is type dependent and is given below. Do note that + the braces and commas are mandatory, as the lack of white space + characters. + + .IP "validationSequence=\fI{{index1,value1},{index2,value2},{index3,value3}}\fR" + Only for KP625AP, Trust, Egys, BNT-other + 3 pairs to be used for validating the UPS by comparing bytes of the raw +-data with constant values. The default is type dependant and is given ++data with constant values. The default is type dependent and is given + below. The braces and commas are mandatory, as the lack of white space + characters. + +@@ -105,7 +105,7 @@ + + .P + The rest of the default values for the extra arguments are type +-dependant: ++dependent: + + .IP "Trust" + .RS +--- a/man/upsc.8 ++++ b/man/upsc.8 +@@ -50,7 +50,7 @@ + To list the UPSes configured on this system, along with their descriptions: + + .nf +- $ upsc -L ++ $ upsc \-L + apc: Back-UPS 500 + ppro2: Patriot Pro II + .fi +@@ -59,7 +59,7 @@ + syntax: + + .nf +- $ for UPS in `upsc -l mybox:1234`; do ++ $ for UPS in `upsc \-l mybox:1234`; do + upsc $UPS ups.status + done + .fi +--- a/drivers/dummy-ups.c ++++ b/drivers/dummy-ups.c +@@ -337,7 +337,7 @@ + /* FIXME: we need to have the full data set before + * enforcing controls! */ + +- upsdebugx(1, "Unknown data. Commiting anyway..."); ++ upsdebugx(1, "Unknown data. Committing anyway..."); + return 1; + /* return 0;*/ + } +@@ -355,7 +355,7 @@ + /* FIXME: we need to have the full data set before + * enforcing controls! */ + +- upsdebugx(1, "Unknown data. Commiting value anyway..."); ++ upsdebugx(1, "Unknown data. Committing value anyway..."); + return 1; + /* return 0;*/ + } +--- a/drivers/genericups.c ++++ b/drivers/genericups.c +@@ -142,12 +142,12 @@ + */ + if ((v = getval("OL")) != NULL) { + parse_input_signals(v, &upstab[upstype].line_ol, &upstab[upstype].val_ol); +- upsdebugx(2, "parse_input_signals: OL overriden with %s\n", v); ++ upsdebugx(2, "parse_input_signals: OL overridden with %s\n", v); + } + + if ((v = getval("LB")) != NULL) { + parse_input_signals(v, &upstab[upstype].line_bl, &upstab[upstype].val_bl); +- upsdebugx(2, "parse_input_signals: LB overriden with %s\n", v); ++ upsdebugx(2, "parse_input_signals: LB overridden with %s\n", v); + } + } + +@@ -318,12 +318,12 @@ + */ + if ((v = getval("CP")) != NULL) { + parse_output_signals(v, &upstab[upstype].line_norm); +- upsdebugx(2, "parse_output_signals: CP overriden with %s\n", v); ++ upsdebugx(2, "parse_output_signals: CP overridden with %s\n", v); + } + + if ((v = getval("SD")) != NULL) { + parse_output_signals(v, &upstab[upstype].line_sd); +- upsdebugx(2, "parse_output_signals: SD overriden with %s\n", v); ++ upsdebugx(2, "parse_output_signals: SD overridden with %s\n", v); + } + + if (ioctl(upsfd, TIOCMSET, &upstab[upstype].line_norm)) { +--- a/man/upscode2.8 ++++ b/man/upscode2.8 +@@ -49,7 +49,7 @@ + + The driver supports the following commands for those UPSen that support them. + The available commands are autodetected during initialization, +-so you should check availability with \fIupscmd -l\fR. ++so you should check availability with \fIupscmd \-l\fR. + + test.panel.start \(hy Start UPS self test + +--- a/man/usbhid-ups.8 ++++ b/man/usbhid-ups.8 +@@ -59,7 +59,7 @@ + than offdelay, but the driver will \fBnot\fR warn you upon startup if it + isn't. Some UPS'es will restart no matter what, even if the power is + (still) out at the moment this timer elapses. In that case, you could try +-if setting 'ondelay = -1' in \fBups.conf\fR helps. ++if setting 'ondelay = \-1' in \fBups.conf\fR helps. + + .IP "pollfreq=\fInum\fR" + Set polling frequency, in seconds, to reduce the USB data flow. +@@ -148,7 +148,7 @@ + .nf + usb 2-1: control timeout on ep0in + usb 2-1: usbfs: USBDEVFS_CONTROL failed cmd usbhid-ups rqt 128 rq 6 len 256 +- ret -110 ++ ret \-110 + .fi + + In this case, simply modify the general parameter "pollinterval" to a higher +@@ -170,7 +170,7 @@ + + If you rely on the UPS to shutdown your systems in case of mains failure + and to restart them when the power returns, you \fBmust\fR test this. You +-can do so by running 'upsmon -c fsd'. With the mains present, this should ++can do so by running 'upsmon \-c fsd'. With the mains present, this should + bring your systems down and then cycle the power to restart them again. + If you do the same without mains present, it should do the same, but in + this case, the outputs shall remain off until mains power is applied +--- a/drivers/metasys.c ++++ b/drivers/metasys.c +@@ -179,12 +179,12 @@ + /* Read data lenght byte */ + res = ser_get_char(upsfd, my_buf, 1, 0); + if (res < 1) { +- ser_comm_fail("Receive error (lenght): %d!!!\n", res); ++ ser_comm_fail("Receive error (length): %d!!!\n", res); + return -1; + } + packet_lenght = my_buf[0]; + if (packet_lenght < 2) { +- ser_comm_fail("Receive error (lenght): packet lenght %d!!!\n", packet_lenght); ++ ser_comm_fail("Receive error (length): packet length %d!!!\n", packet_lenght); + return -1; + } + /* Try to read all the remainig bytes (packet_lenght) */ +--- a/drivers/snmp-ups.c ++++ b/drivers/snmp-ups.c +@@ -380,7 +380,7 @@ + len = snprintf(buf, buf_len, "%ld", *pdu->variables->val.integer / 100); + break; + default: +- upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s", ++ upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s", + upsname?upsname:device_name, pdu->variables->type, OID); + return FALSE; + break; +@@ -420,7 +420,7 @@ + value = *pdu->variables->val.integer / 100; + break; + default: +- upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s", ++ upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s", + upsname?upsname:device_name, pdu->variables->type, OID); + return FALSE; + break; +@@ -1319,7 +1319,7 @@ + if (ret == FALSE) + upslogx(LOG_ERR, "su_setvar: cannot set value %s for %s", arg[4], arg[3]); + else +- upsdebugx(1, "su_setvar: sucessfully set %s to \"%s\"", arg[0], arg[4]); ++ upsdebugx(1, "su_setvar: successfully set %s to \"%s\"", arg[0], arg[4]); + + return 1; + } +--- a/man/dummy-ups.8 ++++ b/man/dummy-ups.8 +@@ -38,7 +38,7 @@ + + This file is generally named something.dev. It contains a list of all + valid data and associated values, and has the same format as an upsc +-dump (: ). So you can easilly create definition ++dump (: ). So you can easily create definition + files from an existing UPS using "upsc > file.dev". + It can also be empty, in which case only a basic set of data is available: + device.*, driver.*, ups.mfr, ups.model, ups.status +--- a/man/genericups.8 ++++ b/man/genericups.8 +@@ -235,7 +235,7 @@ + + Alternatively, you can run genericups in debug mode \(hy + +- genericups -DDDDD \-x upstype=n /dev/port ++ genericups \-DDDDD \-x upstype=n /dev/port + + In this mode it will be running in the foreground and continuously + display the line and battery status of the UPS. +--- a/man/metasys.8 ++++ b/man/metasys.8 +@@ -30,7 +30,7 @@ + .SH BUGS + This driver has been tested on Meta System HF Millennium 820 and + ally HF 1000 only. +-Any informations about the use of the driver with the other listed ++Any information about the use of the driver with the other listed + ups are really welcome. + + .SH AUTHOR +--- a/drivers/apcsmart.c ++++ b/drivers/apcsmart.c +@@ -323,7 +323,7 @@ + /* This should never happen since we only call + this if the REQ_CAPABILITIES command is supported + */ +- upslogx(LOG_ERR, "ERROR: APC cannot do capabilites but said it could!"); ++ upslogx(LOG_ERR, "ERROR: APC cannot do capabilities but said it could!"); + return; + } + diff --git a/debian/patches/series b/debian/patches/series index e0cdd37..c1939ab 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-low_speed_usb_ups.patch 0002-fix_udev_action.patch +0003-fix_spelling_and_typo.patch From 996a34e6b6fa8a9de1e3d2ac5b3151f5841a1200 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 23 Dec 2010 23:47:24 +0100 Subject: [PATCH 016/300] Add debian/libupsclient1.symbols file --- debian/changelog | 3 ++- debian/libupsclient1.symbols | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 debian/libupsclient1.symbols diff --git a/debian/changelog b/debian/changelog index 35fc75c..624ac9e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,8 +17,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low * debian/copyright: Fix copyright-with-old-dh-make-debian-copyright * Remove nut-snmp.lintian-overrides, not needed anymore * debian/patches/0003-fix_spelling_and_typo.patch: Fix some spelling errors + * Add debian/libupsclient1.symbols file - -- Laurent Bigonville Thu, 23 Dec 2010 23:18:27 +0100 + -- Laurent Bigonville Thu, 23 Dec 2010 23:47:13 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/libupsclient1.symbols b/debian/libupsclient1.symbols new file mode 100644 index 0000000..f9cd39a --- /dev/null +++ b/debian/libupsclient1.symbols @@ -0,0 +1,24 @@ +libupsclient.so.1 libupsclient1 #MINVER# + pconf_char@Base 2.4.1 + pconf_encode@Base 2.4.1 + pconf_file_begin@Base 2.4.1 + pconf_file_next@Base 2.4.1 + pconf_finish@Base 2.4.1 + pconf_init@Base 2.4.1 + pconf_line@Base 2.4.1 + pconf_parse_error@Base 2.4.1 + upscli_connect@Base 2.4.1 + upscli_disconnect@Base 2.4.1 + upscli_errlist@Base 2.4.1 + upscli_fd@Base 2.4.1 + upscli_get@Base 2.4.1 + upscli_list_next@Base 2.4.1 + upscli_list_start@Base 2.4.1 + upscli_readline@Base 2.4.1 + upscli_sendline@Base 2.4.1 + upscli_splitaddr@Base 2.4.1 + upscli_splitname@Base 2.4.1 + upscli_ssl@Base 2.4.1 + upscli_sslcert@Base 2.4.1 + upscli_strerror@Base 2.4.1 + upscli_upserror@Base 2.4.1 From 5b1840b8ff6a161884e04bd05bd9e6d61318fbff Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 23 Dec 2010 23:48:40 +0100 Subject: [PATCH 017/300] Add debian/nut.links: Re-add /etc/init.d/ups-monitor that was lost for some reasons --- debian/changelog | 4 +++- debian/nut.links | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 debian/nut.links diff --git a/debian/changelog b/debian/changelog index 624ac9e..75af2bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,8 +18,10 @@ nut (2.4.3-2) UNRELEASED; urgency=low * Remove nut-snmp.lintian-overrides, not needed anymore * debian/patches/0003-fix_spelling_and_typo.patch: Fix some spelling errors * Add debian/libupsclient1.symbols file + * Add debian/nut.links: Re-add /etc/init.d/ups-monitor that was lost for + some reasons (Closes: #592351) - -- Laurent Bigonville Thu, 23 Dec 2010 23:47:13 +0100 + -- Laurent Bigonville Thu, 23 Dec 2010 23:47:54 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/nut.links b/debian/nut.links new file mode 100644 index 0000000..a86f46f --- /dev/null +++ b/debian/nut.links @@ -0,0 +1 @@ +etc/init.d/nut etc/init.d/ups-monitor From 7320befdae8a7ec875c4f410197ba906a4c495e6 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 23 Dec 2010 23:58:54 +0100 Subject: [PATCH 018/300] debian/nut.lintian-overrides: Add override for init.d-script-does-not-provide-itself /etc/init.d/ups-monitor --- debian/changelog | 4 +++- debian/nut.lintian-overrides | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 75af2bd..349f411 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,8 +20,10 @@ nut (2.4.3-2) UNRELEASED; urgency=low * Add debian/libupsclient1.symbols file * Add debian/nut.links: Re-add /etc/init.d/ups-monitor that was lost for some reasons (Closes: #592351) + * debian/nut.lintian-overrides: Add override for + init.d-script-does-not-provide-itself /etc/init.d/ups-monitor - -- Laurent Bigonville Thu, 23 Dec 2010 23:47:54 +0100 + -- Laurent Bigonville Thu, 23 Dec 2010 23:58:11 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/nut.lintian-overrides b/debian/nut.lintian-overrides index 432491d..79b0fbd 100644 --- a/debian/nut.lintian-overrides +++ b/debian/nut.lintian-overrides @@ -1,2 +1,2 @@ nut: script-in-etc-init.d-not-registered-via-update-rc.d - +nut: init.d-script-does-not-provide-itself /etc/init.d/ups-monitor From a180d2ab554431e2fb8807600493b6dea6a97c1b Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 24 Dec 2010 00:08:32 +0100 Subject: [PATCH 019/300] Drop libupsclient1.post{inst,rm}: ldconfig call is added automatically by debhelper --- debian/changelog | 4 +++- debian/libupsclient1.postinst | 29 ------------------------- debian/libupsclient1.postrm | 41 ----------------------------------- 3 files changed, 3 insertions(+), 71 deletions(-) delete mode 100644 debian/libupsclient1.postinst delete mode 100644 debian/libupsclient1.postrm diff --git a/debian/changelog b/debian/changelog index 349f411..fb0ed4b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,8 +22,10 @@ nut (2.4.3-2) UNRELEASED; urgency=low some reasons (Closes: #592351) * debian/nut.lintian-overrides: Add override for init.d-script-does-not-provide-itself /etc/init.d/ups-monitor + * Drop libupsclient1.post{inst,rm}: ldconfig call is added automatically by + debhelper - -- Laurent Bigonville Thu, 23 Dec 2010 23:58:11 +0100 + -- Laurent Bigonville Fri, 24 Dec 2010 00:07:24 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/libupsclient1.postinst b/debian/libupsclient1.postinst deleted file mode 100644 index b86f95b..0000000 --- a/debian/libupsclient1.postinst +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -e - -case "$1" in - - configure) - ldconfig - ;; - - abort-upgrade) - # do nothing - ;; - - abort-remove) - # do nothing - ;; - - abort-deconfigure) - # do nothing - ;; - - *) - echo "$0: incorrect arguments: $*" >&2 - exit 1 - ;; - -esac - -#DEBHELPER# - diff --git a/debian/libupsclient1.postrm b/debian/libupsclient1.postrm deleted file mode 100644 index 53a6b2d..0000000 --- a/debian/libupsclient1.postrm +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -e - -case "$1" in - - remove) - ldconfig - ;; - - purge) - # do nothing - ;; - - upgrade) - # do nothing - ;; - - failed-upgrade) - # do nothing - ;; - - abort-install) - # do nothing - ;; - - abort-upgrade) - # do nothing - ;; - - disappear) - # do nothing - ;; - - *) - echo "$0: incorrect arguments: $*" >&2 - exit 1 - ;; - -esac - -#DEBHELPER# - From c38582d5c25dc8f63c579a9bd59fbc6d3d585d27 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 24 Dec 2010 00:41:38 +0100 Subject: [PATCH 020/300] debian/libupsclient1-dev.install: Do not ship /lib/libupsclient.la anymore --- debian/changelog | 3 ++- debian/libupsclient1-dev.install | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index fb0ed4b..35dbad9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,8 +24,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low init.d-script-does-not-provide-itself /etc/init.d/ups-monitor * Drop libupsclient1.post{inst,rm}: ldconfig call is added automatically by debhelper + * debian/libupsclient1-dev.install: Do not ship /lib/libupsclient.la anymore - -- Laurent Bigonville Fri, 24 Dec 2010 00:07:24 +0100 + -- Laurent Bigonville Fri, 24 Dec 2010 00:41:12 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/libupsclient1-dev.install b/debian/libupsclient1-dev.install index 2eabfc9..3d6b952 100644 --- a/debian/libupsclient1-dev.install +++ b/debian/libupsclient1-dev.install @@ -1,5 +1,4 @@ debian/tmp/lib/libupsclient.so debian/tmp/lib/libupsclient.a -debian/tmp/lib/libupsclient.la debian/tmp/usr/lib/pkgconfig/ debian/tmp/usr/include From c3894a175298691407703a91b0a99266a35876b8 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 24 Dec 2010 01:09:04 +0100 Subject: [PATCH 021/300] debian/rules: Remove dpatch logic as we are using package source version '3.0 (quilt)' --- debian/changelog | 4 +++- debian/rules | 18 +++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index 35dbad9..73f640e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,8 +25,10 @@ nut (2.4.3-2) UNRELEASED; urgency=low * Drop libupsclient1.post{inst,rm}: ldconfig call is added automatically by debhelper * debian/libupsclient1-dev.install: Do not ship /lib/libupsclient.la anymore + * debian/rules: Remove dpatch logic as we are using package source version + '3.0 (quilt)' - -- Laurent Bigonville Fri, 24 Dec 2010 00:41:12 +0100 + -- Laurent Bigonville Fri, 24 Dec 2010 01:07:36 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/rules b/debian/rules index f7373d6..cad0fad 100755 --- a/debian/rules +++ b/debian/rules @@ -14,7 +14,7 @@ ifeq (linux,$(DEB_HOST_ARCH_OS)) CONFIGUREFLAGS+=--with-udev-dir=/lib/udev endif -configure: patch configure-stamp +configure: configure-stamp configure-stamp: dh_testdir CFLAGS='$(CFLAGS)' ./configure $(CONFIGUREFLAGS) \ @@ -47,8 +47,7 @@ build-stamp: $(MAKE) touch $@ -clean: clean-patched unpatch -clean-patched: +clean: dh_testdir dh_testroot rm -f configure-stamp build-stamp install-stamp @@ -60,17 +59,6 @@ clean-patched: # -test -r /usr/share/misc/config.guess && \ # cp -f /usr/share/misc/config.guess config.guess -patch: patch-stamp -patch-stamp: -# dpatch apply-all -# touch $@ - # run autoreconf for dpatch -# autoreconf - -unpatch: -# dpatch deapply-all -# rm -rf patch-stamp debian/patched - uninstall: dh_testdir dh_testroot @@ -135,4 +123,4 @@ endif dh_builddeb binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary configure install uninstall patch unpatch +.PHONY: build clean binary-indep binary-arch binary configure install uninstall From 4670a72fca2a3048c637ff304615c7ed246a5645 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 24 Dec 2010 01:51:12 +0100 Subject: [PATCH 022/300] Remove nut.link (nut.link != nut.links) --- debian/nut.link | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 debian/nut.link diff --git a/debian/nut.link b/debian/nut.link deleted file mode 100644 index 8453f4f..0000000 --- a/debian/nut.link +++ /dev/null @@ -1,2 +0,0 @@ -etc/init.d/nut etc/init.d/ups-monitor - From 7bcbb632865b469b2b8366e0ae0520956c3c8e68 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 24 Dec 2010 01:53:35 +0100 Subject: [PATCH 023/300] debian/compat: Bump debhelper compatibility to 8 --- debian/changelog | 3 ++- debian/compat | 2 +- debian/control | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 73f640e..1e584e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,8 +27,9 @@ nut (2.4.3-2) UNRELEASED; urgency=low * debian/libupsclient1-dev.install: Do not ship /lib/libupsclient.la anymore * debian/rules: Remove dpatch logic as we are using package source version '3.0 (quilt)' + * debian/compat: Bump debhelper compatibility to 8 - -- Laurent Bigonville Fri, 24 Dec 2010 01:07:36 +0100 + -- Laurent Bigonville Fri, 24 Dec 2010 01:52:23 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/compat b/debian/compat index 1e8b314..45a4fb7 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -6 +8 diff --git a/debian/control b/debian/control index 8aea926..27cfa8b 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Arnaud Quette Uploaders: Laurent Bigonville -Build-Depends: debhelper (>= 7), autoconf, automake, libtool, libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libhal-dev (>= 0.5.8), hal, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, libneon27-gnutls-dev | libneon26-gnutls-dev | libneon-dev | libneon27-dev | libneon26-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6) +Build-Depends: debhelper (>= 8), autoconf, automake, libtool, libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libhal-dev (>= 0.5.8), hal, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, libneon27-gnutls-dev | libneon26-gnutls-dev | libneon-dev | libneon27-dev | libneon26-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6) Standards-Version: 3.9.1 Homepage: http://www.networkupstools.org Vcs-Browser: http://git.debian.org/?p=collab-maint/nut.git;a=summary From 0e20f2aa14bd3f12ec3acd5c1bde812d574a049d Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 24 Dec 2010 11:46:41 +0100 Subject: [PATCH 024/300] Release to unstable and set urgency to medium --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1e584e1..8e55e79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.4.3-2) UNRELEASED; urgency=low +nut (2.4.3-2) unstable; urgency=medium * debian/control: - Bump Standards-Version to 3.9.1 @@ -29,7 +29,7 @@ nut (2.4.3-2) UNRELEASED; urgency=low '3.0 (quilt)' * debian/compat: Bump debhelper compatibility to 8 - -- Laurent Bigonville Fri, 24 Dec 2010 01:52:23 +0100 + -- Laurent Bigonville Fri, 24 Dec 2010 11:46:22 +0100 nut (2.4.3-1.1) unstable; urgency=low From 89058c95d8163193a75391300caed012c07e3abc Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Wed, 29 Dec 2010 15:46:36 +0100 Subject: [PATCH 025/300] debian/control: Wrap build-dependencies --- debian/changelog | 7 +++++++ debian/control | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8e55e79..4c5c22d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nut (2.4.3-3) UNRELEASED; urgency=low + + * debian/control: + - Wrap build-dependencies + + -- Laurent Bigonville Wed, 29 Dec 2010 15:40:34 +0100 + nut (2.4.3-2) unstable; urgency=medium * debian/control: diff --git a/debian/control b/debian/control index 27cfa8b..9e8e0ea 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,21 @@ Section: admin Priority: optional Maintainer: Arnaud Quette Uploaders: Laurent Bigonville -Build-Depends: debhelper (>= 8), autoconf, automake, libtool, libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libhal-dev (>= 0.5.8), hal, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, libneon27-gnutls-dev | libneon26-gnutls-dev | libneon-dev | libneon27-dev | libneon26-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6) +Build-Depends: debhelper (>= 8), + autoconf, + automake, + libtool, + libgd2-xpm-dev | libgd2-noxpm-dev, + libsnmp-dev | libsnmp9-dev, + libusb-dev (>= 0.1.8), + libhal-dev (>= 0.5.8), + hal, + libdbus-1-dev, + libdbus-glib-1-dev, + libglib2.0-dev, + libneon27-gnutls-dev | libneon26-gnutls-dev | libneon-dev | libneon27-dev | libneon26-dev, + libpowerman0-dev (>= 2.3.3), + libwrap0-dev (>= 7.6) Standards-Version: 3.9.1 Homepage: http://www.networkupstools.org Vcs-Browser: http://git.debian.org/?p=collab-maint/nut.git;a=summary From eed8994e1e8d172ff055cd4ec62347cffd6b8f8f Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 11 Jan 2011 01:26:47 +0100 Subject: [PATCH 026/300] debian/nut.postinst: Only trigger USB subsystem, should Closes: #574769 --- debian/changelog | 3 ++- debian/nut.postinst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4c5c22d..0b2153a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ nut (2.4.3-3) UNRELEASED; urgency=low * debian/control: - Wrap build-dependencies + * debian/nut.postinst: Only trigger USB subsystem, should Closes: #574769 - -- Laurent Bigonville Wed, 29 Dec 2010 15:40:34 +0100 + -- Laurent Bigonville Tue, 11 Jan 2011 01:26:37 +0100 nut (2.4.3-2) unstable; urgency=medium diff --git a/debian/nut.postinst b/debian/nut.postinst index 55d88cb..a91caab 100644 --- a/debian/nut.postinst +++ b/debian/nut.postinst @@ -46,7 +46,7 @@ case "$1" in # ask udev to check for new udev rules [ -x /etc/init.d/udev ] && pidof udevd > /dev/null \ - && udevadm trigger --action=change + && udevadm trigger --subsystem-match=usb --action=change # 557178 udevadm trigger --subsystem-match=usb From 4d1040666fe37d9c40d00ef9f02f051b7cbbb0df Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 11 Jan 2011 01:32:45 +0100 Subject: [PATCH 027/300] debian/patches/0002-fix_udev_action.patch: Use SUBSYSTEM instead of BUS --- debian/changelog | 3 ++- debian/patches/0002-fix_udev_action.patch | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0b2153a..675975a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,9 @@ nut (2.4.3-3) UNRELEASED; urgency=low * debian/control: - Wrap build-dependencies * debian/nut.postinst: Only trigger USB subsystem, should Closes: #574769 + * debian/patches/0002-fix_udev_action.patch: Use SUBSYSTEM instead of BUS - -- Laurent Bigonville Tue, 11 Jan 2011 01:26:37 +0100 + -- Laurent Bigonville Tue, 11 Jan 2011 01:32:06 +0100 nut (2.4.3-2) unstable; urgency=medium diff --git a/debian/patches/0002-fix_udev_action.patch b/debian/patches/0002-fix_udev_action.patch index b83a601..9b69945 100644 --- a/debian/patches/0002-fix_udev_action.patch +++ b/debian/patches/0002-fix_udev_action.patch @@ -1,10 +1,14 @@ ---- nut-2.4.3.orig/scripts/udev/nut-usbups.rules.in -+++ nut-2.4.3/scripts/udev/nut-usbups.rules.in -@@ -1,6 +1,6 @@ +--- a/scripts/udev/nut-usbups.rules.in ++++ b/scripts/udev/nut-usbups.rules.in +@@ -1,9 +1,9 @@ # This file is generated and installed by the Network UPS Tools package. -ACTION!="add", GOTO="nut-usbups_rules_end" +ACTION!="add|change", GOTO="nut-usbups_rules_end" SUBSYSTEM=="usb_device", GOTO="nut-usbups_rules_real" SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real" - BUS!="usb", GOTO="nut-usbups_rules_end" +-BUS!="usb", GOTO="nut-usbups_rules_end" ++SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end" + + LABEL="nut-usbups_rules_real" + # Krauler UP-M500VA - blazer_usb From 6d0c7e7b3069ca83e567dbb63b7e0781040a808e Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 11 Jan 2011 22:24:32 +0100 Subject: [PATCH 028/300] Change nut-cgi Recommends to apache2 | httpd-cgi --- debian/changelog | 3 ++- debian/control | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 675975a..9e4d8b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,10 +2,11 @@ nut (2.4.3-3) UNRELEASED; urgency=low * debian/control: - Wrap build-dependencies + - Change nut-cgi Recommends to apache2 | httpd-cgi * debian/nut.postinst: Only trigger USB subsystem, should Closes: #574769 * debian/patches/0002-fix_udev_action.patch: Use SUBSYSTEM instead of BUS - -- Laurent Bigonville Tue, 11 Jan 2011 01:32:06 +0100 + -- Laurent Bigonville Tue, 11 Jan 2011 22:24:07 +0100 nut (2.4.3-2) unstable; urgency=medium diff --git a/debian/control b/debian/control index 9e8e0ea..e44d674 100644 --- a/debian/control +++ b/debian/control @@ -45,7 +45,7 @@ Description: network UPS tools - core system Package: nut-cgi Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser -Recommends: apache | httpd +Recommends: apache2 | httpd-cgi Suggests: nut Replaces: nut (<< 1.1.11) Description: network UPS tools - web interface From 459aaf9392f76bc59fe6966b20c8369c5bbc59b9 Mon Sep 17 00:00:00 2001 From: "arnaud.quette@free.fr" Date: Wed, 26 Jan 2011 10:35:08 +0100 Subject: [PATCH 029/300] Imported Upstream version 2.6.0 --- AUTHORS | 5 - ChangeLog | 2269 ++++++++------ INSTALL | 638 ++-- Makefile.am | 31 +- Makefile.in | 87 +- NEWS | 61 + README | 568 ++-- docs/ideas.txt => TODO | 63 +- UPGRADING | 557 ++-- aclocal.m4 | 14 +- clients/Makefile.am | 8 +- clients/Makefile.in | 53 +- clients/upsclient.c | 74 +- clients/upsclient.h | 7 +- clients/upscmd.c | 7 + clients/upsimage.c | 2 +- clients/upsimagearg.h | 6 +- clients/upslog.c | 24 +- clients/upslog.h | 6 +- clients/upsmon.c | 72 +- clients/upsrw.c | 255 +- clients/upssched.c | 28 +- clients/upssched.h | 6 +- common/Makefile.am | 11 +- common/Makefile.in | 106 +- common/atexit.c | 22 + common/common.c | 43 +- common/setenv.c | 26 + common/snprintf.c | 914 ++++++ common/state.c | 72 +- common/strerror.c | 503 ++++ conf/Makefile.in | 27 +- conf/ups.conf.sample | 4 +- conf/upsd.conf.sample | 18 + conf/upsd.users.sample | 8 + config.guess | 58 +- config.sub | 15 +- configure | 2609 +++++++++++------ configure.in | 687 +++-- data/Makefile.am | 7 +- data/Makefile.in | 86 +- data/driver.list | 725 ----- data/driver.list.in | 761 +++++ data/epdu-managed.dev | 70 + data/{evolution500.dev => evolution500.seq} | 7 +- data/html/Makefile.in | 27 +- docs/FAQ | 822 ------ docs/FAQ.txt | 735 +++++ docs/Makefile.am | 113 +- docs/Makefile.in | 418 ++- docs/README | 9 - docs/acknowledgements.txt | 150 + docs/acpi.txt | 32 - docs/asciidoc.conf | 55 + docs/big-servers.txt | 68 - docs/cables.txt | 120 + docs/cables/ge-imv-victron.txt | 2 +- docs/cables/sms.txt | 2 +- docs/chroot.txt | 110 - docs/commands.txt | 62 - docs/config-files.txt | 64 - docs/config-notes.txt | 798 +++++ docs/configure.txt | 462 +-- docs/contact-closure.txt | 33 +- docs/data-room.txt | 54 - docs/design.txt | 40 +- docs/developer-guide.txt | 115 + docs/developers.txt | 325 +- docs/docinfo.xml | 10 + docs/documentation.txt | 70 + docs/download.txt | 117 + docs/features.txt | 239 ++ docs/hid-subdrivers.txt | 110 +- docs/history.txt | 335 +++ docs/images/advanced.png | Bin 0 -> 32046 bytes docs/images/asciidoc.png | Bin 0 -> 1807 bytes docs/images/bigbox.png | Bin 0 -> 17562 bytes docs/images/bizarre.png | Bin 0 -> 34200 bytes docs/images/blue-arrow.png | Bin 0 -> 562 bytes docs/images/cables/73-0724.png | Bin 0 -> 1954 bytes docs/images/cables/940-0024C.jpg | Bin 0 -> 15746 bytes docs/images/cables/Lansafecable.jpg | Bin 0 -> 52714 bytes docs/images/cables/SOLA-330.png | Bin 0 -> 5489 bytes .../cables/belkin-f6cx-rkm-xu-cable.jpg | Bin 0 -> 17327 bytes docs/images/cables/mac-940-0024C.png | Bin 0 -> 12516 bytes docs/images/cables/mge-66049.png | Bin 0 -> 6739 bytes docs/images/cables/mge-db9-rj12.jpg | Bin 0 -> 21454 bytes docs/images/cables/mge-db9-rj45.jpg | Bin 0 -> 17597 bytes docs/images/eaton-logo.png | Bin 0 -> 7998 bytes docs/images/note.png | Bin 0 -> 2494 bytes docs/images/nut_layering.png | Bin 0 -> 83521 bytes docs/images/old-cgi.png | Bin 0 -> 8705 bytes docs/images/simple.png | Bin 0 -> 10145 bytes docs/images/warning.png | Bin 0 -> 3214 bytes docs/macros.txt | 114 +- docs/man/Makefile.am | 452 +++ {man => docs/man}/Makefile.in | 554 +++- docs/man/apcsmart.8 | 124 + man/apcsmart.8 => docs/man/apcsmart.txt | 88 +- docs/man/asciidoc.conf | 46 + docs/man/bcmxcp.8 | 130 + docs/man/bcmxcp.txt | 88 + docs/man/bcmxcp_usb.8 | 114 + man/bcmxcp_usb.8 => docs/man/bcmxcp_usb.txt | 87 +- docs/man/belkin.8 | 68 + man/belkin.8 => docs/man/belkin.txt | 47 +- docs/man/belkinunv.8 | 352 +++ docs/man/belkinunv.txt | 344 +++ docs/man/bestfcom.8 | 56 + man/bestfcom.8 => docs/man/bestfcom.txt | 38 +- docs/man/bestfortress.8 | 65 + docs/man/bestfortress.txt | 49 + docs/man/bestuferrups.8 | 54 + docs/man/bestuferrups.txt | 42 + docs/man/bestups.8 | 105 + man/bestups.8 => docs/man/bestups.txt | 92 +- docs/man/blazer.8 | 313 ++ man/blazer.8 => docs/man/blazer.txt | 230 +- docs/man/clone.8 | 135 + man/clone.8 => docs/man/clone.txt | 114 +- docs/man/dummy-ups.8 | 145 + man/dummy-ups.8 => docs/man/dummy-ups.txt | 130 +- docs/man/etapro.8 | 50 + docs/man/etapro.txt | 35 + docs/man/everups.8 | 53 + docs/man/everups.txt | 44 + docs/man/gamatronic.8 | 50 + man/gamatronic.8 => docs/man/gamatronic.txt | 37 +- docs/man/genericups.8 | 593 ++++ man/genericups.8 => docs/man/genericups.txt | 260 +- docs/man/hosts.conf.5 | 61 + man/hosts.conf.5 => docs/man/hosts.conf.txt | 35 +- docs/man/isbmex.8 | 50 + docs/man/isbmex.txt | 39 + docs/man/ivtscd.8 | 50 + docs/man/ivtscd.txt | 34 + docs/man/libupsclient-config.1 | 70 + docs/man/libupsclient-config.txt | 46 + docs/man/liebert-esp2.8 | 55 + docs/man/liebert-esp2.txt | 40 + docs/man/liebert.8 | 52 + docs/man/liebert.txt | 49 + docs/man/masterguard.8 | 53 + docs/man/masterguard.txt | 37 + docs/man/metasys.8 | 137 + man/metasys.8 => docs/man/metasys.txt | 59 +- docs/man/mge-shut.8 | 122 + docs/man/mge-shut.txt | 94 + docs/man/mge-utalk.8 | 120 + docs/man/mge-utalk.txt | 98 + docs/man/microdowell.8 | 50 + docs/man/microdowell.txt | 40 + docs/man/netxml-ups.8 | 159 + docs/man/netxml-ups.txt | 93 + docs/man/nut.conf.5 | 169 ++ man/nut.conf.5 => docs/man/nut.conf.txt | 88 +- docs/man/nutupsdrv.8 | 175 ++ docs/man/nutupsdrv.txt | 197 ++ docs/man/oneac.8 | 82 + man/oneac.8 => docs/man/oneac.txt | 58 +- docs/man/optiups.8 | 98 + docs/man/optiups.txt | 92 + docs/man/powercom.8 | 267 ++ docs/man/powercom.txt | 205 ++ docs/man/powerman-pdu.8 | 113 + docs/man/powerman-pdu.txt | 87 + docs/man/powerpanel.8 | 172 ++ man/powerpanel.8 => docs/man/powerpanel.txt | 152 +- docs/man/rhino.8 | 154 + docs/man/rhino.txt | 59 + docs/man/richcomm_usb.8 | 55 + docs/man/richcomm_usb.txt | 50 + docs/man/safenet.8 | 135 + docs/man/safenet.txt | 101 + docs/man/skel.txt | 111 + docs/man/snmp-ups.8 | 205 ++ docs/man/snmp-ups.txt | 167 ++ docs/man/solis.8 | 123 + docs/man/solis.txt | 57 + docs/man/tripplite.8 | 71 + man/tripplite.8 => docs/man/tripplite.txt | 63 +- docs/man/tripplite_usb.8 | 272 ++ docs/man/tripplite_usb.txt | 168 ++ docs/man/tripplitesu.8 | 59 + docs/man/tripplitesu.txt | 45 + docs/man/ups.conf.5 | 155 + docs/man/ups.conf.txt | 143 + docs/man/upsc.8 | 120 + docs/man/upsc.txt | 96 + docs/man/upscli_connect.3 | 55 + docs/man/upscli_connect.txt | 45 + docs/man/upscli_disconnect.3 | 51 + docs/man/upscli_disconnect.txt | 35 + docs/man/upscli_fd.3 | 51 + docs/man/upscli_fd.txt | 35 + docs/man/upscli_get.3 | 179 ++ docs/man/upscli_get.txt | 102 + docs/man/upscli_list_next.3 | 69 + docs/man/upscli_list_next.txt | 70 + docs/man/upscli_list_start.3 | 139 + docs/man/upscli_list_start.txt | 80 + docs/man/upscli_readline.3 | 51 + docs/man/upscli_readline.txt | 39 + docs/man/upscli_sendline.3 | 51 + docs/man/upscli_sendline.txt | 39 + docs/man/upscli_splitaddr.3 | 68 + docs/man/upscli_splitaddr.txt | 54 + docs/man/upscli_splitname.3 | 70 + docs/man/upscli_splitname.txt | 55 + docs/man/upscli_ssl.3 | 49 + docs/man/upscli_ssl.txt | 36 + docs/man/upscli_strerror.3 | 49 + docs/man/upscli_strerror.txt | 36 + docs/man/upscli_upserror.3 | 53 + docs/man/upscli_upserror.txt | 40 + docs/man/upsclient.3 | 51 + docs/man/upsclient.txt | 64 + docs/man/upscmd.8 | 94 + man/upscmd.8 => docs/man/upscmd.txt | 80 +- docs/man/upscode2.8 | 180 ++ docs/man/upscode2.txt | 99 + docs/man/upsd.8 | 140 + docs/man/upsd.conf.5 | 94 + man/upsd.conf.5 => docs/man/upsd.conf.txt | 68 +- docs/man/upsd.txt | 160 + docs/man/upsd.users.5 | 133 + man/upsd.users.5 => docs/man/upsd.users.txt | 61 +- docs/man/upsdrvctl.8 | 127 + man/upsdrvctl.8 => docs/man/upsdrvctl.txt | 87 +- docs/man/upsimage.cgi.8 | 69 + docs/man/upsimage.cgi.txt | 50 + docs/man/upslog.8 | 153 + docs/man/upslog.txt | 110 + docs/man/upsmon.8 | 426 +++ docs/man/upsmon.conf.5 | 390 +++ man/upsmon.conf.5 => docs/man/upsmon.conf.txt | 260 +- man/upsmon.8 => docs/man/upsmon.txt | 281 +- docs/man/upsrw.8 | 102 + man/upsrw.8 => docs/man/upsrw.txt | 85 +- docs/man/upssched.8 | 139 + docs/man/upssched.conf.5 | 186 ++ docs/man/upssched.conf.txt | 110 + man/upssched.8 => docs/man/upssched.txt | 86 +- docs/man/upsset.cgi.8 | 104 + man/upsset.cgi.8 => docs/man/upsset.cgi.txt | 77 +- docs/man/upsset.conf.5 | 80 + man/upsset.conf.5 => docs/man/upsset.conf.txt | 44 +- docs/man/upsstats.cgi.8 | 74 + .../man/upsstats.cgi.txt | 58 +- docs/man/upsstats.html.5 | 370 +++ docs/man/upsstats.html.txt | 235 ++ docs/man/usbhid-ups.8 | 327 +++ man/usbhid-ups.8 => docs/man/usbhid-ups.txt | 178 +- docs/man/victronups.8 | 70 + docs/man/victronups.txt | 60 + docs/megatec.txt | 69 - docs/net-protocol.txt | 600 ++++ docs/new-clients.txt | 125 + docs/new-drivers.txt | 409 +-- docs/new-names.txt | 574 ---- docs/nut-names.txt | 466 +++ docs/nut-qa.txt | 112 + docs/osd-notify.txt | 86 - docs/outlets.txt | 99 + docs/packager-guide.txt | 378 +++ docs/pager.txt | 68 - docs/powersaving.txt | 135 - docs/protocol.txt | 518 ---- docs/{upssched.txt => scheduling.txt} | 141 +- docs/security.txt | 521 ++++ docs/shutdown.txt | 230 -- docs/sock-protocol.txt | 108 +- docs/ssl.txt | 251 -- docs/stable-hcl.txt | 161 + docs/support.txt | 111 + docs/user-manual.txt | 189 ++ docs/website/Makefile.am | 126 + docs/website/Makefile.in | 538 ++++ docs/website/css/ie-overrides.css | 7 + docs/website/css/web-layout.css | 136 + docs/website/css/xhtml11-quirks.css | 41 + docs/website/css/xhtml11.css | 333 +++ docs/website/faviconut.ico | Bin 0 -> 1150 bytes docs/website/faviconut.png | Bin 0 -> 814 bytes docs/website/news.txt | 9 + docs/website/projects.txt | 187 ++ docs/website/scripts/filter_png.js | 14 + docs/website/scripts/jquery.js | 19 + docs/website/scripts/nut_jquery.js | 422 +++ docs/website/scripts/toc.js | 69 + docs/website/ups-protocols.txt | 101 + docs/website/web-layout.conf | 185 ++ docs/website/website.txt | 19 + drivers/Makefile.am | 61 +- drivers/Makefile.in | 295 +- drivers/apc-hid.c | 54 +- drivers/apcsmart.c | 30 +- drivers/apcsmart.h | 14 +- drivers/bcmxcp.c | 8 +- drivers/bcmxcp.h | 4 +- drivers/bcmxcp_usb.c | 4 +- drivers/belkin-hid.c | 30 +- drivers/belkin.c | 551 ++-- drivers/belkin.h | 17 +- drivers/bestfcom.c | 4 +- drivers/bestfortress.c | 4 +- drivers/bestpower-mib.c | 80 + drivers/bestpower-mib.h | 9 + drivers/blazer.c | 13 +- drivers/cps-hid.c | 8 +- drivers/dstate-hal.c | 4 +- drivers/dstate-hal.h | 11 +- drivers/dstate.c | 44 +- drivers/dstate.h | 15 +- drivers/dummy-ups.c | 231 +- drivers/dummy-ups.h | 9 +- drivers/explore-hid.c | 6 +- drivers/gamatronic.c | 23 +- drivers/gamatronic.h | 14 +- drivers/hidparser.h | 4 + drivers/hidtypes.h | 4 + drivers/idowell-hid.c | 169 ++ drivers/idowell-hid.h | 30 + drivers/ietf-mib.c | 422 +-- drivers/ivtscd.c | 2 +- drivers/libhid.c | 6 +- drivers/libshut.c | 2 +- drivers/libshut.h | 4 +- drivers/libusb.h | 4 +- drivers/{liebertgxt2.c => liebert-esp2.c} | 113 +- drivers/liebert-hid.c | 6 +- drivers/main-hal.c | 2 +- drivers/main-hal.h | 6 +- drivers/main.c | 6 +- drivers/main.h | 12 +- drivers/megatec.c | 1036 ------- drivers/megatec.h | 42 - drivers/megatec_usb.c | 656 ----- drivers/metasys.c | 2 +- drivers/mge-hid.c | 34 +- drivers/mge-shut.c | 10 +- drivers/mge-shut.h | 12 +- drivers/mge-utalk.c | 73 +- drivers/mge-utalk.h | 8 +- drivers/mge-xml.c | 6 +- drivers/microdowell.c | 2 +- drivers/netvision-mib.c | 13 +- drivers/netxml-ups.h | 10 +- drivers/optiups.c | 2 +- drivers/powercom-hid.c | 16 +- drivers/powercom.h | 4 +- drivers/powerman-pdu.c | 4 +- drivers/powerp-bin.c | 42 +- drivers/powerp-txt.c | 20 +- drivers/powerpanel.h | 2 +- drivers/powerware-mib.c | 2 +- drivers/rhino.c | 8 +- drivers/richcomm_usb.c | 2 +- drivers/safenet.c | 2 +- drivers/serial.c | 9 +- drivers/skel.c | 1 - drivers/snmp-ups.c | 246 +- drivers/snmp-ups.h | 40 +- drivers/solis.h | 8 +- drivers/tripplite-hid.c | 71 +- drivers/tripplite.c | 2 +- drivers/tripplite_usb.c | 10 +- drivers/upscode2.c | 90 +- drivers/upsdrvctl.c | 74 +- drivers/usb-common.c | 35 +- drivers/usbhid-ups.c | 35 +- drivers/usbhid-ups.h | 25 +- include/Makefile.in | 27 +- include/common.h | 1 + include/config.h.in | 44 +- include/extstate.h | 12 +- include/nut_version.h | 2 +- include/parseconf.h | 4 + include/state.h | 45 +- install-sh | 5 +- lib/Makefile.in | 27 +- ltmain.sh | 8 +- m4/ax_compare_version.m4 | 177 ++ m4/libtool.m4 | 13 +- m4/ltversion.m4 | 10 +- m4/nut_check_asciidoc.m4 | 40 + m4/nut_check_ipv6.m4 | 27 - m4/nut_check_libgd.m4 | 47 +- m4/nut_check_libhal.m4 | 169 +- m4/nut_check_libneon.m4 | 53 +- m4/nut_check_libnetsnmp.m4 | 51 +- m4/nut_check_libpowerman.m4 | 44 +- m4/nut_check_libssl.m4 | 58 +- m4/nut_check_libusb.m4 | 65 +- m4/nut_check_libwrap.m4 | 4 +- m4/nut_check_os.m4 | 0 m4/nut_config_libhal.m4 | 102 + m4/nut_report_feature.m4 | 2 +- man/Makefile.am | 99 - man/bcmxcp.8 | 69 - man/belkinunv.8 | 327 --- man/bestfortress.8 | 35 - man/bestuferrups.8 | 30 - man/etapro.8 | 26 - man/everups.8 | 32 - man/isbmex.8 | 26 - man/ivtscd.8 | 27 - man/libupsclient-config.1 | 35 - man/liebert.8 | 42 - man/liebertgxt2.8 | 40 - man/masterguard.8 | 26 - man/megatec.8 | 169 -- man/megatec_usb.8 | 187 -- man/mge-shut.8 | 70 - man/mge-utalk.8 | 103 - man/microdowell.8 | 26 - man/netxml-ups.8 | 81 - man/nutupsdrv.8 | 181 -- man/optiups.8 | 81 - man/powercom.8 | 191 -- man/powerman-pdu.8 | 62 - man/rhino.8 | 53 - man/richcomm_usb.8 | 35 - man/safenet.8 | 88 - man/skel.8 | 82 - man/snmp-ups.8 | 106 - man/solis.8 | 49 - man/tripplite_usb.8 | 272 -- man/tripplitesu.8 | 31 - man/ups.conf.5 | 134 - man/upsc.8 | 86 - man/upscli_connect.3 | 33 - man/upscli_disconnect.3 | 23 - man/upscli_fd.3 | 22 - man/upscli_get.3 | 91 - man/upscli_list_next.3 | 52 - man/upscli_list_start.3 | 65 - man/upscli_readline.3 | 26 - man/upscli_sendline.3 | 24 - man/upscli_splitaddr.3 | 33 - man/upscli_splitname.3 | 36 - man/upscli_ssl.3 | 23 - man/upscli_strerror.3 | 22 - man/upscli_upserror.3 | 27 - man/upsclient.3 | 53 - man/upscode2.8 | 87 - man/upsd.8 | 158 - man/upsimage.cgi.8 | 36 - man/upslog.8 | 96 - man/upssched.conf.5 | 127 - man/upsstats.html.5 | 234 -- man/victronups.8 | 47 - scripts/Makefile.am | 3 +- scripts/Makefile.in | 34 +- scripts/README | 4 +- scripts/augeas/Makefile.am | 16 + scripts/augeas/Makefile.in | 457 +++ scripts/augeas/README | 205 ++ scripts/augeas/gen-nutupsconf-aug.py | 119 + scripts/augeas/nuthostsconf.aug.in | 45 + scripts/augeas/nutnutconf.aug.in | 48 + scripts/augeas/nutupsconf.aug.in | 159 + scripts/augeas/nutupsconf.aug.tpl | 58 + scripts/augeas/nutupsdconf.aug.in | 65 + scripts/augeas/nutupsdusers.aug.in | 83 + scripts/augeas/nutupsmonconf.aug.in | 122 + scripts/augeas/nutupsschedconf.aug.in | 75 + scripts/augeas/nutupssetconf.aug.in | 46 + scripts/augeas/tests/test_nut.aug | 187 ++ scripts/hal/Makefile.in | 27 +- scripts/hal/ups-nut-device.fdi.in | 186 ++ scripts/hotplug/Makefile.in | 27 +- scripts/hotplug/libhid.usermap | 54 + scripts/python/Makefile.am | 8 +- scripts/python/Makefile.in | 35 +- scripts/python/app/NUT-Monitor | 1136 ++++--- scripts/python/app/gui-1.3.glade | 1072 +++++++ scripts/python/app/gui.glade | 658 ----- .../app/locale/fr/LC_MESSAGES/NUT-Monitor.mo | Bin 0 -> 6503 bytes scripts/python/app/pixmaps/on_battery.png | Bin 0 -> 2894 bytes scripts/python/app/pixmaps/on_line.png | Bin 0 -> 2622 bytes scripts/python/app/pixmaps/var-ro.png | Bin 0 -> 627 bytes scripts/python/app/pixmaps/var-rw.png | Bin 0 -> 780 bytes scripts/python/app/pixmaps/warning.png | Bin 0 -> 3039 bytes scripts/python/module/PyNUT.py | 31 +- scripts/python/module/test_nutclient.py | 2 +- scripts/subdriver/path-to-subdriver.sh | 6 +- scripts/udev/Makefile.in | 27 +- scripts/udev/nut-usbups.rules.in | 58 +- scripts/upower/95-upower-hid.rules | 110 + server/Makefile.am | 6 +- server/Makefile.in | 37 +- server/conf.c | 106 +- server/desc.c | 71 +- server/netcmds.h | 7 +- server/netget.c | 2 +- server/netinstcmd.c | 2 +- server/netlist.c | 8 +- server/netset.c | 2 +- server/sockdebug.c | 3 +- server/ssl.c | 40 +- server/sstate.c | 21 +- server/sstate.h | 11 +- server/upsd.c | 105 +- server/upstype.h | 4 +- tools/Makefile.am | 15 +- tools/Makefile.in | 42 +- tools/nut-hclinfo.py | 268 ++ tools/nut-usbinfo.pl | 65 +- tools/svn2cl.authors | 5 + 510 files changed, 40508 insertions(+), 18859 deletions(-) rename docs/ideas.txt => TODO (68%) create mode 100644 common/atexit.c create mode 100644 common/setenv.c create mode 100644 common/snprintf.c create mode 100644 common/strerror.c delete mode 100644 data/driver.list create mode 100644 data/driver.list.in create mode 100644 data/epdu-managed.dev rename data/{evolution500.dev => evolution500.seq} (86%) delete mode 100644 docs/FAQ create mode 100644 docs/FAQ.txt delete mode 100644 docs/README create mode 100644 docs/acknowledgements.txt delete mode 100644 docs/acpi.txt create mode 100644 docs/asciidoc.conf delete mode 100644 docs/big-servers.txt create mode 100644 docs/cables.txt delete mode 100644 docs/chroot.txt delete mode 100644 docs/commands.txt delete mode 100644 docs/config-files.txt create mode 100644 docs/config-notes.txt delete mode 100644 docs/data-room.txt create mode 100644 docs/developer-guide.txt create mode 100644 docs/docinfo.xml create mode 100644 docs/documentation.txt create mode 100644 docs/download.txt create mode 100644 docs/features.txt create mode 100644 docs/history.txt create mode 100644 docs/images/advanced.png create mode 100644 docs/images/asciidoc.png create mode 100644 docs/images/bigbox.png create mode 100644 docs/images/bizarre.png create mode 100644 docs/images/blue-arrow.png create mode 100644 docs/images/cables/73-0724.png create mode 100644 docs/images/cables/940-0024C.jpg create mode 100644 docs/images/cables/Lansafecable.jpg create mode 100644 docs/images/cables/SOLA-330.png create mode 100644 docs/images/cables/belkin-f6cx-rkm-xu-cable.jpg create mode 100644 docs/images/cables/mac-940-0024C.png create mode 100644 docs/images/cables/mge-66049.png create mode 100644 docs/images/cables/mge-db9-rj12.jpg create mode 100644 docs/images/cables/mge-db9-rj45.jpg create mode 100644 docs/images/eaton-logo.png create mode 100644 docs/images/note.png create mode 100644 docs/images/nut_layering.png create mode 100644 docs/images/old-cgi.png create mode 100644 docs/images/simple.png create mode 100644 docs/images/warning.png create mode 100644 docs/man/Makefile.am rename {man => docs/man}/Makefile.in (58%) create mode 100644 docs/man/apcsmart.8 rename man/apcsmart.8 => docs/man/apcsmart.txt (53%) create mode 100644 docs/man/asciidoc.conf create mode 100644 docs/man/bcmxcp.8 create mode 100644 docs/man/bcmxcp.txt create mode 100644 docs/man/bcmxcp_usb.8 rename man/bcmxcp_usb.8 => docs/man/bcmxcp_usb.txt (57%) create mode 100644 docs/man/belkin.8 rename man/belkin.8 => docs/man/belkin.txt (54%) create mode 100644 docs/man/belkinunv.8 create mode 100644 docs/man/belkinunv.txt create mode 100644 docs/man/bestfcom.8 rename man/bestfcom.8 => docs/man/bestfcom.txt (57%) create mode 100644 docs/man/bestfortress.8 create mode 100644 docs/man/bestfortress.txt create mode 100644 docs/man/bestuferrups.8 create mode 100644 docs/man/bestuferrups.txt create mode 100644 docs/man/bestups.8 rename man/bestups.8 => docs/man/bestups.txt (70%) create mode 100644 docs/man/blazer.8 rename man/blazer.8 => docs/man/blazer.txt (55%) create mode 100644 docs/man/clone.8 rename man/clone.8 => docs/man/clone.txt (56%) create mode 100644 docs/man/dummy-ups.8 rename man/dummy-ups.8 => docs/man/dummy-ups.txt (55%) create mode 100644 docs/man/etapro.8 create mode 100644 docs/man/etapro.txt create mode 100644 docs/man/everups.8 create mode 100644 docs/man/everups.txt create mode 100644 docs/man/gamatronic.8 rename man/gamatronic.8 => docs/man/gamatronic.txt (56%) create mode 100644 docs/man/genericups.8 rename man/genericups.8 => docs/man/genericups.txt (59%) create mode 100644 docs/man/hosts.conf.5 rename man/hosts.conf.5 => docs/man/hosts.conf.txt (50%) create mode 100644 docs/man/isbmex.8 create mode 100644 docs/man/isbmex.txt create mode 100644 docs/man/ivtscd.8 create mode 100644 docs/man/ivtscd.txt create mode 100644 docs/man/libupsclient-config.1 create mode 100644 docs/man/libupsclient-config.txt create mode 100644 docs/man/liebert-esp2.8 create mode 100644 docs/man/liebert-esp2.txt create mode 100644 docs/man/liebert.8 create mode 100644 docs/man/liebert.txt create mode 100644 docs/man/masterguard.8 create mode 100644 docs/man/masterguard.txt create mode 100644 docs/man/metasys.8 rename man/metasys.8 => docs/man/metasys.txt (61%) create mode 100644 docs/man/mge-shut.8 create mode 100644 docs/man/mge-shut.txt create mode 100644 docs/man/mge-utalk.8 create mode 100644 docs/man/mge-utalk.txt create mode 100644 docs/man/microdowell.8 create mode 100644 docs/man/microdowell.txt create mode 100644 docs/man/netxml-ups.8 create mode 100644 docs/man/netxml-ups.txt create mode 100644 docs/man/nut.conf.5 rename man/nut.conf.5 => docs/man/nut.conf.txt (56%) create mode 100644 docs/man/nutupsdrv.8 create mode 100644 docs/man/nutupsdrv.txt create mode 100644 docs/man/oneac.8 rename man/oneac.8 => docs/man/oneac.txt (55%) create mode 100644 docs/man/optiups.8 create mode 100644 docs/man/optiups.txt create mode 100644 docs/man/powercom.8 create mode 100644 docs/man/powercom.txt create mode 100644 docs/man/powerman-pdu.8 create mode 100644 docs/man/powerman-pdu.txt create mode 100644 docs/man/powerpanel.8 rename man/powerpanel.8 => docs/man/powerpanel.txt (53%) create mode 100644 docs/man/rhino.8 create mode 100644 docs/man/rhino.txt create mode 100644 docs/man/richcomm_usb.8 create mode 100644 docs/man/richcomm_usb.txt create mode 100644 docs/man/safenet.8 create mode 100644 docs/man/safenet.txt create mode 100644 docs/man/skel.txt create mode 100644 docs/man/snmp-ups.8 create mode 100644 docs/man/snmp-ups.txt create mode 100644 docs/man/solis.8 create mode 100644 docs/man/solis.txt create mode 100644 docs/man/tripplite.8 rename man/tripplite.8 => docs/man/tripplite.txt (50%) create mode 100644 docs/man/tripplite_usb.8 create mode 100644 docs/man/tripplite_usb.txt create mode 100644 docs/man/tripplitesu.8 create mode 100644 docs/man/tripplitesu.txt create mode 100644 docs/man/ups.conf.5 create mode 100644 docs/man/ups.conf.txt create mode 100644 docs/man/upsc.8 create mode 100644 docs/man/upsc.txt create mode 100644 docs/man/upscli_connect.3 create mode 100644 docs/man/upscli_connect.txt create mode 100644 docs/man/upscli_disconnect.3 create mode 100644 docs/man/upscli_disconnect.txt create mode 100644 docs/man/upscli_fd.3 create mode 100644 docs/man/upscli_fd.txt create mode 100644 docs/man/upscli_get.3 create mode 100644 docs/man/upscli_get.txt create mode 100644 docs/man/upscli_list_next.3 create mode 100644 docs/man/upscli_list_next.txt create mode 100644 docs/man/upscli_list_start.3 create mode 100644 docs/man/upscli_list_start.txt create mode 100644 docs/man/upscli_readline.3 create mode 100644 docs/man/upscli_readline.txt create mode 100644 docs/man/upscli_sendline.3 create mode 100644 docs/man/upscli_sendline.txt create mode 100644 docs/man/upscli_splitaddr.3 create mode 100644 docs/man/upscli_splitaddr.txt create mode 100644 docs/man/upscli_splitname.3 create mode 100644 docs/man/upscli_splitname.txt create mode 100644 docs/man/upscli_ssl.3 create mode 100644 docs/man/upscli_ssl.txt create mode 100644 docs/man/upscli_strerror.3 create mode 100644 docs/man/upscli_strerror.txt create mode 100644 docs/man/upscli_upserror.3 create mode 100644 docs/man/upscli_upserror.txt create mode 100644 docs/man/upsclient.3 create mode 100644 docs/man/upsclient.txt create mode 100644 docs/man/upscmd.8 rename man/upscmd.8 => docs/man/upscmd.txt (52%) create mode 100644 docs/man/upscode2.8 create mode 100644 docs/man/upscode2.txt create mode 100644 docs/man/upsd.8 create mode 100644 docs/man/upsd.conf.5 rename man/upsd.conf.5 => docs/man/upsd.conf.txt (51%) create mode 100644 docs/man/upsd.txt create mode 100644 docs/man/upsd.users.5 rename man/upsd.users.5 => docs/man/upsd.users.txt (64%) create mode 100644 docs/man/upsdrvctl.8 rename man/upsdrvctl.8 => docs/man/upsdrvctl.txt (52%) create mode 100644 docs/man/upsimage.cgi.8 create mode 100644 docs/man/upsimage.cgi.txt create mode 100644 docs/man/upslog.8 create mode 100644 docs/man/upslog.txt create mode 100644 docs/man/upsmon.8 create mode 100644 docs/man/upsmon.conf.5 rename man/upsmon.conf.5 => docs/man/upsmon.conf.txt (67%) rename man/upsmon.8 => docs/man/upsmon.txt (68%) create mode 100644 docs/man/upsrw.8 rename man/upsrw.8 => docs/man/upsrw.txt (54%) create mode 100644 docs/man/upssched.8 create mode 100644 docs/man/upssched.conf.5 create mode 100644 docs/man/upssched.conf.txt rename man/upssched.8 => docs/man/upssched.txt (68%) create mode 100644 docs/man/upsset.cgi.8 rename man/upsset.cgi.8 => docs/man/upsset.cgi.txt (60%) create mode 100644 docs/man/upsset.conf.5 rename man/upsset.conf.5 => docs/man/upsset.conf.txt (59%) create mode 100644 docs/man/upsstats.cgi.8 rename man/upsstats.cgi.8 => docs/man/upsstats.cgi.txt (53%) create mode 100644 docs/man/upsstats.html.5 create mode 100644 docs/man/upsstats.html.txt create mode 100644 docs/man/usbhid-ups.8 rename man/usbhid-ups.8 => docs/man/usbhid-ups.txt (61%) create mode 100644 docs/man/victronups.8 create mode 100644 docs/man/victronups.txt delete mode 100644 docs/megatec.txt create mode 100644 docs/net-protocol.txt create mode 100644 docs/new-clients.txt delete mode 100644 docs/new-names.txt create mode 100644 docs/nut-names.txt create mode 100644 docs/nut-qa.txt delete mode 100644 docs/osd-notify.txt create mode 100644 docs/outlets.txt create mode 100644 docs/packager-guide.txt delete mode 100644 docs/pager.txt delete mode 100644 docs/powersaving.txt delete mode 100644 docs/protocol.txt rename docs/{upssched.txt => scheduling.txt} (65%) create mode 100644 docs/security.txt delete mode 100644 docs/shutdown.txt delete mode 100644 docs/ssl.txt create mode 100644 docs/stable-hcl.txt create mode 100644 docs/support.txt create mode 100644 docs/user-manual.txt create mode 100644 docs/website/Makefile.am create mode 100644 docs/website/Makefile.in create mode 100644 docs/website/css/ie-overrides.css create mode 100644 docs/website/css/web-layout.css create mode 100644 docs/website/css/xhtml11-quirks.css create mode 100644 docs/website/css/xhtml11.css create mode 100644 docs/website/faviconut.ico create mode 100644 docs/website/faviconut.png create mode 100644 docs/website/news.txt create mode 100644 docs/website/projects.txt create mode 100644 docs/website/scripts/filter_png.js create mode 100644 docs/website/scripts/jquery.js create mode 100644 docs/website/scripts/nut_jquery.js create mode 100644 docs/website/scripts/toc.js create mode 100644 docs/website/ups-protocols.txt create mode 100644 docs/website/web-layout.conf create mode 100644 docs/website/website.txt create mode 100644 drivers/bestpower-mib.c create mode 100644 drivers/bestpower-mib.h create mode 100644 drivers/idowell-hid.c create mode 100644 drivers/idowell-hid.h rename drivers/{liebertgxt2.c => liebert-esp2.c} (73%) delete mode 100644 drivers/megatec.c delete mode 100644 drivers/megatec.h delete mode 100644 drivers/megatec_usb.c create mode 100755 m4/ax_compare_version.m4 create mode 100644 m4/nut_check_asciidoc.m4 delete mode 100644 m4/nut_check_ipv6.m4 mode change 100755 => 100644 m4/nut_check_os.m4 create mode 100644 m4/nut_config_libhal.m4 delete mode 100644 man/Makefile.am delete mode 100644 man/bcmxcp.8 delete mode 100644 man/belkinunv.8 delete mode 100644 man/bestfortress.8 delete mode 100644 man/bestuferrups.8 delete mode 100644 man/etapro.8 delete mode 100644 man/everups.8 delete mode 100644 man/isbmex.8 delete mode 100644 man/ivtscd.8 delete mode 100644 man/libupsclient-config.1 delete mode 100644 man/liebert.8 delete mode 100644 man/liebertgxt2.8 delete mode 100644 man/masterguard.8 delete mode 100644 man/megatec.8 delete mode 100644 man/megatec_usb.8 delete mode 100644 man/mge-shut.8 delete mode 100644 man/mge-utalk.8 delete mode 100644 man/microdowell.8 delete mode 100644 man/netxml-ups.8 delete mode 100644 man/nutupsdrv.8 delete mode 100644 man/optiups.8 delete mode 100644 man/powercom.8 delete mode 100644 man/powerman-pdu.8 delete mode 100644 man/rhino.8 delete mode 100644 man/richcomm_usb.8 delete mode 100644 man/safenet.8 delete mode 100644 man/skel.8 delete mode 100644 man/snmp-ups.8 delete mode 100644 man/solis.8 delete mode 100644 man/tripplite_usb.8 delete mode 100644 man/tripplitesu.8 delete mode 100644 man/ups.conf.5 delete mode 100644 man/upsc.8 delete mode 100644 man/upscli_connect.3 delete mode 100644 man/upscli_disconnect.3 delete mode 100644 man/upscli_fd.3 delete mode 100644 man/upscli_get.3 delete mode 100644 man/upscli_list_next.3 delete mode 100644 man/upscli_list_start.3 delete mode 100644 man/upscli_readline.3 delete mode 100644 man/upscli_sendline.3 delete mode 100644 man/upscli_splitaddr.3 delete mode 100644 man/upscli_splitname.3 delete mode 100644 man/upscli_ssl.3 delete mode 100644 man/upscli_strerror.3 delete mode 100644 man/upscli_upserror.3 delete mode 100644 man/upsclient.3 delete mode 100644 man/upscode2.8 delete mode 100644 man/upsd.8 delete mode 100644 man/upsimage.cgi.8 delete mode 100644 man/upslog.8 delete mode 100644 man/upssched.conf.5 delete mode 100644 man/upsstats.html.5 delete mode 100644 man/victronups.8 create mode 100644 scripts/augeas/Makefile.am create mode 100644 scripts/augeas/Makefile.in create mode 100644 scripts/augeas/README create mode 100755 scripts/augeas/gen-nutupsconf-aug.py create mode 100644 scripts/augeas/nuthostsconf.aug.in create mode 100644 scripts/augeas/nutnutconf.aug.in create mode 100644 scripts/augeas/nutupsconf.aug.in create mode 100644 scripts/augeas/nutupsconf.aug.tpl create mode 100644 scripts/augeas/nutupsdconf.aug.in create mode 100644 scripts/augeas/nutupsdusers.aug.in create mode 100644 scripts/augeas/nutupsmonconf.aug.in create mode 100644 scripts/augeas/nutupsschedconf.aug.in create mode 100644 scripts/augeas/nutupssetconf.aug.in create mode 100644 scripts/augeas/tests/test_nut.aug create mode 100644 scripts/python/app/gui-1.3.glade delete mode 100644 scripts/python/app/gui.glade create mode 100644 scripts/python/app/locale/fr/LC_MESSAGES/NUT-Monitor.mo create mode 100644 scripts/python/app/pixmaps/on_battery.png create mode 100644 scripts/python/app/pixmaps/on_line.png create mode 100644 scripts/python/app/pixmaps/var-ro.png create mode 100644 scripts/python/app/pixmaps/var-rw.png create mode 100644 scripts/python/app/pixmaps/warning.png create mode 100644 scripts/upower/95-upower-hid.rules create mode 100755 tools/nut-hclinfo.py create mode 100644 tools/svn2cl.authors diff --git a/AUTHORS b/AUTHORS index 949847d..320efbe 100644 --- a/AUTHORS +++ b/AUTHORS @@ -96,11 +96,6 @@ N: Lars Balker Rasmussen E: lbr@mjolner.dk D: Solaris and minor patches -N: Carlos Rodrigues -E: carlos.efr@mail.telepac.pt -W: http://students.fct.unl.pt/~cer09566/ -D: author of the "megatec" driver - N: David Santinoli E: david@santinoli.com W: http://www.santinoli.com diff --git a/ChangeLog b/ChangeLog index 4bd5b6f..a21849b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,23 +1,1156 @@ -2.4.3 +2011-01-14 Arnaud Quette + + * [r2832] docs/download.txt, docs/website/news.txt: Missing website + update for 2.6.0 + * [r2830] configure.in: Final update for 2.6.0 release + * [r2829] autogen.sh, docs/download.txt, nut-autoreconf: Rename the + nut-autoreconf script to autogen.sh, since it is a more standard + name + +2011-01-14 Charles Lepple + + * [r2828] docs/developer-guide.txt, docs/history.txt, + docs/user-manual.txt: Remove work-in-progress warnings. + * [r2827] docs/Makefile.am, docs/docinfo.xml: Add basic revision + information to PDF documentation. + + This should be automated later. + +2011-01-13 Arnaud Quette + + * [r2825] docs/Makefile.am, docs/configure.txt: Remove AsciiDoc + hard-coded verbose flag, which can now be enabled using + 'ASCIIDOC_VERBOSE=-v make' + +2011-01-13 Arjen de Korte + + * [r2824] clients/upsclient.c: Revert commit 2819 which seems to + break certificate validation on some systems + +2011-01-13 Arnaud Quette + + * [r2823] docs/documentation.txt: Add a NUT Korean GuideBook to the + documentation (from PointBre) + * [r2821] clients/Makefile.am, configure.in, drivers/Makefile.am, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_check_libwrap.m4, server/Makefile.am: Fix the wrong use of + *_LDFLAGS instead of *_LIBS, which break compilation on newer + toolchains like the on the upcoming Ubuntu Natty (patch from + Laurent Bigonville, from Debian) + +2011-01-11 Arjen de Korte + + * [r2819] clients/upsclient.c: Set SSL verification method in CTX, + rather than through the filedescriptor (for clarity, no + functional change) + +2011-01-11 Arnaud Quette + + * [r2816] drivers/idowell-hid.c: Remove the wrong + 'battery.capacity' data mapping + * [r2815] NEWS, data/driver.list.in: Add iDowell iBox UPS to the + list of usbhid-ups supported models, and upgrade the NEWS + * [r2814] Makefile.am: Disable distcleancheck rule, which fails due + to files generated at 'make dist' time, while waiting for a + proper solution. This will allow older Unix to enter the BuildBot + system + +2011-01-10 Arnaud Quette + + * [r2812] configure.in: Restore --with[out]-all flags that were + lost during the AsciiDoc branch merge + +2011-01-08 Arjen de Korte + + * [r2811] scripts/upower/95-upower-hid.rules: Update upower script + with iDowell driver + +2011-01-05 Arjen de Korte + + * [r2803] drivers/idowell-hid.c: Complete HID to NUT mapping + +2011-01-04 Arjen de Korte + + * [r2802] drivers/Makefile.am, drivers/idowell-hid.c, + drivers/idowell-hid.h, drivers/usbhid-ups.c: Add generated + 'iDowell' subdriver (HID to NUT mapping to be added) + * [r2801] server/desc.c: Minor cleanup (change 'struct dlist_t' to + proper 'dlist_t' and zero dynamically allocated memory before + use) + * [r2800] server/conf.c: If multiple 'driver', 'port' or 'desc' + entries were specified in 'ups.conf', the server would leak + memory on (re)loading the configuration file. Also make sure + dynamically allocated memory is zero'd before use (to prevent + accidentally free'ing uninitialized pointers). + +2011-01-04 Arnaud Quette + + * [r2799] NEWS, data/driver.list.in: Add Rocketfish RF-1000VA / + RF-1025VA to the list of usbhid-ups supported models (reported by + James "Among The Living") + +2010-12-31 Charles Lepple + + * [r2795] nut-autoreconf, scripts/augeas/Makefile.am, + scripts/augeas/gen-nutupsconf-aug.py, + scripts/python/app/NUT-Monitor, scripts/python/module/PyNUT.py, + scripts/python/module/test_nutclient.py, tools/Makefile.am, + tools/nut-hclinfo.py, tools/nut-usbinfo.pl: Do not hardcode + Python and Perl interpreter paths + + Useful for systems like FreeBSD where Python is optional, and + pulled in from + the ports tree. + + This patch uses the first interpreter seen in $PATH. A future + improvement would + be to add a configure script argument, although that might be + annoying for the + nut-autoreconf script. + +2010-12-24 Arnaud Quette + + * [r2793] docs, docs/man: Don't version generated files (no + functional change) + * [r2792] docs/Makefile.am, docs/images/old-cgi.png: Add the + missing old CGI image + * [r2791] docs/configure.txt: Add a mention that '--with-doc=auto' + will try to build only the possible documents + * [r2790] docs/download.txt, docs/website/news.txt: Website update + for 2.6.0-pre1 + * [r2789] NEWS, UPGRADING, configure.in: News, upgrading + information and configure version bump for 2.6.0(-pre1) + * [r2788] docs/Makefile.am, docs/stable-hcl.txt, + docs/user-manual.txt, docs/website/Makefile.am, + docs/website/stable-hcl.txt, tools/nut-hclinfo.py: Fist stab to + integrate hardware compatibility list to the user manual + * [r2787] docs/asciidoc.conf: Fix linkdoc AsciiDoc macro, to handle + more smartly links with no anchors + * [r2786] docs/website/website.txt: Prepare website for the switch + to production, by removing the WARNING banner on the homepage + * [r2785] scripts/augeas: Don't version generated files (no + functional change) + * [r2784] docs/Makefile.am, docs/config-notes.txt, + docs/developer-guide.txt, scripts/augeas/README: Improve Augeas + documentation, integrate it as a chapter in the developer guide, + and reference the user section in the user manual + +2010-12-23 Arnaud Quette + + * [r2783] docs/download.txt, nut-autoreconf: Create an autoreconf + wrapper script to ensure that the source tree is in a buildable + state after an initial Subversion checkout + * [r2782] INSTALL, README, docs/asciidoc.conf, + docs/config-notes.txt, docs/configure.txt, + docs/documentation.txt, docs/download.txt, docs/nut-names.txt, + docs/support.txt, docs/user-manual.txt: Create a linkdoc AsciiDoc + macro to deal with cross references between NUT documentations + and variables paths (which depend on the generated documentation + format). A remaining limitation is that anchors are only + supported for single page HTML + * [r2781] configure.in, scripts/Makefile.am, scripts/README, + scripts/augeas: Merge the Augeas branch, related to configuration + files management + +2010-12-22 Arnaud Quette + + * [r2778] data/Makefile.am, data/epdu-managed.dev, + data/evolution500.dev, data/evolution500.seq: Add more comments + to the simulation files samples, and rename the UPS one to .seq + since it includes TIMER examples + +2010-12-22 Arjen de Korte + + * [r2777] data, docs/man, drivers, scripts/hal, + scripts/hal/ups-nut-device.fdi.in, scripts/hotplug, + scripts/hotplug/libhid.usermap, scripts/udev, + scripts/udev/nut-usbups.rules.in: Don't version generated files + +2010-12-22 Arnaud Quette + + * [r2775] README, docs/Makefile.am, docs/asciidoc.conf, + docs/config-notes.txt, docs/contact-closure.txt, + docs/developer-guide.txt, docs/new-clients.txt, + docs/scheduling.txt, docs/security.txt: Create, and distribute, a + linkman AsciiDoc macro to deal with variables manual pages path + (which depend on the generated documentation format): chunked + HTML points a level up, single page HTML points to the same + directory and PDF points online versions (which will only be + active once the new website is in production!) + * [r2774] docs/man/Makefile.am: Also distribute asciidoc.conf, + since it is needed for the linkman macro + * [r2773] docs/man/upscli_connect.txt, + docs/man/upscli_disconnect.txt, docs/man/upscli_fd.txt, + docs/man/upscli_get.txt, docs/man/upscli_list_next.txt, + docs/man/upscli_list_start.txt, docs/man/upscli_readline.txt, + docs/man/upscli_sendline.txt, docs/man/upscli_ssl.txt, + docs/man/upscli_strerror.txt, docs/man/upscli_upserror.txt, + docs/man/upsclient.txt: Fix wrong references to the NUT C client + structure (UPSCONN instead of UPSCONN_t) + +2010-12-21 Arnaud Quette + + * [r2766] AUTHORS, conf/ups.conf.sample, data/driver.list.in, + docs/FAQ.txt, docs/acknowledgements.txt, docs/cables/sms.txt, + docs/config-notes.txt, docs/man/Makefile.am, docs/man/blazer.txt, + docs/man/index.txt, docs/man/megatec.txt, + docs/man/megatec_usb.txt, docs/man/nutupsdrv.txt, + docs/man/ups.conf.txt, docs/new-drivers.txt, + docs/website/scripts/nut_jquery.js, drivers/Makefile.am, + drivers/megatec.c, drivers/megatec.h, drivers/megatec_usb.c, + tools/nut-usbinfo.pl: Final removal of the megatec and + megatec_usb drivers, now replaced by blazer_ser and blazer_usb + * [r2765] drivers/dstate.c, drivers/dstate.h: Rename the second + parameter of dstate_init() from 'port' to 'devname', since the + port name has been replaced for long by the device entry name, as + specified in ups.conf + * [r2764] docs/man/Makefile.am: Fix HTML_CONF_MANS files extension, + complete the clean stage and make AsciiDoc mandatory for 'make + dist' + +2010-12-20 Arnaud Quette + + * [r2759] tools/nut-usbinfo.pl: Fix udev rules refreshing issue + (reported by Laurent Bigonville, Debian bug #557178) + +2010-12-20 Arjen de Korte + + * [r2758] drivers/ietf-mib.c: Extend the IETF MIB with some + previously unmapped variables + * [r2757] drivers/snmp-ups.c, drivers/snmp-ups.h: Add + 'input.bypass' to the list of variables for which we support + detection of single or three phase operation + +2010-12-20 Arnaud Quette + + * [r2756] conf/upsd.conf.sample, docs/man/upsd.conf.txt: Complete + missing configuration directives in upsd.conf manual page and + sample configuration file + +2010-12-20 Charles Lepple + + * [r2753] tools/svn2cl.authors: Update authors list for ChangeLog + generation + +2010-12-19 Arnaud Quette + + * [r2751] configure.in, m4/nut_report_feature.m4: Rework + configuration summary report ordering in a more comprehensive way + * [r2750] configure.in: Revert commit r2748 + +2010-12-17 Arnaud Quette + + * [r2749] drivers/mge-utalk.c: Fix initialisation sequence, improve + model detection, don't declare stale too quickly and bump driver + version to 0.92 + * [r2748] configure.in: --with-doc=auto now behave depending on + AsciiDoc presence + * [r2747] docs/man/Makefile.am: Fix manual pages distribution and + installation issue + +2010-12-16 Arnaud Quette + + * [r2742] docs/website/news.txt, docs/website/projects.txt: Update + NUT-Monitor link, and announce release 1.3 + * [r2741] configure.in: Fix minor typo, among which some broke some + syntax highlighters + +2010-12-15 Arnaud Quette + + * [r2739] Makefile.am, configure.in, docs/man/Makefile.am, + docs/man/index.txt, docs/man/ivtscd.txt, man: Switch manual pages + to AsciiDoc, thus removing the redundant toplevel man/ directory, + now replaced by docs/man/ + +2010-12-15 Arjen de Korte + + * [r2738] drivers/ietf-mib.c, drivers/powerware-mib.c: The + upsConfigLowBattTime OID is in minutes. In order to convert this + to the seconds, we need to multiply by 60. Currently, the + conversion factor is stored in the length field. So we can either + make this value ST_FLAG_RW (and not convert from minutes to + seconds) or show the correct value without being able to modify + it. + + If we set ST_FLAG_RW | ST_FLAG_STRING, the length field must show + the length of the string that needs to be passed by clients (and + this can't be done). + * [r2737] clients/upsrw.c: Cleanup of upsrw client (no functional + changes) + * [r2736] clients/upscmd.c: Return server response to user (instead + of silently failing, which confuses the heck out of people) + + [http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-December/006459.html] + +2010-12-13 Arjen de Korte + + * [r2735] drivers/belkin.c: Discard the manufacturer information + (which doesn't seem to be consistent between models) and instead + only require a valid reply format + +2010-12-12 Arjen de Korte + + * [r2734] drivers/powerp-bin.c: Reinstate support for older + CyberPower models that report the model number in a numerical + format (which was supported through the now obsolete 'cyberpower' + driver) + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-July/004866.html] + * [r2733] conf/upsd.users.sample, docs/man/upsd.users.txt: + upsd.users: Specifying multiple instcmds + Add examples for adding multiple instcmds to upsd.users + + [https://alioth.debian.org/tracker/index.php?func=detail&aid=312768&group_id=30602&atid=411544] + * [r2732] drivers/belkin.c, drivers/belkin.h: Update to fix + datastale reports and general overhaul of driver code + + [https://alioth.debian.org/tracker/index.php?func=detail&aid=312877&group_id=30602&atid=411544] + +2010-12-11 Arnaud Quette + + * [r2731] docs, docs/man, docs/website, docs/website/scripts: + Complete the list of Subversion ignored files, with AsciiDoc + generated contents (no functional changes) + +2010-12-10 Arnaud Quette + + * [r2730] docs/Makefile.am, docs/cables.txt, + docs/cables/73-0724.png, docs/cables/940-0024C.jpg, + docs/cables/Lansafecable.jpg, docs/cables/SOLA-330.png, + docs/cables/belkin-f6cx-rkm-xu-cable.jpg, + docs/cables/mac-940-0024C.png, docs/cables/mge-66049.png, + docs/cables/mge-db9-rj12.jpg, docs/cables/mge-db9-rj45.jpg, + docs/documentation.txt, docs/images/cables, + docs/images/cables/73-0724.png, docs/images/cables/940-0024C.jpg, + docs/images/cables/Lansafecable.jpg, + docs/images/cables/SOLA-330.png, + docs/images/cables/belkin-f6cx-rkm-xu-cable.jpg, + docs/images/cables/mac-940-0024C.png, + docs/images/cables/mge-66049.png, + docs/images/cables/mge-db9-rj12.jpg, + docs/images/cables/mge-db9-rj45.jpg, docs/support.txt: Fix + cabling information integration, and some remaining broken links + in the documentation and website + +2010-12-06 Arjen de Korte + + * [r2725] drivers/apc-hid.c: Add HID to NUT mappings + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-December/005105.html] + +2010-12-05 Arjen de Korte + + * [r2724] clients/upsclient.c: Rather than relying on + TLSv1_client_method() to never return a NULL pointer and/or + SSL_CTX_new() dealing with this gracefully, make this check + explicit (no functional change) + * [r2723] server/ssl.c: Fixed compilation warning (OpenSSL 1.0.0 + added the 'const' qualifier to SSL_METHOD) + +2010-12-04 Charles Lepple + + * [r2722] INSTALL, Makefile.am, README, TODO, UPGRADING, + configure.in, data/Makefile.am, data/driver.list, + data/driver.list.in, docs/FAQ, docs/FAQ.txt, docs/Makefile.am, + docs/README, docs/acknowledgements.txt, docs/acpi.txt, + docs/asciidoc.txt, docs/big-servers.txt, docs/cables.txt, + docs/cables/73-0724.png, docs/cables/940-0024C.jpg, + docs/cables/Lansafecable.jpg, docs/cables/SOLA-330.png, + docs/cables/belkin-f6cx-rkm-xu-cable.jpg, + docs/cables/mac-940-0024C.png, docs/cables/mge-66049.png, + docs/cables/mge-db9-rj12.jpg, docs/cables/mge-db9-rj45.jpg, + docs/chroot.txt, docs/commands.txt, docs/config-files.txt, + docs/config-notes.txt, docs/configure.txt, + docs/contact-closure.txt, docs/data-room.txt, docs/design.txt, + docs/developer-guide.txt, docs/developers.txt, + docs/documentation.txt, docs/download.txt, docs/features.txt, + docs/hid-subdrivers.txt, docs/history.txt, docs/ideas.txt, + docs/images, docs/images/advanced.png, docs/images/asciidoc.png, + docs/images/bigbox.png, docs/images/bizarre.png, + docs/images/blue-arrow.png, docs/images/eaton-logo.png, + docs/images/note.png, docs/images/nut-banner.png, + docs/images/nut_layering.png, docs/images/nut_layering.svg, + docs/images/simple.png, docs/images/warning.png, docs/macros.txt, + docs/man, docs/man/Makefile.am, docs/man/apcsmart.txt, + docs/man/asciidoc.conf, docs/man/bcmxcp.txt, + docs/man/bcmxcp_usb.txt, docs/man/belkin.txt, + docs/man/belkinunv.txt, docs/man/bestfcom.txt, + docs/man/bestfortress.txt, docs/man/bestuferrups.txt, + docs/man/bestups.txt, docs/man/blazer.txt, docs/man/clone.txt, + docs/man/dummy-ups.txt, docs/man/etapro.txt, + docs/man/everups.txt, docs/man/gamatronic.txt, + docs/man/genericups.txt, docs/man/hosts.conf.txt, + docs/man/index.txt, docs/man/isbmex.txt, + docs/man/libupsclient-config.txt, docs/man/liebert-esp2.txt, + docs/man/liebert.txt, docs/man/masterguard.txt, + docs/man/megatec.txt, docs/man/megatec_usb.txt, + docs/man/metasys.txt, docs/man/mge-shut.txt, + docs/man/mge-utalk.txt, docs/man/microdowell.txt, + docs/man/netxml-ups.txt, docs/man/nut.conf.txt, + docs/man/nutupsdrv.txt, docs/man/oneac.txt, docs/man/optiups.txt, + docs/man/powercom.txt, docs/man/powerman-pdu.txt, + docs/man/powerpanel.txt, docs/man/rhino.txt, + docs/man/richcomm_usb.txt, docs/man/safenet.txt, + docs/man/skel.txt, docs/man/snmp-ups.txt, docs/man/solis.txt, + docs/man/tripplite.txt, docs/man/tripplite_usb.txt, + docs/man/tripplitesu.txt, docs/man/ups.conf.txt, + docs/man/upsc.txt, docs/man/upscli_connect.txt, + docs/man/upscli_disconnect.txt, docs/man/upscli_fd.txt, + docs/man/upscli_get.txt, docs/man/upscli_list_next.txt, + docs/man/upscli_list_start.txt, docs/man/upscli_readline.txt, + docs/man/upscli_sendline.txt, docs/man/upscli_splitaddr.txt, + docs/man/upscli_splitname.txt, docs/man/upscli_ssl.txt, + docs/man/upscli_strerror.txt, docs/man/upscli_upserror.txt, + docs/man/upsclient.txt, docs/man/upscmd.txt, + docs/man/upscode2.txt, docs/man/upsd.conf.txt, docs/man/upsd.txt, + docs/man/upsd.users.txt, docs/man/upsdrvctl.txt, + docs/man/upsimage.cgi.txt, docs/man/upslog.txt, + docs/man/upsmon.conf.txt, docs/man/upsmon.txt, + docs/man/upsrw.txt, docs/man/upssched.conf.txt, + docs/man/upssched.txt, docs/man/upsset.cgi.txt, + docs/man/upsset.conf.txt, docs/man/upsstats.cgi.txt, + docs/man/upsstats.html.txt, docs/man/usbhid-ups.txt, + docs/man/victronups.txt, docs/megatec.txt, docs/net-protocol.txt, + docs/new-clients.txt, docs/new-drivers.txt, docs/new-names.txt, + docs/nut-names.txt, docs/nut-qa.txt, docs/osd-notify.txt, + docs/outlets.txt, docs/packager-guide.txt, docs/pager.txt, + docs/powersaving.txt, docs/protocol.txt, docs/scheduling.txt, + docs/security.txt, docs/shutdown.txt, docs/sock-protocol.txt, + docs/ssl.txt, docs/support.txt, docs/suspend-to-disk.txt, + docs/upssched.txt, docs/user-manual.txt, docs/website, + docs/website/Makefile.am, docs/website/css, + docs/website/css/ie-overrides.css, + docs/website/css/web-layout.css, + docs/website/css/xhtml11-quirks.css, + docs/website/css/xhtml11.css, docs/website/faviconut.ico, + docs/website/faviconut.png, docs/website/news.txt, + docs/website/projects.txt, docs/website/scripts, + docs/website/scripts/filter_png.js, + docs/website/scripts/jquery.js, + docs/website/scripts/nut_jquery.js, docs/website/scripts/toc.js, + docs/website/stable-hcl.txt, docs/website/ups-protocols.txt, + docs/website/web-layout.conf, docs/website/website.txt, + drivers/skel.c, m4/ax_compare_version.m4, + m4/nut_check_asciidoc.m4, m4/nut_check_os.m4, tools/Makefile.am, + tools/nut-hclinfo.py: Merging AsciiDoc branch into trunk + + Merged svn://svn.debian.org/nut/branches/AsciiDoc at r2701, with + the trunk + as of r2720. The AsciiDoc branch commit r2721 was cherry-picked + later. + + The AsciiDoc homepage is http://www.methods.co.nz/asciidoc/ and + the earliest + suggested version to use (in order to properly generate all + output formats) + is 8.6.3. + + The commits have been grouped into the following categories: + + == Build Machinery, File Management, Miscellaneous == + + r1874, r1880, r1894, r1895, r1896, r1897, r1898, r1908, r1909, + r1910, r1917, + r1920, r1927, r1928, r1929, r1931, r1958, r1976, r1977, r1978, + r1994, r2032, + r2125, r2126, r2130, r2155, r2160, r2246, r2470, r2473, r2474, + r2475, r2505, + r2522, r2538, ~~r2541~~, r2542, r2544, r2546, r2547, r2548, + r2549, r2552, + ~~r2553~~, r2554, r2558, r2560, ~~r2563~~, r2564, r2565, r2566, + r2606, r2607, + r2608, r2611, r2612, r2613, r2614, r2615, r2617, r2630, r2661, + r2669, r2670, + r2672, r2673, r2674, ~~r2679~~, r2683, r2684, r2685, r2686, + r2689, r2690 + + == Text File Conversion == + + r1875, r1881, r1899, r1900, r1901, r1902, r1903, r1912, r1913, + r1916, r1921, + r1922, r1923, r1924, r1925, r1926, r1997, r1998, r2003, r2030, + r2031, r2064, + r2065, r2135, r2150, r2157, r2158, r2245, r2283, r2284, r2285, + r2289, r2291, + r2292, r2328, r2409, r2463, r2465, r2481, r2482, r2497, r2498, + r2499, r2502, + r2517, r2519, r2520, r2525, r2526, r2527, r2530, r2533, r2534, + r2535, r2536, + r2537, r2556, r2561, r2562, r2649, r2701 + + == Updated Content == + + r1938, r1939, r1984, r1985, r1991, r1992, r2052, r2069, r2108, + r2124, r2131, + r2142, r2144, r2149, r2154, r2156, r2164, r2211, r2227, r2293, + r2304, r2309, + r2351, r2358, r2409, r2416, r2418, r2419, r2420, r2438, r2460, + r2461, r2462, + r2464, r2466, r2469, r2471, r2472, r2476, r2477, r2478, r2479, + r2480, r2483, + r2484, r2485, r2493, r2496, r2501, r2503, r2506, r2507, r2510, + r2512, r2518, + r2529, r2540, r2543, r2545, r2550, r2551, r2555, r2557, r2559, + r2631, r2632, + r2633, r2634, r2637, r2638, r2639, r2640, r2643, r2648, r2652, + r2653, r2655, + r2662, r2664, r2665, r2666, r2681 + + == Website == + + r1883, r1905, r1907, r1911, r1933, r1935, r1937, r1940, r1950, + r1953, r1954, + r1967, r1973, r1974, r1975, r2000, r2001, r2002, r2058, r2059, + ~~r2060~~, + r2061, r2063, r2066, r2123, r2134, r2136, r2159, r2225, r2288, + r2290, r2486, + r2487, r2494, r2495, r2500, r2504, r2515, r2521, r2523, r2539, + r2562, r2607, + r2721 + + == Manual Page Conversion == + + r1961, r1962, r1963, r1965, r1969, r1971, r1972, r1981, r1982, + r1986, r1987, + r1988, r1993, r2004, r2005, r2006, r2007, r2008, r2009, r2010, + r2011, r2012, + r2013, r2014, r2019, r2020, r2021, r2028, r2033, r2034, r2038, + r2044, r2047, + r2048, r2049, r2050, r2051, r2062, r2067, r2068, r2074, r2075, + r2107, r2109, + r2110, r2111, r2112, r2113, r2127, r2129, r2132, r2137, r2146, + r2147, r2151, + r2152, r2162, r2204, r2205, r2206, r2207, r2208, r2209, r2210, + r2211, r2226, + r2227, r2228, r2229, r2249, r2251, r2252, r2258, r2259, r2310, + r2311, r2312, + r2313, r2314, r2572, r2580 + + == Ported from trunk == + + r2039, r2043, r2049, r2076, r2110, r2120, r2209, r2210, r2249, + r2258, r2287, + r2325, r2358, r2393, r2429, r2430, r2434, r2439, r2440, r2443, + r2447, r2514, + r2532, r2567, r2657, r2694, r2696, r2700 + +2010-12-03 Arjen de Korte + + * [r2720] server/upsd.c: Allow hostnames in /etc/hosts.allow too + (not only IPv4 and/or IPv6 addresses). This is a frequent source + of confusion for people setting up libwrap access control. + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-December/005097.html] + * [r2719] drivers/libhid.c: Revert commit 2407 (which breaks + reading reports larger than 8 bytes) and make sure we only store + data that was read. + + Breaking up the buffer in chunks that the USB interface can + handle is the job of the libusb library. If this doesn't work, + it's libusb that needs fixing, not NUT. + +2010-11-30 Arjen de Korte + + * [r2713] server/ssl.c: When a CERTFILE is configured for the + server, mandate that SSL is started or else fail starting the + server (so that a configuration problem doesn't remain hidden). + + Remove redundant OpenSSL_add_ssl_algorithms() call (same as + SSL_library_init). + +2010-11-29 Arnaud Quette + + * [r2710] scripts/upower/95-upower-hid.rules, tools/nut-usbinfo.pl: + Complete the renaming from DeviceKit-power to UPower, synchronise + the rules file as per upstream changes and update the generated + content + +2010-11-23 Arnaud Quette + + * [r2699] drivers/dummy-ups.c, drivers/dummy-ups.h, + man/dummy-ups.8: dummy-ups 0.12 now allows variable removal, by + setting an empty value + +2010-11-20 Arnaud Quette + + * [r2697] data/driver.list: Also add CyberPower CP1500AVRLCD to the + list of usbhid-ups supported models (reported by Patrick + O'Malley) + * [r2695] data/driver.list: Add CyberPower CP1350AVRLCD to the list + of usbhid-ups supported models (reported by Patrick O'Malley) + +2010-11-13 Arjen de Korte + + * [r2688] Makefile.am: Create empty website target (to silence + warnings about missing target) + +2010-11-12 Arjen de Korte + + * [r2687] drivers/apc-hid.c: Add additional HID mappings for + shutting down APC SmartUPS RM series + + [http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-November/006318.html] + +2010-11-06 David Goncalves + + * [r2682] scripts/python/Makefile.am, + scripts/python/app/NUT-Monitor, scripts/python/app/gui-1.2.glade, + scripts/python/app/gui-1.3.glade, scripts/python/app/locale, + scripts/python/app/locale/fr, + scripts/python/app/locale/fr/LC_MESSAGES, + scripts/python/app/locale/fr/LC_MESSAGES/NUT-Monitor.mo: + NUT-Monitor 1.3 - Added localization support + +2010-11-05 Arjen de Korte + + * [r2680] drivers/blazer.c: Check for NULL pointer before checking + the status flags was missing + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-November/005045.html] + +2010-11-03 Arnaud Quette + + * [r2656] data/driver.list, drivers/tripplite-hid.c: Add HP T750 G2 + to the list of usbhid-ups supported models (patch from Jorge + Salamero Sanz) + +2010-11-02 Arjen de Korte + + * [r2654] configure.in, m4/nut_check_libnetsnmp.m4: Exclude -I. and + extra developer warning flags with Net-SNMP support enabled + (using them is the responsibility of the NUT developers) + +2010-10-31 Arjen de Korte + + * [r2651] configure.in, drivers/upsdrvctl.c: Fix remaining + compilation warnings by doing an explicit cast that removes the + 'const' qualification and ignoring this specific GCC warning. + Sadly the underlying functions don't support this qualifier (and + it's not trivial to work around these remaining warnings). + +2010-10-28 Arjen de Korte + + * [r2647] drivers/powerman-pdu.c: Fix compilation warnings + * [r2646] drivers/dstate-hal.c: Fix compilation warnings + * [r2645] drivers/megatec_usb.c: Fix compilation warnings + +2010-10-27 Arjen de Korte + + * [r2636] drivers/mge-utalk.c, drivers/mge-utalk.h: Fix compilation + warnings + * [r2635] drivers/mge-shut.c, drivers/mge-shut.h: Fix compilation + warnings + +2010-10-26 Arjen de Korte + + * [r2629] drivers/tripplite.c: Fix compilation warnings + * [r2628] drivers/rhino.c: Fix compilation warnings + * [r2627] drivers/powercom.h: Fix compilation warnings + * [r2626] drivers/libshut.c, drivers/libshut.h: Fix compilation + warnings + * [r2625] drivers/microdowell.c: Fix compilation warnings + * [r2624] drivers/gamatronic.c, drivers/gamatronic.h: Fix + compilation warnings + * [r2623] drivers/usb-common.c: Fix compilation warnings + * [r2622] drivers/mge-xml.c, drivers/netxml-ups.h: Fix compilation + warnings + * [r2621] drivers/bestfortress.c: Fix compilation warnings + * [r2620] drivers/dummy-ups.h: Fix compilation warnings + * [r2619] drivers/bcmxcp.c, drivers/bcmxcp.h: Fix compilation + warnings + * [r2618] drivers/powerp-txt.c, drivers/powerpanel.h: Fix + compilation warnings + +2010-10-25 Arjen de Korte + + * [r2616] drivers/mge-hid.c, drivers/powercom-hid.c, + drivers/usbhid-ups.h: Remove superfluous const declaration + (function return values can never be a lvalue) + +2010-10-20 Arjen de Korte + + * [r2604] server/upsd.c: Revert experimental stuff that + accidentally made it into commit 2600 + * [r2603] drivers/mge-hid.c: Fix wrong pointer type + * [r2602] configure.in: Remove inet_aton from AC_REPLACE_FUNCS (no + longer needed) + * [r2601] drivers/bcmxcp_usb.c, drivers/bestfcom.c, + drivers/ivtscd.c, drivers/libshut.c, drivers/metasys.c, + drivers/optiups.c, drivers/powerp-bin.c, drivers/powerp-txt.c, + drivers/rhino.c, drivers/richcomm_usb.c, drivers/safenet.c, + drivers/snmp-ups.c, drivers/solis.h: Fix bad prototypes (missing + void) + * [r2600] Makefile.am, clients/upsclient.c, clients/upsclient.h, + clients/upsmon.c, common/inet_aton.c, configure.in, + docs/configure.txt, m4/nut_check_ipv6.m4, server/upsd.c: Remove + code that used the (now obsoleted) gethostbyaddr in favor of the + (IPv6 capable) getaddrinfo function + * [r2599] drivers/libusb.h: Fix compilation warnings + * [r2598] drivers/tripplite_usb.c: Fix compilation warnings + * [r2597] drivers/serial.c: Replace explicit typecasts of void + pointers by adding an intermediate variable of the proper type + * [r2596] drivers/apcsmart.c: Fix compilation warnings (functions + returning string contants, should return (const char *), not + (char *)) + +2010-10-19 Charles Lepple + + * [r2581] scripts/python/module/PyNUT.py: Fix small typo in + comments of PyNUT class + +2010-10-16 Arjen de Korte + + * [r2573] man/upsd.conf.5: Add information on the CERTFILE keyword, + needed for SSL support in the upsd server + +2010-10-13 Arnaud Quette + + * [r2571] drivers/belkin.c, drivers/belkin.h: Add battery tests and + beeper control commands, and report the beeper and test status + (patch from John Bayly) + +2010-10-08 Arjen de Korte + + * [r2570] drivers/apc-hid.c, drivers/belkin-hid.c, + drivers/cps-hid.c, drivers/explore-hid.c, drivers/liebert-hid.c, + drivers/mge-hid.c, drivers/powercom-hid.c, + drivers/tripplite-hid.c, drivers/usbhid-ups.c, + drivers/usbhid-ups.h, scripts/subdriver/path-to-subdriver.sh: Fix + compilation warnings for the usbhid-ups driver (functions + returning string contants, should return (const char *), not + (char *)) + * [r2569] clients/upsmon.c, common/common.c: Change strange (but + valid) construction. Setting a flag should be done by either + '*val |= *flag' or '*val = (*val | flag)'. Using '*val = (*val |= + flag)' will first set the flag in *val and then assign the result + to *val (which is redundant). + * [r2568] server/upsd.c: Initialize SSL before we drop privileges + (we may not be able to read the keyfile as non-root) + +2010-09-22 Arnaud Quette + + * [r2531] drivers/snmp-ups.c, drivers/snmp-ups.h, man/snmp-ups.8: + Add SNMP v3 support, and rework SNMP initialisation + +2010-09-20 Charles Lepple + + * [r2528] drivers/libhid.c, drivers/usbhid-ups.c: Print HID values + in scientific notation. + +2010-09-15 Arnaud Quette + + * [r2524] data/driver.list, drivers/tripplite-hid.c: Add a bunch of + Tripplite USB/HID devices, reported from UPower, and HP R1500 G2 + INTL to the list of supported Tripplite HID devices + +2010-09-11 Arjen de Korte + + * [r2516] data/driver.list, drivers/tripplite-hid.c: Add + Smart1000LCD to list of supported devices + [http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-September/006188.html] + +2010-09-08 Chetan Agarwal + + * [r2513] data/driver.list: Fixed renaming of liebertgxt2 to + liebert-esp2 driver done in commit r2432 and in r2444 + +2010-09-07 Chetan Agarwal + + * [r2511] data/driver.list: Add Eaton ConnectUPS X / BD / E Slot to + compatibility list for bcmxcp and snmp-ups + +2010-09-06 Arjen de Korte + + * [r2509] data/driver.list, drivers/tripplite-hid.c: Add HP T1500 + INTL to list of supported devices + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-September/004938.html] + +2010-08-30 Arnaud Quette + + * [r2508] drivers/mge-hid.c: ups.test.result is now refreshed upon + each full polling cycle + +2010-07-25 David Goncalves + + * [r2492] scripts/python/Makefile.am, scripts/python/app/pixmaps, + scripts/python/app/pixmaps/on_battery.png, + scripts/python/app/pixmaps/on_line.png, + scripts/python/app/pixmaps/var-ro.png, + scripts/python/app/pixmaps/var-rw.png, + scripts/python/app/pixmaps/warning.png: Added missing pixmaps for + NUT-Monitor 1.2 + +2010-07-25 Arjen de Korte + + * [r2491] drivers/upsdrvctl.c: Check for NULL before xbasename() on + 'port' variable (legacy code for nut-2.0.4 drivers and older) + + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-July/004894.html] + +2010-07-24 Charles Lepple + + * [r2490] scripts/python/Makefile.am: Add new glade filename to + Makefile.am + + Should fix Buildbot failure from r2489. + +2010-07-23 David Goncalves + + * [r2489] scripts/python/app/NUT-Monitor, + scripts/python/app/gui-1.2.glade, scripts/python/app/gui.glade, + scripts/python/module/PyNUT.py: Upgrade NUT-Monitor to 1.2 + * [r2488] scripts/python/module/PyNUT.py: Upgrade PyNUT module to + 1.2 + +2010-07-11 Charles Lepple + + * [r2468] data/driver.list: driver.list: Split entries for Tripp + Lite OmniVS1000 + + http://article.gmane.org/gmane.comp.monitoring.nut.user/5591 + +2010-06-25 Arjen de Korte + + * [r2459] drivers/apc-hid.c: Add support for APC 5G models + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-June/004846.html + +2010-06-24 Arnaud Quette + + * [r2458] drivers/mge-hid.c: Do no ignore DST offset, or it will be + substracted from the actual value in the target device + +2010-06-22 Arnaud Quette + + * [r2457] drivers/dummy-ups.c: Fix status handling in simulation + (dummy) mode, conform to the coding rules, fix a memory leak and + bump the release to 0.11 + +2010-05-13 Charles Lepple + + * [r2456] tools/nut-usbinfo.pl: BUS to SUBSYSTEMS in nut-usbinfo.pl + (to match r2411) + * [r2455] data/driver.list, drivers/tripplite-hid.c: Add "Tripp + Lite SmartOnline SU1000XLA" to list of supported devices. [Ron + Peterson] + + http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-May/006055.html + +2010-05-04 Arjen de Korte + + * [r2454] configure.in, drivers/main-hal.c, m4/nut_check_libhal.m4: + Use AC_CHECK_FUNCS to see if g_timeout_add_seconds is available + (rather than checking the version of the library that is + installed) + +2010-05-04 Arnaud Quette + + * [r2453] drivers/mge-xml.c, drivers/usbhid-ups.c: Add "Test + scheduled" handling for ups.test.result on Eaton and derivative + units + +2010-05-02 Arjen de Korte + + * [r2452] m4/nut_check_libhal.m4: Additionally check for 'glib.h' + and 'dbus/glib.h' to see if the requirements for HAL are met + +2010-04-19 Arnaud Quette + + * [r2445] data/driver.list, drivers/Makefile.am, + drivers/bestpower-mib.c, drivers/bestpower-mib.h, + drivers/snmp-ups.c, drivers/snmp-ups.h: Add Eaton Best Ferrups + with older ConnectUPS card to the list of snmp-ups supported + models + +2010-04-18 Arjen de Korte + + * [r2444] drivers/Makefile.am: Renaming the liebertgxt2 to + liebert-esp2 driver in commit r2432 failed to update the + Makefile.am + * [r2442] data/driver.list: Add two models that were reported on + the mailinglists: + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004738.html + http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-April/006023.html + * [r2441] drivers/tripplite-hid.c: Allow 'productid' overrides for + Hewlett Packard UPS devices + +2010-04-15 Arjen de Korte + + * [r2437] drivers/tripplite-hid.c: Add 'HP T1000 INTL UPS' to list + of supported devices [Sturle Sunde] + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004735.html + +2010-04-14 Arjen de Korte + + * [r2436] docs/new-names.txt: Add 'output.crestfactor' and + 'outlet.n.crestfactor' to list of supported variables + +2010-04-10 Arjen de Korte + + * [r2435] drivers/liebert-esp2.c: Allow spaces in model name and + add 'battery.temperature' variable (Spiros Ioannou) + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004719.html + +2010-04-10 Charles Lepple + + * [r2433] drivers: Add 'liebert-esp2' driver to svn:ignore list. + +2010-04-10 Arjen de Korte + + * [r2432] drivers/Makefile.am, drivers/liebert-esp2.c, + drivers/liebertgxt2.c, man/Makefile.am, man/liebert-esp2.8, + man/liebertgxt2.8: Rename 'liebertgxt2' driver to 'liebert-esp2' + (GXT2 is a model name, ESP-II the serial protocol being used by + other models as well) + +2010-04-09 Arjen de Korte + + * [r2431] drivers/liebertgxt2.c, man/liebertgxt2.8: Allow to + override default baudrate to user specified value (needed on some + models) + +2010-04-09 Arnaud Quette + + * [r2428] data/driver.list: Add Eaton 9395 with serial interface to + the list of bcmxcp supported models + +2010-04-07 Arjen de Korte + + * [r2426] drivers/liebertgxt2.c: Add CHRG and DISCHRG status flags + (based on the reported battery.current) + * [r2425] drivers/liebertgxt2.c: Fix previous commit + * [r2424] drivers/liebertgxt2.c: Add 'battery.current' value + [Spiros Ioannou] removing the CHRG flag at the same time (which + doesn't seem to be usable) + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004700.html + * [r2423] drivers/liebertgxt2.c: Fix ups.firmware [Robert Jobbagy] + and only require ups.model for successful detection + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004701.html + +2010-04-07 Arnaud Quette + + * [r2422] scripts/Makefile.am, scripts/README, scripts/dkp, + scripts/upower, scripts/upower/95-devkit-power-hid.rules, + scripts/upower/95-upower-hid.rules: Update DeviceKit-power + resource to the new UPower name + +2010-04-06 Arjen de Korte + + * [r2421] drivers/liebertgxt2.c: More byte swapping issues fixed + [Richard Gregory] + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004698.html + +2010-04-02 Arjen de Korte + + * [r2415] drivers/liebertgxt2.c: Swap bytes in calculations for + reported values by the UPS [Robert Jobbagy] + http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-April/004695.html] + +2010-03-29 Charles Lepple + + * [r2414] ., ChangeLog, Makefile.am, tools/Makefile.am, + tools/svn2cl.authors: Generate the ChangeLog file with 'make + dist' from SVN history + + ` svn merge -r2401:r2413 + svn+ssh://svn.debian.org/svn/nut/branches/svn-auto-changelog ` + + Includes the following: + - r2402 removes the static ChangeLog and adds a rule and the + authors file. + - r2403 shows how little I remember about automake + - r2404 and r2413 cancel each other out + - r2405 fixes the SVN starting revision syntax. + +2010-03-27 Arnaud Quette + + * [r2411] scripts/udev/nut-usbups.rules.in: Change BUS to + SUBSYSTEMS, since the former is deprecated (patch from Michal + Hlavinka, Red Hat) + +2010-03-26 Arjen de Korte + + * [r2410] drivers/powercom-hid.c, man/usbhid-ups.8: Reject devices + that are known not to be supported by the powercom-hid subdriver + +2010-03-23 Arnaud Quette + + * [r2408] clients/Makefile.am, common/Makefile.am, + drivers/Makefile.am, server/Makefile.am: Fix the distribution and + compilation of local implementation of missing systems functions. + This resulted in compilation failure on HP-UX, and possibly other + older Unix systems, like Aix. Refer to configure.in -> + AC_REPLACE_FUNCS for more information. + +2010-03-22 Arjen de Korte + + * [r2407] drivers/libhid.c: Reduce size of buffer to maximum size + supported by low-speed USB devices. + +2010-03-22 Arnaud Quette + + * [r2406] drivers/Makefile.am: Add the missing link to the math + library for bcmxcp driver + +2010-03-12 Arjen de Korte + + * [r2400] README: Remove monitor-only option that never existed. + Whether or not a system will shutdown is determined by the + combined powervalue of all devices it monitors (this has nothing + to do with the master or slave setting). + +2010-03-08 Arjen de Korte + + * [r2399] clients/upsclient.h, drivers/hidparser.h, + drivers/hidtypes.h, include/parseconf.h: Add control comments for + 'ident' to switch off formatting in some places + * [r2398] clients/upsimage.c, clients/upsimagearg.h, + clients/upslog.c, clients/upslog.h, clients/upssched.c, + clients/upssched.h, drivers/apcsmart.c, drivers/apcsmart.h, + drivers/dstate-hal.h, drivers/gamatronic.h, drivers/main-hal.h, + drivers/main.h, drivers/netxml-ups.h, drivers/usbhid-ups.h, + server/netcmds.h: Finalize cleanup of type definitions for + structures where needed and/or useful (and replace a couple of + void pointers by the proper structures) + +2010-03-07 Arjen de Korte + + * [r2397] common/state.c, drivers/dstate-hal.h, drivers/dstate.c, + drivers/dstate.h, include/extstate.h, include/state.h, + server/netget.c, server/netinstcmd.c, server/netlist.c, + server/netset.c, server/sstate.c, server/sstate.h, + server/upstype.h: Create types for structures that already + suggested that they were types, but were not (cmdlist_t, conn_t, + enum_t and st_tree_t) and use these instead + * [r2396] drivers/blazer.c: Fix loss of precision in dividing + integers + +2010-03-07 Charles Lepple + + * [r2395] docs/cables/ge-imv-victron.txt: Remove escape sequence + from cable diagram. + + Pointed out on Feb 25 2010 by Yury V. Zaytsev on nut-upsuser. + +2010-03-04 Arjen de Korte + + * [r2392] data/driver.list: Add PowerWare 5119 RM support through + upscode2 driver + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-March/004608.html] + * [r2391] drivers/upscode2.c: Use "shutdown.reboot" (which was used + before r2389 was committed) instead of "shutdown.return" in the + shutdown function + +2010-03-03 Arjen de Korte + + * [r2390] drivers/upscode2.c: Update based on information provided + by Steve Golson + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-March/004608.html] + * [r2389] drivers/upscode2.c: Update based on information provided + by Steve Golson + [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-March/004608.html] + +2010-03-01 Arjen de Korte + + * [r2387] configure.in: No longer require autoconf version 2.60 or + better and work around broken quadrigraphs before autoconf + version 2.62 + * [r2385] drivers/mge-hid.c: Add missing Kelvin to Celcius + conversion + [http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-March/005944.html] + * [r2384] configure.in: Attempt to fix problem with two consecutive + '@:>@' quadrigraphs (also reports m4 version used) + +2010-02-28 Arjen de Korte + + * [r2383] configure.in, m4/nut_check_libgd.m4, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_config_libhal.m4: Restore @<:@ and @:>@ quadrigraphs + * [r2382] configure.in: Revert commit 2380 which fails on Debian + * [r2381] m4/nut_check_libgd.m4, m4/nut_check_libhal.m4, + m4/nut_check_libneon.m4, m4/nut_check_libnetsnmp.m4, + m4/nut_check_libpowerman.m4, m4/nut_check_libssl.m4, + m4/nut_check_libusb.m4, m4/nut_config_libhal.m4: Revert commit + 2380 which fails on Debian + * [r2380] configure.in, m4/nut_check_libgd.m4, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_config_libhal.m4: Change escaped characters (no functional + changes) + * [r2379] configure.in, m4/nut_check_libgd.m4, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_config_libhal.m4: Clean up output of 'configure --help' + (indentation, optional parameters) and don't allow options which + need a parameter + * [r2378] m4/nut_check_libgd.m4, m4/nut_check_libhal.m4, + m4/nut_check_libneon.m4, m4/nut_check_libnetsnmp.m4, + m4/nut_check_libpowerman.m4, m4/nut_check_libssl.m4, + m4/nut_check_libusb.m4, m4/nut_config_libhal.m4, + scripts/hal/ups-nut-device.fdi.in, + scripts/udev/nut-usbups.rules.in: When setting variables from + pkg-config, rather than checking for the return value, check for + a (non-)zero length. It will happily return zero for unknown + variables in otherwise supported packages (and this is usually + not what we want). + Also direct stderr to /dev/null for systems that don't use + pkg-config. + * [r2377] m4/nut_config_libhal.m4: Fix type (leftover from + debugging) + * [r2376] configure.in, m4/nut_check_libhal.m4, + m4/nut_config_libhal.m4: Keep compile and linker options separate + from runtime configuration parameters (and skip the latter if the + first are not usable) + +2010-02-27 Arjen de Korte + + * [r2375] m4/nut_check_libhal.m4: Test for empty variable, rather + than the return value of pkg-config + * [r2374] docs/configure.txt, m4/nut_check_libhal.m4: Allow + overrides in ./configure for all variables needed for HAL support + +2010-02-26 Arjen de Korte + + * [r2372] common/common.c, configure.in, drivers/main.c, + include/common.h, man/nutupsdrv.8, man/upsd.8, server/upsd.c: Due + to popular demand, add a possibility to reduce the verbosity of + messages written to the syslog (by adding one or more -q flags in + a similar fashion as the -D debug flag) + * [r2371] m4/nut_check_libgd.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4: Check if + overrides are specified, but the mandatory argument is missing + (and refer to 'docs/configure.txt') + +2010-02-25 Arjen de Korte + + * [r2370] clients/upslog.c, clients/upsmon.c, clients/upsrw.c, + clients/upssched.c, server/sockdebug.c, server/upsd.c: Use + open_syslog wrapper function instead of openlog directly and grab + program name from argv[0] + +2010-02-23 Arjen de Korte + + * [r2367] drivers/netvision-mib.c: Fixes Alioth bug #312364 2010-02-23 Arnaud Quette - * [r2366] ChangeLog, configure.in, NEWS, UPGRADING: Final update for - 2.4.3 release + * [r2366] ChangeLog, NEWS, UPGRADING, configure.in: Final update + for 2.4.3 release 2010-02-20 Arjen de Korte * [r2365] m4/nut_check_ipv6.m4: Fix broken logic to enable IPv6 support -2.4.2 - 2010-02-19 Arnaud Quette * [r2363] ChangeLog, configure.in: Final update for 2.4.2 release - -2010-02-19 Arnaud Quette - * [r2362] NEWS, data/driver.list: Add HP R1500 G2 to compatibility list for bcmxcp (reported by Stephan Schupfer) @@ -97,7 +1230,7 @@ the mailinglist [http://lists.alioth.debian.org/pipermail/nut-upsuser/2005-August/000118.html] -2010-02-11 Charles Lepple +2010-02-11 Charles Lepple * [r2338] ChangeLog: Generate ChangeLog entries from r2337 through r2331. @@ -108,7 +1241,158 @@ 2010-02-11 Arjen de Korte - * [r2336] (numerous files) No functional changes (properties only) + * [r2336] COPYING, ChangeLog, INSTALL, LICENSE-GPL2, LICENSE-GPL3, + MAINTAINERS, Makefile.am, NEWS, UPGRADING, clients/cgilib.c, + clients/cgilib.h, clients/status.h, clients/upsc.c, + clients/upsclient.c, clients/upsclient.h, clients/upscmd.c, + clients/upsimage.c, clients/upsimagearg.h, clients/upslog.c, + clients/upslog.h, clients/upsmon.c, clients/upsmon.h, + clients/upsrw.c, clients/upssched-cmd, clients/upssched.c, + clients/upssched.h, clients/upsset.c, clients/upsstats.c, + clients/upsstats.h, common/Makefile.am, common/atexit.c, + common/common.c, common/inet_aton.c, common/parseconf.c, + common/setenv.c, common/snprintf.c, common/state.c, + common/strerror.c, common/upsconf.c, compile, conf/Makefile.am, + conf/hosts.conf.sample, conf/nut.conf.sample, + conf/ups.conf.sample, conf/upsd.conf.sample, + conf/upsd.users.sample, conf/upsmon.conf.sample, + conf/upssched.conf.sample.in, conf/upsset.conf.sample, + conf/upsstats-single.html.sample, conf/upsstats.html.sample, + configure.in, data/Makefile.am, data/cmdvartab, data/driver.list, + data/epdu-managed.dev, data/evolution500.dev, + data/html/Makefile.am, data/html/README, data/html/bottom.html, + data/html/header.html.in, data/html/index.html, + data/html/nut-banner.png, docs/FAQ, docs/Makefile.am, + docs/README, docs/acpi.txt, docs/big-servers.txt, + docs/cables/apc-rs500-serial.txt, docs/cables/apc.txt, + docs/cables/ge-imv-victron.txt, docs/cables/imv.txt, + docs/cables/mgeups.txt, docs/cables/powerware.txt, + docs/cables/repotec.txt, docs/cables/sms.txt, docs/chroot.txt, + docs/commands.txt, docs/config-files.txt, docs/configure.txt, + docs/contact-closure.txt, docs/data-room.txt, docs/design.txt, + docs/developers.txt, docs/hid-subdrivers.txt, docs/ideas.txt, + docs/macros.txt, docs/megatec.txt, docs/new-drivers.txt, + docs/new-names.txt, docs/nut-hal.txt, docs/osd-notify.txt, + docs/pager.txt, docs/powersaving.txt, docs/protocol.txt, + docs/shutdown.txt, docs/snmp.txt, docs/sock-protocol.txt, + docs/ssl.txt, docs/suspend-to-disk.txt, docs/upssched.txt, + drivers/Makefile.am, drivers/apc-hid.c, drivers/apc-hid.h, + drivers/apc-mib.c, drivers/apc-mib.h, drivers/apcsmart.c, + drivers/apcsmart.h, drivers/baytech-mib.c, drivers/baytech-mib.h, + drivers/bcmxcp.c, drivers/bcmxcp.h, drivers/bcmxcp_io.h, + drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c, drivers/belkin-hid.c, + drivers/belkin-hid.h, drivers/belkin.c, drivers/belkin.h, + drivers/belkinunv.c, drivers/bestfcom.c, drivers/bestfortress.c, + drivers/bestuferrups.c, drivers/bestups.c, drivers/blazer.c, + drivers/blazer.h, drivers/blazer_ser.c, drivers/blazer_usb.c, + drivers/clone-outlet.c, drivers/clone.c, drivers/compaq-mib.c, + drivers/compaq-mib.h, drivers/cps-hid.c, drivers/cps-hid.h, + drivers/dstate-hal.c, drivers/dstate-hal.h, drivers/dstate.c, + drivers/dstate.h, drivers/dummy-ups.c, drivers/dummy-ups.h, + drivers/eaton-mib.h, drivers/etapro.c, drivers/everups.c, + drivers/explore-hid.c, drivers/explore-hid.h, + drivers/gamatronic.c, drivers/gamatronic.h, drivers/genericups.c, + drivers/genericups.h, drivers/hidparser.c, drivers/hidparser.h, + drivers/hidtypes.h, drivers/ietf-mib.c, drivers/ietf-mib.h, + drivers/isbmex.c, drivers/ivtscd.c, drivers/libhid.c, + drivers/libhid.h, drivers/libshut.c, drivers/libshut.h, + drivers/libusb.c, drivers/libusb.h, drivers/liebert-hid.c, + drivers/liebert-hid.h, drivers/liebert.c, drivers/liebertgxt2.c, + drivers/main-hal.c, drivers/main-hal.h, drivers/main.c, + drivers/main.h, drivers/masterguard.c, drivers/megatec.c, + drivers/megatec.h, drivers/megatec_usb.c, drivers/metasys.c, + drivers/mge-hid.c, drivers/mge-hid.h, drivers/mge-mib.c, + drivers/mge-mib.h, drivers/mge-shut.c, drivers/mge-shut.h, + drivers/mge-utalk.c, drivers/mge-utalk.h, drivers/mge-xml.c, + drivers/mge-xml.h, drivers/microdowell.c, drivers/microdowell.h, + drivers/netvision-mib.c, drivers/netvision-mib.h, + drivers/netxml-ups.c, drivers/netxml-ups.h, drivers/optiups.c, + drivers/powercom-hid.c, drivers/powercom-hid.h, + drivers/powercom.c, drivers/powercom.h, drivers/powerman-pdu.c, + drivers/powerp-bin.c, drivers/powerp-bin.h, drivers/powerp-txt.c, + drivers/powerp-txt.h, drivers/powerpanel.c, drivers/powerpanel.h, + drivers/powerware-mib.c, drivers/powerware-mib.h, + drivers/raritan-pdu-mib.h, drivers/rhino.c, + drivers/richcomm_usb.c, drivers/safenet.c, drivers/safenet.h, + drivers/serial.c, drivers/serial.h, drivers/skel.c, + drivers/snmp-ups.c, drivers/snmp-ups.h, drivers/solis.c, + drivers/solis.h, drivers/tripplite-hid.c, + drivers/tripplite-hid.h, drivers/tripplite.c, + drivers/tripplite.h, drivers/tripplite_usb.c, + drivers/tripplitesu.c, drivers/upscode2.c, drivers/upsdrvctl.c, + drivers/upshandler.h, drivers/usb-common.c, drivers/usb-common.h, + drivers/usbhid-ups.c, drivers/usbhid-ups.h, drivers/victronups.c, + include/Makefile.am, include/attribute.h, include/common.h, + include/extstate.h, include/parseconf.h, include/proto.h, + include/state.h, include/timehead.h, include/upsconf.h, + lib/Makefile.am, lib/README, lib/libupsclient-config.in, + lib/libupsclient.pc.in, m4/ax_create_stdint_h.m4, + m4/nut_arg_with.m4, m4/nut_check_ipv6.m4, m4/nut_check_libgd.m4, + m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, + m4/nut_check_libnetsnmp.m4, m4/nut_check_libpowerman.m4, + m4/nut_check_libssl.m4, m4/nut_check_libusb.m4, + m4/nut_check_libwrap.m4, m4/nut_check_os.m4, + m4/nut_report_feature.m4, m4/nut_type_socklen_t.m4, + man/Makefile.am, man/apcsmart.8, man/bcmxcp.8, man/bcmxcp_usb.8, + man/belkin.8, man/belkinunv.8, man/bestfcom.8, + man/bestfortress.8, man/bestuferrups.8, man/bestups.8, + man/blazer.8, man/clone.8, man/dummy-ups.8, man/etapro.8, + man/everups.8, man/gamatronic.8, man/genericups.8, + man/hosts.conf.5, man/isbmex.8, man/ivtscd.8, + man/libupsclient-config.1, man/liebert.8, man/liebertgxt2.8, + man/masterguard.8, man/megatec.8, man/megatec_usb.8, + man/metasys.8, man/mge-shut.8, man/mge-utalk.8, + man/microdowell.8, man/netxml-ups.8, man/nut.conf.5, + man/nutupsdrv.8, man/oneac.8, man/optiups.8, man/powercom.8, + man/powerman-pdu.8, man/powerpanel.8, man/rhino.8, + man/richcomm_usb.8, man/safenet.8, man/skel.8, man/snmp-ups.8, + man/solis.8, man/tripplite.8, man/tripplite_usb.8, + man/tripplitesu.8, man/ups.conf.5, man/upsc.8, + man/upscli_connect.3, man/upscli_disconnect.3, man/upscli_fd.3, + man/upscli_get.3, man/upscli_list_next.3, + man/upscli_list_start.3, man/upscli_readline.3, + man/upscli_sendline.3, man/upscli_splitaddr.3, + man/upscli_splitname.3, man/upscli_ssl.3, man/upscli_strerror.3, + man/upscli_upserror.3, man/upsclient.3, man/upscmd.8, + man/upscode2.8, man/upsd.8, man/upsd.conf.5, man/upsd.users.5, + man/upsdrvctl.8, man/upsimage.cgi.8, man/upslog.8, man/upsmon.8, + man/upsmon.conf.5, man/upsrw.8, man/upssched.8, + man/upssched.conf.5, man/upsset.cgi.8, man/upsset.conf.5, + man/upsstats.cgi.8, man/upsstats.html.5, man/usbhid-ups.8, + man/victronups.8, scripts/HP-UX/Makefile, + scripts/HP-UX/nut-drvctl, scripts/HP-UX/nut-drvctl.sh, + scripts/HP-UX/nut-upsd, scripts/HP-UX/nut-upsd.sh, + scripts/HP-UX/nut-upsmon, scripts/HP-UX/nut-upsmon.sh, + scripts/Makefile.am, scripts/README, scripts/RedHat/README, + scripts/RedHat/halt.patch, scripts/RedHat/ups, + scripts/RedHat/upsd, scripts/RedHat/upsd.in, + scripts/RedHat/upsmon, scripts/RedHat/upsmon.in, + scripts/Solaris8/S99upsmon, scripts/Windows/Makefile, + scripts/Windows/halt.c, scripts/dkp/95-devkit-power-hid.rules, + scripts/hal/Makefile.am, scripts/hal/ups-nut-device.fdi.in, + scripts/hotplug/Makefile.am, scripts/hotplug/README, + scripts/hotplug/libhid.usermap, scripts/hotplug/libhidups.in, + scripts/misc/nut.bash_completion, scripts/misc/osd-notify, + scripts/perl/Nut.pm, scripts/python/Makefile.am, + scripts/python/README, scripts/python/app/NUT-Monitor, + scripts/python/app/README, scripts/python/app/gui.glade, + scripts/python/app/nut-monitor.desktop, + scripts/python/app/nut-monitor.png, + scripts/python/module/PyNUT.py, + scripts/python/module/test_nutclient.py, + scripts/subdriver/path-to-subdriver.sh, scripts/udev/Makefile.am, + scripts/udev/README, scripts/udev/nut-usbups.rules.in, + server/Makefile.am, server/conf.c, server/conf.h, server/ctype.h, + server/desc.c, server/desc.h, server/netcmds.h, server/neterr.h, + server/netget.c, server/netget.h, server/netinstcmd.c, + server/netinstcmd.h, server/netlist.c, server/netlist.h, + server/netmisc.c, server/netmisc.h, server/netset.c, + server/netset.h, server/netuser.c, server/netuser.h, + server/sockdebug.c, server/ssl.c, server/ssl.h, server/sstate.c, + server/sstate.h, server/stype.h, server/upsd.c, server/upsd.h, + server/upstype.h, server/user-data.h, server/user.c, + server/user.h, tools/Makefile.am, tools/device-recorder.sh, + tools/nut-usbinfo.pl: No functional changes (properties only) * [r2335] AUTHORS: No functional changes (properties only) 2010-02-10 Arnaud Quette @@ -121,971 +1405,8 @@ required for IPv6 support in the header files that are defined by POSIX (don't rely on the netdb.h header to include them) -2010-02-10 Charles Lepple +2010-02-10 Charles Lepple * [r2332] ChangeLog: Generate ChangeLog entries from SVN r2331 back through r2117. -2010-02-10 Arjen de Korte - - * [r2331] drivers/genericups.c: Fix typo in previous commit - * [r2330] drivers/genericups.c: Don't hang up on last close - (initial state of HUPCL is implementation dependent) - [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327072] - -2010-02-09 Arjen de Korte - - * [r2329] drivers/main.c: Some drivers set - 'driver.version.internal' in upsdrv_initinfo() so we should set - the generic message before running that - * [r2327] man/upssched.conf.5: Fix wrong reference - [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-February/004532.html] - * [r2326] server/netuser.c: Check if user is allowed to login - before accepting connection - - [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544390] - -2010-02-08 Arjen de Korte - - * [r2324] UPGRADING: The tcp-wrappers support is optional in - addition to the LISTEN directive (not the other way around) - -2010-02-08 Arnaud Quette - - * [r2323] UPGRADING: Add a double explicit note about the ACL - mechanism removal in 2.4.0. - (reported on Debian by Anthony DeRobertis, Bug #526811) - -2010-02-08 Arjen de Korte - - * [r2322] data/driver.list: Added lots of Ippon devices that were - mentioned on the mailinglists (serial devices will undoubtly - work, USB support still experimental) - -2010-02-07 Arjen de Korte - - * [r2321] UPGRADING, drivers/blazer_usb.c, man/blazer.8: Use - 'ippon' subdriver for devices with USB id 06da:0003 (old - 'phoenix' subdriver still available) - * [r2320] drivers/raritan-mib.h, drivers/snmp-ups.c: Fix wrong name - * [r2319] drivers/raritan-mib.h: Add missing file in previous - commit - * [r2318] drivers, drivers/Makefile.am, drivers/apc-mib.c, - drivers/apc-mib.h, drivers/apccmib.h, drivers/baytech-mib.c, - drivers/baytech-mib.h, drivers/baytechmib.h, - drivers/compaq-mib.c, drivers/compaq-mib.h, - drivers/cpqpowermib.h, drivers/eaton-aphel-mib.h, - drivers/eaton-mib.c, drivers/eaton-mib.h, drivers/ietf-mib.c, - drivers/ietf-mib.h, drivers/ietfmib.h, drivers/mge-mib.c, - drivers/mge-mib.h, drivers/mgemib.h, drivers/netvision-mib.c, - drivers/netvision-mib.h, drivers/netvisionmib.h, - drivers/powerware-mib.c, drivers/powerware-mib.h, - drivers/pwmib.h, drivers/raritan-mib.h, - drivers/raritan-pdu-mib.c, drivers/raritan-pdu-mib.h, - drivers/snmp-ups.c, drivers/snmp-ups.h: Extract subdriver info - from main driver body into separate modules. This prevents - namespace conflicts and ensures that changes in one subdriver - don't lead to surprise changes in others. - - It also allows to use a single mapping file to be used in several - subdrivers by specifying a different entry point (which doesn't - work if everything is in one module). - -2010-02-07 Charles Lepple - - * [r2317] drivers/apcsmart.c, drivers/apcsmart.h: apcsmart: Add - input.transfer.reason - - Contributed by Michael Haardt: - http://article.gmane.org/gmane.comp.monitoring.nut.devel/4498 - -2010-02-05 Arjen de Korte - - * [r2316] drivers/cpqpowermib.h: Could this be a Powerware OEM - device? - -2010-02-04 Arjen de Korte - - * [r2315] drivers/cpqpowermib.h: Based on patch from Philip Ward - [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-February/004509.html] - -2010-02-01 Arjen de Korte - - * [r2305] clients/upsimage.c, common/strerror.c, drivers/bcmxcp.c, - drivers/main-hal.c, drivers/powerman-pdu.c: Prefer snprintf over - sprintf to prevent overflowing buffers (also removes trailing - whitespace) - * [r2303] drivers/Makefile.am, drivers/cpqpowermib.h, - drivers/snmp-ups.c, man/snmp-ups.8: - -2010-01-31 Charles Lepple - - * [r2297] drivers/tripplite_usb.c: Revert trunk commit r2294, which - was meant for a branch. - * [r2296] drivers/clone-outlet.c: clone-outlet.c: remove executable - bit - * [r2294] drivers/tripplite_usb.c: tripplite_usb: initial changes - to test protocol 3004 - -2010-01-30 Arnaud Quette - - * [r2286] tools/Makefile.am, tools/device-recorder.sh: Create a - script to record device running sequence and dump it in a .seq - format. - The .seq file can then be used by dummy-ups to replay the - sequence. - -2010-01-28 Charles Lepple - - * [r2282] m4/nut_report_feature.m4: Another attempt to fix the - feature report on OS X. - -2010-01-27 Arjen de Korte - - * [r2281] m4/nut_report_feature.m4: Attempt to get rid of spurious - '-n' on MacOSX-10.5 BuildBot - * [r2280] m4/nut_check_libhal.m4: Prefer to use 'test' over '[ ]' - (on many shells, this first a built-in function while the second - is a symbolic link to 'test') - -2010-01-27 Charles Lepple - - * [r2279] m4/nut_check_libhal.m4: Remove fallback HAL information - path, and remove extra parentheses. - -2010-01-25 Arjen de Korte - - * [r2278] drivers/megatec.c: Don't check reliability of connection - at driver startup. This confuses users and really serves no - purpose for normal use. In case the connection is unreliable, it - should ultimately be the decision of the user whether or not it - is acceptable (not the driver). - * [r2277] drivers/apc-hid.c, drivers/belkin-hid.c, - drivers/cps-hid.c, drivers/explore-hid.c, drivers/liebert-hid.c, - drivers/mge-hid.c, drivers/powercom-hid.c, - drivers/tripplite-hid.c, include/common.h: The "config.h" header - should be the first included, since it contains the _GNU_SOURCE - declaration (enables Posix extensions to C) - * [r2276] configure.in: Add AC_USE_SYSTEM_EXTENSIONS to use - features of Posix that are extensions to C (requires Autoconf - 2.60 or better) - * [r2275] common/common.c: Fix compiler warning on MacOSX-10.5 - * [r2274] common/common.c: Fix compiler warning on FreeBSD - * [r2273] configure.in: - * [r2272] configure.in, drivers/mge-hid.c: Check for presence of - strptime() before using it - -2010-01-24 Arjen de Korte - - * [r2271] configure.in, drivers/mge-hid.c: The previous patch was a - resounding failure (reverting back to setting _XOPEN_SOURCE in - one specific source file instead) - * [r2270] configure.in: Request SUSv2 compliance for all sources - (experimental) - * [r2269] drivers/mge-hid.c: _XOPEN_SOURCE seems to break on - FreeBSD - * [r2268] drivers/mge-xml.c: Fix compiler warning - -2010-01-24 Charles Lepple - - * [r2267] drivers/mge-hid.c: Define _XOPEN_SOURCE=500 for - strptime() prototype in glibc2 - -2010-01-24 Arjen de Korte - - * [r2266] drivers/mge-hid.c: Removing stuff that was added to fix - strptime on Debian Etch (incompatible with FreeBSD) - -2010-01-23 Arjen de Korte - - * [r2265] drivers/mge-hid.c: Fourth attempt of fixing strptime() - declaration missing on Debian - * [r2264] drivers/mge-hid.c: Third attempt of fixing strptime() - declaration missing on Debian - * [r2263] drivers/mge-hid.c: Second attempt of fixing strptime() - declaration missing on Debian - * [r2262] drivers/apc-hid.c, drivers/belkin-hid.c, - drivers/cps-hid.c, drivers/explore-hid.c, drivers/liebert-hid.c, - drivers/mge-hid.c, drivers/powercom-hid.c, - drivers/tripplite-hid.c, scripts/subdriver/path-to-subdriver.sh: - Remove redundant #include's (are being dealt with by main.h) - * [r2261] data/cmdvartab: Add descriptions for - 'ups.timer.(start|reboot|shutdown)' variables - * [r2260] drivers/mge-hid.c: Need to define _XOPEN_SOURCE for - strptime() prototype in glibc2 - -2010-01-22 Arjen de Korte - - * [r2257] drivers/mge-shut.c, drivers/mge-shut.h: Change naming of - ups.delay.* variables to ups.timer.*, since writing these values - immediately starts the countdown (and not when a shutdown command - is issued) - * [r2256] drivers/powercom-hid.c: Fallback to stored value of - 'ups.delay.(start|shutdown)' only if no parameter is given (to - fix 'load.on' command) - -2010-01-21 Arjen de Korte - - * [r2255] drivers/powercom-hid.c: Fix beeper.status and add - load.on.delay command (to allow starting up with delay when UPS - is shutdown) - -2010-01-19 Arjen de Korte - - * [r2254] data/driver.list, drivers, drivers/Makefile.am, - drivers/liebertgxt2.c, man/Makefile.am, man/liebertgxt2.8: Based - on the patch from the below message (needs to be tested) - - http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-January/004391.html - * [r2253] drivers/powercom-hid.c: Add - 'beeper.(enable|disable|mute)' instcmd's - -2010-01-17 Charles Lepple - - * [r2250] drivers/tripplite_usb.c: tripplite_usb: Detect protocol - before using tl_model - - Reported by Chase Wallis. - -2010-01-17 Arjen de Korte - - * [r2248] man/blazer.8: Add 'ippon' subdriver to man page - * [r2247] drivers/blazer_usb.c: ETIME is not defined on FreeBSD, so - make this test conditional (also fixes wrong sign) - -2010-01-13 Arjen de Korte - - * [r2244] drivers/blazer_usb.c: Close device handle after - usb_reset() is called and reconnect - * [r2243] drivers/blazer_usb.c: Attempt to clear stalled devices by - sending them an usb_reset() command - -2010-01-13 Charles Lepple - - * [r2242] drivers/tripplite_usb.c: tripplite_usb: don't reset - watchdog on SMARTPRO models - - Patch by Chase Wallis: - http://article.gmane.org/gmane.comp.monitoring.nut.devel/4376 - -2010-01-12 Arjen de Korte - - * [r2241] drivers/blazer_usb.c: Fix bug in ippon subdriver - -2010-01-07 Arjen de Korte - - * [r2240] drivers/blazer_usb.c: Fix minor bug in debug code - * [r2239] drivers/blazer_usb.c: Add experimental 'ippon' subdriver - to communicate with UPS devices of the same name - -2010-01-06 Arjen de Korte - - * [r2238] drivers/blazer_usb.c: Clear potential stall condition - while flushing interrupt pipe - * [r2237] drivers/libusb.c, drivers/usbhid-ups.c: Reconnect if - usb_clear_halt() is not implemented (older libusb on *BSD - systems) so that we don't get stuck with a stalled interrupt - endpoint (correction of 2235) - * [r2236] drivers/usbhid-ups.c: EPIPE should not result in - reconnecting since we're reading from a control endpoint here, - not an interrupt endpoint (where this would be an appropriate - action after attempting to fix the stall condition through - usb_clear_halt() first) - * [r2235] drivers/usbhid-ups.c: Reconnect if usb_clear_halt() is - not implemented (older libusb on *BSD systems) so that we don't - get stuck with a stalled interrupt endpoint - -2010-01-05 Arjen de Korte - - * [r2234] drivers/libusb.c: Don't ignore persistent "Broken pipe" - on stalled interrupt endpoint (only ignore them on control - endpoints) - * [r2233] drivers/libusb.c: Clear stall condition on interrupt - endpoint if needed (since we no longer reconnect, this may be - needed) - * [r2232] drivers/libusb.c, drivers/usbhid-ups.c: Change libusb.c - error handling. Most important (functional) change is that - "Broken pipe" is no longer considered a reason to reconnect - (fixes MGE/Eaton Ellipse series UPS stability problems). - -2010-01-04 Arjen de Korte - - * [r2231] drivers/libusb.c: Fix previous patch - * [r2230] drivers/libusb.c: Log message to syslog when - usb_get/set_* operation fails (except timeouts) at LOG_DEBUG to - make sure we have something to work with for debugging frequent - disconnects - -2010-01-02 Arjen de Korte - - * [r2224] m4/nut_check_libneon.m4: Fix output when library is not - installed - * [r2223] m4/nut_check_libhal.m4: Don't wast effort trying to - detect HAL stuff if we already know it is not available - * [r2222] m4/nut_check_libgd.m4: Remove braces around test - conditions - * [r2221] m4/nut_check_libpowerman.m4, m4/nut_check_libssl.m4: - Remove braces around test conditions - * [r2220] m4/nut_check_libusb.m4: Fix one "==" that was left behind - (and slightly improve message when pkg-config is not available) - -2010-01-01 Charles Lepple - - * [r2219] m4/nut_check_libusb.m4: Remove extra parentheses from - libusb test. - - Also change '==' to '=' for string equality test. - -2009-12-31 Arjen de Korte - - * [r2218] m4/nut_check_libusb.m4: Add pkg-config as method to - retrieve CFLAGS and LDFLAGS (but fall back to libusb-config) - -2009-12-30 Arjen de Korte - - * [r2217] drivers/libusb.c: Fix previous patch (failed to remove - closing #endif statement) - * [r2216] drivers/libusb.c, drivers/usbhid-ups.c: Enable the use of - the interrupt pipe on Solaris (for drivers that require this), - but disable it on the usbhid-ups driver (for which it is - optional). - * [r2215] drivers/powercom-hid.c: Honor 'offdelay' configuration - parameter and allow changing the 'ups.delay.shutdown' variable at - runtime - -2009-12-28 Arjen de Korte - - * [r2214] data/driver.list: Add new PowerCOM devices with HID PDC - interface to list of supported models - * [r2213] drivers/powercom-hid.c: The PowerCOM subdriver has now - reached a state where it is useable. Commands have been tested on - a BNT-500AP. - * [r2212] drivers/usbhid-ups.c: The composite commands - 'shutdown.return' and 'shutdown.stayoff' require 'load.on.delay' - and 'load.off.delay' (not 'ups.delay.start' and - 'ups.delay.shutdown'). - -2009-12-27 Charles Lepple - - * [r2203] scripts/hal/Makefile.am: Hard-code source file in - scripts/hal - -2009-12-26 Arjen de Korte - - * [r2202] m4/nut_check_libhal.m4: Revert previous patch that breaks - on OpenSUSE (and add HAL_CALLOUTS_PATH instead of relying on the - default) - * [r2201] m4/nut_check_libhal.m4: Use ${datarootdir} instead of - /usr/share or /usr/local/share (we check for the presence of a - subdirectory, so the chance of a false positive is low) - * [r2200] m4/nut_check_libneon.m4: Only check for optional - functions if we know library is available - * [r2199] m4/nut_check_libgd.m4: Simplify the --with-gd-includes - and --with-gd-libs processing - -2009-12-25 Arjen de Korte - - * [r2198] configure.in: FreeBSD requires both and - so explicitly use only these two headers to check for - availability of uu_lock - * [r2197] m4/nut_check_libusb.m4: Check for presence of 'usb.h' - (not 'libusb.h', which is what we use internally) - -2009-12-24 Charles Lepple - - * [r2196] m4/nut_check_libhal.m4: Test for FDI files in /usr/local - as well as /usr - - This should fix HAL-enabled builds on FreeBSD. - -2009-12-24 Arjen de Korte - - * [r2195] m4/nut_check_libhal.m4: If we can't detect the - HAL_FDI_PATH automatically, set it to /dev/null and emit warning - * [r2194] m4/nut_check_libusb.m4: Fix missing default -lusb library - and improve comments during detection - * [r2193] m4/nut_check_libusb.m4: Work around missing libusb-config - on FreeBSD 8 by falling back to defaults for CFLAGS and LDFLAGS - * [r2192] configure.in: Try to workaround some FreeBSD bugs - * [r2191] drivers/powercom-hid.c: Updated HID to NUT mappings (work - in progress and still quite broken, do not run on production - systems!) - -2009-12-22 Arjen de Korte - - * [r2190] drivers/libhid.c: Add debug information for input reports - that are not in the report descriptor - -2009-12-21 Arjen de Korte - - * [r2189] drivers/libhid.c: Use hexadecimal report numbers in debug - messages (to be consistent throughout the code) - -2009-12-20 Arjen de Korte - - * [r2188] m4/nut_check_libwrap.m4: Small improvement to better - mimic the behavior of AC_SEARCH_LIBS (by checking if we need to - add -lwrap before adding it to LIBS) - -2009-12-19 Arjen de Korte - - * [r2187] m4/ax_create_stdint_h.m4: Update location of Autoconf - Archive in header (so that we can check for modifications) - * [r2186] m4/nut_check_libgd.m4: AC_SEARCH_LIBS puts the result in - LIB, so we need to add that to the LIBGD_LDFLAGS (otherwise, this - will be part of the global LIBS that are used) - -2009-12-18 Arjen de Korte - - * [r2185] m4/nut_check_libgd.m4: Apparently, gdlib-config sometimes - fails to mention '-lgd' when asked for the LDFLAGS, so we need to - test once again if we need to include this library. - * [r2184] common/snprintf.c, configure.in: Instead of trying to - figure out if 'long long' is supported through AC_TRY_RUN - (obsolete), use AC_TYPE_LONG_LONG_INT (and AC_TYPE_LONG_DOUBLE). - Since this is only used by common/snprintf.c, only do this if - snprintf isn't a build-in function (which means probably never). - * [r2183] configure.in: Don't run preprocessor tests on - AC_CHECK_HEADERS (so CPPFLAGS is no longer needed). Replace shell - scripting by autoconf macros. - * [r2182] m4/nut_check_libgd.m4, m4/nut_check_libnetsnmp.m4, - m4/nut_check_libwrap.m4: Don't run preprocessor tests on - AC_CHECK_HEADERS (so CPPFLAGS is no longer needed). - * [r2181] m4/nut_check_libhal.m4: Don't run preprocessor tests on - AC_CHECK_HEADERS (so CPPFLAGS is no longer needed). Reformatted - macro (no functional changes). - * [r2180] m4/nut_check_libwrap.m4: Prefer AC_CHECK_HEADERS over - AC_CHECK_HEADER - * [r2179] m4/nut_check_libgd.m4: Set CPPFLAGS in case autoconf only - runs the preprocessor for AC_CHECK_HEADERS (which doesn't use - CFLAGS) - -2009-12-17 Arjen de Korte - - * [r2178] m4/nut_check_libnetsnmp.m4: Set CPPFLAGS in case autoconf - only runs the preprocessor (which doesn't use CFLAGS) - * [r2177] m4/nut_check_libneon.m4: Cleanup autoconf macro - * [r2176] clients/upsimage.c: Remove redundant test (this is - already handled by autoconf) - * [r2175] Makefile.am: - * [r2174] configure.in: Keep defaults and checks together - * [r2173] drivers/bcmxcp.c: Automatic variables must have a length - that can be computed at compile time rather than runtime. GCC - will happily accept this C++ construction here, but this is not - C. - - Follow the same principle as used elsewhere in the code, by hard - coding this to PW_ANSWER_MAX_SIZE, the maximum size of replies we - expect. - -2009-12-16 Arjen de Korte - - * [r2172] m4/nut_check_libgd.m4: Check for all GD specific header - files while we're at it - * [r2171] clients/upsimage.c: The HAVE_GD_H should not be used - here, it is better to check for HAVE_LIBGD since that one is only - set if both the header file and the gd library are found (and not - just the first). - * [r2170] m4/nut_check_libnetsnmp.m4: Cleanup autoconf macro - * [r2169] m4/nut_check_libgd.m4: Cleanup GD autoconf stuff (also - fixes double -lgd linker flag) - * [r2168] configure.in, m4/nut_check_ipv6.m4, - m4/nut_check_libssl.m4, m4/nut_check_libwrap.m4: Cleanup some - autoconf macros - -2009-12-15 Arjen de Korte - - * [r2167] m4/nut_check_libnetsnmp.m4: Use AC_CHECK_HEADER to check - for required headers. - * [r2166] m4/nut_check_libwrap.m4: Fix autoconf magic for Solaris. - Apparently, allow/deny_severity are not defined as weak symbols, - so autoconf fails with undefined symbols when checking for the - library through AC_SEARCH_LIBS. - -2009-12-15 Charles Lepple - - * [r2165] include/common.h: Fix __attribute__ in common.h - - Patch provided by Tim Rice - http://lists.alioth.debian.org/pipermail/nut-upsdev/2009-December/004288.html - -2009-12-10 Arnaud Quette - - * [r2163] drivers/mge-utalk.c: complete r2151 with the - implementation details that were removed from the new mge-utalk - man page. - -2009-12-09 Arnaud Quette - - * [r2161] drivers/mge-hid.c: complete alarms and status handling - for Eaton / MGE / Dell. - -2009-12-04 Arnaud Quette - - * [r2153] m4/nut_check_libssl.m4: fix a wrong pkg-config call - parameter, that resulted in using pkg-config's own version - instead of OpenSSL's one. - -2009-12-02 Arnaud Quette - - * [r2148] drivers/libhid.c: skip reports 254/255 for Eaton / MGE / - Dell due to special handling needs - -2009-11-30 Arjen de Korte - - * [r2145] man/upsd.8, man/upsd.conf.5, man/upsd.users.5: Add - upgrading notes for versions earlier than nut-2.4.0 - * [r2143] drivers/usbhid-ups.c, drivers/usbhid-ups.h: Use contents - of interrupt report. In case these are broken, set 'pollonly' - flag in ups.conf or use_interrupt_pipe = FALSE in subdriver (when - device matches!) - -2009-11-26 Arjen de Korte - - * [r2141] man/usbhid-ups.8: Document the 'pollonly' flag - -2009-11-25 Arjen de Korte - - * [r2140] drivers/microdowell.c: Fix compiler warning (dead code, - no functional change) - * [r2139] drivers/usbhid-ups.c: Fix compiler warning - * [r2138] drivers/usbhid-ups.c: Add some USB error codes observed - in the field for possible future handling (and the comments from - the headerfiles where these are defined) - -2009-11-24 Arjen de Korte - - * [r2133] drivers/mge-hid.c: We already know if the value to the - reverse conversion functions should be a time or date value, so - there is no need to guess it. - -2009-11-23 Arnaud Quette - - * [r2128] drivers/mge-hid.c: - fix mge_time_date_conversion_nuf() - to actually use the input value - - force ignoring the DST offset for the output value - -2009-11-19 Arnaud Quette - - * [r2122] data/driver.list, drivers/libshut.c, man/mge-shut.8: Add - serial / SHUT support for the new Dell UPS range - - list all models in driver.list using newmge-shut, - - add "battery.runtime.elapsed" support, - - update mge-shut manual page and add an alias for newmge-shut. - -2009-11-19 Arjen de Korte - - * [r2121] drivers/mge-hid.c: Prefer to use non-negated logic when - possible (also minimizes changes) - -2009-11-19 Arnaud Quette - - * [r2119] data/driver.list, docs/new-names.txt, drivers/mge-hid.c, - man/usbhid-ups.8, scripts/dkp/95-devkit-power-hid.rules, - scripts/hal/ups-nut-device.fdi.in, - scripts/hotplug/libhid.usermap, scripts/udev/nut-usbups.rules.in: - Add USB support for the new Dell UPS range - - list all models in driver.list, - - add "battery.runtime.elapsed" in mge-hid.c and NUT namespace, - - adapt ups.model formating to Dell rules, - - update USB helper files, - - update usbhid-ups manual page. - -2009-11-18 Arjen de Korte - - * [r2118] drivers/netxml-ups.c: Re-subscribe to NMC when it doesn't - send us alarm messages anymore - -2009-11-18 Arnaud Quette - - * [r2117] drivers/mge-xml.c: minor typo fix on comment - -Mon Nov 16 01:57:23 UTC 2009 / Charles Lepple - - - drivers/tripplite_usb.c: fix copy-n-paste error in load.on instcmd. - -Fri Oct 9 11:26:49 UTC 2009 / Arjen de Korte - -- m4/nut_check_libssl.m4,nut_check_libusb.m4: show version information during - configuration - -Thu Oct 8 19:38:03 UTC 2009 / Arjen de Korte - - - m4/nut_check_libneon.m4,nut_check_libusb.m4: changes in autoconf magic to - detect optional functions (without making assumptions on where they are - located) - - configure.in: update for the above - - drivers/libusb.c,netxml-ups.c,richcomm_usb.c: update for the above - -Wed Oct 7 17:53:42 UTC 2009 / Arnaud Quette - - * drivers/dummy-ups.c: dummy-ups general improvements - - dummy mode now loop on reading the .dev file, instead of reading it once. - Interacting through this method is also possible, by changing the .dev file - content on the fly, - - dummy mode now support actions (TIMER only ATM) in the .dev file. This - allows to have an automated scripting sequence (see data/evolution.dev and - dummy-ups manpage for examples), - - repeater mode now check the upsd connection, and reconnect if needed, - (reported by Gabor Kiss) - - cleanup the inline TODO list, - - bump the driver version to 0.10. - * man/dummy-ups.8: update according to the above changes. - * data/epdu-managed.dev: new dummy-ups definition file. - -Wed Oct 7 14:05:35 UTC 2009 / Arjen de Korte - - - drivers/snmp-ups.c: remove suspicious code for shutdown.* commands - -Wed Oct 7 13:43:15 UTC 2009 / Arjen de Korte - - - drivers/apc-hid.c: add support for Back-UPS RS series test.battery.* - commands (experimental) - -Tue Oct 6 19:39:22 UTC 2009 / Arjen de Korte - - - m4/nut_check_libssl.m4: use pkg-config for compiler and linker flags - - m4/nut_check_libusb.m4: minor change - -Tue Oct 6 19:16:08 UTC 2009 / Arjen de Korte - - - MAINTAINERS: Remove entry for Peter Selinger (by request) - -Tue Oct 6 12:13:01 UTC 2009 / Arnaud Quette - - - drivers/mge-shut.c: actually apply the low battery level if provided (either - through "-x lowbatt" or ups.conf). Also change the driver reported name from - "MGE UPS SYSTEMS" to "Eaton". - (reported by Daniel O'Connor) - -Mon Oct 5 20:02:42 UTC 2009 / Arnaud Quette - - - drivers/nut_usb.c: remove the calls to usb_set_configuration() and - usb_set_altinterface(), which were not needed and caused troubles - with some Eaton / Powerware models. Also add some older HP T500 / T750 which - seem to be supported, - - data/driver.list: add entries for the above. - -Mon Sep 21 08:30:18 UTC 2009 / Arjen de Korte - - - drivers/tripplite-hid.c: add ECO550UPS to list of supported devices. - - data/driver.list: add an entry for the above. - -Sun Sep 20 19:06:34 UTC 2009 / Arjen de Korte - - - drivers/tripplite-hid.c: fix broken matcher function that would - unconditionally reject possibly supported devices, even when the - productid option was supplied. - -Tue Sep 15 09:06:32 UTC 2009 / Arnaud Quette - - - data/driver.list: add an entry for Eaton E Series DX UPS (1-20 kVA) with - mge-utalk. - -Tue Sep 15 08:16:32 UTC 2009 / Arnaud Quette - - - data/driver.list: add an entry for Eaton E Series NV UPS (400-2000 VA) with - megatec_usb (reported by Vitor Choi Feitosa). - -Tue Sep 8 18:57:51 UTC 2009 / Arjen de Korte - - - m4/nut_check_libnetsnmp.m4: check for presence of header files to see - if development files are installed - -Tue Sep 8 09:39:24 UTC 2009 / Arnaud Quette - - - drivers/ivtscd.c: complete general information (device.{mfr,model,type}), - - man/ivtscd.8, man/Makefile.am: add the manpage for ivtscd driver, - - data/driver.list: add an entry for IVT SCD-series devices. - -Fri Sep 4 08:36:21 UTC 2009 / Arnaud Quette - - - scripts/perl/Nut.pm: embed the NUT Perl client module, - (patch from Gabor Kiss) - - COPYING, scripts/README: update information for Perl module inclusion. - -Fri Sep 4 08:12:52 UTC 2009 / Arnaud Quette - - - drivers/apc-hid.c: fix input.transfer.reason support by using the standard - BOOL lookup mechanism (thanks Arjen), and bump the subdriver version to 0.94. - -Thu Sep 3 11:49:12 UTC 2009 / Arnaud Quette - - - drivers/apc-hid.c: add input.transfer.reason and input.sensitivity, along - with some more reverse engineered information. - (reported by Markus Wildi) - -Wed Sep 2 19:52:21 UTC 2009 / Arjen de Korte - - - drivers/ietfmib.h,drivers/mgemib.h: Indexes start at 1 (not 0). - -Tue Aug 25 20:40:28 UTC 2009 / Arjen de Korte - - - drivers/usbhid-ups.[ch]: remove delayed matching which wasn't really - useful, since it requires claiming the device, breaking any existing - bindings in the process (should also fix Alioth bug #311869) - -Tue Aug 18 01:22:14 UTC 2009 / Charles Lepple - - - drivers/bestfortress.c, man/bestfortress.8, data/driver.list: Resurrect the - bestfortress driver (submitted by Stuart D. Gathman) - -Sat Aug 15 17:42:49 UTC 2009 / Charles Lepple - - - drivers/cps-hid.c, data/driver.list: Add CyberPower OR2200 to usbhid-ups - (reported by James Erickson) - -Wed Aug 12 13:42:21 UTC 2009 / Arnaud Quette - - - data/drivers.list: also list Inform Informer Compact 1000VA with blazer_ser - (reported by Mutlu Tunç) - -Mon Aug 10 12:18:42 UTC 2009 / Arnaud Quette - - - drivers/mge-xml.c: add support for newer Eaton ePDU monitored - - man/netxml-ups.8: add a reference to Eaton ePDU monitored - - data/drivers.list: update the Eaton ePDU monitored to include netxml-ups - -Sun Aug 9 15:43:21 UTC 2009 / Arnaud Quette - - - data/drivers.list: add Inform Informer Compact 1000VA - (reported by Mutlu Tunç) - -Fri Jul 31 03:07:27 UTC 2009 / Charles Lepple - - - drivers/liebert.c: Hard-code the baud rate to 9600 to prevent problems with - noise. - -Wed Jul 29 01:37:06 UTC 2009 / Charles Lepple - - - data/driver.list: Add "CP 1500C" to compatibility list for usbhid-ups - (reported by Svein Skogen) - -Mon Jul 27 22:00:00 UTC 2009 / Arnaud Quette - - - tools/nut-usbinfo.pl, scripts/dkp/95-devkit-power-hid.rules: remove - the 0x prefix from the VendorIDs - -Mon Jul 27 11:21:21 UTC 2009 / Arnaud Quette - - - tools/nut-usbinfo.pl, scripts/dkp/95-devkit-power-hid.rules: generate - the DeviceKit-power rule file, so that it can be maintained up to - date from the NUT source. - -Mon Jul 20 19:20:35 UTC 2009 / Arjen de Korte - - - Renamed 'virtual' to 'clone' driver, to resolve a conflict with the - Postfix virtual domain mail delivery agent man pages - -Sat Jul 11 15:58:16 UTC 2009 / Charles Lepple - - * Makefile.am: Add "." to "find" command - -Sat Jul 11 14:25:00 UTC 2009 / Charles Lepple - - * drivers/nut_usb.c: Add usb_strerror() to USB error messages. - -Tue Jul 7 11:06:32 UTC 2009 / Arnaud Quette - - * device collection completion, for the transition period - - drivers/main.c: remap device.{mfr,model,serial} from the ups.* - equivalent, and preset device.type to ups so that it only has to be - overriden if necessary. - - drivers/skel.c: some update for the device collection - - docs/new-names.txt: add the device collection description - -Mon Jul 6 09:28:10 UTC 2009 / Arnaud Quette - - - drivers/tripplite.c: fix the reading with some SmartUPS models - (patch from Robert Waldie, Opengear) - -Tue Jun 30 13:28:42 UTC 2009 / Arnaud Quette - - - drivers/baytechmib.h: add outlet.{current,voltage} and fix some - comments (from Scott Burns, Opengear) - -Wed May 27 20:35:41 UTC 2009 / Arjen de Korte - - - clients/upsmon.c: multilevel debug information (similar to other NUT - binaries) - -Mon May 25 19:53:02 UTC 2009 / Arjen de Korte - - * Enable timestamp on debug messages by default - - common/common.c: prepend elapsed number of seconds and microseconds - since start of program for upsdebug() messages, - - drivers/upsdrvctl.c: inform people that adding debug flags to upsdrvctl - is not the way to debug a driver, - - revert remainder of previous patch - -Mon May 18 11:48:31 UTC 2009 / Arnaud Quette - - * Enable timestamp on output messages (format "%H:%M:%S: msg") - - common/common.c, include/common.h: modify vupslog() to allow optional - appending of a timestamp on debug output, - - clients/upsmon.c, drivers/main.c, drivers/upsdrvctl.c, server/upsd.c: - enable timestamping using the "-T" option, - - man/upsmon.8, man/nutupsdrv.8, man/upsdrvctl.8, man/upsd.8: document the - timestamp option. - -Thu May 14 19:19:52 UTC 2009 / Arnaud Quette - - - drivers/baytechmib.h: add native NUT support for Baytech SNMP PDUs (RPCs), - - drivers/snmp-ups.c: enable Baytech MIB, - - drivers/Makefile.am: add the new MIB file, - - data/driver.list: add the supported PDUs from BayTech, - - man/snmp-ups.8: document the new MIB and devices. - (patch from Scott Burns, Opengear) - -Thu May 14 21:06:11 UTC 2009 / Arnaud Quette - - - drivers/raritan-mib.h: use the outlets template mechanism and remove all - the OIDs defines for a better readability - - drivers/snmp-ups.c: enable Raritan MIB back. - -Thu May 14 19:19:52 UTC 2009 / Arnaud Quette - - - drivers/eaton-aphel-mib.h: use the outlets template mechanism. - -Thu May 14 14:44:22 UTC 2009 / Arnaud Quette - - - docs/configure.txt: a bit of completion and standardisation. - -Thu May 14 14:23:41 UTC 2009 / Arnaud Quette - - - drivers/snmp-ups.[ch]: add a template mechanism for outlets declaration, and - the needed helpers. Also disable temporarily the Raritan MIB as it conflicts - with Eaton (Aphel) . - -Wed May 13 13:54:32 UTC 2009 / Arnaud Quette - - - man/Makefile.am, man/nut.conf.5: add a manpage for nut.conf - (patch from Debian BTS, #528222) - -Tue May 05 13:26:21 UTC 2009 / Arnaud Quette - - - drivers/apcsmart.h: add support for older SmartUPS 600 responding to other - D codes (D7, D8 and D9) - (patch from Konstantin 'Kastus' Shchuka) - -Tue May 05 02:01:13 UTC 2009 / Charles Lepple - - - drivers/tripplite_usb.c, man/tripplite_usb.8, data/driver.list: update list - of units tested with tripplite_usb - -Mon May 04 08:11:01 UTC 2009 / Arnaud Quette - - - drivers/apcsmart.[ch]: add support for older SmartUPS, which do not respond - to the ^Z, a or b commands (used to inquire the supported data) - (patch from Thomas Juerges) - -Thu Apr 30 21:20:42 UTC 2009 / Arnaud Quette - - - data/driver.list: add Apollo 1000A and 1000F compatibility with genericups - upstype=4 (reported by mvochin) - -Thu Apr 23 12:46:12 UTC 2009 / Arnaud Quette - - - man/snmp-ups.8: remove the EXPERIMENTAL section to the profit of a LIMITATION - section. - -Fri Apr 17 13:26:21 UTC 2009 / Arnaud Quette - - - data/driver.list: add UPSonic DS-800 compatibility with megatec_usb - (reported by Nick Jenkins) - -Sun Mar 29 20:59:09 UTC 2009 / Arjen de Korte - - - drivers/netxml.c: Either do a quick poll or a complete poll (not both). - -Sun Mar 29 20:21:19 UTC 2009 / Arjen de Korte - - * clients/upsimage.c, clients/upsstats.c: - - Add ups.temperature, ambient.temperature and ambient.humidity (sorry folks, - Celsius only for now). - - The graph for the battery.charge now honors battery.charge.low for the red zone. - - The number of minor dashes for the battery.charge is reduced. - - Value on the scales is now right aligned. Display of negative values is corrected. - * conf/upsstats-single.html.sample: - - If ambient.(temperature|humidity) is supported, an 'Ambient' column is added to - display the bars for them. - -Thu Mar 26 20:04:53 UTC 2009 / Arjen de Korte - - * drivers/netxml.[ch], drivers/mge-xml.c: - - Allow multiple entry points for the initial XML page that is loaded - - Use different XML pages for quick and full status updates (the latter - is only polled once every 10 times) - -Mon Mar 23 17:34:10 UTC 2009 / Kjell Claesson - - - data/driver.list, add Eaton Powerware 9130 compatibility with bcmxcp and usbhid-ups. - -Sun Mar 22 01:13:18 UTC 2009 / Alexander I. Gordeev - - - drivers/blazer_usb.c: read data from device until timeout. - -Mon Mar 16 22:10:30 UTC 2009 / Kjell Claesson - - - drivers/bcmxcp.[ch]: Extend alarm map to fix debug crash on PW9130. Driver version 0.22. - -Wed Mar 04 19:37:12 UTC 2009 / Arnaud Quette - - - drivers/mge-utalk.c: fix enable_ups_comm() - (patch from Hans-Werner Paulsen) - -Sun Mar 01 19:51:54 UTC 2009 / Arnaud Quette - - - data/driver.list, drivers/tripplite-hid.c: add HP T750 INTL - (reported by KP Kirchdoerfer) - -Fri Feb 27 09:33:27 UTC 2009 / Arnaud Quette - - - data/driver.list: add Mustek PowerMust 424 / 636 / 848 (USB) compatibility - with blazer_usb (reported by Vitaly Polyakov) - -Fri Feb 27 09:07:05 UTC 2009 / Arnaud Quette - - - drivers/apcsmart.[ch]: add APC Matrix 5000, vintage 12/00 - (patch from Jarett Stevens) - -Tue Feb 17 22:00:01 UTC 2009 / Arnaud Quette - - - drivers/Makefile.am: Fix snmp-ups overlinking with lcrypto. - (Debian Lintian report) - -2.4.1 - -Mon Feb 16 17:41:32 UTC 2009 / Arnaud Quette - - - configure.in: 2.4.1 - -Mon Feb 16 16:13:47 UTC 2009 / David Goncalves - - - scripts/python/app/NUT-Monitor: Changed version from 1.0 to 1.1. Changed - the way NUT-Monitor deals with 'ups.status' var to better handle composite - status (OL + TRIM, OL + CHRG, ...) - -Thu Feb 12 13:23:41 UTC 2009 / Arnaud Quette - - - scripts/udev/Makefile.am, scripts/hal/Makefile.am, scripts/hotplug/Makefile.am, - Makefile.am: fix the autotools issue with the clean/distclean target removing - the USB helper files. - -Wed Feb 11 10:43:10 UTC 2009 / Kjell Claesson - - - data/driver.list: Updated list with ups supported by microdowell driver. - -Thu Feb 05 22:16:10 UTC 2009 / Kjell Claesson - - - drivers/microdowell.c: Cleaned some of the code. Fixed reading of ups.conf variables. - -Wed Feb 04 15:01:20 UTC 2009 / Kjell Claesson - - - Added microdowell.c/h into drivers/. add man/microdowell.8. Adjusted - drivers/Makefile.am and man/makefile.am. Adjusted the code for 2.4.0 - in the microdowell.c. - -*** File trimmed here 28 January 2009 *** - -For entries before this point, start with version 2.4.1 and work back. diff --git a/INSTALL b/INSTALL index ceb81b6..1e58c4c 100644 --- a/INSTALL +++ b/INSTALL @@ -1,522 +1,320 @@ -Network UPS Tools: INSTALL +Installation instructions +========================= -These are the essential steps for compiling and installing this -software, including configuring safe shutdowns when the UPS battery -runs out of power. +This chapter describe the various methods for installing Network UPS Tools. -There are many programs and other features in this package. You should -check out the README file and other accompanying documentation to see -how it all works. +Whenever it is possible, prefer <>. +Packagers have done an excellent and hard work at improving NUT integration into +their system. -The paths shown below are the default values you get by just calling -configure by itself. If you have used --prefix or similar, things will -be different. Also, if you didn't install this program from source -yourself, the paths will probably have a number of differences. +[[Installing_source]] +Installing from source +---------------------- -Note: by default, your system probably won't find the man pages, since -they install to /usr/local/ups/man. You can fix this by editing your -MANPATH, or just do this: +These are the essential steps for compiling and installing this software. + +The NUT linkdoc:packager-guide[Packager Guide], which presents the best +practices for installing and integrating NUT, is also a good reading. + +[NOTE] +.Keep in mind that... +================================================================================ + +- the paths shown below are the default values you get by just calling +configure by itself. If you have used --prefix or similar, things will be +different. Also, if you didn't install this program from source yourself, the +paths will probably have a number of differences. + +- by default, your system probably won't find the man pages, since they +install to /usr/local/ups/man. You can fix this by editing your MANPATH, or +just do this: man -M /usr/local/ups/man - man -M /usr/local/ups/man upsd.conf +- if your favorite system offers up to date binary packages, you should always +prefer these over a source installation. Along with the known advantages of such +systems for installation, upgrade and removal, there are many integration issues +that have been addressed. -Also, if your favorite system offers up to date binary packages, -always prefer these over a source installation. Along with the known -advantages of such systems for installation, upgrade and removal, there -are many integration issues that have been addressed. - -============================================================================ -============================================================================ -============================================================================ - - Prepare your system - =================== - - 1. Create at least one user and a group for running this software. You - might call them "ups" and "nut". The exact names aren't important as - long as you are consistent. - - The process for doing this varies from one system to the next, and - explaining how to add users is beyond the scope of this document. - - For the purposes of this document, the user name and group name - will be "ups" and "nut" respectively. - - Be sure the new user is a member of the new group! If you forget to - do this, you will have problems later on when you try to start upsd. - -============================================================================ -============================================================================ -============================================================================ - - Build and install - ================= +================================================================================ - 1. Configure the source tree for your system. Add the --with-user and - --with-group switch to set the user name and group that you created - above. +Prepare your system +~~~~~~~~~~~~~~~~~~~~ + +System User creation +^^^^^^^^^^^^^^^^^^^^ + +Create at least one system user and a group for running this software. You +might call them "ups" and "nut". The exact names aren't important as +long as you are consistent. + +The process for doing this varies from one system to the next, and +explaining how to add users is beyond the scope of this document. + +For the purposes of this document, the user name and group name +will be 'ups' and 'nut' respectively. + +Be sure the new user is a member of the new group! If you forget to +do this, you will have problems later on when you try to start upsd. + + +Build and install +~~~~~~~~~~~~~~~~~ + +[[Configuration]] +Configuration +^^^^^^^^^^^^^ + +Configure the source tree for your system. Add the '--with-user' and +'--with-group' switch to set the user name and group that you created +above. ./configure --with-user=ups --with-group=nut - If you need any other switches for configure, add them here. For - example: +If you need any other switches for configure, add them here. For example: - * to build and install USB drivers, add --with-usb (note that you - need to install libusb development package or files). +* to build and install USB drivers, add '--with-usb' (note that you + need to install libusb development package or files). - * to build and install SNMP drivers, add --with-snmp (note that - you need to install libsnmp development package or files). +* to build and install SNMP drivers, add '--with-snmp' (note that + you need to install libsnmp development package or files). - * to build and install CGI scripts, add --with-cgi. +* to build and install CGI scripts, add '--with-cgi'. - * to build and install NUT development files (needed to compile - WMNut and MGE PSP), add --with-lib. +See <> from the User Manual, +docs/configure.txt or './configure --help' for all the available +options. - * to build and install HAL support, add --with-hal. +If you alter paths with additional switches, be sure to use those +new paths while reading the rest of the steps. - See docs/configure.txt or "./configure --help" for the available - options. +Reference: <> from the +User Manual. - If you alter paths with additional switches, be sure to use those - new paths while reading the rest of the steps. - *** Reference: docs/configure.txt - ---------------------------------------------------------------------------- - - 2. Build the programs. +Build the programs +^^^^^^^^^^^^^^^^^^ make - This will build the NUT client and server programs and the - selected drivers. It will also build any other features that were - selected during configuration in step 1. above. +This will build the NUT client and server programs and the +selected drivers. It will also build any other features that were +selected during <> step above. ---------------------------------------------------------------------------- - 3. Gain privileges for installing software if necessary. +Installation +^^^^^^^^^^^^ + +[NOTE] +===================================================================== + +you should now gain privileges for installing software if necessary: su ---------------------------------------------------------------------------- +===================================================================== - - 4. Install the files to a system level directory. +Install the files to a system level directory: make install - This will install the compiled programs and man pages, as well as - some data files required by NUT. Any optional features selected - during configuration will also be installed. +This will install the compiled programs and man pages, as well as +some data files required by NUT. Any optional features selected +during configuration will also be installed. - This will also install sample versions of the NUT configuration - files. Sample files are installed with names like ups.conf.sample - so they will not overwrite any existing real config files you may - have created. +This will also install sample versions of the NUT configuration +files. Sample files are installed with names like ups.conf.sample +so they will not overwrite any existing real config files you may +have created. - If you are packaging this software, then you will probably want to - use the DESTDIR variable to redirect the build into another place, - i.e.: +If you are packaging this software, then you will probably want to +use the DESTDIR variable to redirect the build into another place, +i.e.: make DESTDIR=/tmp/package install make DESTDIR=/tmp/package install-conf ---------------------------------------------------------------------------- +[[StatePath]] +State path creation +^^^^^^^^^^^^^^^^^^^ - 5. Create the state path directory for the driver(s) and server to use - for storing UPS status data and other auxiliary files, and make it - owned by the user you created. +Create the state path directory for the driver(s) and server to use +for storing UPS status data and other auxiliary files, and make it +owned by the user you created. mkdir -p /var/state/ups chmod 0770 /var/state/ups chown root:nut /var/state/ups ---------------------------------------------------------------------------- +[[Ownership]] +Ownership and permissions +^^^^^^^^^^^^^^^^^^^^^^^^^ - 6. Set ownership data and permissions on your serial or USB ports - that go to your UPS hardware. Be sure to limit access to just - the user you created earlier. +Set ownership data and permissions on your serial or USB ports +that go to your UPS hardware. Be sure to limit access to just +the user you created earlier. - These examples assume the second serial port (ttyS1) on a typical - Slackware system. On FreeBSD, that would be cuaa1. Serial ports - vary greatly, so yours may be called something else. +These examples assume the second serial port (ttyS1) on a typical +Slackware system. On FreeBSD, that would be cuaa1. Serial ports +vary greatly, so yours may be called something else. chmod 0660 /dev/ttyS1 chown root:nut /dev/ttyS1 - The setup for USB ports is slightly more complicated. Device files - for USB devices, such as /proc/bus/usb/002/001, are usually - created "on the fly" when a device is plugged in, and disappear - when the device is disconnected. Moreover, the names of these - device files can change randomly. To set up the correct - permissions for the USB device, you may need to set up (operating - system dependent) hotplugging scripts. Sample scripts and - information are provided in the scripts/hotplug and - scripts/udev directories. For most users, the hotplugging scripts - will be installed automatically by "make install". +//////////////////////////////////////////////////////////////////////////////// +FIXME: TBR +//////////////////////////////////////////////////////////////////////////////// - (If you want to try if a driver works without setting up - hotplugging, you can add the "-u root" option to upsd, upsmon, and - drivers; this should allow you to follow the below - instructions. However, don't forget to set up the correct - permissions later!). +The setup for USB ports is slightly more complicated. Device files +for USB devices, such as /proc/bus/usb/002/001, are usually +created "on the fly" when a device is plugged in, and disappear +when the device is disconnected. Moreover, the names of these +device files can change randomly. To set up the correct +permissions for the USB device, you may need to set up (operating +system dependent) hotplugging scripts. Sample scripts and +information are provided in the scripts/hotplug and +scripts/udev directories. For most users, the hotplugging scripts +will be installed automatically by "make install". - NOTE: if you are using something like devfs or udev, make sure - these permissions stay set across a reboot. If they revert to the - old values, your drivers may fail to start. +(If you want to try if a driver works without setting up +hotplugging, you can add the "-u root" option to upsd, upsmon, and +drivers; this should allow you to follow the below +instructions. However, don't forget to set up the correct +permissions later!). ---------------------------------------------------------------------------- +NOTE: if you are using something like devfs or udev, make sure +these permissions stay set across a reboot. If they revert to the +old values, your drivers may fail to start. - 7. Create one section per UPS in /usr/local/ups/etc/ups.conf - To find out which driver to use, check the "HARDWARE SUPPORT TABLE" - in the README file, or data/driver.list. +You are now ready to configure NUT, and start testing and using it. - Once you have picked a driver, create a section for your UPS in - ups.conf. You must supply values for "driver" and "port". +You can jump directly to the <>. - Some drivers may require other flags or settings. The "desc" value - is optional, but is recommended to provide a better description of - what your UPS is supporting. - A typical UPS without any extra settings looks like this: +[[Installing_packages]] +Installing from packages +------------------------ - [myupsname] - driver = mydriver - port = /dev/ttyS1 - desc = "Workstation" +This chapter describes the specific installation steps when using +binary packages that exist on various major systems. - NOTE: usbhid-ups is a special case and ignores the "port" value. - You must still set this value, but it does not matter what you set - it to; you can set "port" to "auto" if you like. If you only own - one local UBS UPS, the driver will find it automatically. If you - own more than one UBS UPS, refer to the usbhid-ups(8) man page for - more information. +[[Debian]] +Debian, Ubuntu and other derivatives +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - *** References: man pages: ups.conf(5), nutupsdrv(8), plus - whatever driver(s) you intend to use. +NOTE: NUT is packaged and well maintained in these systems. +The official Debian packager is part of the NUT Team. ---------------------------------------------------------------------------- +Using your prefered method (apt-get, aptitude, Synaptic, ...), install +the 'nut' package, and optionaly the following: - 8. Start the driver(s) for your hardware. +- 'nut-cgi', if you need the CGI (HTML) option, +- 'nut-snmp', if you need the snmp-ups driver, +- 'nut-xml', for the netxml-ups driver, +- 'nut-powerman-pdu', to control the PowerMan daemon (PDU management) +- 'nut-dev', if you need the development files. - /usr/local/ups/bin/upsdrvctl start +//////////////////////////////////////////////////////////////////////////////// +- nut-client +- nut-hal-drivers +//////////////////////////////////////////////////////////////////////////////// - Make sure the driver doesn't report any errors. It should show a - few details about the hardware and then enter the background. You - should get back to the command prompt a few seconds later. For - reference, a successful start of the belkin driver looks like this: +Configuration files are located in /etc/nut. +nut.conf must be edited to be able to invoke /etc/init.d/nut - # /usr/local/ups/bin/upsdrvctl start - Network UPS Tools - UPS driver controller 1.5.12 - Network UPS Tools - Belkin Smart protocol driver 0.21 (1.5.12) - Detected F6C525-SER on /dev/cuaa0 - # +NOTE: Ubuntu users can access the APT URL installation by clicking on link:apt://nut[this link]. - If the driver doesn't start cleanly, make sure you have picked the - right one for your hardware. You might need to try other drivers - by changing the "driver=" value in ups.conf. - Be sure to check the driver's man page to see if it needs any extra - settings in ups.conf to detect your hardware. +[[Mandriva]] +Mandriva +~~~~~~~~ - If it says "can't bind /var/state/ups/..." or similar, then your - state path probably isn't writable by the driver. Check the - permissions and mode on that directory (step 5). +NOTE: NUT is packaged and well maintained in these systems. +The official Mandriva packager is part of the NUT Team. - After making changes, try step 6 again. +Using your prefered method (urpmi, RPMdrake, ...), install one of the two below +packages: - *** References: man pages: nutupsdrv(8), upsdrvctl(8) +- 'nut-server' if you have a 'standalone' or 'netserver' installation, +- 'nut' if you have a 'netclient' installation. ---------------------------------------------------------------------------- +Optionaly, you can also install the following: - 9. Configure upsd, which serves data from the drivers to the clients. +- 'nut-cgi', if you need the CGI (HTML) option, +- 'nut-devel', if you need the development files. - First, edit upsd.conf to allow access to your client systems. By - default, upsd will only listen to localhost port 3493/tcp. If you want - to connect to it from other machines, you must specify each interface you - want upsd to listen on for connections, optionally with a port number. - LISTEN 127.0.0.1 3493 - LISTEN ::1 3493 +[[Suse]] +Suse / Opensuse +~~~~~~~~~~~~~~~ - Note: if you run a firewall of some sort, you may have to add rules - to allow these incoming connections. +NOTE: NUT is packaged and well maintained in these systems. +The official Suse packager is part of the NUT Team. - Next, create upsd.users. For now, this can be an empty file. - You can come back and add more to it later when it's time to - configure upsmon or run one of the management tools. +Install the 'nut-classic' package, and optionaly the following: - Do not make either file world-readable, since they both hold - access control data and passwords. They just need to be readable by - the user you created in the preparation process. +- 'nut-drivers-net', if you need the snmp-ups or the netxml-ups drivers, +- 'nut-cgi', if you need the CGI (HTML) option, +- 'nut-devel', if you need the development files, - The suggested configuration is to chown it to root, chgrp it to the - group you created, then make it readable by the group. +NOTE: Suse and Opensuse users can use the +link:http://software.opensuse.org/search?baseproject=ALL&p=1&q=nut[one-click install method] +to install NUT. - chown root:nut upsd.conf upsd.users - chmod 0640 upsd.conf upsd.users - *** References: man pages: upsd.conf(5), upsd.users(5), upsd(8) +[[RedHat]] +Red Hat, Fedora and CentOS +~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------------------------------------------- +NOTE: NUT is packaged and well maintained in these systems. +The official Red Hat packager is part of the NUT Team. -10. Start the network server. +Using your prefered method (yum, Add/Remove Software, ...), install one of the +two below packages: - /usr/local/ups/sbin/upsd +- 'nut' if you have a 'standalone' or 'netserver' installation, +- 'nut-client' if you have a 'netclient' installation. - Make sure it is able to connect to the driver(s) on your system. - A successful run looks like this: +Optionaly, you can also install the following: - # /usr/local/ups/sbin/upsd - Network UPS Tools upsd 1.5.12 - Connected to UPS [belkin]: belkin-cuaa0 - Synchronizing...done - # +- 'nut-cgi', if you need the CGI (HTML) option, +- 'nut-xml', if you need the netxml-ups driver, +- 'nut-devel', if you need the development files. - upsd prints dots while it waits for the driver to respond. Your - system may print more or less depending on how many drivers you - have and how fast they are. - NOTE: if upsd says that it can't connect to a UPS or that the data - is stale, then your ups.conf is not configured correctly, or you - have a driver that isn't working properly. You must fix this before - going on to the next step. +[[FreeBSD]] +FreeBSD +~~~~~~~ - *** Reference: man page: upsd(8) +You can either install NUT as a binary package or as a port. ---------------------------------------------------------------------------- +Binary package +^^^^^^^^^^^^^^ -11. Make sure that the UPS is providing good status data. +To install the main component, use the following command: - /usr/local/ups/bin/upsc myupsname@localhost ups.status + # pkg_add -r nut - You should see just one line in response: +Port +^^^^ - OL +The port is located under /usr/ports/sysutils/nut. +To install it, use the following command: - OL means your system is running on line power. If it says something - else (like OB - on battery, or LB - low battery), your driver was - probably misconfigured in step 7. If you reconfigure the driver, - use 'upsdrvctl stop' to stop it, then start it again in step 8. + # cd /usr/ports/sysutils/nut/ && make install clean - *** Reference: man page: upsc(8) +You have to define WITH_NUT_CGI to build the optional CGI scripts. ---------------------------------------------------------------------------- +Optionaly, you can also install the following ports: -12. Look at all of the status data which is being monitored. +- sysutils/nut-snmp, for the SNMP driver, +- sysutils/nut-usb, for the USB drivers, +- sysutils/nut-libupsclient, for the upsclient library. - /usr/local/ups/bin/upsc myupsname@localhost - What happens now depends on the kind of UPS and driver you have. - In the list, you should see ups.status with the same value you got - above. A sample run on a MGE UPS SYSTEMS Ellipse ASR 600 looks - like this: +You are now ready to configure NUT, and start testing and using it. - battery.charge: 82 - battery.charge.low: 30 - battery.runtime: 1563 - driver.name: usbhid-ups - driver.parameter.port: auto - driver.version: 2.0.3 - driver.version.data: MGE HID 0.8 - driver.version.internal: 0.28 - input.transfer.high: 264.0 - input.transfer.low: 184.0 - outlet.desc: Main Outlet - outlet.id: 1 - outlet.switchable: 0 - outlet.1.desc: PowerShare Outlet 1 - outlet.1.id: 2 - outlet.1.switch: 0 - outlet.1.switchable: 0 - output.voltage: 230.0 - ups.delay.shutdown: -1 - ups.delay.start: -10 - ups.load: 0 - ups.mfr: MGE UPS SYSTEMS - ups.model: Ellipse 600 - ups.power.nominal: 600 - ups.serial: AP8F15005 - ups.status: OB DISCHRG - - *** Reference: man page: upsc(8) - ---------------------------------------------------------------------------- - -13. Edit your startup scripts. - - Make sure upsdrvctl and upsd are run every time your system starts. - -============================================================================ -============================================================================ -============================================================================ - - Configuring shutdowns for low battery events - -------------------------------------------- - -The whole point of UPS software is to bring down the OS cleanly when you -run out of battery power. Everything else is just eye candy. To make -sure your system shuts down properly, you will need to perform some -additional configuration and run upsmon. Here are the basics: - ---------------------------------------------------------------------------- - - 1. Create a upsd user for upsmon to use while monitoring this UPS. - - Edit upsd.users and create a new section. upsmon will connect - to upsd and use this user name (in brackets) and password to - authenticate. This example is for a user called "monuser": - - [monuser] - password = mypass - upsmon master # or upsmon slave - - *** References: man pages: upsd(8), upsd.users(5) - ---------------------------------------------------------------------------- - - 2. Reload upsd. Depending on your configuration, you may be able to - do this without stopping upsd: - - /usr/local/ups/sbin/upsd -c reload - - If that doesn't work (check the syslog), just restart it: - - /usr/local/ups/sbin/upsd -c stop - /usr/local/ups/sbin/upsd - - Later: if you want to make reloading work, see the entry in the FAQ - about starting upsd as a different user. - ---------------------------------------------------------------------------- - - 3. Set the POWERDOWNFLAG location for upsmon. - - In upsmon.conf, add a POWERDOWNFLAG directive with a filename. - upsmon will create this file when the UPS needs to be powered off - during a power failure when low battery is reached. - - We will test for the presence of this file in a later step. - - POWERDOWNFLAG /etc/killpower - - *** References: man pages: upsmon(8), upsmon.conf(5) - ---------------------------------------------------------------------------- - - 4. Secure upsmon.conf. - - The recommended setting is to have it owned by root:nut, then - make it readable by the group and not world. This file contains - passwords that could be used by an attacker to start a shutdown, - so keep it secure. - - chown root:nut upsmon.conf - chmod 0640 upsmon.conf - - This step has been placed early in the process so you secure this - file before adding sensitive data in the next step. - ---------------------------------------------------------------------------- - - 5. Create a MONITOR directive for upsmon - - Edit upsmon.conf and create a MONITOR line with the UPS definition - (@), username and password from step 2, and - the master or slave setting. - - If it's the master (i.e., it's connected to this UPS directly): - - MONITOR myupsname@mybox 1 monuser mypass master - - If it's just monitoring this UPS over the network, and some other - system is the master: - - MONITOR myupsname@mybox 1 monuser mypass slave - - The number "1" here is the power value. This should always be set - to 1 unless you have a very special (read: expensive) system with - redundant power supplies. See big-servers.txt and data-room.txt. - - *** References: man pages: upsmon(8), upsmon.conf(5) - ---------------------------------------------------------------------------- - - 6. Define a SHUTDOWNCMD for upsmon. - - Still in upsmon.conf, add a directive that tells upsmon how to - shut down your system. This example seems to work on most systems: - - SHUTDOWNCMD "/sbin/shutdown -h +0" - - Notice the presence of "quotes" here to keep it together. - - If your system has special needs, you may want to set this to - a script which does local shutdown tasks before calling init. - ---------------------------------------------------------------------------- - - 7. Start upsmon. - - /usr/local/ups/sbin/upsmon - - If it complains about something, then check your configuration. - ---------------------------------------------------------------------------- - - 8. Look for messages in the syslog to indicate success. It should look - something like this: - - May 29 01:11:27 mybox upsmon[102]: Startup successful - May 29 01:11:28 mybox upsd[100]: Client monuser@192.168.50.1 - logged into UPS [myupsname] - - Any errors seen here are probably due to an error in the config - files of either upsmon or upsd. You should fix them before - continuing. - ---------------------------------------------------------------------------- - - 9. Edit your startup scripts: add upsmon - - Make sure upsmon starts when your system comes up. Do it after - upsdrvctl and upsd, or it will complain about not being able to - contact the server. - ---------------------------------------------------------------------------- - -10. Edit your shutdown scripts: add upsdrvctl shutdown - - You should configure your system to power down the UPS after the - filesystems are remounted read-only. Have it look for the presence - of the POWERDOWNFLAG (from upsmon.conf), using this as an example: - - if (test -f /etc/killpower) - then - echo "Killing the power, bye!" - /usr/local/ups/bin/upsdrvctl shutdown - - sleep 120 - - # uh oh... the UPS power-off failed - # you probably want to reboot here so you don't get stuck! - # *** see the section on power races in shutdown.txt! *** - fi - - Be careful: that upsdrvctl command will probably power off your - machine. Don't use it unless your system is ready to be halted by - force. If you run RAID, be sure the arrays are ready to lose power. - Your kernel's power-off routines may not execute. - - Make sure that the filesystem(s) holding your UPS drivers and - configuration details are still mounted when that part of the script - is run. You need upsdrvctl, ups.conf, and any drivers for the - hardware on your system. - ---------------------------------------------------------------------------- - -More information can be found in the README file, the shutdown.txt document, -the upsmon(8) man page and the upsmon.conf(5) man page. +You can jump directly to the +<>. diff --git a/Makefile.am b/Makefile.am index fea5ed4..82c212c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I m4 # subdirectories to build and distribute. The order matters, as # several subdirectories depend on stuff in "common" being built first -SUBDIRS = include common clients conf data docs drivers lib man \ +SUBDIRS = include common clients conf data docs drivers lib \ tools scripts server EXTRA_DIST = MAINTAINERS UPGRADING @@ -16,8 +16,8 @@ EXTRA_DIST = MAINTAINERS UPGRADING # need to give hotplug-dir and udev-dir, so that staged install does # not fail. -DISTCHECK_FLAGS = --with-all --with-ssl --with-ipv6 -DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-ipv6=auto +DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto +DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ @@ -27,8 +27,29 @@ distcheck-light: $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck # workaround the dist generated files that are also part of the distribution -distcleancheck_listfiles = \ - find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' +# Note that distcleancheck is disabled for now, while waiting for a proper +# solution, that do not break older unix systems +#distcleancheck_listfiles = \ +# find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' +distcleancheck: + @: + +# Automatically generate the ChangeLog from SVN logs: +MAINTAINERCLEAN_FILES = ChangeLog +ChangeLog: tools/svn2cl.authors + svn2cl --group-by-day --include-rev --authors=$< --revision 'HEAD:2332' --output=$@ || \ + echo "svn2cl failed to generate the ChangeLog. See http://trac.networkupstools.org/projects/nut/timeline" > $@ + +if HAVE_ASCIIDOC +website: + cd docs; $(MAKE) $(AM_MAKEFLAGS) website + cd docs/man; $(MAKE) $(AM_MAKEFLAGS) html-man + cd tools; $(MAKE) $(AM_MAKEFLAGS) website + cd docs/website; $(MAKE) $(AM_MAKEFLAGS) website +else !HAVE_ASCIIDOC +website: + @echo "Not building website since 'asciidoc' was not found." +endif !HAVE_ASCIIDOC # ---------------------------------------------------------------------- # targets from old build system (pre-automake). diff --git a/Makefile.in b/Makefile.in index 7839a3a..f7b5c89 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -39,15 +39,16 @@ target_triplet = @target@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ - ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \ - install-sh ltmain.sh missing + ChangeLog INSTALL NEWS TODO compile config.guess config.sub \ + depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ - $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -57,6 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -120,9 +122,12 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -135,8 +140,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -153,7 +160,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ HAL_FDI_PATH = @HAL_FDI_PATH@ HAL_USER = @HAL_USER@ -HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -164,22 +170,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -281,7 +287,7 @@ ACLOCAL_AMFLAGS = -I m4 # subdirectories to build and distribute. The order matters, as # several subdirectories depend on stuff in "common" being built first -SUBDIRS = include common clients conf data docs drivers lib man \ +SUBDIRS = include common clients conf data docs drivers lib \ tools scripts server EXTRA_DIST = MAINTAINERS UPGRADING @@ -291,17 +297,15 @@ EXTRA_DIST = MAINTAINERS UPGRADING # distcheck-light". Try to check as many features as possible! Also # need to give hotplug-dir and udev-dir, so that staged install does # not fail. -DISTCHECK_FLAGS = --with-all --with-ssl --with-ipv6 -DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-ipv6=auto +DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto +DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ --with-udev-dir='$${prefix}/etc/udev' -# workaround the dist generated files that are also part of the distribution -distcleancheck_listfiles = \ - find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' - +# Automatically generate the ChangeLog from SVN logs: +MAINTAINERCLEAN_FILES = ChangeLog # ---------------------------------------------------------------------- # targets from old build system (pre-automake). @@ -361,7 +365,7 @@ distclean-libtool: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -386,7 +390,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -550,7 +554,8 @@ distdir: $(DISTFILES) fi; \ done -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ @@ -594,17 +599,17 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -654,15 +659,6 @@ distuninstallcheck: fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile @@ -784,6 +780,25 @@ uninstall-am: distcheck-light: $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck +# workaround the dist generated files that are also part of the distribution +# Note that distcleancheck is disabled for now, while waiting for a proper +# solution, that do not break older unix systems +#distcleancheck_listfiles = \ +# find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' +distcleancheck: + @: +ChangeLog: tools/svn2cl.authors + svn2cl --group-by-day --include-rev --authors=$< --revision 'HEAD:2332' --output=$@ || \ + echo "svn2cl failed to generate the ChangeLog. See http://trac.networkupstools.org/projects/nut/timeline" > $@ + +@HAVE_ASCIIDOC_TRUE@website: +@HAVE_ASCIIDOC_TRUE@ cd docs; $(MAKE) $(AM_MAKEFLAGS) website +@HAVE_ASCIIDOC_TRUE@ cd docs/man; $(MAKE) $(AM_MAKEFLAGS) html-man +@HAVE_ASCIIDOC_TRUE@ cd tools; $(MAKE) $(AM_MAKEFLAGS) website +@HAVE_ASCIIDOC_TRUE@ cd docs/website; $(MAKE) $(AM_MAKEFLAGS) website +@HAVE_ASCIIDOC_FALSE@website: +@HAVE_ASCIIDOC_FALSE@ @echo "Not building website since 'asciidoc' was not found." + build: @echo $(WARN) @echo "Warning: 'make build' is deprecated. Use 'make all' instead." diff --git a/NEWS b/NEWS index d47ff06..ab1bb39 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,67 @@ If you're upgrading from an earlier version, see the UPGRADING file. For a complete list of changes, please refer to the ChangeLog file. +--------------------------------------------------------------------------- +Release notes for NUT 2.6.0 - what's new since 2.4.3: + + - the main focus of this release is the complete documentation revamping, + using AsciiDoc. This includes a new website, user manual, developer guide, + packager guide and manual pages, available in various formats (single and + multiple pages HTML, and PDF at the moment). + Be sure to check the --with-doc configure option help, and + docs/configure.txt for more information. + + - Add Augeas support, to provide easy NUT configuration management, through + tools and development APIs. For more information, refer to the developer + guide, or scripts/augeas/README in the source directory. + + - support for new devices: APC 5G; Eaton PowerWare 5119 RM (smart mode using + upscode2 driver), Eaton Best Ferrups (using older ConnectUPS card), + Eaton 9395 (serial interface), Eaton ConnectUPS X / BD / E Slot; + HP T1000 INTL, HP T1500 INTL, HP T750 G2, HP R1500 G2 INTL; iDowell iBox UPS; + Tripp Lite SmartOnline SU1000XLA, Tripp Lite Smart1000LCD, and some + more USB/HID devices IDs; CyberPower CP1500AVRLCD and CP1350AVRLCD; + PowerWalker Line-Interactive VI 1400 ; Rocketfish RF-1000VA / RF-1025VA. + + - usbhid-ups has better support for shutting down APC SmartUPS RM series, + and finally fix the "buffer size" issue, which was breaking some + devices data retrieval, or truncating some data on others. + + - snmp-ups now support SNMP v3 and its security parameters. IETF MIB support + has also been extended. + + - fix dummy-ups simulation driver status handling bug, and add the + capability to remove exposed variables on the fly. + + - the belkin driver now support control commands and status reporting + for beeper and battery test. + + - the powerpanel driver supports more older CyberPower units. + + - mge-utalk, upscode2, blazer and liebert-esp2 have also received some + care, and been improved. + + - NUT-Monitor and the PyNUT client module have been updated to 1.3, + adding more features like automatic connection to the first local device + and i18n support. + + - improve configure time dependencies checking and processing. + + - improve older Unix systems support (HP-UX, Aix, ...) for missing functions. + + - refresh and improve USB helper files (udev and UPower). + + - more generation automation: the ChangeLog file is now generated + automatically at distribution time, along with the files needed for + the website hardware compatibility list. + + - SSL support has also received some improvements. + + - tcp-wrapper now allows hostnames in /etc/hosts.allow too (not only IPv4 + and/or IPv6 addresses). + + - many bugfixes, cleanup and improvements. + --------------------------------------------------------------------------- Release notes for NUT 2.4.3 - what's new since 2.4.2: diff --git a/README b/README index c43679b..2f9213b 100644 --- a/README +++ b/README @@ -1,144 +1,111 @@ -================================= - Network UPS Tools Documentation -================================= +Network UPS Tools Overview +=========================== -:Info: Program support page: -:Author: Arnaud Quette and others, see AUTHORS file. -:Copyright: Released under the GNU GPL - see COPYING for details. - -Mailing list details: http://alioth.debian.org/mail/?group_id=30602 - -.. contents:: - -=========== Description -=========== +----------- Network UPS Tools is a collection of programs which provide a common -interface for monitoring and administering UPS and PDU hardware. NUT comes in -two flavors: the "classic" and the "HAL enabled" one. - -The "classic" flavor --------------------- - -It is the standard installation that uses a layered approach to connect -all of the NUT parts. +interface for monitoring and administering UPS, PDU and SCD hardware. +It uses a layered approach to connect all of the parts. Drivers are provided for a wide assortment of equipment. They understand the specific language of each device and map it back to a -compatibility layer. This means both an expensive "smart" protocol UPS -and a simple "power strip" model can be handled transparently. +compatibility layer. This means both an expensive high end UPS, a simple +"power strip" PDU, or any other power device can be handled transparently with +a uniform management interface. -This information is cached by the network server ``upsd``, which then +This information is cached by the network server `upsd`, which then answers queries from the clients. upsd contains a number of access control features to limit the abilities of the clients. Only authorized hosts may monitor or control your hardware if you wish. Since the notion of monitoring over the network is built into the software, you -can hang many systems off one large UPS and they will all shut down -together. You can also use NUT to power on, off or cycle your data centers -nodes, individually or globally through PDUs outlets. +can hang many systems off one large UPS, and they will all shut down +together. You can also use NUT to power on, off or cycle your data center +nodes, individually or globally through PDU outlets. -Clients such as upsmon check on the status of the hardware and do things +Clients such as `upsmon` check on the status of the hardware and do things when necessary. The most important task is shutting down the operating system cleanly before the UPS runs out of power. Other programs are -also provided to log UPS status regularly, monitor status through your +also provided to log information regularly, monitor status through your web browser, and more. -The "HAL enabled" flavor ------------------------- -This one is intended for use: - -- with supported USB UPS, -- on HAL enabled systems (Linux, FreeBSD, Sun Solaris), -- on HAL enabled desktops (Gnome and possibly KDE) - -Using this approach, you don't have to configure NUT files, nor to -manually start components, nor to install a specific NUT client. - -Upon plugging your USB UPS, the right driver will be automatically -launched, and the according Power Manager GUI will pop up. - -Note that this feature is still beta and incomplete. But it -represents a major evolution, and a huge user experience improvement! - -For more information, refer to INSTALL and docs/nut-hal.txt. - -========== Installing -========== +---------- If you are installing these programs for the first time, go read the -INSTALL file to find out how to do that. This document contains more -information on what all of this stuff does. +<<_installation_instructions,installation instructions>> +to find out how to do that. This document contains more information on what all +of this stuff does. -========= Upgrading -========= +--------- -When upgrading from an older version, always check the UPGRADING file to -see what may have changed. Compatibility issues and other changes will -be listed there to ease the process. +When upgrading from an older version, always check the +<> to see what may have +changed. Compatibility issues and other changes will be listed there to ease +the process. + + +Configuring and using +--------------------- + +Once NUT is installed, refer to the +<> for directions. -============= Documentation -============= +------------- -This file gives an overview of the software. You should read the man -pages, included example configuration files, and auxiliary documentation -for the parts that you intend to use. +This is just an overview of the software. You should read the man pages, +included example configuration files, and auxiliary documentation for the parts +that you intend to use. -=================== Network Information -=================== +------------------- These programs are designed to share information over the network. In -the examples below, ``localhost`` is used as the hostname. This can also +the examples below, `localhost` is used as the hostname. This can also be an IP address or a fully qualified domain name. You can specify a port number if your upsd process runs on another port. -In the case of the program ``upsc``, to view the variables on the UPS called -sparky on the ``upsd`` server running on the local machine, you'd do this:: +In the case of the program `upsc`, to view the variables on the UPS called +sparky on the `upsd` server running on the local machine, you'd do this: /usr/local/ups/bin/upsc sparky@localhost -The default port number is 3493. You can change this with +The default port number is 3493. You can change this with "configure --with-port" at compile-time. To make a client talk to upsd -on a specific port, add it after the hostname with a colon, like this:: +on a specific port, add it after the hostname with a colon, like this: /usr/local/ups/bin/upsc sparky@localhost:1234 This is handy when you have a mixed environment and some of the systems are on different ports. -The general form for UPS identifiers is this:: +The general form for UPS identifiers is this: [@[:]] Keep this in mind when viewing the examples below. -======== Manifest -======== +-------- This package is broken down into several categories: -- *drivers* - These programs talk directly to your UPS hardware. +- *drivers* - These programs talk directly to your UPS hardware. +- *server* - upsd serves data from the drivers to the network. +- *clients* - They talk to upsd and do things with the status data. +- *cgi-bin* - Special class of clients that you can use with your web server. +- *scripts* - Contains various scripts, like the Perl and Python binding, +integration bits and applications. -- *server* - upsd serves data from the drivers to the network. - -- *clients* - They talk to upsd and do things with the status data. - -- *cgi-bin* - Special class of clients that you can use with your web server. - - -======= Drivers -======= +------- These programs provide support for specific UPS models. They understand the protocols and port specifications which define status information @@ -146,170 +113,189 @@ and convert it to a form that upsd can understand. To configure drivers, edit ups.conf. For this example, we'll have a UPS called "sparky" that uses the apcsmart driver and is connected to -``/dev/ttyS1``. That's the second serial port on most Linux-based systems. -The entry in ``ups.conf`` looks like this:: +`/dev/ttyS1`. That's the second serial port on most Linux-based systems. +The entry in `ups.conf` looks like this: [sparky] driver = apcsmart port = /dev/ttyS1 To start and stop drivers, use upsdrvctl. By default, it will start or -stop every UPS in the config file:: +stop every UPS in the config file: /usr/local/ups/bin/upsdrvctl start /usr/local/ups/bin/upsdrvctl stop -However, you can also just start or stop one by adding its name:: +However, you can also just start or stop one by adding its name: /usr/local/ups/bin/upsdrvctl start sparky /usr/local/ups/bin/upsdrvctl stop sparky -To get the driver name for your device, refer to the below section +To find the driver name for your device, refer to the section below called "HARDWARE SUPPORT TABLE". Extra Settings --------------- +~~~~~~~~~~~~~~ Some drivers may require additional settings to properly communicate 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 apcsmart driver allows setting "cable" to "940-0095B". -To use this feature, just add another line to your ups.conf section for -that UPS:: +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 +feature, just add another line to your ups.conf section for that UPS: [sparky] - driver = apcsmart - port = /dev/ttyS1 - cable = 940-0095B + driver = usbhid-ups + port = auto + serial = 1234567890 -Hardware Support Table ----------------------- +Hardware Compatibility List +~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The NUT Hardware support table is available in the source directory: - - nut-X.Y.Z/data/driver.list - -This one should also be distributed with your favorite packages. +The <> is available in the source directory +('nut-X.Y.Z/data/driver.list'), and is generally distributed with packages. For example, it is available on Debian systems as: /usr/share/nut/driver.list -For another take on this list, try the web page: +This table is also available link:http://www.networkupstools.org/stable-hcl.html[online]. - http://random.networkupstools.org/compat/ -If your driver has vanished, see the FAQ and UPGRADING files. +If your driver has vanished, see the link:FAQ.html[FAQ] and +<>. -Generic UPS Driver ------------------- +Generic Device Drivers +~~~~~~~~~~~~~~~~~~~~~~ -The ``genericups`` driver will support many models that use the same basic +NUT provides several generic drivers that support a variety of very similar models. + +- The `genericups` driver supports many serial models that use the same basic principle to communicate with the computer. This is known as "contact closure", and basically involves raising or lowering signals to indicate power status. - ++ This type of UPS tends to be cheaper, and only provides the very simplest data about power and battery status. Advanced features like battery charge readings and such require a "smart" UPS and a driver which supports it. ++ +See the linkman:genericups[8] man page for more information. -See the genericups(8) man page for more information. +- The `usbhid-ups` driver attempts to communicate with USB HID Power Device +Class (PDC) UPSes. These units generally implement the same basic protocol, +with minor variations in the exact set of supported attributes. This driver +also applies several correction factors when the UPS firmware reports values +with incorrect scale factors. ++ +See the linkman:usbhid-ups[8] man page for more information. + +- The `blazer_ser` and `blazer_usb` drivers supports the Megatec / Q1 +protocol that is used in many brands (Blazer, Energy Sistem, Fenton +Technologies, Mustek and many others). ++ +See the linkman:blazer[8] man page for more information. + +- The `snmp-ups` driver handles various SNMP enabled devices, from many +different manufacturers. In SNMP terms, `snmp-ups` is a manager, that +monitors SNMP agents. ++ +See the linkman:snmp-ups[8] man page for more information. + +- The `powerman-pdu` is a bridge to the PowerMan daemon, thus handling all +PowerMan supported devices. The PowerMan project supports several serial +and networked PDU, along with Blade and IPMI enabled servers. ++ +See the linkman:powerman-pdu[8] man page for more +information. -There is also a document called contact-closure.txt included with the -source distribution that contains information on this kind of hardware -and details on adding additional types to the genericups driver. UPS Shutdowns -------------- +~~~~~~~~~~~~~ upsdrvctl can also shut down (power down) all of your UPS hardware. -**WARNING:** if you play around with this command, expect your filesystems -to die. Don't power off your computers unless they're ready for it:: +WARNING: if you play around with this command, expect your filesystems +to die. Don't power off your computers unless they're ready for it: /usr/local/ups/bin/upsdrvctl shutdown /usr/local/ups/bin/upsdrvctl shutdown sparky -You should read the shutdown.txt file in the docs subdirectory to -learn more about when to use this feature. If called at the wrong time, -you may cause data loss by turning off a system with a filesystem +You should read the <> +chapter to learn more about when to use this feature. If called at the wrong +time, you may cause data loss by turning off a system with a filesystem mounted read-write. +Power distribution unit management +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NUT also provides an advanced support for power distribution units. + +You should read the <> +chapter to learn more about when to use this feature. -============== Network Server -============== +-------------- -``upsd`` is responsible for passing data from the drivers to the client -programs via the network. It should be run immediately after ``upsdrvctl`` +`upsd` is responsible for passing data from the drivers to the client +programs via the network. It should be run immediately after `upsdrvctl` in your system's startup scripts. -``upsd`` should be kept running whenever possible, as it is the only source -of status information for the monitoring clients like ``upsmon``. +`upsd` should be kept running whenever possible, as it is the only source +of status information for the monitoring clients like `upsmon`. -====== -upsmon -====== +Monitoring client +----------------- -``upsmon`` provides the essential feature that you expect to find in UPS +`upsmon` provides the essential feature that you expect to find in UPS monitoring software: safe shutdowns when the power fails. In the layered scheme of NUT software, it is a client. It has this separate section in the documentation since it is so important. You configure it by telling it about UPSes that you want to monitor in -upsmon.conf. Each UPS can be defined as one of three possible types: +upsmon.conf. Each UPS can be defined as one of two possible types: -- Master +Master +~~~~~~ - This UPS supplies power to the system running upsmon, and - this system is also responsible for shutting it down when - the battery is depleted. This occurs after any slave systems - have disconnected safely. +This UPS supplies power to the system running `upsmon`, and this system is also +responsible for shutting it down when the battery is depleted. This occurs +after any slave systems have disconnected safely. - If your UPS is plugged directly into a system's serial port, - the upsmon on that system should define that UPS as a master. +If your UPS is plugged directly into a system's serial port, the `upsmon` +process on that system should define that UPS as a master. -- Slave +For a typical home user, there's one computer connected to one UPS. +That means you run a driver, `upsd`, and `upsmon` in master mode. - This UPS supplies power to the system running upsmon, but - this system can't shut it down directly. This system will - shut down the operating system before the master turns off the - power. +Slave +~~~~~ - Use this mode when you run multiple computers on the same UPS. - Obviously, only one can be connected to the serial port on the - UPS, and that system is the master. Everything else is a - slave. - -- Monitor-only +This UPS may supply power to the system running `upsmon`, but this system can't +shut it down directly. - This UPS will still generate notifications about status - changes (on battery, on line, etc.) but no shutdowns of the - local system result from critical situations on that UPS. +Use this mode when you run multiple computers on the same UPS. Obviously, only +one can be connected to the serial port on the UPS, and that system is the +master. Everything else is a slave. For a typical home user, there's one computer connected to one UPS. That means you run a driver, upsd, and upsmon in master mode. Additional Information ----------------------- +~~~~~~~~~~~~~~~~~~~~~~ More information on configuring upsmon can be found in these places: - - The man page - upsmon(8) - - - big-servers.txt in the docs subdirectory - - - shutdown.txt in the docs subdirectory - - - The stock upsmon.conf that comes with the package +- The linkman:upsmon[8] man page +- <> +- <> chapter +- The stock `upsmon.conf` that comes with the package -======= Clients -======= +------- Clients talk to upsd over the network and do useful things with the data from the drivers. There are tools for command line access, and a few @@ -319,48 +305,48 @@ programs. For more details on specific programs, refer to their man pages. upsc ----- +~~~~ -upsc is a simple client that will display the values of variables known -to upsd and your UPS drivers. It will list every variable by default, -or just one if you specify an additional argument. This can be useful -in shell scripts for monitoring something without writing your own +`upsc` is a simple client that will display the values of variables known +to `upsd` and your UPS drivers. It will list every variable by default, +or just one if you specify an additional argument. This can be useful +in shell scripts for monitoring something without writing your own network code. -upsc is a quick way to find out if your driver(s) and upsd are working -together properly. Just run upsc to see what's going on, i.e.:: +`upsc` is a quick way to find out if your driver(s) and upsd are working +together properly. Just run `upsc ` to see what's going on, i.e.: - morbo:~$ upsc su700@localhost + morbo:~$ upsc sparky@localhost ambient.humidity: 035.6 ambient.humidity.alarm.maximum: NO,NO ambient.humidity.alarm.minimum: NO,NO ambient.temperature: 25.14 + ... - [ and so on ] - -If you are interested in writing a simple client that monitors upsd, -the source code for upsc is a good way to learn about using the +If you are interested in writing a simple client that monitors `upsd`, +the source code for `upsc` is a good way to learn about using the upsclient functions. -See the upsc(8) man page for more information. +See the linkman:upsc[8] man page and +<> for more information. upslog ------- +~~~~~~ -upslog will write status information from upsd to a file at set +`upslog` will write status information from `upsd` to a file at set intervals. You can use this to generate graphs or reports with other -programs such as gnuplot. +programs such as `gnuplot`. upsrw ------ +~~~~~ -upsrw allows you to display and change the read/write variables in your +`upsrw` allows you to display and change the read/write variables in your UPS hardware. Not all devices or drivers implement this, so this may -not have any effect on your system. +not have any effect on your system. -A driver that supports read/write variables will give results like this:: +A driver that supports read/write variables will give results like this: - $ upsrw su700@localhost + $ upsrw sparky@localhost ( many skipped ) @@ -373,64 +359,66 @@ A driver that supports read/write variables will give results like this:: ( more skipped ) -On the other hand, one that doesn't support them won't print anything:: +On the other hand, one that doesn't support them won't print anything: $ upsrw fenton@gearbox ( nothing ) -upsrw requires administrator powers to change settings in the hardware. -Refer to upsd.users(5) for information on defining users in upsd. +`upsrw` requires administrator powers to change settings in the hardware. +Refer to linkman:upsd.users[5] for information on defining +users in `upsd`. upscmd ------- +~~~~~~ Some UPS hardware and drivers support the notion of an instant command - a feature such as starting a battery test, or powering off the load. You can use upscmd to list or invoke instant commands if your hardware/drivers support them. -Use the -l command to list them, like this:: +Use the -l command to list them, like this: - $ upscmd -l su700@localhost - Instant commands supported on UPS [su700@localhost]: + $ upscmd -l sparky@localhost + Instant commands supported on UPS [sparky@localhost]: load.on - Turn on the load immediately test.panel.start - Start testing the UPS panel calibrate.start - Start run time calibration calibrate.stop - Stop run time calibration + ... - [ snip ] +`upscmd` requires administrator powers to start instant commands. +To define users and passwords in `upsd`, see +linkman:upsd.users[5]. -upscmd requires administrator powers to start instant commands. -To define users and passwords in upsd, see upsd.users(5). -============ CGI Programs -============ +------------ The CGI programs are clients that run through your web server. They allow you to see UPS status and perform certain administrative commands from any web browser. Javascript and cookies are not required. These programs are not installed or compiled by default. To compile -and install them, first run 'configure --with-cgi', then do 'make' and -'make install'. If you receive errors about "gd" during configure, go +and install them, first run `configure --with-cgi`, then do `make` and +`make install`. If you receive errors about "gd" during configure, go get it and install it before continuing. You can get the source here: - http://www.boutell.com/gd/ + http://www.libgd.org/ -In the event that you need libpng or zlib in order to compile gd, +In the event that you need libpng or zlib in order to compile gd, they can be found at these URLs: http://www.libpng.org/pub/png/pngcode.html http://www.gzip.org/zlib/ + Access Restrictions -------------------- +~~~~~~~~~~~~~~~~~~~ The CGI programs use hosts.conf to see if they are allowed to talk to a host. This keeps malicious visitors from creating queries from your web @@ -440,107 +428,58 @@ If you get error messages that say "Access to that host is not authorized", you're probably missing an entry in your hosts.conf. upsstats --------- +~~~~~~~~ -upsstats generates web pages from HTML templates, and plugs in status +`upsstats` generates web pages from HTML templates, and plugs in status information in the right places. It looks like a distant relative of APC's old Powerchute interface. You can use it to monitor several systems or just focus on one. -It also can generate IMG references to upsimage. +It also can generate IMG references to `upsimage`. upsimage --------- +~~~~~~~~ This is usually called by upsstats via IMG SRC tags to draw either the utility or outgoing voltage, battery charge percent, or load percent. upsset ------- +~~~~~~ -upsset provides several useful administration functions through a web -interface. You can use upsset to kick off instant commands on your UPS +`upsset` provides several useful administration functions through a web +interface. You can use `upsset` to kick off instant commands on your UPS hardware like running a battery test. You can also use it to change variables in your UPS that accept user-specified values. -Essentially, upsset provides the functions of upsrw and upscmd, but +Essentially, `upsset` provides the functions of `upsrw` and `upscmd`, but with a happy pointy-clicky interface. -upsset will not run until you convince it that you have secured your +`upsset` will not run until you convince it that you have secured your system. You *must* secure your CGI path so that random interlopers -can't run this program remotely. See the upsset.conf file. Once you +can't run this program remotely. See the `upsset.conf` file. Once you have secured the directory, you can enable this program in that configuration file. It is not active by default. -===================== -Support / Help / etc. -===================== - -The main URL: - - http://www.networkupstools.org/ - -There is also a mailing list for general queries and discussion about -this software called nut-upsuser. It typically moves around 50-100 messages -per month at the time of this writing. To join, go to the below address and -subscribe to the desired list. - -Finally, there is a developer list called nut-upsdev. This is not -an install help list, and any such mails probably will be ignored. - -The mailing lists are archived on the web: - - http://alioth.debian.org/mail/?group_id=30602 - -Try running some searches against the archives. Many times, problems have -already been answered by someone else. Currently, there is no internal -search engine, so you will have to try with a search engine like Google. - -There is more documentation in the docs/ directory within the source -tree. Be sure to read through the files in there (especially the -FAQ) before mailing the list for help. Many times the questions have -already been answered in the files which are right in front of you. - - -=================================== -Making your own clients (upsclient) -=================================== - -The upsclient.a library can be linked into other programs to give access -to upsd and UPS status information. Clients like upsc are provided as -examples of how to retrieve data using the upsclient functions. Other -programs not included in this package may also use this library, as wmnut. - -This library file and the associated header files are not installed by -default. You must './configure --with-lib' to enable building and -installing these files. The libraries can then be build and installed -with 'make' and 'make install' as usual. This must be done before -building other (non-NUT) programs which depend on them. - -To obtain the right compilation and link flags, two helpers are provided: -one for platform providing pkg-config, and the other (libupsclient-config) -for platform not providing pkg-config. - - -================= Version Numbering -================= +----------------- The version numbers work like this: if the middle number is odd, it's a development tree, otherwise it is the stable tree. -The past stable trees were 1.0, 1.2, 1.4 and 2.0, with the latest stable tree -designated 2.2. The development trees were 1.1, 1.3, 1.5 and 2.1. +The past stable trees were 1.0, 1.2, 1.4, 2.0, 2.2 and 2.4, with the +latest stable tree designated 2.6. The development trees were 1.1, 1.3, +1.5, 2.1 and 2.3. As of the 2.4 release, there is no real development +branch anymore since the code is available through a revision control +system (namely Subversion) and snapshots. -The jump to 2.2 is mostly due to the large changes to the features list. -There have also been a number of architectural changes which may not be -noticeable to most users. +Major release jumps are mostly due to large changes to the features +list. There have also been a number of architectural changes which +may not be noticeable to most users, but which can impact developers. -==================================== Backwards and Forwards Compatibility -==================================== +------------------------------------ The old network code spans a range from about 0.41.1 when TCP support was introduced up to the recent 1.4 series. It used variable names @@ -567,21 +506,17 @@ use the new names. Here's a table to make it easier to visualize: - +--------+------------------------+ - | | Server | - +--------+-----+-----+-----+------+ - | Client | 1.0 | 1.2 | 1.4 | 2.0+ | - +========+=====+=====+=====+======+ - | 1.0 | yes | yes | yes | no | - +--------+-----+-----+-----+------+ - | 1.2 | yes | yes | yes | no | - +--------+-----+-----+-----+------+ - | 1.4 | yes | yes | yes | yes | - +--------+-----+-----+-----+------+ - | 2.0 | no | no | yes | yes | - +--------+-----+-----+-----+------+ +[options="header"] +|============================================= +| 4+| Server version +| *Client version* | 1.0 | 1.2 | 1.4 | 2.0+ +| 1.0 | yes | yes | yes | no +| 1.2 | yes | yes | yes | no +| 1.4 | yes | yes | yes | yes +| 2.0+ | no | no | yes | yes +|============================================= -Version 2.0 (and more recent) does not contain backwards compatibility for +Version 2.0, and more recent, do not contain backwards compatibility for the old protocol and variable/command names. As a result, 2.0 clients can't talk to anything older than a 1.4 server. If you ask a 2.0 client to fetch "STATUS", it will fail. You'll have to ask for "ups.status" @@ -593,67 +528,24 @@ software can easily support both versions as long as they like. If upsd returns 'ERR UNKNOWN-COMMAND' to a GET request, you need to use REQ. -========================== +Support / Help / etc. +--------------------- + +If you are in need of help, refer to the +<> in the user manual. + + Hacking / Development Info -========================== +-------------------------- -Additional documentation can be found in the docs subdirectory. +Additional documentation can be found in: -Information on creating new drivers can be found in new-drivers.txt. -Also be sure to look at skel.c and main.c. All drivers are just -collections of support functions built around a common core, so most of -the dull housekeeping work has been handled for you. - -Information on the NUT variables naming can be found in new-names.txt. -Information on the architecture and how it all fits together is in the -design.txt file. In short, there's a lot more documentation out there. - -Also be sure to read developers.txt, as it explains a lot about the -tree, including some of the functions that are provided for your use. +- the linkdoc:developer-guide[Developer Guide], +- the linkdoc:packager-guide[Packager Guide]. -================================ Acknowledgements / Contributions -================================ - -MGE UPS SYSTEMS provided extensive technical documents for their UPS product -line, along with many units for development of NUT-related projects. The -company also sponsored and later hired Arnaud Quette to further officially -support these efforts. - -Several drivers such as mge-utalk, mge-shut, snmp-ups, hidups, and usbhid-ups -are the result of this collaboration, in addition to the WMNut, MGE HID Parser -the libhid projects, .... The features page has improved artwork thanks to Luc -and Arnaud of MGE. Other client projects such as KNutClient and ups-monitor -have also received assistance. - -The master NUT site and several related projects are hosted on MGE's equipment -at no cost to the project. - -More information on their open source support can be found on their web site: -http://opensource.mgeups.com/contrib.htm - -Fenton Technologies contributed a PowerPal 660 to the project. Their open -stance and quick responses to technical inquiries are appreciated for -making the development of the fentonups driver possible. - -Bo Kersey of VirCIO (http://www.vircio.com) provided a Best Power -Fortress 750 to facilitate the bestups driver. - -Invensys Energy Systems provided the SOLA/Best "Phoenixtec" protocol -document currently residing at the following URL: - - http://random.networkupstools.org/protocols/sola.html - -PowerKinetics technical support provided documentation on their MiniCOL -protocol, which is archived in the NUT protocol library online: - - http://random.networkupstools.org/protocols/minicol/ - -Cyber Power Systems contributed a 700AVR model for testing and driver -development. - -Liebert Corporation supplied serial test boxes and a UPStation GXT2 -with the Web/SNMP card for development of the liebert driver and -expansion of the existing snmp-ups driver. +-------------------------------- +The many people who have participated in creating and improving NUT are +listed in the user manual <>. diff --git a/docs/ideas.txt b/TODO similarity index 68% rename from docs/ideas.txt rename to TODO index 5fc90f8..1c45636 100644 --- a/docs/ideas.txt +++ b/TODO @@ -1,14 +1,35 @@ -Desc: Ideas for future expansion and features -File: ideas.txt -Date: 20 October 2003 -Auth: Russell Kroll +NUT roadmap and ideas for future expansion +------------------------------------------ Here are some ideas that have come up over the years but haven't been implemented yet. This may be a good place to start if you're looking for a rainy day hacking project. + +Roadmap +~~~~~~~ + +2.6 +^^^ + +This release is focused on the website and documentation rewrite, using +the excellent link:http://www.methods.co.nz/asciidoc[AsciiDoc]. + +2.8 +^^^ + +This branch will focus on configuration and user interface improvements. + +3.0 +^^^ + +This major transition will mark the final switch to a complete power +device broker. + + + Non-network "upsmon" -==================== +~~~~~~~~~~~~~~~~~~~~ Some systems don't want a daemon listening to the network. This can be for security reasons, or perhaps because the system has been squashed @@ -20,16 +41,13 @@ This also makes monitoring extremely easy to automate - you don't need to worry about usernames, passwords or firewalling. Just start a driver and drop this program on top of it. - - Parse ups.conf and open the state socket for a driver - - - Send DUMPALL and enter a select loop - - - Parse SETINFOs that change ups.status - - - When you get OB LB, shut down +- Parse ups.conf and open the state socket for a driver +- Send DUMPALL and enter a select loop +- Parse SETINFOs that change ups.status +- When you get OB LB, shut down Completely unprivileged upsmon -============================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ upsmon currently retains root in a forked process so it can call the shutdown command. The only reason it needs root on most systems is that @@ -51,7 +69,7 @@ down the group access so only upsmon's unprivileged user can access it, and make that your SHUTDOWNCMD. Then it could drop root completely. Chrooted upsmon -=============== +~~~~~~~~~~~~~~~ upsmon could run the network monitoring part in a chroot jail if it had a pipe to another process running outside for NOTIFY dispatches. Such a @@ -64,7 +82,7 @@ All it has to do is dispatch the UPS name and event type. [start] [type] [length] [stop] Monitor program with interpreted language -========================================= +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Once in awhile, I get requests for a way to shut down based on the UPS temperature, or ambient humidity, or at a certain battery charge level, @@ -83,3 +101,18 @@ timers. Due to the expected size and limited audience for such a program, it might have to be distributed separately. + +NOTE: Python may be a good candidate. + +Sandbox +~~~~~~~ + +- check to refresh and integrate the https://alioth.debian.org/pm/?group_id=30602[tasks] list +and https://alioth.debian.org/tracker/?atid=411545&group_id=30602&func=browse[feature requests] list from Alioth +- add "Generic ?Ascii? driver": I've got to think more about that, but the recent +solar panel driver, and the powerman internal approach of a generic engine with +a scripting interface is a cool idea. +Ref http://powerman.svn.sourceforge.net/viewvc/powerman/trunk/etc/apcpdu.dev?revision=969&view=markup +- integrate the (future) new powerman LUA engine (maybe/mustbe used for the driver above?) +for native PDU support +- see how we can help and collaborate with DeviceKit-power diff --git a/UPGRADING b/UPGRADING index 63ed28d..9336069 100644 --- a/UPGRADING +++ b/UPGRADING @@ -1,373 +1,198 @@ -This file lists changes that affect users who installed older versions +ifdef::txt[] +Upgrading notes +=============== +endif::txt[] + +This file lists changes that affect users who installed older versions of this software. When upgrading from an older version, be sure to check this file to see if you need to make changes to your system. ---------------------------------------------------------------------------- -Changes from 2.4.2 to 2.4.3: - - - nothing that affects upgraded systems. - ---------------------------------------------------------------------------- -Changes from 2.4.1 to 2.4.2: - - - The default subdriver for the blazer_usb driver USB id 06da:0003 has - changed. If you use such a device and it is no longer working with this - driver, override the 'subdriver' default in 'ups.conf' (see man 8 blazer). - - NUT ACL and the allowfrom mechanism has been replaced in 2.4.0 by the LISTEN - directive and tcp-wrappers respectively. This information was missing - below, so a double note has been added. - ---------------------------------------------------------------------------- -Changes from 2.4.0 to 2.4.1: - - - nothing that affects upgraded systems. - ---------------------------------------------------------------------------- -Changes from 2.2.2 to 2.4.0: - - - The nut.conf file has been introduced to standardize startup configuration - across the various systems. - - The cpsups and nitram drivers have been replaced by the powerpanel driver, - and removed from the tree. The cyberpower driver may suffer the same in the - future. - - The al175 and energizerups drivers have been removed from the tree, since - these were tagged broken for a long time. - - Developers of external client application using libupsclient must rename - their "UPSCONN" client structure to "UPSCONN_t". - - The upsd server will now disconnect clients that remain silent for more than - 60 seconds. - - The files under scripts/python/client are distributed under GPL 3+, whereas - the rest of the files are distributed under GPL 2+. Refer to COPYING for more - information. - - The generated udev rules file has been renamed with dash only, no underscore - anymore (ie 52-nut-usbups.rules instead of 52_nut-usbups.rules) - - (Note: this has been missed at release time): The NUT internal network access - control (ACL using ACCEPT / REJECT in upsd.conf) has been replaced by - the LISTEN directive. This can also be complemented by tcp-wrappers. - Refer to upsd and upsd.conf manual pages for more information. - ---------------------------------------------------------------------------- -Changes from 2.2.1 to 2.2.2: - - - The configure option "--with-lib" has been replaced by "--with-dev". - This enable the additional build and distribution of the static - version of libupsclient, along with the pkg-config helper and manual - pages. The default configure option is to distribute only the shared - version of libupsclient. This can be overriden by using the - "--disable-shared" configure option (distribute static only binaries). - - The UPS poweroff handling of the usbhid-ups driver has been reworked. - Though regression is not expected, users of this driver are - encouraged to test this feature by calling "upsmon -c fsd" and - report any issue on the NUT mailing lists. - ---------------------------------------------------------------------------- -Changes from 2.2.0 to 2.2.1: - - - nothing that affects upgraded systems. - (The below message is repetead due to previous omission) - - Developers of external client application using libupsclient are - encouraged to rename their "UPSCONN" client structure to "UPSCONN_t" - since the former will disappear by the release of NUT 2.4. - ---------------------------------------------------------------------------- -Changes from 2.0.5 to 2.2.0: - - - users of the newhidups driver are advised that the driver name has changed - to usbhid-ups. - - users of the hidups driver must switch to usbhid-ups. - - users of the following drivers (powermust, blazer, fentonups, mustek, - esupssmart, ippon, sms) must switch to megatec, which replaces - all these drivers. Please refer to doc/megatec.txt for details. - - users of the mge-shut driver are encouraged to test newmge-shut, which - is an alternate driver scheduled to replace mge-shut, - - users of the cpsups driver are encouraged to switch to powerpanel which - is scheduled to replace cpsups, - - packagers will have to rework the whole nut packaging due to the - major changes in the build system (completely modified, and now using - automake). Refer to packaging/debian/ for an example of migration. - - specifying '-a ' is now mandatory when starting a driver manually, - ie not using upsdrvctl. - - Developers of external client application using libupsclient are - encouraged to rename the "UPSCONN" client structure to "UPSCONN_t" - since the former will disapear by the release of NUT 2.4. - ---------------------------------------------------------------------------- -Changes from 2.0.4 to 2.0.5: - - - users of the newhidups driver: the driver is now more strict about - refusing to connect to unknown devices. If your device was - previously supported, but fails to be recognized now, add - 'productid=XXXX' to ups.conf. Please report the device to the NUT - developer's mailing list. - ---------------------------------------------------------------------------- -Changes from 2.0.3 to 2.0.4: - - - nothing that affects upgraded systems. - - users of the following drivers (powermust, blazer, fentonups, mustek, - esupssmart, ippon, sms, masterguard) are encouraged to switch to megatec, - which should replace all these drivers by nut 2.2. For more information, - please refer to doc/megatec.txt - ---------------------------------------------------------------------------- -Changes from 2.0.2 to 2.0.3: - - - nothing that affects upgraded systems. - - hidups users are encouraged to switch to newhidups, as hidups will be - removed by nut 2.2. - ---------------------------------------------------------------------------- -Changes from 2.0.1 to 2.0.2: - - - The newhidups driver, which is the long run USB support approach, - needs hotplug files installed to setup the right permissions on - device file to operate. Check newhidups manual page for more information. - ---------------------------------------------------------------------------- -Changes from 2.0.0 to 2.0.1: - - - The cyberpower1100 driver is now called cpsups since it supports - more than just one model. If you use this driver, be sure to remove - the old binary and update your ups.conf 'driver=' setting with the - new name. - - - The upsstats.html template page has been changed slightly to reflect - better HTML compliance, so you may want to update your installed copy - accordingly. If you've customized your file, don't just copy the new - one over it, or your changes will be lost! - ---------------------------------------------------------------------------- -Changes from 1.4.0 to 2.0.0: - - - The sample config files are no longer installed by default. If you - want to install them, use 'make install-conf' for the main programs, - and 'make install-cgi-conf' for the CGI programs. - - - ACCESS is no longer supported in upsd.conf. Use ACCEPT and REJECT. +Changes from 2.4.3 to 2.6.0 +--------------------------- + +- users of the megatec and megatec_usb drivers must respectively switch to +blazer_ser and blazer_usb. +- users of the liebertgxt2 driver are advised that the driver name has changed +to liebert-esp2. + +Changes from 2.4.2 to 2.4.3 +--------------------------- + +- nothing that affects upgraded systems. + +Changes from 2.4.1 to 2.4.2 +--------------------------- + +- The default subdriver for the blazer_usb driver USB id 06da:0003 has changed. +If you use such a device and it is no longer working with this driver, override +the 'subdriver' default in 'ups.conf' (see man 8 blazer). +- NUT ACL and the allowfrom mechanism has been replaced in 2.4.0 by the LISTEN +directive and tcp-wrappers respectively. This information was missing below, so +a double note has been added. + +Changes from 2.4.0 to 2.4.1 +--------------------------- + +- nothing that affects upgraded systems. + +Changes from 2.2.2 to 2.4.0 +--------------------------- + +- The nut.conf file has been introduced to standardize startup configuration +across the various systems. +- The cpsups and nitram drivers have been replaced by the powerpanel driver, +and removed from the tree. The cyberpower driver may suffer the same in the +future. +- The al175 and energizerups drivers have been removed from the tree, since +these were tagged broken for a long time. +- Developers of external client application using libupsclient must rename +their "UPSCONN" client structure to "UPSCONN_t". +- The upsd server will now disconnect clients that remain silent for more than +60 seconds. +- The files under scripts/python/client are distributed under GPL 3+, whereas +the rest of the files are distributed under GPL 2+. Refer to COPYING for more +information. +- The generated udev rules file has been renamed with dash only, no underscore +anymore (ie 52-nut-usbups.rules instead of 52_nut-usbups.rules) + +Changes from 2.2.1 to 2.2.2 +--------------------------- + +- The configure option "--with-lib" has been replaced by "--with-dev". +This enable the additional build and distribution of the static +version of libupsclient, along with the pkg-config helper and manual +pages. The default configure option is to distribute only the shared +version of libupsclient. This can be overriden by using the +"--disable-shared" configure option (distribute static only binaries). +- The UPS poweroff handling of the usbhid-ups driver has been reworked. +Though regression is not expected, users of this driver are +encouraged to test this feature by calling "upsmon -c fsd" and +report any issue on the NUT mailing lists. + +Changes from 2.2.0 to 2.2.1 +--------------------------- + +- nothing that affects upgraded systems. +(The below message is repetead due to previous omission) +- Developers of external client application using libupsclient are +encouraged to rename their "UPSCONN" client structure to "UPSCONN_t" +since the former will disappear by the release of NUT 2.4. + +Changes from 2.0.5 to 2.2.0 +--------------------------- + +- users of the newhidups driver are advised that the driver name has changed +to usbhid-ups. +- users of the hidups driver must switch to usbhid-ups. +- users of the following drivers (powermust, blazer, fentonups, mustek, +esupssmart, ippon, sms) must switch to megatec, which replaces +all these drivers. Please refer to doc/megatec.txt for details. +- users of the mge-shut driver are encouraged to test newmge-shut, which +is an alternate driver scheduled to replace mge-shut, +- users of the cpsups driver are encouraged to switch to powerpanel which +is scheduled to replace cpsups, +- packagers will have to rework the whole nut packaging due to the +major changes in the build system (completely modified, and now using +automake). Refer to packaging/debian/ for an example of migration. +- specifying '-a ' is now mandatory when starting a driver manually, +ie not using upsdrvctl. +- Developers of external client application using libupsclient are +encouraged to rename the "UPSCONN" client structure to "UPSCONN_t" +since the former will disapear by the release of NUT 2.4. + +Changes from 2.0.4 to 2.0.5 +--------------------------- + +- users of the newhidups driver: the driver is now more strict about +refusing to connect to unknown devices. If your device was +previously supported, but fails to be recognized now, add +'productid=XXXX' to ups.conf. Please report the device to the NUT +developer's mailing list. + +Changes from 2.0.3 to 2.0.4 +--------------------------- + +- nothing that affects upgraded systems. +- users of the following drivers (powermust, blazer, fentonups, mustek, +esupssmart, ippon, sms, masterguard) are encouraged to switch to megatec, +which should replace all these drivers by nut 2.2. For more information, +please refer to doc/megatec.txt + +Changes from 2.0.2 to 2.0.3 +--------------------------- + +- nothing that affects upgraded systems. +- hidups users are encouraged to switch to newhidups, as hidups will be +removed by nut 2.2. + +Changes from 2.0.1 to 2.0.2 +--------------------------- + +- The newhidups driver, which is the long run USB support approach, +needs hotplug files installed to setup the right permissions on +device file to operate. Check newhidups manual page for more information. + +Changes from 2.0.0 to 2.0.1 +--------------------------- + +- The cyberpower1100 driver is now called cpsups since it supports +more than just one model. If you use this driver, be sure to remove +the old binary and update your ups.conf 'driver=' setting with the +new name. + +- The upsstats.html template page has been changed slightly to reflect +better HTML compliance, so you may want to update your installed copy +accordingly. If you've customized your file, don't just copy the new +one over it, or your changes will be lost! + +Changes from 1.4.0 to 2.0.0 +--------------------------- + +- The sample config files are no longer installed by default. If you +want to install them, use 'make install-conf' for the main programs, +and 'make install-cgi-conf' for the CGI programs. + +- ACCESS is no longer supported in upsd.conf. Use ACCEPT and REJECT. +Old way: + + ACCESS grant all adminbox + ACCESS grant all webserver + ACCESS deny all all + +New way: + + ACCEPT adminbox + ACCEPT webserver + REJECT all + +Note that ACCEPT and REJECT can take multiple arguments, so this +will also work: + + ACCEPT adminbox webserver + REJECT all + +- The drivers no longer support sddelay in ups.conf or -d on the +command line. If you need a delay after calling 'upsdrvctl +shutdown', add a call to sleep in your shutdown script. + +- The templates used by upsstats have changed considerably to reflect +the new variable names. If you use upsstats, you will need to +install new copies or edit your existing files to use the new names. + +- Nobody needed UDP mode, so it has been removed. The only users +seemed to be a few people like me with ancient asapm-ups binaries. +If you really want to run asapm-ups again, bug me for the new patch +which makes it work with upsclient. + +- 'make install-misc' is now 'make install-lib'. The misc directory +has been gone for a long time, and the target was ambiguous. +>>>>>>> switch UPGRADING information to AsciiDoc, and integrate these in the User Manual. - Old way: +- The newapc driver has been renamed to apcsmart. If you previously +used newapc, make sure you delete the old binary and fix your +ups.conf. Otherwise, you may run the old driver from 1.4. - ACCESS grant all adminbox - ACCESS grant all webserver - ACCESS deny all all - New way: +*** File trimmed here on changes from 1.2.2 to 1.4.0 *** - ACCEPT adminbox - ACCEPT webserver - REJECT all - - Note that ACCEPT and REJECT can take multiple arguments, so this - will also work: - - ACCEPT adminbox webserver - REJECT all - - - The drivers no longer support sddelay in ups.conf or -d on the - command line. If you need a delay after calling 'upsdrvctl - shutdown', add a call to sleep in your shutdown script. - - - The templates used by upsstats have changed considerably to reflect - the new variable names. If you use upsstats, you will need to - install new copies or edit your existing files to use the new names. - - - Nobody needed UDP mode, so it has been removed. The only users - seemed to be a few people like me with ancient asapm-ups binaries. - If you really want to run asapm-ups again, bug me for the new patch - which makes it work with upsclient. - - - 'make install-misc' is now 'make install-lib'. The misc directory - has been gone for a long time, and the target was ambiguous. - - - The newapc driver has been renamed to apcsmart. If you previously - used newapc, make sure you delete the old binary and fix your - ups.conf. Otherwise, you may run the old driver from 1.4. - ---------------------------------------------------------------------------- - -Changes from 1.2.2 to 1.4.0: - - - The clients no longer support the notion of a "default UPS" when - communicating with newer versions of upsd. If you leave off a UPS - name, they will fall back on compatibility mode and will use the - old variable and command names. - - That is, "upsc localhost" will give you things like STATUS, and you - have to do "upsc myups@localhost" to get the new ones like - ups.status. - - The old variable names and default UPS mode will be supported - throughout the 1.4 series to allow users to convert to the new - style. This support will be formally dropped in 2.0. - - - upsmon is part of the "no default upsname" change. You must change - the MONITOR directives in your upsmon.conf if you were using this - technique before. - - Old way: - - MONITOR bigserver 1 monuser password master - - New way: - - MONITOR myups@bigserver 1 monuser password master - - Just look at the top of ups.conf on 'bigserver' to figure out what - the first UPS is called, and stick it and a @ on that MONITOR line. - - - upsrw's appearance has changed to avoid wrapping when displaying - the new longer variable names and descriptions. It still displays - the old format when talking to an older upsd. - - To see the difference, try "upsrw localhost" and then compare it to - "upsrw myups@localhost", assuming a new version of upsd is running - on localhost. - - - upslog now uses the new variable names in the default format - string. It will still monitor the old variable names for backwards - compatibility, but you will have to specify the format string - explicitly. - - - 'make install' no longer creates the state path. Instructions for - creating it properly have been added to the INSTALL file. - - Technically, this only affects packagers, since this is the - UPGRADING file and normal users should already have a state path. - If you are a packager, you will need to add the right mkdir + chown + - chmod magic to your install process to keep things working. - - This also means that you no longer need any special permissions to - bundle this software into a package. The installer no longer - requires root now that the chown is gone. - - - configure --with-group no longer does anything useful. The programs - which will drop permissions support "-u ", and will pick up - the group id based on the values in /etc/passwd for that user name. - - configure --with-user still works as before, and provides the default - value if you don't specify another one with -u. - - - The "DROP" action in upsd.conf now behaves a little differently. - - It still causes new TCP connections to be closed without reading - from the socket, and still causes UDP datagrams to be ignored. - - The only difference is that commands that are denied after the - remote host connects will now generate an error message. Previously, - upsd would just ignore them, and the clients could get out of sync. - - DENY also has been changed slightly to silently ignore UDP packets. - - Essentially, DROP and DENY are now the same thing. If you use DROP - anywhere, you should change to DENY before it goes away in the future. - - - upsmon now requires a username on the MONITOR lines. If you have an - older installation from the 1.x era or earlier, you probably need - to convert them. - - Old way: MONITOR ups@mybox 1 mypass master - New way: MONITOR ups@mybox 1 username mypass master - - You will also have to add a [username] section to the upsd.users - with a matching password, an allowfrom value, and "upsmon master" or - "upsmon slave". - - If upsmon says the login failed due to "username required" or fails to - start, saying "Unable to use old-style MONITOR line without a username", - then you're still using the old method. - ---------------------------------------------------------------------------- - -Changes from 1.2.1 to 1.2.2: - - - upssched.conf now requires the LOCKFN directive to prevent races when - handling two events that happen at nearly the same time. - - If you use upssched, you must add this to your upssched.conf or it - will fail to run. - ---------------------------------------------------------------------------- - -Changes from 1.0.0 to 1.2.0: - - - upsct is gone. upsc now uses the new upsclient library which is - TCP only, so there is no need for a separate client for TCP polling. - - - upsct2 has been renamed to upsrw since the name was already - ambiguous and it looked even more out of place with upsct gone. - - - The multimon.cgi behavior has been absorbed into upsstats.cgi. - - - Calling upsstats.cgi with no arguments will make it render - the template file called upsstats.html in your confpath. The default - version of this file looks a lot like multimon, but is flexible. - You will have to copy this file from upsstats.html.sample to - upsstats.html the first time you install this version. - - - Calling upsstats.cgi with host= set will still render a single status - page as before, but the markup for that page now comes from - upsstats-single.html. This is also a template and may be - reconfigured to suit your needs. It must also be copied over from - the .sample filename the first time. - - - upsmon can now send a username when authenticating to upsd. It is - recommended that you change to this mode, as the old host-based - authentication is clunky and eventually will be removed. - - Old way: - - MONITOR myups@bigserver 1 blah master - - New way: - - MONITOR myups@bigserver 1 monmaster blah master - - Note that the username has been inserted between the power value and - the password. When switching to this method, be sure to add a user - to upsd.users, i.e.: - - [monmaster] - password = blah - allowfrom = localhost - upsmon master - - You still need to give the upsmon host(s) at least "monitor" access, - so don't delete those old ACCESS lines in your upsd.conf. Just - lower the access level and remove the password. - - Old way: - - ACCESS grant master localhost blah - - New way: - - ACCESS grant monitor localhost - - - The old upsfetch "library" (used loosely) has been replaced by - upsclient. This will be installed if you do "make install-misc", - but it goes into $(prefix)/lib and $(prefix)/include by default. - - The upsclient interface is not compatible with upsfetch. Old - accessory programs which linked to upsfetch will have to be updated - to work with upsclient instead. - - Existing binaries that were linked against upsfetch will still work - since the network protocol used by upsd has not changed. - - - SET and INSTCMD no longer work via host-level authentication. This - is only a meaningful change if you are using very old versions of - upscmd/upsct2/upsset.cgi, or if you're talking to upsd directly. - - You must now set a USERNAME first, and authentication will occur - through upsd.users as a result. - - This means that the "manager" level in upsd.conf ACCESS directives - is no longer meaningful, and you should remove them. - - - INSTALLROOT is no longer available for redirecting 'make install' - - use DESTDIR instead. - - - Makefile targets have been reworked to allow fine-grained control - over what happens at install-time. 'make install' and 'make - install-cgi' still do everything, but you can call subsets instead - if necessary. See ChangeLog. +For information before this point, start with version 2.4.1 and work back. diff --git a/aclocal.m4 b/aclocal.m4 index b52cc76..9da2cb1 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, -[m4_warning([this file was generated for autoconf 2.64. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. 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'.])]) @@ -144,7 +144,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], [], +m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -160,7 +160,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11])dnl +[AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1134,6 +1134,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ax_compare_version.m4]) m4_include([m4/ax_create_stdint_h.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) @@ -1141,7 +1142,7 @@ m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/nut_arg_with.m4]) -m4_include([m4/nut_check_ipv6.m4]) +m4_include([m4/nut_check_asciidoc.m4]) m4_include([m4/nut_check_libgd.m4]) m4_include([m4/nut_check_libhal.m4]) m4_include([m4/nut_check_libneon.m4]) @@ -1151,5 +1152,6 @@ m4_include([m4/nut_check_libssl.m4]) m4_include([m4/nut_check_libusb.m4]) m4_include([m4/nut_check_libwrap.m4]) m4_include([m4/nut_check_os.m4]) +m4_include([m4/nut_config_libhal.m4]) m4_include([m4/nut_report_feature.m4]) m4_include([m4/nut_type_socklen_t.m4]) diff --git a/clients/Makefile.am b/clients/Makefile.am index 59e92c7..24c11b6 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -1,9 +1,9 @@ # Network UPS Tools: clients # by default, link programs in this directory with libcommon.a -LDADD = ../common/libcommon.a libupsclient.la $(NETLIBS) +LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS) if WITH_SSL - LDADD += $(LIBSSL_LDFLAGS) + LDADD += $(LIBSSL_LIBS) endif # Avoid per-target CFLAGS, because this will prevent re-use of object @@ -35,7 +35,7 @@ upslog_SOURCES = upslog.c upsclient.h upslog.h upsmon_SOURCES = upsmon.c upsmon.h upsclient.h upssched_SOURCES = upssched.c upssched.h -upssched_LDADD = ../common/libcommon.a ../common/libparseconf.la $(NETLIBS) +upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS) upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS) @@ -48,6 +48,6 @@ upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \ libupsclient_la_SOURCES = upsclient.c upsclient.h libupsclient_la_LIBADD = ../common/libparseconf.la if WITH_SSL - libupsclient_la_LIBADD += $(LIBSSL_LDFLAGS) + libupsclient_la_LIBADD += $(LIBSSL_LIBS) endif libupsclient_la_LDFLAGS = -version-info 1:0:0 diff --git a/clients/Makefile.in b/clients/Makefile.in index 27cd0c6..d2ca2fc 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -40,7 +40,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@WITH_SSL_TRUE@am__append_1 = $(LIBSSL_LDFLAGS) +@WITH_SSL_TRUE@am__append_1 = $(LIBSSL_LIBS) @WITH_SSL_TRUE@am__append_2 = $(LIBSSL_CFLAGS) @WITH_CGI_TRUE@am__append_3 = $(LIBGD_CFLAGS) bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \ @@ -48,17 +48,18 @@ bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \ sbin_PROGRAMS = upsmon$(EXEEXT) upssched$(EXEEXT) @WITH_CGI_TRUE@cgiexec_PROGRAMS = upsstats.cgi$(EXEEXT) \ @WITH_CGI_TRUE@ upsimage.cgi$(EXEEXT) upsset.cgi$(EXEEXT) -@WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LDFLAGS) +@WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LIBS) subdir = clients DIST_COMMON = $(am__include_HEADERS_DIST) $(dist_bin_SCRIPTS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ - $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -68,6 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -115,47 +117,47 @@ PROGRAMS = $(bin_PROGRAMS) $(cgiexec_PROGRAMS) $(sbin_PROGRAMS) am_upsc_OBJECTS = upsc.$(OBJEXT) upsc_OBJECTS = $(am_upsc_OBJECTS) upsc_LDADD = $(LDADD) -upsc_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsc_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upscmd_OBJECTS = upscmd.$(OBJEXT) upscmd_OBJECTS = $(am_upscmd_OBJECTS) upscmd_LDADD = $(LDADD) -upscmd_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upscmd_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsimage_cgi_OBJECTS = upsimage.$(OBJEXT) cgilib.$(OBJEXT) upsimage_cgi_OBJECTS = $(am_upsimage_cgi_OBJECTS) -am__DEPENDENCIES_3 = ../common/libcommon.a libupsclient.la \ +am__DEPENDENCIES_3 = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) upsimage_cgi_DEPENDENCIES = $(am__DEPENDENCIES_3) \ $(am__DEPENDENCIES_1) am_upslog_OBJECTS = upslog.$(OBJEXT) upslog_OBJECTS = $(am_upslog_OBJECTS) upslog_LDADD = $(LDADD) -upslog_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upslog_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsmon_OBJECTS = upsmon.$(OBJEXT) upsmon_OBJECTS = $(am_upsmon_OBJECTS) upsmon_LDADD = $(LDADD) -upsmon_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsmon_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsrw_OBJECTS = upsrw.$(OBJEXT) upsrw_OBJECTS = $(am_upsrw_OBJECTS) upsrw_LDADD = $(LDADD) -upsrw_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsrw_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upssched_OBJECTS = upssched.$(OBJEXT) upssched_OBJECTS = $(am_upssched_OBJECTS) -upssched_DEPENDENCIES = ../common/libcommon.a \ +upssched_DEPENDENCIES = ../common/libcommon.la \ ../common/libparseconf.la $(am__DEPENDENCIES_1) am_upsset_cgi_OBJECTS = upsset.$(OBJEXT) cgilib.$(OBJEXT) upsset_cgi_OBJECTS = $(am_upsset_cgi_OBJECTS) upsset_cgi_LDADD = $(LDADD) -upsset_cgi_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsset_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsstats_cgi_OBJECTS = upsstats.$(OBJEXT) cgilib.$(OBJEXT) upsstats_cgi_OBJECTS = $(am_upsstats_cgi_OBJECTS) upsstats_cgi_LDADD = $(LDADD) -upsstats_cgi_DEPENDENCIES = ../common/libcommon.a libupsclient.la \ +upsstats_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) SCRIPTS = $(dist_bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include @@ -184,9 +186,11 @@ HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -199,8 +203,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -217,7 +223,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ HAL_FDI_PATH = @HAL_FDI_PATH@ HAL_USER = @HAL_USER@ -HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -228,22 +233,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -341,7 +346,7 @@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ # by default, link programs in this directory with libcommon.a -LDADD = ../common/libcommon.a libupsclient.la $(NETLIBS) \ +LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS) \ $(am__append_1) # Avoid per-target CFLAGS, because this will prevent re-use of object @@ -357,7 +362,7 @@ upsrw_SOURCES = upsrw.c upsclient.h upslog_SOURCES = upslog.c upsclient.h upslog.h upsmon_SOURCES = upsmon.c upsmon.h upsclient.h upssched_SOURCES = upssched.c upssched.h -upssched_LDADD = ../common/libcommon.a ../common/libparseconf.la $(NETLIBS) +upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS) upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS) upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h diff --git a/clients/upsclient.c b/clients/upsclient.c index ae29b2c..50177d1 100644 --- a/clients/upsclient.c +++ b/clients/upsclient.c @@ -298,6 +298,11 @@ int upscli_sslcert(UPSCONN_t *ups, const char *dir, const char *file, int verify static int upscli_sslinit(UPSCONN_t *ups) { +#if OPENSSL_VERSION_NUMBER >= 0x10000000L + const SSL_METHOD *ssl_method; +#else + SSL_METHOD *ssl_method; +#endif char buf[UPSCLI_NETBUF_LEN]; /* see if upsd even talks SSL/TLS */ @@ -317,10 +322,16 @@ static int upscli_sslinit(UPSCONN_t *ups) /* upsd is happy, so let's crank up the client */ - SSL_library_init(); SSL_load_error_strings(); + SSL_library_init(); - ups->ssl_ctx = SSL_CTX_new(TLSv1_client_method()); + ssl_method = TLSv1_client_method(); + + if (!ssl_method) { + return 0; + } + + ups->ssl_ctx = SSL_CTX_new(ssl_method); if (!ups->ssl_ctx) { return 0; @@ -385,14 +396,9 @@ int upscli_sslcert(UPSCONN_t *ups, const char *file, const char *path, int verif int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) { int sock_fd; -#ifndef HAVE_IPV6 - struct sockaddr_in local, server; - struct hostent *serv; -#else struct addrinfo hints, *res, *ai; char sport[NI_MAXSERV]; int v; -#endif if (!ups) { return -1; @@ -408,58 +414,6 @@ int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) return -1; } -#ifndef HAVE_IPV6 - serv = gethostbyname(host); - - if (!serv) { - struct in_addr listenaddr; - - if (!inet_aton(host, &listenaddr)) { - ups->upserror = UPSCLI_ERR_NOSUCHHOST; - return -1; - } - - serv = gethostbyaddr(&listenaddr, sizeof(listenaddr), AF_INET); - - if (!serv) { - ups->upserror = UPSCLI_ERR_NOSUCHHOST; - return -1; - } - } - - if ((sock_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - ups->upserror = UPSCLI_ERR_SOCKFAILURE; - ups->syserrno = errno; - close(sock_fd); - return -1; - } - - memset(&local, '\0', sizeof(local)); - local.sin_family = AF_INET; - local.sin_port = htons(INADDR_ANY); - - memset(&server, '\0', sizeof(server)); - server.sin_family = AF_INET; - server.sin_port = htons(port); - - memcpy(&server.sin_addr, serv->h_addr, serv->h_length); - - if (bind(sock_fd, (struct sockaddr *) &local, sizeof(local)) < 0) { - ups->upserror = UPSCLI_ERR_BINDFAILURE; - ups->syserrno = errno; - close(sock_fd); - return -1; - } - - if (connect(sock_fd, (struct sockaddr *) &server, sizeof(struct sockaddr_in)) < 0) { - ups->upserror = UPSCLI_ERR_CONNFAILURE; - ups->syserrno = errno; - close(sock_fd); - return -1; - } - - ups->fd = sock_fd; -#else snprintf(sport, sizeof(sport), "%hu", (unsigned short int)port); memset(&hints, 0, sizeof(hints)); @@ -543,7 +497,7 @@ int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) if (ups->fd < 0) { return -1; } -#endif + pconf_init(&ups->pc_ctx, NULL); ups->host = strdup(host); diff --git a/clients/upsclient.h b/clients/upsclient.h index 1b05341..55ffd29 100644 --- a/clients/upsclient.h +++ b/clients/upsclient.h @@ -26,7 +26,9 @@ #endif #ifdef __cplusplus +/* *INDENT-OFF* */ extern "C" { +/* *INDENT-ON* */ #endif #define UPSCLI_ERRBUF_LEN 256 @@ -154,13 +156,12 @@ int upscli_ssl(UPSCONN_t *ups); #define UPSCLI_CONN_TRYSSL 0x0001 /* try SSL, OK if not supported */ #define UPSCLI_CONN_REQSSL 0x0002 /* try SSL, fail if not supported */ -#ifdef HAVE_IPV6 #define UPSCLI_CONN_INET 0x0004 /* IPv4 only */ #define UPSCLI_CONN_INET6 0x0008 /* IPv6 only */ -#endif #ifdef __cplusplus +/* *INDENT-OFF* */ } +/* *INDENT-ON* */ #endif - #endif /* UPSCLIENT_H_SEEN */ diff --git a/clients/upscmd.c b/clients/upscmd.c index cba125d..c3952a1 100644 --- a/clients/upscmd.c +++ b/clients/upscmd.c @@ -152,6 +152,13 @@ static void do_cmd(char **argv, const int argc) if (upscli_readline(ups, buf, sizeof(buf)) < 0) { fatalx(EXIT_FAILURE, "Instant command failed: %s", upscli_strerror(ups)); } + + /* FUTURE: status cookies will tie in here */ + if (strncmp(buf, "OK", 2) != 0) { + fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf); + } + + fprintf(stderr, "%s\n", buf); } static void clean_exit(void) diff --git a/clients/upsimage.c b/clients/upsimage.c index 9a64463..3d6a51d 100644 --- a/clients/upsimage.c +++ b/clients/upsimage.c @@ -620,7 +620,7 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } -struct imgvar_t imgvar[] = { +imgvar_t imgvar[] = { { "input.voltage", "input.transfer.low", "input.voltage.nominal", "input.transfer.high", 0, "%.1f VAC", draw_utility }, diff --git a/clients/upsimagearg.h b/clients/upsimagearg.h index 4ecc85a..6bd5f08 100644 --- a/clients/upsimagearg.h +++ b/clients/upsimagearg.h @@ -44,7 +44,7 @@ struct { { NULL, 0, 0, 0 } }; -struct imgvar_t { +typedef struct { char *name; /* name of the UPS variable */ char *minimum; /* name of minimum value UPS variable or variable in imgarg table */ @@ -55,6 +55,6 @@ struct imgvar_t { /* pointer to drawing function */ void (*drawfunc)(double, int, int, int, int, const char*); -}; +} imgvar_t; -extern struct imgvar_t imgvar[]; +extern imgvar_t imgvar[]; diff --git a/clients/upslog.c b/clients/upslog.c index 49084b6..170a378 100644 --- a/clients/upslog.c +++ b/clients/upslog.c @@ -47,7 +47,7 @@ static sigset_t nut_upslog_sigmask; static char logbuffer[LARGEBUF], *logformat; - static struct flist_t *fhead = NULL; + static flist_t *fhead = NULL; #define DEFAULT_LOGFORMAT "%TIME @Y@m@d @H@M@S% %VAR battery.charge% " \ "%VAR input.voltage% %VAR ups.load% [%VAR ups.status%] " \ @@ -109,7 +109,7 @@ static void help(const char *prog) printf(" - Use -f \"\" so your shell doesn't break it up.\n"); printf(" -i - Time between updates, in seconds\n"); printf(" -l - Log file name, or - for stdout\n"); - printf(" -p - Base name for PID file (defaults to \"upslog\")\n"); + printf(" -p - Base name for PID file (defaults to \"%s\")\n", prog); printf(" -s - Monitor UPS - @[:]\n"); printf(" - Example: -s myups@server\n"); printf(" -u - Switch to if started as root\n"); @@ -238,7 +238,7 @@ static void print_literal(const char *arg) /* register another parsing function to be called later */ static void add_call(void (*fptr)(const char *arg), const char *arg) { - struct flist_t *tmp, *last; + flist_t *tmp, *last; tmp = last = fhead; @@ -247,7 +247,7 @@ static void add_call(void (*fptr)(const char *arg), const char *arg) tmp = tmp->next; } - tmp = xmalloc(sizeof(struct flist_t)); + tmp = xmalloc(sizeof(flist_t)); tmp->fptr = fptr; @@ -343,7 +343,7 @@ static void compile_format(void) /* go through the list of functions and call them in order */ static void run_flist(void) { - struct flist_t *tmp; + flist_t *tmp; tmp = fhead; @@ -369,18 +369,16 @@ static void run_flist(void) int main(int argc, char **argv) { int interval = 30, i; - char *prog = NULL; + const char *prog = xbasename(argv[0]); time_t now, nextpoll = 0; - const char *user = NULL; - struct passwd *new_uid = NULL; - const char *pidfilebase = "upslog"; + const char *user = NULL; + struct passwd *new_uid = NULL; + const char *pidfilebase = prog; logformat = DEFAULT_LOGFORMAT; user = RUN_AS_USER; - printf("Network UPS Tools upslog %s\n", UPS_VERSION); - - prog = argv[0]; + printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:")) != -1) { switch(i) { @@ -476,7 +474,7 @@ int main(int argc, char **argv) /* now drop root if we have it */ new_uid = get_user_pwent(user); - openlog("upslog", LOG_PID, LOG_FACILITY); + open_syslog(prog); if (logfile != stdout) background(); diff --git a/clients/upslog.h b/clients/upslog.h index 506cd15..cf06e01 100644 --- a/clients/upslog.h +++ b/clients/upslog.h @@ -1,11 +1,11 @@ /* upslog.h - table of functions for handling various logging functions */ /* function list */ -struct flist_t { +typedef struct flist_s { void (*fptr)(const char *arg); const char *arg; - struct flist_t *next; -}; + struct flist_s *next; +} flist_t; static void do_host(const char *arg); static void do_upshost(const char *arg); diff --git a/clients/upsmon.c b/clients/upsmon.c index d5566a8..fe3f5fb 100644 --- a/clients/upsmon.c +++ b/clients/upsmon.c @@ -73,9 +73,7 @@ static int userfsd = 0, use_pipe = 1, pipefd[2]; static utype_t *firstups = NULL; -#ifdef HAVE_IPV6 static int opt_af = AF_UNSPEC; -#endif /* signal handling things */ static struct sigaction sa; @@ -89,12 +87,12 @@ static sigset_t nut_upsmon_sigmask; static void setflag(int *val, int flag) { - *val = (*val |= flag); + *val |= flag; } static void clearflag(int *val, int flag) { - *val = (*val ^= (*val & flag)); + *val ^= (*val & flag); } static int flag_isset(int num, int flag) @@ -1431,13 +1429,11 @@ static int try_connect(utype_t *ups) else flags |= UPSCLI_CONN_TRYSSL; -#ifdef HAVE_IPV6 if (opt_af == AF_INET) flags |= UPSCLI_CONN_INET; if (opt_af == AF_INET6) flags |= UPSCLI_CONN_INET6; -#endif ret = upscli_connect(&ups->conn, ups->hostname, ups->port, flags); @@ -1674,10 +1670,8 @@ static void help(const char *progname) printf(" -K checks POWERDOWNFLAG, sets exit code to 0 if set\n"); printf(" -p always run privileged (disable privileged parent)\n"); printf(" -u run child as user (ignored when using -p)\n"); -#ifdef HAVE_IPV6 printf(" -4 IPv4 only\n"); printf(" -6 IPv6 only\n"); -#endif exit(EXIT_SUCCESS); } @@ -1718,16 +1712,9 @@ static void runparent(int fd) } /* fire up the split parent/child scheme */ -static void start_pipe(const char *user) +static void start_pipe(void) { int ret; - struct passwd *new_uid = NULL; - - /* default user = the --with-user value from configure */ - if (user) - new_uid = get_user_pwent(user); - else - new_uid = get_user_pwent(RUN_AS_USER); ret = pipe(pipefd); @@ -1748,11 +1735,6 @@ static void start_pipe(const char *user) } close(pipefd[0]); - - /* write the pid file now, as we will soon lose root */ - writepid("upsmon"); - - become_user(new_uid); } static void delete_ups(utype_t *target) @@ -1897,11 +1879,17 @@ static void check_parent(void) int main(int argc, char *argv[]) { - int i, cmd, checking_flag = 0; + const char *prog = xbasename(argv[0]); + int i, cmd = 0, checking_flag = 0; - cmd = 0; + printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); - printf("Network UPS Tools upsmon %s\n", UPS_VERSION); + /* if no configuration file is specified on the command line, use default */ + configfile = xmalloc(SMALLBUF); + snprintf(configfile, SMALLBUF, "%s/upsmon.conf", confpath()); + configfile = xrealloc(configfile, strlen(configfile) + 1); + + run_as_user = xstrdup(RUN_AS_USER); while ((i = getopt(argc, argv, "+Dhic:f:pu:VK46")) != -1) { switch (i) { @@ -1921,6 +1909,7 @@ int main(int argc, char *argv[]) nut_debug_level++; break; case 'f': + free(configfile); configfile = xstrdup(optarg); break; case 'h': @@ -1933,19 +1922,18 @@ int main(int argc, char *argv[]) use_pipe = 0; break; case 'u': + free(run_as_user); run_as_user = xstrdup(optarg); break; case 'V': /* just show the banner */ exit(EXIT_SUCCESS); -#ifdef HAVE_IPV6 case '4': opt_af = AF_INET; break; case '6': opt_af = AF_INET6; break; -#endif default: help(argv[0]); break; @@ -1953,21 +1941,14 @@ int main(int argc, char *argv[]) } if (cmd) { - sendsignal("upsmon", cmd); + sendsignal(prog, cmd); exit(EXIT_SUCCESS); } argc -= optind; argv += optind; - openlog("upsmon", LOG_PID, LOG_FACILITY); - - /* if no configuration file was specified on the command line, use default */ - if (!configfile) { - configfile = xmalloc(SMALLBUF); - snprintf(configfile, SMALLBUF, "%s/upsmon.conf", confpath()); - configfile = xrealloc(configfile, strlen(configfile) + 1); - } + open_syslog(prog); loadconfig(); @@ -1997,14 +1978,21 @@ int main(int argc, char *argv[]) upsdebugx(1, "debug level is '%d'", nut_debug_level); } - /* === root parent and unprivileged child split here === */ - /* only do the pipe stuff if the user hasn't disabled it */ - if (use_pipe) - start_pipe(run_as_user); - else { + if (use_pipe) { + struct passwd *new_uid = get_user_pwent(run_as_user); + + /* === root parent and unprivileged child split here === */ + start_pipe(); + + /* write the pid file now, as we will soon lose root */ + writepid(prog); + + become_user(new_uid); + } else { upslogx(LOG_INFO, "Warning: running as one big root process by request (upsmon -p)"); - writepid("upsmon"); + + writepid(prog); } /* prep our signal handlers */ @@ -2012,7 +2000,7 @@ int main(int argc, char *argv[]) /* reopen the log for the child process */ closelog(); - openlog("upsmon", LOG_PID, LOG_FACILITY); + open_syslog(prog); while (exit_flag == 0) { utype_t *ups; diff --git a/clients/upsrw.c b/clients/upsrw.c index cdc16b9..21649ff 100644 --- a/clients/upsrw.c +++ b/clients/upsrw.c @@ -26,6 +26,9 @@ #include "upsclient.h" +static char *upsname = NULL, *hostname = NULL; +static UPSCONN_t *ups = NULL; + struct list_t { char *name; struct list_t *next; @@ -33,7 +36,7 @@ struct list_t { static void usage(const char *prog) { - printf("Network UPS Tools upsrw %s\n\n", UPS_VERSION); + printf("Network UPS Tools %s %s\n\n", prog, UPS_VERSION); printf("usage: %s [-h]\n", prog); printf(" %s [-s ] [-u ] [-p ] \n\n", prog); printf("Demo program to set variables within UPS hardware.\n"); @@ -47,56 +50,45 @@ static void usage(const char *prog) printf(" UPS identifier - [@[:]]\n"); printf("\n"); printf("Call without -s to show all possible read/write variables.\n"); - - exit(EXIT_SUCCESS); } -static void clean_exit(UPSCONN_t *ups, char *upsname, char *hostname, int code) +static void clean_exit(void) { + if (ups) { + upscli_disconnect(ups); + } + free(upsname); free(hostname); - - upscli_disconnect(ups); - - exit(code); + free(ups); } -static int do_set(UPSCONN_t *ups, const char *upsname, const char *varname, - const char *newval) +static void do_set(const char *varname, const char *newval) { char buf[SMALLBUF], enc[SMALLBUF]; - snprintf(buf, sizeof(buf), "SET VAR %s %s \"%s\"\n", - upsname, varname, pconf_encode(newval, enc, sizeof(enc))); + snprintf(buf, sizeof(buf), "SET VAR %s %s \"%s\"\n", upsname, varname, pconf_encode(newval, enc, sizeof(enc))); if (upscli_sendline(ups, buf, strlen(buf)) < 0) { - fprintf(stderr, "Can't set variable: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Can't set variable: %s", upscli_strerror(ups)); } if (upscli_readline(ups, buf, sizeof(buf)) < 0) { - fprintf(stderr, "Set variable failed: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Set variable failed: %s", upscli_strerror(ups)); } /* FUTURE: status cookies will tie in here */ if (strncmp(buf, "OK", 2) != 0) { - printf("Unexpected response from upsd: %s\n", buf); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf); } - return EXIT_SUCCESS; + fprintf(stderr, "%s\n", buf); } -static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin, - const char *pass, char *upsname, char *hostname) +static void do_setvar(const char *varname, char *uin, const char *pass) { char newval[SMALLBUF], temp[SMALLBUF], user[SMALLBUF], *ptr; - struct passwd *pw; + struct passwd *pw; if (uin) { snprintf(user, sizeof(user), "%s", uin); @@ -105,22 +97,24 @@ static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin, pw = getpwuid(getuid()); - if (pw) + if (pw) { printf("Username (%s): ", pw->pw_name); - else + } else { printf("Username: "); + } if (fgets(user, sizeof(user), stdin) == NULL) { upsdebug_with_errno(LOG_INFO, "%s", __func__); } /* deal with that pesky newline */ - if (strlen(user) > 1) + if (strlen(user) > 1) { user[strlen(user) - 1] = '\0'; - else { - if (!pw) + } else { + if (!pw) { fatalx(EXIT_FAILURE, "No username available - even tried getpwuid"); - + } + snprintf(user, sizeof(user), "%s", pw->pw_name); } } @@ -130,10 +124,7 @@ static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin, pass = GETPASS("Password: " ); if (!pass) { - fprintf(stderr, "getpass failed: %s\n", - strerror(errno)); - - return EXIT_FAILURE; + fatal_with_errno(EXIT_FAILURE, "getpass failed"); } } @@ -153,116 +144,93 @@ static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin, snprintf(temp, sizeof(temp), "USERNAME %s\n", user); if (upscli_sendline(ups, temp, strlen(temp)) < 0) { - fprintf(stderr, "Can't set username: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Can't set username: %s", upscli_strerror(ups)); } if (upscli_readline(ups, temp, sizeof(temp)) < 0) { if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) { - fprintf(stderr, "Set username failed due to an " - "unknown command.\n"); - - fprintf(stderr, "You probably need to upgrade upsd.\n"); - - clean_exit(ups, upsname, hostname, EXIT_FAILURE); + fatalx(EXIT_FAILURE, "Set username failed due to an unknown command. You probably need to upgrade upsd."); } - fprintf(stderr, "Set username failed: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Set username failed: %s", upscli_strerror(ups)); } snprintf(temp, sizeof(temp), "PASSWORD %s\n", pass); if (upscli_sendline(ups, temp, strlen(temp)) < 0) { - fprintf(stderr, "Can't set password: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Can't set password: %s", upscli_strerror(ups)); } if (upscli_readline(ups, temp, sizeof(temp)) < 0) { - fprintf(stderr, "Set password failed: %s\n", - upscli_strerror(ups)); - - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Set password failed: %s", upscli_strerror(ups)); } /* no upsname means die */ if (!upsname) { - fprintf(stderr, "Error: a UPS name must be specified (upsname[@hostname[:port]])\n"); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: a UPS name must be specified (upsname[@hostname[:port]])"); } /* old variable names are no longer supported */ if (!strchr(varname, '.')) { - fprintf(stderr, "Error: old variable names are not supported\n"); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: old variable names are not supported"); } - return do_set(ups, upsname, varname, newval); -} + do_set(varname, newval); +} -static const char *get_data(const char *type, UPSCONN_t *ups, - const char *upsname, const char *varname) +static const char *get_data(const char *type, const char *varname) { int ret; unsigned int numq, numa; char **answer; - const char *query[4]; + const char *query[4]; query[0] = type; query[1] = upsname; query[2] = varname; + numq = 3; ret = upscli_get(ups, numq, query, &numa, &answer); - if ((ret < 0) || (numa < numq)) + if ((ret < 0) || (numa < numq)) { return NULL; + } /* */ return answer[3]; } -static void do_string(UPSCONN_t *ups, const char *upsname, const char *varname) +static void do_string(const char *varname) { - const char *val; + const char *val; - val = get_data("VAR", ups, upsname, varname); + val = get_data("VAR", varname); if (!val) { - fprintf(stderr, "do_string: can't get current value of %s\n", - varname); - return; + fatalx(EXIT_FAILURE, "do_string: can't get current value of %s", varname); } printf("Type: STRING\n"); printf("Value: %s\n", val); } -static void do_enum(UPSCONN_t *ups, const char *upsname, const char *varname) +static void do_enum(const char *varname) { int ret; unsigned int numq, numa; - char **answer, *val; - const char *query[4], *tmp; + char **answer, buf[SMALLBUF]; + const char *query[4], *val; /* get current value */ - tmp = get_data("VAR", ups, upsname, varname); + val = get_data("VAR", varname); - if (!tmp) { - fprintf(stderr, "do_enum: can't get current value of %s\n", - varname); - return; + if (!val) { + fatalx(EXIT_FAILURE, "do_enum: can't get current value of %s", varname); } - /* tmp is a pointer into answer - have to save it somewhere else */ - val = xstrdup(tmp); + snprintf(buf, sizeof(buf), "%s", val); query[0] = "ENUM"; query[1] = upsname; @@ -272,8 +240,7 @@ static void do_enum(UPSCONN_t *ups, const char *upsname, const char *varname) ret = upscli_list_start(ups, numq, query); if (ret < 0) { - fprintf(stderr, "Error: %s\n", upscli_strerror(ups)); - return; + fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups)); } ret = upscli_list_next(ups, numq, query, &numa, &answer); @@ -285,32 +252,27 @@ static void do_enum(UPSCONN_t *ups, const char *upsname, const char *varname) /* ENUM */ if (numa < 4) { - fprintf(stderr, "Error: insufficient data " - "(got %d args, need at least 4)\n", numa); - - free(val); - return; + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa); } printf("Option: \"%s\"", answer[3]); - if (!strcmp(answer[3], val)) + if (!strcmp(answer[3], buf)) { printf(" SELECTED"); + } printf("\n"); ret = upscli_list_next(ups, numq, query, &numa, &answer); } - - free(val); } -static void do_type(UPSCONN_t *ups, const char *upsname, const char *varname) +static void do_type(const char *varname) { int ret; unsigned int i, numq, numa; char **answer; - const char *query[4]; + const char *query[4]; query[0] = "TYPE"; query[1] = upsname; @@ -328,54 +290,54 @@ static void do_type(UPSCONN_t *ups, const char *upsname, const char *varname) for (i = 3; i < numa; i++) { if (!strcasecmp(answer[i], "ENUM")) { - do_enum(ups, upsname, varname); + do_enum(varname); return; } if (!strncasecmp(answer[i], "STRING:", 7)) { - do_string(ups, upsname, varname); + do_string(varname); return; } /* ignore this one */ - if (!strcasecmp(answer[i], "RW")) + if (!strcasecmp(answer[i], "RW")) { continue; + } printf("Type: %s (unrecognized)\n", answer[i]); } - } -static void print_rw(UPSCONN_t *ups, const char *upsname, const char *varname) +static void print_rw(const char *varname) { - const char *tmp; + const char *tmp; printf("[%s]\n", varname); - tmp = get_data("DESC", ups, upsname, varname); + tmp = get_data("DESC", varname); - if (tmp) + if (tmp) { printf("%s\n", tmp); - else + } else { printf("Description unavailable\n"); + } - do_type(ups, upsname, varname); + do_type(varname); printf("\n"); -} +} -static int print_rwlist(UPSCONN_t *ups, const char *upsname) +static void print_rwlist(void) { int ret; unsigned int numq, numa; - const char *query[2]; + const char *query[2]; char **answer; struct list_t *lhead, *llast, *ltmp, *lnext; /* the upsname is now required */ if (!upsname) { - fprintf(stderr, "Error: a UPS name must be specified (upsname[@hostname[:port]])\n"); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: a UPS name must be specified (upsname[@hostname[:port]])"); } llast = lhead = NULL; @@ -390,12 +352,10 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname) /* old upsd --> fall back on old LISTRW technique */ if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) { - fprintf(stderr, "Error: upsd is too old to support this query\n"); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: upsd is too old to support this query"); } - fprintf(stderr, "Error: %s\n", upscli_strerror(ups)); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups)); } ret = upscli_list_next(ups, numq, query, &numa, &answer); @@ -404,9 +364,7 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname) /* RW */ if (numa < 4) { - fprintf(stderr, "Error: insufficient data " - "(got %d args, need at least 4)\n", numa); - return EXIT_FAILURE; + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa); } /* sock this entry away for later */ @@ -415,10 +373,11 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname) ltmp->name = xstrdup(answer[2]); ltmp->next = NULL; - if (llast) + if (llast) { llast->next = ltmp; - else + } else { lhead = ltmp; + } llast = ltmp; @@ -432,28 +391,23 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname) while (ltmp) { lnext = ltmp->next; - print_rw(ups, upsname, ltmp->name); + print_rw(ltmp->name); free(ltmp->name); free(ltmp); ltmp = lnext; } - - return EXIT_SUCCESS; } int main(int argc, char **argv) { - int i, port, ret; - char *upsname, *hostname, *setvar, *prog; - char *password = NULL, *username = NULL; - UPSCONN_t ups; - - setvar = username = NULL; - prog = argv[0]; + int i, port; + const char *prog = xbasename(argv[0]); + char *password = NULL, *username = NULL, *setvar = NULL; while ((i = getopt(argc, argv, "+s:p:u:V")) != -1) { - switch (i) { + switch (i) + { case 's': setvar = optarg; break; @@ -464,45 +418,42 @@ int main(int argc, char **argv) username = optarg; break; case 'V': - printf("Network UPS Tools upsrw %s\n", UPS_VERSION); + printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); exit(EXIT_SUCCESS); default: usage(prog); - break; + exit(EXIT_SUCCESS); } } argc -= optind; argv += optind; - if (argc < 1) + if (argc < 1) { usage(prog); + exit(EXIT_SUCCESS); + } - upsname = hostname = NULL; + /* be a good little client that cleans up after itself */ + atexit(clean_exit); if (upscli_splitname(argv[0], &upsname, &hostname, &port) != 0) { - fprintf(stderr, "Error: invalid UPS definition. Required format: upsname[@hostname[:port]]\n"); - clean_exit(&ups, upsname, hostname, EXIT_FAILURE); + fatalx(EXIT_FAILURE, "Error: invalid UPS definition. Required format: upsname[@hostname[:port]]"); } - if (upscli_connect(&ups, hostname, port, 0) < 0) { - fprintf(stderr, "Can't connect: %s\n", upscli_strerror(&ups)); - clean_exit(&ups, upsname, hostname, EXIT_FAILURE); + ups = xcalloc(1, sizeof(*ups)); + + if (upscli_connect(ups, hostname, port, 0) < 0) { + fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups)); } - /* setting a variable? */ if (setvar) { - ret = do_setvar(&ups, setvar, username, password, upsname, - hostname); - - clean_exit(&ups, upsname, hostname, ret); + /* setting a variable */ + do_setvar(setvar, username, password); + } else { + /* if not, get the list of supported read/write variables */ + print_rwlist(); } - /* if not, get the list of supported read/write variables */ - ret = print_rwlist(&ups, upsname); - - clean_exit(&ups, upsname, hostname, ret); - - /* NOTREACHED */ - exit(EXIT_FAILURE); + exit(EXIT_SUCCESS); } diff --git a/clients/upssched.c b/clients/upssched.c index e00ae17..e707248 100644 --- a/clients/upssched.c +++ b/clients/upssched.c @@ -50,14 +50,14 @@ #include "upssched.h" #include "timehead.h" -typedef struct { +typedef struct ttype_s { char *name; time_t etime; - void *next; -} ttype_t; + struct ttype_s *next; +} ttype_t; ttype_t *thead = NULL; - static struct conn_t *connhead = NULL; + static conn_t *connhead = NULL; char *cmdscript = NULL, *pipefn = NULL, *lockfn = NULL; int verbose = 0; /* use for debugging */ @@ -300,9 +300,9 @@ static int open_sock(void) return fd; } -static void conn_del(struct conn_t *target) +static void conn_del(conn_t *target) { - struct conn_t *tmp, *last = NULL; + conn_t *tmp, *last = NULL; tmp = connhead; @@ -327,7 +327,7 @@ static void conn_del(struct conn_t *target) upslogx(LOG_ERR, "Tried to delete a bogus state connection"); } -static int send_to_one(struct conn_t *conn, const char *fmt, ...) +static int send_to_one(conn_t *conn, const char *fmt, ...) { int ret; va_list ap; @@ -354,7 +354,7 @@ static int send_to_one(struct conn_t *conn, const char *fmt, ...) static void conn_add(int sockfd) { int acc, ret; - struct conn_t *tmp, *last; + conn_t *tmp, *last; struct sockaddr_un saddr; socklen_t salen; @@ -391,7 +391,7 @@ static void conn_add(int sockfd) tmp = tmp->next; } - tmp = xmalloc(sizeof(struct conn_t)); + tmp = xmalloc(sizeof(conn_t)); tmp->fd = acc; tmp->next = NULL; @@ -405,7 +405,7 @@ static void conn_add(int sockfd) pconf_init(&tmp->ctx, NULL); } -static int sock_arg(struct conn_t *conn) +static int sock_arg(conn_t *conn) { if (conn->ctx.numargs < 1) return 0; @@ -446,7 +446,7 @@ static void log_unknown(int numarg, char **arg) upslogx(LOG_INFO, "arg %d: %s", i, arg[i]); } -static int sock_read(struct conn_t *conn) +static int sock_read(conn_t *conn) { int i, ret; char ch; @@ -494,7 +494,7 @@ static void start_daemon(int lockfd) int maxfd, pid, pipefd, ret; struct timeval tv; fd_set rfds; - struct conn_t *tmp, *tmpnext; + conn_t *tmp, *tmpnext; socklen_t fromlen; fromlen = sizeof(struct sockaddr); @@ -899,10 +899,12 @@ static void checkconf(void) int main(int argc, char **argv) { + const char *prog = xbasename(argv[0]); + verbose = 1; /* TODO: remove when done testing */ /* normally we don't have stderr, so get this going to syslog early */ - openlog("upssched", LOG_PID, LOG_DAEMON); + open_syslog(prog); syslogbit_set(); upsname = getenv("UPSNAME"); diff --git a/clients/upssched.h b/clients/upssched.h index 94be9e3..c9aca9f 100644 --- a/clients/upssched.h +++ b/clients/upssched.h @@ -7,8 +7,8 @@ #define SERIALIZE_WAIT 3 /* track client connections */ -struct conn_t { +typedef struct conn_s { int fd; PCONF_CTX_t ctx; - void *next; -}; + struct conn_s *next; +} conn_t; diff --git a/common/Makefile.am b/common/Makefile.am index 026a239..84caa0f 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -2,14 +2,15 @@ AM_CFLAGS = -I$(top_srcdir)/include -noinst_LIBRARIES = libcommon.a -libcommon_a_SOURCES = common.c state.c upsconf.c ../include/nut_version.h -libcommon_a_LIBADD = libparseconf.la - ../include/nut_version.h: FORCE (cd ../include/ && $(MAKE) $(AM_MAKEFLAGS) nut_version.h) FORCE: -noinst_LTLIBRARIES = libparseconf.la +noinst_LTLIBRARIES = libparseconf.la libcommon.la libparseconf_la_SOURCES = parseconf.c + +libcommon_la_SOURCES = common.c state.c upsconf.c ../include/nut_version.h +# ensure inclusion of local implementation of missing systems functions +# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS +libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ diff --git a/common/Makefile.in b/common/Makefile.in index 9707bd6..8006e9e 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,7 +17,6 @@ # Network UPS Tools: common - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -39,14 +38,16 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in atexit.c \ + setenv.c snprintf.c strerror.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ - $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -56,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -65,14 +67,10 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libcommon_a_AR = $(AR) $(ARFLAGS) -libcommon_a_DEPENDENCIES = libparseconf.la -am_libcommon_a_OBJECTS = common.$(OBJEXT) state.$(OBJEXT) \ - upsconf.$(OBJEXT) -libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) +libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ +am_libcommon_la_OBJECTS = common.lo state.lo upsconf.lo +libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) libparseconf_la_LIBADD = am_libparseconf_la_OBJECTS = parseconf.lo libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS) @@ -89,14 +87,16 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libcommon_a_SOURCES) $(libparseconf_la_SOURCES) -DIST_SOURCES = $(libcommon_a_SOURCES) $(libparseconf_la_SOURCES) +SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES) +DIST_SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -109,8 +109,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -127,7 +129,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ HAL_FDI_PATH = @HAL_FDI_PATH@ HAL_USER = @HAL_USER@ -HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -138,22 +139,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -250,11 +251,12 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ AM_CFLAGS = -I$(top_srcdir)/include -noinst_LIBRARIES = libcommon.a -libcommon_a_SOURCES = common.c state.c upsconf.c ../include/nut_version.h -libcommon_a_LIBADD = libparseconf.la -noinst_LTLIBRARIES = libparseconf.la +noinst_LTLIBRARIES = libparseconf.la libcommon.la libparseconf_la_SOURCES = parseconf.c +libcommon_la_SOURCES = common.c state.c upsconf.c ../include/nut_version.h +# ensure inclusion of local implementation of missing systems functions +# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS +libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ all: all-am .SUFFIXES: @@ -290,13 +292,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libcommon.a: $(libcommon_a_OBJECTS) $(libcommon_a_DEPENDENCIES) - -rm -f libcommon.a - $(libcommon_a_AR) libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD) - $(RANLIB) libcommon.a - clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ @@ -305,6 +300,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done +libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) + $(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) libparseconf.la: $(libparseconf_la_OBJECTS) $(libparseconf_la_DEPENDENCIES) $(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS) @@ -314,10 +311,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseconf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -430,7 +431,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) +all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -459,11 +460,11 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - clean-noinstLTLIBRARIES mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -509,7 +510,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -531,18 +532,17 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir 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 maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir 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 \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am ../include/nut_version.h: FORCE diff --git a/common/atexit.c b/common/atexit.c new file mode 100644 index 0000000..9279c66 --- /dev/null +++ b/common/atexit.c @@ -0,0 +1,22 @@ +/* atexit() Mark Powell */ +/* Implemented in terms of on_exit() for old BSD-style systems, like SunOS4 */ + +#include "config.h" + +#ifndef HAVE_ATEXIT + +#include + +int atexit(fn) + void (*fn)(); +{ +#ifdef HAVE_ON_EXIT + return on_exit(fn, 0); +#else + /* Choose some errno thats likely to exist on lots of systems */ + errno = EPERM; + return (-1); +#endif /* HAVE_ON_EXIT */ +} + +#endif /* HAVE_ATEXIT */ diff --git a/common/common.c b/common/common.c index a4bcaed..f443cb7 100644 --- a/common/common.c +++ b/common/common.c @@ -33,16 +33,17 @@ const char *UPS_VERSION = NUT_VERSION_MACRO; int nut_debug_level = 0; + int nut_log_level = 0; static int upslog_flags = UPSLOG_STDERR; static void xbit_set(int *val, int flag) { - *val = (*val |= flag); + *val |= flag; } static void xbit_clear(int *val, int flag) { - *val = (*val ^= (*val & flag)); + *val ^= (*val & flag); } static int xbit_test(int val, int flag) @@ -70,6 +71,44 @@ void open_syslog(const char *progname) #endif openlog(progname, opt, LOG_FACILITY); + + switch (nut_log_level) + { +#if HAVE_SETLOGMASK && HAVE_DECL_LOG_UPTO + case 7: + setlogmask(LOG_UPTO(LOG_EMERG)); /* system is unusable */ + break; + case 6: + setlogmask(LOG_UPTO(LOG_ALERT)); /* action must be taken immediately */ + break; + case 5: + setlogmask(LOG_UPTO(LOG_CRIT)); /* critical conditions */ + break; + case 4: + setlogmask(LOG_UPTO(LOG_ERR)); /* error conditions */ + break; + case 3: + setlogmask(LOG_UPTO(LOG_WARNING)); /* warning conditions */ + break; + case 2: + setlogmask(LOG_UPTO(LOG_NOTICE)); /* normal but significant condition */ + break; + case 1: + setlogmask(LOG_UPTO(LOG_INFO)); /* informational */ + break; + case 0: + setlogmask(LOG_UPTO(LOG_DEBUG)); /* debug-level messages */ + break; + default: + fatalx(EXIT_FAILURE, "Invalid log level threshold"); +#else + case 0: + break; + default: + upslogx(LOG_INFO, "Changing log level threshold not possible"); + break; +#endif + } } /* close ttys and become a daemon */ diff --git a/common/setenv.c b/common/setenv.c new file mode 100644 index 0000000..00f7a6b --- /dev/null +++ b/common/setenv.c @@ -0,0 +1,26 @@ +/* setenv.c Ben Collver */ +#ifndef HAVE_SETENV +#include +#include +#include "common.h" + +int nut_setenv(const char *name, const char *value, int overwrite) +{ + char *val; + char *buffer; + int rv; + + if (overwrite == 0) { + val = getenv(name); + if (val != NULL) { + return 0; + } + } + buffer = xmalloc(strlen(value) + strlen(name) + 2); + strcpy(buffer, name); + strcat(buffer, "="); + strcat(buffer, value); + rv = putenv(buffer); /* man putenv, do not free(buffer) */ + return (rv); +} +#endif diff --git a/common/snprintf.c b/common/snprintf.c new file mode 100644 index 0000000..a180269 --- /dev/null +++ b/common/snprintf.c @@ -0,0 +1,914 @@ +/* + * Copyright Patrick Powell 1995 + * This code is based on code written by Patrick Powell (papowell@astart.com) + * It may be used for any purpose as long as this notice remains intact + * on all source code distributions + */ + +/************************************************************** + * Original: + * Patrick Powell Tue Apr 11 09:48:21 PDT 1995 + * A bombproof version of doprnt (dopr) included. + * Sigh. This sort of thing is always nasty do deal with. Note that + * the version here does not include floating point... + * + * snprintf() is used instead of sprintf() as it does limit checks + * for string length. This covers a nasty loophole. + * + * The other functions are there to prevent NULL pointers from + * causing nast effects. + * + * More Recently: + * Brandon Long 9/15/96 for mutt 0.43 + * This was ugly. It is still ugly. I opted out of floating point + * numbers, but the formatter understands just about everything + * from the normal C string format, at least as far as I can tell from + * the Solaris 2.5 printf(3S) man page. + * + * Brandon Long 10/22/97 for mutt 0.87.1 + * Ok, added some minimal floating point support, which means this + * probably requires libm on most operating systems. Don't yet + * support the exponent (e,E) and sigfig (g,G). Also, fmtint() + * was pretty badly broken, it just wasn't being exercised in ways + * which showed it, so that's been fixed. Also, formated the code + * to mutt conventions, and removed dead code left over from the + * original. Also, there is now a builtin-test, just compile with: + * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm + * and run snprintf for results. + * + * Thomas Roessler 01/27/98 for mutt 0.89i + * The PGP code was using unsigned hexadecimal formats. + * Unfortunately, unsigned formats simply didn't work. + * + * Michael Elkins 03/05/98 for mutt 0.90.8 + * The original code assumed that both snprintf() and vsnprintf() were + * missing. Some systems only have snprintf() but not vsnprintf(), so + * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. + * + * Andrew Tridgell (tridge@samba.org) Oct 1998 + * fixed handling of %.0f + * added test for HAVE_LONG_DOUBLE + * + **************************************************************/ + +#include "config.h" + +#include +# include +#include + +#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) + +/* Define this as a fall through, HAVE_STDARG_H is probably already set */ + +#ifndef HAVE_VARARGS_H +#define HAVE_VARARGS_H +#endif + +/* varargs declarations: */ + +#if defined(HAVE_STDARG_H) +# include +# define HAVE_STDARGS /* let's hope that works everywhere (mj) */ +# define VA_LOCAL_DECL va_list ap +# define VA_START(f) va_start(ap, f) +# define VA_SHIFT(v,t) ; /* no-op for ANSI */ +# define VA_END va_end(ap) +#else +# if defined(HAVE_VARARGS_H) +# include +# undef HAVE_STDARGS +# define VA_LOCAL_DECL va_list ap +# define VA_START(f) va_start(ap) /* f is ignored! */ +# define VA_SHIFT(v,t) v = va_arg(ap,t) +# define VA_END va_end(ap) +# else +/*XX ** NO VARARGS ** XX*/ +# endif +#endif + +#ifdef HAVE_LONG_DOUBLE +#define LDOUBLE long double +#else +#define LDOUBLE double +#endif + +#ifdef HAVE_LONG_LONG_INT +#define LLONG long long +#else +#define LLONG long +#endif + +/*int snprintf (char *str, size_t count, const char *fmt, ...);*/ +/*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/ + +static void dopr (char *buffer, size_t maxlen, const char *format, + va_list args); +static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, + char *value, int flags, int min, int max); +static void fmtint (char *buffer, size_t *currlen, size_t maxlen, + long value, int base, int min, int max, int flags); +static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, + LDOUBLE fvalue, int min, int max, int flags); +static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c ); + +/* + * dopr(): poor man's version of doprintf + */ + +/* format read states */ +#define DP_S_DEFAULT 0 +#define DP_S_FLAGS 1 +#define DP_S_MIN 2 +#define DP_S_DOT 3 +#define DP_S_MAX 4 +#define DP_S_MOD 5 +#define DP_S_CONV 6 +#define DP_S_DONE 7 + +/* format flags - Bits */ +#define DP_F_MINUS (1 << 0) +#define DP_F_PLUS (1 << 1) +#define DP_F_SPACE (1 << 2) +#define DP_F_NUM (1 << 3) +#define DP_F_ZERO (1 << 4) +#define DP_F_UP (1 << 5) +#define DP_F_UNSIGNED (1 << 6) + +/* Conversion Flags */ +#define DP_C_SHORT 1 +#define DP_C_LONG 2 +#define DP_C_LDOUBLE 3 +#define DP_C_LLONG 4 + +#define char_to_int(p) ((p)- '0') +#define MAX(p,q) (((p) >= (q)) ? (p) : (q)) + +static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) +{ + char ch; + LLONG value; + LDOUBLE fvalue; + char *strvalue; + int min; + int max; + int state; + int flags; + int cflags; + size_t currlen; + + state = DP_S_DEFAULT; + currlen = flags = cflags = min = 0; + max = -1; + ch = *format++; + + while (state != DP_S_DONE) + { + if ((ch == '\0') || (currlen >= maxlen)) + state = DP_S_DONE; + + switch(state) + { + case DP_S_DEFAULT: + if (ch == '%') + state = DP_S_FLAGS; + else + dopr_outch (buffer, &currlen, maxlen, ch); + ch = *format++; + break; + case DP_S_FLAGS: + switch (ch) + { + case '-': + flags |= DP_F_MINUS; + ch = *format++; + break; + case '+': + flags |= DP_F_PLUS; + ch = *format++; + break; + case ' ': + flags |= DP_F_SPACE; + ch = *format++; + break; + case '#': + flags |= DP_F_NUM; + ch = *format++; + break; + case '0': + flags |= DP_F_ZERO; + ch = *format++; + break; + default: + state = DP_S_MIN; + break; + } + break; + case DP_S_MIN: + if (isdigit((unsigned char)ch)) + { + min = 10*min + char_to_int (ch); + ch = *format++; + } + else if (ch == '*') + { + min = va_arg (args, int); + ch = *format++; + state = DP_S_DOT; + } + else + state = DP_S_DOT; + break; + case DP_S_DOT: + if (ch == '.') + { + state = DP_S_MAX; + ch = *format++; + } + else + state = DP_S_MOD; + break; + case DP_S_MAX: + if (isdigit((unsigned char)ch)) + { + if (max < 0) + max = 0; + max = 10*max + char_to_int (ch); + ch = *format++; + } + else if (ch == '*') + { + max = va_arg (args, int); + ch = *format++; + state = DP_S_MOD; + } + else + state = DP_S_MOD; + break; + case DP_S_MOD: + switch (ch) + { + case 'h': + cflags = DP_C_SHORT; + ch = *format++; + break; + case 'l': + cflags = DP_C_LONG; + ch = *format++; + if (ch == 'l') { /* It's a long long */ + cflags = DP_C_LLONG; + ch = *format++; + } + break; + case 'L': + cflags = DP_C_LDOUBLE; + ch = *format++; + break; + default: + break; + } + state = DP_S_CONV; + break; + case DP_S_CONV: + switch (ch) + { + case 'd': + case 'i': + if (cflags == DP_C_SHORT) + value = va_arg (args, short int); + else if (cflags == DP_C_LONG) + value = va_arg (args, long int); + else if (cflags == DP_C_LLONG) + value = va_arg (args, LLONG); + else + value = va_arg (args, int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; + case 'o': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned short int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (long)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); + break; + case 'u': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned short int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; + case 'X': + flags |= DP_F_UP; + case 'x': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned short int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); + break; + case 'f': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + /* um, floating point? */ + fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); + break; + case 'E': + flags |= DP_F_UP; + case 'e': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; + case 'G': + flags |= DP_F_UP; + case 'g': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; + case 'c': + dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); + break; + case 's': + strvalue = va_arg (args, char *); + if (max < 0) + max = maxlen; /* ie, no max */ + fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); + break; + case 'p': + strvalue = va_arg (args, void *); + fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); + break; + case 'n': + if (cflags == DP_C_SHORT) + { + short int *num; + num = va_arg (args, short int *); + *num = currlen; + } + else if (cflags == DP_C_LONG) + { + long int *num; + num = va_arg (args, long int *); + *num = (long int)currlen; + } + else if (cflags == DP_C_LLONG) + { + LLONG *num; + num = va_arg (args, LLONG *); + *num = (LLONG)currlen; + } + else + { + int *num; + num = va_arg (args, int *); + *num = currlen; + } + break; + case '%': + dopr_outch (buffer, &currlen, maxlen, ch); + break; + case 'w': + /* not supported yet, treat as next char */ + ch = *format++; + break; + default: + /* Unknown, skip */ + break; + } + ch = *format++; + state = DP_S_DEFAULT; + flags = cflags = min = 0; + max = -1; + break; + case DP_S_DONE: + break; + default: + /* hmm? */ + break; /* some picky compilers need this */ + } + } + if (currlen < maxlen - 1) + buffer[currlen] = '\0'; + else + buffer[maxlen - 1] = '\0'; +} + +static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, + char *value, int flags, int min, int max) +{ + int padlen, strln; /* amount to pad */ + int cnt = 0; + + if (value == 0) + { + value = ""; + } + + for (strln = 0; value[strln]; ++strln); /* strlen */ + padlen = min - strln; + if (padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; /* Left Justify */ + + while ((padlen > 0) && (cnt < max)) + { + dopr_outch (buffer, currlen, maxlen, ' '); + --padlen; + ++cnt; + } + while (*value && (cnt < max)) + { + dopr_outch (buffer, currlen, maxlen, *value++); + ++cnt; + } + while ((padlen < 0) && (cnt < max)) + { + dopr_outch (buffer, currlen, maxlen, ' '); + ++padlen; + ++cnt; + } +} + +/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ + +static void fmtint (char *buffer, size_t *currlen, size_t maxlen, + long value, int base, int min, int max, int flags) +{ + int signvalue = 0; + unsigned long uvalue; + char convert[20]; + int place = 0; + int spadlen = 0; /* amount to space pad */ + int zpadlen = 0; /* amount to zero pad */ + int caps = 0; + + if (max < 0) + max = 0; + + uvalue = value; + + if(!(flags & DP_F_UNSIGNED)) + { + if( value < 0 ) { + signvalue = '-'; + uvalue = -value; + } + else + if (flags & DP_F_PLUS) /* Do a sign (+/i) */ + signvalue = '+'; + else + if (flags & DP_F_SPACE) + signvalue = ' '; + } + + if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ + + do { + convert[place++] = + (caps? "0123456789ABCDEF":"0123456789abcdef") + [uvalue % (unsigned)base ]; + uvalue = (uvalue / (unsigned)base ); + } while(uvalue && (place < 20)); + if (place == 20) place--; + convert[place] = 0; + + zpadlen = max - place; + spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); + if (zpadlen < 0) zpadlen = 0; + if (spadlen < 0) spadlen = 0; + if (flags & DP_F_ZERO) + { + zpadlen = MAX(zpadlen, spadlen); + spadlen = 0; + } + if (flags & DP_F_MINUS) + spadlen = -spadlen; /* Left Justifty */ + +#ifdef DEBUG_SNPRINTF + printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", + zpadlen, spadlen, min, max, place); +#endif + + /* Spaces */ + while (spadlen > 0) + { + dopr_outch (buffer, currlen, maxlen, ' '); + --spadlen; + } + + /* Sign */ + if (signvalue) + dopr_outch (buffer, currlen, maxlen, signvalue); + + /* Zeros */ + if (zpadlen > 0) + { + while (zpadlen > 0) + { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + } + + /* Digits */ + while (place > 0) + dopr_outch (buffer, currlen, maxlen, convert[--place]); + + /* Left Justified spaces */ + while (spadlen < 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + ++spadlen; + } +} + +static LDOUBLE abs_val (LDOUBLE value) +{ + LDOUBLE result = value; + + if (value < 0) + result = -value; + + return result; +} + +static LDOUBLE pow10 (int exp) +{ + LDOUBLE result = 1; + + while (exp) + { + result *= 10; + exp--; + } + + return result; +} + +static long round (LDOUBLE value) +{ + long intpart; + + intpart = (long)value; + value = value - intpart; + if (value >= 0.5) + intpart++; + + return intpart; +} + +static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, + LDOUBLE fvalue, int min, int max, int flags) +{ + int signvalue = 0; + LDOUBLE ufvalue; +#ifndef HAVE_FCVT + char iconvert[20]; + char fconvert[20]; +#else + char iconvert[311]; + char fconvert[311]; + char *result; + int dec_pt, sig; + int r_length; +# ifdef HAVE_FCVTL + extern char *fcvtl(long double value, int ndigit, int *decpt, int *sign); +# else + extern char *fcvt(double value, int ndigit, int *decpt, int *sign); +# endif +#endif + int iplace = 0; + int fplace = 0; + int padlen = 0; /* amount to pad */ + int zpadlen = 0; + int caps = 0; + long intpart; + long fracpart; + + /* + * AIX manpage says the default is 0, but Solaris says the default + * is 6, and sprintf on AIX defaults to 6 + */ + if (max < 0) + max = 6; + + ufvalue = abs_val (fvalue); + + if (fvalue < 0) + signvalue = '-'; + else + if (flags & DP_F_PLUS) /* Do a sign (+/i) */ + signvalue = '+'; + else + if (flags & DP_F_SPACE) + signvalue = ' '; + +#if 0 + if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ +#endif + +#ifndef HAVE_FCVT + intpart = (long)ufvalue; + + /* + * Sorry, we only support 9 digits past the decimal because of our + * conversion method + */ + if (max > 9) + max = 9; + + /* We "cheat" by converting the fractional part to integer by + * multiplying by a factor of 10 + */ + fracpart = round ((pow10 (max)) * (ufvalue - intpart)); + + if (fracpart >= pow10 (max)) + { + intpart++; + fracpart -= pow10 (max); + } + +#ifdef DEBUG_SNPRINTF + printf("fmtfp: %g %d.%d min=%d max=%d\n", + (double)fvalue, intpart, fracpart, min, max); +#endif + + /* Convert integer part */ + do { + iconvert[iplace++] = + (caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10]; + intpart = (intpart / 10); + } while(intpart && (iplace < 20)); + if (iplace == 20) iplace--; + iconvert[iplace] = 0; + + /* Convert fractional part */ + do { + fconvert[fplace++] = + (caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10]; + fracpart = (fracpart / 10); + } while(fracpart && (fplace < 20)); + if (fplace == 20) fplace--; + fconvert[fplace] = 0; +#else /* use fcvt() */ + if (max > 310) + max = 310; +# ifdef HAVE_FCVTL + result = fcvtl(ufvalue, max, &dec_pt, &sig); +# else + result = fcvt(ufvalue, max, &dec_pt, &sig); +# endif + + r_length = strlen(result); + + /* + * Fix broken fcvt implementation returns.. + */ + + if (r_length == 0) + { + result[0] = '0'; + result[1] = '\0'; + r_length = 1; + } + + if ( r_length < dec_pt ) + dec_pt = r_length; + + if (dec_pt <= 0) { + iplace = 1; + iconvert[0] = '0'; + iconvert[1] = '\0'; + + fplace = 0; + + while(r_length) + fconvert[fplace++] = result[--r_length]; + + while ((dec_pt < 0) && (fplace < max)) { + fconvert[fplace++] = '0'; + dec_pt++; + } + } else { + int c; + + iplace=0; + for(c=dec_pt; c; iconvert[iplace++] = result[--c]) + ; + iconvert[iplace] = '\0'; + + result += dec_pt; + fplace = 0; + + for(c=(r_length-dec_pt); c; fconvert[fplace++] = result[--c]) + ; + } +#endif /* fcvt */ + + /* -1 for decimal point, another -1 if we are printing a sign */ + padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); + zpadlen = max - fplace; + if (zpadlen < 0) + zpadlen = 0; + if (padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; /* Left Justifty */ + + if ((flags & DP_F_ZERO) && (padlen > 0)) + { + if (signvalue) + { + dopr_outch (buffer, currlen, maxlen, signvalue); + --padlen; + signvalue = 0; + } + while (padlen > 0) + { + dopr_outch (buffer, currlen, maxlen, '0'); + --padlen; + } + } + while (padlen > 0) + { + dopr_outch (buffer, currlen, maxlen, ' '); + --padlen; + } + if (signvalue) + dopr_outch (buffer, currlen, maxlen, signvalue); + + while (iplace > 0) + dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); + + +#ifdef DEBUG_SNPRINTF + printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); +#endif + + /* + * Decimal point. This should probably use locale to find the correct + * char to print out. + */ + if (max > 0) { + dopr_outch (buffer, currlen, maxlen, '.'); + + while (fplace > 0) + dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); + } + + while (zpadlen > 0) + { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + + while (padlen < 0) + { + dopr_outch (buffer, currlen, maxlen, ' '); + ++padlen; + } +} + +static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c) +{ + if (*currlen < maxlen) + buffer[(*currlen)++] = c; +} +#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ + +#ifndef HAVE_VSNPRINTF + int vsnprintf (char *str, size_t count, const char *fmt, va_list args) +{ + str[0] = 0; + dopr(str, count, fmt, args); + return(strlen(str)); +} +#endif /* !HAVE_VSNPRINTF */ + +#ifndef HAVE_SNPRINTF +/* VARARGS3 */ +#ifdef HAVE_STDARGS + int snprintf (char *str,size_t count,const char *fmt,...) +#else + int snprintf (va_alist) va_dcl +#endif +{ +#ifndef HAVE_STDARGS + char *str; + size_t count; + char *fmt; +#endif + VA_LOCAL_DECL; + + VA_START (fmt); + VA_SHIFT (str, char *); + VA_SHIFT (count, size_t ); + VA_SHIFT (fmt, char *); + (void) vsnprintf(str, count, fmt, ap); + VA_END; + return(strlen(str)); +} + + +#else + /* keep compilers happy about empty files */ + void dummy_snprintf(void) {} +#endif /* !HAVE_SNPRINTF */ + +#ifdef TEST_SNPRINTF +#ifndef LONG_STRING +#define LONG_STRING 1024 +#endif + int main (void) +{ + char buf1[LONG_STRING]; + char buf2[LONG_STRING]; + char *fp_fmt[] = { + "%-1.5f", + "%1.5f", + "%123.9f", + "%10.5f", + "% 10.5f", + "%+22.9f", + "%+4.9f", + "%01.3f", + "%4f", + "%3.1f", + "%3.2f", + "%.0f", + "%.1f", + NULL + }; + double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, + 0.9996, 1.996, 4.136, 6442452944.1234, 0}; + char *int_fmt[] = { + "%-1.5d", + "%1.5d", + "%123.9d", + "%5.5d", + "%10.5d", + "% 10.5d", + "%+22.33d", + "%01.3d", + "%4d", + NULL + }; + long int_nums[] = { -1, 134, 91340, 341, 0203, 0}; + int x, y; + int fail = 0; + int num = 0; + + printf ("Testing snprintf format codes against system sprintf...\n"); + + for (x = 0; fp_fmt[x] != NULL ; x++) + for (y = 0; fp_nums[y] != 0 ; y++) + { + snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]); + sprintf (buf2, fp_fmt[x], fp_nums[y]); + if (strcmp (buf1, buf2)) + { + printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", + fp_fmt[x], buf1, buf2); + fail++; + } + num++; + } + + for (x = 0; int_fmt[x] != NULL ; x++) + for (y = 0; int_nums[y] != 0 ; y++) + { + snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]); + sprintf (buf2, int_fmt[x], int_nums[y]); + if (strcmp (buf1, buf2)) + { + printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", + int_fmt[x], buf1, buf2); + fail++; + } + num++; + } + printf ("%d tests failed out of %d.\n", fail, num); +} +#endif /* SNPRINTF_TEST */ + diff --git a/common/state.c b/common/state.c index 42d77d6..0e728a7 100644 --- a/common/state.c +++ b/common/state.c @@ -30,7 +30,7 @@ #include "state.h" #include "parseconf.h" -static void val_escape(struct st_tree_t *node) +static void val_escape(st_tree_t *node) { char etmp[ST_MAX_VALUE_LEN]; @@ -53,7 +53,7 @@ static void val_escape(struct st_tree_t *node) node->val = node->safe; } -static void st_tree_enum_free(struct enum_t *list) +static void st_tree_enum_free(enum_t *list) { if (!list) { return; @@ -66,7 +66,7 @@ static void st_tree_enum_free(struct enum_t *list) } /* free all memory associated with a node */ -static void st_tree_node_free(struct st_tree_t *node) +static void st_tree_node_free(st_tree_t *node) { free(node->var); free(node->raw); @@ -82,7 +82,7 @@ static void st_tree_node_free(struct st_tree_t *node) } /* add a subtree to another subtree */ -static void st_tree_node_add(struct st_tree_t **nptr, struct st_tree_t *sptr) +static void st_tree_node_add(st_tree_t **nptr, st_tree_t *sptr) { if (!sptr) { return; @@ -90,7 +90,7 @@ static void st_tree_node_add(struct st_tree_t **nptr, struct st_tree_t *sptr) while (*nptr) { - struct st_tree_t *node = *nptr; + st_tree_t *node = *nptr; if (strcasecmp(node->var, sptr->var) > 0) { nptr = &node->left; @@ -110,11 +110,11 @@ static void st_tree_node_add(struct st_tree_t **nptr, struct st_tree_t *sptr) } /* remove a variable from a tree */ -int state_delinfo(struct st_tree_t **nptr, const char *var) +int state_delinfo(st_tree_t **nptr, const char *var) { while (*nptr) { - struct st_tree_t *node = *nptr; + st_tree_t *node = *nptr; if (strcasecmp(node->var, var) > 0) { nptr = &node->left; @@ -142,11 +142,11 @@ int state_delinfo(struct st_tree_t **nptr, const char *var) /* interface */ -int state_setinfo(struct st_tree_t **nptr, const char *var, const char *val) +int state_setinfo(st_tree_t **nptr, const char *var, const char *val) { while (*nptr) { - struct st_tree_t *node = *nptr; + st_tree_t *node = *nptr; if (strcasecmp(node->var, var) > 0) { nptr = &node->left; @@ -193,9 +193,9 @@ int state_setinfo(struct st_tree_t **nptr, const char *var, const char *val) return 1; /* added */ } -static int st_tree_enum_add(struct enum_t **list, const char *enc) +static int st_tree_enum_add(enum_t **list, const char *enc) { - struct enum_t *item; + enum_t *item; while (*list) { @@ -217,9 +217,9 @@ static int st_tree_enum_add(struct enum_t **list, const char *enc) return 1; /* added */ } -int state_addenum(struct st_tree_t *root, const char *var, const char *val) +int state_addenum(st_tree_t *root, const char *var, const char *val) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; char enc[ST_MAX_VALUE_LEN]; /* find the tree node for var */ @@ -237,9 +237,9 @@ int state_addenum(struct st_tree_t *root, const char *var, const char *val) return st_tree_enum_add(&sttmp->enum_list, enc); } -int state_setaux(struct st_tree_t *root, const char *var, const char *auxs) +int state_setaux(st_tree_t *root, const char *var, const char *auxs) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; int aux; /* find the tree node for var */ @@ -263,9 +263,9 @@ int state_setaux(struct st_tree_t *root, const char *var, const char *auxs) return 1; } -const char *state_getinfo(struct st_tree_t *root, const char *var) +const char *state_getinfo(st_tree_t *root, const char *var) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -277,9 +277,9 @@ const char *state_getinfo(struct st_tree_t *root, const char *var) return sttmp->val; } -int state_getflags(struct st_tree_t *root, const char *var) +int state_getflags(st_tree_t *root, const char *var) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -291,9 +291,9 @@ int state_getflags(struct st_tree_t *root, const char *var) return sttmp->flags; } -int state_getaux(struct st_tree_t *root, const char *var) +int state_getaux(st_tree_t *root, const char *var) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -305,9 +305,9 @@ int state_getaux(struct st_tree_t *root, const char *var) return sttmp->aux; } -const struct enum_t *state_getenumlist(struct st_tree_t *root, const char *var) +const enum_t *state_getenumlist(st_tree_t *root, const char *var) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -319,10 +319,10 @@ const struct enum_t *state_getenumlist(struct st_tree_t *root, const char *var) return sttmp->enum_list; } -void state_setflags(struct st_tree_t *root, const char *var, int numflags, char **flag) +void state_setflags(st_tree_t *root, const char *var, int numflags, char **flag) { int i; - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -351,9 +351,9 @@ void state_setflags(struct st_tree_t *root, const char *var, int numflags, char } } -int state_addcmd(struct cmdlist_t **list, const char *cmd) +int state_addcmd(cmdlist_t **list, const char *cmd) { - struct cmdlist_t *item; + cmdlist_t *item; while (*list) { @@ -380,7 +380,7 @@ int state_addcmd(struct cmdlist_t **list, const char *cmd) return 1; /* added */ } -void state_infofree(struct st_tree_t *node) +void state_infofree(st_tree_t *node) { if (!node) { return; @@ -392,7 +392,7 @@ void state_infofree(struct st_tree_t *node) st_tree_node_free(node); } -void state_cmdfree(struct cmdlist_t *list) +void state_cmdfree(cmdlist_t *list) { if (!list) { return; @@ -404,11 +404,11 @@ void state_cmdfree(struct cmdlist_t *list) free(list); } -int state_delcmd(struct cmdlist_t **list, const char *cmd) +int state_delcmd(cmdlist_t **list, const char *cmd) { while (*list) { - struct cmdlist_t *item = *list; + cmdlist_t *item = *list; if (strcasecmp(item->name, cmd) > 0) { /* not found */ @@ -433,11 +433,11 @@ int state_delcmd(struct cmdlist_t **list, const char *cmd) return 0; /* not found */ } -static int st_tree_del_enum(struct enum_t **list, const char *val) +static int st_tree_del_enum(enum_t **list, const char *val) { while (*list) { - struct enum_t *item = *list; + enum_t *item = *list; /* if this is not the right value, go on to the next */ if (strcasecmp(item->val, val)) { @@ -457,9 +457,9 @@ static int st_tree_del_enum(struct enum_t **list, const char *val) return 0; /* not found */ } -int state_delenum(struct st_tree_t *root, const char *var, const char *val) +int state_delenum(st_tree_t *root, const char *var, const char *val) { - struct st_tree_t *sttmp; + st_tree_t *sttmp; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -471,7 +471,7 @@ int state_delenum(struct st_tree_t *root, const char *var, const char *val) return st_tree_del_enum(&sttmp->enum_list, val); } -struct st_tree_t *state_tree_find(struct st_tree_t *node, const char *var) +st_tree_t *state_tree_find(st_tree_t *node, const char *var) { while (node) { diff --git a/common/strerror.c b/common/strerror.c new file mode 100644 index 0000000..b5cecb9 --- /dev/null +++ b/common/strerror.c @@ -0,0 +1,503 @@ +/* strerror() Mark Powell */ +/* Simple implementation derived from libiberty */ + +#include "config.h" + +#ifndef HAVE_STRERROR + +#include + +char *strerror(int errnum) +{ + static char buf[32]; + + switch (errnum) { +#if defined (EPERM) + case EPERM: + return "Not owner"; +#endif +#if defined (ENOENT) + case ENOENT: + return "No such file or directory"; +#endif +#if defined (ESRCH) + case ESRCH: + return "No such process"; +#endif +#if defined (EINTR) + case EINTR: + return "Interrupted system call"; +#endif +#if defined (EIO) + case EIO: + return "I/O error"; +#endif +#if defined (ENXIO) + case ENXIO: + return "No such device or address"; +#endif +#if defined (E2BIG) + return "Arg list too long"; +#endif +#if defined (ENOEXEC) + case ENOEXEC: + return "Exec format error"; +#endif +#if defined (EBADF) + case EBADF: + return "Bad file number"; +#endif +#if defined (ECHILD) + case ECHILD: + return "No child processes"; +#endif +#if defined (EWOULDBLOCK) /* Put before EAGAIN, sometimes aliased */ + case EWOULDBLOCK: + return "Operation would block"; +#endif +#if defined (EAGAIN) +#if defined (EWOULDBLOCK) && EAGAIN != EWOULDBLOCK + case EAGAIN: + return "No more processes"; +#endif +#endif +#if defined (ENOMEM) + case ENOMEM: + return "Not enough space"; +#endif +#if defined (EACCES) + case EACCES: + return "Permission denied"; +#endif +#if defined (EFAULT) + case EFAULT: + return "Bad address"; +#endif +#if defined (ENOTBLK) + case ENOTBLK: + return "Block device required"; +#endif +#if defined (EBUSY) + case EBUSY: + return "Device busy"; +#endif +#if defined (EEXIST) + case EEXIST: + return "File exists"; +#endif +#if defined (EXDEV) + case EXDEV: + return "Cross-device link"; +#endif +#if defined (ENODEV) + case ENODEV: + return "No such device"; +#endif +#if defined (ENOTDIR) + case ENOTDIR: + return "Not a directory"; +#endif +#if defined (EISDIR) + case EISDIR: + return "Is a directory"; +#endif +#if defined (EINVAL) + case EINVAL: + return "Invalid argument"; +#endif +#if defined (ENFILE) + case ENFILE: + return "File table overflow"; +#endif +#if defined (EMFILE) + case EMFILE: + return "Too many open files"; +#endif +#if defined (ENOTTY) + case ENOTTY: + return "Not a typewriter"; +#endif +#if defined (ETXTBSY) + case ETXTBSY: + return "Text file busy"; +#endif +#if defined (EFBIG) + case EFBIG: + return "File too large"; +#endif +#if defined (ENOSPC) + case ENOSPC: + return "No space left on device"; +#endif +#if defined (ESPIPE) + case ESPIPE: + return "Illegal seek"; +#endif +#if defined (EROFS) + case EROFS: + return "Read-only file system"; +#endif +#if defined (EMLINK) + case EMLINK: + return "Too many links"; +#endif +#if defined (EPIPE) + case EPIPE: + return "Broken pipe"; +#endif +#if defined (EDOM) + case EDOM: + return "Math argument out of domain of func"; +#endif +#if defined (ERANGE) + case ERANGE: + return "Math result not representable"; +#endif +#if defined (ENOMSG) + case ENOMSG: + return "No message of desired type"; +#endif +#if defined (EIDRM) + case EIDRM: + return "Identifier removed"; +#endif +#if defined (ECHRNG) + case ECHRNG: + return "Channel number out of range"; +#endif +#if defined (EL2NSYNC) + return "Level 2 not synchronized"; +#endif +#if defined (EL3HLT) + return "Level 3 halted"; +#endif +#if defined (EL3RST) + return "Level 3 reset"; +#endif +#if defined (ELNRNG) + case ELNRNG: + return "Link number out of range"; +#endif +#if defined (EUNATCH) + case EUNATCH: + return "Protocol driver not attached"; +#endif +#if defined (ENOCSI) + case ENOCSI: + return "No CSI structure available"; +#endif +#if defined (EL2HLT) + return "Level 2 halted"; +#endif +#if defined (EDEADLK) + case EDEADLK: + return "Deadlock condition"; +#endif +#if defined (ENOLCK) + case ENOLCK: + return "No record locks available"; +#endif +#if defined (EBADE) + case EBADE: + return "Invalid exchange"; +#endif +#if defined (EBADR) + case EBADR: + return "Invalid request descriptor"; +#endif +#if defined (EXFULL) + case EXFULL: + return "Exchange full"; +#endif +#if defined (ENOANO) + case ENOANO: + return "No anode"; +#endif +#if defined (EBADRQC) + case EBADRQC: + return "Invalid request code"; +#endif +#if defined (EBADSLT) + case EBADSLT: + return "Invalid slot"; +#endif +#if defined (EDEADLOCK) + case EDEADLOCK: + return "File locking deadlock error"; +#endif +#if defined (EBFONT) + case EBFONT: + return "Bad font file format"; +#endif +#if defined (ENOSTR) + case ENOSTR: + return "Device not a stream"; +#endif +#if defined (ENODATA) + case ENODATA: + return "No data available"; +#endif +#if defined (ETIME) + case ETIME: + return "Timer expired"; +#endif +#if defined (ENOSR) + case ENOSR: + return "Out of streams resources"; +#endif +#if defined (ENONET) + case ENONET: + return "Machine is not on the network"; +#endif +#if defined (ENOPKG) + case ENOPKG: + return "Package not installed"; +#endif +#if defined (EREMOTE) + case EREMOTE: + return "Object is remote"; +#endif +#if defined (ENOLINK) + case ENOLINK: + return "Link has been severed"; +#endif +#if defined (EADV) + case EADV: + return "Advertise error"; +#endif +#if defined (ESRMNT) + case ESRMNT: + return "Srmount error"; +#endif +#if defined (ECOMM) + case ECOMM: + return "Communication error on send"; +#endif +#if defined (EPROTO) + case EPROTO: + return "Protocol error"; +#endif +#if defined (EMULTIHOP) + case EMULTIHOP: + return "Multihop attempted"; +#endif +#if defined (EDOTDOT) + case EDOTDOT: + return "RFS specific error"; +#endif +#if defined (EBADMSG) + case EBADMSG: + return "Not a data message"; +#endif +#if defined (ENAMETOOLONG) + case ENAMETOOLONG: + return "File name too long"; +#endif +#if defined (EOVERFLOW) + case EOVERFLOW: + return "Value too large for defined data type"; +#endif +#if defined (ENOTUNIQ) + case ENOTUNIQ: + return "Name not unique on network"; +#endif +#if defined (EBADFD) + case EBADFD: + return "File descriptor in bad state"; +#endif +#if defined (EREMCHG) + case EREMCHG: + return "Remote address changed"; +#endif +#if defined (ELIBACC) + case ELIBACC: + return "Can not access a needed shared library"; +#endif +#if defined (ELIBBAD) + case ELIBBAD: + return "Accessing a corrupted shared library"; +#endif +#if defined (ELIBSCN) + case ELIBSCN: + return ".lib section in a.out corrupted"; +#endif +#if defined (ELIBMAX) + case ELIBMAX: + return "Attempting to link in too many shared libraries"; +#endif +#if defined (ELIBEXEC) + case ELIBEXEC: + return "Cannot exec a shared library directly"; +#endif +#if defined (EILSEQ) + case EILSEQ: + return "Illegal byte sequence"; +#endif +#if defined (ENOSYS) + case ENOSYS: + return "Operation not applicable"; +#endif +#if defined (ELOOP) + case ELOOP: + return "Too many symbolic links encountered"; +#endif +#if defined (ERESTART) + case ERESTART: + return "Interrupted system call should be restarted"; +#endif +#if defined (ESTRPIPE) + case ESTRPIPE: + return "Streams pipe error"; +#endif +#if defined (ENOTEMPTY) + case ENOTEMPTY: + return "Directory not empty"; +#endif +#if defined (EUSERS) + case EUSERS: + return "Too many users"; +#endif +#if defined (ENOTSOCK) + case ENOTSOCK: + return "Socket operation on non-socket"; +#endif +#if defined (EDESTADDRREQ) + case EDESTADDRREQ: + return "Destination address required"; +#endif +#if defined (EMSGSIZE) + case EMSGSIZE: + return "Message too long"; +#endif +#if defined (EPROTOTYPE) + case EPROTOTYPE: + return "Protocol wrong type for socket"; +#endif +#if defined (ENOPROTOOPT) + case ENOPROTOOPT: + return "Protocol not available"; +#endif +#if defined (EPROTONOSUPPORT) + case EPROTONOSUPPORT: + return "Protocol not supported"; +#endif +#if defined (ESOCKTNOSUPPORT) + case ESOCKTNOSUPPORT: + return "Socket type not supported"; +#endif +#if defined (EOPNOTSUPP) + case EOPNOTSUPP: + return "Operation not supported on transport endpoint"; +#endif +#if defined (EPFNOSUPPORT) + case EPFNOSUPPORT: + return "Protocol family not supported"; +#endif +#if defined (EAFNOSUPPORT) + case EAFNOSUPPORT: + return "Address family not supported by protocol"; +#endif +#if defined (EADDRINUSE) + case EADDRINUSE: + return "Address already in use"; +#endif +#if defined (EADDRNOTAVAIL) + case EADDRNOTAVAIL: + return "Cannot assign requested address"; +#endif +#if defined (ENETDOWN) + case ENETDOWN: + return "Network is down"; +#endif +#if defined (ENETUNREACH) + case ENETUNREACH: + return "Network is unreachable"; +#endif +#if defined (ENETRESET) + case ENETRESET: + return "Network dropped connection because of reset"; +#endif +#if defined (ECONNABORTED) + case ECONNABORTED: + return "Software caused connection abort"; +#endif +#if defined (ECONNRESET) + case ECONNRESET: + return "Connection reset by peer"; +#endif +#if defined (ENOBUFS) + case ENOBUFS: + return "No buffer space available"; +#endif +#if defined (EISCONN) + case EISCONN: + return "Transport endpoint is already connected"; +#endif +#if defined (ENOTCONN) + case ENOTCONN: + return "Transport endpoint is not connected"; +#endif +#if defined (ESHUTDOWN) + case ESHUTDOWN: + return "Cannot send after transport endpoint shutdown"; +#endif +#if defined (ETOOMANYREFS) + case ETOOMANYREFS: + return "Too many references: cannot splice"; +#endif +#if defined (ETIMEDOUT) + case ETIMEDOUT: + return "Connection timed out"; +#endif +#if defined (ECONNREFUSED) + case ECONNREFUSED: + return "Connection refused"; +#endif +#if defined (EHOSTDOWN) + case EHOSTDOWN: + return "Host is down"; +#endif +#if defined (EHOSTUNREACH) + case EHOSTUNREACH: + return "No route to host"; +#endif +#if defined (EALREADY) + case EALREADY: + return "Operation already in progress"; +#endif +#if defined (EINPROGRESS) + case EINPROGRESS: + return "Operation now in progress"; +#endif +#if defined (ESTALE) + case ESTALE: + return "Stale NFS file handle"; +#endif +#if defined (EUCLEAN) + case EUCLEAN: + return "Structure needs cleaning"; +#endif +#if defined (ENOTNAM) + case ENOTNAM: + return "Not a XENIX named type file"; +#endif +#if defined (ENAVAIL) + case ENAVAIL: + return "No XENIX semaphores available"; +#endif +#if defined (EISNAM) + case EISNAM: + return "Is a named type file"; +#endif +#if defined (EREMOTEIO) + case EREMOTEIO: + return "Remote I/O error"; +#endif + } + + /* Fallback: just print the error number */ + snprintf(buf, sizeof(buf), "Error %d", errnum); + return buf; +} + +#endif /* HAVE_STRERROR */ diff --git a/conf/Makefile.in b/conf/Makefile.in index 73ac244..8dd6128 100644 --- a/conf/Makefile.in +++ b/conf/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -41,12 +41,13 @@ subdir = conf DIST_COMMON = $(am__dist_sysconf_DATA_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/upssched.conf.sample.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ - $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -56,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -95,9 +97,11 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)" DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -110,8 +114,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -128,7 +134,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ HAL_FDI_PATH = @HAL_FDI_PATH@ HAL_USER = @HAL_USER@ -HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -139,22 +144,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/conf/ups.conf.sample b/conf/ups.conf.sample index 40a85a6..365a6f7 100644 --- a/conf/ups.conf.sample +++ b/conf/ups.conf.sample @@ -82,11 +82,11 @@ # Examples # -------- # -# A simple example for a UPS called "powerpal" that uses the megatec +# A simple example for a UPS called "powerpal" that uses the blazer_ser # driver on /dev/ttyS0 is: # # [powerpal] -# driver = megatec +# driver = blazer_ser # port = /dev/ttyS0 # desc = "Web server" # diff --git a/conf/upsd.conf.sample b/conf/upsd.conf.sample index 596fc55..56812ff 100644 --- a/conf/upsd.conf.sample +++ b/conf/upsd.conf.sample @@ -17,6 +17,13 @@ # the data fresh within the normal 15 second interval. Watch the syslog # for notifications from upsd about staleness. +# ======================================================================= +# STATEPATH +# STATEPATH /var/run/nut +# +# Tell upsd to look for the driver state sockets in 'path' rather +# than the default that was compiled into the program. + # ======================================================================= # LISTEN
[] # LISTEN 127.0.0.1 3493 @@ -34,8 +41,19 @@ # ======================================================================= # MAXCONN +# MAXCONN 1024 # # This defaults to maximum number allowed on your system. Each UPS, each # LISTEN address and each client count as one connection. If the server # runs out of connections, it will no longer accept new incoming client # connections. Only set this if you know exactly what you're doing. + +# ======================================================================= +# CERTFILE +# +# When compiled with SSL support, you can enter the certificate file here. +# The certificates must be in PEM format and must be sorted starting with +# the subject's certificate (server certificate), followed by intermediate +# CA certificates (if applicable_ and the highest level (root) CA. It should +# end with the server key. See 'docs/security.txt' or the Security chapter of +# NUT user manual for more information on the SSL support in NUT. diff --git a/conf/upsd.users.sample b/conf/upsd.users.sample index 4e0e0c6..ec78eb5 100644 --- a/conf/upsd.users.sample +++ b/conf/upsd.users.sample @@ -48,6 +48,14 @@ # instcmds = ALL # +# +# --- Configuring for a user who can execute tests only +# +# [testuser] +# password = pass +# instcmds = test.battery.start +# instcmds = test.battery.stop + # # --- Configuring for upsmon # diff --git a/config.guess b/config.guess index da83314..e3a2116 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # 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 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-27' +timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -656,7 +656,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -822,6 +822,9 @@ EOF [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -882,40 +885,17 @@ EOF m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif @@ -947,7 +927,7 @@ EOF EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; @@ -1001,14 +981,6 @@ EOF elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -1074,7 +1046,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1182,7 +1154,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) diff --git a/config.sub b/config.sub index a39437d..eb0389a 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-17' +timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -153,6 +153,9 @@ case $os in os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -467,6 +470,10 @@ case $basic_machine in basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos @@ -1260,7 +1267,7 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ @@ -1613,7 +1620,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff --git a/configure b/configure index 1828140..260bf0e 100755 --- a/configure +++ b/configure @@ -1,10 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for nut 2.4.3. +# Generated by GNU Autoconf 2.65 for nut 2.6.0. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -673,7 +675,8 @@ fi -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -695,8 +698,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nut' PACKAGE_TARNAME='nut' -PACKAGE_VERSION='2.4.3' -PACKAGE_STRING='nut 2.4.3' +PACKAGE_VERSION='2.6.0' +PACKAGE_STRING='nut 2.6.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -759,28 +762,30 @@ NETLIBS DRIVER_INSTALL_TARGET DRIVER_MAN_LIST DRIVER_BUILD_LIST -LIBHAL_LDFLAGS +LIBHAL_LIBS LIBHAL_CFLAGS -HAVE_GLIB_2_14 HAL_CALLOUTS_PATH HAL_FDI_PATH HAL_DEVICE_MATCH_KEY HAL_USER -LIBWRAP_LDFLAGS +LIBWRAP_LIBS LIBWRAP_CFLAGS -LIBPOWERMAN_LDFLAGS +DOC_BUILD_LIST +LIBPOWERMAN_LIBS LIBPOWERMAN_CFLAGS -LIBNEON_LDFLAGS +LIBNEON_LIBS LIBNEON_CFLAGS -LIBUSB_LDFLAGS +LIBUSB_LIBS LIBUSB_CFLAGS -LIBNETSNMP_LDFLAGS +LIBNETSNMP_LIBS LIBNETSNMP_CFLAGS LIBGD_LDFLAGS LIBGD_CFLAGS -LIBSSL_LDFLAGS +LIBSSL_LIBS LIBSSL_CFLAGS OS_NAME +MANUALUPDATE_FALSE +MANUALUPDATE_TRUE WITH_UDEV_FALSE WITH_UDEV_TRUE WITH_HOTPLUG_FALSE @@ -789,18 +794,8 @@ WITH_PKG_CONFIG_FALSE WITH_PKG_CONFIG_TRUE SOME_DRIVERS_FALSE SOME_DRIVERS_TRUE -WITH_LIBPOWERMAN_FALSE -WITH_LIBPOWERMAN_TRUE -WITH_NEONXML_FALSE -WITH_NEONXML_TRUE -WITH_HAL_FALSE -WITH_HAL_TRUE -WITH_USB_FALSE -WITH_USB_TRUE -WITH_SNMP_FALSE -WITH_SNMP_TRUE -WITH_SERIAL_FALSE -WITH_SERIAL_TRUE +WITH_DEV_FALSE +WITH_DEV_TRUE OTOOL64 OTOOL LIPO @@ -816,14 +811,29 @@ LD FGREP SED LIBTOOL -WITH_DEV_FALSE -WITH_DEV_TRUE +HAVE_ASCIIDOC_FALSE +HAVE_ASCIIDOC_TRUE +DBLATEX +A2X +ASCIIDOC +WITH_HAL_FALSE +WITH_HAL_TRUE WITH_CGI_FALSE WITH_CGI_TRUE WITH_WRAP_FALSE WITH_WRAP_TRUE WITH_SSL_FALSE WITH_SSL_TRUE +WITH_LIBPOWERMAN_FALSE +WITH_LIBPOWERMAN_TRUE +WITH_NEONXML_FALSE +WITH_NEONXML_TRUE +WITH_SNMP_FALSE +WITH_SNMP_TRUE +WITH_USB_FALSE +WITH_USB_TRUE +WITH_SERIAL_FALSE +WITH_SERIAL_TRUE LIBOBJS RANLIB AR @@ -931,12 +941,19 @@ with_all with_dev with_serial with_usb +with_doc +with_snmp_includes +with_snmp_libs with_usb_includes with_usb_libs with_hal +with_hal_includes +with_hal_libs +with_hal_user +with_hal_device_match_key +with_hal_callouts_path +with_hal_fdi_path with_snmp -with_snmp_includes -with_snmp_libs with_neon with_neon_includes with_neon_libs @@ -947,12 +964,11 @@ with_ssl with_ssl_includes with_ssl_libs with_wrap -with_ipv6 with_cgi with_gd_includes with_gd_libs -enable_static enable_shared +enable_static with_pic enable_fast_install with_gnu_ld @@ -1523,7 +1539,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nut 2.4.3 to adapt to many kinds of systems. +\`configure' configures nut 2.6.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1594,7 +1610,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nut 2.4.3:";; + short | recursive ) echo "Configuration of nut 2.6.0:";; esac cat <<\_ACEOF @@ -1606,12 +1622,12 @@ Optional Features: --enable-dependency-tracking do not reject slow dependency extractors --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer - --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-strip Strip debugging symbols from binaries no + --enable-strip Strip debugging symbols from binaries (no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1621,59 +1637,44 @@ Optional Packages: --with-dev build and install the development files (no) --with-serial build and install serial drivers (yes) --with-usb build and install USB drivers (auto) - - --with-usb-includes=CFLAGS - include flags for the libusb library - - - --with-usb-libs=LDFLAGS linker flags for the libusb library - - --with-hal build and install HAL support (no) - --with-snmp build and install SNMP drivers (auto) - - --with-snmp-includes=CFLAGS + --with-doc build and install documentation (no) + [--with-snmp-includes=CFLAGS] include flags for the Net-SNMP library - - - --with-snmp-libs=LDFLAGS - linker flags for the Net-SNMP library - + [--with-snmp-libs=LIBS] linker flags for the Net-SNMP library + [--with-usb-includes=CFLAGS] + include flags for the libusb library + [--with-usb-libs=LIBS] linker flags for the libusb library + --with-hal build and install HAL support (no) + [--with-hal-includes=CFLAGS] + include flags for the HAL library + [--with-hal-libs=LIBS] linker flags for the HAL library + [--with-hal-user=USER] addons run as user + [--with-hal-device-match-key=KEY] + device match key + [--with-hal-callouts-path=PATH] + installation path for callouts + [--with-hal-fdi-path=PATH] + installation path for device information files + --with-snmp build and install SNMP drivers (auto) --with-neon build and install neon based XML/HTTP driver (auto) - - --with-neon-includes=CFLAGS + [--with-neon-includes=CFLAGS] include flags for the neon library - - - --with-neon-libs=LDFLAGS - linker flags for the neon library - + [--with-neon-libs=LIBS] linker flags for the neon library --with-powerman build and install Powerman PDU client driver (auto) - - --with-powerman-includes=CFLAGS + [--with-powerman-includes=CFLAGS] include flags for the libpowerman library - - - --with-powerman-libs=LDFLAGS + [--with-powerman-libs=LIBS] linker flags for the libpowerman library - --with-ssl enable SSL development code (auto) - - --with-ssl-includes=CFLAGS + [--with-ssl-includes=CFLAGS] include flags for the OpenSSL library - - - --with-ssl-libs=LDFLAGS linker flags for the OpenSSL library - + [--with-ssl-libs=LIBS] linker flags for the OpenSSL library --with-wrap enable libwrap (tcp-wrappers) support (auto) - --with-ipv6 enable IPv6 support (auto) --with-cgi build and install the CGI programs (no) - - --with-gd-includes=CFLAGS + [--with-gd-includes=CFLAGS] include flags for the gd library - - - --with-gd-libs=LDFLAGS linker flags for the gd library - + [--with-gd-libs=LDFLAGS] + linker flags for the gd library --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] @@ -1689,7 +1690,7 @@ Optional Packages: root (nogroup) --with-logfacility=FACILITY facility for log messages (LOG_DAEMON) - [--with-drivers=driver[,driver...]] + [--with-drivers=driver[,driver]] Only use specific drivers (all) --with-pkgconfig-dir=PATH where to install pkg-config *.pc files @@ -1703,7 +1704,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor @@ -1773,8 +1774,8 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nut configure 2.4.3 -generated by GNU Autoconf 2.64 +nut configure 2.6.0 +generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1821,7 +1822,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1858,7 +1859,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1987,7 +1988,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2064,7 +2065,7 @@ fi # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2402,15 +2403,15 @@ rm -f conftest.val fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_compute_int cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nut $as_me 2.4.3, which was -generated by GNU Autoconf 2.64. Invocation command line was +It was created by nut $as_me 2.6.0, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2663,7 +2664,7 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 @@ -2672,9 +2673,9 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -3347,6 +3348,7 @@ IFS=$as_save_IFS fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -3354,7 +3356,6 @@ fi # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi @@ -3471,7 +3472,7 @@ fi # Define the identity of the package. PACKAGE='nut' - VERSION='2.4.3' + VERSION='2.6.0' cat >>confdefs.h <<_ACEOF @@ -3512,8 +3513,12 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro to enable system extensions" >&5 +$as_echo_n "checking for autoconf macro to enable system extensions... " >&6; } -DEPDIR="${am__leading_dot}deps" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3897,32 +3902,30 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3984,10 +3987,10 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 @@ -3995,51 +3998,18 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -4072,13 +4042,72 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi -rm -f conftest$ac_cv_exeext +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : @@ -4931,6 +4960,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. @@ -5309,8 +5339,8 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -6496,7 +6526,7 @@ _ACEOF fi done -for ac_func in on_exit strptime +for ac_func in on_exit strptime setlogmask do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -6509,6 +6539,18 @@ _ACEOF fi done +ac_fn_c_check_decl "$LINENO" "LOG_UPTO" "ac_cv_have_decl_LOG_UPTO" "#include +" +if test "x$ac_cv_have_decl_LOG_UPTO" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LOG_UPTO $ac_have_decl +_ACEOF + for ac_func in vsnprintf snprintf do : @@ -6668,7 +6710,7 @@ fi done -for ac_func in setenv inet_aton strerror atexit +for ac_func in setenv strerror atexit do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -7512,15 +7554,16 @@ $as_echo_n "checking for --with-all... " >&6; } # Check whether --with-all was given. if test "${with_all+set}" = set; then : - withval=$with_all; if test -n "${withval}"; then - if test -z "${with_cgi}"; then with_cgi="${withval}"; fi - if test -z "${with_dev}"; then with_dev="${withval}"; fi - if test -z "${with_serial}"; then with_serial="${withval}"; fi - if test -z "${with_snmp}"; then with_snmp="${withval}"; fi + withval=$with_all; + if test -n "${withval}"; then + if test -z "${with_serial}"; then with_serial="${withval}"; fi if test -z "${with_usb}"; then with_usb="${withval}"; fi + if test -z "${with_snmp}"; then with_snmp="${withval}"; fi if test -z "${with_hal}"; then with_hal="${withval}"; fi if test -z "${with_neon}"; then with_neon="${withval}"; fi if test -z "${with_powerman}"; then with_powerman="${withval}"; fi + if test -z "${with_cgi}"; then with_cgi="${withval}"; fi + if test -z "${with_dev}"; then with_dev="${withval}"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${withval}\"" >&5 $as_echo "\"${withval}\"" >&6; } else @@ -7529,7 +7572,8 @@ $as_echo "not given" >&6; } fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not given" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not given" >&5 $as_echo "not given" >&6; } fi @@ -7567,43 +7611,160 @@ fi +# Check whether --with-doc was given. +if test "${with_doc+set}" = set; then : + withval=$with_doc; nut_with_doc="${withval}" +else + nut_with_doc="no" + +fi + + + + + + +if test -z "${nut_have_libnetsnmp_seen}"; then + nut_have_libnetsnmp_seen=yes + + CFLAGS_ORIG="${CFLAGS}" + LIBS_ORIG="${LIBS}" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP version via net-snmp-config" >&5 +$as_echo_n "checking for Net-SNMP version via net-snmp-config... " >&6; } + SNMP_VERSION=`net-snmp-config --version 2>/dev/null` + if test "$?" != "0" -o -z "${SNMP_VERSION}"; then + SNMP_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 +$as_echo "${SNMP_VERSION} found" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP cflags" >&5 +$as_echo_n "checking for Net-SNMP cflags... " >&6; } + +# Check whether --with-snmp-includes was given. +if test "${with_snmp_includes+set}" = set; then : + withval=$with_snmp_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-snmp-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +else + CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP libs" >&5 +$as_echo_n "checking for Net-SNMP libs... " >&6; } + +# Check whether --with-snmp-libs was given. +if test "${with_snmp_libs+set}" = set; then : + withval=$with_snmp_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-snmp-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +else + LIBS="`net-snmp-config --libs 2>/dev/null`" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } + + for ac_header in net-snmp/net-snmp-config.h +do : + ac_fn_c_check_header_compile "$LINENO" "net-snmp/net-snmp-config.h" "ac_cv_header_net_snmp_net_snmp_config_h" "$ac_includes_default +" +if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_SNMP_NET_SNMP_CONFIG_H 1 +_ACEOF + nut_have_libnetsnmp=yes +else + nut_have_libnetsnmp=no +fi + +done + + for ac_func in init_snmp +do : + ac_fn_c_check_func "$LINENO" "init_snmp" "ac_cv_func_init_snmp" +if test "x$ac_cv_func_init_snmp" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INIT_SNMP 1 +_ACEOF + +else + nut_have_libnetsnmp=no +fi +done + + + if test "${nut_have_libnetsnmp}" = "yes"; then + LIBNETSNMP_CFLAGS="${CFLAGS}" + LIBNETSNMP_LIBS="${LIBS}" + fi + + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi + + if test -z "${nut_have_libusb_seen}"; then nut_have_libusb_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb version via pkg-config" >&5 $as_echo_n "checking for libusb version via pkg-config... " >&6; } - LIBUSB_VERSION=`pkg-config --silence-errors --modversion libusb` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_VERSION} found" >&5 -$as_echo "${LIBUSB_VERSION} found" >&6; } - CFLAGS="`pkg-config --silence-errors --cflags libusb`" - LDFLAGS="`pkg-config --silence-errors --libs libusb`" + LIBUSB_VERSION="`pkg-config --silence-errors --modversion libusb 2>/dev/null`" + if test "$?" = "0" -a -n "${LIBUSB_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags libusb 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs libusb 2>/dev/null`" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking via libusb-config" >&5 $as_echo_n "checking via libusb-config... " >&6; } - LIBUSB_VERSION=`libusb-config --version 2>/dev/null` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_VERSION} found" >&5 -$as_echo "${LIBUSB_VERSION} found" >&6; } + LIBUSB_VERSION="`libusb-config --version 2>/dev/null`" + if test "$?" = "0" -a -n "${LIBUSB_VERSION}"; then CFLAGS="`libusb-config --cflags 2>/dev/null`" - LDFLAGS="`libusb-config --libs 2>/dev/null`" + LIBS="`libusb-config --libs 2>/dev/null`" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } + LIBUSB_VERSION="none" CFLAGS="" - LDFLAGS="-lusb" + LIBS="-lusb" fi fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_VERSION} found" >&5 +$as_echo "${LIBUSB_VERSION} found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb cflags" >&5 $as_echo_n "checking for libusb cflags... " >&6; } # Check whether --with-usb-includes was given. if test "${with_usb_includes+set}" = set; then : - withval=$with_usb_includes; CFLAGS="${withval}" + withval=$with_usb_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-usb-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -7614,11 +7775,20 @@ $as_echo_n "checking for libusb ldflags... " >&6; } # Check whether --with-usb-libs was given. if test "${with_usb_libs+set}" = set; then : - withval=$with_usb_libs; LDFLAGS="${withval}" + withval=$with_usb_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-usb-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in usb.h do : @@ -7662,11 +7832,11 @@ fi done LIBUSB_CFLAGS="${CFLAGS}" - LIBUSB_LDFLAGS="${LDFLAGS}" + LIBUSB_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi @@ -7684,54 +7854,75 @@ if test -z "${nut_have_libhal_seen}"; then nut_have_libhal_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal version via pkg-config (0.5.8 minimum required)" >&5 $as_echo_n "checking for libhal version via pkg-config (0.5.8 minimum required)... " >&6; } - HAL_VERSION=`pkg-config --silence-errors --modversion hal` - if test "$?" = "0"; then - if pkg-config --atleast-version=0.5.8 hal; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_VERSION} found" >&5 + HAL_VERSION="`pkg-config --silence-errors --modversion hal 2>/dev/null`" + if test "$?" != "0" -o -z "${HAL_VERSION}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5 +$as_echo "none found" >&6; } + elif pkg-config --silence-errors --atleast-version=0.5.8 hal 2>/dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_VERSION} found" >&5 $as_echo "${HAL_VERSION} found" >&6; } - nut_have_libhal=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal cflags via pkg-config" >&5 -$as_echo_n "checking for libhal cflags via pkg-config... " >&6; } - CFLAGS=`pkg-config --silence-errors --cflags hal dbus-glib-1` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 -$as_echo "${CFLAGS}" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - nut_have_libhal=no - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal ldflags via pkg-config" >&5 -$as_echo_n "checking for libhal ldflags via pkg-config... " >&6; } - LDFLAGS=`pkg-config --silence-errors --libs hal dbus-glib-1` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - nut_have_libhal=no - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_VERSION} is too old" >&5 -$as_echo "${HAL_VERSION} is too old" >&6; } - nut_have_libhal=no - fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - nut_have_libhal=check + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${HAL_VERSION} is too old" >&5 +$as_echo "$as_me: WARNING: ${HAL_VERSION} is too old" >&2;} fi - if test "${nut_have_libhal}" = "check"; then - CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include" - LDFLAGS="-lhal -ldbus-1 -lpthread" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal cflags" >&5 +$as_echo_n "checking for libhal cflags... " >&6; } + +# Check whether --with-hal-includes was given. +if test "${with_hal_includes+set}" = set; then : + withval=$with_hal_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +else + + CFLAGS="`pkg-config --silence-errors --cflags hal dbus-glib-1 2>/dev/null`" + if test "$?" != "0"; then + CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include" + fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal ldflags" >&5 +$as_echo_n "checking for libhal ldflags... " >&6; } + +# Check whether --with-hal-libs was given. +if test "${with_hal_libs+set}" = set; then : + withval=$with_hal_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +else + + LIBS="`pkg-config --silence-errors --libs hal dbus-glib-1 2>/dev/null`" + if test "$?" != "0"; then + LIBS="-lhal -ldbus-1 -lpthread" + fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in libhal.h do : @@ -7748,7 +7939,24 @@ fi done - for ac_func in libhal_device_new_changeset + for ac_header in glib.h dbus/dbus-glib.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + nut_have_libhal=no +fi + +done + + for ac_func in libhal_device_new_changeset do : ac_fn_c_check_func "$LINENO" "libhal_device_new_changeset" "ac_cv_func_libhal_device_new_changeset" if test "x$ac_cv_func_libhal_device_new_changeset" = x""yes; then : @@ -7761,106 +7969,146 @@ else fi done - fi if test "${nut_have_libhal}" = "yes"; then - LIBHAL_CFLAGS="${CFLAGS}" - LIBHAL_LDFLAGS="${LDFLAGS}" + for ac_func in g_timeout_add_seconds +do : + ac_fn_c_check_func "$LINENO" "g_timeout_add_seconds" "ac_cv_func_g_timeout_add_seconds" +if test "x$ac_cv_func_g_timeout_add_seconds" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_G_TIMEOUT_ADD_SECONDS 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal user via pkg-config" >&5 -$as_echo_n "checking for libhal user via pkg-config... " >&6; } - HAL_USER=`pkg-config --silence-errors --variable=haluser hal` - if test -n "$HAL_USER"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_USER}" >&5 -$as_echo "${HAL_USER}" >&6; } - else +fi +done + + LIBHAL_CFLAGS="${CFLAGS}" + LIBHAL_LIBS="${LIBS}" + fi + + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi + + +if test -z "${nut_have_config_libhal_seen}" -a "${nut_have_libhal}" = "yes"; then + nut_have_config_libhal_seen=yes + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal user" >&5 +$as_echo_n "checking for libhal user... " >&6; } + +# Check whether --with-hal-user was given. +if test "${with_hal_user+set}" = set; then : + withval=$with_hal_user; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-user - see docs/configure.txt" "$LINENO" 5 + ;; + *) + HAL_USER="${withval}" + ;; + esac + +else + + HAL_USER="`pkg-config --silence-errors --variable=haluser hal 2>/dev/null`" + if test "$?" != "0" -o -z "${HAL_USER}"; then HAL_USER="haldaemon" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default (${HAL_USER})" >&5 -$as_echo "using default (${HAL_USER})" >&6; } fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_USER}" >&5 +$as_echo "${HAL_USER}" >&6; } + cat >>confdefs.h <<_ACEOF #define HAL_USER "${HAL_USER}" _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hal-${HAL_VERSION} device match key" >&5 -$as_echo_n "checking for hal-${HAL_VERSION} device match key... " >&6; } - HAL_DEVICE_MATCH_KEY=`pkg-config --silence-errors --atleast-version=0.5.11 hal` - if test "$?" != "0"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal device match key" >&5 +$as_echo_n "checking for libhal device match key... " >&6; } + +# Check whether --with-hal-device-match-key was given. +if test "${with_hal_device_match_key+set}" = set; then : + withval=$with_hal_device_match_key; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-device-match-key - see docs/configure.txt" "$LINENO" 5 + ;; + *) + HAL_DEVICE_MATCH_KEY="${withval}" + ;; + esac + +else + + if pkg-config --silence-errors --atleast-version=0.5.11 hal 2>/dev/null; then HAL_DEVICE_MATCH_KEY="info.bus" else HAL_DEVICE_MATCH_KEY="info.subsystem" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_DEVICE_MATCH_KEY}" >&5 + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_DEVICE_MATCH_KEY}" >&5 $as_echo "${HAL_DEVICE_MATCH_KEY}" >&6; } -cat >>confdefs.h <<_ACEOF -#define HAL_DEVICE_MATCH_KEY "${HAL_DEVICE_MATCH_KEY}" -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal Callouts path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal Callouts path" >&5 $as_echo_n "checking for libhal Callouts path... " >&6; } - HAL_CALLOUTS_PATH=`pkg-config --silence-errors --variable=libexecdir hal` - if test -n "$HAL_CALLOUTS_PATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 -$as_echo "${HAL_CALLOUTS_PATH}" >&6; } - else - # fallback to detecting the right path - if (test -d "${libdir}/hal"); then - # For Debian - HAL_CALLOUTS_PATH="${libdir}/hal" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 -$as_echo "${HAL_CALLOUTS_PATH}" >&6; } - elif (test -d "/usr/libexec"); then - # For RedHat - HAL_CALLOUTS_PATH="${libexecdir}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 -$as_echo "${HAL_CALLOUTS_PATH}" >&6; } - elif (test -d "/usr/lib/hal"); then - # For OpenSUSE - HAL_CALLOUTS_PATH="${libdir}/hal" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 -$as_echo "${HAL_CALLOUTS_PATH}" >&6; } - else - # FIXME - HAL_CALLOUTS_PATH="${libdir}/hal" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using default (${HAL_CALLOUTS_PATH})" >&5 -$as_echo "using default (${HAL_CALLOUTS_PATH})" >&6; } - fi + +# Check whether --with-hal-callouts-path was given. +if test "${with_hal_callouts_path+set}" = set; then : + withval=$with_hal_callouts_path; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-callouts-path - see docs/configure.txt" "$LINENO" 5 + ;; + *) + HAL_CALLOUTS_PATH="${withval}" + ;; + esac + +else + + HAL_CALLOUTS_PATH="`pkg-config --silence-errors --variable=libexecdir hal 2>/dev/null`" + if test "$?" != "0" -o -z "${HAL_CALLOUTS_PATH}"; then + HAL_CALLOUTS_PATH="${libdir}/hal" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal Device Information path" >&5 +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_CALLOUTS_PATH}" >&5 +$as_echo "${HAL_CALLOUTS_PATH}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhal Device Information path" >&5 $as_echo_n "checking for libhal Device Information path... " >&6; } - HAL_FDI_PATH=`pkg-config --silence-errors --variable=hal_fdidir hal` - if test -n "$HAL_FDI_PATH"; then - HAL_FDI_PATH="${HAL_FDI_PATH}/information/20thirdparty" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_FDI_PATH}" >&5 -$as_echo "${HAL_FDI_PATH}" >&6; } - else - # seems supported everywhere + +# Check whether --with-hal-fdi-path was given. +if test "${with_hal_fdi_path+set}" = set; then : + withval=$with_hal_fdi_path; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-hal-fdi-path - see docs/configure.txt" "$LINENO" 5 + ;; + *) + HAL_FDI_PATH="${withval}" + ;; + esac + +else + + HAL_FDI_PATH="`pkg-config --silence-errors --variable=hal_fdidir hal 2>/dev/null`" + if test "$?" != "0" -o -z "${HAL_FDI_PATH}"; then HAL_FDI_PATH="${datarootdir}/hal/fdi/information/20thirdparty" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_FDI_PATH}" >&5 -$as_echo "${HAL_FDI_PATH}" >&6; } fi - fi - CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GLib is version 2.14.0 or newer" >&5 -$as_echo_n "checking if GLib is version 2.14.0 or newer... " >&6; } - if pkg-config --silence-errors --atleast-version=2.14.0 glib-2.0; then - -$as_echo "#define HAVE_GLIB_2_14 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${HAL_FDI_PATH}" >&5 +$as_echo "${HAL_FDI_PATH}" >&6; } fi @@ -7878,27 +8126,34 @@ if test -z "${nut_have_libnetsnmp_seen}"; then nut_have_libnetsnmp_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP version via net-snmp-config" >&5 $as_echo_n "checking for Net-SNMP version via net-snmp-config... " >&6; } SNMP_VERSION=`net-snmp-config --version 2>/dev/null` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 -$as_echo "${SNMP_VERSION} found" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } + if test "$?" != "0" -o -z "${SNMP_VERSION}"; then + SNMP_VERSION="none" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 +$as_echo "${SNMP_VERSION} found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP cflags" >&5 $as_echo_n "checking for Net-SNMP cflags... " >&6; } # Check whether --with-snmp-includes was given. if test "${with_snmp_includes+set}" = set; then : - withval=$with_snmp_includes; CFLAGS="${withval}" + withval=$with_snmp_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-snmp-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + else - CFLAGS="`net-snmp-config --cflags 2>/dev/null`" + CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -7909,13 +8164,22 @@ $as_echo_n "checking for Net-SNMP libs... " >&6; } # Check whether --with-snmp-libs was given. if test "${with_snmp_libs+set}" = set; then : - withval=$with_snmp_libs; LDFLAGS="${withval}" + withval=$with_snmp_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-snmp-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + else - LDFLAGS="`net-snmp-config --libs 2>/dev/null`" + LIBS="`net-snmp-config --libs 2>/dev/null`" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in net-snmp/net-snmp-config.h do : @@ -7948,11 +8212,11 @@ done if test "${nut_have_libnetsnmp}" = "yes"; then LIBNETSNMP_CFLAGS="${CFLAGS}" - LIBNETSNMP_LDFLAGS="${LDFLAGS}" + LIBNETSNMP_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi @@ -7970,27 +8234,34 @@ if test -z "${nut_have_neon_seen}"; then nut_have_neon_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libneon version via pkg-config (0.25.0 minimum required)" >&5 $as_echo_n "checking for libneon version via pkg-config (0.25.0 minimum required)... " >&6; } - NEON_VERSION=`pkg-config --silence-errors --modversion neon` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NEON_VERSION} found" >&5 -$as_echo "${NEON_VERSION} found" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } + NEON_VERSION="`pkg-config --silence-errors --modversion neon 2>/dev/null`" + if test "$?" != "0" -o -z "${NEON_VERSION}"; then + NEON_VERSION="none" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NEON_VERSION} found" >&5 +$as_echo "${NEON_VERSION} found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libneon cflags" >&5 $as_echo_n "checking for libneon cflags... " >&6; } # Check whether --with-neon-includes was given. if test "${with_neon_includes+set}" = set; then : - withval=$with_neon_includes; CFLAGS="${withval}" + withval=$with_neon_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-neon-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + else - CFLAGS="`pkg-config --silence-errors --cflags neon`" + CFLAGS="`pkg-config --silence-errors --cflags neon 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -8001,13 +8272,22 @@ $as_echo_n "checking for libneon ldflags... " >&6; } # Check whether --with-neon-libs was given. if test "${with_neon_libs+set}" = set; then : - withval=$with_neon_libs; LDFLAGS="${withval}" + withval=$with_neon_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-neon-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + else - LDFLAGS="`pkg-config --silence-errors --libs neon`" + LIBS="`pkg-config --silence-errors --libs neon 2>/dev/null`" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in ne_xmlreq.h do : @@ -8053,11 +8333,11 @@ fi done LIBNEON_CFLAGS="${CFLAGS}" - LIBNEON_LDFLAGS="${LDFLAGS}" + LIBNEON_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi @@ -8075,16 +8355,25 @@ if test -z "${nut_have_libpowerman_seen}"; then nut_have_libpowerman_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpowerman cflags" >&5 $as_echo_n "checking for libpowerman cflags... " >&6; } # Check whether --with-powerman-includes was given. if test "${with_powerman_includes+set}" = set; then : - withval=$with_powerman_includes; CFLAGS="${withval}" + withval=$with_powerman_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-powerman-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + else - CFLAGS="`pkg-config --silence-errors --cflags libpowerman`" + CFLAGS="`pkg-config --silence-errors --cflags libpowerman 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -8095,13 +8384,22 @@ $as_echo_n "checking for libpowerman libs... " >&6; } # Check whether --with-powerman-libs was given. if test "${with_powerman_libs+set}" = set; then : - withval=$with_powerman_libs; LDFLAGS="${withval}" + withval=$with_powerman_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-powerman-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + else - LDFLAGS="`pkg-config --silence-errors --libs libpowerman`" + LIBS="`pkg-config --silence-errors --libs libpowerman 2>/dev/null`" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in libpowerman.h do : @@ -8134,11 +8432,11 @@ done if test "${nut_have_libpowerman}" = "yes"; then LIBPOWERMAN_CFLAGS="${CFLAGS}" - LIBPOWERMAN_LDFLAGS="${LDFLAGS}" + LIBPOWERMAN_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi @@ -8203,7 +8501,7 @@ if test "$ac_res" != no; then : fi - LIBUSB_LDFLAGS="-R/usr/sfw/lib ${LIBUSB_LDFLAGS}" + LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}" $as_echo "#define SUN_LIBUSB 1" >>confdefs.h @@ -8213,6 +8511,163 @@ esac +if test "${nut_with_serial}" != "no"; then + nut_with_serial="yes" +fi + if test "${nut_with_serial}" = "yes"; then + WITH_SERIAL_TRUE= + WITH_SERIAL_FALSE='#' +else + WITH_SERIAL_TRUE='#' + WITH_SERIAL_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build serial drivers" >&5 +$as_echo_n "checking whether to build serial drivers... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_serial}" >&5 +$as_echo "${nut_with_serial}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build serial drivers: ${nut_with_serial}" >> conf_nut_report_feature + + + + +if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then + as_fn_error "\"USB drivers requested, but libusb not found.\"" "$LINENO" 5 +fi + +if test "${nut_with_usb}" != "no"; then + nut_with_usb="${nut_have_libusb}" +fi + + if test "${nut_with_usb}" = "yes"; then + WITH_USB_TRUE= + WITH_USB_FALSE='#' +else + WITH_USB_TRUE='#' + WITH_USB_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build USB drivers" >&5 +$as_echo_n "checking whether to build USB drivers... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_usb}" >&5 +$as_echo "${nut_with_usb}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build USB drivers: ${nut_with_usb}" >> conf_nut_report_feature + + + + +if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then + as_fn_error "\"Net-SNMP libraries not found, required for SNMP drivers\"" "$LINENO" 5 +fi + +if test "${nut_with_snmp}" != "no"; then + nut_with_snmp="${nut_have_libnetsnmp}" +fi + + if test "${nut_with_snmp}" = "yes"; then + WITH_SNMP_TRUE= + WITH_SNMP_FALSE='#' +else + WITH_SNMP_TRUE='#' + WITH_SNMP_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build SNMP drivers" >&5 +$as_echo_n "checking whether to build SNMP drivers... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_snmp}" >&5 +$as_echo "${nut_with_snmp}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build SNMP drivers: ${nut_with_snmp}" >> conf_nut_report_feature + + + + +if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then + as_fn_error "\"neon libraries not found, required for neon based XML/HTTP driver\"" "$LINENO" 5 +fi + +if test "${nut_with_neon}" != "no"; then + nut_with_neon="${nut_have_neon}" +fi + + if test "${nut_with_neon}" = "yes"; then + WITH_NEONXML_TRUE= + WITH_NEONXML_FALSE='#' +else + WITH_NEONXML_TRUE='#' + WITH_NEONXML_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build neon based XML driver" >&5 +$as_echo_n "checking whether to build neon based XML driver... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_neon}" >&5 +$as_echo "${nut_with_neon}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build neon based XML driver: ${nut_with_neon}" >> conf_nut_report_feature + + + + + +if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then + as_fn_error "\"Powerman client libraries not found, required for Powerman PDU client driver\"" "$LINENO" 5 +fi + +if test "${nut_with_powerman}" != "no"; then + nut_with_powerman="${nut_have_libpowerman}" +fi + + if test "${nut_with_powerman}" = "yes"; then + WITH_LIBPOWERMAN_TRUE= + WITH_LIBPOWERMAN_FALSE='#' +else + WITH_LIBPOWERMAN_TRUE='#' + WITH_LIBPOWERMAN_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Powerman PDU client driver" >&5 +$as_echo_n "checking whether to build Powerman PDU client driver... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_powerman}" >&5 +$as_echo "${nut_with_powerman}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build Powerman PDU client driver: ${nut_with_powerman}" >> conf_nut_report_feature + + + + + # Check whether --with-ssl was given. if test "${with_ssl+set}" = set; then : withval=$with_ssl; nut_with_ssl="${withval}" @@ -8229,29 +8684,37 @@ if test -z "${nut_have_libssl_seen}"; then nut_have_libssl_seen=yes CFLAGS_ORIG="${CFLAGS}" - LDFLAGS_ORIG="${LDFLAGS}" + LIBS_ORIG="${LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl version via pkg-config" >&5 $as_echo_n "checking for openssl version via pkg-config... " >&6; } - OPENSSL_VERSION=`pkg-config --silence-errors --modversion openssl` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENSSL_VERSION} found" >&5 -$as_echo "${OPENSSL_VERSION} found" >&6; } - CFLAGS="`pkg-config --silence-errors --cflags openssl`" - LDFLAGS="`pkg-config --silence-errors --libs openssl`" + OPENSSL_VERSION="`pkg-config --silence-errors --modversion openssl 2>/dev/null`" + if test "$?" = "0" -a -n "${OPENSSL_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags openssl 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs openssl 2>/dev/null`" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } + OPENSSL_VERSION="none" CFLAGS="" - LDFLAGS="-lssl -lcrypto" + LIBS="-lssl -lcrypto" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENSSL_VERSION} found" >&5 +$as_echo "${OPENSSL_VERSION} found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl cflags" >&5 $as_echo_n "checking for openssl cflags... " >&6; } # Check whether --with-ssl-includes was given. if test "${with_ssl_includes+set}" = set; then : - withval=$with_ssl_includes; CFLAGS="${withval}" + withval=$with_ssl_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-ssl-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -8262,11 +8725,20 @@ $as_echo_n "checking for openssl ldflags... " >&6; } # Check whether --with-ssl-libs was given. if test "${with_ssl_libs+set}" = set; then : - withval=$with_ssl_libs; LDFLAGS="${withval}" + withval=$with_ssl_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-ssl-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS}" >&5 -$as_echo "${LDFLAGS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } for ac_header in openssl/ssl.h do : @@ -8302,11 +8774,11 @@ done $as_echo "#define HAVE_SSL 1" >>confdefs.h LIBSSL_CFLAGS="${CFLAGS}" - LIBSSL_LDFLAGS="${LDFLAGS}" + LIBSSL_LIBS="${LIBS}" fi CFLAGS="${CFLAGS_ORIG}" - LDFLAGS="${LDFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" fi fi @@ -8336,7 +8808,7 @@ $as_echo "${nut_with_ssl}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi echo "enable SSL development code: ${nut_with_ssl}" >> conf_nut_report_feature @@ -8498,7 +8970,7 @@ rm -f core conftest.err conftest.$ac_objext \ $as_echo "#define HAVE_WRAP 1" >>confdefs.h LIBWRAP_CFLAGS="" - LIBWRAP_LDFLAGS="${LIBS}" + LIBWRAP_LIBS="${LIBS}" fi LIBS="${LIBS_ORIG}" @@ -8531,7 +9003,7 @@ $as_echo "${nut_with_wrap}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi echo "enable libwrap (tcp-wrappers) support: ${nut_with_wrap}" >> conf_nut_report_feature @@ -8539,125 +9011,6 @@ $as_echo "${nut_with_wrap}" >&6; } -# Check whether --with-ipv6 was given. -if test "${with_ipv6+set}" = set; then : - withval=$with_ipv6; nut_with_ipv6="${withval}" -else - nut_with_ipv6="auto" - -fi - - - -if test "${nut_with_ipv6}" != "no"; then - -if test -z "${nut_check_ipv6_seen}"; then - nut_check_ipv6_seen=yes - - for ac_func in getaddrinfo freeaddrinfo -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - nut_have_ipv6=yes -else - nut_have_ipv6=no -fi -done - - - ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include -" -if test "x$ac_cv_type_struct_addrinfo" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_ADDRINFO 1 -_ACEOF - - -else - nut_have_ipv6=no -fi - - - ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include -" -if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -_ACEOF - - -else - nut_have_ipv6=no -fi - - - ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "#include -" -if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_IN6 1 -_ACEOF - - -else - nut_have_ipv6=no -fi -ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#include -" -if test "x$ac_cv_type_struct_in6_addr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IN6_ADDR 1 -_ACEOF - - -else - nut_have_ipv6=no -fi - - - if test "${nut_have_ipv6}" = "yes"; then - -$as_echo "#define HAVE_IPV6 1" >>confdefs.h - - fi -fi - -fi - -if test "${nut_with_ipv6}" = "yes" -a "${nut_have_ipv6}" != "yes"; then - as_fn_error "\"Some feature required for IPv6 support is missing\"" "$LINENO" 5 -fi - -if test "${nut_with_ipv6}" != "no"; then - nut_with_ipv6="${nut_have_ipv6}" -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IPv6 support" >&5 -$as_echo_n "checking whether to enable IPv6 support... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_ipv6}" >&5 -$as_echo "${nut_with_ipv6}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "enable IPv6 support: ${nut_with_ipv6}" >> conf_nut_report_feature - - - - - # Check whether --with-cgi was given. if test "${with_cgi+set}" = set; then : withval=$with_cgi; nut_with_cgi="${withval}" @@ -8684,17 +9037,14 @@ if test -z "${nut_have_libgd_seen}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gd version via gdlib-config" >&5 $as_echo_n "checking for gd version via gdlib-config... " >&6; } GD_VERSION=`gdlib-config --version 2>/dev/null` - if test "$?" = "0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GD_VERSION}" >&5 -$as_echo "${GD_VERSION}" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - GD_VERSION="unknown" + if test "$?" != "0" -o -z "${GD_VERSION}"; then + GD_VERSION="none" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GD_VERSION} found" >&5 +$as_echo "${GD_VERSION} found" >&6; } case "${GD_VERSION}" in - unknown) + none) ;; 2.0.5 | 2.0.6 | 2.0.7) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gd ${GD_VERSION} detected, unable to use gdlib-config script" >&5 @@ -8703,9 +9053,9 @@ $as_echo "$as_me: WARNING: gd ${GD_VERSION} detected, unable to use gdlib-config $as_echo "$as_me: WARNING: If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs" >&2;} ;; *) - CFLAGS="`gdlib-config --includes`" - LDFLAGS="`gdlib-config --ldflags`" - LIBS="`gdlib-config --libs`" + CFLAGS="`gdlib-config --includes 2>/dev/null`" + LDFLAGS="`gdlib-config --ldflags 2>/dev/null`" + LIBS="`gdlib-config --libs 2>/dev/null`" ;; esac @@ -8714,7 +9064,16 @@ $as_echo_n "checking for gd include flags... " >&6; } # Check whether --with-gd-includes was given. if test "${with_gd_includes+set}" = set; then : - withval=$with_gd_includes; CFLAGS="${withval}" + withval=$with_gd_includes; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-gd-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -8725,7 +9084,17 @@ $as_echo_n "checking for gd library flags... " >&6; } # Check whether --with-gd-libs was given. if test "${with_gd_libs+set}" = set; then : - withval=$with_gd_libs; LDFLAGS="${withval}" LIBS="" + withval=$with_gd_libs; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-gd-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LDFLAGS="${withval}" + LIBS="" + ;; + esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LDFLAGS} ${LIBS}" >&5 @@ -8847,71 +9216,533 @@ $as_echo "${nut_with_cgi}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi echo "build CGI programs: ${nut_with_cgi}" >> conf_nut_report_feature -if test "${nut_with_dev}" != "no"; then - nut_with_dev="yes" +if test "${nut_with_hal}" = "yes" -a "${nut_have_libhal}" != "yes"; then + as_fn_error "\"libhal not found, required for HAL support\"" "$LINENO" 5 +fi + +if test "${nut_with_hal}" = "yes" -a "${nut_have_libusb}" != "yes"; then + as_fn_error "\"libusb not found, required for HAL support\"" "$LINENO" 5 +fi + +if test "${nut_with_hal}" != "no"; then + if test "${nut_have_libhal}" = "yes" -a "${nut_have_libusb}" = "yes"; then + nut_with_hal="yes" + else + nut_with_hal="no" + fi +fi + + if test "${nut_with_hal}" = "yes"; then + WITH_HAL_TRUE= + WITH_HAL_FALSE='#' else - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=no + WITH_HAL_TRUE='#' + WITH_HAL_FALSE= fi - - - - - - - -fi - if test "${nut_with_dev}" = "yes"; then - WITH_DEV_TRUE= - WITH_DEV_FALSE='#' -else - WITH_DEV_TRUE='#' - WITH_DEV_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build and install the development files" >&5 -$as_echo_n "checking whether to build and install the development files... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_dev}" >&5 -$as_echo "${nut_with_dev}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable HAL support" >&5 +$as_echo_n "checking whether to enable HAL support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_hal}" >&5 +$as_echo "${nut_with_hal}" >&6; } if test -z "${nut_report_feature_flag}"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi - echo "build and install the development files: ${nut_with_dev}" >> conf_nut_report_feature + echo "enable HAL support: ${nut_with_hal}" >> conf_nut_report_feature + + + +if test -z "${nut_have_asciidoc_seen}"; then + nut_have_asciidoc_seen=yes + + for ac_prog in asciidoc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ASCIIDOC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ASCIIDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ASCIIDOC="$ASCIIDOC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ASCIIDOC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ASCIIDOC=$ac_cv_path_ASCIIDOC +if test -n "$ASCIIDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOC" >&5 +$as_echo "$ASCIIDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ASCIIDOC" && break +done + + if test -n "${ASCIIDOC}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asciiDoc version" >&5 +$as_echo_n "checking for asciiDoc version... " >&6; } + ASCIIDOC_VERSION="`${ASCIIDOC} --version 2>/dev/null`" + ASCIIDOC_VERSION="${ASCIIDOC_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ASCIIDOC_VERSION} found" >&5 +$as_echo "${ASCIIDOC_VERSION} found" >&6; } + fi + + for ac_prog in a2x +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_A2X+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $A2X in + [\\/]* | ?:[\\/]*) + ac_cv_path_A2X="$A2X" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_A2X="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +A2X=$ac_cv_path_A2X +if test -n "$A2X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A2X" >&5 +$as_echo "$A2X" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$A2X" && break +done + + if test -n "${A2X}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a2x version" >&5 +$as_echo_n "checking for a2x version... " >&6; } + A2X_VERSION="`${A2X} --version 2>/dev/null`" + A2X_VERSION="${A2X_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${A2X_VERSION} found" >&5 +$as_echo "${A2X_VERSION} found" >&6; } + fi + + for ac_prog in dblatex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DBLATEX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DBLATEX in + [\\/]* | ?:[\\/]*) + ac_cv_path_DBLATEX="$DBLATEX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DBLATEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DBLATEX=$ac_cv_path_DBLATEX +if test -n "$DBLATEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBLATEX" >&5 +$as_echo "$DBLATEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DBLATEX" && break +done + + if test -n "${DBLATEX}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dblatex version" >&5 +$as_echo_n "checking for dblatex version... " >&6; } + DBLATEX_VERSION="`${DBLATEX} --version 2>/dev/null`" + DBLATEX_VERSION="${DBLATEX_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DBLATEX_VERSION} found" >&5 +$as_echo "${DBLATEX_VERSION} found" >&6; } + fi + + fi + + +case "${nut_with_doc}" in + yes|all|auto) + nut_doc_build_list="html-single html-chunked pdf" + ;; + no) + nut_doc_build_list="" + ;; + *) + nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`" + ;; +esac + +for nut_doc_build_target in ${nut_doc_build_list}; do + case "${nut_doc_build_target}" in + html-single) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build ${nut_doc_build_target}" >&5 +$as_echo_n "checking if asciidoc version can build ${nut_doc_build_target}... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${ASCIIDOC_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + + fi + + ;; + + html-chunked) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build ${nut_doc_build_target}" >&5 +$as_echo_n "checking if a2x version can build ${nut_doc_build_target}... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${A2X_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + + fi + + ;; + + pdf) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dblatex version can build ${nut_doc_build_target}" >&5 +$as_echo_n "checking if dblatex version can build ${nut_doc_build_target}... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${DBLATEX_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "0.2.5" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + + fi + + ;; + esac +done + +case "${nut_with_doc}" in +auto) + if test -n "${DOC_BUILD_LIST}"; then + nut_with_doc="yes" + else + nut_with_doc="no" + fi + ;; +no) + ;; +*) + if test -z "${DOC_NOBUILD_LIST}"; then + nut_with_doc="yes" + else + as_fn_error "\"Asciidoc is required for documentation support and missing\"" "$LINENO" 5 + fi + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build website (minimum required 8.6.3)" >&5 +$as_echo_n "checking if asciidoc version can build website (minimum required 8.6.3)... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${ASCIIDOC_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + nut_have_asciidoc="yes" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" + + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build website (minimum required 8.6.3)" >&5 +$as_echo_n "checking if a2x version can build website (minimum required 8.6.3)... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${A2X_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" + + fi + + + if test "${nut_have_asciidoc}" = "yes"; then + HAVE_ASCIIDOC_TRUE= + HAVE_ASCIIDOC_FALSE='#' +else + HAVE_ASCIIDOC_TRUE='#' + HAVE_ASCIIDOC_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build and install documentation" >&5 +$as_echo_n "checking whether to build and install documentation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_doc}" >&5 +$as_echo "${nut_with_doc}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "build and install documentation: ${nut_with_doc}" >> conf_nut_report_feature + + + +if test "${nut_with_doc}" = "yes"; then + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + fi + echo "only build specific documentation format: ${DOC_BUILD_LIST}" >> conf_nut_report_feature + +fi + + case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -8920,8 +9751,8 @@ esac -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.2.6b' +macro_revision='1.3017' @@ -9391,13 +10222,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:9394: $ac_compile\"" >&5) + (eval echo "\"\$as_me:10225: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:9397: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:10228: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:9400: output\"" >&5) + (eval echo "\"\$as_me:10231: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -9863,7 +10694,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -10602,7 +11433,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 10605 "configure"' > conftest.$ac_ext + echo '#line 11436 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11405,6 +12236,36 @@ fi + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + # Check whether --with-pic was given. @@ -11834,11 +12695,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11837: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12698: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11841: \$? = $ac_status" >&5 + echo "$as_me:12702: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12003,7 +12864,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -12173,11 +13034,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12176: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13037: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12180: \$? = $ac_status" >&5 + echo "$as_me:13041: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12278,11 +13139,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12281: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13142: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12285: \$? = $ac_status" >&5 + echo "$as_me:13146: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12333,11 +13194,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12336: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13197: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12340: \$? = $ac_status" >&5 + echo "$as_me:13201: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12476,6 +13337,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -12567,7 +13429,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -14029,7 +14891,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -14716,7 +15578,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 14719 "configure" +#line 15581 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14812,7 +15674,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 14815 "configure" +#line 15677 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15040,215 +15902,78 @@ CC="$lt_save_CC" - -if test "${nut_with_serial}" != "no"; then - nut_with_serial="yes" -fi - if test "${nut_with_serial}" = "yes"; then - WITH_SERIAL_TRUE= - WITH_SERIAL_FALSE='#' +if test "${nut_with_dev}" != "no"; then + nut_with_dev="yes" else - WITH_SERIAL_TRUE='#' - WITH_SERIAL_FALSE= + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build serial drivers" >&5 -$as_echo_n "checking whether to build serial drivers... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_serial}" >&5 -$as_echo "${nut_with_serial}" >&6; } + + + + +fi + if test "${nut_with_dev}" = "yes"; then + WITH_DEV_TRUE= + WITH_DEV_FALSE='#' +else + WITH_DEV_TRUE='#' + WITH_DEV_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build and install the development files" >&5 +$as_echo_n "checking whether to build and install the development files... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_dev}" >&5 +$as_echo "${nut_with_dev}" >&6; } if test -z "${nut_report_feature_flag}"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi - echo "build serial drivers: ${nut_with_serial}" >> conf_nut_report_feature + echo "build and install the development files: ${nut_with_dev}" >> conf_nut_report_feature -if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then - as_fn_error "\"Net-SNMP libraries not found, required for SNMP drivers\"" "$LINENO" 5 -fi - -if test "${nut_with_snmp}" != "no"; then - nut_with_snmp="${nut_have_libnetsnmp}" -fi - - if test "${nut_with_snmp}" = "yes"; then - WITH_SNMP_TRUE= - WITH_SNMP_FALSE='#' -else - WITH_SNMP_TRUE='#' - WITH_SNMP_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build SNMP drivers" >&5 -$as_echo_n "checking whether to build SNMP drivers... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_snmp}" >&5 -$as_echo "${nut_with_snmp}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "build SNMP drivers: ${nut_with_snmp}" >> conf_nut_report_feature - - - - -if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then - as_fn_error "\"USB drivers requested, but libusb not found.\"" "$LINENO" 5 -fi - -if test "${nut_with_usb}" != "no"; then - nut_with_usb="${nut_have_libusb}" -fi - - if test "${nut_with_usb}" = "yes"; then - WITH_USB_TRUE= - WITH_USB_FALSE='#' -else - WITH_USB_TRUE='#' - WITH_USB_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build USB drivers" >&5 -$as_echo_n "checking whether to build USB drivers... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_usb}" >&5 -$as_echo "${nut_with_usb}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "build USB drivers: ${nut_with_usb}" >> conf_nut_report_feature - - - - -if test "${nut_with_hal}" = "yes" -a "${nut_have_libhal}" != "yes"; then - as_fn_error "\"libhal not found, required for HAL support\"" "$LINENO" 5 -fi - -if test "${nut_with_hal}" = "yes" -a "${nut_have_libusb}" != "yes"; then - as_fn_error "\"libusb not found, required for HAL support\"" "$LINENO" 5 -fi - -if test "${nut_with_hal}" != "no"; then - if test "${nut_have_libhal}" = "yes" -a "${nut_have_libusb}" = "yes"; then - nut_with_hal="yes" - else - nut_with_hal="no" - fi -fi - - if test "${nut_with_hal}" = "yes"; then - WITH_HAL_TRUE= - WITH_HAL_FALSE='#' -else - WITH_HAL_TRUE='#' - WITH_HAL_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable HAL support" >&5 -$as_echo_n "checking whether to enable HAL support... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_hal}" >&5 -$as_echo "${nut_with_hal}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "enable HAL support: ${nut_with_hal}" >> conf_nut_report_feature - - - - -if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then - as_fn_error "\"neon libraries not found, required for neon based XML/HTTP driver\"" "$LINENO" 5 -fi - -if test "${nut_with_neon}" != "no"; then - nut_with_neon="${nut_have_neon}" -fi - - if test "${nut_with_neon}" = "yes"; then - WITH_NEONXML_TRUE= - WITH_NEONXML_FALSE='#' -else - WITH_NEONXML_TRUE='#' - WITH_NEONXML_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build neon based XML driver" >&5 -$as_echo_n "checking whether to build neon based XML driver... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_neon}" >&5 -$as_echo "${nut_with_neon}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "build neon based XML driver: ${nut_with_neon}" >> conf_nut_report_feature - - - - - -if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then - as_fn_error "\"Powerman client libraries not found, required for Powerman PDU client driver\"" "$LINENO" 5 -fi - -if test "${nut_with_powerman}" != "no"; then - nut_with_powerman="${nut_have_libpowerman}" -fi - - if test "${nut_with_powerman}" = "yes"; then - WITH_LIBPOWERMAN_TRUE= - WITH_LIBPOWERMAN_FALSE='#' -else - WITH_LIBPOWERMAN_TRUE='#' - WITH_LIBPOWERMAN_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Powerman PDU client driver" >&5 -$as_echo_n "checking whether to build Powerman PDU client driver... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_powerman}" >&5 -$as_echo "${nut_with_powerman}" >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - fi - echo "build Powerman PDU client driver: ${nut_with_powerman}" >> conf_nut_report_feature - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking state path" >&5 $as_echo_n "checking state path... " >&6; } # Check whether --with-statepath was given. if test "${with_statepath+set}" = set; then : - withval=$with_statepath; case "${withval}" in + withval=$with_statepath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-statepath - see docs/configure.txt" "$LINENO" 5 ;; *) STATEPATH="${withval}" ;; esac + fi @@ -15265,16 +15990,19 @@ $as_echo_n "checking alt pid path... " >&6; } # Check whether --with-altpidpath was given. if test "${with_altpidpath+set}" = set; then : - withval=$with_altpidpath; case "${withval}" in + withval=$with_altpidpath; + case "${withval}" in yes|no) - ALTPIDPATH="${STATEPATH}" + as_fn_error "invalid option --with(out)-altpidpath - see docs/configure.txt" "$LINENO" 5 ;; *) ALTPIDPATH="${withval}" ;; esac + else - ALTPIDPATH="${STATEPATH}" + + ALTPIDPATH="${STATEPATH}" fi @@ -15291,13 +16019,16 @@ $as_echo_n "checking driver path... " >&6; } # Check whether --with-drvpath was given. if test "${with_drvpath+set}" = set; then : - withval=$with_drvpath; case "${withval}" in + withval=$with_drvpath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-drvpath - see docs/configure.txt" "$LINENO" 5 ;; *) driverexecdir="${withval}" ;; esac + fi conftemp="${driverexecdir}" @@ -15316,13 +16047,16 @@ $as_echo_n "checking cgi path... " >&6; } # Check whether --with-cgipath was given. if test "${with_cgipath+set}" = set; then : - withval=$with_cgipath; case "${withval}" in + withval=$with_cgipath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-cgipath - see docs/configure.txt" "$LINENO" 5 ;; *) cgiexecdir="${withval}" ;; esac + fi conftemp="${cgiexecdir}" @@ -15341,13 +16075,16 @@ $as_echo_n "checking html path... " >&6; } # Check whether --with-htmlpath was given. if test "${with_htmlpath+set}" = set; then : - withval=$with_htmlpath; case "${withval}" in + withval=$with_htmlpath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-htmlpath - see docs/configure.txt" "$LINENO" 5 ;; *) htmldir="${withval}" ;; esac + fi conftemp="${htmldir}" @@ -15366,13 +16103,16 @@ $as_echo_n "checking pidpath... " >&6; } # Check whether --with-pidpath was given. if test "${with_pidpath+set}" = set; then : - withval=$with_pidpath; case "${withval}" in + withval=$with_pidpath; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-pidpath - see docs/configure.txt" "$LINENO" 5 ;; *) PIDPATH="${withval}" ;; esac + fi @@ -15388,16 +16128,19 @@ $as_echo_n "checking network port number... " >&6; } # Check whether --with-port was given. if test "${with_port+set}" = set; then : - withval=$with_port; case "${withval}" in + withval=$with_port; + case "${withval}" in yes|no) - PORT="3493" + as_fn_error "invalid option --with(out)-port - see docs/configure.txt" "$LINENO" 5 ;; *) PORT="${withval}" ;; esac + else - PORT="3493" + + PORT="3493" fi @@ -15409,20 +16152,26 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PORT}" >&5 $as_echo "${PORT}" >&6; } -nut_user_given= { $as_echo "$as_me:${as_lineno-$LINENO}: checking user to run as" >&5 $as_echo_n "checking user to run as... " >&6; } # Check whether --with-user was given. if test "${with_user+set}" = set; then : - withval=$with_user; case "${withval}" in + withval=$with_user; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-user - see docs/configure.txt" "$LINENO" 5 ;; *) RUN_AS_USER="${withval}" nut_user_given=yes ;; esac + +else + + nut_user_given=no + fi @@ -15433,20 +16182,26 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RUN_AS_USER}" >&5 $as_echo "${RUN_AS_USER}" >&6; } -nut_group_given= { $as_echo "$as_me:${as_lineno-$LINENO}: checking group membership of user to run as" >&5 $as_echo_n "checking group membership of user to run as... " >&6; } # Check whether --with-group was given. if test "${with_group+set}" = set; then : - withval=$with_group; case "${withval}" in + withval=$with_group; + case "${withval}" in yes|no) + as_fn_error "invalid option --with(out)-group - see docs/configure.txt" "$LINENO" 5 ;; *) RUN_AS_GROUP="${withval}" nut_group_given=yes ;; esac + +else + + nut_group_given=no + fi @@ -15457,10 +16212,10 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RUN_AS_GROUP}" >&5 $as_echo "${RUN_AS_GROUP}" >&6; } -if test -n "$nut_user_given" -a -z "$nut_group_given"; then - as_fn_error "\"If you specify --with-user, you also must specify --with-group\"" "$LINENO" 5 -elif test -z "$nut_user_given" -a -n "$nut_group_given"; then - as_fn_error "\"If you specify --with-group, you also must specify --with-user\"" "$LINENO" 5 +if test "${nut_user_given}" = "yes" -a "${nut_group_given}" = "no"; then + as_fn_error "\"If you specify --with-user, you also must specify --with-group\"" "$LINENO" 5 +elif test "${nut_user_given}" = "no" -a "${nut_group_given}" = "yes"; then + as_fn_error "\"If you specify --with-group, you also must specify --with-user\"" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking facility for syslog" >&5 @@ -15468,16 +16223,19 @@ $as_echo_n "checking facility for syslog... " >&6; } # Check whether --with-logfacility was given. if test "${with_logfacility+set}" = set; then : - withval=$with_logfacility; case "${withval}" in + withval=$with_logfacility; + case "${withval}" in yes|no) - LOGFACILITY="LOG_DAEMON" + as_fn_error "invalid option --with(out)-logfacility - see docs/configure.txt" "$LINENO" 5 ;; *) LOGFACILITY="${withval}" ;; esac + else - LOGFACILITY="LOG_DAEMON" + + LOGFACILITY="LOG_DAEMON" fi @@ -15494,11 +16252,10 @@ $as_echo_n "checking which drivers to build... " >&6; } # Check whether --with-drivers was given. if test "${with_drivers+set}" = set; then : - withval=$with_drivers; case "${withval}" in - yes | no) - DRIVER_BUILD_LIST="all" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 -$as_echo "all available" >&6; } + withval=$with_drivers; + case "${withval}" in + yes|no) + as_fn_error "invalid option --with(out)-drivers - see docs/configure.txt" "$LINENO" 5 ;; *) DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"` @@ -15513,7 +16270,6 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 $as_echo "all available" >&6; } - fi if test "${DRIVER_BUILD_LIST}" != "all"; then @@ -15526,11 +16282,11 @@ fi if test "${DRIVER_BUILD_LIST}" != "all"; then - if test -z "${nut_report_feature_flag}"; then + if test -z "${nut_report_feature_flag}"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature + echo -e "Configuration summary:\n======================" >> conf_nut_report_feature fi echo "only build specific drivers: ${DRIVER_BUILD_LIST}" >> conf_nut_report_feature @@ -15539,17 +16295,17 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking which driver man pages to install" >&5 $as_echo_n "checking which driver man pages to install... " >&6; } if test "${DRIVER_BUILD_LIST}" = "all"; then - DRIVER_MAN_LIST=all - { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 + DRIVER_MAN_LIST=all + { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 $as_echo "all available" >&6; } else - DRIVER_MAN_LIST="" - for i in ${DRIVER_BUILD_LIST}; do - if test -f ${srcdir}/man/$i.8; then - DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" - fi - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_MAN_LIST}" >&5 + DRIVER_MAN_LIST="" + for i in ${DRIVER_BUILD_LIST}; do + if test -f ${srcdir}/docs/man/$i.8; then + DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" + fi + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_MAN_LIST}" >&5 $as_echo "${DRIVER_MAN_LIST}" >&6; } fi @@ -15559,50 +16315,49 @@ $as_echo_n "checking whether to strip debug symbols... " >&6; } if test "${enable_strip+set}" = set; then : enableval=$enable_strip; case "${withval}" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - CFLAGS="${CFLAGS} -s" + CFLAGS="${CFLAGS} -s" ;; esac else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install pkg-config *.pc files" >&5 $as_echo_n "checking whether to install pkg-config *.pc files... " >&6; } # Check whether --with-pkgconfig-dir was given. if test "${with_pkgconfig_dir+set}" = set; then : withval=$with_pkgconfig_dir; - case "${withval}" in - yes|auto) - ;; - no) - pkgconfigdir="" - ;; - *) - pkgconfigdir="${withval}" - ;; - esac + case "${withval}" in + yes|auto) + ;; + no) + pkgconfigdir="" + ;; + *) + pkgconfigdir="${withval}" + ;; + esac fi -echo ${pkgconfigdir} if test -n "${pkgconfigdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${pkgconfigdir}" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${pkgconfigdir}" >&5 $as_echo "using ${pkgconfigdir}" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "${pkgconfigdir}"; then @@ -15620,31 +16375,31 @@ $as_echo_n "checking whether to install hotplug rules... " >&6; } # Check whether --with-hotplug-dir was given. if test "${with_hotplug_dir+set}" = set; then : withval=$with_hotplug_dir; - case "${withval}" in - yes) - if test -z "${hotplugdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + case "${withval}" in + yes) + if test -z "${hotplugdir}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error "\"hotplug directory requested but not found" "$LINENO" 5 - fi - ;; - auto) - ;; - no) - hotplugdir="" - ;; - *) - hotplugdir="${withval}" - ;; - esac + as_fn_error "\"hotplug directory requested but not found\"" "$LINENO" 5 + fi + ;; + auto) + ;; + no) + hotplugdir="" + ;; + *) + hotplugdir="${withval}" + ;; + esac fi if test -n "${hotplugdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${hotplugdir}" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${hotplugdir}" >&5 $as_echo "using ${hotplugdir}" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "${hotplugdir}"; then @@ -15662,31 +16417,31 @@ $as_echo_n "checking whether to install udev rules... " >&6; } # Check whether --with-udev-dir was given. if test "${with_udev_dir+set}" = set; then : withval=$with_udev_dir; - case "${withval}" in - yes) - if test -z "${udevdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + case "${withval}" in + yes) + if test -z "${udevdir}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error "\"udev directory requested but not found" "$LINENO" 5 - fi - ;; - auto) - ;; - no) - udevdir="" - ;; - *) - udevdir="${withval}" - ;; - esac + as_fn_error "\"udev directory requested but not found\"" "$LINENO" 5 + fi + ;; + auto) + ;; + no) + udevdir="" + ;; + *) + udevdir="${withval}" + ;; + esac fi if test -n "${udevdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${udevdir}" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${udevdir}" >&5 $as_echo "using ${udevdir}" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "${udevdir}"; then @@ -15698,6 +16453,107 @@ else fi +for ac_prog in asciidoc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ASCIIDOC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ASCIIDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ASCIIDOC="$ASCIIDOC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ASCIIDOC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ASCIIDOC=$ac_cv_path_ASCIIDOC +if test -n "$ASCIIDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOC" >&5 +$as_echo "$ASCIIDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ASCIIDOC" && break +done +test -n "$ASCIIDOC" || ASCIIDOC="none" + + if test "x$ASCIIDOC" != "xnone"; then + MANUALUPDATE_TRUE= + MANUALUPDATE_FALSE='#' +else + MANUALUPDATE_TRUE='#' + MANUALUPDATE_FALSE= +fi + +for ac_prog in a2x +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_A2X+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $A2X in + [\\/]* | ?:[\\/]*) + ac_cv_path_A2X="$A2X" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_A2X="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +A2X=$ac_cv_path_A2X +if test -n "$A2X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A2X" >&5 +$as_echo "$A2X" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$A2X" && break +done +test -n "$A2X" || A2X="none" + + conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -15767,7 +16623,7 @@ _ACEOF -ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile docs/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/Makefile man/Makefile scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/python/Makefile scripts/udev/Makefile scripts/udev/nut-usbups.rules scripts/Makefile server/Makefile tools/Makefile Makefile" +ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/python/Makefile scripts/udev/Makefile scripts/udev/nut-usbups.rules scripts/Makefile server/Makefile tools/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -15891,6 +16747,26 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WITH_SERIAL_TRUE}" && test -z "${WITH_SERIAL_FALSE}"; then + as_fn_error "conditional \"WITH_SERIAL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_USB_TRUE}" && test -z "${WITH_USB_FALSE}"; then + as_fn_error "conditional \"WITH_USB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SNMP_TRUE}" && test -z "${WITH_SNMP_FALSE}"; then + as_fn_error "conditional \"WITH_SNMP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_NEONXML_TRUE}" && test -z "${WITH_NEONXML_FALSE}"; then + as_fn_error "conditional \"WITH_NEONXML\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_LIBPOWERMAN_TRUE}" && test -z "${WITH_LIBPOWERMAN_FALSE}"; then + as_fn_error "conditional \"WITH_LIBPOWERMAN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_SSL_TRUE}" && test -z "${WITH_SSL_FALSE}"; then as_fn_error "conditional \"WITH_SSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -15903,32 +16779,16 @@ if test -z "${WITH_CGI_TRUE}" && test -z "${WITH_CGI_FALSE}"; then as_fn_error "conditional \"WITH_CGI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_DEV_TRUE}" && test -z "${WITH_DEV_FALSE}"; then - as_fn_error "conditional \"WITH_DEV\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_SERIAL_TRUE}" && test -z "${WITH_SERIAL_FALSE}"; then - as_fn_error "conditional \"WITH_SERIAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_SNMP_TRUE}" && test -z "${WITH_SNMP_FALSE}"; then - as_fn_error "conditional \"WITH_SNMP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_USB_TRUE}" && test -z "${WITH_USB_FALSE}"; then - as_fn_error "conditional \"WITH_USB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${WITH_HAL_TRUE}" && test -z "${WITH_HAL_FALSE}"; then as_fn_error "conditional \"WITH_HAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_NEONXML_TRUE}" && test -z "${WITH_NEONXML_FALSE}"; then - as_fn_error "conditional \"WITH_NEONXML\" was never defined. +if test -z "${HAVE_ASCIIDOC_TRUE}" && test -z "${HAVE_ASCIIDOC_FALSE}"; then + as_fn_error "conditional \"HAVE_ASCIIDOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_LIBPOWERMAN_TRUE}" && test -z "${WITH_LIBPOWERMAN_FALSE}"; then - as_fn_error "conditional \"WITH_LIBPOWERMAN\" was never defined. +if test -z "${WITH_DEV_TRUE}" && test -z "${WITH_DEV_FALSE}"; then + as_fn_error "conditional \"WITH_DEV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SOME_DRIVERS_TRUE}" && test -z "${SOME_DRIVERS_FALSE}"; then @@ -15947,6 +16807,10 @@ if test -z "${WITH_UDEV_TRUE}" && test -z "${WITH_UDEV_FALSE}"; then as_fn_error "conditional \"WITH_UDEV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${MANUALUPDATE_TRUE}" && test -z "${MANUALUPDATE_FALSE}"; then + as_fn_error "conditional \"MANUALUPDATE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 @@ -16355,8 +17219,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nut $as_me 2.4.3, which was -generated by GNU Autoconf 2.64. Invocation command line was +This file was extended by nut $as_me 2.6.0, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -16396,6 +17260,7 @@ Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -16418,10 +17283,11 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nut config.status 2.4.3 -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +nut config.status 2.6.0 +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation @@ -16459,6 +17325,8 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -16558,10 +17426,10 @@ ac_cv_type_intmax_t="$ac_cv_type_intmax_t" sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' @@ -16824,13 +17692,24 @@ do "data/html/header.html") CONFIG_FILES="$CONFIG_FILES data/html/header.html" ;; "data/html/Makefile") CONFIG_FILES="$CONFIG_FILES data/html/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; + "data/driver.list") CONFIG_FILES="$CONFIG_FILES data/driver.list" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/Makefile" ;; + "docs/website/Makefile") CONFIG_FILES="$CONFIG_FILES docs/website/Makefile" ;; "drivers/Makefile") CONFIG_FILES="$CONFIG_FILES drivers/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "lib/libupsclient-config") CONFIG_FILES="$CONFIG_FILES lib/libupsclient-config" ;; "lib/libupsclient.pc") CONFIG_FILES="$CONFIG_FILES lib/libupsclient.pc" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "scripts/augeas/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/augeas/Makefile" ;; + "scripts/augeas/nutnutconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutnutconf.aug" ;; + "scripts/augeas/nutupsconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsconf.aug" ;; + "scripts/augeas/nutupsdconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsdconf.aug" ;; + "scripts/augeas/nutupsdusers.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsdusers.aug" ;; + "scripts/augeas/nutupsmonconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsmonconf.aug" ;; + "scripts/augeas/nutupsschedconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsschedconf.aug" ;; + "scripts/augeas/nuthostsconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nuthostsconf.aug" ;; + "scripts/augeas/nutupssetconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupssetconf.aug" ;; "scripts/hal/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/hal/Makefile" ;; "scripts/hal/ups-nut-device.fdi") CONFIG_FILES="$CONFIG_FILES scripts/hal/ups-nut-device.fdi" ;; "scripts/hotplug/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/hotplug/Makefile" ;; @@ -16945,7 +17824,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -16959,7 +17838,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -18038,9 +18917,6 @@ available_tags="" # ### BEGIN LIBTOOL CONFIG -# Whether or not to build static libraries. -build_old_libs=$enable_static - # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision @@ -18048,6 +18924,9 @@ macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared +# Whether or not to build static libraries. +build_old_libs=$enable_static + # What type of objects to build. pic_mode=$pic_mode diff --git a/configure.in b/configure.in index 2c1795f..7af73e4 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ 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.4.3) +AC_INIT(nut, 2.6.0) AC_CONFIG_SRCDIR(server/upsd.c) AC_CONFIG_MACRO_DIR([m4]) echo "Network UPS Tools version ${PACKAGE_VERSION}" @@ -13,9 +13,14 @@ AC_CONFIG_HEADER(include/config.h) AC_PREFIX_DEFAULT(/usr/local/ups) AM_INIT_AUTOMAKE -dnl Require Autoconf 2.60 or better and enable features of Posix that are extensions to C -AC_PREREQ([2.60]) -AC_USE_SYSTEM_EXTENSIONS +dnl we need Autoconf 2.60 or better to enable features of Posix that are extensions to C +AC_MSG_CHECKING(for autoconf macro to enable system extensions) +m4_version_prereq(2.60, [ + AC_MSG_RESULT(yes) + AC_USE_SYSTEM_EXTENSIONS +], [ + AC_MSG_RESULT(no) +]) dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile dnl in sync after SVN updates. @@ -83,7 +88,8 @@ AC_C_VARARRAYS AC_CHECK_FUNCS(flock lockf fcvt fcvtl) AC_CHECK_FUNCS(cfsetispeed tcsendbreak) AC_CHECK_FUNCS(seteuid setsid getpassphrase) -AC_CHECK_FUNCS(on_exit strptime) +AC_CHECK_FUNCS(on_exit strptime setlogmask) +AC_CHECK_DECLS(LOG_UPTO, [], [], [#include ]) dnl the following may add stuff to LIBOBJS (is this still needed?) AC_CHECK_FUNCS(vsnprintf snprintf, [], [ @@ -92,7 +98,7 @@ AC_CHECK_FUNCS(vsnprintf snprintf, [], [ AC_TYPE_LONG_LONG_INT ]) -AC_REPLACE_FUNCS(setenv inet_aton strerror atexit) +AC_REPLACE_FUNCS(setenv strerror atexit) dnl dnl Only use these when compiling with gcc @@ -149,24 +155,26 @@ dnl ---------------------------------------------------------------------- dnl check for --with-all (or --without-all, or --with-all=auto) flag AC_MSG_CHECKING(for --with-all) -AC_ARG_WITH(all, -AC_HELP_STRING([--with-all], [enable serial, usb, snmp, hal, cgi, dev, neon, powerman]), -[ if test -n "${withval}"; then +AC_ARG_WITH(all, + AS_HELP_STRING([--with-all], [enable serial, usb, snmp, hal, cgi, dev, neon, powerman]), +[ + if test -n "${withval}"; then dnl Note: we allow "no" as a positive value, because dnl this is what the user expects from --without-all - if test -z "${with_cgi}"; then with_cgi="${withval}"; fi - if test -z "${with_dev}"; then with_dev="${withval}"; fi if test -z "${with_serial}"; then with_serial="${withval}"; fi - if test -z "${with_snmp}"; then with_snmp="${withval}"; fi if test -z "${with_usb}"; then with_usb="${withval}"; fi + if test -z "${with_snmp}"; then with_snmp="${withval}"; fi if test -z "${with_hal}"; then with_hal="${withval}"; fi if test -z "${with_neon}"; then with_neon="${withval}"; fi if test -z "${with_powerman}"; then with_powerman="${withval}"; fi + if test -z "${with_cgi}"; then with_cgi="${withval}"; fi + if test -z "${with_dev}"; then with_dev="${withval}"; fi AC_MSG_RESULT("${withval}") else AC_MSG_RESULT(not given) fi -], [ AC_MSG_RESULT(not given) +], [ + AC_MSG_RESULT(not given) ]) dnl ---------------------------------------------------------------------- @@ -176,9 +184,20 @@ dnl they are listed near the top by "./configure --help" NUT_ARG_WITH([dev], [build and install the development files], [no]) NUT_ARG_WITH([serial], [build and install serial drivers], [yes]) NUT_ARG_WITH([usb], [build and install USB drivers], [auto]) +NUT_ARG_WITH([doc], [build and install documentation], [no]) + +dnl ---------------------------------------------------------------------- +dnl Check for presence and compiler flags of various libraries + +dnl These checks are performed unconditionally, even if the corresponding +dnl --with-* options are not given. This is because we cannot predict +dnl what will be in the --with-drivers argument. + +NUT_CHECK_LIBNETSNMP NUT_CHECK_LIBUSB NUT_ARG_WITH([hal], [build and install HAL support], [no]) NUT_CHECK_LIBHAL +NUT_CONFIG_LIBHAL NUT_ARG_WITH([snmp], [build and install SNMP drivers], [auto]) NUT_CHECK_LIBNETSNMP NUT_ARG_WITH([neon], [build and install neon based XML/HTTP driver], [auto]) @@ -194,7 +213,7 @@ case ${target_os} in solaris2.1* ) echo Checking for Solaris 10 / 11 specific configuration for usb drivers AC_SEARCH_LIBS(nanosleep, rt) - LIBUSB_LDFLAGS="-R/usr/sfw/lib ${LIBUSB_LDFLAGS}" + LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}" dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification) dnl and need to call libusb close upon reconnexion AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.]) @@ -202,6 +221,78 @@ case ${target_os} in ;; esac + +dnl ---------------------------------------------------------------------- +dnl checks related to --with-serial + +dnl ${nut_with_serial}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_serial}" != "no"; then + nut_with_serial="yes" +fi +AM_CONDITIONAL(WITH_SERIAL, test "${nut_with_serial}" = "yes") +NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}]) + +dnl ---------------------------------------------------------------------- +dnl checks related to --with-usb + +dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then + AC_MSG_ERROR(["USB drivers requested, but libusb not found."]) +fi + +if test "${nut_with_usb}" != "no"; then + nut_with_usb="${nut_have_libusb}" +fi + +AM_CONDITIONAL(WITH_USB, test "${nut_with_usb}" = "yes") +NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}]) + +dnl ---------------------------------------------------------------------- +dnl checks related to --with-snmp + +dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then + AC_MSG_ERROR(["Net-SNMP libraries not found, required for SNMP drivers"]) +fi + +if test "${nut_with_snmp}" != "no"; then + nut_with_snmp="${nut_have_libnetsnmp}" +fi + +AM_CONDITIONAL(WITH_SNMP, test "${nut_with_snmp}" = "yes") +NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}]) + +dnl ---------------------------------------------------------------------- +dnl checks related to --with-neon + +dnl ${nut_with_neon}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then + AC_MSG_ERROR(["neon libraries not found, required for neon based XML/HTTP driver"]) +fi + +if test "${nut_with_neon}" != "no"; then + nut_with_neon="${nut_have_neon}" +fi + +AM_CONDITIONAL(WITH_NEONXML, test "${nut_with_neon}" = "yes") +NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}]) + +dnl ---------------------------------------------------------------------- + +dnl checks related to --with-powerman + +dnl ${nut_with_powerman}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then + AC_MSG_ERROR(["Powerman client libraries not found, required for Powerman PDU client driver"]) +fi + +if test "${nut_with_powerman}" != "no"; then + nut_with_powerman="${nut_have_libpowerman}" +fi + +AM_CONDITIONAL(WITH_LIBPOWERMAN, test "${nut_with_powerman}" = "yes") +NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}]) + dnl ---------------------------------------------------------------------- dnl Check for --with-ssl @@ -246,27 +337,6 @@ fi AM_CONDITIONAL(WITH_WRAP, test "${nut_with_wrap}" = "yes") NUT_REPORT_FEATURE([enable libwrap (tcp-wrappers) support], [${nut_with_wrap}]) -dnl ---------------------------------------------------------------------- -dnl check whether to compile IPv6 features - -NUT_ARG_WITH([ipv6], [enable IPv6 support], [auto]) - -dnl ${nut_with_ipv6}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_ipv6}" != "no"; then - dnl check for IPv6 prerequisites - NUT_CHECK_IPV6 -fi - -if test "${nut_with_ipv6}" = "yes" -a "${nut_have_ipv6}" != "yes"; then - AC_MSG_ERROR(["Some feature required for IPv6 support is missing"]) -fi - -if test "${nut_with_ipv6}" != "no"; then - nut_with_ipv6="${nut_have_ipv6}" -fi - -NUT_REPORT_FEATURE([enable IPv6 support], [${nut_with_ipv6}]) - dnl ---------------------------------------------------------------------- dnl checks related to --with-cgi @@ -289,61 +359,6 @@ fi AM_CONDITIONAL(WITH_CGI, test "${nut_with_cgi}" = "yes") NUT_REPORT_FEATURE([build CGI programs], [${nut_with_cgi}]) -dnl ---------------------------------------------------------------------- -dnl checks related to --with-dev - -dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_dev}" != "no"; then - nut_with_dev="yes" -else - AC_DISABLE_STATIC -fi -AM_CONDITIONAL(WITH_DEV, test "${nut_with_dev}" = "yes") -NUT_REPORT_FEATURE([build and install the development files], [${nut_with_dev}]) - -dnl We only init libtool there to allow AC_DISABLE_STATIC -AC_PROG_LIBTOOL - -dnl ---------------------------------------------------------------------- -dnl checks related to --with-serial - -dnl ${nut_with_serial}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_serial}" != "no"; then - nut_with_serial="yes" -fi -AM_CONDITIONAL(WITH_SERIAL, test "${nut_with_serial}" = "yes") -NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}]) - -dnl ---------------------------------------------------------------------- -dnl checks related to --with-snmp - -dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then - AC_MSG_ERROR(["Net-SNMP libraries not found, required for SNMP drivers"]) -fi - -if test "${nut_with_snmp}" != "no"; then - nut_with_snmp="${nut_have_libnetsnmp}" -fi - -AM_CONDITIONAL(WITH_SNMP, test "${nut_with_snmp}" = "yes") -NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}]) - -dnl ---------------------------------------------------------------------- -dnl checks related to --with-usb - -dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then - AC_MSG_ERROR(["USB drivers requested, but libusb not found."]) -fi - -if test "${nut_with_usb}" != "no"; then - nut_with_usb="${nut_have_libusb}" -fi - -AM_CONDITIONAL(WITH_USB, test "${nut_with_usb}" = "yes") -NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}]) - dnl ---------------------------------------------------------------------- dnl checks related to --with-hal @@ -368,88 +383,178 @@ AM_CONDITIONAL(WITH_HAL, test "${nut_with_hal}" = "yes") NUT_REPORT_FEATURE([enable HAL support], [${nut_with_hal}]) dnl ---------------------------------------------------------------------- -dnl checks related to --with-neon -dnl ${nut_with_neon}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then - AC_MSG_ERROR(["neon libraries not found, required for neon based XML/HTTP driver"]) +dnl checks related to --with-doc + +dnl Always check for AsciiDoc prerequisites, since even if --with-doc +dnl is set to 'no', we may still want to build the website, or some +dnl doc targets manually +NUT_CHECK_ASCIIDOC + +case "${nut_with_doc}" in + yes|all|auto) + nut_doc_build_list="html-single html-chunked pdf" + ;; + no) + nut_doc_build_list="" + ;; + *) + nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`" + ;; +esac + +for nut_doc_build_target in ${nut_doc_build_list}; do + case "${nut_doc_build_target}" in + html-single) + AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target}]) + AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + ], [ + AC_MSG_RESULT(no) + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + ]) + ;; + + html-chunked) + AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target}]) + AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + ], [ + AC_MSG_RESULT(no) + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + ]) + ;; + + pdf) + AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target}]) + AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [0.2.5], [ + AC_MSG_RESULT(yes) + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + ], [ + AC_MSG_RESULT(no) + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + ]) + ;; + esac +done + +case "${nut_with_doc}" in +auto) + if test -n "${DOC_BUILD_LIST}"; then + nut_with_doc="yes" + else + nut_with_doc="no" + fi + ;; +no) + ;; +*) + if test -z "${DOC_NOBUILD_LIST}"; then + nut_with_doc="yes" + else + AC_MSG_ERROR(["Asciidoc is required for documentation support and missing"]) + fi + ;; +esac + +AC_MSG_CHECKING([if asciidoc version can build website (minimum required 8.6.3)]) +AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) + nut_have_asciidoc="yes" +], [ + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +]) + +AC_MSG_CHECKING([if a2x version can build website (minimum required 8.6.3)]) +AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) +], [ + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +]) + +AM_CONDITIONAL([HAVE_ASCIIDOC], [test "${nut_have_asciidoc}" = "yes"]) +NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}]) + +if test "${nut_with_doc}" = "yes"; then + NUT_REPORT([only build specific documentation format], [${DOC_BUILD_LIST}]) fi -if test "${nut_with_neon}" != "no"; then - nut_with_neon="${nut_have_neon}" -fi +dnl ---------------------------------------------------------------------- +dnl checks related to --with-dev -AM_CONDITIONAL(WITH_NEONXML, test "${nut_with_neon}" = "yes") -NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}]) +dnl We only init libtool there to allow AC_DISABLE_STATIC +AC_PROG_LIBTOOL + +dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_dev}" != "no"; then + nut_with_dev="yes" +else + AC_DISABLE_STATIC +fi +AM_CONDITIONAL(WITH_DEV, test "${nut_with_dev}" = "yes") +NUT_REPORT_FEATURE([build and install the development files], [${nut_with_dev}]) dnl ---------------------------------------------------------------------- -dnl checks related to --with-powerman - -dnl ${nut_with_powerman}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then - AC_MSG_ERROR(["Powerman client libraries not found, required for Powerman PDU client driver"]) -fi - -if test "${nut_with_powerman}" != "no"; then - nut_with_powerman="${nut_have_libpowerman}" -fi - -AM_CONDITIONAL(WITH_LIBPOWERMAN, test "${nut_with_powerman}" = "yes") -NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}]) - -dnl ---------------------------------------------------------------------- AC_MSG_CHECKING(state path) AC_ARG_WITH(statepath, -AC_HELP_STRING([--with-statepath=PATH], [path for ups state files (/var/state/ups)]), -[ case "${withval}" in + AS_HELP_STRING([--with-statepath=PATH], [path for ups state files (/var/state/ups)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-statepath - see docs/configure.txt) ;; *) STATEPATH="${withval}" ;; - esac], -) -AC_DEFINE_UNQUOTED(STATEPATH, "${STATEPATH}", - [Path for UPS driver state files]) + esac +], []) +AC_DEFINE_UNQUOTED(STATEPATH, "${STATEPATH}", [Path for UPS driver state files]) AC_MSG_RESULT(${STATEPATH}) dnl --------------------------------------------------------------------- dnl The 'alt pid path' is used by the drivers (via main.c) and upsd, since -dnl ideally they do not run as root and won't be able to write to the usual +dnl ideally they do not run as root and will not be able to write to the usual dnl /var/run path. This defaults to the STATEPATH since they should be dnl able to write there. dnl AC_MSG_CHECKING(alt pid path) AC_ARG_WITH(altpidpath, -AC_HELP_STRING([--with-altpidpath=PATH], [path for driver/upsd .pid files ()]), -[ case "${withval}" in + AS_HELP_STRING([--with-altpidpath=PATH], [path for driver/upsd .pid files ()]), +[ + case "${withval}" in yes|no) - ALTPIDPATH="${STATEPATH}" + AC_MSG_ERROR(invalid option --with(out)-altpidpath - see docs/configure.txt) ;; *) ALTPIDPATH="${withval}" ;; - esac], + esac +], [ ALTPIDPATH="${STATEPATH}" -) -AC_DEFINE_UNQUOTED(ALTPIDPATH, "${ALTPIDPATH}", - [Path for pid files of drivers and upsd (usually STATEPATH)]) +]) +AC_DEFINE_UNQUOTED(ALTPIDPATH, "${ALTPIDPATH}", [Path for pid files of drivers and upsd (usually STATEPATH)]) AC_MSG_RESULT(${ALTPIDPATH}) AC_MSG_CHECKING(driver path) AC_ARG_WITH(drvpath, -AC_HELP_STRING([--with-drvpath=PATH], [where to install ups drivers (EPREFIX/bin)]), -[ case "${withval}" in + AS_HELP_STRING([--with-drvpath=PATH], [where to install ups drivers (EPREFIX/bin)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-drvpath - see docs/configure.txt) ;; *) driverexecdir="${withval}" ;; - esac], -) + esac +], []) conftemp="${driverexecdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -458,15 +563,17 @@ AC_MSG_RESULT(${driverexecdir}) AC_MSG_CHECKING(cgi path) AC_ARG_WITH(cgipath, -AC_HELP_STRING([--with-cgipath=PATH], [where to install CGI programs (EPREFIX/cgi-bin)]), -[ case "${withval}" in + AS_HELP_STRING([--with-cgipath=PATH], [where to install CGI programs (EPREFIX/cgi-bin)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-cgipath - see docs/configure.txt) ;; *) cgiexecdir="${withval}" ;; - esac], -) + esac +], []) conftemp="${cgiexecdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -475,15 +582,17 @@ AC_MSG_RESULT(${cgiexecdir}) AC_MSG_CHECKING(html path) AC_ARG_WITH(htmlpath, -AC_HELP_STRING([--with-htmlpath=PATH], [where to install HTML files (PREFIX/html)]), -[ case "${withval}" in + AS_HELP_STRING([--with-htmlpath=PATH], [where to install HTML files (PREFIX/html)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-htmlpath - see docs/configure.txt) ;; *) htmldir="${withval}" ;; - esac], -) + esac +], []) conftemp="${htmldir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -492,276 +601,283 @@ AC_MSG_RESULT(${htmldir}) AC_MSG_CHECKING(pidpath) AC_ARG_WITH(pidpath, -AC_HELP_STRING([--with-pidpath=PATH], [path for .pid files (/var/run)]), -[ case "${withval}" in + AS_HELP_STRING([--with-pidpath=PATH], [path for .pid files (/var/run)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-pidpath - see docs/configure.txt) ;; *) PIDPATH="${withval}" ;; - esac], -) + esac +], []) AC_DEFINE_UNQUOTED(PIDPATH, "${PIDPATH}", [Path where the pid files should go]) AC_MSG_RESULT(${PIDPATH}) AC_MSG_CHECKING(network port number) AC_ARG_WITH(port, -AC_HELP_STRING([--with-port=PORT], [port for network communications (3493)]), -[ case "${withval}" in + AS_HELP_STRING([--with-port=PORT], [port for network communications (3493)]), +[ + case "${withval}" in yes|no) - PORT="3493" + AC_MSG_ERROR(invalid option --with(out)-port - see docs/configure.txt) ;; *) PORT="${withval}" ;; - esac], + esac +], [ PORT="3493" -) +]) AC_DEFINE_UNQUOTED(PORT, ${PORT}, [Port for network communications]) AC_MSG_RESULT(${PORT}) -nut_user_given= AC_MSG_CHECKING(user to run as) AC_ARG_WITH(user, -AC_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]), -[ case "${withval}" in + AS_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-user - see docs/configure.txt) ;; *) RUN_AS_USER="${withval}" nut_user_given=yes ;; - esac], -) -AC_DEFINE_UNQUOTED(RUN_AS_USER, "${RUN_AS_USER}", - [User to switch to if started as root]) + esac +], [ + nut_user_given=no +]) +AC_DEFINE_UNQUOTED(RUN_AS_USER, "${RUN_AS_USER}", [User to switch to if started as root]) AC_MSG_RESULT(${RUN_AS_USER}) -nut_group_given= AC_MSG_CHECKING(group membership of user to run as) AC_ARG_WITH(group, -AC_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]), -[ case "${withval}" in + AS_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]), +[ + case "${withval}" in yes|no) + AC_MSG_ERROR(invalid option --with(out)-group - see docs/configure.txt) ;; *) RUN_AS_GROUP="${withval}" nut_group_given=yes ;; - esac], -) -AC_DEFINE_UNQUOTED(RUN_AS_GROUP, "${RUN_AS_GROUP}", - [Group membership of user to switch to if started as root]) + esac +], [ + nut_group_given=no +]) +AC_DEFINE_UNQUOTED(RUN_AS_GROUP, "${RUN_AS_GROUP}", [Group membership of user to switch to if started as root]) AC_MSG_RESULT(${RUN_AS_GROUP}) -dnl check that --with-user is given iff --with-group is given. -if test -n "$nut_user_given" -a -z "$nut_group_given"; then - AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"]) -elif test -z "$nut_user_given" -a -n "$nut_group_given"; then - AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"]) +dnl check that --with-user is given if --with-group is given. +if test "${nut_user_given}" = "yes" -a "${nut_group_given}" = "no"; then + AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"]) +elif test "${nut_user_given}" = "no" -a "${nut_group_given}" = "yes"; then + AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"]) fi AC_MSG_CHECKING(facility for syslog) AC_ARG_WITH(logfacility, -AC_HELP_STRING([--with-logfacility=FACILITY], [facility for log messages (LOG_DAEMON)]), -[ case "${withval}" in + AS_HELP_STRING([--with-logfacility=FACILITY], [facility for log messages (LOG_DAEMON)]), +[ + case "${withval}" in yes|no) - LOGFACILITY="LOG_DAEMON" + AC_MSG_ERROR(invalid option --with(out)-logfacility - see docs/configure.txt) ;; *) LOGFACILITY="${withval}" ;; - esac], + esac +], [ LOGFACILITY="LOG_DAEMON" -) -AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY}, - [Desired syslog facility - see syslog(3)]) +]) +AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY}, [Desired syslog facility - see syslog(3)]) AC_MSG_RESULT(${LOGFACILITY}) +dnl Autoconf versions before 2.62 do not allow consecutive quadrigraphs, +dnl so the help string depends on the version used AC_MSG_CHECKING(which drivers to build) AC_ARG_WITH(drivers, -AC_HELP_STRING([[[[--with-drivers=driver@<:@,driver...@:>@]]]], [Only use specific drivers (all)]), -[ case "${withval}" in - yes | no) - dnl ignore calls without any arguments - DRIVER_BUILD_LIST="all" - AC_MSG_RESULT(all available) + AS_HELP_STRING([m4_version_prereq(2.62, + [@<:@--with-drivers=driver@<:@,driver@:>@@:>@], + [[[[--with-drivers=driver@<:@,driver@:>@]]]])], + [Only use specific drivers (all)]), +[ + case "${withval}" in + yes|no) + AC_MSG_ERROR(invalid option --with(out)-drivers - see docs/configure.txt) ;; *) DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"` AC_MSG_RESULT(${DRIVER_BUILD_LIST}) ;; esac -], -[ +], [ DRIVER_BUILD_LIST="all" AC_MSG_RESULT(all available) -] -) +]) AM_CONDITIONAL(SOME_DRIVERS, test "${DRIVER_BUILD_LIST}" != "all") if test "${DRIVER_BUILD_LIST}" != "all"; then - NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}]) + NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}]) fi AC_MSG_CHECKING(which driver man pages to install) if test "${DRIVER_BUILD_LIST}" = "all"; then - DRIVER_MAN_LIST=all - AC_MSG_RESULT(all available) + DRIVER_MAN_LIST=all + AC_MSG_RESULT(all available) else - DRIVER_MAN_LIST="" - for i in ${DRIVER_BUILD_LIST}; do - if test -f ${srcdir}/man/$i.8; then - DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" - fi - done - AC_MSG_RESULT(${DRIVER_MAN_LIST}) + DRIVER_MAN_LIST="" + for i in ${DRIVER_BUILD_LIST}; do + if test -f ${srcdir}/docs/man/$i.8; then + DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" + fi + done + AC_MSG_RESULT(${DRIVER_MAN_LIST}) fi AC_MSG_CHECKING(whether to strip debug symbols) AC_ARG_ENABLE(strip, -[ --enable-strip Strip debugging symbols from binaries [no]], + AS_HELP_STRING([--enable-strip], [Strip debugging symbols from binaries (no)]), [ case "${withval}" in - no) - AC_MSG_RESULT(no) + no) + AC_MSG_RESULT(no) ;; - *) - AC_MSG_RESULT(yes) - CFLAGS="${CFLAGS} -s" + *) + AC_MSG_RESULT(yes) + CFLAGS="${CFLAGS} -s" ;; esac -], -[ AC_MSG_RESULT(no) +], [ + AC_MSG_RESULT(no) ]) - AC_MSG_CHECKING(whether to install pkg-config *.pc files) AC_ARG_WITH(pkgconfig-dir, - AC_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]), - [ - case "${withval}" in - yes|auto) - ;; - no) - pkgconfigdir="" - ;; - *) - pkgconfigdir="${withval}" - ;; - esac - ], - ) -echo ${pkgconfigdir} + AS_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]), +[ + case "${withval}" in + yes|auto) + ;; + no) + pkgconfigdir="" + ;; + *) + pkgconfigdir="${withval}" + ;; + esac +], []) if test -n "${pkgconfigdir}"; then - AC_MSG_RESULT(using ${pkgconfigdir}) + AC_MSG_RESULT(using ${pkgconfigdir}) else - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}") AC_MSG_CHECKING(whether to install hotplug rules) AC_ARG_WITH(hotplug-dir, - AC_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]), - [ - case "${withval}" in - yes) - if test -z "${hotplugdir}"; then - AC_MSG_RESULT(no) - AC_MSG_ERROR(["hotplug directory requested but not found]) - fi - ;; - auto) - ;; - no) - hotplugdir="" - ;; - *) - hotplugdir="${withval}" - ;; - esac - ], - ) + AS_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]), +[ + case "${withval}" in + yes) + if test -z "${hotplugdir}"; then + AC_MSG_RESULT(no) + AC_MSG_ERROR(["hotplug directory requested but not found"]) + fi + ;; + auto) + ;; + no) + hotplugdir="" + ;; + *) + hotplugdir="${withval}" + ;; + esac +], []) if test -n "${hotplugdir}"; then - AC_MSG_RESULT(using ${hotplugdir}) + AC_MSG_RESULT(using ${hotplugdir}) else - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_HOTPLUG, test -n "${hotplugdir}") AC_MSG_CHECKING(whether to install udev rules) AC_ARG_WITH(udev-dir, - AC_HELP_STRING([--with-udev-dir=PATH], [where to install udev rules (/lib/udev or /etc/udev)]), - [ - case "${withval}" in - yes) - if test -z "${udevdir}"; then - AC_MSG_RESULT(no) - AC_MSG_ERROR(["udev directory requested but not found]) - fi - ;; - auto) - ;; - no) - udevdir="" - ;; - *) - udevdir="${withval}" - ;; - esac - ], - ) + AS_HELP_STRING([--with-udev-dir=PATH], [where to install udev rules (/lib/udev or /etc/udev)]), +[ + case "${withval}" in + yes) + if test -z "${udevdir}"; then + AC_MSG_RESULT(no) + AC_MSG_ERROR(["udev directory requested but not found"]) + fi + ;; + auto) + ;; + no) + udevdir="" + ;; + *) + udevdir="${withval}" + ;; + esac +], []) if test -n "${udevdir}"; then - AC_MSG_RESULT(using ${udevdir}) + AC_MSG_RESULT(using ${udevdir}) else - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_UDEV, test -n "${udevdir}") +AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none]) +AM_CONDITIONAL([MANUALUPDATE], [test "x$ASCIIDOC" != "xnone"]) +AC_PATH_PROGS([A2X], [a2x], [none]) + dnl expand ${sysconfdir} and write it out conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" CONFPATH=${conftemp} -AC_DEFINE_UNQUOTED(CONFPATH, "${conftemp}", - [Default path for configuration files]) +AC_DEFINE_UNQUOTED(CONFPATH, "${conftemp}", [Default path for configuration files]) dnl same for datadir conftemp="${datadir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" -AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", - [Default path for data files]) +AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", [Default path for data files]) dnl same for bindir conftemp="${bindir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" -AC_DEFINE_UNQUOTED(BINDIR, "${conftemp}", - [Default path for user executables]) +AC_DEFINE_UNQUOTED(BINDIR, "${conftemp}", [Default path for user executables]) AC_SUBST(OS_NAME) AC_SUBST(LIBSSL_CFLAGS) -AC_SUBST(LIBSSL_LDFLAGS) +AC_SUBST(LIBSSL_LIBS) AC_SUBST(LIBGD_CFLAGS) AC_SUBST(LIBGD_LDFLAGS) AC_SUBST(LIBNETSNMP_CFLAGS) -AC_SUBST(LIBNETSNMP_LDFLAGS) +AC_SUBST(LIBNETSNMP_LIBS) AC_SUBST(LIBUSB_CFLAGS) -AC_SUBST(LIBUSB_LDFLAGS) +AC_SUBST(LIBUSB_LIBS) AC_SUBST(LIBNEON_CFLAGS) -AC_SUBST(LIBNEON_LDFLAGS) +AC_SUBST(LIBNEON_LIBS) AC_SUBST(LIBPOWERMAN_CFLAGS) -AC_SUBST(LIBPOWERMAN_LDFLAGS) +AC_SUBST(LIBPOWERMAN_LIBS) +AC_SUBST(DOC_BUILD_LIST) AC_SUBST(LIBWRAP_CFLAGS) -AC_SUBST(LIBWRAP_LDFLAGS) +AC_SUBST(LIBWRAP_LIBS) AC_SUBST(HAL_USER) AC_SUBST(HAL_DEVICE_MATCH_KEY) AC_SUBST(HAL_FDI_PATH) AC_SUBST(HAL_CALLOUTS_PATH) -AC_SUBST(HAVE_GLIB_2_14) AC_SUBST(LIBHAL_CFLAGS) -AC_SUBST(LIBHAL_LDFLAGS) +AC_SUBST(LIBHAL_LIBS) AC_SUBST(DRIVER_BUILD_LIST) AC_SUBST(DRIVER_MAN_LIST) AC_SUBST(DRIVER_INSTALL_TARGET) @@ -789,13 +905,24 @@ AC_OUTPUT([ data/html/header.html data/html/Makefile data/Makefile + data/driver.list docs/Makefile + docs/man/Makefile + docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/Makefile - man/Makefile + scripts/augeas/Makefile + scripts/augeas/nutnutconf.aug + scripts/augeas/nutupsconf.aug + scripts/augeas/nutupsdconf.aug + scripts/augeas/nutupsdusers.aug + scripts/augeas/nutupsmonconf.aug + scripts/augeas/nutupsschedconf.aug + scripts/augeas/nuthostsconf.aug + scripts/augeas/nutupssetconf.aug scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile diff --git a/data/Makefile.am b/data/Makefile.am index 2b0e953..4b67782 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -2,7 +2,6 @@ SUBDIRS = html -dist_data_DATA = cmdvartab driver.list -EXTRA_DIST = evolution500.dev - -DATA_FILES = cmdvartab driver.list +dist_data_DATA = cmdvartab +nodist_data_DATA = driver.list +EXTRA_DIST = evolution500.seq epdu-managed.dev diff --git a/data/Makefile.in b/data/Makefile.in index 364b18a..fb8e69a 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -39,14 +39,15 @@ host_triplet = @host@ target_triplet = @target@ subdir = data DIST_COMMON = $(dist_data_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in + $(srcdir)/Makefile.in $(srcdir)/driver.list.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ - $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -56,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -63,7 +65,7 @@ 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 = +CONFIG_CLEAN_FILES = driver.list CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = @@ -95,8 +97,8 @@ 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__installdirs = "$(DESTDIR)$(datadir)" -DATA = $(dist_data_DATA) +am__installdirs = "$(DESTDIR)$(datadir)" "$(DESTDIR)$(datadir)" +DATA = $(dist_data_DATA) $(nodist_data_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -131,9 +133,11 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -146,8 +150,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -164,7 +170,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ HAL_FDI_PATH = @HAL_FDI_PATH@ HAL_USER = @HAL_USER@ -HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -175,22 +180,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -287,9 +292,9 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ SUBDIRS = html -dist_data_DATA = cmdvartab driver.list -EXTRA_DIST = evolution500.dev -DATA_FILES = cmdvartab driver.list +dist_data_DATA = cmdvartab +nodist_data_DATA = driver.list +EXTRA_DIST = evolution500.seq epdu-managed.dev all: all-recursive .SUFFIXES: @@ -323,6 +328,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): +driver.list: $(top_builddir)/config.status $(srcdir)/driver.list.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo @@ -349,6 +356,26 @@ uninstall-dist_dataDATA: test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(datadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(datadir)" && rm -f $$files +install-nodist_dataDATA: $(nodist_data_DATA) + @$(NORMAL_INSTALL) + test -z "$(datadir)" || $(MKDIR_P) "$(DESTDIR)$(datadir)" + @list='$(nodist_data_DATA)'; test -n "$(datadir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(datadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(datadir)" || exit $$?; \ + done + +uninstall-nodist_dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(nodist_data_DATA)'; test -n "$(datadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(datadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(datadir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -357,7 +384,7 @@ uninstall-dist_dataDATA: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -382,7 +409,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -548,7 +575,7 @@ check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(datadir)"; do \ + for dir in "$(DESTDIR)$(datadir)" "$(DESTDIR)$(datadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -596,7 +623,7 @@ info: info-recursive info-am: -install-data-am: install-dist_dataDATA +install-data-am: install-dist_dataDATA install-nodist_dataDATA install-dvi: install-dvi-recursive @@ -640,7 +667,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-dist_dataDATA +uninstall-am: uninstall-dist_dataDATA uninstall-nodist_dataDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive @@ -653,12 +680,13 @@ uninstall-am: uninstall-dist_dataDATA install-data-am install-dist_dataDATA install-dvi \ install-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 \ - uninstall-dist_dataDATA + install-nodist_dataDATA 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 uninstall-dist_dataDATA \ + uninstall-nodist_dataDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/data/driver.list b/data/driver.list deleted file mode 100644 index 15089c8..0000000 --- a/data/driver.list +++ /dev/null @@ -1,725 +0,0 @@ -# Network UPS Tools driver.list -# -# This file is used to build the compat.html on the web server. Any line -# with exactly 4 arguments will be turned into an entry on there. -# Naturally, it is read by parseconf, so the usual escaping tricks are -# allowed if you need to insert something unusual. -# -# If you write a new driver, modify an existing one to add more support, -# or just know about some equipment that isn't listed but should be, -# please send me a patch to update this file. -# -# The format: -# -# -# -# Note that the "upstype=nn" format must be used for genericups entries, -# as they will be parsed by new configuration helper software. -# -# Duplicate text in the last field will be cooked out during the conversion -# to HTML with ROWSPAN magic. They must be an exact match for this to work. - -"Ablerex" "MS-RT" "" "megatec" -"Ablerex" "625L" "USB" "megatec_usb" -"Ablerex" "Hope Office 400/600" "" "megatec" - -"ActivePower" "400VA" "" "megatec" -"ActivePower" "1400VA" "" "megatec" -"ActivePower" "2000VA" "" "megatec" - -"Advice" "TopGuard 2000" "" "megatec" - -"AEC" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21" - -"APC" "Back-UPS Pro" "" "apcsmart" -"APC" "Matrix-UPS" "" "apcsmart" -"APC" "Smart-UPS" "" "apcsmart" -"APC" "Back-UPS Pro USB" "USB" "usbhid-ups" -"APC" "Back-UPS USB" "USB" "usbhid-ups" -"APC" "Back-UPS RS USB" "USB" "usbhid-ups" -"APC" "Back-UPS LS USB" "USB" "usbhid-ups" -"APC" "Back-UPS ES/CyberFort 350" "USB" "usbhid-ups" -"APC" "Back-UPS BF500" "USB" "usbhid-ups" -"APC" "BACK-UPS XS LCD" "USB" "usbhid-ups" -"APC" "Smart-UPS USB" "USB" "usbhid-ups" -"APC" "Back-UPS" "940-0095A/C cables" "genericups upstype=1" -"APC" "Back-UPS" "940-0020B/C cables" "genericups upstype=2" -"APC" "Back-UPS" "940-0023A cable" "genericups upstype=9" -"APC" "Back-UPS Office" "940-0119A cable" "genericups upstype=12" -"APC" "Back-UPS RS 500" "custom non-USB cable" "genericups upstype=20" -"APC" "Masterswitch" "Not a UPS - 940-0020 cable" "genericups upstype=12" -"APC" "AP9210" "8 outlets" "powerman-pdu (experimental)" -"APC" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)" -"APC" "(various)" "SNMP monitoring card" "snmp-ups (experimental)" - -"Aphel" "PDU" "no report, but various models should be supported" "snmp-ups (experimental)" - -"Apollo" "1000A" "" "genericups upstype=4" -"Apollo" "1000F" "" "genericups upstype=4" - -"Appro" "SWPDU" "48 outlets" "powerman-pdu (experimental)" - -"Atlantis Land" "A03-P826" "" "megatec" - -"Baytech" "RPC3" "8 outlets" "powerman-pdu (experimental)" -"Baytech" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)" -"Baytech" "RPC28-30NC" "20 outlets" "powerman-pdu (experimental)" -"Baytech" "various RPC" "" "snmp-ups" - -"Belkin" "Active Battery Backup BU30 series" "USB" "megatec_usb" -"Belkin" "Home Office F6H350-SER" "" "genericups upstype=7" -"Belkin" "Home Office F6H500-SER" "" "genericups upstype=7" -"Belkin" "Home Office F6H650-SER" "" "genericups upstype=7" -"Belkin" "F6H375-USB" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" -"Belkin" "F6H375-USB" "USB (2007 models, vendor id: 0665)" "megatec_usb" -"Belkin" "Office Series F6C550-AVR" "USB" "usbhid-ups" -"Belkin" "Regulator Pro" "F6C525-SER, F6C625-SER" "belkin" -"Belkin" "Resource" "" "genericups upstype=4" -"Belkin" "Small Enterprise F6C1500-TW-RK" "serial port" "belkin" -"Belkin" "Small Enterprise F6C1500-TW-RK" "USB" "usbhid-ups" -"Belkin" "Universal UPS F6C100-UNV" "USB" "usbhid-ups" -"Belkin" "Universal UPS F6C120-UNV" "serial port" "belkinunv" -"Belkin" "Universal UPS F6C120-UNV" "USB" "usbhid-ups" -"Belkin" "Universal UPS F6C800-UNV" "serial port" "belkinunv" -"Belkin" "Universal UPS F6C800-UNV" "USB" "usbhid-ups" -"Belkin" "Universal UPS F6C1100-UNV" "serial port (<= 2005 models)" "belkinunv" -"Belkin" "Universal UPS F6C1100-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" -"Belkin" "Universal UPS F6C1100-UNV" "USB (2007 models, vendor id: 0665)" "megatec_usb" -"Belkin" "Universal UPS F6C1200-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" -"Belkin" "Universal UPS F6C1200-UNV" "USB (2007 models, vendor id: 0665)" "megatec_usb" -"Belkin" "Universal UPS F6H350deUNV" "serial port" "megatec" -"Belkin" "Universal UPS F6H350ukUNV" "serial port" "megatec" -"Belkin" "Universal UPS F6H500ukUNV" "serial port" "megatec" -"Belkin" "Universal UPS F6H650ukUNV" "serial port" "megatec" - -"Best Power" "Fortress (old)" "" "bestfortress" -"Best Power" "Fortress (newer)" "" "bestups" -"Best Power" "Fortress Telecom" "" "bestups" -"Best Power" "Axxium Rackmount" "" "bestups" -"Best Power" "Patriot Pro" "" "bestups" -"Best Power" "Patriot Pro II" "" "bestups" -"Best Power" "Patriot" "INT51 cable" "genericups upstype=6" -"Best Power" "Micro-Ferrups" "" "bestuferrups" -"Best Power" "Fortress/Ferrups" "f-command support" "bestfcom" - -"Chloride" "Desk Power 650" "serial port" "megatec" - -"Cito Power" "CPG-SR1000" "" "megatec" - -"Clary" "ST-800" "" "gamatronic" - -"Compaq" "T1500h" "" "upscode2 use_pre_lf" -"Compaq" "R3000h" "" "upscode2" -"Compaq" "R3000 XR" "" "bcmxcp" -"Compaq" "R5500 XR" "" "bcmxcp" - -"Cyber Power Systems" "320AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "500AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "650AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "700AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "800AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "850AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "900AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "1250AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "1500AVR" "" "powerpanel or cyberpower" -"Cyber Power Systems" "Power99" "" "genericups upstype=7" -"Cyber Power Systems" "550SL" "" "genericups upstype=7" -"Cyber Power Systems" "725SL" "" "genericups upstype=7" -"Cyber Power Systems" "CPS825VA" "" "powerpanel" -"Cyber Power Systems" "1100AVR" "" "powerpanel" -"Cyber Power Systems" "1200AVR" "" "powerpanel" -"Cyber Power Systems" "1500AVR-HO" "" "powerpanel" -"Cyber Power Systems" "PR2200" "" "powerpanel" -"Cyber Power Systems" "PR3000E" "" "powerpanel (experimental)" -"Cyber Power Systems" "685AVR" "USB" "usbhid-ups" -"Cyber Power Systems" "800AVR" "USB" "usbhid-ups" -"Cyber Power Systems" "AE550" "USB" "usbhid-ups" -"Cyber Power Systems" "CP 1500C" "USB" "usbhid-ups" -"Cyber Power Systems" "OR2200LCDRM2U" "USB" "usbhid-ups" -"Cyber Power Systems" "Value 400E" "USB" "usbhid-ups" -"Cyber Power Systems" "Value 600E" "USB" "usbhid-ups" -"Cyber Power Systems" "Value 800E" "USB" "usbhid-ups" - -"Cyclades" "PM8" "8 outlets" "powerman-pdu (experimental)" -"Cyclades" "PM10" "10 outlets" "powerman-pdu (experimental)" - -"Dell" "Dell UPS Tower 500W LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Tower 500W LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 1000W LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 1000W LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 1500W LV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 1500W LV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 1920W LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 1920W LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 2300W LV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 2300W LV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack/Tower 2700W LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack/Tower 2700W LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Short Depth Rack 2700W High Efficiency Online LV / HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Short Depth Rack 2700W High Efficiency Online LV / HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack 3750W High Efficiency Online HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack 3750W High Efficiency Online HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack 4200W High Efficiency Online HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack 4200W High Efficiency Online HV" "Serial port" "newmge-shut" -"Dell" "Dell UPS Rack 5600W HV" "USB port" "usbhid-ups" -"Dell" "Dell UPS Rack 5600W HV" "Serial port" "newmge-shut" - -"Delta" "GES602N" "" "belkin" - -"Deltec" "PowerRite Pro II" "" "genericups upstype=15" - -"Digital Loggers" "LPC, EPCR2, DIN" "8 outlets" "powerman-pdu (experimental)" - -"Digitus" "DN-170020" "" "megatec" - -"Dynamix" "UPS1700D" "" "megatec" -"Dynamix" "UPS-650VA" "" "megatec ignoreoff" - -"Dynex" "975AVR" "" "genericups upstype=7" -"Dynex" "DX-800U" "USB" "usbhid-ups" - -"Eaton" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" -"Eaton" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" -"Eaton" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups" -"Eaton" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups" -"Eaton" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups" -"Eaton" "EX 700/1000/1500 VA" "USB port" "usbhid-ups" -"Eaton" "EX 2200/3000/3000 XL VA" "USB port" "usbhid-ups" -"Eaton" "EX 1000 RT2U / 1500 RT2U" "USB port" "usbhid-ups" -"Eaton" "MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" -"Eaton" "Nova AVR 625/1250" "USB" "usbhid-ups" -"Eaton" "E Series NV UPS 400-2000 VA" "" "megatec_usb" -"Eaton" "E Series DX UPS 1-20 kVA" "" "mge-utalk" -"Eaton" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"Eaton" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"Eaton" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "EX 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or newmge-shut" -"Eaton" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" -"Eaton" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" -"Eaton" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" -"Eaton" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" -"Eaton" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" -"Eaton" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" -"Eaton" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" -"Eaton" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" -"Eaton" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" -"Eaton" "ePDU Managed" "" "snmp-ups (experimental)" -"Eaton" "ePDU Monitored" "" "snmp-ups or netxml-ups" -"Eaton" "Powerware 9130" "" "bcmxcp or usbhid-ups" - -"Effekta" "MI/MT/MH" "2502 cable" "megatec" -"Effekta" "RM2000MH" "" "megatec" - -"Energy Sistem" "(various)" "" "megatec" - -"ETA" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7" -"ETA" "mini+UPS PRO" "UPS Explorer cable" "etapro" - -"Ever UPS" "NET *-DPC" "" "everups" -"Ever UPS" "AP *-PRO" "" "everups" - -"Ever-Power" "625/1000" "" "safenet" - -"Exide" "NetUPS SE" "" "genericups upstype=15" - -"Fenton Technologies" "PowerPal" "P-series" "safenet" -"Fenton Technologies" "PowerPal" "L-series" "megatec" -"Fenton Technologies" "PowerOn" "" "megatec" -"Fenton Technologies" "PowerPure" "" "megatec" - -"Fairstone" "L525/L625/L750" "" "safenet" - -"Fideltronik" "Ares 700 and larger" "" "genericups upstype=6" -"Fideltronik" "Other Ares models" "" "genericups upstype=19" - -"Fiskars" "PowerRite MAX" "" "upscode2" -"Fiskars" "PowerServer 10" "" "upscode2" -"Fiskars" "PowerServer 30" "" "upscode2" -"Fiskars" "9200" "UPS Information Unit" "upscode2" - -"Forza Power Technologies" "SL-1001" "USB" "megatec_usb" - -"Gamatronic" "All models with alarm interface" "" "genericups upstype=22" -"Gamatronic" "G-SmartCompact 2000" "" "megatec" -"Gamatronic" "MP110/210" "" "gamatronic" -"Gamatronic" "MS-T" "" "gamatronic" -"Gamatronic" "MS" "" "gamatronic" -"Gamatronic" "µPS3/1" "" "gamatronic" - -"Geek Squad" "GS1285U" "USB" "usbhid-ups" - -"Gemini" "UPS625/UPS1000" "" "safenet" - -"HP" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart" -"HP" "R3000 XR" "" "bcmxcp" -"HP" "R5500 XR" "" "bcmxcp" -"HP" "R1500 G2" "" "bcmxcp" -"HP" "R/T 2200 G2" "" "usbhid-ups" -"HP" "T500" "older models" "bcmxcp_usb" -"HP" "T750 INTL" "" "usbhid-ups" -"HP" "T750" "older models" "bcmxcp_usb" -"HP" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)" - -"IBM" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)" - -"ICS" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)" - -"INELT" "Monolith 1000LT" "" "megatec" - -"Inform" "GUARD" "Line Interactive AP model" "powercom" -"Inform" "Guard S 1500AP" "" "megatec" -"Inform" "Informer Compact 1000VA" "" "megatec or blazer_ser" - -"Infosec" "iPEL 350" "" "megatec" -"Infosec" "iPEL 500" "" "megatec" -"Infosec" "iPEL 750" "" "megatec" -"Infosec" "iPEL 1000" "" "megatec" -"Infosec" "500XP" "" "megatec" -"Infosec" "XP 500" "USB" "megatec_usb" -"Infosec" "XP 1000" "" "megatec" - -"IPMI" "" "" "powerman-pdu (experimental)" - -"Ippon" "Back Power Pro 400/500/600/700/800" "" "blazer_ser or megatec" -"Ippon" "Back Power Pro 400/500/600/700/800" "USB" "blazer_usb (experimental)" -"Ippon" "Back Comfo Pro 600/800" "" "blazer_ser or megatec" -"Ippon" "Back Comfo Pro 600/800" "USB" "blazer_usb (experimental)" -"Ippon" "Smart Power Pro 1000/1400/2000" "" "blazer_ser or megatec" -"Ippon" "Smart Power Pro 1000/1400/2000" "USB" "blazer_usb (experimental)" -"Ippon" "Smart Winner 750/1000/1500/2000/3000" "" "blazer_ser or megatec" -"Ippon" "Smart Winner 750/1000/1500/2000/3000" "USB" "blazer_usb (experimental)" -"Ippon" "(various)" "" "blazer_ser or megatec" -"Ippon" "(various)" "USB" "blazer_usb" - -"IVT" "SCD series" "" "ivtscd" - -"Jageson Technology" "Jasuny USPS" "" "genericups upstype=4" - -"Kebo" "1200D/D Series" "" "megatec" - -"Krauler" "UP-D1200VA" "USB" "megatec_usb ignoreoff" -"Krauler" "UP-M500VA" "USB" "megatec_usb" - -"Lestar" "MD-800E" "" "megatec" - -"Liebert" "ITON 600VA" "" "megatec" -"Liebert" "UPStation GXT2" "contact-closure cable" "liebert" -"Liebert" "GXT2-3000RT230" "" "liebertgxt2 (experimental)" -"Liebert" "PowerSure Personal XT" "USB" "usbhid-ups" -"Liebert" "PowerSure PSA" "USB" "usbhid-ups" - -"LNXI" "Icebox" "10 outlets" "powerman-pdu (experimental)" - -"Masterguard" "(various)" "" "masterguard" - -"Maxxtro" "UPS 600 VA" "serial port" "megatec" - -"Mecer" "ME-2000" "" "megatec" - -"Meta System" "HF Line" "1..4 boards" "metasys" -"Meta System" "HF Line \/2" "5..8 boards" "metasys" -"Meta System" "HF Millennium 810" "" "metasys" -"Meta System" "HF Millennium 820" "" "metasys" -"Meta System" "HF TOP Line 910" "" "metasys" -"Meta System" "HF TOP Line 920" "" "metasys" -"Meta System" "HF TOP Line 930" "" "metasys" -"Meta System" "HF TOP Line 940" "" "metasys" -"Meta System" "HF TOP Line 950" "" "metasys" -"Meta System" "HF TOP Line 960" "" "metasys" -"Meta System" "HF TOP Line 970" "" "metasys" -"Meta System" "HF TOP Line 980" "" "metasys" -"Meta System" "ECO Network 750" "" "metasys" -"Meta System" "ECO Network 1000" "" "metasys" -"Meta System" "ECO Network 1050" "" "metasys" -"Meta System" "ECO Network 1500" "" "metasys" -"Meta System" "ECO Network 1800" "" "metasys" -"Meta System" "ECO Network 2000" "" "metasys" -"Meta System" "ECO Network 2100" "" "metasys" -"Meta System" "ECO Network 2500" "" "metasys" -"Meta System" "ECO Network 3000" "" "metasys" -"Meta System" "ECO 305" "" "metasys" -"Meta System" "ECO 308" "" "metasys" -"Meta System" "ECO 311" "" "metasys" -"Meta System" "ECO 511" "" "metasys" -"Meta System" "ECO 516" "" "metasys" -"Meta System" "ECO 519" "" "metasys" -"Meta System" "ECO 522" "" "metasys" -"Meta System" "ally HF 800" "" "metasys" -"Meta System" "ally HF 1000" "" "metasys" -"Meta System" "ally HF 1250" "" "metasys" -"Meta System" "ally HF 1600" "" "metasys" -"Meta System" "ally HF 2000" "" "metasys" -"Meta System" "ally HF 2500" "" "metasys" -"Meta System" "Megaline 1250" "" "metasys" -"Meta System" "Megaline 2500" "" "metasys" -"Meta System" "Megaline 3750" "" "metasys" -"Meta System" "Megaline 5000" "" "metasys" -"Meta System" "Megaline 6250" "" "metasys" -"Meta System" "Megaline 7500" "" "metasys" -"Meta System" "Megaline 8750" "" "metasys" -"Meta System" "Megaline 10000" "" "metasys" - -"MGE Office Protection Systems" "Protection Center 500/675 VA" "USB" "usbhid-ups" -"MGE Office Protection Systems" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" -"MGE Office Protection Systems" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" -"MGE Office Protection Systems" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups" -"MGE Office Protection Systems" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" -"MGE Office Protection Systems" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" -"MGE Office Protection Systems" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" -"MGE Office Protection Systems" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" -"MGE Office Protection Systems" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" -"MGE Office Protection Systems" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" - -"MGE UPS SYSTEMS" "Comet EX RT" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Comet EX RT 3:1" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Protection Center 420" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Protection Center 500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Protection Center 675" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "NOVA AVR 600 USB" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "NOVA AVR 1100 USB" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Ellipse USBS" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Ellipse USB" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Ellipse Premium USBS" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Ellipse Premium USB" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse Office 600" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse Office 750" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse Office 1000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse Office 1500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse MAX 600" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse MAX 850" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse MAX 1100" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Ellipse MAX 1500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar Evolution" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 650" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 850" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 1150" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution S 1250" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 1550" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution S 1750" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution 2000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution S 2500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Evolution S 3000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar M 2200" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar M 3000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar M 3000 XL" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 700" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 1000" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 1500" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 1000 RT2U" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar 1500 RT2U" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar MX 4000 RT" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Pulsar MX 5000 RT" "USB" "usbhid-ups" -"MGE UPS SYSTEMS" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups" -"MGE UPS SYSTEMS" "NOVA AVR 600 Serial" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "NOVA AVR 1100 Serial" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Ellipse S" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Ellipse Premium S" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse Office 600" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse Office 750" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse Office 1000" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse Office 1500" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse MAX 600" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse MAX 850" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse MAX 1100" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Ellipse MAX 1500" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar EXtreme C / EX RT" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Comet EX RT" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Comet EX RT 3:1" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Esprit" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 650" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 850" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 1150" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution S 1250" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 1550" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution S 1750" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution 2000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution S 2500" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Evolution S 3000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar M 2200" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar M 3000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar M 3000 XL" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 700" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 1000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 1500" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 1000 RT2U" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar 1500 RT2U" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar MX 4000 RT" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar MX 5000 RT" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar Evolution" "Serial port" "mge-shut or newmge-shut or mge-utalk" -"MGE UPS SYSTEMS" "Pulsar EXtreme C" "" "mge-shut or newmge-shut or mge-utalk" -"MGE UPS SYSTEMS" "Pulsar ES+" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar ESV+" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar SV" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar ESV" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar EX" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar EXL" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar PSX" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar SX" "" "mge-utalk" -"MGE UPS SYSTEMS" "Pulsar EXtreme" "" "mge-utalk" -"MGE UPS SYSTEMS" "Comet EXtreme" "" "mge-utalk" -"MGE UPS SYSTEMS" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk" -"MGE UPS SYSTEMS" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" -"MGE UPS SYSTEMS" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "Pulsar (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" -"MGE UPS SYSTEMS" "Pulsar (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "Pulsar / Comet / Galaxy (SNMP)" "SNMP card (ref 66062)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "Pulsar (SNMP)" "SNMP card (ref 66045)" "snmp-ups (experimental)" -"MGE UPS SYSTEMS" "UM-Link (SNMP)" "Not a UPS (ref 66850)" "snmp-ups (experimental)" - -"MicroDowell" "B.Box BP 500" "" "powerpanel" -"MicroDowell" "B.Box BP 750" "" "powerpanel" -"MicroDowell" "B.Box BP 1000" "" "powerpanel" -"MicroDowell" "B.Box BP 1500" "" "powerpanel" -"MicroDowell" "Enterprise B8" "" "microdowell" -"MicroDowell" "Enterprise B10" "" "microdowell" -"MicroDowell" "Enterprise N8" "" "microdowell" -"MicroDowell" "Enterprise N11" "" "microdowell" -"MicroDowell" "Enterprise N15" "" "microdowell" -"MicroDowell" "Enterprise N20" "" "microdowell" -"MicroDowell" "Enterprise N22" "" "microdowell" -"MicroDowell" "Enterprise N30" "" "microdowell" -"MicroDowell" "Enterprise N40" "" "microdowell" -"MicroDowell" "Enterprise N50" "" "microdowell" -"MicroDowell" "Enterprise N60" "" "microdowell" -"MicroDowell" "Enterprise HiBox ST" "" "microdowell" - -"Microsol" "Solis 1.0" "1000VA" "solis" -"Microsol" "Solis 1.5" "1500VA" "solis" -"Microsol" "Solis 2.0" "2000VA" "solis" -"Microsol" "Solis 3.0" "3000VA" "solis" -"Microsol" "Rhino 6.0" "6000VA" "rhino" -"Microsol" "Rhino 7.5" "7500VA" "rhino" -"Microsol" "Rhino 10.0" "10000VA" "rhino" -"Microsol" "Rhino 20.0" "20000VA" "rhino" - -"Mustek" "Powermust" "400VA Plus" "megatec" -"Mustek" "Powermust" "600VA Plus" "megatec" -"Mustek" "Powermust" "800VA Pro" "megatec" -"Mustek" "Powermust" "1000VA Plus" "megatec" -"Mustek" "Powermust" "1400VA Plus" "megatec" -"Mustek" "Powermust" "2000VA USB" "megatec" -"Mustek" "Powermust Office 650" "USB" "megatec_usb" -"Mustek" "PowerMust 424 / 636 / 848" "USB" "blazer_usb" -"Mustek" "Various" "" "megatec" - -"Neus" "400va / 600va" "" "megatec" - -"Nitram" "Elite 500" "" "genericups upstype=8" -"Nitram" "Elite 2002" "" "genericups upstype=16" -"Nitram" "Elite 2005" "" "powerpanel" - -"Oneac" "ON400" "advanced interface" "oneac" -"Oneac" "ON600" "advanced interface" "oneac" -"Oneac" "ON900" "advanced interface" "oneac" -"Oneac" "ON1300" "advanced interface" "oneac" -"Oneac" "EG Series" "advanced interface" "oneac" -"Oneac" "ON700" "advanced interface" "oneac" -"Oneac" "ON700XAU" "advanced interface" "oneac" -"Oneac" "ON700XIU" "advanced interface" "oneac" -"Oneac" "ON1000" "advanced interface" "oneac" -"Oneac" "ON1000XAU" "advanced interface" "oneac" -"Oneac" "ON1000XIU" "advanced interface" "oneac" -"Oneac" "ON1500" "advanced interface" "oneac" -"Oneac" "ON1500XAU" "advanced interface" "oneac" -"Oneac" "ON1500XIU" "advanced interface" "oneac" -"Oneac" "ON2000" "advanced interface" "oneac" -"Oneac" "ON2000XAU" "advanced interface" "oneac" -"Oneac" "ON2000XIU" "advanced interface" "oneac" - -"Online" "P-Series" "" "genericups upstype=14" -"Online" "Zinto D" "" "optiups" - -"OnLite" "AQUA" "50" "megatec" - -"Opti-UPS" "PowerES" "420E" "optiups" - -"Orvaldi Power Protection" "various" "not 400 or 600" "megatec" - -"Phasak" "400VA / 600VA" "" "megatec" - -"Plexus" "500VA" "USB" "megatec_usb ignoreoff" -"Plexus" "1000VA Pro" "USB" "megatec_usb ignoreoff" - -"Powercom" "SMK" "" "megatec" -"Powercom" "SXL" "" "megatec" -"Powercom" "ULT" "" "megatec" -"Powercom" "Trust 425/625" "" "powercom" -"Powercom" "Advice Partner/King Pr750" "" "powercom" -"Powercom" "Black Knight PRO" "" "powercom" -"Powercom" "Black Knight PRO" "USB (2009 models, product id: 00a6)" "usbhid-ups (experimental)" -"Powercom" "Smart KING Pro (all Smart series)" "powercom" -"Powercom" "Smart KING Pro (all Smart series)" "USB (2009 models, product id: 00a3)" "usbhid-ups (experimental)" -"Powercom" "Imperial" "" "powercom" -"Powercom" "Imperial" "USB (2009 models, product id: 00a2)" "usbhid-ups (experimental)" -"Powercom" "Vanguard" "" "megatec" -"Powercom" "Vanguard" "USB (2009 models, product id: 00a5)" "usbhid-ups (experimental)" -"Powercom" "WOW" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" -"Powercom" "WOW" "USB (2009 models, product id: 00a4)" "usbhid-ups (experimental)" -"Powercom" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" -"Powercom" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)" - -"PowerGuard" "PG-600" "" "megatec" - -"PowerKinetics" "9001" "" "genericups upstype=17" -"PowerKinetics" "BlackOut Buster" "" "megatec" - -"PowerMan" "RealSmart 800" "" "megatec" -"PowerMan" "RealSmart 1000" "" "megatec" -"PowerMan" "BackPro" "" "genericups upstype=4" - -"PowerTech" "Comp1000" "DTR cable power" "genericups upstype=3" -"PowerTech" "SMK-800" "" "megatec" - -"PowerWalker" "Line-Interactive VI 1000" "" "megatec" -"PowerWalker" "Line-Interactive VI 400/800" "" "megatec" -"PowerWalker" "Line-Interactive VI 600" "" "megatec battvolts=9:13" - -"Powerware" "3110" "" "genericups upstype=7" -"Powerware" "3115" "" "genericups upstype=11" -"Powerware" "5119, 5125" "" "genericups upstype=15" -"Powerware" "5119 RM" "" "genericups upstype=20" -"Powerware" "PW3105" "" "bcmxcp_usb" -"Powerware" "PW5110" "" "bcmxcp_usb" -"Powerware" "PW5115" "Serial port" "bcmxcp" -"Powerware" "PW5115" "USB port" "bcmxcp_usb" -"Powerware" "PW5125" "" "bcmxcp" -"Powerware" "PW9120" "Serial port" "bcmxcp" -"Powerware" "PW9120" "USB port" "bcmxcp_usb" -"Powerware" "PW9125" "" "bcmxcp" -"Powerware" "PW9315" "3-phase" "bcmxcp" -"Powerware" "9110" "" "upscode2" -"Powerware" "9120" "" "upscode2" -"Powerware" "9150" "" "upscode2" -"Powerware" "9305" "" "upscode2" -"Powerware" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" -"Powerware" "(various)" "ConnectUPS Web/SNMP card" "snmp-ups (experimental)" - -"Powerwell" "PM525A/-625A/-800A/-1000A/-1250A" "" "safenet" - -"Phantom" "Rackable Systems" "1 outlets" "powerman-pdu (experimental)" - -"Raritan" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)" -"Raritan" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)" -"Raritan" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)" - -"Repotec" "RPF525/625/800/1000" "" "safenet" -"Repotec" "RPT-800A" "" "genericups upstype=13" -"Repotec" "RPT-162A" "" "genericups upstype=13" - -"SmartLabs" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)" - -"SMS (Brazil)" "Manager III" "" "megatec" - -"SOLA" "305" "cable INT-0025C" "genericups upstype=7" -"SOLA" "325" "" "bestups" -"SOLA" "520" "" "bestups" -"SOLA" "610" "use ID= in ups.conf" "bestups" -"SOLA" "620" "" "bestups" -"SOLA" "330" "" "megatec" - -"SOLA/BASIC Mexico" "various" "ISBMEX protocol" "isbmex" - -"Socomec" "NeTYS-PE 600VA" "megatec" -"Socomec Sicon" "Egys" "420 VA" "powercom" -"Socomec Sicon" "Netvision" "UPS equipped with Netvision WEB/SNMP card/external box" "snmp-ups (experimental)" - -"Soltec" "Winmate 525/625/800/1000" "" "safenet" - -"Soyntec" "Sekury C 500" "" "megatec" -"Soyntec" "Sekury C 800" "" "megatec" - -"SquareOne Power" "QP1000" "" "megatec" - -"Sun" "ILOM Management Module" "1 outlet" "powerman-pdu (experimental)" - -"SuperPower" "HP360, Hope-550" "" "megatec" - -"SVEN" "Power Pro+ series" "USB" "megatec_usb" -"SVEN" "Power Smart RM 2000" "USB" "megatec_usb" - -"Sweex" "500/1000" "smart - shipped with SafeNet" "safenet" -"Sweex" "500/1000" "" "genericups upstype=7" -"Sweex" "1000" "USB" "richcomm_usb" -"Sweex" "(various)" "" "megatec" - -"Sysgration" "UPGUARDS Pro650" "" "megatec" - -"Tecnoware" "Easy Power 1200" "" "megatec" - -"Tripp-Lite" "INTERNETOFFICE700" "USB" "tripplite_usb" -"Tripp-Lite" "OMNIVS1000" "USB" "tripplite_usb" -"Tripp-Lite" "OMNIVS1500XL" "USB" "tripplite_usb" -"Tripp-Lite" "SMART700USB" "USB" "tripplite_usb" -"Tripp-Lite" "SMART1500RM2U" "USB" "tripplite_usb" -"Tripp-Lite" "SMART550USB" "USB" "tripplite_usb" -"Tripp-Lite" "SMART2200RMXL2U" "USB, older models" "tripplite_usb (experimental)" -"Tripp-Lite" "SmartUPS" "" "tripplite" -"Tripp-Lite" "SmartOnline" "" "tripplitesu" -"Tripp-Lite" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5" -"Tripp-Lite" "OMNI1000LCD" "USB" "usbhid-ups" -"Tripp-Lite" "OMNI900LCD" "USB" "usbhid-ups" -"Tripp-Lite" "OMNI650LCD" "USB" "usbhid-ups" -"Tripp-Lite" "1500 LCD" "USB" "usbhid-ups" -"Tripp-Lite" "AVR550U" "USB" "usbhid-ups" -"Tripp-Lite" "AVR750U" "USB" "usbhid-ups" -"Tripp-Lite" "ECO550UPS" "USB" "usbhid-ups" -"Tripp-Lite" "SmartOnline SU1500RTXL2ua" "USB" "usbhid-ups" -"Tripp-Lite" "smart2200RMXL2U" "USB, newer models" "usbhid-ups" - -"Trust" "UPS 1000 Management PW-4105" "" "megatec" -"Trust" "UPS 1200VA Management PW-4120M" "" "megatec" -"Trust" "UPS 1300VA Management PW-4130M" "" "megatec" - -"UNITEK" "ALPHA 500 IC" "" "megatec dtr=0 rts=1" -"UNITEK" "Alpha 1000is" "" "megatec" -"UNITEK" "Alpha 500" "" "megatec" -"UNITEK" "Alpha 500 ipE" "" "megatec" -"UNITEK" "Alpha 2600" "" "megatec" -"UNITEK" "Alpha 1200Sx" "USB" "megatec_usb" -"UNITEK" "Alpha 1250xD" "USB" "megatec_usb" - -"UPSonic" "CXR1000" "" "megatec" -"UPSonic" "LAN Saver 600" "" "genericups upstype=0" -"UPSonic" "Power Guardian" "" "genericups upstype=7" -"UPSonic" "PrOffice 650" "USB" "megatec_usb" -"UPSonic" "DS-800" "USB" "megatec_usb" - -"Various" "(various)" "SEC protocol" "gamatronic" -"Various" "(various)" "Generic RUPS model" "genericups upstype=4" -"Various" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21" -"Various" "(various)" "Q1 / Megatec protocol" "megatec" -"Various" "(various)" "PhoenixTec protocol" "bestups" -"Various" "(various)" "SNMP - RFC 1628" "snmp-ups (experimental)" -"Various" "(various)" "Safenet software" "safenet" - -"Victron/IMV" "(various)" "" "victronups" -"Victron/IMV" "Lite" "crack cable" "genericups upstype=10" - -"Viewsonic" "PowerES" "420E" "optiups" - -"WinPower" "CPM-800" "" "megatec" - -"WTI" "RPS-10" "10 outlets" "powerman-pdu (experimental)" -"WTI" "NPS" "8 outlets" "powerman-pdu (experimental)" diff --git a/data/driver.list.in b/data/driver.list.in new file mode 100644 index 0000000..f5501c7 --- /dev/null +++ b/data/driver.list.in @@ -0,0 +1,761 @@ +# Network UPS Tools - @PACKAGE_VERSION@ - Hardware Compatibility List +# version=2 +# +# This file is used for various purposes, like building the HTML compatibility +# list or displaying information in NUT configuration tools. +# +# If you write a new driver, modify an existing one to add more support, +# or just know about some equipment that isn't listed but should be, +# please send us a patch to update this file. +# +# Format: +# ======= +# +# +# Details: +# ======== +# - device type: +# "ups" for Uninterruptible Power Supply +# "pdu" for Power Distributions Unit +# "scd" for Solar Controlers Device +# +# - support level: a number from "1" to "5" (stars) meaning: +# * protocol based on reverse engineering +# ** based on fragments of publicly available protocol +# *** based on publicly available protocol +# **** vendor provided protocol +# ***** vendor provided protocol and hardware +# +# - driver [parameters]: mention the driver(s) (separated by "or" if there are +# several possibilities. Any mandatory parameter(s) must be referenced, as +# they will be parsed by configuration helper softwares. +# For example, genericups entries must mention the "upstype=nn" format. +# +# Duplicate text in the last field will be cooked out during the conversion +# to HTML with ROWSPAN magic. They must be an exact match for this to work. + +"Ablerex" "ups" "2" "MS-RT" "" "blazer_ser" +"Ablerex" "ups" "2" "625L" "USB" "blazer_usb" +"Ablerex" "ups" "2" "Hope Office 400/600" "" "blazer_ser" + +"ActivePower" "ups" "2" "400VA" "" "blazer_ser" +"ActivePower" "ups" "2" "1400VA" "" "blazer_ser" +"ActivePower" "ups" "2" "2000VA" "" "blazer_ser" + +"Advice" "ups" "2" "TopGuard 2000" "" "blazer_ser" + +"AEC" "ups" "1" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21" + +"APC" "ups" "1" "Back-UPS Pro" "" "apcsmart" +"APC" "ups" "1" "Matrix-UPS" "" "apcsmart" +"APC" "ups" "1" "Smart-UPS" "" "apcsmart" +"APC" "ups" "2" "Back-UPS Pro USB" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS USB" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS RS USB" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS LS USB" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS ES/CyberFort 350" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS BF500" "USB" "usbhid-ups" +"APC" "ups" "2" "BACK-UPS XS LCD" "USB" "usbhid-ups" +"APC" "ups" "2" "Smart-UPS USB" "USB" "usbhid-ups" +"APC" "ups" "1" "Back-UPS" "940-0095A/C cables" "genericups upstype=1" +"APC" "ups" "1" "Back-UPS" "940-0020B/C cables" "genericups upstype=2" +"APC" "ups" "1" "Back-UPS" "940-0023A cable" "genericups upstype=9" +"APC" "ups" "1" "Back-UPS Office" "940-0119A cable" "genericups upstype=12" +"APC" "ups" "1" "Back-UPS RS 500" "custom non-USB cable" "genericups upstype=20" +"APC" "pdu" "1" "Masterswitch" "940-0020 cable" "genericups upstype=12" +"APC" "pdu" "1" "AP9210" "8 outlets" "powerman-pdu (experimental)" +"APC" "pdu" "1" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)" +"APC" "pdu" "3" "(various)" "SNMP monitoring card" "snmp-ups (experimental)" + +"Aphel" "pdu" "3" "various PDU" "" "snmp-ups (experimental)" + +"Apollo" "ups" "1" "1000A" "" "genericups upstype=4" +"Apollo" "ups" "1" "1000F" "" "genericups upstype=4" + +"Appro" "pdu" "1" "SWPDU" "48 outlets" "powerman-pdu (experimental)" + +"Atlantis Land" "ups" "2" "A03-P826" "" "blazer_ser" + +"Baytech" "pdu" "1" "RPC3" "8 outlets" "powerman-pdu (experimental)" +"Baytech" "pdu" "1" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)" +"Baytech" "pdu" "1" "RPC28-30NC" "20 outlets" "powerman-pdu (experimental)" +"Baytech" "pdu" "3" "various RPC" "" "snmp-ups" + +"Belkin" "ups" "2" "Active Battery Backup BU30 series" "USB" "blazer_usb" +"Belkin" "ups" "1" "Home Office F6H350-SER" "" "genericups upstype=7" +"Belkin" "ups" "1" "Home Office F6H500-SER" "" "genericups upstype=7" +"Belkin" "ups" "1" "Home Office F6H650-SER" "" "genericups upstype=7" +"Belkin" "ups" "2" "F6H375-USB" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" +"Belkin" "ups" "2" "F6H375-USB" "USB (2007 models, vendor id: 0665)" "blazer_usb" +"Belkin" "ups" "2" "Office Series F6C550-AVR" "USB" "usbhid-ups" +"Belkin" "ups" "2" "Regulator Pro" "F6C525-SER, F6C625-SER" "belkin" +"Belkin" "ups" "1" "Resource" "" "genericups upstype=4" +"Belkin" "ups" "2" "Small Enterprise F6C1500-TW-RK" "serial port" "belkin" +"Belkin" "ups" "2" "Small Enterprise F6C1500-TW-RK" "USB" "usbhid-ups" +"Belkin" "ups" "2" "Universal UPS F6C100-UNV" "USB" "usbhid-ups" +"Belkin" "ups" "1" "Universal UPS F6C120-UNV" "serial port" "belkinunv" +"Belkin" "ups" "2" "Universal UPS F6C120-UNV" "USB" "usbhid-ups" +"Belkin" "ups" "1" "Universal UPS F6C800-UNV" "serial port" "belkinunv" +"Belkin" "ups" "2" "Universal UPS F6C800-UNV" "USB" "usbhid-ups" +"Belkin" "ups" "1" "Universal UPS F6C1100-UNV" "serial port (<= 2005 models)" "belkinunv" +"Belkin" "ups" "2" "Universal UPS F6C1100-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" +"Belkin" "ups" "2" "Universal UPS F6C1100-UNV" "USB (2007 models, vendor id: 0665)" "blazer_usb" +"Belkin" "ups" "2" "Universal UPS F6C1200-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" +"Belkin" "ups" "2" "Universal UPS F6C1200-UNV" "USB (2007 models, vendor id: 0665)" "blazer_usb" +"Belkin" "ups" "2" "Universal UPS F6H350deUNV" "serial port" "blazer_ser" +"Belkin" "ups" "2" "Universal UPS F6H350ukUNV" "serial port" "blazer_ser" +"Belkin" "ups" "2" "Universal UPS F6H500ukUNV" "serial port" "blazer_ser" +"Belkin" "ups" "2" "Universal UPS F6H650ukUNV" "serial port" "blazer_ser" + +"Best Power" "ups" "1" "Fortress (older)" "" "bestfortress" +"Best Power" "ups" "1" "Fortress (newer)" "" "bestups" +"Best Power" "ups" "1" "Fortress Telecom" "" "bestups" +"Best Power" "ups" "1" "Axxium Rackmount" "" "bestups" +"Best Power" "ups" "1" "Patriot Pro" "" "bestups" +"Best Power" "ups" "1" "Patriot Pro II" "" "bestups" +"Best Power" "ups" "1" "Patriot" "INT51 cable" "genericups upstype=6" +"Best Power" "ups" "1" "Micro-Ferrups" "" "bestuferrups" +"Best Power" "ups" "1" "Fortress/Ferrups" "f-command support" "bestfcom" + +"Chloride" "ups" "2" "Desk Power 650" "serial port" "blazer_ser" + +"Cito Power" "ups" "2" "CPG-SR1000" "" "blazer_ser" + +"Clary" "ups" "4" "ST-800" "" "gamatronic" + +"Compaq" "ups" "4" "T1500h" "" "upscode2 use_pre_lf" +"Compaq" "ups" "4" "R3000h" "" "upscode2" +"Compaq" "ups" "4" "R3000 XR" "" "bcmxcp" +"Compaq" "ups" "4" "R5500 XR" "" "bcmxcp" + +"Cyber Power Systems" "ups" "1" "320AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "500AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "650AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "700AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "800AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "850AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "900AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1250AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1500AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "Power99" "" "genericups upstype=7" +"Cyber Power Systems" "ups" "1" "550SL" "" "genericups upstype=7" +"Cyber Power Systems" "ups" "1" "725SL" "" "genericups upstype=7" +"Cyber Power Systems" "ups" "1" "CPS825VA" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1100AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1200AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "1500AVR-HO" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "PR2200" "" "powerpanel" +"Cyber Power Systems" "ups" "2" "PR3000E" "" "powerpanel" +"Cyber Power Systems" "ups" "2" "685AVR" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "800AVR" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "AE550" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "CP 1500C" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "OR2200LCDRM2U" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "Value 400E" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "Value 600E" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "Value 800E" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups" + +"Cyclades" "pdu" "1" "PM8" "8 outlets" "powerman-pdu (experimental)" +"Cyclades" "pdu" "1" "PM10" "10 outlets" "powerman-pdu (experimental)" + +"Dell" "ups" "5" "Tower 500W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Tower 500W LV / HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 1500W LV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 1500W LV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 2300W LV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 2300W LV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, USB port" "usbhid-ups" +"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Rack 5600W HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack 5600W HV" "Serial port" "newmge-shut" + +"Delta" "ups" "1" "GES602N" "" "belkin" + +"Deltec" "ups" "1" "PowerRite Pro II" "" "genericups upstype=15" + +"Digital Loggers" "pdu" "1" "LPC, EPCR2, DIN" "8 outlets" "powerman-pdu (experimental)" + +"Digitus" "ups" "2" "DN-170020" "" "blazer_ser" + +"Dynamix" "ups" "2" "UPS1700D" "" "blazer_ser" +"Dynamix" "ups" "2" "UPS-650VA" "" "blazer_ser" + +"Dynex" "ups" "1" "975AVR" "" "genericups upstype=7" +"Dynex" "ups" "2" "DX-800U" "USB" "usbhid-ups" + +"Eaton" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" +"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" +"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups" +"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "EX 700/1000/1500 VA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "Nova AVR 625/1250" "USB" "usbhid-ups" +"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" +"Eaton" "ups" "5" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" +"Eaton" "ups" "5" "E Series NV UPS 400-2000 VA" "" "blazer_usb" +"Eaton" "ups" "5" "E Series DX UPS 1-20 kVA" "" "mge-utalk" +"Eaton" "ups" "5" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" +"Eaton" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" +"Eaton" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" +"Eaton" "ups" "5" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" +"Eaton" "ups" "5" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" +"Eaton" "pdu" "5" "ePDU Managed" "" "snmp-ups (experimental)" +"Eaton" "pdu" "5" "ePDU Monitored" "" "snmp-ups or netxml-ups" +"Eaton" "ups" "5" "Powerware 9130" "" "bcmxcp or usbhid-ups" +"Eaton" "ups" "5" "Powerware 5130" "" "usbhid-ups" +"Eaton" "ups" "5" "9395" "Serial port" "bcmxcp" +"Eaton" "ups" "5" "Best Ferrups" "older ConnectUPS" "snmp-ups" +"Eaton" "ups" "5" "ConnectUPS X / BD / E Slot" "Serial Pass-through mode" "bcmxcp" +"Eaton" "ups" "5" "ConnectUPS X / BD / E Slot" "Network port" "snmp-ups" + +"Effekta" "ups" "2" "MI/MT/MH" "2502 cable" "blazer_ser" +"Effekta" "ups" "2" "RM2000MH" "" "blazer_ser" + +"Energy Sistem" "ups" "2" "(various)" "" "blazer_ser" + +"ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7" +"ETA" "ups" "1" "mini+UPS PRO" "UPS Explorer cable" "etapro" + +"Ever UPS" "ups" "1" "NET *-DPC" "" "everups" +"Ever UPS" "ups" "1" "AP *-PRO" "" "everups" + +"Ever-Power" "ups" "1" "625/1000" "" "safenet" + +"Exide" "ups" "1" "NetUPS SE" "" "genericups upstype=15" + +"Fenton Technologies" "ups" "1" "PowerPal" "P-series" "safenet" +"Fenton Technologies" "ups" "5" "PowerPal" "L-series" "blazer_ser" +"Fenton Technologies" "ups" "5" "PowerOn" "" "blazer_ser" +"Fenton Technologies" "ups" "5" "PowerPure" "" "blazer_ser" + +"Fairstone" "ups" "1" "L525/L625/L750" "" "safenet" + +"Fideltronik" "ups" "1" "Ares 700 and larger" "" "genericups upstype=6" +"Fideltronik" "ups" "1" "Other Ares models" "" "genericups upstype=19" + +"Fiskars" "ups" "4" "PowerRite MAX" "" "upscode2" +"Fiskars" "ups" "4" "PowerServer 10" "" "upscode2" +"Fiskars" "ups" "4" "PowerServer 30" "" "upscode2" +"Fiskars" "ups" "4" "9200" "UPS Information Unit" "upscode2" + +"Forza Power Technologies" "ups" "2" "SL-1001" "USB" "blazer_usb" + +"FSP" "ups" "2" "EP650" "USB" "blazer_usb" + +"Gamatronic" "ups" "5" "All models with alarm interface" "" "genericups upstype=22" +"Gamatronic" "ups" "2" "G-SmartCompact 2000" "" "blazer_ser" +"Gamatronic" "ups" "5" "MP110/210" "" "gamatronic" +"Gamatronic" "ups" "5" "MS-T" "" "gamatronic" +"Gamatronic" "ups" "5" "MS" "" "gamatronic" +"Gamatronic" "ups" "5" "µPS3/1" "" "gamatronic" + +"Geek Squad" "ups" "2" "GS1285U" "USB" "usbhid-ups" + +"Gemini" "ups" "1" "UPS625/UPS1000" "" "safenet" + +"HP" "ups" "1" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart" +"HP" "ups" "4" "R3000 XR" "" "bcmxcp" +"HP" "ups" "4" "R5500 XR" "" "bcmxcp" +"HP" "ups" "2" "R1500 G2" "" "bcmxcp" +"HP" "ups" "2" "R/T 2200 G2" "" "usbhid-ups" +"HP" "ups" "2" "T500" "older models" "bcmxcp_usb" +"HP" "ups" "2" "T750 INTL" "" "usbhid-ups" +"HP" "ups" "2" "T750" "older models" "bcmxcp_usb" +"HP" "ups" "2" "T1000 INTL" "" "usbhid-ups" +"HP" "ups" "2" "T1500 INTL" "" "usbhid-ups" +"HP" "ups" "2" "T750 G2" "" "usbhid-ups" +"HP" "ups" "2" "R1500 G2 INTL" "" "usbhid-ups" +"HP" "pdu" "1" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)" + +"IBM" "pdu" "1" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)" + +"ICS" "pdu" "1" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)" + +"iDowell" "ups" "2" "iBox UPS" "" "usbhid-ups" + +"INELT" "ups" "2" "Monolith 1000LT" "" "blazer_ser" +"INELT" "ups" "2" "Monolith 3000RT" "" "blazer_ser" + +"Inform" "ups" "1" "GUARD" "Line Interactive AP model" "powercom" +"Inform" "ups" "2" "Guard S 1500AP" "" "blazer_ser" +"Inform" "ups" "2" "Informer Compact 1000VA" "" "blazer_ser" + +"Infosec" "ups" "2" "iPEL 350" "" "blazer_ser" +"Infosec" "ups" "2" "iPEL 500" "" "blazer_ser" +"Infosec" "ups" "2" "iPEL 750" "" "blazer_ser" +"Infosec" "ups" "2" "iPEL 1000" "" "blazer_ser" +"Infosec" "ups" "2" "500XP" "" "blazer_ser" +"Infosec" "ups" "2" "XP 500" "USB" "blazer_usb" +"Infosec" "ups" "2" "XP 1000" "" "blazer_ser" + +"IPMI" "pdu" "1" "" "" "powerman-pdu (experimental)" + +"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "" "blazer_ser" +"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "USB" "blazer_usb (experimental)" +"Ippon" "ups" "2" "Back Comfo Pro 600/800" "" "blazer_ser" +"Ippon" "ups" "2" "Back Comfo Pro 600/800" "USB" "blazer_usb (experimental)" +"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "" "blazer_ser" +"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "USB" "blazer_usb (experimental)" +"Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "" "blazer_ser" +"Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "USB" "blazer_usb (experimental)" +"Ippon" "ups" "2" "(various)" "" "blazer_ser" +"Ippon" "ups" "2" "(various)" "USB" "blazer_usb" + +"IVT" "scd" "1" "SCD series" "" "ivtscd" + +"Jageson Technology" "ups" "1" "Jasuny USPS" "" "genericups upstype=4" + +"Kebo" "ups" "2" "1200D/D Series" "" "blazer_ser" + +"Krauler" "ups" "2" "UP-D1200VA" "USB" "blazer_usb" +"Krauler" "ups" "2" "UP-M500VA" "USB" "blazer_usb" + +"Lestar" "ups" "2" "MD-800E" "" "blazer_ser" + +"Liebert" "ups" "2" "ITON 600VA" "" "blazer_ser" +"Liebert" "ups" "5" "UPStation GXT2" "contact-closure cable" "liebert" +"Liebert" "ups" "1" "GXT2-3000RT230" "" "liebert-esp2 (experimental)" +"Liebert" "ups" "2" "PowerSure Personal XT" "USB" "usbhid-ups" +"Liebert" "ups" "2" "PowerSure PSA" "USB" "usbhid-ups" + +"LNXI" "pdu" "1" "Icebox" "10 outlets" "powerman-pdu (experimental)" + +"Masterguard" "ups" "1" "(various)" "" "masterguard" + +"Maxxtro" "ups" "2" "UPS 600 VA" "serial port" "blazer_ser" + +"Mecer" "ups" "2" "ME-2000" "" "blazer_ser" + +"Meta System" "ups" "1" "HF Line" "1..4 boards" "metasys" +"Meta System" "ups" "1" "HF Line \/2" "5..8 boards" "metasys" +"Meta System" "ups" "1" "HF Millennium 810" "" "metasys" +"Meta System" "ups" "1" "HF Millennium 820" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 910" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 920" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 930" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 940" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 950" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 960" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 970" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 980" "" "metasys" +"Meta System" "ups" "1" "ECO Network 750" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1000" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1050" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1500" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1800" "" "metasys" +"Meta System" "ups" "1" "ECO Network 2000" "" "metasys" +"Meta System" "ups" "1" "ECO Network 2100" "" "metasys" +"Meta System" "ups" "1" "ECO Network 2500" "" "metasys" +"Meta System" "ups" "1" "ECO Network 3000" "" "metasys" +"Meta System" "ups" "1" "ECO 305" "" "metasys" +"Meta System" "ups" "1" "ECO 308" "" "metasys" +"Meta System" "ups" "1" "ECO 311" "" "metasys" +"Meta System" "ups" "1" "ECO 511" "" "metasys" +"Meta System" "ups" "1" "ECO 516" "" "metasys" +"Meta System" "ups" "1" "ECO 519" "" "metasys" +"Meta System" "ups" "1" "ECO 522" "" "metasys" +"Meta System" "ups" "1" "ally HF 800" "" "metasys" +"Meta System" "ups" "1" "ally HF 1000" "" "metasys" +"Meta System" "ups" "1" "ally HF 1250" "" "metasys" +"Meta System" "ups" "1" "ally HF 1600" "" "metasys" +"Meta System" "ups" "1" "ally HF 2000" "" "metasys" +"Meta System" "ups" "1" "ally HF 2500" "" "metasys" +"Meta System" "ups" "1" "Megaline 1250" "" "metasys" +"Meta System" "ups" "1" "Megaline 2500" "" "metasys" +"Meta System" "ups" "1" "Megaline 3750" "" "metasys" +"Meta System" "ups" "1" "Megaline 5000" "" "metasys" +"Meta System" "ups" "1" "Megaline 6250" "" "metasys" +"Meta System" "ups" "1" "Megaline 7500" "" "metasys" +"Meta System" "ups" "1" "Megaline 8750" "" "metasys" +"Meta System" "ups" "1" "Megaline 10000" "" "metasys" + +"MGE Office Protection Systems" "ups" "5" "Protection Center 500/675 VA" "USB" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" +"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" +"MGE Office Protection Systems" "ups" "5" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" + +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Protection Center 420" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Protection Center 500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Protection Center 675" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 USB" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 USB" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USB" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USB" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "USB" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 Serial" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 Serial" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse S" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium S" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "Serial cable" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C / EX RT" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Esprit" "" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "Serial port" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "Serial port" "mge-shut or newmge-shut or mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C" "" "mge-shut or newmge-shut or mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar ES+" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV+" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar SV" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EX" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXL" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar PSX" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar SX" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Comet EXtreme" "" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP card (ref 66062)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar (SNMP)" "SNMP card (ref 66045)" "snmp-ups (experimental)" +"MGE UPS SYSTEMS" "ups" "5" "UM-Link (SNMP)" "Not a UPS (ref 66850)" "snmp-ups (experimental)" + +"MicroDowell" "ups" "1" "B.Box BP 500" "" "powerpanel" +"MicroDowell" "ups" "1" "B.Box BP 750" "" "powerpanel" +"MicroDowell" "ups" "1" "B.Box BP 1000" "" "powerpanel" +"MicroDowell" "ups" "1" "B.Box BP 1500" "" "powerpanel" +"MicroDowell" "ups" "5" "Enterprise B8" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise B10" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N8" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N11" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N15" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N20" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N22" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N30" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N40" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N50" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise N60" "" "microdowell" +"MicroDowell" "ups" "5" "Enterprise HiBox ST" "" "microdowell" + +"Microsol" "ups" "4" "Solis 1.0" "1000VA" "solis" +"Microsol" "ups" "4" "Solis 1.5" "1500VA" "solis" +"Microsol" "ups" "4" "Solis 2.0" "2000VA" "solis" +"Microsol" "ups" "4" "Solis 3.0" "3000VA" "solis" +"Microsol" "ups" "5" "Rhino 6.0" "6000VA" "rhino" +"Microsol" "ups" "5" "Rhino 7.5" "7500VA" "rhino" +"Microsol" "ups" "5" "Rhino 10.0" "10000VA" "rhino" +"Microsol" "ups" "5" "Rhino 20.0" "20000VA" "rhino" + +"Mustek" "ups" "2" "Powermust" "400VA Plus" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "600VA Plus" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "800VA Pro" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "1000VA Plus" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "1400VA Plus" "blazer_ser" +"Mustek" "ups" "2" "Powermust" "2000VA USB" "blazer_ser" +"Mustek" "ups" "2" "Powermust Office 650" "USB" "blazer_usb" +"Mustek" "ups" "2" "PowerMust 424 / 636 / 848" "USB" "blazer_usb" +"Mustek" "ups" "2" "Various" "" "blazer_ser" + +"Neus" "ups" "2" "400va / 600va" "" "blazer_ser" + +"Nitram" "ups" "1" "Elite 500" "" "genericups upstype=8" +"Nitram" "ups" "1" "Elite 2002" "" "genericups upstype=16" +"Nitram" "ups" "1" "Elite 2005" "" "powerpanel" + +"Oneac" "ups" "1" "ON400" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON600" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON900" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1300" "advanced interface" "oneac" +"Oneac" "ups" "1" "EG Series" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON700" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON700XAU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON700XIU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1000" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1000XAU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1000XIU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1500" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1500XAU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON1500XIU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON2000" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON2000XAU" "advanced interface" "oneac" +"Oneac" "ups" "1" "ON2000XIU" "advanced interface" "oneac" + +"Online" "ups" "1" "P-Series" "" "genericups upstype=14" +"Online" "ups" "1" "Zinto D" "" "optiups" + +"OnLite" "ups" "2" "AQUA" "50" "blazer_ser" + +"Opti-UPS" "ups" "1" "PowerES" "420E" "optiups" + +"Orvaldi Power Protection" "ups" "2" "various" "not 400 or 600" "blazer_ser" + +"Phasak" "ups" "2" "400VA / 600VA" "" "blazer_ser" + +"Plexus" "ups" "2" "500VA" "USB" "blazer_usb" +"Plexus" "ups" "2" "1000VA Pro" "USB" "blazer_usb" + +"Powercom" "ups" "4" "SMK" "" "blazer_ser" +"Powercom" "ups" "4" "SXL" "" "blazer_ser" +"Powercom" "ups" "4" "ULT" "" "blazer_ser" +"Powercom" "ups" "4" "Trust 425/625" "" "powercom" +"Powercom" "ups" "4" "Advice Partner/King Pr750" "" "powercom" +"Powercom" "ups" "4" "Black Knight PRO" "" "powercom" +"Powercom" "ups" "5" "Black Knight PRO" "USB (2009 models, product id: 00a6)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "Smart KING Pro (all Smart series)" "" "powercom" +"Powercom" "ups" "5" "Smart KING Pro (all Smart series)" "USB (2009 models, product id: 00a3)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "Imperial" "" "powercom" +"Powercom" "ups" "5" "Imperial" "USB (2009 models, product id: 00a2)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "Vanguard" "" "blazer_ser" +"Powercom" "ups" "5" "Vanguard" "USB (2009 models, product id: 00a5)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "WOW" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" +"Powercom" "ups" "5" "WOW" "USB (2009 models, product id: 00a4)" "usbhid-ups (experimental)" +"Powercom" "ups" "4" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" +"Powercom" "ups" "5" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)" + +"PowerGuard" "ups" "2" "PG-600" "" "blazer_ser" + +"PowerKinetics" "ups" "1" "9001" "" "genericups upstype=17" +"PowerKinetics" "ups" "2" "BlackOut Buster" "" "blazer_ser" + +"PowerMan" "ups" "2" "RealSmart 800" "" "blazer_ser" +"PowerMan" "ups" "2" "RealSmart 1000" "" "blazer_ser" +"PowerMan" "ups" "1" "BackPro" "" "genericups upstype=4" + +"PowerTech" "ups" "1" "Comp1000" "DTR cable power" "genericups upstype=3" +"PowerTech" "ups" "2" "SMK-800" "" "blazer_ser" + +"PowerWalker" "ups" "2" "Line-Interactive VI 1000" "" "blazer_ser" +"PowerWalker" "ups" "2" "Line-Interactive VI 400/800" "" "blazer_ser" +"PowerWalker" "ups" "2" "Line-Interactive VI 600" "" "blazer_ser" +"PowerWalker" "ups" "2" "Line-Interactive VI 1400" "" "blazer_usb" + +"Powerware" "ups" "4" "3110" "" "genericups upstype=7" +"Powerware" "ups" "4" "3115" "" "genericups upstype=11" +"Powerware" "ups" "4" "5119, 5125" "" "genericups upstype=15" +"Powerware" "ups" "4" "5119 RM" "" "genericups upstype=20" +"Powerware" "ups" "5" "5119 RM" "" "upscode2" +"Powerware" "ups" "5" "PW3105" "" "bcmxcp_usb" +"Powerware" "ups" "5" "PW5110" "" "bcmxcp_usb" +"Powerware" "ups" "5" "PW5115" "Serial port" "bcmxcp" +"Powerware" "ups" "5" "PW5115" "USB port" "bcmxcp_usb" +"Powerware" "ups" "5" "PW5125" "" "bcmxcp" +"Powerware" "ups" "5" "PW9120" "Serial port" "bcmxcp" +"Powerware" "ups" "5" "PW9120" "USB port" "bcmxcp_usb" +"Powerware" "ups" "5" "PW9125" "" "bcmxcp" +"Powerware" "ups" "5" "PW9315" "3-phase" "bcmxcp" +"Powerware" "ups" "5" "9110" "" "upscode2" +"Powerware" "ups" "5" "9120" "" "upscode2" +"Powerware" "ups" "5" "9150" "" "upscode2" +"Powerware" "ups" "5" "9305" "" "upscode2" +"Powerware" "ups" "5" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" +"Powerware" "ups" "5" "(various)" "ConnectUPS Web/SNMP card" "snmp-ups (experimental)" + +"Powerwell" "ups" "1" "PM525A/-625A/-800A/-1000A/-1250A" "" "safenet" + +"Phantom" "pdu" "1" "Rackable Systems" "1 outlets" "powerman-pdu (experimental)" + +"Raritan" "pdu" "3" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)" +"Raritan" "pdu" "3" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)" +"Raritan" "pdu" "3" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)" + +"Repotec" "ups" "1" "RPF525/625/800/1000" "" "safenet" +"Repotec" "ups" "1" "RPT-800A" "" "genericups upstype=13" +"Repotec" "ups" "1" "RPT-162A" "" "genericups upstype=13" + +"Rocketfish" "ups" "2" "RF-1000VA / RF-1025VA" "" "usbhid-ups" + +"SmartLabs" "pdu" "1" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)" + +"SMS (Brazil)" "ups" "2" "Manager III" "" "blazer_ser" + +"SOLA" "ups" "1" "305" "cable INT-0025C" "genericups upstype=7" +"SOLA" "ups" "1" "325" "" "bestups" +"SOLA" "ups" "1" "520" "" "bestups" +"SOLA" "ups" "1" "610" "use ID= in ups.conf" "bestups" +"SOLA" "ups" "1" "620" "" "bestups" +"SOLA" "ups" "4" "330" "" "blazer_ser" + +"SOLA/BASIC Mexico" "ups" "1" "various" "ISBMEX protocol" "isbmex" + +"Socomec" "ups" "2" "NeTYS-PE 600VA" "" "blazer_ser" +"Socomec Sicon" "ups" "1" "Egys" "420 VA" "powercom" +"Socomec Sicon" "ups" "3" "Netvision" "UPS equipped with Netvision WEB/SNMP card/external box" "snmp-ups (experimental)" + +"Soltec" "ups" "1" "Winmate 525/625/800/1000" "" "safenet" + +"Soyntec" "ups" "2" "Sekury C 500" "" "blazer_ser" +"Soyntec" "ups" "2" "Sekury C 800" "" "blazer_ser" + +"SquareOne Power" "ups" "2" "QP1000" "" "blazer_ser" + +"Sun" "pdu" "1" "ILOM Management Module" "1 outlet" "powerman-pdu (experimental)" + +"SuperPower" "ups" "2" "HP360, Hope-550" "" "blazer_ser" + +"SVEN" "ups" "2" "Power Pro+ series" "USB" "blazer_usb" +"SVEN" "ups" "2" "Power Smart RM 2000" "USB" "blazer_usb" + +"Sweex" "ups" "1" "500/1000" "smart - shipped with SafeNet" "safenet" +"Sweex" "ups" "1" "500/1000" "" "genericups upstype=7" +"Sweex" "ups" "1" "1000" "USB" "richcomm_usb" +"Sweex" "ups" "2" "(various)" "" "blazer_ser" + +"Sysgration" "ups" "2" "UPGUARDS Pro650" "" "blazer_ser" + +"Tecnoware" "ups" "2" "Easy Power 1200" "" "blazer_ser" + +"Tripp-Lite" "ups" "1" "INTERNETOFFICE700" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "2" "OMNIVS1000" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "OMNIVS1500XL" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "SMART700USB" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "SMART1500RM2U" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "SMART550USB" "USB" "tripplite_usb" +"Tripp-Lite" "ups" "1" "SMART2200RMXL2U" "USB, older models" "tripplite_usb (experimental)" +"Tripp-Lite" "ups" "1" "SmartUPS" "" "tripplite" +"Tripp-Lite" "ups" "1" "SmartOnline" "" "tripplitesu" +"Tripp-Lite" "ups" "1" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5" +"Tripp-Lite" "ups" "2" "OMNI1000LCD" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "OMNI900LCD" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "OMNI650LCD" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "1500 LCD" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "AVR550U" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "AVR750U" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "ECO550UPS" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "SmartOnline SU1500RTXL2ua" "USB" "usbhid-ups" +"Tripp-Lite" "ups" "2" "smart2200RMXL2U" "USB, newer models" "usbhid-ups" + +"Trust" "ups" "2" "UPS 1000 Management PW-4105" "" "blazer_ser" +"Trust" "ups" "2" "UPS 1200VA Management PW-4120M" "" "blazer_ser" +"Trust" "ups" "2" "UPS 1300VA Management PW-4130M" "" "blazer_ser" + +"UNITEK" "ups" "2" "ALPHA 500 IC" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 1000is" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 500" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 500 ipE" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 2600" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha 1200Sx" "USB" "blazer_usb" +"UNITEK" "ups" "2" "Alpha 1250xD" "USB" "blazer_usb" + +"UPSonic" "ups" "2" "CXR1000" "" "blazer_ser" +"UPSonic" "ups" "1" "LAN Saver 600" "" "genericups upstype=0" +"UPSonic" "ups" "1" "Power Guardian" "" "genericups upstype=7" +"UPSonic" "ups" "2" "PrOffice 650" "USB" "blazer_usb" +"UPSonic" "ups" "2" "DS-800" "USB" "blazer_usb" + +"Various" "ups" "4" "(various)" "SEC protocol" "gamatronic" +"Various" "ups" "1" "(various)" "Generic RUPS model" "genericups upstype=4" +"Various" "ups" "1" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21" +"Various" "ups" "2" "(various)" "Q1 / Megatec protocol" "blazer_ser" +"Various" "ups" "2" "(various)" "PhoenixTec protocol" "bestups" +"Various" "ups" "3" "(various)" "SNMP - RFC 1628" "snmp-ups (experimental)" +"Various" "ups" "1" "(various)" "Safenet software" "safenet" + +"Victron/IMV" "ups" "1" "(various)" "" "victronups" +"Victron/IMV" "ups" "1" "Lite" "crack cable" "genericups upstype=10" + +"Viewsonic" "ups" "1" "PowerES" "420E" "optiups" + +"WinPower" "ups" "2" "CPM-800" "" "blazer_ser" + +"WTI" "pdu" "1" "RPS-10" "10 outlets" "powerman-pdu (experimental)" +"WTI" "pdu" "1" "NPS" "8 outlets" "powerman-pdu (experimental)" diff --git a/data/epdu-managed.dev b/data/epdu-managed.dev new file mode 100644 index 0000000..731b738 --- /dev/null +++ b/data/epdu-managed.dev @@ -0,0 +1,70 @@ +# dummy-ups example device definition file +# +# Generated using: +# $ upsc ups@host > epdu-managed.dev + +device.mfr: EATON | Powerware +device.model: DBQ10634/5 +device.serial: ADO6750531 +device.type: pdu +driver.name: snmp-ups +driver.parameter.pollinterval: 2 +driver.parameter.port: somewhere.org +driver.version: 2.3.0-1540MS +driver.version.internal: 0.44 (mib: aphel_revelation 0.2) +outlet.1.current: 0.00 +outlet.1.current.maximum: 0.00 +outlet.1.desc: Outlet 1 +outlet.1.id: 1 +outlet.1.power: 0.00 +outlet.1.powerfactor: 0.05 +outlet.1.realpower: 0.00 +outlet.1.status: on +outlet.1.switchable: 0.00 +outlet.1.voltage: 247.00 +outlet.2.current: 0.00 +outlet.2.current.maximum: 0.16 +outlet.2.desc: Outlet 2 +outlet.2.id: 2 +outlet.2.power: 0.00 +outlet.2.powerfactor: 0.01 +outlet.2.realpower: 0.00 +outlet.2.status: on +outlet.2.switchable: 1.00 +outlet.2.voltage: 247.00 +outlet.3.current: 0.00 +outlet.3.current.maximum: 0.16 +outlet.3.desc: Outlet 3 +outlet.3.id: 3 +outlet.3.power: 0.00 +outlet.3.powerfactor: 0.13 +outlet.3.realpower: 0.00 +outlet.3.status: on +outlet.3.switchable: 2.00 +outlet.3.voltage: 247.00 +outlet.4.current: 0.19 +outlet.4.current.maximum: 0.56 +outlet.4.desc: Outlet 4 +outlet.4.id: 2 +outlet.4.power: 46.00 +outlet.4.powerfactor: 0.60 +outlet.4.realpower: 28.00 +outlet.4.status: on +outlet.4.switchable: 3.00 +outlet.4.voltage: 247.00 +outlet.count: 4.00 +outlet.current: 0.19 +outlet.desc: All outlets +outlet.id: 0 +outlet.power: 46.00 +outlet.realpower: 28.00 +outlet.voltage: 247.00 +ups.firmware: 01.01.00 +ups.id: my_device234 +ups.macaddr: +ups.mfr: EATON | Powerware +ups.model: DBQ10634/5 +ups.serial: ADO6750531 +ups.status: +ups.temperature: 49.00 +device.type: pdu diff --git a/data/evolution500.dev b/data/evolution500.seq similarity index 86% rename from data/evolution500.dev rename to data/evolution500.seq index 697d2a1..60e7966 100644 --- a/data/evolution500.dev +++ b/data/evolution500.seq @@ -1,4 +1,9 @@ -# dummy-ups example definition file ; generated with "upsc ups@host > evolution500.dev" +# dummy-ups example power sequence file +# +# Base is the same as .dev files, generated using: +# $ upsc ups@host > evolution500.seq +# +# TIMER have then been added to generate power events. battery.charge: 90 battery.charge.low: 30 diff --git a/data/html/Makefile.in b/data/html/Makefile.in index 09ccc72..7685a37 100644 --- a/data/html/Makefile.in +++ b/data/html/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -39,12 +39,13 @@ subdir = data/html DIST_COMMON = README $(am__dist_html_DATA_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/header.html.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ - $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -54,6 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -90,9 +92,11 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)" DATA = $(dist_html_DATA) $(nodist_html_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -105,8 +109,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -123,7 +129,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ HAL_FDI_PATH = @HAL_FDI_PATH@ HAL_USER = @HAL_USER@ -HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -134,22 +139,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/docs/FAQ b/docs/FAQ deleted file mode 100644 index 0a48607..0000000 --- a/docs/FAQ +++ /dev/null @@ -1,822 +0,0 @@ -Desc: Frequently Asked Questions -File: FAQ -Date: 20 January 2006 -Auth: Russell Kroll - Arnaud Quette - ------------------------------------------------------------------------------ - - Q: I just upgraded, and ... - - A: You have read UPGRADING in the base directory of the distribution, - right? If not, go read it now, then come back to this file if your - question wasn't answered in there. - ------------------------------------------------------------------------------ - - Q: upsstats says "Error: can't open template file (upsstats.html)". - How do I fix this? - - A: Go into your configuration path (/usr/local/ups/etc by default) and - copy the sample template files over to their real names. The sample - template files are installed with 'make install-cgi-conf' and can - also be found inside the source distribution in the conf directory. - ------------------------------------------------------------------------------ - - Q: upsmon fails the login and says "username required" now. - - A: Go read the UPGRADING file again. - ------------------------------------------------------------------------------ - - Q: My 1.4 CGI programs won't talk to my 2.0 upsd. What should I do? - - A: Upgrade the CGI programs to 2.0. While 1.4 was intended as a - compatibility tree that used the new protocol by default, the CGI - programs were not upgraded at the same time. The 1.4 versions - still use the old REQ protocol, and your 2.0 upsd expects GET. - ------------------------------------------------------------------------------ - - Q: I just upgraded from 1.2 and upsmon now fails to start, saying - "Fatal error: insufficient power configured!". Why? - - A: You didn't read the top of the error, where upsmon says that it - ignored the invalid MONITOR line because UPS directives now require - a UPS name. It also means you didn't see the same warning in - UPGRADING. - - At least you saw this in the FAQ before asking the list. - ------------------------------------------------------------------------------ - - Q: My UPS driver now says it's "broken", and won't start. What now? - - Q: My favorite UPS driver disappeared after an upgrade. What now? - - A: Drivers are occasionally removed from the tree if they are no longer - receiving maintenance, or sometimes renamed to better reflect their - hardware support scope or replaced by a more generic driver. - There have been several architectural changes to the driver code - in recent times, and drivers which were not converted by someone - are eventually dropped. - - This is called progress. We do this in order to avoid a situation - where someone believes that a driver is being maintained when it is - actually rotting slowly in the tree. It also keeps the tree free of - old compatibility hacks for code that nobody actually uses anyway. - - To get a driver back into current releases, you need to convert it - yourself or get someone to do it for you. This is not difficult. - The hardest part of any driver is decoding the protocol, and that's - already been done in the old version. - ------------------------------------------------------------------------------ - - Q: I just upgraded and now I can't talk to older versions. - - A: Version 2.0 can't communicate with anything before 1.4 due to the - protocol changes. Version 1.4 can communicate with both 2.0 and - most older versions since it was a transitional release and has - compatibility code for both protocols. - ------------------------------------------------------------------------------ - - Q: My UPS driver program won't work. I'm starting it as root, and root - owns the device, so what's the problem? - - A: The drivers drop root privileges long before the serial port is - opened. You'll need to change the permissions on that port so that - their new user id can access it. Normally this is "nobody", but it - may be changed at compile-time by using configure --with-user. - - Read the error message. If you have a permissions mismatch, then - you'll see something like this: - - Network UPS Tools - APC Smart protocol driver 0.60 (1.1.7) - This program is currently running as youruid (UID 1234) - /dev/ttyS2 is owned by user root (UID 0), mode 0600 - Change the port name, or fix the permissions or ownership - of /dev/ttyS2 and try again. - Unable to open /dev/ttyS2: Permission denied - - Now is a good time to point out that using "nobody" is a bad idea, - since it's a hack for NFS access. You should create a new role - account (perhaps called "ups" or "nut"), and use that instead. - - Also, scroll down to the "security domains" question to see an - even better way of restricting privileged operations. Neither the - drivers nor upsd ever need root powers, and that answer tells you - how to make it work. - - A: You can also specify a user with "user=" in the global part of - ups.conf. Just define it before any of your [sections]: - - user = nut - - [myups] - driver = mge-shut - port = /dev/ttyS0 - ------------------------------------------------------------------------------ - - Q: upsc, upsstats, and the other clients say "access denied". The device - communication port (serial, USB or network) permissions are fine, so what - gives? - - A: In this case, "access denied" means the access to upsd, not the device - communication port. You're being denied since the system has no - permission to speak to upsd according to the access controls. - - There can be various reasons. To fix it, check: - - the LISTEN directive in upsd.conf. It should allow your local or remote - access method, - - your firewall rules. Port 3493/tcp must be opened to incoming connexions, - - your tcp-wrappers configuration (hosts.allow and hosts.deny). - - Refer to the upsd(8) and upsd.conf(5) manpages for more information. - ------------------------------------------------------------------------------ - - Q: I have an APC Smart-UPS connected with a grey APC cable and it won't - work. The Back-UPS type in the genericups driver works but then I - don't get to use all the nifty features in there. Why doesn't the - right driver work? - - A: The problem lies in your choice of cable. APC's grey cables - generally only do "dumb" signalling - very basic yes/no info about - the battery and line status. While that is sufficient to detect a - low battery condition while on battery, you miss out on all the - goodies that you paid for. - - Note that the 940-0095B happens to be a grey cable, but it is actually - a dual mode cable and can be used in smart mode. If you have - this cable, you need to edit your ups.conf to look like this: - - [myups] - driver = apcsmart - port = /dev/whatever - cable = 940-0095B - - All other grey cables from APC are assumed to be "dumb". - - If your grey cable isn't the 940-0095B, the solution is to dump that - cable and find one that supports APC's "smart" signalling. Typically - these come with the UPS and are black. If your smart cable has - wandered off, one can be built rather easily with some connectors and - cable - there's no fancy wiring or resistors. - - See this URL for a handy diagram: - - http://random.networkupstools.org/cables/940-0024C.jpg - - There is also a text version of that diagram in the docs/cables - directory of the NUT source distribution. Either one should allow - you to build a good clone of APC's 940-0024C cable. - - There are simpler solutions involving 3 wires that work just fine - too, but Powerchute won't find the loopback DTR-DCD and RTS-CTS and - will be annoyed. If you don't ever plan to use Powerchute, 3 wires - (RxD, TxD, GND) are sufficient. - - It should also be noted that the genericups driver has no way to - detect the UPS, so it will fire up quite happily if it can open the - serial port. Merely having it start up is not necessarily an - indication of success. You should start it and then check the - status with upsc or similar to be sure that it's reading the - hardware properly. - ------------------------------------------------------------------------------ - - Q: Why does configure fail to find gd? - - A: Recent versions of gd should be detected automatically through the - gdlib-config script. Note that gd 2.0.5 through 2.0.7 have an - unusable script, so upgrade to the newest version if you have one - of those installed. - - If you're stuck with an older version of gd, you can use it if you - specify the flags manually. Look in gd's Makefile for "LIBS=", - then use that value when you call configure: - - ./configure --with-gd-libs="" --with-cgi - - If you don't have gd's Makefile available for some reason, you're - in for a lot of trial and error. - ------------------------------------------------------------------------------ - - Q: Why PNG? You used to generate GIF bars with upsimage back in 1998 - or 1999... - - A: http://www.burnallgifs.org/ - ------------------------------------------------------------------------------ - - Q: Why doesn't upsd implement the functionality of upsmon? I have to - run THREE programs to monitor my UPS! - - A: I try to follow the "tool for the job" philosophy. It may mean - more programs running, but the flexibility you get is usually - worth it. - - Yes, the machine with the UPS attached will generally have 3 - processes (driver, upsd, upsmon) running, but this design allows a - much bigger setup. Imagine a data room with a bunch of machines - all drawing power from the same UPS. The rest of them just run - upsmon. - - Besides, if upsmon were rolled into upsd, upsd would get even - bigger than it is now. You'd have one less process, but the - RAM consumption would be pretty close to now. - - See data-room.txt for more configuration ideas and explanations. - - A: If this really bothers you, roll up your sleeves and use the - sockdebug code to write a "upsmon" type program that sits on top of - the state sockets. It won't work over the network, but it means - you don't need upsd. It also means only one host can monitor the - UPS. - - This is also a good option to consider if you can't use networked - monitoring code for security or safety reasons. - - See ideas.txt for more on this and other related topics. - ------------------------------------------------------------------------------ - - Q: Why isn't upssched part of upsmon? - - A: Most users will never have any reason to use upssched. It's - complicated, and getting it right for your situation can be tricky. - Having it live in a separate program saves resources and lets most - people avoid it completely. - ------------------------------------------------------------------------------ - - Q: Why doesn't upsmon send a SIGPWR signal to init so it can deal with - power events? - - A: New versions of the init man page taken from the sysvinit package - are saying that usage of SIGPWR is discouraged, since /dev/initctl - control channel is the preferred way of communication. - - A: The name of the game is portability. Not everyone's init handles - that kind of signalling gracefully. What's more, some admins - might want to do things differently even if they have that kind of - init running. - - So, to be compatible, upsmon just invokes a shell command. If you - want to use init's SIGPWR stuff, just put the right "kill" line in - a shell script and make upsmon call it. Everyone wins. - ------------------------------------------------------------------------------ - - Q: Why can't upsset read my upsset.passwd file? - - A: You have an old version of upsset installed, since the current - version doesn't use that file. Install a new version and then try - it again. - - Be sure to secure your CGI directory as instructed in the - upsset.conf. - ------------------------------------------------------------------------------ - - Q: Why won't bestups talk to my Best Fortress UPS? - - A: There are at least two different protocols being used for hardware - with very similar names. The bestups driver tends to support the - units built around the newer "PhoenixTec" protocol. - - Previous releases of this software included a driver called - bestfortress which supported the older Best hardware. See the - earlier entries about updating old drivers which have been removed - from the tree. - ------------------------------------------------------------------------------ - - Q: What's this about "data stale"? - - A: It means your UPS driver hasn't updated things in a little while. - upsd refuses to serve up data that isn't fresh, so you get the - errors about staleness. - - If this happens to you, make sure your driver is still running. - Also look at the syslog. Sometimes the driver loses the connection - to the UPS, and that will also make the data go stale. - - Note: some very slow machines have trouble keeping up with the - serial ports during periods of extreme load. My old 486 used to - flip between "stale" and "OK" while running backups. - - If this happens a lot, you might consider cranking up DEADTIME - in the upsmon.conf to suppress some of the warnings for shorter - intervals. Use caution when adjusting this number, since it - directly affects how long you run on battery without knowing - what's going on with the UPS. - - Note: some drivers occasionally need more time to update than the - default value of MAXAGE (in upsd.conf) allows. As a result, they - are temporarily marked stale even though everything is fine. This - can happen with MGE Ellipse equipment - see the mge-shut man page. - In such cases, you can raise the value of MAXAGE to avoid these - warnings; try a value like 25 or 30. - ------------------------------------------------------------------------------ - - Q: Why do the client programs say "Driver not connected" when I try - to run them? - - A: This means that upsd can't connect to the driver for some reason. - Your ups.conf entry might be wrong, or the driver might not be - running. Maybe your state path is not configured properly. - - Check your syslog. upsd will complain regularly if it can't - connect to a driver, and it should say why it can't connect. - - Note: if you jumped in with both feet and didn't follow the INSTALL - document, you probably started upsd by itself. You have to run - 'upsdrvctl start' to start the drivers after configuring ups.conf. - ------------------------------------------------------------------------------ - - Q: Everything works perfectly during the shutdown, and the UPS comes - back on, but my system stays off. What's happening? - - A: Assuming you don't have the problem in the next question, then you - probably have an ATX motherboard, have APM or ACPI enabled in your - kernel (assuming Linux here), and are reaching the 'halt' at the - bottom of your shutdown scripts. - - Your machine obeys and shuts down, and stays down, since it - remembers the 'last state' when the UPS restarts. - - One solution is to change your shutdown scripts so you never reach - that point. You *want* the system to die without reaching the - part where the kernel tells it to shut down. A possible script - might look like this: - - # other shutdown stuff here (mount -o remount,ro ...) - - if (test -f /etc/killpower) - then - /usr/local/ups/bin/upsdrvctl shutdown - - sleep 600 # this should never return - - # uh oh, we never got shut down! (power race?) - reboot - fi - - halt -p - - The other solution is to change your BIOS setting to "always power - on" instead of "last state", assuming that's possible. - ------------------------------------------------------------------------------ - - Q: My system has an ATX power supply. It will power off just fine, but - it doesn't turn back on. What can I do to fix this? - - A: This depends on how clueful your motherboard manufacturer is, and - isn't a matter of the OS. You have to do one of the following - things depending on what's supported: - - - Set a jumper on the motherboard that means "return after outage" - - - Set something in the BIOS that says "power up after power failure" - - - Try using something (like a capacitor) across the power button - to "push" it for you - this might not work if it needs a delay - - - Hack the cable between the power supply and the motherboard to fool - it into powering up whenever line power is present - - - Teach a monkey to watch the machine and press the power button - when the outage is over. - - This might work, but it creates high produce bills. - - If you can't use one of the first two options, give the board to - an enemy. Let them worry about it. - ------------------------------------------------------------------------------ - - Q: My PowerMac G4 won't power back up by itself (into Linux) after the - UPS shuts down. What can I do about this? - - A: This is about the same situation as the ATX question above, only - worse. Earlier Macs apparently supported a hack where you could - cat some magic characters at /dev/adb to enable "server mode". - This would instruct the system to reboot while unattended. - - From Usenet post <6boftzxz51.fsf@ecc-office.sp.cs.cmu.edu>: - - # Send packet over the ADB bus to the PowerMac CUDA chip - # telling it to reboot automatically when power is restored - # after a power failure. - - cat /etc/local/autoboot.adb > /dev/adb - - autoboot.adb contains these three bytes (in hex): 01 13 01 - - Unfortunately, the hardware has evolved and there is no good - equivalent for this hack on today's systems. - - If you find out how to do this, please send me some mail, since - this affects one of my systems and my stop-gap solution is getting - cranky. - - Note: this question has been in the FAQ for over a year and - there's still no answer. Let me guess: everyone who runs a server - on Mac hardware has a team of trained monkeys, and feeds them - by growing bananas in the tropical environment formed by waste heat - from the equipment. - - The rest of us are still waiting for the answer. Booting into the - Mac OS to frob the "file server" panel is not an acceptable - solution. - - A: If you're on OS X, this is relatively simple to fix. Go to system - preferences, click on energy saver, click on the options tab, check - "Restart automatically after a power failure". - - If you're on some other OS, hope they've figured out how to duplicate - the above in a non-simian manner. - ------------------------------------------------------------------------------ - - Q: I want to keep the drivers and upsd in their own security domains. - How can this be accomplished? - - A: Using a few role accounts and a common group, you can limit access - to resources such as the serial port(s) leading to the UPS - hardware. - - This is just an example. Change the values to suit your systems. - - Create a user called 'nutdev' and another called 'nutsrv'. Put - them both in a group called 'nut'. - - Change the owner of any serial ports that will be used to nutdev, - and set the mode to 0600. Then change the ownership of your state - directory (usually /var/state/ups) to nutdev.nut. - - For my development system this yields the following /dev entries: - - 0 crw------- 1 nutdev tty 4, 64 Sep 3 17:11 /dev/ttyS0 - 0 crw------- 1 nutdev tty 4, 65 Sep 3 17:11 /dev/ttyS1 - - Switch to root, then start the drivers: - - # /usr/local/ups/bin/upsdrvctl -u nutdev start - - The listing for /var/state/ups then looks like this: - - 4 drwxrwx--- 2 nutdev nut 4096 Aug 20 18:37 . - 4 drwxr-xr-x 4 root root 4096 May 14 21:20 .. - 4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 apcsmart-ttyS0 - 4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 megatec-ttyS1 - - You may have to remove old socket or state files first if you are - changing to this security scheme from an older version. The drivers - will create new files with the right owners and modes. - - Note that /var/state/ups is group writable since upsd will - place the upsd.pid file here. - - You may have to change the groups of upsd.conf and upsd.users to - make them readable. These files should not be owned by nutsrv, - since someone could compromise the daemon and change the config - files. Instead, put nutsrv in a group ("nut" in this example), then - make the files owned by root.nut, with mode 0640. - - Once the config files are ready, start upsd: - - # /usr/local/ups/sbin/upsd -u nutsrv - - Check your syslog to be sure everything's happy, then be sure to - update your startup scripts so it uses this procedure on your next - boot. - - If you like this, you'll probably also find the chroot process to - be useful and interesting. See chroot.txt for more details. - ------------------------------------------------------------------------------ - - Q: What's the point of that 'security domains' concept above? - - A: The point is limiting your losses. If someone should happen to - break into upsd in that environment, they should only gain access - to that one user account. Direct access to the serial device is - not possible, since that is owned by another user. - - There is also the possibility of running the drivers and upsd in a - chroot jail. See the chroot.txt provided in the source - distribution for an example implementation. - - Why give would-be vandals any sort of help? - - Put it this way - I *wrote* good chunks of this stuff, and I still - run the programs this way locally. You should definitely consider - using this technique. - ------------------------------------------------------------------------------ - - Q: How can I make upsmon shut down my system after some fixed interval? - - A: You probably don't want to do this, since it doesn't maximize your - runtime on battery. Assuming you have a good reason for it (see - the next entry), then look at upssched.txt or the upssched man - page for some ideas. - ------------------------------------------------------------------------------ - - Q: Why doesn't upsmon shut down my system? I pulled the plug and nothing - happened. - - A: Wait. upsmon doesn't consider a UPS to be critical until it's both - 'on battery' and 'low battery' at the same time. This is by design. - Nearly every UPS supports the notion of detecting the low battery - all by itself. When the voltage drops below a certain point, it - _will_ let you know about it. - - If your system has a really complicated shutdown procedure, you - might need to shut down before the UPS raises the low battery flag. - For most users, however, the default behavior is adequate. - - Ask yourself this: why buy a nice big UPS with the matching battery - and corresponding runtime and then shutdown early? If anything, I'd - rather have a few more minutes running on battery during which the - power might return. Once the power's back, it's business as usual - with no visible interruption in service. - - If you purposely shut down early, you guarantee an interruption in - service by bringing down the box. - - See upssched.txt for information on how you can shutdown early if - this is what you really want to do. - ------------------------------------------------------------------------------ - - Q: The CGI programs report "access to that host is not authorized" - - what's going on? - - A: Those programs need to see a host in your hosts.conf before they - will attempt communications. This keeps people from feeding it - random "host=" settings, which would annoy others with outgoing - connection attempts from your system. - - If your hosts.conf turns out to be configured correctly with - MONITOR entries and all that, check the permissions. Your web - server may be running the CGI programs as a user that can't read - the file. - - If you run your web server in a chroot jail, make sure the programs - can still read hosts.conf. You may have to copy it into the jail - for this to work. If you do that, make sure it's not writable by - any of the user accounts which run inside the jail. - ------------------------------------------------------------------------------ - - Q: upsd is running, so why can't I connect to it? - - A: Assuming you haven't changed the TCP port number on the command line - or at compile-time, then you probably have some sort of firewall - blocking the connection. - - upsd listens on TCP port 3493 by default. - ------------------------------------------------------------------------------ - - Q: How do you make upsmon reload the config file? - - Q: How do you make upsd reload the config file? - - A: Either find the pid of the background process and send it a SIGHUP, - or just start it again with '-c reload'. - - If you send the signals yourself instead of using -c, be sure you - hit the right process. There are usually two upsmons, and you - should only send signals to one of them. To be safe, read the pid - file. - ------------------------------------------------------------------------------ - - Q: I just bought a new WhizBang UPS that has a USB connector. How do - I monitor it? - - A: There are several driver to support USB models. - - - usbhid-ups supports various manufacturers complying to the HID standard, - - tripplite_usb supports various Tripp-Lite units, - - bcmxcp_usb supports various Powerware units. - - Refer to the "driver-name" (8) manpage for more information. - ------------------------------------------------------------------------------ - - Q: What is this usbhid-ups (formerly newhidups) about? - - A: The basic USB UPS support was done until NUT 2.2 using hidups. To allow - a wider support accross platforms for USB/HID compliant devices, - usbhid-ups driver uses libusb (which is available for a wide range of - operating systems) and libhid (currently, a modified internal version - of it). - - As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver - and provide support for various manufacturers. At that time, it will - be renamed to usbhid-ups. - - usbhid-ups is built automatically if possible (libusb development files - need to be installed) and installed by the "make install" command. - ------------------------------------------------------------------------------ - - Q: Why doesn't my package work? - - Q: I can't run this because there's no package for it. Why isn't this - in a package yet? - - A: Sorry, can't help you there. All official releases are source code - and are posted on http://www.networkupstools.org/ along with PGP - signatures for verification. - - This means all packages have been built by a third party. If you - have an issue that's related to packaging, you will need to seek - help with whoever built it for you. - ------------------------------------------------------------------------------ - - Q: Why are there two copies of upsmon running? - - A: It's not really two complete copies if your OS forks efficiently. - - By default, upsmon runs most of the grunt work as an unprivileged - user and keeps a stub process around with root powers that can - only shut down the system when necessary. This should make it much - harder to gain root in the event a hole is ever discovered in - upsmon. - - If this really bothers you and you like running lots of code as - root, start upsmon with -p and it will go back to being one big - process. This is not recommended, so don't blame me if something - bad happens in this mode. - ------------------------------------------------------------------------------ - - Q: I have with ... - - A: Get the latest stable release, and see if it still happens. If it - goes away, it means someone else reported it and got it fixed a - long time ago. - - If that doesn't work, try the latest development version. - - If your problem is STILL there, then contact the mailing lists. - - Hint: check the release date on the version you have. If it's more - than about 6 months old, there's probably a newer stable tree - version out there. - ------------------------------------------------------------------------------ - - Q: Do you have to use a serial connection to monitor the UPS? - What about direct network connections (SNMP or otherwise)? - - A: No. NUT currently support USB communication through usbhid-ups, - tripplite_usb and bcmxcp_usb, and SNMP communication through snmp-ups. - - Any time there is a gap in features, it's usually because the - group of people who own that hardware and the group of people who - write code don't overlap. The fix is to make them overlap - - turn an owner into a developer or vice-versa. - ------------------------------------------------------------------------------ - - Q: What happened to the patch I sent? - - A: If a release goes by and your patch hasn't been included, it was - probably dropped. There can be a lot of patches waiting for - inclusion at some points, and occasionally some have to be - rejected. - - Design issues or severe coding style problems can be the reason - for this. I try to point out what the problems are, but there are - limits. See developers.txt for some pointers on submitting - patches. - - Sometimes patches are put on hold due to a feature freeze. If it - doesn't show up once the new version opens up, send it again. - ------------------------------------------------------------------------------ - - Q: I'm not much of a programmer. How can I help? - - A: There's always work to be done outside of the realm of code bashing. - Documentation might not always be so clear. A user's perspective - is sometimes needed to appreciate this. Bug reports on a project's - documentation are just as valuable as those for the actual source. - - Fielding questions on the mailing lists is also helpful. This - lets other people to focus on coding issues while allowing the - original poster to get some information at the same time. It's - quite a relief to open that mailbox and find that someone else - has already handled it successfully. - ------------------------------------------------------------------------------ - - Q: I replaced the battery in my APC Smart-UPS and now it thinks the - battery is low all the time. How do you fix this? - - Q: My APC UPS keeps reporting "OL LB", even after it's been charging - for many hours. What can I do about this? - - A: This happened to me, and some other people too. The combination of - our experiences should prove useful to you. - - First, you need to realize that the UPS apparently stores data about - the battery, load, and runtime. After replacing the battery, it - needs to be clued in to the new situation. If the traditional - runtime calibration doesn't work, you have to try something a - little more drastic. - - You need to *completely* drain the UPS while it has a good ground. - This means you can't just pull the plug. You also have to - disconnect it from the computer so this software won't shut it - down. - - The easiest way to do this is to first unplug your computer(s) from - it, and plug in a token load like a lamp. Also, move the UPS to a - power strip that doesn't switch the ground line or an outlet that - you can switch off at your panel. - - Once the UPS is up at 100% charge (this is important), disconnect - the power. It _must_ remain connected to the ground, or the - results may not be accurate. Ignore the sounds it makes, and go - away until it's done. Don't do anything to the front panel while - this is happening. - - After all of this, put things back the way they should be and let - it charge up. You should find that it again gives reasonable - values and behavior, as it was when it was new. - - Thanks to Matthew Dharm for helping me nail down this procedure. - ------------------------------------------------------------------------------ - - Q: multimon.cgi seems to be stuck at an old version, even though I - just installed a new one. - - A: multimon was removed during the 1.1 development cycle. upsstats - now does everything it used to do, and then some. You should just - delete those files and start using upsstats directly. - ------------------------------------------------------------------------------ - - Q: OK, I switched to upsstats. Now it's giving me Celsius. I like - Fahrenheit. Where's the config file to switch it back? - - A: Temperature scales are handled by the template files, so edit your - upsstats.html and change it from TEMPC to TEMPF. - ------------------------------------------------------------------------------ - - Q: Why is the mailing list ignoring me? - - A: You probably asked a question that's answered in this FAQ or - somewhere else in the documentation and nobody wants to quote it - for you. - - Convincing the other subscribers that you've actually read down this - far might be useful. You might mention "queequeg" for better results. - - This URL may also be helpful: - - http://www.catb.org/~esr/faqs/smart-questions.html - ------------------------------------------------------------------------------ - - Q: I found some information about another kind of UPS protocol you - don't support yet, but I don't know what to do with it. Can you - help? - - A: If you're not a programmer, you can still help others by making - that protocol available. You might host the document somewhere and - send the URL to one of the mailing lists. - ------------------------------------------------------------------------------ - - Q: How can you answer questions to situations that nobody's encountered - yet? Isn't this a frequently asked questions file? - - A: Magic. - - A: It's both that and a frequently *anticipated* questions file, too. - - The idea is to write it up in here so that nobody asks the mailing - list when it finally does get released. - ------------------------------------------------------------------------------ diff --git a/docs/FAQ.txt b/docs/FAQ.txt new file mode 100644 index 0000000..fb913e4 --- /dev/null +++ b/docs/FAQ.txt @@ -0,0 +1,735 @@ +ifndef::external_title[] +NUT Frequently Asked Questions +============================== +endif::external_title[] + +== I just upgraded, and ... +You have read link:UPGRADING[UPGRADING] in the base directory of the distribution, +right? + +If not, go read it now, then come back to this file if your +question wasn't answered in there. + +== upsstats says 'Error: can't open template file (upsstats.html)'. +Go into your configuration path (/usr/local/ups/etc by default) and +copy the sample template files over to their real names. The sample +template files are installed with 'make install' and can +also be found inside the source distribution in the conf directory. + +== upsmon fails the login and says 'username required' now. +Go read the link:UPGRADING[UPGRADING] file again. + +== My UPS driver now says it's 'broken', and won't start. What now? +Or a variation like... + +== My favorite UPS driver disappeared after an upgrade. What now? + +Drivers are occasionally removed from the tree if they are no longer +receiving maintenance, or sometimes renamed to better reflect their +hardware support scope or replaced by a more generic driver. +There have been several architectural changes to the driver code +in recent times, and drivers which were not converted by someone +are eventually dropped. + +This is called progress. We do this in order to avoid a situation +where someone believes that a driver is being maintained when it is +actually rotting slowly in the tree. It also keeps the tree free of +old compatibility hacks for code that nobody actually uses anyway. + +To get a driver back into current releases, you need to convert it +yourself or get someone to do it for you. This is not difficult. +The hardest part of any driver is decoding the protocol, and that's +already been done in the old version. + +== My UPS driver program won't work. I'm starting it as root, and root owns the device, so what's the problem? + +*Answer 1* + +The drivers drop root privileges long before the serial port is +opened. You'll need to change the permissions on that port so that +their new user id can access it. Normally this is "nobody", but it +may be changed at compile-time by using configure --with-user. + +Read the error message. If you have a permissions mismatch, then +you'll see something like this: + + Network UPS Tools - APC Smart protocol driver 0.60 (1.1.7) + This program is currently running as youruid (UID 1234) + /dev/ttyS2 is owned by user root (UID 0), mode 0600 + Change the port name, or fix the permissions or ownership + of /dev/ttyS2 and try again. + Unable to open /dev/ttyS2: Permission denied + +Now is a good time to point out that using "nobody" is a bad idea, +since it's a hack for NFS access. You should create a new role +account (perhaps called "ups" or "nut"), and use that instead. + +Also, scroll down to the "security domains" question to see an +even better way of restricting privileged operations. Neither the +drivers nor upsd ever need root powers, and that answer tells you +how to make it work. + +*Answer 2* + +You can also specify a user with "user=" in the global part of +ups.conf. Just define it before any of your [sections]: + + user = nut + + [myups] + driver = mge-shut + port = /dev/ttyS0 + +== upsc, upsstats, and the other clients say 'access denied'. The device communication port (serial, USB or network) permissions are fine, so what gives? + +In this case, "access denied" means the access to upsd, not the device +communication port. You're being denied since the system has no +permission to speak to upsd according to the access controls. + +There can be various reasons. To fix it, check: + +- the LISTEN directive in upsd.conf. It should allow your local or remote +access method, +- your firewall rules. Port 3493/tcp must be opened to incoming connexions, +- your tcp-wrappers configuration (hosts.allow and hosts.deny). + +Refer to the upsd(8) and upsd.conf(5) manpages for more information. + +== I have an APC Smart-UPS connected with a grey APC serial cable and it won't work. + +The Back-UPS type in the genericups driver works but then I don't get to use +all the nifty features in there. Why doesn't the right driver work? + +The problem lies in your choice of cable. APC's grey cables +generally only do "dumb" signalling - very basic yes/no info about +the battery and line status. While that is sufficient to detect a +low battery condition while on battery, you miss out on all the +goodies that you paid for. + +Note that the 940-0095B happens to be a grey cable, but it is actually +a dual mode cable and can be used in smart mode. If you have +this cable, you need to edit your ups.conf to look like this: + + [myups] + driver = apcsmart + port = /dev/whatever + cable = 940-0095B + +All other grey cables from APC are assumed to be "dumb". + +If your grey cable isn't the 940-0095B, the solution is to dump that +cable and find one that supports APC's "smart" signalling. Typically +these come with the UPS and are black. If your smart cable has +wandered off, one can be built rather easily with some connectors and +cable - there's no fancy wiring or resistors. + +See this URL for a handy diagram: http://www.networkupstools.org/cables/940-0024C.jpg + +There is also a text version of that diagram in the docs/cables +directory of the NUT source distribution. Either one should allow +you to build a good clone of APC's 940-0024C cable. + +There are simpler solutions involving 3 wires that work just fine +too, but Powerchute won't find the loopback DTR-DCD and RTS-CTS and +will be annoyed. If you don't ever plan to use Powerchute, 3 wires +(RxD, TxD, GND) are sufficient. + +It should also be noted that the genericups driver has no way to +detect the UPS, so it will fire up quite happily if it can open the +serial port. Merely having it start up is not necessarily an +indication of success. You should start it and then check the +status with upsc or similar to be sure that it's reading the +hardware properly. + +== Why doesn't upsd implement the functionality of upsmon? I have to run THREE programs to monitor my UPS! + +*Answer 1* + +I try to follow the "tool for the job" philosophy. It may mean +more programs running, but the flexibility you get is usually +worth it. + +Yes, the machine with the UPS attached will generally have 3 +processes (driver, upsd, upsmon) running, but this design allows a +much bigger setup. Imagine a data room with a bunch of machines +all drawing power from the same UPS. The rest of them just run +upsmon. + +Besides, if upsmon were rolled into upsd, upsd would get even +bigger than it is now. You'd have one less process, but the +RAM consumption would be pretty close to now. + +See data-room.txt for more configuration ideas and explanations. + +*Answer 2* + +If this really bothers you, roll up your sleeves and use the +sockdebug code to write a "upsmon" type program that sits on top of +the state sockets. It won't work over the network, but it means +you don't need upsd. It also means only one host can monitor the +UPS. + +This is also a good option to consider if you can't use networked +monitoring code for security or safety reasons. + +See ideas.txt for more on this and other related topics. + +== Why isn't upssched part of upsmon? + +Most users will never have any reason to use upssched. It's +complicated, and getting it right for your situation can be tricky. +Having it live in a separate program saves resources and lets most +people avoid it completely. + +It is also coherent with the answer to the previous question. + +== Why doesn't upsmon send a SIGPWR signal to init so it can deal with power events? + +*Answer 1* + +New versions of the init man page taken from the sysvinit package +are saying that usage of SIGPWR is discouraged, since /dev/initctl +control channel is the preferred way of communication. + +*Answer 2* + +The name of the game is portability. Not everyone's init handles +that kind of signalling gracefully. What's more, some admins +might want to do things differently even if they have that kind of +init running. + +So, to be compatible, upsmon just invokes a shell command. If you +want to use init's SIGPWR stuff, just put the right "kill" line in +a shell script and make upsmon call it. Everyone wins. + +== Why won't bestups talk to my Best Fortress UPS? + +There are at least two different protocols being used for hardware +with very similar names. The bestups driver tends to support the +units built around the newer "PhoenixTec" protocol. + +Previous releases of this software included a driver called +bestfortress which supported the older Best hardware. See the +earlier entries about updating old drivers which have been removed +from the tree. + +== What's this about 'data stale'? + +It means your UPS driver hasn't updated things in a little while. +upsd refuses to serve up data that isn't fresh, so you get the +errors about staleness. + +If this happens to you, make sure your driver is still running. +Also look at the syslog. Sometimes the driver loses the connection +to the UPS, and that will also make the data go stale. + +Note: some very slow machines have trouble keeping up with the +serial ports during periods of extreme load. My old 486 used to +flip between "stale" and "OK" while running backups. + +If this happens a lot, you might consider cranking up DEADTIME +in the upsmon.conf to suppress some of the warnings for shorter +intervals. Use caution when adjusting this number, since it +directly affects how long you run on battery without knowing +what's going on with the UPS. + +Note: some drivers occasionally need more time to update than the +default value of MAXAGE (in upsd.conf) allows. As a result, they +are temporarily marked stale even though everything is fine. This +can happen with MGE Ellipse equipment - see the mge-shut man page. +In such cases, you can raise the value of MAXAGE to avoid these +warnings; try a value like 25 or 30. + +== Why do the client programs say 'Driver not connected' when I try to run them? + +This means that upsd can't connect to the driver for some reason. +Your ups.conf entry might be wrong, or the driver might not be +running. Maybe your state path is not configured properly. + +Check your syslog. upsd will complain regularly if it can't +connect to a driver, and it should say why it can't connect. + +Note: if you jumped in with both feet and didn't follow the INSTALL +document, you probably started upsd by itself. You have to run +'upsdrvctl start' to start the drivers after configuring ups.conf. + +== Everything works perfectly during the shutdown, and the UPS comes back on, but my system stays off. What's happening? + +Assuming you don't have the problem in the next question, then you +probably have an ATX motherboard, have APM or ACPI enabled in your +kernel (assuming Linux here), and are reaching the 'halt' at the +bottom of your shutdown scripts. + +Your machine obeys and shuts down, and stays down, since it +remembers the 'last state' when the UPS restarts. + +One solution is to change your shutdown scripts so you never reach +that point. You *want* the system to die without reaching the +part where the kernel tells it to shut down. A possible script +might look like this: + + # other shutdown stuff here (mount -o remount,ro ...) + + if (test -f /etc/killpower) + then + /usr/local/ups/bin/upsdrvctl shutdown + + sleep 600 # this should never return + + # uh oh, we never got shut down! (power race?) + reboot + fi + + halt -p + +The other solution is to change your BIOS setting to "always power +on" instead of "last state", assuming that's possible. + +== My system has an ATX power supply. It will power off just fine, but it doesn't turn back on. What can I do to fix this? + +This depends on how clueful your motherboard manufacturer is, and +isn't a matter of the OS. You have to do one of the following +things depending on what's supported: + +- Set a jumper on the motherboard that means "return after outage" +- Set something in the BIOS that says "power up after power failure" +- Try using something (like a capacitor) across the power button + to "push" it for you - this might not work if it needs a delay +- Hack the cable between the power supply and the motherboard to fool + it into powering up whenever line power is present +- Teach a monkey to watch the machine and press the power button + when the outage is over. + + This might work, but it creates high produce bills. + +If you can't use one of the first two options, give the board to +an enemy. Let them worry about it. + +== My PowerMac G4 won't power back up by itself (into Linux) after the UPS shuts down. What can I do about this? + +*Answer 1* + +This is about the same situation as the ATX question above, only +worse. Earlier Macs apparently supported a hack where you could +cat some magic characters at /dev/adb to enable "server mode". +This would instruct the system to reboot while unattended. + +From Usenet post <6boftzxz51.fsf@ecc-office.sp.cs.cmu.edu>: + + # Send packet over the ADB bus to the PowerMac CUDA chip + # telling it to reboot automatically when power is restored + # after a power failure. + + cat /etc/local/autoboot.adb > /dev/adb + + autoboot.adb contains these three bytes (in hex): 01 13 01 + +Unfortunately, the hardware has evolved and there is no good +equivalent for this hack on today's systems. + +If you find out how to do this, please send me some mail, since +this affects one of my systems and my stop-gap solution is getting +cranky. + +Note: this question has been in the FAQ for over a year and +there's still no answer. Let me guess: everyone who runs a server +on Mac hardware has a team of trained monkeys, and feeds them +by growing bananas in the tropical environment formed by waste heat +from the equipment. + +The rest of us are still waiting for the answer. Booting into the +Mac OS to frob the "file server" panel is not an acceptable +solution. + +*Answer 2* + +If you're on OS X, this is relatively simple to fix. Go to system +preferences, click on energy saver, click on the options tab, check +"Restart automatically after a power failure". + +If you're on some other OS, hope they've figured out how to duplicate +the above in a non-simian manner. + +== I want to keep the drivers and upsd in their own security domains. How can this be accomplished? + +Using a few role accounts and a common group, you can limit access +to resources such as the serial port(s) leading to the UPS +hardware. + +This is just an example. Change the values to suit your systems. + +- Create a user called 'nutdev' and another called 'nutsrv'. Put +them both in a group called 'nut'. + +- Change the owner of any serial ports that will be used to nutdev, +and set the mode to 0600. Then change the ownership of your state +directory (usually /var/state/ups) to nutdev.nut. + +For my development system this yields the following /dev entries: + + 0 crw------- 1 nutdev tty 4, 64 Sep 3 17:11 /dev/ttyS0 + 0 crw------- 1 nutdev tty 4, 65 Sep 3 17:11 /dev/ttyS1 + +- Switch to root, then start the drivers: + + # /usr/local/ups/bin/upsdrvctl -u nutdev start + +- The listing for /var/state/ups then looks like this: + + 4 drwxrwx--- 2 nutdev nut 4096 Aug 20 18:37 . + 4 drwxr-xr-x 4 root root 4096 May 14 21:20 .. + 4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 apcsmart-ups1 + 4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 blazer_ser-ups2 + +You may have to remove old socket or state files first if you are +changing to this security scheme from an older version. The drivers +will create new files with the right owners and modes. + +Note that /var/state/ups is group writable since upsd will +place the upsd.pid file here. + +You may have to change the groups of upsd.conf and upsd.users to +make them readable. These files should not be owned by nutsrv, +since someone could compromise the daemon and change the config +files. Instead, put nutsrv in a group ("nut" in this example), then +make the files owned by root.nut, with mode 0640. + +Once the config files are ready, start upsd: + + # /usr/local/ups/sbin/upsd -u nutsrv + +Check your syslog to be sure everything's happy, then be sure to +update your startup scripts so it uses this procedure on your next +boot. + +If you like this, you'll probably also find the chroot process to +be useful and interesting. See security.txt for more details. + +== What's the point of that 'security domains' concept above? + +The point is limiting your losses. If someone should happen to +break into upsd in that environment, they should only gain access +to that one user account. Direct access to the serial device is +not possible, since that is owned by another user. + +There is also the possibility of running the drivers and upsd in a +chroot jail. See the chroot.txt provided in the source +distribution for an example implementation. + +Why give would-be vandals any sort of help? + +Put it this way - I *wrote* good chunks of this stuff, and I still +run the programs this way locally. You should definitely consider +using this technique. + +== How can I make upsmon shut down my system after some fixed interval? + +You probably don't want to do this, since it doesn't maximize your +runtime on battery. Assuming you have a good reason for it (see +the next entry), then look at scheduling.txt or the upssched(8) man +page for some ideas. + +///////////////////////////////////////////////////////////////// +TODO: figure out how to link to the upssched man page above. +///////////////////////////////////////////////////////////////// + + +== Why doesn't upsmon shut down my system? I pulled the plug and nothing happened. + +Wait. upsmon doesn't consider a UPS to be critical until it's both +'on battery' and 'low battery' at the same time. This is by design. +Nearly every UPS supports the notion of detecting the low battery +all by itself. When the voltage drops below a certain point, it +_will_ let you know about it. + +If your system has a really complicated shutdown procedure, you +might need to shut down before the UPS raises the low battery flag. +For most users, however, the default behavior is adequate. + +Ask yourself this: why buy a nice big UPS with the matching battery +and corresponding runtime and then shutdown early? If anything, I'd +rather have a few more minutes running on battery during which the +power might return. Once the power's back, it's business as usual +with no visible interruption in service. + +If you purposely shut down early, you guarantee an interruption in +service by bringing down the box. + +See upssched.txt for information on how you can shutdown early if +this is what you really want to do. + +== The CGI programs report 'access to that host is not authorized' - what's going on? + +Those programs need to see a host in your hosts.conf before they +will attempt communications. This keeps people from feeding it +random "host=" settings, which would annoy others with outgoing +connection attempts from your system. + +If your hosts.conf turns out to be configured correctly with +MONITOR entries and all that, check the permissions. Your web +server may be running the CGI programs as a user that can't read +the file. + +If you run your web server in a chroot jail, make sure the programs +can still read hosts.conf. You may have to copy it into the jail +for this to work. If you do that, make sure it's not writable by +any of the user accounts which run inside the jail. + +== upsd is running, so why can't I connect to it? + +Assuming you haven't changed the TCP port number on the command line +or at compile-time, then you probably have some sort of firewall +blocking the connection. + +upsd listens on TCP port 3493 by default. + +== How do you make upsmon reload the config file? + +Or a variation like... + +== How do you make upsd reload the config file? + +Either find the pid of the background process and send it a SIGHUP, +or just start it again with '-c reload'. + +If you send the signals yourself instead of using -c, be sure you +hit the right process. There are usually two upsmons, and you +should only send signals to one of them. To be safe, read the pid +file. + +== I just bought a new WhizBang UPS that has a USB connector. How do I monitor it? + +There are several driver to support USB models. + +- usbhid-ups supports various manufacturers complying to the HID standard, +- tripplite_usb supports various Tripp-Lite units, +- bcmxcp_usb supports various Powerware units, +- blazer_usb supports various manufacturers that use the Megatec / Q1 protocol. + +Refer to the 'driver-name' (8) manpage for more information. + +== What is this usbhid-ups (formerly newhidups) about? + +The basic USB UPS support was done until NUT 2.2 using hidups. To allow +a wider support accross platforms for USB/HID compliant devices, +usbhid-ups driver uses libusb (which is available for a wide range of +operating systems) and libhid (currently, a modified internal version +of it). + +As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver +and provide support for various manufacturers. At that time, it will +be renamed to usbhid-ups. + +usbhid-ups is built automatically if possible (libusb development files +need to be installed) and installed by the "make install" command. + +== Why doesn't my package work? + +Or a variation like... + +== I can't run this because there's no package for it. Why isn't this in a package yet? + +Sorry, can't help you there. All official releases are source code +and are posted on http://www.networkupstools.org/ along with PGP +signatures for verification. + +This means all packages have been built by a third party. If you +have an issue that's related to packaging, you will need to seek +help with whoever built it for you. + +== Why are there two copies of upsmon running? + +It's not really two complete copies if your OS forks efficiently. + +By default, upsmon runs most of the grunt work as an unprivileged +user and keeps a stub process around with root powers that can +only shut down the system when necessary. This should make it much +harder to gain root in the event a hole is ever discovered in +upsmon. + +If this really bothers you and you like running lots of code as +root, start upsmon with -p and it will go back to being one big +process. This is not recommended, so don't blame us if something +bad happens in this mode. + +== I have 'some problem' with 'some old version' ... + +Get the latest stable release, and see if it still happens. If it +goes away, it means someone else reported it and got it fixed a +long time ago. + +If that doesn't work, try the latest development version. + +If your problem is STILL there, then contact the mailing lists. + +NOTE: check the release date on the version you have. If it's more +than about 6 months old, there's probably a newer stable tree +version out there. + +== Do I have to use a serial connection to monitor the UPS? What about direct network connections (SNMP or otherwise)? + +No. NUT currently support USB communication through several drivers, +and also SNMP and XML/HTTP (Eaton and MGE) communications. + +Since NUT is very extensible, support for a new communication bus can be added +easily. + +Any time there is a gap in features, it's usually because the +group of people who own that hardware and the group of people who +write code don't overlap. The fix is to make them overlap - +turn an owner into a developer or vice-versa. + +== What happened to the patch I sent? + +If a release goes by and your patch hasn't been included, it was +probably dropped. There can be a lot of patches waiting for +inclusion at some points, and occasionally some have to be +rejected. + +Design issues or severe coding style problems can be the reason +for this. I try to point out what the problems are, but there are +limits. See developers.txt for some pointers on submitting +patches. + +Sometimes patches are put on hold due to a feature freeze. If it +doesn't show up once the new version opens up, send it again. + +== I'm not much of a programmer. How can I help? + +There's always work to be done outside of the realm of code bashing. +Documentation might not always be so clear. A user's perspective +is sometimes needed to appreciate this. Bug reports on a project's +documentation are just as valuable as those for the actual source. + +Fielding questions on the mailing lists is also helpful. This +lets other people to focus on coding issues while allowing the +original poster to get some information at the same time. It's +quite a relief to open that mailbox and find that someone else +has already handled it successfully. + +== I replaced the battery in my APC Smart-UPS and now it thinks the battery is low all the time. How do you fix this? + +Or a variation like... + +== My APC UPS keeps reporting 'OL LB', even after it's been charging for many hours. What can I do about this? + +This happened to me, and some other people too. The combination of +our experiences should prove useful to you. + +First, you need to realize that the UPS apparently stores data about +the battery, load, and runtime. After replacing the battery, it +needs to be clued in to the new situation. If the traditional +runtime calibration doesn't work, you have to try something a +little more drastic. + +You need to *completely* drain the UPS while it has a good ground. +This means you can't just pull the plug. You also have to +disconnect it from the computer so this software won't shut it +down. + +The easiest way to do this is to first unplug your computer(s) from +it, and plug in a token load like a lamp. Also, move the UPS to a +power strip that doesn't switch the ground line or an outlet that +you can switch off at your panel. + +Once the UPS is up at 100% charge (this is important), disconnect +the power. It _must_ remain connected to the ground, or the +results may not be accurate. Ignore the sounds it makes, and go +away until it's done. Don't do anything to the front panel while +this is happening. + +After all of this, put things back the way they should be and let +it charge up. You should find that it again gives reasonable +values and behavior, as it was when it was new. + +Thanks to Matthew Dharm for helping us nail down this procedure. + +== upsstats returns temperatures in Celsius. I like Fahrenheit. Where's the config file to switch it back? + +Temperature scales are handled by the template files, so edit your +upsstats.html and change it from TEMPC to TEMPF. + +== Why is the mailing list ignoring me? + +You probably asked a question that's answered in this FAQ or +somewhere else in the documentation and nobody wants to quote it +for you. + +Convincing the other subscribers that you've actually read down this +far might be useful. You might mention "queequeg" for better results. + +This URL may also be helpful: + +http://www.catb.org/~esr/faqs/smart-questions.html + +== I found some information about another kind of UPS protocol you don't support yet, but I don't know what to do with it. Can you help? + +If you're not a programmer, you can still help others by making +that protocol available. You might host the document somewhere and +send the URL to one of the mailing lists. + +== How can you answer questions to situations that nobody's encountered yet? Isn't this a frequently asked questions file? + +*Answer 1* + +It's a kind of Magic. + +*Answer 2* + +It's both that and a frequently *anticipated* questions file, too. + +The idea is to write it up in here so that nobody asks the mailing +list when it finally does get released. + +== My UPS powers up immediately after a power failure instead of waiting for the batteries to recharge! + +You can rig up a little hack to handle this issue in software. + +Essentially, you need to test for the POWERDOWNFLAG in your *startup* scripts +while the filesystems are still read-only. If it's there, you know your last +shutdown was caused by a power failure and the UPS battery is probably still +quite weak. + +In this situation, your best bet is to sleep it off. Pausing in your startup +script to let the batteries recharge with the filesystems in a safe state is +recommended. This way, if the power goes out again, you won't face a situation +where there's not enough battery capacity left for upsmon to do its thing. + +Exactly how long to wait is a function of your UPS hardware, and will require +careful testing. + +If this is too evil for you, buy another kind of UPS that will either wait for a +minimum amount of charge, a minimum amount of time, or both. + +== I'm facing a power race +Or a variation like... + +== The power came back during the shutdown, but before the UPS power off. Now the UPS does not reboot, and my computer stays off. How can I fix that? + +There is a situation where the power may return during the shutdown process. +This is known as a race. Here's how we handle it. + +"Smart" UPSes typically handle this by using a command that forces the UPS to +power the load off and back on. This way, you are assured that the systems will +restart even if the power returns at the worst possible moment. + +Contact closure units (ala genericups), on the other hand, have the potential +for a race when feeding multiple systems. This is due to the design of most +contact closure UPSes. Typically, the "kill power" line only functions when +running on battery. As a result, if the line power returns during the shutdown +process, there is no way to power down the load. + +The workaround is to force your systems to reboot after some interval. This way, +they won't be stuck in the halted state with the UPS running on line power. + +Implement this by modifying your shutdown script like this: + + if (test -f /etc/killpower) + then + /usr/local/ups/bin/upsdrvctl shutdown + + sleep 120 + + # uh oh, we never got shut down! (power race?) + reboot + fi diff --git a/docs/Makefile.am b/docs/Makefile.am index 18f67de..c14f090 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,13 +1,108 @@ -# nothing to build here, but still need a Makefile to define which -# files to distribute +SHARED_DEPS = nut-names.txt asciidoc.conf -EXTRA_DIST = acpi.txt big-servers.txt chroot.txt \ - commands.txt config-files.txt configure.txt contact-closure.txt \ - data-room.txt design.txt developers.txt FAQ hid-subdrivers.txt \ - ideas.txt macros.txt megatec.txt new-drivers.txt new-names.txt \ - nut-hal.txt osd-notify.txt \ - pager.txt powersaving.txt protocol.txt README shutdown.txt snmp.txt \ - sock-protocol.txt ssl.txt upssched.txt cables/apc-rs500-serial.txt \ +IMAGE_FILES = images/asciidoc.png \ + images/eaton-logo.png \ + images/nut_layering.png \ + images/note.png \ + images/warning.png \ + images/blue-arrow.png \ + images/simple.png \ + images/advanced.png \ + images/bigbox.png \ + images/bizarre.png \ + images/old-cgi.png + +USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.txt \ + configure.txt download.txt documentation.txt features.txt history.txt \ + outlets.txt scheduling.txt security.txt support.txt user-manual.txt \ + stable-hcl.txt + +DEVELOPER_GUIDE_DEPS = contact-closure.txt design.txt developers.txt \ + developer-guide.txt hid-subdrivers.txt macros.txt \ + new-clients.txt new-drivers.txt net-protocol.txt sock-protocol.txt + +CABLES_DEPS = cables/apc-rs500-serial.txt \ cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \ cables/mgeups.txt cables/powerware.txt cables/repotec.txt \ cables/sms.txt + +CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ + images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \ + images/cables/mac-940-0024C.png images/cables/mge-66049.png \ + images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \ + images/cables/SOLA-330.png + +EXTRA_DIST = $(SHARED_DEPS) $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ + $(CABLES_DEPS) FAQ.txt nut-hal.txt nut-qa.txt packager-guide.txt snmp.txt \ + $(IMAGE_FILES) $(CABLES_IMAGES) docinfo.xml + +ASCIIDOC_HTML_SINGLE = user-manual.html \ + developer-guide.html \ + packager-guide.html \ + FAQ.html + +ASCIIDOC_HTML_CHUNKED = user-manual.chunked \ + developer-guide.chunked \ + packager-guide.chunked \ + FAQ.html + +ASCIIDOC_PDF = user-manual.pdf \ + developer-guide.pdf \ + packager-guide.pdf \ + FAQ.pdf + +# Force build in ./ and man/ before website +SUBDIRS = . man website +SUFFIXES = .txt .html .pdf + +all: doc + +doc: @DOC_BUILD_LIST@ + +pdf: $(ASCIIDOC_PDF) +# also build the HTML manpages with these targets +html-single: $(ASCIIDOC_HTML_SINGLE) +html-chunked: $(ASCIIDOC_HTML_CHUNKED) + +if HAVE_ASCIIDOC +website: html-chunked pdf +else !HAVE_ASCIIDOC +website: + @echo "Not building website documentation since 'asciidoc' was not found." +endif !HAVE_ASCIIDOC + +clean-local: + rm -rf *.pdf *.html *.chunked docbook-xsl.css + +### TODO: automatic dependency generation +FULL_USER_MANUAL_DEPS = $(USER_MANUAL_DEPS) $(SHARED_DEPS) ../README \ + ../INSTALL cables.txt ../UPGRADING ../TODO +FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ + ../scripts/augeas/README + +user-manual.html user-manual.chunked user-manual.pdf: $(FULL_USER_MANUAL_DEPS) +developer-guide.html developer-guide.chunked developer-guide.pdf: $(FULL_DEVELOPER_GUIDE_DEPS) +packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.txt asciidoc.conf + +# Note: without the "-v", asciidoc (circa 8.6.2) sometimes hangs when +# generating the chunked HTML. In this case, export the environment +# variable ASCIIDOC_VERBOSE to "-v", ie: +# $ ASCIIDOC_VERBOSE=-v make +A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute iconsdir=$(srcdir)/images \ + --attribute=badges \ + --attribute=external_title \ + -a toc -a numbered --destination-dir=. + +.txt.html: + $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml $< + +.txt.chunked: + $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked $< + +.txt.pdf: docinfo.xml + $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< + +.PHONY: html html-single pdf website diff --git a/docs/Makefile.in b/docs/Makefile.in index 849a6ce..d39db23 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -14,9 +14,6 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -# nothing to build here, but still need a Makefile to define which -# files to distribute VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -38,14 +35,15 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = docs -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ - $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -55,6 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -66,10 +65,52 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -82,8 +123,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -100,7 +143,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ HAL_FDI_PATH = @HAL_FDI_PATH@ HAL_USER = @HAL_USER@ -HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -111,22 +153,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -222,20 +264,87 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -EXTRA_DIST = acpi.txt big-servers.txt chroot.txt \ - commands.txt config-files.txt configure.txt contact-closure.txt \ - data-room.txt design.txt developers.txt FAQ hid-subdrivers.txt \ - ideas.txt macros.txt megatec.txt new-drivers.txt new-names.txt \ - nut-hal.txt osd-notify.txt \ - pager.txt powersaving.txt protocol.txt README shutdown.txt snmp.txt \ - sock-protocol.txt ssl.txt upssched.txt cables/apc-rs500-serial.txt \ +SHARED_DEPS = nut-names.txt asciidoc.conf +IMAGE_FILES = images/asciidoc.png \ + images/eaton-logo.png \ + images/nut_layering.png \ + images/note.png \ + images/warning.png \ + images/blue-arrow.png \ + images/simple.png \ + images/advanced.png \ + images/bigbox.png \ + images/bizarre.png \ + images/old-cgi.png + +USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.txt \ + configure.txt download.txt documentation.txt features.txt history.txt \ + outlets.txt scheduling.txt security.txt support.txt user-manual.txt \ + stable-hcl.txt + +DEVELOPER_GUIDE_DEPS = contact-closure.txt design.txt developers.txt \ + developer-guide.txt hid-subdrivers.txt macros.txt \ + new-clients.txt new-drivers.txt net-protocol.txt sock-protocol.txt + +CABLES_DEPS = cables/apc-rs500-serial.txt \ cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \ cables/mgeups.txt cables/powerware.txt cables/repotec.txt \ cables/sms.txt -all: all-am +CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ + images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \ + images/cables/mac-940-0024C.png images/cables/mge-66049.png \ + images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \ + images/cables/SOLA-330.png + +EXTRA_DIST = $(SHARED_DEPS) $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ + $(CABLES_DEPS) FAQ.txt nut-hal.txt nut-qa.txt packager-guide.txt snmp.txt \ + $(IMAGE_FILES) $(CABLES_IMAGES) docinfo.xml + +ASCIIDOC_HTML_SINGLE = user-manual.html \ + developer-guide.html \ + packager-guide.html \ + FAQ.html + +ASCIIDOC_HTML_CHUNKED = user-manual.chunked \ + developer-guide.chunked \ + packager-guide.chunked \ + FAQ.html + +ASCIIDOC_PDF = user-manual.pdf \ + developer-guide.pdf \ + packager-guide.pdf \ + FAQ.pdf + + +# Force build in ./ and man/ before website +SUBDIRS = . man website +SUFFIXES = .txt .html .pdf + +### TODO: automatic dependency generation +FULL_USER_MANUAL_DEPS = $(USER_MANUAL_DEPS) $(SHARED_DEPS) ../README \ + ../INSTALL cables.txt ../UPGRADING ../TODO + +FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ + ../scripts/augeas/README + + +# Note: without the "-v", asciidoc (circa 8.6.2) sometimes hangs when +# generating the chunked HTML. In this case, export the environment +# variable ASCIIDOC_VERBOSE to "-v", ie: +# $ ASCIIDOC_VERBOSE=-v make +A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute iconsdir=$(srcdir)/images \ + --attribute=badges \ + --attribute=external_title \ + -a toc -a numbered --destination-dir=. + +all: all-recursive .SUFFIXES: +.SUFFIXES: .txt .html .pdf .chunked $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -272,12 +381,141 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi ctags: CTAGS -CTAGS: +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -309,19 +547,48 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -338,86 +605,119 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive -clean-am: clean-generic clean-libtool mostlyclean-am +clean-am: clean-generic clean-libtool clean-local mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am - pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: -.MAKE: install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir 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 maintainer-clean \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-local ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir 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 uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am +all: doc + +doc: @DOC_BUILD_LIST@ + +pdf: $(ASCIIDOC_PDF) +# also build the HTML manpages with these targets +html-single: $(ASCIIDOC_HTML_SINGLE) +html-chunked: $(ASCIIDOC_HTML_CHUNKED) + +@HAVE_ASCIIDOC_TRUE@website: html-chunked pdf +@HAVE_ASCIIDOC_FALSE@website: +@HAVE_ASCIIDOC_FALSE@ @echo "Not building website documentation since 'asciidoc' was not found." + +clean-local: + rm -rf *.pdf *.html *.chunked docbook-xsl.css + +user-manual.html user-manual.chunked user-manual.pdf: $(FULL_USER_MANUAL_DEPS) +developer-guide.html developer-guide.chunked developer-guide.pdf: $(FULL_DEVELOPER_GUIDE_DEPS) +packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.txt asciidoc.conf + +.txt.html: + $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml $< + +.txt.chunked: + $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked $< + +.txt.pdf: docinfo.xml + $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< + +.PHONY: html html-single pdf website + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/docs/README b/docs/README deleted file mode 100644 index 7d65e67..0000000 --- a/docs/README +++ /dev/null @@ -1,9 +0,0 @@ -When creating files in here, use the following 4 headers: - -Desc: A brief description of the document -File: The filename (this is for tracking which one is the original) -Date: The date of last modification -Auth: The author, i.e. "First Last ". - -Note: anything in the form <.*@.*> will be removed when converted to HTML -to reduce the number of e-mail addresses harvested from the web servers. diff --git a/docs/acknowledgements.txt b/docs/acknowledgements.txt new file mode 100644 index 0000000..01afa7f --- /dev/null +++ b/docs/acknowledgements.txt @@ -0,0 +1,150 @@ +ifndef::external_title[] +Acknowledgements +================ +endif::external_title[] + +This project is the result of years of work by many individuals and companies. + +Many people have written or tweaked the software; the drivers, clients, server +and documentation have all received valuable attention from numerous sources. + +Many of them are listed within the source code, AUTHORS file, release notes, and +mailing list archives, but some prefer to be anonymous. +This software would not be possible without their help. + + +The NUT Team +------------ + +Active members +~~~~~~~~~~~~~~ + +- Arnaud Quette: project leader (since 2005), Debian packager and jack of all trades +- Arjen de Korte: senior lieutenant +- Charles Lepple: senior lieutenant +- Kjell Claesson: senior developer +- Alexander Gordeev: junior developer +- David Goncalves: Python developer +- Eric S. Raymond: Documentation consultant +- Oden Eriksson: Mandriva packager +- Stanislav Brabec: Novell / Suse packager +- Michal Hlavinka: Redhat packager + +Retired members +~~~~~~~~~~~~~~~ + +- Russell Kroll: Founder, and project leader from 1996 to 2005 +- Peter Selinger: senior lieutenant +- Carlos Rodrigues: author of the "megatec" drivers, removing the numerous +drivers for Megatec / Q1 protocol. These drivers have now been replaced by +blazer_ser and blazer_usb +- Niels Baggesen: ported and heavily extended upscode2 to NUT 2.0 driver model +- Niklas Edmundsson: has worked on 3-phase support, and upscode2 updates +- Martin Loyer: has worked a bit on mge-utalk +- Jonathan Dion: MGE internship (summer 2006), who has worked on configuration +- Doug Reynolds: has worked on CyberPower support (powerpanel driver) +- Jon Gough: has worked on porting the megatec driver to USB (megatec_usb) +- Dominique Lallement: Consultant (chairman of the USB/HID PDC Forum) +- Julius Malkiewicz: junior developer +- Tomas Smetana: former Redhat packager (2007-2008) + +[[Eaton]] +Our main supporter: Eaton +------------------------- + +Through the acquisition of MGE Office Protection Systems (a carve out of +the MGE UPS SYSTEMS small systems, up to 10 KVA), Eaton has been supporting +NUT, and more generally the Free/Libre Opensource Software Community +since around 2002. + +This support includes the following actions: + +- providing extensive technical documents (Eaton protocols library), +- providing units to developers of NUT and related projects, +- hosting the networkupstools.org webserver, +- providing artwork, +- promoting NUT in general. + +For more detailed information on Eaton's Opensource commitment, please refer to +link:http://opensource.eaton.com[Eaton Opensource website]. + +Supporting manufacturers +------------------------ + +UPS manufacturers +~~~~~~~~~~~~~~~~~ + +- link:http://powerquality.eaton.com[Eaton], our main supporter, as presented in +the <>. + +- link:http://www.gamatronic.com[Gamatronic], through Nadav Moskovitch, has +revived the 'sec' driver (as gamatronic), and expanded a bit genericups for its +UPSs with alarm interface. + +- link:http://www.microdowell.com[Microdowell], through Elio Corbolante, has +created the 'microdowell' driver to support the Enterprise Nxx/Bxx serial devices. +They also proposes NUT as an alternative to its software for +link:http://www.microdowell.com/fra/download.html[Linux / Unix]. + +- link:http://pcmups.com.tw[Powercom], through Alexey Morozov, has provided +link:ups-protocol.html[extensive information] on its USB/HID devices, along +with development units. + +Appliances manufacturers +~~~~~~~~~~~~~~~~~~~~~~~~ + +- link:http://www.opengear.com[OpenGear] has worked with NUT's leader to +successfully develop and integrate PDU support. Opengear, through Scott Burns, +and Robert Waldie, has submitted several patches. + +Other contributors +------------------ + +- Pavel Korensky's original apcd provided the inspiration for pursuing APC's +smart protocol in 1996 +- Eric Lawson provided scans of the OneAC protocol +- John Marley used OCR software to transform the SEC protocol scans into a HTML +document +- Chris McKinnon scanned and converted the Fortress protocol documentation +- Tank provided documentation on the Belkin/Delta protocol +- Potrans provided a Fenton PowerPal 600 (P series) for development of the +safenet driver. + +Older entries (before 2005) +--------------------------- + +- MGE UPS SYSTEMS was the previous NUT sponsor. They provided protocols +information, many units for development of NUT-related projects. +Several drivers such as mge-utalk, mge-shut, snmp-ups, hidups, and usbhid-ups +are the result of this collaboration, in addition to the WMNut, MGE HID Parser +the libhid projects, ... through Arnaud. +All the MGE supporters have now gone with Eaton (through MGE Office +Protection Systems), which is the new NUT sponsor. + +- Fenton Technologies contributed a PowerPal 660 to the project. Their open +stance and quick responses to technical inquiries were appreciated for +making the development of the fentonups driver possible. +Fenton has since been acquired by link:http://www.metapo.com[Metapo]. + +- Bo Kersey of link:http://www.vircio.com[VirCIO] provided a Best Power Fortress +750 to facilitate the bestups driver. + +- Invensys Energy Systems provided the SOLA/Best "Phoenixtec" protocol +document. SOLA has since been acquired by Eaton. + +- PowerKinetics technical support provided documentation on their MiniCOL +protocol, which is archived in the NUT protocol library. +PowerKinetics was acquired by the link:http://www.jst.cc[JST Group] in June 2003. + +- link:http://www.cyberpowersystems.com[Cyber Power Systems] contributed a +700AVR model for testing and development of the cyberpower driver. + +- link:http://www.liebert.com[Liebert Corporation] supplied serial test boxes +and a UPStation GXT2 with the Web/SNMP card for development of the liebert +driver and expansion of the existing snmp-ups driver. +Liebert has since been acquired by link:http://www.emerson.com[Emerson]. + +NOTE: If a company or individual isn't listed here, then we probably don't have +enough information about the situation. Developers are requested to report vendor +contributions to the NUT team so this list may reflect their help. +If we have left you out, send us some mail. diff --git a/docs/acpi.txt b/docs/acpi.txt deleted file mode 100644 index 9cd9371..0000000 --- a/docs/acpi.txt +++ /dev/null @@ -1,32 +0,0 @@ -Desc: Equivalence between ACPI and NUT variable naming -File: acpi.txt -Date: 30 September 2005 -Auth: Arnaud Quette - -This document presents an equivalence table between ACPI data -and NUT variable naming. - - -+-------------------------------------------------------+---------------------------------------+ -|PowerSummary.CapacityMode | percent | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.DesignCapacity | 100 | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.FullChargeCapacity | 100 | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Rechargeable | true / yes / 1 | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.ConfigVoltage | output.voltage.nominal | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.WarningCapacityLimit | ? battery.charge.low | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.RemainingCapacityLimit | battery.charge.low | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.CapacityGranularity1 | ? | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.CapacityGranularity2 | ? | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.iProduct | ups.model | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.iSerialNumber | ups.serial | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.iDeviceChemistry | battery.type | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.iOEMInformation | ? | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Discharging | ups.status = DISCHRG | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Charging | ups.status = CHRG | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.BelowRemainingCapacityLimit | ups.status = LB | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Current | ? output.current | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.RemainingCapacity | battery.charge | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.Voltage | output.voltage | +-------------------------------------------------------+---------------------------------------+ -|PowerSummary.RemainingCapacityLimit | battery.charge.low | +-------------------------------------------------------+---------------------------------------+ -| PowerSummary.ACPresent | ups.status = OL | -+-------------------------------------------------------+---------------------------------------+ \ No newline at end of file diff --git a/docs/asciidoc.conf b/docs/asciidoc.conf new file mode 100644 index 0000000..fedf952 --- /dev/null +++ b/docs/asciidoc.conf @@ -0,0 +1,55 @@ +## NUT macros: linkman, linkdoc +# +# Usage: linkman:command[manpage-section] +# This macro allows to handle variable manpage location, depending on the +# document type +# +# Note, {0} is the manpage section, while {target} is the command. +# +# Example: linkman:ups.conf[5] +# +# Show NUT link as: (
); if section is defined, else just show +# the command. +# +################################################################################ +# +# Usage: linkdoc:document[display title,[anchor]] +# This macro allows to handle variable NUT documentation location, depending +# on the document type +# +# Note, {1} is the display title, {2} is the optional anchor name, +# {0} is the whole set of args ({1}...{n}) and {target} is the +# base document name. +# Example: +# linkdoc:user-manual[user manual,NUT_Security] +# linkdoc:developer-guide[developer guide,_status_data] + +[macros] +(?su)[\\]?(?Plinkman):(?P\S*?)\[(?P.*?)\]= +(?su)[\\]?(?Plinkdoc):(?P\S*?)\[(?P.*?)\]= + +ifdef::basebackend-docbook[] +ifdef::xhtml11_format[] +[linkman-inlinemacro] +{target}{0?({0})} +[linkdoc-inlinemacro] +{1} +endif::xhtml11_format[] + +# FIXME: linkdoc does not support 'anchor' +ifdef::chunked_format[] +[linkman-inlinemacro] +{target}{0?({0})} +[linkdoc-inlinemacro] +{1} +endif::chunked_format[] + +# PDF output points online versions +# FIXME: linkdoc does not support 'anchor' +ifdef::pdf_format[] +[linkman-inlinemacro] +{target}{0?({0})} +[linkdoc-inlinemacro] +{1} +endif::pdf_format[] +endif::basebackend-docbook[] diff --git a/docs/big-servers.txt b/docs/big-servers.txt deleted file mode 100644 index 525a424..0000000 --- a/docs/big-servers.txt +++ /dev/null @@ -1,68 +0,0 @@ -Desc: Typical setups for big servers -File: big-servers.txt -Date: 14 March 2004 -Auth: Russell Kroll - -By using multiple MONITOR statements in upsmon.conf, you can configure -an environment where a large machine with redundant power monitors -multiple separate UPSes. For the examples in this document, I will use -a HP NetServer LH4 in the stock configuration with 3 of the 4 power -supplies installed. - -Compared to some systems, the LH4 is unusual because it has common power -cords for multiple power supplies. One cord feeds two supplies. As a -result, each UPS drives two of the power supplies, so losing that UPS -affects both at the same time. - -For our examples, UPS "Alpha" is connected to the cord that drives the -two power supplies, and ups "Beta" is connected to the other with just a -single power supply. - -Since the server needs two supplies to stay alive, we can lose "Beta" at -any time, but losing "Alpha" is a showstopper. We make a note of them -when configuring upsmon: - - MONITOR ups-alpha@myhost 2 monuser mypass master - MONITOR ups-beta@myhost 1 monuser mypass master - MINSUPPLIES 2 - -With that configuration, upsmon will only shut down when Alpha reaches -a critical (on battery + low battery) condition, since Beta by itself -is not enough to keep the system running. Beta, on the other hand, -can go up and down as much as it wants and nothing will happen as long -as the other one keeps working. - -The MINSUPPLIES line tells upsmon that we need at least 2 power supplies -to be receiving power from a good UPS (on line or on battery, just not -on battery and low battery). - -Adding redundancy -================= - -The above example assumed the stock hardware configuration. Let's say -we have successfully cajoled the boss into providing the money for a -fourth power supply. Now both power cords run two power supplies, and -the system is maxed out in terms of redundancy. - -The upsmon.conf must be updated to reflect this: - - MONITOR ups-alpha@myhost 2 monuser mypass master - MONITOR ups-beta@myhost 2 monuser mypass master - MINSUPPLIES 2 - -Beta is now driving two power supplies, so we upgrade its power value. -This means that either Alpha *or* Beta can totally shut down and the -server will be able to keep running. - -As an added bonus, this means you can move a running server from one UPS -to another without bringing it down since the minimum power will be -provided at all times. - -Other configurations -==================== - -There are a lot of ways to handle this and they all come down to how many -power supplies, power cords and independent UPS connections you have. A -system with a 1:1 cord:supply ratio has more wires stuffed behind it, but -it's much easier to move things around since any given UPS drives a smaller -percentage of the overall power. diff --git a/docs/cables.txt b/docs/cables.txt new file mode 100644 index 0000000..976bd57 --- /dev/null +++ b/docs/cables.txt @@ -0,0 +1,120 @@ +ifdef::website[] +Cables +====== +endif::website[] + +APC +--- + +940-0024C clone +~~~~~~~~~~~~~~~ + +*From D. Stimits* + +image::images/cables/940-0024C.jpg[APCC 940-0024C clone diagram] + +NOTE: The original 940-0024C diagram was contributed by Steve Draper. + +940-0024C clone for Macs +~~~~~~~~~~~~~~~~~~~~~~~~ + +*From Miguel Howard* + +image::images/cables/mac-940-0024C.png[APCC 940-0024C clone cable for Macs] + +Belkin +------ + +OmniGuard F6C***-RKM +~~~~~~~~~~~~~~~~~~~~ + +*From "Daniel"* + +A straight-through RS-232 cable (with pins 2-7 connected through) should work +with the following models: + +- F6C110-RKM-2U +- F6C150-RKM-2U +- F6C230-RKM-2U +- F6C320-RKM-3U + +image::images/cables/belkin-f6cx-rkm-xu-cable.jpg[Belkin OmniGuard F6C***-RKM cable] + +Eaton +----- + +Documents in this section are provided courtesy of Eaton. + +MGE Office Protection Systems +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The two first cables also applies to MGE UPS SYSTEMS. + +DB9-DB9 cable (ref 66049) +^^^^^^^^^^^^^^^^^^^^^^^^^ + +This is the standard serial cable, used on most units. + +image::images/cables/mge-66049.png[DB9-DB9 cable] + +DB9-RJ45 cable +^^^^^^^^^^^^^^ + +This cable is used on the more recent models, including Ellipse MAX, Protection +Station, ... + +image::images/cables/mge-db9-rj45.jpg[DB9-RJ45 cable] + +DB9-RJ12 cable +^^^^^^^^^^^^^^ + +This cable is used on some older Ellipse models. + +image::images/cables/mge-db9-rj12.jpg[DB9-RJ12 cable] + +Powerware LanSafe +~~~~~~~~~~~~~~~~~ + +image::images/cables/Lansafecable.jpg[Powerware LanSafe cable] + +SOLA-330 +~~~~~~~~ + +Just uses a normal serial cable, with pin 1-1 through to 9-9. + +image::images/cables/SOLA-330.png[SOLA-330 cable] + + +HP - Compaq +----------- + +Older Compaq UPS Family +~~~~~~~~~~~~~~~~~~~~~~~ + +This cable can be used with the following models: + +T700, T1000, T1500, T1500j, T700h, T1000h, T1500h, R1500, R1500j, +R1500h, T2000, T2000j, T2400h, T2400h-NA, R3000 / R3000j, R3000h, +R3000h-International, R3000h-NA, R6000h-NA, R6000i, R6000j. + +UPS PC 9 pin connector + + 1 --------- 3 + 2 --------- 2 + 4 -\ + 4 --------- 5 | + 6 -/ + 6 --------- 7 + +Contributed by Kjell Claesson and Arnaud Quette. + + +Tripp-Lite +---------- + +*From Tripp-Lite, via Bryan Kolodziej* + +This cable (black 73-0844 cable) is used on various models, using the "Lan 2.2 interface" +and the genericups driver (upstype=5). + +image::images/cables/73-0724.png[73-0724 cable] diff --git a/docs/cables/ge-imv-victron.txt b/docs/cables/ge-imv-victron.txt index db2f76f..bffed19 100644 --- a/docs/cables/ge-imv-victron.txt +++ b/docs/cables/ge-imv-victron.txt @@ -10,7 +10,7 @@ Data cable 1 for UPS: Driver: victronups (newvictronups) -UPS PC 9 pin [2~connector +UPS PC 9 pin connector 1 --------- 3 2 --------- 2 5 --------- 5 GND diff --git a/docs/cables/sms.txt b/docs/cables/sms.txt index b81e517..6d7ab73 100644 --- a/docs/cables/sms.txt +++ b/docs/cables/sms.txt @@ -13,4 +13,4 @@ FEMEA DB9 MACHO DB9 - This cable is working with Manager III 1300 VA and 650 VA, SMS Ups's - Jump in computer side pins 4/8 and conect to pin 1 in UPS side -- Use megatec driver from Nut Package +- Use NUT blazer_ser driver diff --git a/docs/chroot.txt b/docs/chroot.txt deleted file mode 100644 index 41dce61..0000000 --- a/docs/chroot.txt +++ /dev/null @@ -1,110 +0,0 @@ -Desc: chrooting and other forms of paranoia -File: chroot.txt -Date: 24 August 2003 -Auth: Russell Kroll - -It has been possible to run the drivers and upsd in a chrooted jail for -some time, but it involved a number of evil hacks. The 1.3 series adds -much saner chroot behavior, using BIND 9 as an inspiration. - -The old way involved creating an entire tree, complete with libraries, a -shell (!), and many auxiliary files. This was hard to maintain and -could have become an interesting playground for an intruder. The new -way is minimal, and leaves little in the way of usable materials within -the jail. - -This document assumes that you already have created at least one user -account for the software to use. If you're still letting it fall back -on "nobody", stop right here and go figure that out first. It also -assumes that you have everything else configured and running happily all -by itself. - -Essentially, you need to create your configuration directory and state -path in their own little world, plus a special device or two. - -For the purposes of this example, the chroot jail is /chroot/nut. The -programs have been built with the default prefix, so they are using -/usr/local/ups. First, create the confpath and bring over a few files. - - mkdir -p /chroot/nut/usr/local/ups/etc - cd /chroot/nut/usr/local/ups/etc - cp -a /usr/local/ups/etc/upsd.users . - cp -a /usr/local/ups/etc/upsd.conf . - cp -a /usr/local/ups/etc/ups.conf . - -I'm using 'cp -a' to maintain the permissions on those files. - -Now bring over your state path, maintaining the same permissions as -before. - - mkdir -p /chroot/nut/var/state - cp -a /var/state/ups /chroot/nut/var/state - -Next we must put /etc/localtime inside the jail, or you may get very -strange readings in your syslog. You'll know you have this problem if -upsd shows up as UTC in the syslog while the rest of the system doesn't. - - mkdir -p /chroot/nut/etc - cp /etc/localtime /chroot/nut/etc - -Note that this is not "cp -a", since we want to copy the *content*, not -the symlink that it may be on some systems. - -Finally, create a tiny bit of /dev so the programs can enter the -background properly - they redirect fds into the bit bucket to make sure -nothing else grabs 0-2. - - mkdir -p /chroot/nut/dev - cp -a /dev/null /chroot/nut/dev - -Try to start your driver(s) and make sure everything fires up as before. - - upsdrvctl -r /chroot/nut -u nutdev start - -Once your drivers are running properly, try starting upsd. - - upsd -r /chroot/nut -u nutsrv - -Check your syslog. If nothing is complaining, try running clients like -upsc and upsmon. If they seem happy, then you're done. - -symlinks --------- - -After you do this, you will have two copies of many things, like the -confpath and the state path. I recommend deleting the 'real' -/var/state/ups, replacing it with a symlink to -/chroot/nut/var/state/ups. That will let other programs reference the -.pid files without a lot of hassle. - -You can also do this with your confpath and point /usr/local/ups/etc at -/chroot/nut/usr/local/ups/etc unless you're worried about something -hurting the files inside that directory. In that case, you should -maintain a 'master' copy and push it into the chroot path after -making changes. - -upsdrvctl itself does not chroot, so the ups.conf still needs to be in -the usual confpath. - -upsmon ------- - -This has not yet been applied to upsmon, since it can be quite -complicated when there are notifiers that need to be run. One -possibility would be for upsmon to have three instances: - - - privileged root parent that listens for a shutdown command - - - unprivileged child that listens for notify events - - - unprivileged chrooted child that does network I/O - -This one is messy, and may not happen for some time, if ever. - -Config files ------------- - -You may now set chroot= and user= in the global section of ups.conf. - -upsd chroots before opening any config files, so there is no way to -add support for that in upsd.conf at the present time. diff --git a/docs/commands.txt b/docs/commands.txt deleted file mode 100644 index a6af1b8..0000000 --- a/docs/commands.txt +++ /dev/null @@ -1,62 +0,0 @@ -Desc: Commands sent to the UPS drivers -File: commands.txt -Date: 9 January 2004 -Auth: Russell Kroll - -upsd can call drivers to store values in read/write variables and to kick -off instant commands. This is how you register handlers for those events. - -The driver core (drivers/main.c) has a structure called upsh. You -should populate it with function pointers in your upsdrv_initinfo() -function. Right now, there are only two possibilities: - - - setvar = setting UPS variables (SET VAR protocol command) - - instcmd = instant UPS commands (INSTCMD protocol command) - -SET ---- - -If your driver's function for handling variable set events is called -my_ups_set(), then you'd do this to add the pointer: - - upsh.setvar = my_ups_set; - -my_ups_set() will receive two parameters: - - const char * - the variable being changed - const char * - the new value - -You should return either STAT_SET_HANDLED if your driver recognizes the -command, or STAT_SET_UNKNOWN if it doesn't. Other possibilities will be -added at some point in the future. - -INSTCMD -------- - -This works just like the set process, with slightly different values -arriving from the server. - - upsh.instcmd = my_ups_cmd; - -Your function will receive two args: - - const char * - the command name - const char * - (reserved) - -You should return either STAT_INSTCMD_HANDLED or STAT_INSTCMD_UNKNOWN -depending on whether your driver can handle the requested command. - -Notes ------ - -Use strcasecmp. The command names arriving from upsd should be treated -without regards to case. - -Responses ---------- - -Drivers will eventually be expected to send responses to commands. -Right now, there is no channel to get these back through upsd to -the client, so this is not implemented. - -This will probably be implemented with a polling scheme in the clients. diff --git a/docs/config-files.txt b/docs/config-files.txt deleted file mode 100644 index 98c6b61..0000000 --- a/docs/config-files.txt +++ /dev/null @@ -1,64 +0,0 @@ -Desc: Details about the configuration files -File: config-files.txt -Date: 30 April 2003 -Auth: Russell Kroll - -All configuration files within this package are parsed with a common -state machine, which means they all can use a number of extras described -in this file. - -First, most of the programs use an uppercase word to declare a -configuration directive. This may be something like MONITOR, NOTIFYCMD, -or ACCESS. The case does matter here. "monitor" won't be recognized. - -Next, the parser does not care about whitespace between words. If you -like to indent things with tabs or spaces, feel free to do it here. - -If you need to set a value to something containing spaces, it has to be -contained within "quotes" to keep the parser from splitting up the line. -That is, you want to use something like this: - - SHUTDOWNCMD "/sbin/shutdown -h +0" - -Without the quotes, it would only see the first word on the line. - -OK, so let's say you really need to embed that kind of quote within your -configuration directive for some reason. You can do that too. - - NOTIFYCMD "/bin/notifyme -foo -bar \"hi there\" -baz" - -In other words, \ can be used to escape the ". - -Finally, for the situation where you need to put the \ character into your -string, you just escape it. - - NOTIFYCMD "/bin/notifyme c:\\dos\\style\\path" - -The \ can actually be used to escape any character, but you only really -need it for \, ", and # as they have special meanings to the parser. - -# is the comment character. Anything after an unescaped # is ignored. - -Something like this... - - identity = my#1ups - -... will actually turn into "identity = my", since the # stops the -parsing. If you really need to have a # in your configuration, then -escape it. - - identity = my\#1ups - -Much better. - -Line spanning -============= - -You can put a backslash at the end of the line to join it to the next -one. This creates one virtual line that is composed of more than one -physical line. - -Also, if you leave the "" quote container open before a newline, it will -keep scanning until it reaches another one. If you see bizarre behavior -in your configuration files, check for an unintentional instance of -quotes spanning multiple lines. diff --git a/docs/config-notes.txt b/docs/config-notes.txt new file mode 100644 index 0000000..e8a3299 --- /dev/null +++ b/docs/config-notes.txt @@ -0,0 +1,798 @@ +Configuration notes +=================== + +This chapter describe most of the configuration and use aspects of NUT, +including establishing communication with the device and configuring safe +shutdowns when the UPS battery runs out of power. + +There are many programs and <> in this +package. You should check out the <> +and other accompanying documentation to see how it all works. + +NOTE: NUT does not currently provide proper graphical configuration tools. +However, there is now support for linkdoc:developer-guide[Augeas,augeas_user]. + +Details about the configuration files +------------------------------------- + +Generalities +~~~~~~~~~~~~ + +All configuration files within this package are parsed with a common +state machine, which means they all can use a number of extras described here. + +First, most of the programs use an uppercase word to declare a +configuration directive. This may be something like MONITOR, NOTIFYCMD, +or ACCESS. The case does matter here. "monitor" won't be recognized. + +Next, the parser does not care about whitespace between words. If you +like to indent things with tabs or spaces, feel free to do it here. + +If you need to set a value to something containing spaces, it has to be +contained within "quotes" to keep the parser from splitting up the line. +That is, you want to use something like this: + + SHUTDOWNCMD "/sbin/shutdown -h +0" + +Without the quotes, it would only see the first word on the line. + +OK, so let's say you really need to embed that kind of quote within your +configuration directive for some reason. You can do that too. + + NOTIFYCMD "/bin/notifyme -foo -bar \"hi there\" -baz" + +In other words, \ can be used to escape the ". + +Finally, for the situation where you need to put the \ character into your +string, you just escape it. + + NOTIFYCMD "/bin/notifyme c:\\dos\\style\\path" + +The \ can actually be used to escape any character, but you only really +need it for \, ", and # as they have special meanings to the parser. + +# is the comment character. Anything after an unescaped # is ignored. + +Something like this... + + identity = my#1ups + +... will actually turn into "identity = my", since the # stops the +parsing. If you really need to have a # in your configuration, then +escape it. + + identity = my\#1ups + +Much better. + +Line spanning +~~~~~~~~~~~~~ + +You can put a backslash at the end of the line to join it to the next +one. This creates one virtual line that is composed of more than one +physical line. + +Also, if you leave the "" quote container open before a newline, it will +keep scanning until it reaches another one. If you see bizarre behavior +in your configuration files, check for an unintentional instance of +quotes spanning multiple lines. + + +Basic configuration +------------------- + +This chapter describe the base configuration to establish communication with +the device. + +This will be sufficient for PDU. But for UPS and SCD, you will also need to +configure <>. + +image:images/simple.png[] + +[[Driver_configuration]] +Driver configuration +~~~~~~~~~~~~~~~~~~~~ + +Create one section per UPS in /usr/local/ups/etc/ups.conf + +To find out which driver to use, check the <>, +or data/driver.list. + +Once you have picked a driver, create a section for your UPS in +ups.conf. You must supply values for "driver" and "port". + +Some drivers may require other flags or settings. The "desc" value +is optional, but is recommended to provide a better description of +what your UPS is supporting. + +A typical device without any extra settings looks like this: + + [mydevice] + driver = mydriver + port = /dev/ttyS1 + desc = "Workstation" + +NOTE: USB drivers (usbhid-ups, bcmxcp_usb, tripplite_usb, blazer_usb and +richcomm_usb) are special cases and ignore the 'port' value. +You must still set this value, but it does not matter what you set +it to; a common and good practice is to set 'port' to *auto*, but you can +put whatever you like. If you only own one UBS UPS, the driver will +find it automatically. If you own more than one, refer to the driver's +manual page for more information on matching a specific device. + +References: linkman:ups.conf[5], +linkman:nutupsdrv[8], +linkman:bcmxcp_usb[8], +linkman:blazer[8], +linkman:richcomm_usb[8], +linkman:tripplite_usb[8], +linkman:usbhid-ups[8] + + +[[Starting_drivers]] +Starting the driver(s) +~~~~~~~~~~~~~~~~~~~~~~ + +Start the driver(s) for your hardware: + + /usr/local/ups/bin/upsdrvctl start + +Make sure the driver doesn't report any errors. It should show a +few details about the hardware and then enter the background. You +should get back to the command prompt a few seconds later. For +reference, a successful start of the `usbhid-ups` driver looks like this: + + # /usr/local/ups/bin/upsdrvctl start + Network UPS Tools - Generic HID driver 0.34 (2.4.1) + USB communication driver 0.31 + Using subdriver: MGE HID 1.12 + Detected EATON - Ellipse MAX 1100 [ADKK22008] + +If the driver doesn't start cleanly, make sure you have picked the +right one for your hardware. You might need to try other drivers +by changing the "driver=" value in ups.conf. + +Be sure to check the driver's man page to see if it needs any extra +settings in ups.conf to detect your hardware. + +If it says "can't bind /var/state/ups/..." or similar, then your +state path probably isn't writable by the driver. Check the +<>. + +After making changes, try the <> step again. + +References: man pages: linkman:nutupsdrv[8], linkman:upsdrvctl[8] + + +Data server configuration (upsd) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Configure upsd, which serves data from the drivers to the clients. + +First, edit upsd.conf to allow access to your client systems. By +default, upsd will only listen to localhost port 3493/tcp. If you want +to connect to it from other machines, you must specify each interface you +want upsd to listen on for connections, optionally with a port number. + + LISTEN 127.0.0.1 3493 + LISTEN ::1 3493 + +NOTE: Refer to the NUT user manual <> for +information on how to access and secure upsd clients connections. + +Next, create upsd.users. For now, this can be an empty file. +You can come back and add more to it later when it's time to +configure upsmon or run one of the management tools. + +Do not make either file world-readable, since they both hold +access control data and passwords. They just need to be readable by +the user you created in the preparation process. + +The suggested configuration is to chown it to root, chgrp it to the +group you created, then make it readable by the group. + + chown root:nut upsd.conf upsd.users + chmod 0640 upsd.conf upsd.users + +References: man pages: linkman:upsd.conf[5], +linkman:upsd.users[5], +linkman:upsd[8] + +[[Starting_upsd]] +Starting the data server +~~~~~~~~~~~~~~~~~~~~~~~~ + +Start the network data server: + + /usr/local/ups/sbin/upsd + +Make sure it is able to connect to the driver(s) on your system. +A successful run looks like this: + + # /usr/local/ups/sbin/upsd + Network UPS Tools upsd 2.4.1 + listening on 127.0.0.1 port 3493 + listening on ::1 port 3493 + Connected to UPS [eaton]: usbhid-ups-eaton + +upsd prints dots while it waits for the driver to respond. Your +system may print more or less depending on how many drivers you +have and how fast they are. + +NOTE: if upsd says that it can't connect to a UPS or that the data +is stale, then your ups.conf is not configured correctly, or you +have a driver that isn't working properly. You must fix this before +going on to the next step. + +Reference: man page: linkman:upsd[8] + +Check the UPS data +~~~~~~~~~~~~~~~~~~ + +Status data +^^^^^^^^^^^ + +Make sure that the UPS is providing good status data. + + /usr/local/ups/bin/upsc myupsname@localhost ups.status + +You should see just one line in response: + + OL + +OL means your system is running on line power. If it says something +else (like OB - on battery, or LB - low battery), your driver was +probably misconfigured during the <> +step. If you reconfigure the driver, use 'upsdrvctl stop' to stop it, then +start it again as shown in the <> step. + +Reference: man page: linkman:upsc[8] + + +All data +^^^^^^^^ + +Look at all of the status data which is being monitored. + + /usr/local/ups/bin/upsc myupsname@localhost + +What happens now depends on the kind of device and driver you have. +In the list, you should see ups.status with the same value you got +above. A sample run on a UPS (Eaton Ellipse MAX 1100) looks like this: + + battery.charge: 100 + battery.charge.low: 20 + battery.runtime: 2525 + battery.type: PbAc + device.mfr: EATON + device.model: Ellipse MAX 1100 + device.serial: ADKK22008 + device.type: ups + driver.name: usbhid-ups + driver.parameter.pollfreq: 30 + driver.parameter.pollinterval: 2 + driver.parameter.port: auto + driver.version: 2.4.1-1988:1990M + driver.version.data: MGE HID 1.12 + driver.version.internal: 0.34 + input.sensitivity: normal + input.transfer.boost.low: 185 + input.transfer.high: 285 + input.transfer.low: 165 + input.transfer.trim.high: 265 + input.voltage.extended: no + outlet.1.desc: PowerShare Outlet 1 + outlet.1.id: 2 + outlet.1.status: on + outlet.1.switchable: no + outlet.desc: Main Outlet + outlet.id: 1 + outlet.switchable: no + output.frequency.nominal: 50 + output.voltage: 230.0 + output.voltage.nominal: 230 + ups.beeper.status: enabled + ups.delay.shutdown: 20 + ups.delay.start: 30 + ups.firmware: 5102AH + ups.load: 0 + ups.mfr: EATON + ups.model: Ellipse MAX 1100 + ups.power.nominal: 1100 + ups.productid: ffff + ups.serial: ADKK22008 + ups.status: OL CHRG + ups.timer.shutdown: -1 + ups.timer.start: -1 + ups.vendorid: 0463 + +Reference: man page: linkman:upsc[8], +<> + +Startup scripts +~~~~~~~~~~~~~~~ + +NOTE: This step is not need if you installed from packages. + +Edit your startup scripts, and make sure upsdrvctl and upsd are run every time +your system starts. + +[[UPS_shutdown]] +Configuring automatic shutdowns for low battery events +------------------------------------------------------ + +The whole point of UPS software is to bring down the OS cleanly when you +run out of battery power. Everything else is roughly eye candy. + +To make sure your system shuts down properly, you will need to perform some +additional configuration and run upsmon. Here are the basics. + +[[Shutdown_design]] +Shutdown design +~~~~~~~~~~~~~~~ + +When your UPS batteries get low, the operating system needs to be brought +down cleanly. Also, the UPS load should be turned off so that all devices +that are attached to it are forcibly rebooted. + +Here are the steps that occur when a critical power event happens: + +1. The UPS goes on battery + +2. The UPS reaches low battery (a "critical" UPS) + +3. The upsmon master notices and sets "FSD" - the "forced shutdown" + flag to tell all slave systems that it will soon power down the load. ++ +(If you have no slaves, skip to step 6) + +4. upsmon slave systems see "FSD" and: + + - generate a NOTIFY_SHUTDOWN event + - wait FINALDELAY seconds - typically 5 + - call their SHUTDOWNCMD + - disconnect from upsd + +5. The upsmon master system waits up to HOSTSYNC seconds (typically 15) + for the slaves to disconnect from upsd. If any are connected after + this time, upsmon stops waiting and proceeds with the shutdown + process. + +6. The upsmon master: + + - generates a NOTIFY_SHUTDOWN event + - waits FINALDELAY seconds - typically 5 + - creates the POWERDOWNFLAG file - usually /etc/killpower + - calls the SHUTDOWNCMD + +7. On most systems, init takes over, kills your processes, syncs and + unmounts some filesystems, and remounts some read-only. + +8. init then runs your shutdown script. This checks for the + POWERDOWNFLAG, finds it, and tells the UPS driver(s) to power off + the load. + +9. The system loses power. + +10. Time passes. The power returns, and the UPS switches back on. + +11. All systems reboot and go back to work. + + +How you set it up +~~~~~~~~~~~~~~~~~ + +[[NUT_user_creation]] +NUT user creation +^^^^^^^^^^^^^^^^^ + +Create a upsd user for upsmon to use while monitoring this UPS. + +Edit upsd.users and create a new section. upsmon will connect +to upsd and use this user name (in brackets) and password to +authenticate. This example is for a user called "monuser": + + [monuser] + password = mypass + upsmon master + # or upsmon slave + +References: linkman:upsd[8], linkman:upsd.users[5] + +Reloading the data server +^^^^^^^^^^^^^^^^^^^^^^^^^ + +Reload upsd. Depending on your configuration, you may be able to +do this without stopping upsd: + + /usr/local/ups/sbin/upsd -c reload + +If that doesn't work (check the syslog), just restart it: + + /usr/local/ups/sbin/upsd -c stop + /usr/local/ups/sbin/upsd + +NOTE: if you want to make reloading work later, see the entry in the +link:FAQ.html[FAQ] about starting upsd as a different user. + +Power Off flag file +^^^^^^^^^^^^^^^^^^^ + +Set the POWERDOWNFLAG location for upsmon. + +In upsmon.conf, add a POWERDOWNFLAG directive with a filename. +upsmon will create this file when the UPS needs to be powered off +during a power failure when low battery is reached. + +We will test for the presence of this file in a later step. + + POWERDOWNFLAG /etc/killpower + +References: man pages: linkman:upsmon[8], +linkman:upsmon.conf[5] + +Securing upsmon.conf +^^^^^^^^^^^^^^^^^^^^ + +The recommended setting is to have it owned by root:nut, then make it readable +by the group and not world. This file contains passwords that could be used by +an attacker to start a shutdown, so keep it secure. + + chown root:nut upsmon.conf + chmod 0640 upsmon.conf + +This step has been placed early in the process so you secure this file before +adding sensitive data in the next step. + + +Create a MONITOR directive for upsmon +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Edit upsmon.conf and create a MONITOR line with the UPS definition +(@), username and password from the <> +step, and the master or slave setting. + +If it's the master (i.e., it's connected to this UPS directly): + + MONITOR myupsname@mybox 1 monuser mypass master + +If it's just monitoring this UPS over the network, and some other system is the +master: + + MONITOR myupsname@mybox 1 monuser mypass slave + +The number "1" here is the power value. This should always be set to 1 unless +you have a very special (read: expensive) system with redundant power supplies. +In such cases, refer to the User Manual: + +- <>, +- <>. + +References: linkman:upsmon[8], linkman:upsmon.conf[5] + +Define a SHUTDOWNCMD for upsmon +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Still in upsmon.conf, add a directive that tells upsmon how to shut down your +system. This example seems to work on most systems: + + SHUTDOWNCMD "/sbin/shutdown -h +0" + +Notice the presence of "quotes" here to keep it together. + +If your system has special needs, you may want to set this to a script which +does local shutdown tasks before calling init. + + +Start upsmon +^^^^^^^^^^^^ + + /usr/local/ups/sbin/upsmon + +If it complains about something, then check your configuration. + +Checking upsmon +^^^^^^^^^^^^^^^ + +Look for messages in the syslog to indicate success. It should look something +like this: + + May 29 01:11:27 mybox upsmon[102]: Startup successful + May 29 01:11:28 mybox upsd[100]: Client monuser@192.168.50.1 + logged into UPS [myupsname] + +Any errors seen here are probably due to an error in the config files of either +`upsmon` or `upsd`. You should fix them before continuing. + + +Startup scripts +^^^^^^^^^^^^^^^ + +NOTE: This step is not need if you installed from packages. + +Edit your startup scripts, and add a call to `upsmon`. + +Make sure `upsmon` starts when your system comes up. Do it after `upsdrvctl` +and `upsd`, or it will complain about not being able to contact the server. + +You may delete the POWERDOWNFLAG in the startup scripts, but it is not +necessary. `upsmon` will clear that file for you when it starts. + +NOTE: Init script examples are provide in the 'scripts' directory of +the NUT source tree, and in the various <<_binary_packages,packages>> +that exist. + +Shutdown scripts +^^^^^^^^^^^^^^^^ + +NOTE: This step is not need if you installed from packages. + +Edit your shutdown scripts, and add `upsdrvctl shutdown`. + +You should configure your system to power down the UPS after the filesystems are +remounted read-only. Have it look for the presence of the POWERDOWNFLAG (from +linkman:upsmon.conf[5]), using this as an example: + +-------------------------------------------------------------------------------- + + if (test -f /etc/killpower) + then + echo "Killing the power, bye!" + /usr/local/ups/bin/upsdrvctl shutdown + + sleep 120 + + # uh oh... the UPS power-off failed + # you probably want to reboot here so you don't get stuck! + # *** see also the section on power races in the FAQ! *** + fi + +-------------------------------------------------------------------------------- + +[WARNING] +================================================================================ +- Be careful that upsdrvctl command will probably power off your machine. +Don't use it unless your system is ready to be halted by force. +If you run RAID, read the <<_raid_warning,RAID warning>> below! + +- Make sure the filesystem(s) containing upsdrvctl, ups.conf and your UPS +driver(s) are mounted (possibly in read-only mode) when the system gets to this +point. Otherwise it won't be able to figure out what to do. +================================================================================ + + +[[Testing_shutdowns]] +Testing shutdowns +^^^^^^^^^^^^^^^^^ + +UPS equipment varies from manufacturer to manufacturer and even within +model lines. You should test the shutdown sequence on your systems before +leaving them unattended. A successful sequence is one where the OS halts +before the battery runs out, and the system restarts when power returns. + +The first step is to see how upsdrvctl will behave without actually turning off +power. To do so, use the '-t' argument: + + /usr/local/ups/bin/upsdrvctl -t shutdown + +It will display the sequence without actually calling the drivers. + + +You can finally test a forced shutdown sequence (FSD) using: + + /usr/local/ups/sbin/upsmon -c fsd + +This will execute a full shutdown sequence, as presented in +<>, starting from the 3rd step. + +If everything works correctly, the computer will be forcibly powered +off, may remain off for a few seconds to a few minutes (depending on +the driver and UPS type), then will power on again. + +If your UPS just sits there and never resets the load, you are vulnerable +to a power race and should add the "reboot after timeout" hack at the very +least. + +Also refer to the section on power races in the link:FAQ.html[FAQ]. + +Using suspend to disk +~~~~~~~~~~~~~~~~~~~~~ + +Support for suspend to RAM and suspend to disk has been available in +the Linux kernel for a while now. For obvious reasons, suspending to +RAM isn't particularly useful when the UPS battery is getting low, +but suspend to disk may be an interesting concept. + +This approach minimizes the amount of disruption which would be caused +by an extended outage. The UPS goes on battery, then reaches low +battery, and the system takes a snapshot of itself and halts. Then it +is turned off and waits for the power to return. + +Once the power is back, the system reboots, pulls the snapshot back in, +and keeps going from there. If the user happened to be away when it +happened, they may return and have no idea that their system actually +shut down completely in the middle. + +In order for this to work, you need to shutdown NUT (UPS driver, upsd +server and upsmon client) in the suspend script and start them again in +the resume script. Don't try to keep them running. The upsd server +will latch the FSD state (so it won't be useable after resuming) and so +will the upsmon client. Some drivers may work after resuming, but many +don't and some UPS'es will require re-initialization, so it's best not +to keep this running either. + +After stopping driver, server and client you'll have to send the UPS +the command to shutdown only if the POWERDOWNFLAG is present. Note +that most likely you'll have to allow for a grace period after sending +'upsdrvctl shutdown' since the system will still have to take a +snapshot of itself after that. Not all drivers support this, so before +going down this road, make sure that the one you're using does. + +RAID warning +~~~~~~~~~~~~ + +If you run any sort of RAID equipment, make sure your arrays are either halted +(if possible) or switched to "read-only" mode. Otherwise you may suffer a long +resync once the system comes back up. + +The kernel may not ever run its final shutdown procedure, so you must take care +of all array shutdowns in userspace before upsdrvctl runs. + +If you use software RAID (md) on Linux, get mdadm and try using +'mdadm --readonly' to put your arrays in a safe state. This has to +happen after your shutdown scripts have remounted the filesystems. + +On hardware RAID or other kernels, you have to do some detective work. It may +be necessary to contact the vendor or the author of your driver to find out +how to put the array in a state where a power loss won't leave it "dirty". + +Our understanding is that most if not all RAID devices on Linux will be fine +unless there are pending writes. Make sure your filesystems are remounted +read-only and you should be covered. + + +[[DataRoom]] +Typical setups for enterprise networks and data rooms +----------------------------------------------------- + +The split nature of this UPS monitoring software allows a wide variety of +power connections. This chapter will help you identify how things should +be configured using some general descriptions. + +There are two main elements: + +1. There's a UPS attached to a communication (serial, USB or network) port on +this system. +2. This system depends on a UPS for power. + +You can play "mix and match" with those two to arrive at these descriptions +for individual hosts: + +- A: 1 but not 2 +- B: 2 but not 1 +- C: 1 and 2 + +A small to medium sized data room usually has one C and a bunch of Bs. +This means that there's a system (type C) hooked to the UPS which depends +on it for power. There are also some other systems in there (type B) +which depend on that same UPS for power, but aren't directly connected to +it. + +Larger data rooms or those with multiple UPSes may have several "clusters" +of the "single C, many Bs" depending on how it's all wired. + +Finally, there's a special case. Type A systems are connected to a UPS's +serial port, but don't depend on it for power. This usually happens when +a UPS is physically close to a box and can reach the serial port, but +the wiring is such that it doesn't actually feed it. + +Once you identify a system's type, use this list to decide which of the +programs need to be run for monitoring: + +- A: driver and upsd +- B: upsmon (as slave) +- C: driver, upsd, and upsmon (as master) + +To further complicate things, you can have a system that is hooked to +multiple UPSes, but only depends on one for power. This particular +situation makes it an "A" relative to one UPS, and a "C" relative to the +other. The software can handle this - you just have to tell it what to do. + +NOTE: NUT can also serve as a data proxy to increase the number of clients, +or share the communication load between several upsd instances. + +image:images/advanced.png[] + +If you are running large server-class systems that have more than one +power feed, see the next section for information on how to handle it +properly. + +[[BigServers]] +Typical setups for big servers with UPS redundancy +-------------------------------------------------- + +By using multiple MONITOR statements in upsmon.conf, you can configure an +environment where a large machine with redundant power monitors multiple +separate UPSes. + +image:images/bigbox.png[] + +Example configuration +~~~~~~~~~~~~~~~~~~~~~ + +For the examples in this section, we will use a server with four power supplies +installed. + +Two UPS, 'Alpha' and 'Beta', are each driving two of the power supplies. +This means that either 'Alpha' *or* 'Beta' can totally shut down and the +server will be able to keep running. + +The upsmon.conf configuration that reflect this is the following: + + MONITOR ups-alpha@myhost 2 monuser mypass master + MONITOR ups-beta@myhost 2 monuser mypass master + MINSUPPLIES 2 + +With that configuration, upsmon will only shut down when both UPS reaches +a critical (on battery + low battery) condition, since 'Alpha' and 'Beta' +provide the same power value. + +As an added bonus, this means you can move a running server from one UPS +to another (for maintenance purpose for example) without bringing it down since +the minimum power will be provided at all times. + +The MINSUPPLIES line tells upsmon that we need at least 2 power supplies +to be receiving power from a good UPS (on line or on battery, just not +on battery and low battery). + +NOTE: we could have used a 'Power Value' of 1 for both UPS, and MINSUPPLIES +set to 1 too. These values are purely arbitrary, so you are free to use your +own rules. Here, we have linked these values to the number of power supplies +that each UPS is feeding (2). + + +Multiple UPS shutdowns ordering +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you have multiple UPSes connected to your system, chances are that you +need to shut them down in a specific order. The goal is to shut down +everything but the one keeping upsmon alive at first, then you do that one +last. + +To set the order in which your UPSes receive the shutdown commands, define +the 'sdorder' value in your ups.conf. + + [bigone] + driver = usbhid-ups + port = auto + sdorder = 2 + + [littleguy] + driver = mge-shut + port = /dev/ttyS0 + sdorder = 1 + + [misc] + driver = blazer_ser + port = /dev/ttyS1 + sdorder = 0 + +The order runs from 0 to the highest number available. So, for this +configuration, the order of shutdowns would be 'misc', 'littleguy', and then +'bigone'. + +NOTE: If you have a UPS that shouldn't be shutdown when running 'upsdrvctl +shutdown', set the *sdorder* to *-1*. + + +Other redundancy configurations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are a lot of ways to handle redundancy and they all come down to how many +power supplies, power cords and independent UPS connections you have. A +system with a 1:1 cord:supply ratio has more wires stuffed behind it, but +it's much easier to move things around since any given UPS drives a smaller +percentage of the overall power. + +More information can be found in the linkdoc:user-manual[NUT user manual], +and the various link:man/index.html[user manual pages]. diff --git a/docs/configure.txt b/docs/configure.txt index 44cdf88..31ffed3 100644 --- a/docs/configure.txt +++ b/docs/configure.txt @@ -1,327 +1,345 @@ -Desc: Configure options -File: configure.txt -Date: 24 December 2008 -Auth: Russell Kroll -Auth: Peter Selinger -Auth: Arnaud Quette +ifdef::website[] +Configure options +================= +endif::website[] -There are a few options that can be given to configure to tweak compiles. +There are a few options that can be given to configure to tweak compiles. See also "./configure --help" for a current and complete listing. -Contents: -========= +Driver selection +---------------- -1. Driver selection -2. Optional features -3. Other configuration options -4. Installation directories -5. Directories used by NUT at run-time -6. Things the compiler might need to find + --with-serial -1. Driver selection: -==================== +Build and install the serial drivers (default: yes) - --with-serial + --with-usb - Build and install the serial drivers (default: yes) +Build and install the USB drivers (default: auto-detect) +Note that you need to install the libusb development package or files. - --with-usb + --with-snmp - Build and install the USB drivers (default: auto-detect) - Note that you need to install the libusb development package or files. +Build and install the SNMP drivers (default: auto-detect) +Note that you need to install libsnmp development package or files. - --with-snmp + --with-neon - Build and install the SNMP drivers (default: auto-detect) - Note that you need to install libsnmp development package or files. +Build and install the XML drivers (default: auto-detect) +Note that you need to install neon development package or files. - --with-neon + --with-drivers=,,... - Build and install the XML drivers (default: auto-detect) - Note that you need to install neon development package or files. +Specify exactly which driver or drivers to build and install (this +works for serial, usb, and snmp drivers, and overrides the +preceding three options). - --with-drivers=,,... +As of the time of this writing (2010), there are 46 UPS drivers +available. Most users will only need one, a few will need two or +three, and very few people will need all of them. - Specify exactly which driver or drivers to build and install (this - works for serial, usb, and snmp drivers, and overrides the - preceding three options). - - As of the time of this writing (2006), there are 47 UPS drivers - available. Most users will only need one, a few will need two or - three, and very few people will need all of them. - - To save time during the compile and disk space later on, you can - use this option to just build and install a subset of the drivers. - To select apcsmart and usbhid-ups, you'd do this: +To save time during the compile and disk space later on, you can +use this option to just build and install a subset of the drivers. +To select mge-shut and usbhid-ups, you'd do this: --with-drivers=apcsmart,usbhid-ups - If you need to build more drivers later on, you will need to rerun - configure with a different list. To make it build all of the - drivers from scratch again, run 'make clean' before starting. +If you need to build more drivers later on, you will need to rerun +configure with a different list. To make it build all of the +drivers from scratch again, run 'make clean' before starting. -2. Optional features: -===================== + --with-doc= (default: no) - --with-cgi (default: no) +Build and install NUT documentation file(s). +The possible values are "html-single" for single page HTML, "html-chunked" +for multi pages HTML, "pdf" for a PDF file or "auto" to build all the +possible previous documentation formats. +Verbose output can be enabled using: ASCIIDOC_VERBOSE=-v make - Build and install the optional CGI programs, HTML files, and sample - CGI configuration files. This is not enabled by default, as they - are only useful on web servers. See data/html/README for additional - information on how to set up CGI programs. +This feature requires AsciiDoc 8.6.3 (http://www.methods.co.nz/asciidoc). - --with-lib (default: no) - Build and install the upsclient library and header files. +Optional features +----------------- - --with-all (no default) + --with-cgi (default: no) - Build and install all of the above (the serial, USB, and SNMP - drivers, the CGI programs and HTML files, and the upsclient - library). +Build and install the optional CGI programs, HTML files, and sample +CGI configuration files. This is not enabled by default, as they +are only useful on web servers. See data/html/README for additional +information on how to set up CGI programs. - --with-ssl (default: auto-detect) + --with-lib (default: no) - Enable SSL development code. Read docs/ssl.txt for instructions on - SSL support. +Build and install the upsclient library and header files. - --with-wrap (default: auto-detect) + --with-all (no default) - Enable libwrap (tcp-wrappers) support. Refer to upsd man page for - more information. +Build and install all of the above (the serial, USB, and SNMP +drivers, the CGI programs and HTML files, and the upsclient +library). - --with-ipv6 (default: auto-detect) + --with-ssl (default: auto-detect) - Enable IPv6 support. +Enable SSL development code. Read the section "Configuring SSL" in +docs/security.txt for instructions on SSL support. - --with-hal (default: no) + --with-wrap (default: auto-detect) - Build and install Hardware Abstraction Layer support. - If you own a USB unit, only protect your local system and run the - Gnome or KDE desktop, this will enable a full Plug & Play usage. - See docs/nut-hal.txt for additional information on how to set up - and use HAL support. +Enable libwrap (tcp-wrappers) support. Refer to upsd man page for +more information. - --with-powerman (default: auto-detect) + --with-ipv6 (default: auto-detect) - Build and install Powerman PDU client driver. - This allows to interact with the Powerman daemon, and the numerous - Power Distribution Units (PDU) supported by the project. +Enable IPv6 support. -3. Other configuration options: -=============================== + --with-hal (default: no) - --with-port=PORT +Build and install Hardware Abstraction Layer support. +If you own a USB unit, only protect your local system and run the +Gnome or KDE desktop, this will enable a full Plug & Play usage. +See docs/nut-hal.txt for additional information on how to set up +and use HAL support. + + --with-powerman (default: auto-detect) - Change the TCP port used by the network code. Default is 3493. +Build and install Powerman PDU client driver. +This allows to interact with the Powerman daemon, and the numerous +Power Distribution Units (PDU) supported by the project. - Ancient versions of upsd used port 3305. NUT 2.0 and up use a - substantially different network protocol and are not able to - communicate with anything older than the 1.4 series. - If you have to monitor a mixed environment, use the last 1.4 version, - as it contains compatibility code for both the old "REQ" and the new - "GET" versions of the protocol. +Other configuration options +--------------------------- - --with-user= - --with-group= + --with-port=PORT - Programs started as root will setuid() to for somewhat - safer operation. You can override this with -u in several - programs, including upsdrvctl (and all drivers by extension), upsd, - and upsmon. The "user" directive in ups.conf overrides this at run - time for the drivers. +Change the TCP port used by the network code. Default is 3493. - Note: upsmon does not totally drop root because it may need to - initiate a shutdown. There is always at least a stub process - remaining with root powers. The network code runs in another - (separate) process as the new user. +Ancient versions of upsd used port 3305. NUT 2.0 and up use a +substantially different network protocol and are not able to +communicate with anything older than the 1.4 series. - The is used for the permissions of some files, - particularly the hotplugging rules for USB. The idea is that the - device files for any UPS devices should be readable and writable by - members of that group. +If you have to monitor a mixed environment, use the last 1.4 version, +as it contains compatibility code for both the old "REQ" and the new +"GET" versions of the protocol. - The default value for both the username and groupname is "nobody". - This was done since it's slightly better than staying around as - root. Running things as nobody is not a good idea, since it's a - hack for NFS access. You should create at least one separate user - for this software. + --with-user= + --with-group= - If you use one of the --with-user and --with-group options, then - you have to use the other one too. +Programs started as root will setuid() to for somewhat +safer operation. You can override this with -u in several +programs, including upsdrvctl (and all drivers by extension), upsd, +and upsmon. The "user" directive in ups.conf overrides this at run +time for the drivers. - See the INSTALL document and the FAQ for more on this topic. +NOTE: upsmon does not totally drop root because it may need to +initiate a shutdown. There is always at least a stub process +remaining with root powers. The network code runs in another +(separate) process as the new user. - --with-logfacility=FACILITY +The is used for the permissions of some files, +particularly the hotplugging rules for USB. The idea is that the +device files for any UPS devices should be readable and writable by +members of that group. - Change the facility used when writing to the log file. Read the man - page for openlog to get some idea of what's available on your system. - Default is LOG_DAEMON. +The default value for both the username and groupname is "nobody". +This was done since it's slightly better than staying around as +root. Running things as nobody is not a good idea, since it's a +hack for NFS access. You should create at least one separate user +for this software. -4. Installation directories: -============================ +If you use one of the --with-user and --with-group options, then +you have to use the other one too. - --prefix=PATH +See the INSTALL document and the FAQ for more on this topic. - This is a fairly standard option with GNU autoconf, and it sets the - base path for most of the other install directories. The default - is /usr/local/ups, which puts everything but the state sockets in one - easy place. + --with-logfacility=FACILITY - If you like having things to be at more of a "system" level, setting - the prefix to /usr/local or even /usr might be better. +Change the facility used when writing to the log file. Read the man +page for openlog to get some idea of what's available on your system. +Default is LOG_DAEMON. - --exec_prefix=PATH - This sets the base path for architecture dependent files. By - default, it is the same as . +Installation directories +------------------------ - --sysconfdir=PATH + --prefix=PATH - Changes the location where NUT's configuration files are stored. - By default this path is /etc. Setting this to /etc or - /etc/ups might be useful. +This is a fairly standard option with GNU autoconf, and it sets the +base path for most of the other install directories. The default +is /usr/local/ups, which puts everything but the state sockets in one +easy place. - The NUT_CONFPATH environment variable overrides this at run time. +If you like having things to be at more of a "system" level, setting +the prefix to /usr/local or even /usr might be better. - --bindir=PATH - --sbindir=PATH + --exec_prefix=PATH - Where executable files will be installed. Files that are normally - executed by root (upsd, upsmon, upssched) go to sbindir, all others - to bindir. The defaults are /bin and /sbin. +This sets the base path for architecture dependent files. By +default, it is the same as . - --datadir=PATH + --sysconfdir=PATH - Change the data directory, i.e., where architecture independent - read-only data is installed. By default this is /share, - i.e., /usr/local/ups/share. At the moment, this directory only - holds two files - the optional cmdvartab and driver.list. +Changes the location where NUT's configuration files are stored. +By default this path is /etc. Setting this to /etc or +/etc/ups might be useful. - --mandir=PATH +The NUT_CONFPATH environment variable overrides this at run time. - Sets the base directories for the man pages. The default is - /man, i.e., /usr/local/ups/man. + --bindir=PATH + --sbindir=PATH - --includedir=PATH +Where executable files will be installed. Files that are normally +executed by root (upsd, upsmon, upssched) go to sbindir, all others +to bindir. The defaults are /bin and /sbin. - Sets the path for include files to be installed when --with-lib is - selected. For example, upsclient.h is installed here. The default - is /include. + --datadir=PATH - --libdir=PATH +Change the data directory, i.e., where architecture independent +read-only data is installed. By default this is /share, +i.e., /usr/local/ups/share. At the moment, this directory only +holds two files - the optional cmdvartab and driver.list. - Sets the installation path for libraries. This is just the - upsclient library for now. The default is /lib. + --mandir=PATH - --with-drvpath=PATH +Sets the base directories for the man pages. The default is +/man, i.e., /usr/local/ups/man. - The UPS drivers will be installed to this path. By default they - install to "/bin", i.e., /usr/local/ups/bin. + --includedir=PATH - The "driverpath" global directive in the ups.conf file overrides this - at run time. +Sets the path for include files to be installed when --with-lib is +selected. For example, upsclient.h is installed here. The default +is /include. - --with-cgipath=PATH + --libdir=PATH - The CGI programs will be installed to this path. By default, they - install to "/cgi-bin", which is usually /usr/local/ups/cgi-bin. +Sets the installation path for libraries. This is just the +upsclient library for now. The default is /lib. - If you set the prefix to something like /usr, you should set the - cgipath to something else, because /usr/cgi-bin is pretty ugly and - non-standard. + --with-drvpath=PATH - The CGI programs are not built or installed by default. Use - "./configure --with-cgi" to request that they are built and - installed. +The UPS drivers will be installed to this path. By default they +install to "/bin", i.e., /usr/local/ups/bin. - --with-htmlpath=PATH +The "driverpath" global directive in the ups.conf file overrides this +at run time. - HTML files will be installed to this path. By default, this is - "/html". Note that HTML files are only installed if - --with-cgi is selected. + --with-cgipath=PATH - --with-pkgconfig-dir=PATH +The CGI programs will be installed to this path. By default, they +install to "/cgi-bin", which is usually /usr/local/ups/cgi-bin. - Where to install pkg-config *.pc files. This option only has an - effect if --with-lib is selected, and causes a pkg-config file to - be installed in the named location. The default is - /pkgconfig. +If you set the prefix to something like /usr, you should set the +cgipath to something else, because /usr/cgi-bin is pretty ugly and +non-standard. - Use --without-pkgconfig-dir to disable this feature altogether. +The CGI programs are not built or installed by default. Use +"./configure --with-cgi" to request that they are built and +installed. - --with-hotplug-dir=PATH + --with-htmlpath=PATH - Where to install Linux 2.4 hotplugging rules. The default is - /etc/hotplug, if that directory exists, and not to install it - otherwise. Note that this installation directory is not a - subdirectory of by default. When installing NUT as a - non-root user, you may have to override this option. +HTML files will be installed to this path. By default, this is +"/html". Note that HTML files are only installed if +--with-cgi is selected. - Use --without-hotplug-dir to disable this feature altogether. + --with-pkgconfig-dir=PATH - --with-udev-dir=PATH +Where to install pkg-config *.pc files. This option only has an +effect if --with-lib is selected, and causes a pkg-config file to +be installed in the named location. The default is +/pkgconfig. - Where to install Linux 2.6 hotplugging rules, for kernels that have - the "udev" mechanism. The default is /etc/udev, if that directory - exists, and not to install it otherwise. Note that this - installation directory is not a subdirectory of by - default. When installing NUT as a non-root user, you may have to - override this option. +Use --without-pkgconfig-dir to disable this feature altogether. - Use --without-udev-dir to disable this feature altogether. + --with-hotplug-dir=PATH -5. Directories used by NUT at run-time: -======================================= +Where to install Linux 2.4 hotplugging rules. The default is +/etc/hotplug, if that directory exists, and not to install it +otherwise. Note that this installation directory is not a +subdirectory of by default. When installing NUT as a +non-root user, you may have to override this option. - --with-pidpath=PATH +Use --without-hotplug-dir to disable this feature altogether. - Changes the directory where pid files are stored. By default this is - /var/run. Certain programs like upsmon will leave files here. + --with-udev-dir=PATH - --with-altpidpath=PATH +Where to install Linux 2.6 hotplugging rules, for kernels that have +the "udev" mechanism. The default is /etc/udev, if that directory +exists, and not to install it otherwise. Note that this +installation directory is not a subdirectory of by +default. When installing NUT as a non-root user, you may have to +override this option. - Programs that normally don't have root powers, like the drivers and - upsd, write their pid files here. By default this is whatever the - statepath is, as those programs should be able to write there. +Use --without-udev-dir to disable this feature altogether. - --with-statepath=PATH - Change the default location of the state sockets created by the - drivers. +Directories used by NUT at run-time +----------------------------------- - The NUT_STATEPATH environment variable overrides this at run time. + --with-pidpath=PATH - Default is /var/state/ups. +Changes the directory where pid files are stored. By default this is +/var/run. Certain programs like upsmon will leave files here. -6. Things the compiler might need to find: -========================================== + --with-altpidpath=PATH - --with-gd-includes="-I/foo/bar" +Programs that normally don't have root powers, like the drivers and +upsd, write their pid files here. By default this is whatever the +statepath is, as those programs should be able to write there. - If you installed gd in some place where your C preprocessor can't - find the header files, use this switch to add additional -I flags. + --with-statepath=PATH - --with-gd-libs="-L/foo/bar -labcd -lxyz" +Change the default location of the state sockets created by the +drivers. - If your copy of gd isn't linking properly, use this to give the - proper -L and -l flags to make it work. See LIBS= in gd's Makefile. +The NUT_STATEPATH environment variable overrides this at run time. - Note: the --with-gd switches are not necessary if you have gd 2.0.8 - or higher installed properly. The gdlib-config script will be - detected and used by default in that situation. +Default is /var/state/ups. - --with-ssl-includes, --with-usb-includes, --with-snmp-includes, - --with-neon-includes, --with-powerman-includes="-I/foo/bar" - If your system doesn't have pkg-config and support for any of the - above libraries isn't found (but you know it is installed), you must - specify the compiler flags that are needed. +Things the compiler might need to find +-------------------------------------- - --with-ssl-libs, --with-usb-libs, --with-snmp-libs, - --with-neon-libs, --with-powerman-libs="-L/foo/bar -labcd -lxyz" + --with-gd-includes="-I/foo/bar" - If your system doesn't have pkg-config and support for any of the - above libraries isn't found (but you know it is installed), you must - specify the linker flags that are needed. +If you installed gd in some place where your C preprocessor can't +find the header files, use this switch to add additional -I flags. + + --with-gd-libs="-L/foo/bar -labcd -lxyz" + +If your copy of gd isn't linking properly, use this to give the +proper -L and -l flags to make it work. See LIBS= in gd's Makefile. + +NOTE: the --with-gd switches are not necessary if you have gd 2.0.8 +or higher installed properly. The gdlib-config script will be +detected and used by default in that situation. + + --with-ssl-includes, --with-usb-includes, --with-snmp-includes, + --with-neon-includes, --with-powerman-includes="-I/foo/bar" + +If your system doesn't have pkg-config and support for any of the above +libraries isn't found (but you know it is installed), you must specify the +compiler flags that are needed. + + --with-ssl-libs, --with-usb-libs, --with-snmp-libs, + --with-neon-libs, --with-powerman-libs="-L/foo/bar -labcd -lxyz" + +If your system doesn't have pkg-config and support for any of the above +libraries isn't found (but you know it is installed), you must specify the +linker flags that are needed. + +HAL addons (deprecated) +----------------------- + + --with-hal-includes="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal \ + -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include" + --with-hal-libs="-lhal -ldbus-1 -lpthread" + --with-hal-user="haldaemon" + --with-hal-device-match-key="info.bus" + --with-hal-callouts-path="${libdir}/hal" + --with-hal-fdi-path="${datarootdir}/hal/fdi/information/20thirdparty" + +If system doesn't have pkg-config or it fails to provides hints for some of the +settings that are needed to set it up properly and the build in defaults are +not right, you can specify the right variables here. diff --git a/docs/contact-closure.txt b/docs/contact-closure.txt index cbaba7b..deba8b9 100644 --- a/docs/contact-closure.txt +++ b/docs/contact-closure.txt @@ -1,13 +1,11 @@ -Desc: Contact closure hardware -File: contact-closure.txt -Date: 14 March 2004 -Auth: Russell Kroll +Contact closure hardware information +------------------------------------ This is a collection of notes that apply to contact closure UPS hardware, specifically those monitored by the genericups driver. Definitions ------------ +~~~~~~~~~~~ "Contact closure" refers to a situation where one line is connected to another inside UPS hardware to indicate some sort of situation. These @@ -25,7 +23,7 @@ not require cable power. These signals just appear on the right lines without any special configuration on the PC side. Bad levels ----------- +~~~~~~~~~~ Some evil cabling and UPS equipment uses the transmit or receive lines as their reference points for these signals. This is not sufficient to @@ -34,7 +32,7 @@ reading certain signals on your system, make sure your UPS isn't trying to do this. Signals -------- +~~~~~~~ Unlike their smarter cousins, this kind of UPS can only give you very simple yes/no answers. Due to the limited number of serial port lines @@ -53,7 +51,7 @@ a way that it only works when running on battery. Most hardware or cabling will ignore the shutdown signal when running on line power. New genericups types --------------------- +~~~~~~~~~~~~~~~~~~~~ If none of the existing types in the genericups driver work completely, make a note of which ones (if any) manage to work partially. This can @@ -76,15 +74,15 @@ When editing the genericups.h, the values have the following meanings: Outgoing lines: -line_norm = what to set to make the line "normal" - i.e. cable power -line_sd = what to set to make the UPS shut down the load +- line_norm = what to set to make the line "normal" - i.e. cable power +- line_sd = what to set to make the UPS shut down the load Incoming lines: -line_ol = flag that appears for on line / on battery -val_ol = value of that flag when the UPS is on battery -line_bl = flag that appears for low battery / battery OK -val_bl = value of that flag when the battery is low +- line_ol = flag that appears for on line / on battery +- val_ol = value of that flag when the UPS is on battery +- line_bl = flag that appears for low battery / battery OK +- val_bl = value of that flag when the battery is low This may seem a bit confusing to have two variables per value that we want to read, but here's how it works. If you set line_ol to @@ -95,14 +93,15 @@ the result will be 0. So, if line_ol = foo, then val_ol can only be foo or 0. -As a general case, if line_ol == val_ol, then the value you're reading +As a general case, if 'line_ol == val_ol', then the value you're reading is active high. Otherwise, it's active low. Check out the guts of upsdrv_updateinfo() to see how it really works. Custom definitions ------------------- +~~~~~~~~~~~~~~~~~~ Late in the 1.3 cycle, a feature was merged which allows you to create custom monitoring settings without editing the model table. Just set upstype to something close, then use settings in ups.conf to adjust the -rest. See the genericups man page for more details. +rest. See the linkman:genericups[8] man page for more +details. diff --git a/docs/data-room.txt b/docs/data-room.txt deleted file mode 100644 index 574050d..0000000 --- a/docs/data-room.txt +++ /dev/null @@ -1,54 +0,0 @@ -Desc: Typical setups for data rooms -File: data-room.txt -Date: 27 May 2002 -Auth: Russell Kroll - -The split nature of this UPS monitoring software allows a wide variety of -power connections. This document will help you identify how things should -be configured using some general descriptions. - -There are two main elements: - -1. There's a UPS attached to a serial port on this system. -2. This system depends on a UPS for power. - -You can play "mix and match" with those two to arrive at these descriptions -for individual hosts: - -A: 1 but not 2 -B: 2 but not 1 -C: 1 and 2 - -A small to medium sized data room usually has one C and a bunch of Bs. -This means that there's a system (type C) hooked to the UPS which depends -on it for power. There are also some other systems in there (type B) -which depend on that same UPS for power, but aren't directly connected to -it. - -Larger data rooms or those with multiple UPSes may have several "clusters" -of the "single C, many Bs" depending on how it's all wired. - -Finally, there's a special case. Type A systems are connected to a UPS's -serial port, but don't depend on it for power. This usually happens when -a UPS is physically close to a box and can reach the serial port, but -the wiring is such that it doesn't actually feed it. - -Once you identify a system's type, use this list to decide which of the -programs need to be run for monitoring: - -A: driver and upsd -B: upsmon (as slave) -C: driver, upsd, and upsmon (as master) - -To further complicate things, you can have a system that is hooked to -multiple UPSes, but only depends on one for power. This particular -situation makes it an "A" relative to one UPS, and a "C" relative to the -other. The software can handle this - you just have to tell it what to -do. - -Multi-power supply boxes -======================== - -If you are running large server-class systems that have more than one -power feed, see big-servers.txt for information on how to handle it -properly. diff --git a/docs/design.txt b/docs/design.txt index f4c32fe..dfaeae8 100644 --- a/docs/design.txt +++ b/docs/design.txt @@ -1,34 +1,21 @@ -Desc: Network UPS Tools design document -File: design.txt -Date: 14 March 2004 -Auth: Russell Kroll +NUT design document +=================== This software is designed around a layered scheme with drivers, a server and clients. These layers communicate with text-based protocols for easier maintenance and diagnostics. The layering -============ +------------ - CLIENTS: upsmon, upsc, upsrw, upsstats, upsset, etc. (via upsclient) - - < network: TCP sockets, typically on port 3493 > +image:images/nut_layering.png[NUT layering] - SERVER: upsd - - < Unix domain sockets with text-based messages > - - DRIVERS: apcsmart, bestups, powercom, etc. - - < serial communications, SNMP, USB, etc. > - -EQUIPMENT: Smart-UPS 700, Fenton PowerPal 660, etc. (actual UPS hardware) How information gets around -=========================== +--------------------------- From the equipment ------------------- +~~~~~~~~~~~~~~~~~~ DRIVERS talk to the EQUIPMENT and receive updates. For most hardware this is polled (DRIVER asks EQUIPMENT about a variable), but forced updates are @@ -36,7 +23,7 @@ also possible. The exact method is not important, as it is abstracted by the driver. From the driver ---------------- +~~~~~~~~~~~~~~~ The core of all DRIVERS maintains internal storage for every variable that is known along with the auxiliary data for those variables. It @@ -55,7 +42,7 @@ It continues to listen on the socket for additional updates. This protocol is documented in sock-protocol.txt. From the server ---------------- +~~~~~~~~~~~~~~~ The SERVER's internal storage maintains a complete copy of the data which is in the DRIVER, so it is capable of answering any request @@ -66,7 +53,7 @@ requested data if it is available. The format for requests from the CLIENT is documented in protocol.txt. Instant commands -================ +---------------- Instant commands is the term given to a set of actions that result in something happening to the UPS. Some of the common ones are @@ -86,7 +73,7 @@ timing issues. Remember that upsd services clients in a round-robin fashion, so all queries must be lightweight and speedy. Setting variables -================= +----------------- Some variables in the DRIVER or EQUIPMENT can be changed, and carry the FLAG_RW flag. Upon receiving a SET command from the CLIENT, the SERVER @@ -102,7 +89,7 @@ command's completion from the DRIVER. This, too, is planned for a future release. Example data path -================= +----------------- Here's the path a piece of data might take through this architecture. The event is a UPS going on battery, and the final result is a pager @@ -171,13 +158,12 @@ This scenario requires some configuration, obviously: CMDSCRIPT /path/to/upssched-cmd -8. upssched-cmd knows what to do with "upsonbatt" as its first argument +9. upssched-cmd knows what to do with "upsonbatt" as its first argument (A quick case..esac construct, see the examples) -============================================================================== History -======= +------- The oldest versions of this software (1998) had no separation between the driver and the network server and only supported the latest APC diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt new file mode 100644 index 0000000..b3fc2c8 --- /dev/null +++ b/docs/developer-guide.txt @@ -0,0 +1,115 @@ +:titles.underlines: "__","==","--","~~","^^" + +Network UPS Tools Developer Guide +_________________________________ +:Author: Russell_Kroll,_Arnaud_Quette,_Charles_Lepple_and_Peter_Selinger +:Author Initials: RK, AQ, CL & PS + +Introduction +============ + +NUT is both a powerful toolkit and framework that provides support for Power +Devices, such as Uninterruptible Power Supplies, Power Distribution Units +and Solar Controllers. + +This document intend to describe how NUT is designed, and the way to +develop new device drivers and client applications. + + +[[design]] + +include::design.txt[] + + +[[developers]] + +include::developers.txt[] + + +[[new-drivers]] + +include::new-drivers.txt[] + + +[[sock-protocol]] + +include::sock-protocol.txt[] + + +[[augeas]] + +include::../scripts/augeas/README[] + +[[new-clients]] + +include::new-clients.txt[] + + +[[net-protocol]] + +include::net-protocol.txt[] + + +[[dev-tools]] + +NUT developers tools +==================== + +NUT provides several tools for clients and core developers, and QA people. + +Device simulation +----------------- + +The dummy-ups driver propose a simulation mode, also known as 'Dummy Mode'. +This mode allows to simulate any kind of devices, even non existing ones. + +Using this method, you can either replay a real life sequence, +<>, or directly interact +through upsrw or by editing the device file. + +For more information, refer to linkman:dummy-ups[8] +manual page. + + +[[dev-recording]] + +Device recording +---------------- + +To complete dummy-ups, NUT provides a device recorder script called +'device-recorder.sh' and located in the 'tools/' directory of the +NUT source tree. + +This script uses 'upsc' to record device information, and stores +these in a differential fashion every 5 seconds (by default). + +Its usage is the following: + + Usage: dummy-recorder.sh [output-file] [interval] + +For example, to record information from the device 'myups' every 10 seconds: + + tools/device-recorder.sh myups@localhost myups.seq 10 + + + +NUT core development and maintenance +==================================== + +This section is intended to people who want to develop new core features, +or to do some maintenance. + + +include::macros.txt[] + + +[[roadmap]] + +include::../TODO[] + + +[[nut-names]] +Appendix A: NUT command and variable naming scheme +================================================== + +include::nut-names.txt[] diff --git a/docs/developers.txt b/docs/developers.txt index 86990de..f26dd17 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -1,16 +1,14 @@ -Desc: Information for developers -File: developers.txt -Date: 18 February 2004 -Auth: Russell Kroll +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. 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. @@ -24,7 +22,7 @@ that allows you to append to char * with a format string and all the usual string length checking of snprintf. Error reporting ---------------- +~~~~~~~~~~~~~~~ Don't call syslog() directly. Use upslog_with_errno() and upslogx(). They may write to the syslog, stderr, or both as appropriate. This @@ -38,21 +36,21 @@ fatal_with_errno and fatalx work the same way, but they exit(EXIT_FAILURE) afterwards. Don't call exit() directly. 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. Memory allocation ------------------ +~~~~~~~~~~~~~~~~~ xmalloc, xcalloc, xrealloc and xstrdup all check the results of the base calls before continuing, so you don't have to. Don't use the raw calls directly. Config file parsing -------------------- +~~~~~~~~~~~~~~~~~~~ The configuration parser, called parseconf, is now up to its fourth major version. It has multiple entry points, and can handle many @@ -67,7 +65,7 @@ Escaping special characters and quoting multiple-word elements is all handled by the state machine. Using the same code for all config files avoids code duplication. -Note: this does not apply to drivers. Driver authors should use the +NOTE: this does not apply to drivers. Driver authors should use the upsdrv_makevartable() scheme to pick up values from ups.conf. Drivers should not have their own config files. @@ -78,56 +76,63 @@ under normal circumstances. This technique might be used to add more hardware support to a driver without recompiling. vs. -------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~ This is already handled by autoconf, so just include "timehead.h" and you will get the right headers on every system. -UPS drivers - main.c -==================== +Device drivers - main.c +----------------------- -The UPS drivers use main.c as their core. The only exception is -dummycons, which only looks like a driver by using the same dstate -function calls. +The device drivers use main.c as their core. The only exceptions are the +HAL-based drivers, which use the same dstate function calls while integrating +with the DBUS event loop. To write a new driver, you create a file with a series of support functions that will be called by main. These all have names that start -with "upsdrv_", and they will be called at different times by main +with `upsdrv_`, and they will be called at different times by main depending on what needs to happen. -See new-drivers.txt for information on writing drivers, and also refer -to the skeletal driver in skel.c. +See the <> for information on writing +drivers, and also refer to the skeletal driver in skel.c. Portability -=========== +----------- Avoid things that will break on other systems. All the world is not an x86 Linux box. There are still older systems out there that don't do C++ style comments. -That means you have to comment /* like this */, and // this is right out. + +-------------------------------------- +/* Comments look like this. */ +// Not like this. +-------------------------------------- Newer versions of gcc allow you to declare a variable inside a function somewhat like the way C++ operates, like this: - function do_stuff(void) - { - check_something(); +-------------------------------------------------------------------------------- +function do_stuff(void) +{ + check_something(); - int a; + int a; - a = do_something_else(); - } + a = do_something_else(); +} +-------------------------------------------------------------------------------- While this will compile and run on these newer versions, it will fail miserably for anyone on an older system. That means you must not use it. gcc only warns about this with -pedantic. Coding style -============ +------------ -This is how I do things. +This is how we do things: +-------------------------------------------------------------------------------- int open_subspace(char *ship, int privacy) { if (!privacy) @@ -138,8 +143,7 @@ int open_subspace(char *ship, int privacy) return secure_channel(ship); } - -(The example that used to be in this file wasn't particularly clear) +-------------------------------------------------------------------------------- The basic idea is that I try to group things into functions, and then find ways to drop out of them when we can't go any further. There's @@ -159,7 +163,7 @@ easier to read, and it enables tools (such as indent and emacs) to display the source code correctly. Indenting with tabs vs. spaces ------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Another thing to notice is that the indenting happens with tabs instead of spaces. This lets everyone have their personal tab-width setting @@ -180,7 +184,7 @@ kernel - Documentation/CodingStyle. He's done a far better job of explaining this. Line breaks ------------ +~~~~~~~~~~~ It is better to have lines that are longer than 80 characters than to wrap lines in random places. This makes it easier to work with tools @@ -193,13 +197,17 @@ long when there is a better alternative (see the note on pretentiousVariableNamingSchemes above). Certainly there should not be more than one statement per line. Please do not use - if (condition) break; +-------------------------------------------------------------------------------- +if (condition) break; +-------------------------------------------------------------------------------- but use the following: - if (condition) { - break; - } +-------------------------------------------------------------------------------- +if (condition) { + break; +} +-------------------------------------------------------------------------------- Miscellaneous coding style tools -------------------------------- @@ -207,12 +215,12 @@ Miscellaneous coding style tools You can go a long way towards converting your source code to the NUT coding style by piping it through the following command: - indent -kr -i8 -T FILE -l1000 -nhnl + indent -kr -i8 -T FILE -l1000 -nhnl This next command does a reasonable job of converting most C++ style comments (but not URLs and DOCTYPE strings): - sed 's#\(^\|[ \t]\)//[ \t]*\(.*\)[ \t]*#/* \2 */#' + sed 's#\(^\|[ \t]\)//[ \t]*\(.*\)[ \t]*#/* \2 */#' Emacs users can adjust how tabs are displayed. For example, it is possible to set a tab stop to be 3 spaces, rather than the usual 8. @@ -222,25 +230,27 @@ rendered on screen). It is even possible to set this on a per-directory basis, by putting something like this into your .emacs file: - ;; NUT style +-------------------------------------------------------------------------------- +;; NUT style - (defun nut-c-mode () - "C mode with adjusted defaults for use with the NUT sources." - (interactive) - (c-mode) - (c-set-style "K&R") - (setq c-basic-offset 3) ;; 3 spaces C-indentation - (setq tab-width 3)) ;; 3 spaces per tab +(defun nut-c-mode () + "C mode with adjusted defaults for use with the NUT sources." + (interactive) + (c-mode) + (c-set-style "K&R") + (setq c-basic-offset 3) ;; 3 spaces C-indentation + (setq tab-width 3)) ;; 3 spaces per tab - ;; apply NUT style to all C source files in all subdirectories of nut/ +;; apply NUT style to all C source files in all subdirectories of nut/ - (setq auto-mode-alist (cons '(".*/nut/.*\\.[ch]$". nut-c-mode) - auto-mode-alist)) +(setq auto-mode-alist (cons '(".*/nut/.*\\.[ch]$". nut-c-mode) + auto-mode-alist)) +-------------------------------------------------------------------------------- Finishing touches ------------------ +~~~~~~~~~~~~~~~~~ -I like code that uses const and static liberally. If you don't need to +We like code that uses const and static liberally. If you don't need to expose a function or global variable to the outside world, static is your friend. If nobody should edit the contents of some buffer that's behind a pointer, const keeps them honest. @@ -250,25 +260,23 @@ find implementation flaws. Functions that attempt to modify a constant or access something outside their scope will throw a warning or even fail to compile in some cases. This is what we want. -Spaghetti ---------- -If you use a goto, expect me to drop it when my head stops spinning. -It gives me flashbacks to the BASIC code I wrote on the 8 bit systems of -the 80s. I've tried to clean up my act, and you should make the effort +Spaghetti +~~~~~~~~~ + +If you use a goto, expect us to drop it when our head stops spinning. +It gives us flashbacks to the very old code we wrote. +We've tried to clean up our act, and you should make the effort as well. -I'm not making a blanket statement about gotos, since everything +We're not making a blanket statement about gotos, since everything probably has at least one good use. There are a few cases where a goto is more efficient than any other approach, but you probably won't -encounter them in this software. +encounter them very often in this software. -Hint: there *was* a good use of a goto in upsd until the 1.3 series. At -this point we are back to zero gotos since that code was replaced by -another technique that doesn't need it. Legacy code ------------ +~~~~~~~~~~~ There are parts of the source tree that do not yet conform to these specs. Part of this is due to the fact that the coding style has been @@ -278,74 +286,94 @@ since then. Don't worry - it'll get cleaned up the next time something in the vicinity gets a visit. Memory leak checking --------------------- +~~~~~~~~~~~~~~~~~~~~ -I can't say enough good things about valgrind. If you do anything with +We can't say enough good things about valgrind. If you do anything with dynamic memory in your code, you need to use this. Just compile with -g and start the program inside valgrind. Run it through the suspected area and then exit cleanly. valgrind will tell you if you've done anything dodgy like freeing regions twice, reading uninitialized memory, or if you've leaked memory anywhere. - http://valgrind.kde.org/ +For more information, refer to the link:http://valgrind.kde.org[Valgrind] +project. Conclusion ----------- +~~~~~~~~~~ -The summary: please be kind to my eyes. There's a lot of stuff in here. +The summary: please be kind to our eyes. There's a lot of stuff in here, +and many people have put a lot of time and energy to improve it. Submitting patches -================== +------------------ -Patches that arrive in unified format (diff -u) as plain text with no -HTML, no attachments and a brief summary at the top are the easiest to -handle. They show the context, explain what's going on, and get saved as -one message. Everything stays together until it's time to merge. +Patches that arrive in unified format (diff -u) as plain text attachments with +no HTML and a brief summary at the top are the easiest to handle. -Patches that arrive as attachments have to be moved around as separate -files - the body of the message is one, and the patch is in another. -This is not my preferred mode of operation. +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]. -When sending patches to the lists, be sure to add me as an explicit -recipient to make sure it is considered for merging. A patch which only -goes to a list is generally treated as a RFC and is relatively low -priority. +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. -If your mailer is brain dead and rewrites tabs into spaces, wraps your -patch body, or anything else like that, just attach the patch. I'd -rather deal with an attachment instead of a patch that has tab damage, -rewrapped lines, or worse. Patch cohesion -============== +-------------- Patches should have some kind of unifying element. One patch set is one message, and it should all touch similar things. If you have to edit 6 files to add support for neutrino detection in UPS hardware, that's fine. -However, sending one huge patch that does massive separate changes -all over the tree is not recommended. That kind of patch has to be -split up and evaluated separately, assuming I care enough to do that +However, sending one huge patch that does massive separate changes all over +the tree is not recommended. That kind of patch has to be split up and +evaluated separately, assuming the core developers care enough to do that instead of just dropping it. If you have to make big changes in lots of places, send multiple patches - one per item. -Man pages -========= +The completion touch: manual pages and device entry in HCL +---------------------------------------------------------- If you change something that involves an argument to a program or configuration file parsing, the man page is probably now out of date. -If you don't update it, I have to, and I have enough to do as it is. +If you don't update it, we have to, and we have enough to do as it is. -If you write a new driver, send in the man page when you send me the -source code for your driver. Otherwise, I will be forced to write a +If you write a new driver, send in the man page when you send us the +source code for your driver. Otherwise, we will be forced to write a skeletal man page that will probably miss many of the finer points of the driver and hardware. +The same remark goes for device entries: if you add support for new models, +remember to also complete the hardware compatibility list, present +in data/driver.list.in. This will be used to generate both textual, static +HTML and dynamic searchable HTML for the website. + +Source code management +---------------------- + +We currently use a Subversion (SVN) repository hosted at Alioth to track +changes to the NUT source code. To obtain permission to commit to the SVN +repository, you must be prepared to spend a fair amount of time contributing to +the NUT codebase. For occasional contributions over time, you may wish to +investigate one of the <<_distributed_scm_systems,distributed SCM tools>> +listed below. + +Anonymous SVN checkouts are possible: + + svn co svn://svn.debian.org/nut/trunk nut-svn-readonly + +If you change a file in the SVN working copy, you can use `svn diff` to +generate a patch to send to the nut-upsdev mailing list. + Repository etiquette and quality assurance -========================================== +------------------------------------------ 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 @@ -353,22 +381,103 @@ code if possible. If you need to commit incremental changes that leave the system in a broken state, please do so in a separate branch and merge the changes back to the trunk once they are complete. -Before committing, please remember to: +Before committing, please remember to run "make distcheck-light". This checks +that the Makefiles are not broken, that all the relevant files are distributed, +and that there are no compilation or installation errors. -* update the ChangeLog, if appropriate. Dates are listed in UTC - ("date --utc"). - -* 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 file, you must update the corresponding -Makefile.am. +Running "make distcheck-light" is especially important if you have added or +removed files, or updated configure.in or some Makefile.am. Remember: simply +adding a file to SVN does not mean it will be distributed. To distribute a +file, you must update the corresponding Makefile.am. There is also "make distcheck", which runs an even stricter set of 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 + +You may create as many branches as you like in your local Git repository. When +using `git svn`, the preferred way to combine your changes with SVN changes is +to use `git rebase` on your local branch. This re-applies your branch's changes +to the new SVN changes, much as though your branch were a series of patches. + +-------------------------------------------------------------------------------- + git checkout master + git branch my-new-feature + git checkout my-new-feature + + # Hack away + + git add changed-file.c + git commit + + # Someone committed something to SVN. Fetch it. + + git svn fetch + git rebase remotes/trunk +-------------------------------------------------------------------------------- + +You are encouraged to use `git rebase -i` on your private Git branches to +separate your changes into <<_patch_cohesion,logical changes>>. + +From there, you can generate patches for the Tracker, or the nut-upsdev list. + +If you are new to Git, but are familiar with SVN, the +link:http://git-scm.com/course/svn.html[following link] may be of use. + + +Mercurial and SVN +~~~~~~~~~~~~~~~~~ + +Synchronizing a Mercurial repository against the NUT SVN repository should be +similar in spirit to the Git method discussed above. +link:http://mercurial.selenic.com/wiki/WorkingWithSubversion[This wiki page] +discusses your options. + +We would welcome any feedback about this process on the nut-upsdev mailing list. diff --git a/docs/docinfo.xml b/docs/docinfo.xml new file mode 100644 index 0000000..a8650ec --- /dev/null +++ b/docs/docinfo.xml @@ -0,0 +1,10 @@ + + + 2.6.0 + 2011-01-14 + + + First release of AsciiDoc documentation for Network UPS Tools (NUT). + + + diff --git a/docs/documentation.txt b/docs/documentation.txt new file mode 100644 index 0000000..2d21868 --- /dev/null +++ b/docs/documentation.txt @@ -0,0 +1,70 @@ +ifdef::website[] +Documentation +============= +endif::website[] + +User Documentation +------------------ + +ifdef::website[] +- FAQ - Frequently Asked Questions (link:docs/FAQ.html[online]) (link:docs/FAQ.pdf[PDF]) +- NUT User Manual (link:docs/user-manual.chunked/index.html[online]) (link:docs/user-manual.pdf[PDF]) +- Cables information (link:cables.html[online]) (link:cables.pdf[PDF]) +- link:docs/man/index.html#User_man[User manual pages] +endif::website[] +ifndef::website[] +- link:../FAQ.html[FAQ - Frequently Asked Questions] +- linkdoc:user-manual[NUT user manual] +- <> +- link:../man/index.html#User_man[User manual pages] +endif::website[] + +Developer Documentation +----------------------- + +ifdef::website[] +- NUT Developer Guide (link:docs/developer-guide.chunked/index.html[online]) (link:docs/developer-guide.pdf[PDF]) +- NUT Packager Guide (link:docs/packager-guide.chunked/index.html[online]) (link:docs/packager-guide.pdf[PDF]) +- link:ups-protocols.html[UPS protocols library] +- link:docs/man/index.html#Developer_man[Developer manual pages] +- link:nut-qa.html[NUT Quality Assurance] +endif::website[] +ifndef::website[] +- linkdoc:developer-guide[NUT Developer Guide] +- linkdoc:packager-guide[NUT Packager Guide] +- link:ups-protocols.html[UPS protocols library] +- link:../man/index.html#Developer_man[Developer manual pages] +- link:nut-qa.html[NUT Quality Assurance] +endif::website[] + +Offsite Links +------------- + +[[general_powerdev_info]] +These are general information about UPS and PDU. + +- link:http://tldp.org/HOWTO/UPS-HOWTO/[UPS HOWTO] (The Linux Documentation Project) +- link:http://en.wikipedia.org/wiki/Uninterruptible_power_supply[UPS on Wikipedia] +- link:http://en.wikipedia.org/wiki/Power_distribution_unit[PDU on Wikipedia] +- link:http://www.pcguide.com/ref/power/ext/ups/over.htm[UPS on The PC Guide] + +These are writeups by users of the software. + +- link:http://www.dimat.unina2.it/LCS/MonitoraggioUpsNutUbuntu10-eng.htm[Deploying NUT on an Ubuntu 10.04 cluster] '(Stefano Angelone)' +- link:http://blog.shadypixel.com/monitoring-a-ups-with-nut-on-debian-or-ubuntu-linux[Monitoring a UPS with nut on Debian or Ubuntu Linux] '(Avery Fay)' +- link:http://linux.developpez.com/cours/upsusb/[Installation et gestion d'un UPS USB en réseau sous linux] '(Olivier Van Hoof, french)' +- link:http://boxster.ghz.cc/projects/nut/wiki/NutOnMacOSX[Network UPS Tools (NUT) on Mac OS X (10.4.10)] '(Andy Poush)' +- link:http://www.llondel.org/ups.shtml[Interfacing a Contact-Closure UPS to Mac OS X and Linux] '(David Hough)' +- link:http://fedoranews.org/contributors/kazutoshi_morioka/nut/[How to use UPS with nut on RedHat / Fedora Core] '(Kazutoshi Morioka)' +- link:http://people.freebsd.org/~thierry/nut_FreeBSD_HowTo.txt[FreeBSD installation procedure] '(Thierry Thomas, from FreeBSD)' +- link:http://www.usebox.net/jjm/ups-obsd/[Gestionando un SAI desde OpenBSD con NUT] '(Juan J. Martinez, spanish)' +- link:http://forums.gentoo.org/viewtopic-p-2663684.html[HOWTO: MGE Ellipse 300 on gentoo] '(nielchiano)' +- link:http://deschis.blogspot.com/2006/07/cum-se-configureaz-un-ups-apollo-seria.html[Cum se configurează un UPS Apollo seria 1000F pe Linux] '(deschis, Romanian)' +- link:http://buffalo.nas-central.org/wiki/Install_a_UPS_%28nut%29[Install a UPS (nut) on a Buffalo NAS] '(various authors)' +- link:http://blog.pointbre.com/2903/nutnetwork-ups-tool-korean-guidebook.html[NUT Korean GuideBook] '(PointBre)' + +News articles and Press releases +-------------------------------- + +- link:http://www.crn.com/white-box/199000818?pgno=1[Linux UPS Without Tears] '(A. Lizard)' +- link:http://networking.earthweb.com/netsysm/article.php/10954_3295841_1[Graceful UPS shutdowns on Linux] '(Carla Schroder)' diff --git a/docs/download.txt b/docs/download.txt new file mode 100644 index 0000000..c551902 --- /dev/null +++ b/docs/download.txt @@ -0,0 +1,117 @@ +Download information +==================== + +This section presents the different methods to download NUT. + +Source code +----------- + +[NOTE] +================================================================================ +You should always use PGP/GPG to verify the signatures before using any source code. + +You can use the +ifdef::website[] +link:docs/user-manual.chunked/ar01s09.html#verifySourceSig[following procedure] +endif::website[] +ifndef::website[] +- Else, you can read the <>. +endif::website[] +to do so. +================================================================================ + +Stable tree: 2.6 +~~~~~~~~~~~~~~~~ + +link:http://www.networkupstools.org/source/2.6/nut-2.6.0.tar.gz[nut-2.6.0.tar.gz] +link:http://www.networkupstools.org/source/2.6/nut-2.6.0.tar.gz.sig[signature] +link:http://www.networkupstools.org/source/2.6/new-2.6.0.txt[release notes] +link:http://www.networkupstools.org/source/2.6/ChangeLog[ChangeLog] + +You can also browse the link:http://www.networkupstools.org/source/2.6/[stable source directory]. + + +Testing tree: 2.6.x-pre +~~~~~~~~~~~~~~~~~~~~~~~ + +There is currently no testing release. + + +Development tree: 2.7 +~~~~~~~~~~~~~~~~~~~~~ + +Code repository +^^^^^^^^^^^^^^^ + +The development tree is available through a Subversion repository hosted on the +link:http://alioth.debian.org/[Debian Alioth server]. + +To retrieve the current development tree, use the following command: + + $ svn co svn://svn.debian.org/nut/trunk + +To generate the build scripts, you must call, from the 'trunk' directory: + + $ ./autogen.sh + +Then refer to the +ifdef::website[] +link:docs/user-manual.chunked/index.html[NUT user manual] +endif::website[] +ifndef::website[] +linkdoc:user-manual[NUT user manual] +endif::website[] + for more information. + +NOTE: Users that need the latest developments to support new devices *must* +use <>. + +Browse code +^^^^^^^^^^^ + +You can also browse the code with link:http://svn.debian.org/wsvn/nut/trunk/?rev=0&sc=0[WebSvn]. + +Or through the link:http://boxster.ghz.cc/projects/nut[Trac mirror], +kindly hosted and maintained by Charles Lepple. + +[[Snapshots]] +Snapshots +^^^^^^^^^ + +The latest Subversion developments are available through link:http://buildbot.networkupstools.org/public/nut/waterfall?branch=trunk&builder=Debian-etch-x86&reload=none[snapshots on the Buildbot]. +Look for the latest *[tarball]* link on the top of the page. + +Older versions +~~~~~~~~~~~~~~ + +link:http://www.networkupstools.org/source/[Browse source directory] + + +Binary packages +--------------- + +NOTE: The only official releases from this project are source code. + +NUT is already available in the following systems: + +- Linux: +link:http://aur.archlinux.org/packages.php?ID=5379[Arch Linux], +link:http://packages.debian.org/nut[Debian], +link:http://packages.gentoo.org/package/sys-power/nut[Gentoo Linux], +Mandriva, +link:https://admin.fedoraproject.org/pkgdb/acls/name/nut[Red Hat / Fedora], +link:http://software.opensuse.org/search[Novell Suse / openSUSE], +link:https://forum.openwrt.org/viewtopic.php?id=26269[OpenWrt] +link:http://packages.ubuntu.com/nut[Ubuntu]. + +- BSD systems: +link:http://www.FreeBSD.org/cgi/ports.cgi?query=^nut-&stype=name[FreeBSD], +link:ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/sysutils/ups-nut/README.html[NetBSD], +link:http://www.openbsd.org/cgi-bin/cvsweb/ports/sysutils/nut/[OpenBSD]. + +- Mac OS X: +link:http://pdb.finkproject.org/pdb/package.php/nut[Fink], +link:http://trac.macports.org/browser/trunk/dports/sysutils/nut/Portfile[MacPorts] + +- Windows (client side only): +link:http://csociety.ecn.purdue.edu/~delpha/winnut/[WinNUT] diff --git a/docs/features.txt b/docs/features.txt new file mode 100644 index 0000000..5e49483 --- /dev/null +++ b/docs/features.txt @@ -0,0 +1,239 @@ +Features +======== + +NUT provides many features, and is always improving. +Thus this list may lag behind the current code. + +Features frequently appear during the development cycles, so be sure to look at +the link:http://www.networkupstools.org/download.html[release notes and change logs] +to see the latest additions. + +//////////////////////////////////////////////////////////////////////////////// +*FIXME* statement that NUT is *the* de facto standard on Opensource system. +all Linux distributors have standardized the Power Devices support using NUT. +More and more appliances manufacturers are bundling NUT... +=> add an Appendix NUT Device Integration in the User Manual +//////////////////////////////////////////////////////////////////////////////// + +Multiple manufacturer and device support +---------------------------------------- + +- Monitors many UPS, PDU and SCD models from more than 100 manufacturers with a +unified interface (link:stable-hcl.html[Hardware Compatibility List]). + +- Various communication types are supported with the same common interface: + * serial, + * USB, + * network (SNMP, Eaton / MGE XML/HTTP). + +Multiple architecture support +----------------------------- + +- Cross-platform - different flavors of Unix can be managed together with a +common set of tools, even crossing architectures. + +- This software has been reported to run on Linux distributions, the BSDs, Apple's +OS X, Solaris, IRIX, HP/UX, Tru64 Unix, and AIX. + +- Windows users may be able to build it directly with Cygwin. +There is also a port of the client-side monitoring to Windows called WinNUT. + +- Your system will probably run it too. You just need a good C compiler and +possibly some more packages to gain access to the serial ports. +Other features, such as USB / SNMP / whatever, will also need extra software +installed. + +Layered and modular design with multiple processes +-------------------------------------------------- + +- Three layers: drivers, server, clients. + +- Drivers run on the same host as the server, and clients communicate with the +server over the network. + +- This means clients can monitor any UPS anywhere as long as there is a network +path between them. + +WARNING: Be sure to plug your network's physical hardware (switches, hubs, +routers, bridges, ...) into the UPS! + + +//////////////////////////////////////////////////////////////////////////////// +*FIXME* to be removed? + +- This has also allowed us to create easily the Power Management integration. + +=== Power Management integration === + +- Thanks to its modular design, NUT can feed data to the FreeDesktop Hardware Abstraction Layer (HAL).[[BR]] + This allow a seemless integration of USB UPSs, at a small cost (around 200 Kb), reusing the standard Power Management GUIs and providing to users a full Plug & Play system. + +- The added bonus is that this is the best Power Management existing, surpassing the one that exist on Windows and Mac OS, both in terms of devices supported and of features. +//////////////////////////////////////////////////////////////////////////////// + +Redundancy support - Hot swap/high availability power supplies +-------------------------------------------------------------- + +- upsmon can handle high-end servers which receive power from multiple UPSes +simultaneously. + +- upsmon won't initiate a shutdown until the total power situation across all +source UPSes becomes critical (on battery and low battery). + +- You can lose a UPS completely as long as you still have at least the minimum +number of sources available. The minimum value is configurable. + +Security and access control +--------------------------- + +- Manager functions are granted with per-user granularity. The admin can have +full powers, while the admin's helper can only do specific non-destructive tasks +such as a battery test. + +- The drivers, server, and monitoring client (upsmon) can all run as separate +user IDs if this is desired for privilege separation. + +- Only one tiny part of one program has root powers. +upsmon starts as root and forks an unprivileged process which does the actual +monitoring over the network. +They remain connected over a pipe. When a shutdown is necessary, a single +character is sent to the privileged process. It then calls the predefined +shutdown command. In any other case, the privileged process exits. +This was inspired by the auth mechanism in Solar Designer's excellent popa3d. + +- The drivers and network server may be run in a chroot jail for further +security benefits. This is supported directly since version 1.4 and beyond with +the 'chroot=' configuration directive. + +- IP-based access control relies on the local firewall and +link:http://en.wikipedia.org/wiki/TCP_Wrapper[TCP Wrapper]. + +- SSL is available as a build option ("--with-ssl"). +It encrypts sessions with upsd and can also be used to authenticate servers. + +Web-based monitoring +-------------------- + +- Comes stock with CGI-based web interface tools for UPS monitoring and +management, including graphical status displays. + +- Custom status web pages may be generated with the CGI programs, since they use +templates to create the pages. This allows you to have status pages which fit +the look and feel of the rest of your site. + +Free software +------------- + +- That's free beer and free speech. Licensed under the GNU General Public +License version 2 or later. + +- Know your systems - all source code is available for inspection, so there are +no mysteries or secrets in your critical monitoring tools. + +UPS management and control +-------------------------- + +- Writable variables may be edited on higher end equipment for local customizations + +- Status monitoring can generate notifications (email/pager/SMS/...) on alert conditions + +- Alert notices may be dampened to only trigger after a condition persists. This +avoids the usual pager meltdown when something happens and no delay is used. + +- Maintenance actions such as battery runtime calibration are available where +supported by the UPS hardware. + +- Power statistics can be logged in custom formats for later retrieval and analysis + +- All drivers are started and stopped with one common program. Starting one is +as easy as starting ten: 'upsdrvctl start'. + +- Shutdowns and other procedures may be tested without stressing actual UPS +hardware by simulating status values with the dummy-ups pseudo-driver. Anything +which can happen in a driver can be replicated with dummy-ups. + +Monitoring diagrams +------------------- + +These are the most common situations for monitoring UPS hardware. Other ways are +possible, but they are mostly variants on these four. + +NOTE: these examples show serial communications for simplicity, but USB or SNMP +or any other monitoring is also possible. + +"Simple" configuration +~~~~~~~~~~~~~~~~~~~~~~ + +image:images/simple.png[] + +One UPS, one computer. This is also known as "Standalone" configuration. + +This is the configuration that most users will use. You need at least a driver, +upsd, and upsmon running. + +"Advanced" configuration +~~~~~~~~~~~~~~~~~~~~~~~~ + +image:images/advanced.png[] + +One UPS, multiple computers. Only one of them can actually talk to the UPS +directly. That's where the network comes in. The Master system runs the driver, +upsd, and upsmon in master mode. The Slave systems only run upsmon in slave mode. + +This is useful when you have a very large UPS that's capable of running multiple +systems simultaneously. There is no longer the need to buy a bunch of individual +UPSes or "sharing" hardware, since this software will handle the sharing for you. + +//////////////////////////////////////////////////////////////////////////////// +*FIXME* remainder +=== One UPS, many clients === + +- Multiple systems may monitor a single UPS using only their network connections - no special "UPS sharing" hardware is required. + +- "Slave and master" monitoring design synchronizes shutdowns so that slaves can bring down their operating systems cleanly before the master switches off the power. + +=== Many UPSes, many clients === + +- Each upsd process can serve status data for multiple UPSes to many clients. + +- Each upsmon process can monitor multiple UPSes for status data. + +//////////////////////////////////////////////////////////////////////////////// + +"Big Box" configuration +~~~~~~~~~~~~~~~~~~~~~~~ + +image:images/bigbox.png[] + +Some systems have multiple power supplies and cords. You typically find this on +high-end servers that allow hot-swap and other fun features. In this case, you +run multiple drivers (one per UPS), a single upsd, and a single upsmon (as +master for both UPS 1 and UPS 2) + +This software understands that some of these servers can also run with some of +the supplies gone. For this reason, every UPS is assigned a "power value" - the +quantity of power supplies that it feeds on a system. +The total available "power value" is compared to the minimum that is required +for that hardware. For example, if you have 3 power supplies and 3 UPSes, but +only 2 supplies must be running at any given moment, the minimum would be 2. +This means that you can safely lose any one UPS and the software will handle it +properly by remaining online. + +"Bizarre" configuration +~~~~~~~~~~~~~~~~~~~~~~~ + +image:images/bizarre.png[] + +You can even have a UPS that has the serial port connected to a system that it's +not feeding. Sometimes a PC will be close to a UPS that needs to be monitored, +so it's drafted to supply a serial port for the purpose. This PC may in fact be +getting power from some other UPS. This is not a problem. + +The first system ("mixed") is a Master for UPS 1, but is only monitoring UPS 2. +The other systems are Slaves of UPS 2. + +Image credits +------------- + +Thanks to Luc Descotils and Arnaud Quette at Eaton for providing shiny +cleaned-up graphics. diff --git a/docs/hid-subdrivers.txt b/docs/hid-subdrivers.txt index fe5b621..b625b02 100644 --- a/docs/hid-subdrivers.txt +++ b/docs/hid-subdrivers.txt @@ -1,10 +1,8 @@ -Desc: How to make a new subdriver to support another USB/HID UPS -File: hid-subdrivers.txt -Date: 08 January 2007 -Auth: Peter Selinger +How to make a new subdriver to support another USB/HID UPS +---------------------------------------------------------- Overall concept -=============== +~~~~~~~~~~~~~~~ USB (Universal Serial Port) devices can be divided into several different classes (audio, imaging, mass storage etc). Almost all UPS @@ -15,7 +13,7 @@ for reading and writing information (such as x/y coordinates and button states, in case of a mouse, or voltages and status information, in case of a UPS). -The Nut "usbhid-ups" driver is a meta-driver that handles all HID UPS +The NUT "usbhid-ups" driver is a meta-driver that handles all HID UPS devices. It consists of a core driver that handles most of the work of talking to the USB hardware, and several sub-drivers to handle specific UPS manufacturers (MGE, APC, and Belkin are currently @@ -31,7 +29,7 @@ add support for such a device, read new-drivers.txt and see the tripplite_usb driver for inspiration. HID Usage Tree -============== +~~~~~~~~~~~~~~ From the point of view of writing a HID subdriver, a HID device consists of a bunch of variables. Some variables (such as the current @@ -44,14 +42,17 @@ for a typical APC device. Variable components are separated by ".". Typical values for each variable are also shown for illustrative purposes. -UPS.Battery.Voltage 11.4 V -UPS.Battery.ConfigVoltage 12 V -UPS.Input.Voltage 117 V -UPS.Input.ConfigVoltage 120 V -UPS.AudibleAlarmControl 2 (=enabled) -UPS.PresentStatus.Charging 1 (=yes) -UPS.PresentStatus.Discharging 0 (=no) -UPS.PresentStatus.ACPresent 1 (=yes) +[width="35%"] +|================================================ +|UPS.Battery.Voltage | 11.4 V +|UPS.Battery.ConfigVoltage | 12 V +|UPS.Input.Voltage | 117 V +|UPS.Input.ConfigVoltage | 120 V +|UPS.AudibleAlarmControl | 2 (=enabled) +|UPS.PresentStatus.Charging | 1 (=yes) +|UPS.PresentStatus.Discharging | 0 (=no) +|UPS.PresentStatus.ACPresent | 1 (=yes) +|================================================ As you can see, variables that describe the battery status might be grouped together under "Battery", variables that describe the input @@ -78,10 +79,11 @@ strings, but as numbers (called "usages" in HID terminology). These numbers are defined in the "HID Usage Tables", available from http://www.usb.org/developers/hidpage/. The standard usages for UPS devices are defined in a document called "Usage Tables for HID Power -Devices". +Devices" (the Power Device Class [PDC] specification). -For example, +For example: +-------------------------------------------------------------------------------- 0x00840010 = UPS 0x00840012 = Battery 0x00840030 = Voltage @@ -89,25 +91,28 @@ For example, 0x0084001a = Input 0x0084005a = AudibleAlarmControl 0x00840002 = PresentStatus - 0x00850044 = Charging + 0x00850044 = Charging 0x00850045 = Discharging 0x008500d0 = ACPresent +-------------------------------------------------------------------------------- -Thus, the above usage tree is internally represented as +Thus, the above usage tree is internally represented as: -00840010.00840012.00840030 -00840010.00840012.00840040 -00840010.0084001a.00840030 -00840010.0084001a.00840040 -00840010.0084005a -00840010.00840002.00850044 -00840010.00840002.00850045 -00840010.00840002.008500d0 +-------------------------------------------------------------------------------- + 00840010.00840012.00840030 + 00840010.00840012.00840040 + 00840010.0084001a.00840030 + 00840010.0084001a.00840040 + 00840010.0084005a + 00840010.00840002.00850044 + 00840010.00840002.00850045 + 00840010.00840002.008500d0 +-------------------------------------------------------------------------------- To make matters worse, most manufacturers define their own additional usages, even in cases where standard usages could have been used. for -example Belkin defines 00860040 = ConfigVoltage (which is incidentally -a violation of the USB specification, as 00860040 is reserved for +example Belkin defines `00860040` = ConfigVoltage (which is incidentally +a violation of the USB PDC specification, as `00860040` is reserved for future use). Thus, subdrivers generally need to provide: @@ -120,8 +125,9 @@ such as custom implementations of specific instant commands (load.off, shutdown.restart), and conversions of manufacturer specific data formats. + Writing a subdriver -=================== +~~~~~~~~~~~~~~~~~~~ In preparation for writing a subdriver for a device that is currently unsupported, run usbhid-ups with the following command line: @@ -143,7 +149,7 @@ CUSTOMIZATION below). Use the script as follows: - scripts/subdriver/path-to-subdriver.sh < /tmp/info + scripts/subdriver/path-to-subdriver.sh < /tmp/info where /tmp/info is the file where you previously saved the debugging information. @@ -168,16 +174,22 @@ attempts to monitor some UPS variables. To make this driver useful, you must examine the NUT variables of the form "unmapped.*" in the hid_info_t data structure, and map them to actual NUT variables and instant commands. There are currently no step-by-step instructions for -how to do this. Please look at the files +how to do this. Please look at the files to see how the currently implemented +subdrivers are written.: -mge-hid.c/h -apc-hid.c/h -belkin-hid.c/h +- apc-hid.c/h +- belkin-hid.c/h +- cps-hid.c/h +- explore-hid.c/h +- libhid.c/h +- liebert-hid.c/h +- mge-hid.c/h +- powercom-hid.c/h +- tripplite-hid.c/h -to see how the currently implemented subdrivers are written. Shutting down the UPS -===================== +~~~~~~~~~~~~~~~~~~~~~ It is desireable to support shutting down the UPS. Usually (for devices that follow the HID Power Device Class specification), this @@ -191,31 +203,31 @@ commands to the UPS in response to sending one NUT command to the driver, this is handled by the driver. In order to make this work, you need to define the following four NUT values: - ups.delay.start (variable, R/W) - ups.delay.shutdown (variable, R/W) - load.off.delay (command) - load.on.delay (command) + ups.delay.start (variable, R/W) + ups.delay.shutdown (variable, R/W) + load.off.delay (command) + load.on.delay (command) If the UPS supports it, the following variables can be used to show the countdown to start/shutdown: - ups.timer.start (variable, R/O) - ups.timer.shutdown (variable, R/O) + ups.timer.start (variable, R/O) + ups.timer.shutdown (variable, R/O) -The 'load.on' and 'load.off' commands will be defined implicitly by +The `load.on` and `load.off` commands will be defined implicitly by the driver (using a delay value of '0'). Define these commands yourself, if your UPS requires a different value to switch on/off the load without delay. -Note that the driver expects the 'load.off.delay' and 'load.on.delay' +Note that the driver expects the `load.off.delay` and `load.on.delay` to follow the HID Power Device Class specification, which means that -the 'load.on.delay' command should NOT switch on the load in the +the `load.on.delay` command should NOT switch on the load in the absence of mains power. If your UPS switches on the load regardless of the mains status, DO NOT define this command. You probably want to -define the 'shutdown.return' and/or 'shutdown.stayoff' commands in +define the `shutdown.return` and/or `shutdown.stayoff` commands in that case. Commands defined in the subdriver will take precedence over the ones that are composed in the driver. When running the driver with the '-k' flag, it will first attempt to -send a 'shutdown.return' command and if that fails, will fallback to -'shutdown.reboot'. +send a `shutdown.return` command and if that fails, will fallback to +`shutdown.reboot`. diff --git a/docs/history.txt b/docs/history.txt new file mode 100644 index 0000000..da66cec --- /dev/null +++ b/docs/history.txt @@ -0,0 +1,335 @@ +ifdef::website[] +Project history +=============== +endif::website[] + +This page is an attempt to document how everything came together. + +The Network UPS Tools team would like to warmly thank Russell Kroll. + +Russell initially started this project, maintaining and improving it for +over 8 years (1996 - mid 2005). + +Prototypes and experiments +-------------------------- + +May 1996: early status hacks +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +APC's Powerchute was running on kadets.d20.co.edu (a BSD/OS box) with +SCO binary emulation. Early test versions ran in cron, pulled status +from the log files and wrote them to a .plan file. You could see the +results by fingering `pwrchute@kadets.d20.co.edu` while it lasted: + +------------------------------------------------------------------------ + + Last login Sat May 11 21:33 (MDT) on ttyp0 from intrepid.rmi.net + Plan: + Welcome to the UPS monitor service at kadets.d20.co.edu. + The Smart-UPS attached to kadets generated a report at 14:24:01 on 05/17/96. + During the measured period, the following data points were taken: + Voltage ranged from 115.0 VAC to 116.3 VAC. + The UPS generated 116.3 VAC at 60.00 Hz. + The battery level was at 27.60 volts. + The load placed on the UPS was 024.9 percent. + UPS temperature was measured at 045.0 degrees Celsius. + Measurements are taken every 10 minutes by the upsd daemon. + This report is generated by a script written by Russell Kroll. + Modified for compatibility with the BSD/OS cron daemon by Neil Schroeder + +------------------------------------------------------------------------ + +This same status data could also be seen with a web browser, since we +had rigged up a CGI wrapper script which called finger. + + +January 1997: initial protocol tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Initial tests with a freestanding non-daemon program provided a few +basic status registers from the UPS. The 940-0024C cable was not yet +understood, so this happened over the [attachment:apcevilhack.jpg evil +two-wire serial hack]. + +------------------------------------------------------------------------ + Communicating with SMART-UPS 700 S/N WS9643050926 [10/17/96] + Input voltage range: 117.6 VAC - 118.9 VAC + Load is 010.9% of capacity, battery is charged to 100.0% of capacity +------------------------------------------------------------------------ + +Note that today's apcsmart driver still displays the serial number when +it starts, since it is derived from this original code. + +September 1997: first client/server code +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The first split daemon/client code was written. upsd spoke directly to +the UPS (APC Smart models only) and communicated with upsc by sending +binary structures in UDP datagrams. + +The first CGI interface existed, but it was all implemented with shell +scripts. The main script would call upsc to retrieve status values. Then +it would cat a template file through sed to plug them into the page. + +image::images/old-cgi.png[Old CGI screenshot] + +upsstats actually has since returned to using templates, despite having +a period in the middle when it used hardcoded HTML. + +The images were also created with shell scripts. Each script would call +upsc to get the right value (utility, upsload, battcap). It then took +the value, plugged it into a command file with sed, and passed that into +'fly', a program which used an interpreted language to create images. +fly actually uses gd, just like upsimage does today. + +This code later evolved into Smart UPS Tools 0.10. + +Smart UPS Tools +--------------- + +March 1998: first public release +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Version 0.10 was released on March 10, 1998. It used the same design as +the pre-release prototype. This made expansion difficult as the binary +structure used for network communications would break any time a new +variable was added. Due to byte-ordering and struct alignment issues, +the code usually couldn't talk over the network to a system with a +different architecture. It was also hopelessly bound to one type of UPS +hardware. + +Five more releases followed with this design followed. The last was +0.34, released October 27, 1998. + +June 1999: Redesigned, rewritten +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Following a long period of inactivity and two months of prerelease +testing versions, 0.40.0 was released on June 5, 1999. It featured a +complete redesign and rewrite of all of the code. The layering was now +in three pieces, with the single driver (smartups) separate from the +server (upsd). + +Clients remained separate as before and still used UDP to talk to the +server, but they now used a text-based protocol instead of the brittle +binary structs. A typical request like "REQ UTILITY" would be answered +with "ANS UTILITY 120.0". + +The ups-trust425-625 driver appeared shortly after the release of +0.40.0, marking the first expansion beyond APC hardware. + +Over the months that followed, the backupspro driver would be forked +from the smartups driver to handle the APC Back-UPS Pro line. Then the +backups driver was written to handle the APC Back-UPS contact-closure +models. These drivers would later be renamed and recombined, with +smartups and backupspro becoming apcsmart, and backups became genericups. + +The drivers stored status data in an array. At first, they passed this data to +upsd by saving it to a file. upsd would reread this file every few seconds to +keep a copy for itself. This was later expanded to allow shared memory mode, +where only a stub would remain on the disk. The drivers and server then passed +data through the shared memory space. + +upsd picked up the ability to monitor multiple drivers on the system, and the +"upsname@hostname" scheme was born. Access controls were added, and then the +network code was expanded to allow TCP communications, which at this point were +on port 3305. + + +Network UPS Tools +----------------- + +September 1999: new name, new URL +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Several visitors to the web page and subscribers to the mailing lists provided +suggestions to rename the project. The old name no longer accurately described +it, and it was perilously close to APC's "Smart-UPS" trademark. Rather than risk +problems in the future, the name was changed. Kern Sibbald provided the winner: +Network UPS Tools, which captures the essence of the project and makes for great +short tarball filenames: nut-x.y.z.tar.gz. + +The new name was first applied to 0.42.0, released October 31, 1999. This is +also when the web pages moved from the old `http://www.exploits.org/~rkroll/smartupstools/` +URL to the replacement at `http://www.exploits.org/nut/` to coincide with the +name change. + +More drivers were written and the hardware support continued to grow. upsmon +picked up the concepts of "master" and "slave", and could now handle +environments where multiple systems get power from a single UPS. Manager mode +was added to allow changing the value of read/write variables in certain UPS +models. + +June 2001: common driver core +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Up to this point, all of the drivers compiled into freestanding programs, each +providing their own implementation of main(). This meant they all had to check +the incoming arguments and act uniformly. Unfortunately, not all of the programs +behaved the same way, and it was hard to document and use consistently. It also +meant that startup scripts had to be edited depending on what kind of hardware +was attached. + +Starting in 0.45.0, released June 11, 2001, there was a new common core for all drivers called main.c. It provided the main function and called back to the upsdrv_* functions provided by the hardware-specific part of the drivers. This allowed driver authors to focus on the UPS hardware without worrying about the housekeeping stuff that needs to happen. + +This new design provided an obvious way to configure drivers from one file, and ups.conf was born. This eventually spawned upsdrvctl, and now all drivers based on this common core could be started or stopped with one command. Startup scripts now could contain "upsdrvctl start", and it didn't matter what kind of hardware or how many UPSes you had on one system. + +Interestingly, at the end of this month, Arnaud Quette entered the UPS world, as a subcontractor of the now defunct MGE UPS SYSTEMS. +This marks the start of a future successful collaboration. + +May 2002: casting off old drivers, IANA port, towards 1.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +During the 0.45.x series, both the old standalone drivers and the ones which had been converted to the common core were released together. Before the release of 0.50.0 on May 24, 2002, all of the old drivers were removed. While this shrank the list of supported hardware, it set the precedent for removing code which isn't receiving regular maintenance. The assumption is that the code will be brought back up to date by someone if they actually need it. Otherwise, it's just dead weight in the tree. + +This change meant that all drivers could be controlled with upsdrvctl and ups.conf, allowing the documentation to be greatly simplified. There was no longer any reason to say "do this, unless you have this driver, then do this". + +IANA granted an official port number to the project, and the network code switched to port 3493. It had previously been on 3305 which is assigned to odette-ftp. 3305 was probably picked in 1997 because it was the fifth project to spawn from some common UDP server code. + +After 0.50.1, the 0.99 tree was created to provide a tree which would receive nothing but bug fixes in preparation for the release of 1.0. As it turned out, very few things required fixing, and there were only three releases in this tree. + +Leaving 0.x territory +--------------------- + +August 2002: first stable tree: NUT 1.0.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +After nearly 5 years of having a 0.x version number, 1.0.0 was released on August 19, 2002. This milestone meant that all of the base features that you would expect to find were intact: good hardware support, a network server with security controls, and system shutdowns that worked. + +The design was showing signs of wear from the rapid expansion, but this was intentionally ignored for the moment. The focus was on getting a good version out that would provide a reasonable base while the design issues could be addressed in the future, and I'm confident that we succeeded. + +November 2002: second stable tree: NUT 1.2.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +One day after the release of 1.0.0, 1.1.0 started the new development tree. During that development cycle, the CGI programs were rewritten to use templates instead of hard-coded HTML, thus bringing back the flexibility of the original unreleased prototype from 5 years before. multimon was removed from the tree, as the new upsstats could do both jobs by loading different templates. + +A new client library called upsclient was created, and it replaced upsfetch. This new library only supported TCP connections, and used an opaque context struct to keep state for each connection. As a result, client programs could now do things that used multiple connections without any conflicts. This was done primarily to allow OpenSSL support, but there were other benefits from the redesign. + +upsd and the clients could now use OpenSSL for basic authentication and encryption, but this was not included by default. This was provided as a bonus feature for those users who cared to read about it and enable the option, as the initial setup was complex. + +After the 1.1 tree was frozen and deemed complete, it became the second stable tree with the release of 1.2.0 on November 5, 2002. + +April 2003: new naming scheme, better driver glue, and an overhauled protocol +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Following an extended period with no development tree, 1.3.0 got things moving again on April 13, 2003. The focus of this tree was to rewrite the driver-server communication layer and replace the static naming scheme for variables and commands. + +Up to this point, all variables had names like STATUS, UTILITY, and OUTVOLT. They had been created as drivers were added to the tree, and there was little consistency. For example, it probably should have been INVOLT and OUTVOLT, but there was no OUTVOLT originally, so UTILITY was all we had. This same pattern repeated with ACFREQ - is it incoming or outgoing? - and many more. + +To solve this problem, all variables and commands were renamed to a hierarchical scheme that had obvious grouping. STATUS became ups.status. UTILITY turned into input.voltage, and OUTVOLT is output.voltage. ACFREQ is input.frequency, and the new output.frequency is also now supported. Every other variable or command was renamed in this fashion. + +These variables had been shared between the drivers and upsd as values. That is, for each name like STATUS, there was a #define somewhere in the tree with an INFO_ prefix that gave it a number. INFO_STATUS was 0x0006, INFO_UTILITY was 0x0004, and so on, with each name having a matching number. This number was stored in an int within a structure which was part of the array that was either written to disk or shared memory. + +That structure had several restrictions on expansion and was dropped as the data sharing method between the drivers and the server. It was replaced by a new system of text-based messages over Unix domain sockets. Drivers now accepted a short list of commands from upsd, and would push out updates asynchronously. upsd no longer had to poll the state files or shared memory. It could just select all of the driver and client fds and act on events. + +At the same time, the network protocol on port 3493 was overhauled to take advantage of the new naming scheme. The existing "REQ STATUS@su700", "ANS STATUS@su700 OL" scheme was showing signs of age, and it really only supported the UPS name (@su700) as an afterthought. The new protocol would now use commands like GET and LIST, leading to exchanges like "GET VAR su700 ups.status" and "VAR su700 ups.status OL". The responses contain enough data to stand alone, so clients can now handle them asynchronously. + +July 2003: third stable tree: NUT 1.4.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +On July 25, 2003, 1.4.0 was released. It contained support for both the old "REQ" style protocol (with names like STATUS), and the new "GET" style protocol (with names like ups.status). This tree is provided to bridge the gap between all of the old releases and the upcoming 2.0. + +2.0 will be released without support for the old REQ/STATUS protocol. The hope is that client authors and those who have implemented their own monitoring software will use the 1.4 cycle to change to the new protocol. The 1.4 releases contain a lot of compatibility code to make sure both work at the same time. + +July 2003: pushing towards 2.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1.5.0 forked from 1.4.0 and was released on July 29, 2003. The first changes were to throw out anything which was providing compatibilty with the older versions of the software. This means that 1.5 and the eventual 2.0 will not talk to anything older than 1.4. + +This tree continues to evolve with new serial routines for the drivers which are intended to replace the aging upscommon code which dates back to the early 0.x releases. The original routines would call alarm and read in a tight loop while fetching characters. The new functions are much cleaner, and wait for data with select. This makes for much cleaner code and easier strace/ktrace logs, since the number of syscalls has been greatly reduced. + +There has also been a push to make sure the data from the UPS is well-formed and is actually usable before sending updates out to upsd. This started during 1.3 as drivers were adapted to use the dstate functions and the new variable/command names. Some drivers which were not converted to the new naming scheme or didn't do sanity checks on the incoming UPS data from the serial port were dropped from the tree. + +This tree was released as 2.0.0. + +networkupstools.org +------------------- + +November 2003: a new URL +~~~~~~~~~~~~~~~~~~~~~~~~ + +The bandwidth demands of a project like this have slowly been forcing me to offload certain parts to other servers. The download links have pointed offsite for many months, and other large things like certain UPS protocols have followed. As the traffic grows, it's clear that having the project attached to exploits.org is not going to work. + +The solution was to register a new domain and set up mirrors. There are two initial web servers, with more on the way. The main project URL has changed from `http://www.exploits.org/nut/` to http://www.networkupstools.org. The actual content is hosted on various mirrors which are updated regularly with rsync, so the days of dribbling bits through my DSL should be over. + +This is also when all of the web pages were redesigned to have a simpler look with fewer links on the left side. The old web pages used to have 30 or more links on the top page, and most of them vanished when you dropped down one level. The links are now constant on the entire site, and the old links now live in their own groups in separate directories. + +Second major version +-------------------- + +March 2004: NUT 2.0.0 +~~~~~~~~~~~~~~~~~~~~~ + +NUT 2.0.0 arrived on March 23, 2004. The jump to version 2 shows the difference +in the protocols and naming that happened during the 1.3 and 1.5 development +series. 2.0 no longer ships with backwards compatibility code, so it's smaller +and cleaner than 1.4. + + +The change of leadership +------------------------ + +February 2005: NUT 2.0.1 +~~~~~~~~~~~~~~~~~~~~~~~~ + +The year 2004 was marked by a release slowdown, since Russell was busy with +personal subjects. But the patches queue was still growing quickly. + +At that time, the development process was still centralized. There was no +revision control system (like the current Subversion repository), nor trackers +to interact with NUT development. +Russell was receiving all the patches and requests, and doing all the work on +his own, including releases. + +Russell was more and more thinking about giving the project leadership to +Arnaud Quette, which finally happened with the 2.0.1 release in February 2005. + +This marked a new era for NUT... + +First, Arnaud aimed at opening up the development by creating a project on the +http://www.debian.org/[Debian] http://alioth.debian.org/projects/nut/[Alioth Forge]. +This allowed to build the team of hackers that Russell dreamed about. +It also allows to ensure NUT's continuation, whatever happens to +the leader. And that would most of all boost the projects contributions. + + +//////////////////////////////////////////////////////////////////////// +*sandbox* + +TO BE COMPLETED + ADD A LINK TO IDEA / FUTURE + +link on the team + history + +mention: +- MGE supporting officially, +- USB / SNMP / XML drivers (first non serial drivers), +- Power Management (HAL) bridging, +- PDU support, +- perl / python support... +- client history and evolution (wmnut: 01/01/2002) + +release history +
  • July 7, 2008: Client activity: new client NUT-Monitor +
  • June 27, 2008: Client activity: new Python class PyNUT +
  • June 19, 2008: Client activity: KNutClient 0.9.4 +
  • May 7, 2008: 2.2.2 released +
  • December 21, 2007: 2.2.1 released +
  • August 31, 2007: Client activity: UPS Monitor link update +
  • August 31, 2007: Client activity: Windows NUT client 1.5.0 +
  • July 5, 2007: 2.2.0 released +
  • June 5, 2007: Client activity: collectd NUT plugin +
  • April 10, 2007: Client activity: KNutClient 0.9.3 +
  • January 15, 2007: 2.0.5 released +
  • January 8, 2007: Client activity: Windows NUT client +cJpoL9iz}h-UHx#g zI-H;`7(OmfXbryuCvttxN)-W~LPy9Yl~aFp%zjZoDyyt4P;u_!=i|8i@&4SYF&}-P z%vCt~ygmfbC>#%ctQlBMq3?Ow>5%4JWj-6}fxt{TcY#N@Z^g1@BIlnn2A*p)F@{dp zQadYd)#39|pnEK+bLXtNG*H5qQ*Xj#boeMoD|D^NSW~tkke3atN+^G>hwYSANJaX9 zv}fJgL+zwK&?abgAAT8}SQ`Y<-fVjhi)stvs9<&Gd$8eW`f!#eBkvSV{^W9q?+1C1 z<^uw;$awVESesdg#xU0MNyY63vx`MKgmF?KUHqa5Z^Dvy7uTKo@)W2}-t!An&i!9> z0=mHHN{+WLGBA6yp?FThtuv{0o=Zl=Zg_|e`jZREIWUguaG)dXW$Pv_)EsJ!U?)}4 z?aIZ0M|d@(XB(P%AL04QU7vq!+1FHJR&%hg3R`9|-p}(Unw)u&d!cm%MX%N5^!Mo^ zF8Z%lyKprIWL<;!kSr>ysw5LT;LAO!Wi`9cb6{H#EVzCLXRt1;FVCWHDE~$opKxN8 zm&SXGTXQN@K!fhyoTMwp{tN^q`rw#?DW5@X>PnFI-IPZ*7p@@eZAY$WYUw?h4hNnN zXN&cNA7H=av@~A8AXmFn6Zr}4ID96@@HJhRKe*YrlHP$@yfLSHtx0eIyy-Hwkv2Qp z)4eb+qw3-2tvjc;Z{VLO?;$p70aj6n@#$^q(hXBLz~N8}^-yh>^Ac}vu7W?IrsoL z1&6|*0463Tfbro6aPS*&`m&$P%>Wn7`Cx2-`}r#{)2j#5fXe`uqs+|AM_CSkSXfwC z*^VD$J4`1zIoXeMpXA};KFQ5}`i#)o)4T$F+}!8H&It$$i;9Y#J_`f^MLSOyIe_~ZlMYksQ6?bZ2shJFZl;4yfbgOGfTRER1^hFy zGPAH9Wjb<<{jm7PDZruhOh;MR*|<14SXd58n2sD}W?|*#VLL6x%XiV5apo*gA9;;TUOnR;p<>OZ4^VZZ`*fB_*1;25u1}eu^ zkV_K|rj`t(oR}B5?VxS+H`xx+yo&2Vra))s5ltRo6Hvg-0X>_i&erkHGwn0L4ih5hgh8!vFz`slgzIHRY^ z_S;=+K-!;FC;nvRy9@gD2i5&QSy^uUU(rCA(UjahX^V^Ej^F0#qJeUXV}YucrDrHS zC?Z})!qwH#&_M!oq!0jLlWH$$c{4>QF|hx*atd$!{^{G-^|i5}j?4pqA0gPBhhPk! zpzvhF)?`;+?D+2Zvimlu))P{T6_KL)_`6Hnt(1Y^g9VY9B3@=CpPg=_?97zSp3uxg z1v@v0ME;`sU5HXQ4CIm&j|QWv27c+3Tb44;S_I`Fu&YAxwSvT-6LVKTkt7_Hn+>l# zMQWyJ5JOzwS-MO@p4_y!QFkPdI}U$NU##SuXKD=Hfti?jL@f2_Nuol2i-MF}FztIz zUSGqKwTj13Zb<#S#ytMfKUT)k{ORp}!W^y$zBd}b7^M0x{UEGq(R1y zk4G)bW)%~aTIe@`R%)~M$~%!{_$U3p z2(XiL@vE=fPlDPL;Wbs~k8{I2AfFpYTR86z<;^ZLsyl^y?L`7MPC_X`=QnKYMAgpR zp^Aqyy{mK8^_D#VpbqObpPHx&3}$%~{aOAK)^uDDp7Dq=(CWry)U#&eH-g@b%hu*r0!kyi2Kw_-a4Q-lEQ3=dx^4Ld2u$?^X`@JVz)xa zp6Upszq$XXM6v+p?*5MqNi=#jovmE)5!DhXl$kmuNDlq?WmPvIYlUV54EdC=e&E^wAWtipQB2VR`&APZC3@KB<^rC0a!*1UCr?HGAIoH`D=BVo}wprqzaL8Hh?D!dpt72h=z{o6s@7}_hd3m8`i8-QOsxz0bBMrkpC(7AT#bi)UT z%f15MxYrj$C59Bg;|J))=#gTHv1GUfMpH{cJ#Z2^xMWH;a>2UK$w|So^Td(bksJft zcmd7?Wqbh(+4U|UttN6+;e8+LGi!amD6_6#WzX(N3GCZ4v)njb)3H>ucFOw(X)ckP zOC{aO9LkLvF5D~dKzT@~%qx?UM3m*|A}F7^aaaQP0^=Vv*81LU?{(Vra~nX)$IqpK z9m78!OE$%-d1+OByE7Q7^OWW8vESZP!FHbx0NGpNA^*Q~+{;pP=S_@x|3I_N(=w;r zd|~~fK-69^4;}6MT4=&w2!uZ!LM!Y?jo2$H+-1(6&|P%;twZ`pt{%S1`5dGQtT(k}lssD2dhbjy1pz!}*iKX9J zZq<|f?9!F-R(=j#me^|Bp|_KM_je6oZ+NGBpx;T^SzJ+f<=ou$QF7b?pemOFsW{wP zNqf@4umb>$>DPI-tyrHSbvwU~ess;u@pb+~O=7d(wDbJ<*p8k$R!MxxW=8b)4L$w4 zd*(a!49YbhFSyeF;7RfUfF9tRQoiD$P_DTJM8~z*MX((JqTZZb**!UQ0I;NGMHp5n zDv5ubG8f%@GatL}4X(1oR1=6K`K80+*MME#eL$s2dFbe()GV;gB0hlD6_8Hfo5xF8Oqhy%# z62BuOe_vJkS$mAj^s$N60l?=~n~YWVl#^AK;gqL91ng&+IP_M7GD3aLU}CnA?!lmd zh^{aokoH;XkE&Xp@U!ZHlxLgC=ax&r@}{oR?7YxuV#n(y+;N7SM|o8MRBA)mQOwf5EK8PPSNDZc{P0Ihbef@;Bs?EY zfMEuOQ?cvQxb%QAjsk11uLh=YZ1?p;OW&Z{I0!?TG_Ux&^nf3T7(e$c>^1C_MR-ZW zMZM%f>2$+ln%le(t_ckSwgZg@b#+J2<;n5Fd2rrh3PlQ1MTJH9<-klkiR2zr4&@DD zo%!%*HQxjb&tL<}h;RA=O}bo;H+ol2)WMD8YDsf$ugETdyebFZm1|zo@9d76fots9AC z&o;k(#My;En3mzOR_M{g7gG{lHMxRG}fYMAa@wmCCZGvEv6yCkle`du6t~STD$l| z>sEb_B}QDrV~k4jm8cslqt_~p5SC%5xXuhLS-fvv^{ujtvWk3T2t5-oZ+Y!1wguY6 z?(U6ZG^o20^r-?2<1fC+A$->!xL36~QXH*x9rT;I$HjU#O>2FPVJ=X+F0eMI#BKj5 zZOoS|jRJB-m+$L#S9O+KVd&T){eTja6jDgPfXQ3Mi3g=`4-GQxi&FPVR()!*X7;x+ zX+9^}?xN@3x!nlXEFSh2#bbMvHYpoD?(F{l+?=66xKR)uOP8$90g@Tf)8!9<8rPr#fgnpR)7E07I>=!(C^20xkD} zH}`RD#cM#2JZ2G?0_6*|sn^5yJbItwt=HUYf z{pJB6aP)_V$DKQZZCe>WD>6*K6xJT@FG#&7CPgNLu0(haH(Wmee71P@1K9Il6r9&n z_WHH46!H7&p?wi{{G#R%NY&&6fcl{bU?FFVxKeK1s)ot0GQrr8W zacyFBf4}|Ej$Hozm6W)D?aoWxt=}2%cjX?A?$qD8<8x?17np5yN%V)f>FgtXRfMf{L?mNpcL7YY_FciZJr*z}Uzvzd>L@ILtr9K01e zOc%fV;Ag{~=$ZGw8RjF0Hq113f6>#2)^}%lFlFiec*UN?`T^iuab(Q%-%*}=8#2z3 zW)=qks3+Td%rif~J0cT$wlKb81m^u8Na3FoaO5u!Q`YQSXV;7O_X<6BFsJzL0stT{ z9!=BFe$#K1dqTU{F2vy}?1-O)uh`$H_;0zPSAN&x?Zt!Q)|BCcO(ELzCN&(kV{Y2B zUrcOcVs=9kzr)3{%6{^s->qdTT`zyV1{NL5`F6jx;(8_Vj+xIClk(!UpM>CdAeK0^ z^eA`1rPfCwJxA*Hq~t@YE3w^kK3AQwp1#X_hquQ zv`l2Noegb8rZorjn{h>osO(<0tErgCJHIBC<~JrxsV`gPTk_azvzvZgw;Vcvg9h+p z`-~aIUrdP6EXl4-j`$!wFS{g*t9w$%%`<^v8Cd$)6tR+#XkR6zhbvU5OX-W3*UGj( zeOeuT%gb6WlT5oV>6i?Ta;(LEbFh;yl78U&nVv*QCpZrDt|8iPi!R-+RO$}wmz))7QmFlz2R{jKZmhL9!CfjXi&eaK z8tx{C8>|ZOtbXUT-0aj#{H!UyB@~Hs>NANluzK2e296!HzkOO<{DYe6LgJbGeb+eV z?|zDh!^yDBYmk##8004zNYH7~$%^`shgwuobVjKOD< zIlbyI!+k$*lYC~Z9#6paO4UA}(AZHM$DMUpLRC#Trs;ZVrU+=!gC9$4oyLfK!vye5 zxPv7Fg_7kcpxhh1yAb_%&jA3~XXkZmh50GHHK~_R{(?N0`E!#ULViqW+usVUxgow>uhg(8o}u=H#kDgK~Y@b_EAe=>-I$OT=e%3kA&?y2`)3v@ zV6Cfpw)iugs0mk!D3RgnMt8lTAu;l4`i!tsyjelr6pKO5)kkB@-i>pnC#uj~=z4F9 zC?r4F1D;ExFyrXymZ)!+>!gwDmTSP|v*F1fKS#;g3@L3EbW2H3j7wBmCSNU+a9&HA z_im&Og^<>~(9^b05HnPmH7^va)Q5_In5hBOy{Jx~64sx3jP$!&&vrfR#MZcBC#by< zK80_USAcL+6Dc|d2QG3)^5dQtPr2N~ysFP5b`P$kFP)Z9CyKpo-cfs)`xNl9xCD&4x zTMHVH#tDpT89n#m?2X=jPA?eJS6*Eg{Co?FIht>yr8;S!&B=!|&AfDD5k&tknN&}( zejs3dA54*f6N*u$(s0W(adDucqCk7;r+Li8KC4lej4KgMECqEZMf6IPSsf%hvdn%NI(%u=m|>MAOcOKK;X!%vVni3 zmu;}p*N}=*%QtEys#i;NGZ`Y|g+-r92hm_CYhoD@3O%gy2*;ZzL0$p2pVapY^dmJH zjrQ2)_0w28d1?cQK8LEOO6%h(FmZTX|3gI;wG%_K9&i#O=>23>`7Fb=1~67O6@h*$ zertpPBg8in=DTgh>GW8OLONty(+N`FZ8?BZpMPYL;0w1)w0I~7KYTBt9R6ngBc(iT z^@Ic-vsidy)*D5sRwR;M!O^B1NJ;f^G9%B1#zQp3z^x7BgSvu{ny5vSC+_AQPjSA! zaRXm$6jp&eK_E_vnxNiBgd4-y*QvzsoE=W-r4!u53D^gd=cz0E?pigP5qp6o`>m#k zWczI&*tqD*d2K89U%C&Uq`DRz-=q3D#DxH?NMW3hB$=Oal zH|Q9mR7xWM(4FKjfCeT=`;^*KFLM+8uk-Id3%*k=Eiv9t<*3;SZG7kA`E*Li3#(kk zDN8ZDeLN|J9NqZc{oQ7Rj^dS1_rvRbLZFdR6 z+g#B9he-K1f!#4LojV^gf-Lgn>Z9NY$+Q<|PvDjQ)4_YflQTmK?`CY%L~FU$N89Id zVVIOjKm|{@&9C&t-ES#B`!4+WbFg2(rUoyDDchXRZX_8Q!FikPT`#XWW`LD{5R9jR zN{T*0<~^xrZvX(2@FlzNLaj!M@w$Zxw_`}=#Ob7>=5_UGjZ#iq2-+^Ni7)EAjGSgV zG5u7YLseTdczmT{s!DcAn-O0_qC8LmcZzYXS#MIxlBT`tMbagsIL~Qk#SlsxG>=QE zP;n`sF<99}c1%P4s8)NbZ~Po;0*1hBiRfo1OMc_azepZ-!(LaO#!orlnnSp+UUY?F z%>-QuCfH*)BYAj>kq`t}45kE6>(NGNdT(2=T|D1lMzvlUHgw7Oflxd(p8_eJj5yJ3 zR)j^-JhPTyXD1zIXSp*xb@FOh4cP;J6}R))8)PFQSoq*+eG3woyXP!lkZb3T^&23Q z3W%)MLmTCRpZbR_vJl4DV`zfEcZt9A;f*nNh)`xLIY$^S#|^N0>xv}k?B z{#wENYtOGw{um~|di%G=*hJf=DvdfSv>&vNJLlR(Kt=_^Ar!ntdgf%V4^TED9jl0{BObo0M5^EFFYwdUK5+=)3s+s z)fLy1%+y7Rf3Q8u8k=wUF=9u2&*cD6Snx^jTjqL_(%t{1f`4Y1%%~)^%A-wd3@oL- z;<#N*EnAZ0K4#-I9~lr#i`-S@;HmGlfj}T~^9A>sht}m3gYqV5fk^=}H{*<1Ig#!N zHa4`PSwNueh7Dp30;e7y+bZBDJj`#qOqrOzsdBD+j`TR>RaI+ao(mM3rmTJ+3>rx4 z{o+DU693?AAEZ<1Hzq}ux?E;<$~_PZ%KtFG1_a;8eVe}#VpIX+c4M|-U&*m4?oQ;M zyC;v%$1dd>O4{C@x{QEZI&y4L7VQOL0#Et4@gnTjW{mUn6?3z)K39pMd&`#ZN;4giiyD;K`O2n0B6A*mLsa*fN$RO*e?w;lB3_VKb0X?jlGIuo0n0ZTDT zBcVOVKi_384ct*s`|j3tvYzb^h~o(pWF`VJxIejh`7_fW(2+`j{Jm2k{}G z1vz&t*OiA`6Id^A8TQNFZqcfB%kxQROnOsPx{|wVyo29_GS8be-eRPa`$5Hu z`1|7W8e-qE#s!UM=~Z)9MulpHy?bmLo)6Z<6{JItT>Sl|XWE6`PbD`2k*rEXx%QVl z>EjeE8!+~5?%HC<{1#g3{!^eop+nK&!Pik=?*!ex`s>o4Pz8V|?=|D;`-4WqG zAnE7-!+!q{D`$C8&ls^mjB5#Ocu6A?K@B2W6(dtz9@a!%Hwpx{ut~?l4*iEBw6p2@ zonZGT-V`w-Vp#$|J~MN#@OBTpZ%%G zaW7*{ywd9jMGVWenCp~~btf+4bC6lv*{O7^AI~G&9#cb~wdqPl6l(neS>0tfTU&MX zSszXibwBY3#CPL}6L|b;q=l?}cgsAbi^94_IeQu7mJEOOF+@J?1^*uF;Z{E0n%HsTllp;P1Ac^EQ;YiSG6vb%PB-%`y&CIK^2C%v zZeF#!oPhO)V4>EwI#5TBnzWbDBi|~F4HW|eXoJ1>3oi|?2)Udra-FU|v%~td?!%MW zSq${{#Wbbv{eFo_UnFBk`JKH#j4+eB%9y1L&IOm?l!D=V%4_2kdju;RW*QD3wEWJy zmGPhiPSNxeQ0AdAPj^?%V+etCP?4dbS+k)b!uqnuC8~;T(esKYoiPGA!Y#*em&1fT zGYCj9c2lbEzJk=C2vWS^j11BSMk%>!T9^zaf$%q)3r_Dz=v?|Q)K|!*Uj{Y51BWHI z#utsXlxlPSS%nW{(kC4zxnB(?4ZibaryNQM_+KYibI^KLbsO$ z^EKmVitmHxMO81$Lt7tb%v_(YFon5@K+}%^m3Fzj+BVPq`ZVJOkF_gT#VTbvN#sOkn1ilhx!%zHL(y3!E@H2JTM!BI zQf{uAqs`T2UZR{w!2I_F{raOYBuK2i)Sl7(wL8zOOo3K44s-iegE~U~XX~siY(ftP zocF5D^-K4D?j<1aINm0w^&zxxB2|RcRCwZkSf&J4kZwN>ph)i9YzZWCTp0Yj;Qzvz zhExZ}N2N`5!PSgXvaoJA%`2NUg18;!5m04{CorHCtk;0p;rg->_*pNBv+8XSi0HcY z($(v+L~%St!f}xbZl2NhxSmN?c}lxwx_cN7UwCPW193XPGs);QDqmpWEu)ZRK>* zKELEwx%9a@VCe^L3m+kJS#j>>5Qwp6`Z>$g)GqO1mPt>kzPH7)O1HhU1tGaUOS$%P zTW8r@@Qrx&kz$w@eI~S|rakc3FqFcLiRi9v@wqBfLVGP0&{tGb;pYz&`~0pFH&&Ly z|H4gJ{XGBEYK0El9|k9`oqaF6SH#5@zQ##C^Sb=ex6AE24;YCa<0j$f)%N}yL@I5f zc;Pl(Xwwv|y4}{FwRYLT3>EiVoIi;c*UfNIAYS~{8b@=py|XPET%Rm5SZN0|#hYgA z=Xkd+5FuaDD@j>dayaCjv%Q#$(yB(pFHC5D?4lqU8~$LlS-1E}tJ0D&Z@PUB%1 z-dPbPvY9OUMr;lDo$_n$_~EvA%w6lfje~JxyJb(U@J6LP+0L=td6Mbb|IE<7(YC(-0S*gBnCLV|q^*Pcgu+ z(yXw}shO(9_Os$?RS3C(p!hWF1v(~kq6z}$$@U!B6Cdi!kw#I+WAH2=PrV|T#xpl2 zD@eV)H4GEODJmBn9VdUC6YqmZ-x%5PlT;zp^^wDit$jNjb?B&&o);-%Wlu;aK<=$+ zwH`0{*!kWB+E`CXZxg#KO(I+m0O0Twr~SZo&ig7U@k-=jLCAU$OX?F8cew0NVzK_*u~lnhW&< z?@M&6p)0j!)b>?7wSZ-?fO>{Wt*a3obLAPg3WBNS8sfDfF3P5Y&nO=6;QK&51{H&P zm7J}DSFj7GgKsHk_x5Xs#C&_(vfRXzVHpo6c-2l1?Z?ArJXE+<+YQkU;s)`i1u;oy zip>yO0+DJQ-4{E8Nuo=93rat4ldn84^_0=E&Z#4gThZdEQj{S{ySYz05v}?nq!BZ2 z@lQq{O7*eb=2}_2-*5qoM#Pq6Qe=axb}8v`)Ik3${UV!PrTYpH-wR(_yy0H0G4IMH zoW!#Pa#P=45yD2}@d9trC`@z)Lc;BNZ3MHc-93fdb`9Bkt=EB7`te7^+kTu{w0JGX zlM5qHs|YxH_NHQRW1Y!pll>vqmkT5Yu2krQLtyraHS5~a2JY}r^8!tuw32RYmYTO} zFU1_abwvHsujt{JaUY&NZmdJx?OwFM-vYtDVG3JsH!tT{=jTj$a1 zsG7U;6MfBzX`|+K@GtQ?@}0aQgIfmxjz{_h-;!|8-gms&^(yaKQ645EJY8Q`_r2NA z1Xqz~kb*()@7DLY>L`zl3I*_sNi-)Q@d0Nj{9oo=Z(o@z#lA*(WPH6+pF=g1zHf!X z2!(k!_L42OqJZ(G95nt#iO3_jFz9&wiT@%p=g4#BJAP-`^0Z!!QXS&{j5oR@3;0VY zPwb1y@9YKd(VGhUaxyi58YaQFfn7`Jt!=cq(~0?N1WIcH6EqQ*s%15-NhKNqb<4Y@_`W zP@{s!HIQdeU+NIuyUeT2=Q&!uP9)o_{)#ZGF{~O$#5k}}p&{}TZk^JN4Zd1Vjq~|* zZ;EbEWs$6UX%f>iuXuEzyW~I zhz`9>C;akVrjvPi>s2JsjEt)Y)RV6<7?^&A^vdjd-E*2GF{6ZnLlo3=xC||<`pb=3 zR*haXSMCpNP^=d`(ff`cQspg}t$a3`C<^xr*YZB<`&u)orDU6Gw!yQVIWYy3uS_dy zx{%Q?+6&`p7O}QL#+0*;dWHI)z%BIOXIFHLqgoWT@e^BVt!5Mi8U~?zYC>HxhS+XD ztawRDKQ2O7`Qz0sfmFJKfg{#b9frij8zXrLw?oLiNv+4@IxVYmRdiol)m*LAY(?zY z?m)brOsw>z1MOerxiFWs zMbc&IjAL2uxkr9uo$Gvi1F9KVp~HH|Jd=&U{Y$*L;;bzDn9M^(MoGpPHfEZ`J-&Ss z!lPW-kg=Oyd3Zh$y`n$csVOa-8)u^IqjYg*o1&OE5G<^mMYU16sR36HCw)Q03f*|_ z2{80JQej21SLVN3?uS2NYM=~3GLYl^pta~I6-jd`HNMJti3eC1nOIDR53=+~&nJ2M zvk2s&z_|B*t%TzB&1B7h`j3^nw#(g|rP@cmk0A0?;~CT8OQ-WvHOAcYOq)7~f$?s+<;Kw7nbmaM)ihAm z&&JQikJYg#4I?d7vVG1y{K|_PU(0qgF5H~B1oJN$)y(m^J?CG`rs;K>+W37)QtLd& z2#@_ry;;fhd-dE;_l9x|SH0T5#t-!#sb|jolj=`aKot}CPb#55SntaGZ#R(lZ?XY4 z-P8kzLQI&%M8)546~cJ__THx2MTXpb!Ua)Xq4x9KxLR$$-PWU9N=GMxm2 z>PWcU?=}~)SmCIG?&;J_drLElcnM9bozq5+x9DV{gdmDQi`r3f5ciprnkn(ltiqoE z0_**ZsZVaeBS08T(n{nv1 zTo_E3TE#n$xx9);x?Y53Q`w@h+6A95WBuaTCUrT^36I0B%aA^OBS}AY8(Z~v0UA;v z7Ab^N?h-;O`6U-HaB=so(N&=J)v&m90#nC-zIB=AfgoE@F`hrOp|K?WslE(~Z=Ddj zBK`u?di^0rhYwiQH_kjP~%auS@>J>lK1W|Zr~a}WjItS zkBwrf<+}ZGXdy!@2uzZT75xNm5ZBKS`;e3fPJN#y2j1y0J)eh0Jy3_q!QmzYal_q) zIBU*XJ*lnIY|{tWvE;Aq=T;^vw?z*C@8wU5Tb)@igjM-#`3sxWMfm2t>k4el4`n9V zd9{)WLTDJL5}eo7Fg^67U6;PMN>g(=yT7YqTw1Vqf6T?SM0ZH)RI1Iw zRl69M1yw}Qor(LRQmE@wiBuZyfsy|Fhlrh^TfBw;Ui;Bw%iC$?={763%nBWNerN`F zeOUP(GTbsdHu^ktBp6ZJYAi9xCXeKo)XxZB#|@<^4*BP94h3?H7(XT12T;|HXCDvj z5ArnP0SSm{d)AY@6WJV z(ybHGR*%rh)=pq#m(QW*i%v)fJn~Tz_Nu}f*n4#q66TIiq;Rp4XAMJN;FJ22=Y5_> zEU)*au6-Jil25+;T34b5|f8a+P*PE6Gt1Z?Tlqb|%vxvLR8y)lPf$OJW%yG3qKnq{1GA1x##<4d5r;^cp znXW*gmRo|P1_y^5$;D{0cGXtCSBE+RgHT@B(}BS)?msl}iG{!g}AfZawGX>cUmm>Bl01W-FANYb`)z%0^bI~)-eS9_&L zNYOA~L#ek0z>~Wl9LTEO$(h{ntIvbp9p!82Zyb^C`eQvPT?0@W1VYxJC*LzG3RI*w{6TZZtgQN zxvF2?*MHZh-pOU_`Ils3!>@y{=I@Y1jSpSF{{z7xfAIa$uYWj+|97kH4|4W(FthVZ zu7JEIWG~tZBox0iu4iD*krK3Om-k%`?z z^7C;1Tr6W7E2v&C(piJ*rY^0um6?Z)rjY;P0FG>Hjs9MB?&sxy72~Y|5>D3ZnJ$Xc z-w*@J4HTJxRTCKllidpDQ0=oqr%C`!!V(O^$5Cf{}UK!#Q@y>%7fXTLMDY`s1)XCk{~y*%7$C18i-nv4EI~8#?;n1Wn}} zc{1w3T9z|KG=dHWyP1(9E$p4&tr&6byV{GMmKaVDw`ZU0MwNm zWgSue^?NWG8IqfG)rD`jAK|y4Ub+C5e%%FHOYC`ZSNIb1od}&rKYHr+g9WEg{0zVN zHO1}cx?1Bu-U%C0UjJ5bYbUxChLY%uzczBc3)@@OW!_yTA2awvoAP$2d9usw zLt14@XEQmDV|Pg8jyk@=OU;cjSlCl#vEIsM#V2i-N^UUCecNL8^kwp!w8rcQ-;Fxc8p9Ss{Ce@{0znlc=GHL_CBZ;{&OX$eEYqY zs?{=sT_pIojV9ZDR|$W}Kjc3@6c}PF$P|0!HSO%vcW%UI$zflUS2x#p=g;*do*Vn{ zf%V2eEBMd;j)z6&y{up9{_);F$t|REJLKz+y{CSPY)Nu<>A3N{wfr@W?z$fH#Gg-d zFC2aIpVjam@|dG1uRVY-mg^Uemnpxg|B7X`z?${@cF8f z-6|1hGE+4!roj!f^HE%|cwf{`N5!Ph%CJT`ZVvF@Qad}AFNkx{#1&f+Kbv_hUVJ?= zfCUk})h302BVoZYaGGc|g`4|K6#UjD?dgtBP3N^V+RBrf2MAoRPhVs;CD5Svtxw*Q zB9O#&^CTbM`zrFY4g^o(t0+z_C1@O5?k~-&RQ4KLw#e#AJ2*!kJPTQrzSo-|rq9esNsBGXHk0)wHt~XN=rf~T(_Vn}$1eSc+4u{>s-tBtX`QG3UTfVqX@f66MRe!i zl}4z!@8b%Vo~VCGhdrTBNo%VlxL9X zayX?IU=W;^mGvR+!MRNn8yXUFaZ+5I#(%!~aSX zsm4QGIgBj1vqkV_of`4xr%L9Y4tY$LFE00Tsqc(=YuPS?Z#x5Ra?>(Q>6xB{UUsBBzDj$(7(V#BYEr?Po3_11$E;UL-s>>!GAkLC zskM*r%Omk-S%^2{?0WSfUF3Qy^fs!1xz;EN3p6`+KeIdDGUrm#xP0I|EXvYaV|H=` zXD+)WVQ8fqGigg%1j8W4A(P4(>3FLBvHmrSln_Q)>fu>qV8WgA_paI&wJ43uHTiQ> zy06xOA>)nd)Dn>|w}JYL{DXPpb{)&%ij_0#rj5is4(D{kE+d`ALc+9+uZfS^V&wo0 zWVT|ipTF_)Wkg$X3-%fYZq*}w^i-~$7tq5JCYV*NP6CnhBs1d5!2*JywhD9&d8-!2 zGVLKL2&cn=NbU@Bw)t25rowaQ|6;$9Ve4ZtG}mj~*&B&cTUtEh})X=Q`1ZXYu8wQt*B!X$+V1apif`Q$G5m^HW+Ca!EP z>?Q?O5U+T6k7QR`ysc17_I_bP6pEH)4z&nn7(D=Oxy&m_^~D}u*u)KO4(0xJMIL?O zf3xZ7Yq{w4naeW$(P(?eykmO6^s006X$+ecvB&ErZ$__P4+x0h9mnQZqu&AZO`dFs z0=A%zXVg=o&2H8PH5guN-1P(J{e7whCw6_Z)O_z?(&~Z{f|50FBlV8H!aYpRhkceyd2V# zKL)Bd#g3tQC#9MN`0k5~i=kE4szf9c)c!qYA+gYS~HtIYzi-N9?aEkM~Njm;$uCGD*Jyh;>*-if0P#&Z3+ zX_invG0;L3kd}Qqw=Ayt%P`Y75>Fp+XKfgAXC`}Kv)xf=H0#jl2ssNFCo=0-Cc4^P zq@Jc8r;k`pj;3=jCj{a!kCd}biRXtAUb9g2DVV}t%s}JvnDpmy7ek9$JG2lCvbf$r zdMi6MUO16|4p|D0dXaG~oX;;V@Kq6?Q+}Wm^vj1WqFiHp<)g41k$bNH*_d(jY?FEt;^QVM%r z@c0blE$Ck+@E_n2QS8J6)LI(m}Q zk+qjh#@G7l*4v;us9iO<;bkUY51OzA8B{eb8i&-OPJQPIh&RN!r#w8K(s=h6+~q{e zX?N{;?kw&s!t67LR4SMz%_&vp!rJMNX3*nJ8(rN>U+Ckrx1d%KoJTxn7I8CX6w;-e z{=`f$?wt%oTpR}aEhIBb+tf+@nlzQ;NvGhH(BpKs=L}Z|iAeE15tFlkQ)hy%=uo zN0c?Vr`5gMEf?eMq)|L@N4uM@<`5%dHiFsp%EWVK-UQQe1y}Za){)`k1VSm-)m)d8 z>Z8V}DMYK~7!KJ`mrmOy=uUUnyChWZJQs)|{+qx7S z7n=kR18hBz8}VV*#lp7%{^crd0avErVF~byXKPv9e8Lq<(9QTu@5HNpik`nsBf&@jA z$_<8t?mq^(QJ+)5ffQ z19EFHymLj?8C(kW?_`i@`OD50kNlJaRaa>^wY*zNMAC;+-eQGg1H0V#fDbj#2{ynJ z0j(_KJohb|3Q_p>$Qo60LWMuiMC0|th~p`fj=t%S)3KtqHwag%WIn(Ieh%h^4VM@% z@RVCFl%(5y>`km}d73CUmUOEr5k8PfG3_W8R{^(UqG+I`zzK2pQD6cjuGJ#|Bw#Ia|FF*$WtBiQDp`NMSdbs+QFOvzv4SxZg#PfxYhegHj;%V%JQfGv7AVam8RgY7!5e@mpfBB0-W`GG111_hUTXNx0!b0NYRW8 zeX2I8AxU-ZEohaH-`;KfQeN|}9vE+F?Supb-NmXuJMDRcC8t7N>(T(?;r*S*e3(E; zaxTF_3ks1-e5p`w_2!3d{{~D{cL+315QmB^MS(7b--hZ;&?7+UzTd&|1m2ZCt3 z`SS_++^%0@7D=KWWv4WEqEx(m;=3|zokQbV!PQ^pCv6lJ6@&Jy9UTd7ZH^XbxEZQi zQGG>2|MvHmolnj)&=a8-x*4KAQXX z6E?F;2J$ml)Xa$)9)e%P2vIq}P;nN(xGmE`*3|XN`~k;^McY-D1=r z_&S5lZw@-GXgSViIqCb<#JZBWbQDYZ6qRgV zF+wR6lN`x5fRey_?HE99XUUO*L)F4DajI*f?g{KC$?k+%5kO12X3T~y8sI!Zw_)pD zpA}9Z?oioy!vod~fU6CGEVv^0S4*fVY?$lGWE>4ESNyh>mYLCU8kRaX^J7^#5bbm)N$+q|3fK{anI>7}dhwx&D8cA7FM{w}$rL5;Ghu@^+LN?tKG#Q5*{ zE-4;2^^5uamUsT%-<@DlOIV3k0wwg>f+t$Ss9|Uvn7Z3bS4C7?TOK}N?bMm{PN{<< z5)xAnTj)fLLYUQoWcoMg_@`@doLI{99HC$AIQF}i_XT1jiFkK@{NkF^_$4Z}0PnfN~y^P>&Y z-kw%^pw9Iq7D_xW@ufW8nM1KPZ5f2H+z4B;ze&cV0WIO-%Q&KrIV(X!9%pELOmREOs_!(FQJ8RGO^M;;n&^YMB$nB*u6&*%dR)~MNM zXWjG+bT}|kq7;E=6NVEiT0>M5>OgU4Nzsm6<6;&WNS?cD?)&29QI#xbz%lRqpK^#K z5kfxbSGYRI8v&r3Z<$ZUKB??J{Thwb{N50m8PUsZphrgi@ z#XT?X$m)azIt|6Gb%j0YD{F?)!w{3QDW@n8f2xSzM^sk;dRZ(!2-l31uieYY^px?n z!;3f=CUuxUX=DiRHh)%=+xXGZfz{sj6jbu+ zBCniEhsRk)eU%;j+OX;@73g^}d15g2Z#NS|7KTp0-m@oWi$wRewBrm_bL-~phifFW zRbFaJoadm3zZwDFUz{~g?yI&|q~5X5CBJKH-oJ!Aj;A4Y1=AyE{p6yh-{P>};B1gV zmEDnJ_>=(ZZ#FIRlf*Cf3BL``0ZLRU{Xqu_5m23e#}BqMFagbMXSfC%#)d&t7y{EK zv9X6U9tNzbeedgu9mRyE!_t^Er02tL@6v^hR8+JXiUSllgBZI`ynit_19-e-GCYtk zVOMpG>XX5`MCjh8=$jQPX32$T_M@UrG>Wr4gIn3s%r>^Jjl z4WRgijLDKxgTK1}Wk{7qF*IX2xzm9Xsiv0fh)%=eWvIdqW?8z5qSt zbzf0tKl^tw6>p>*LgH`$2M5EoBy{4Qwjj>zRnjWmiYoTo3R>Y~7SDr(3MXYOyKfII z^xvR(-$EvI59HuFmyYY+)kZH2PF55Q+_?*|Ck$6ArUveqM0;HGM@h+jdpQZn5#YnP z(=?bsN5rRCUfHr8cPvuSW%sm(>zdL(or1V{_@hrI?tVN;h44_==6^@(5L1r#>Dyrz zmm>+-!&5qw8iLDS?MVpw3~k`zzGi@`5YPtPu`(>QY=o5yg(F?ydHVX5*a3!K-I;rr zFNu2+)7V;FMn(^a*BHkCpiJbmgj=Hx(mzb4&0RGXHlVcKyj3-N{u?8oGeLKgOiboHeK2 zB-(O$sTEQ|T0ioeF9eZCX(?Z3O5?A?!QzE|CB)a)VLhdk!DW#4!!Jf&NDdLHUZe

    ORZxA?NldtLPo3^-!A@E~$s+dVy345)Tx7dFwS9Chp~12;HSa&KHB{=1C| z#scwtjT0VC+Iqb@(n+V7D33G4n;4RI^OeU3Ftb~z;}5z=dji7zL?v#zc1#$x z)vaFrfX~?Wuc$FEwAh4YkC-EOWa@Y67*qhO_)YV#jrW9QGj7I{*Agh>>?5C}7Mlb>dPR(H z*%I(E^z|oA3YQrekSNZ+Owpia>3tE_-pV^3amQF<+`@<}B(a+Ls@EHtik9fXzwo@<(9Y zE=&qnJL{6`*E1x^sg%xAB@V4yCY*ZWzJ42Lp5k0)XuQugJEL~(rATrp471LoVF$?) z)Ji39-_sy_5w zjKvUe%pDjXnc)d!h|3w$nlp&bE@lUrt3^R|pw8n?_W>=9*Ksdu&z?*LbG_D;i%+%J zOeVDVW1V6Lf6t7%t?9y%nu?HCMh@O~5u25AbyC2X{qYz*eX#SToPMlA_r)v4H+z+b zX~~*w(|06_Q&$xXTR{(gYGc&W^lWeO_u6>t`&{IJot zU9ceB0~k^5`)f_q%-LtvoWGMTuwwO{MVU7u2Hzg_2D#Fg+?SUD5lTWJs9x z8-8brVTR^dxO1z@Hq-&!LMwuG2Ibr~P)1-A0v)G9@QOUjzJQW7bZCA%vZ=OTd&KZE~HI)qY#HF%`BrVVsP-`&~T7QH@Xia`M za7{GxhU~M?16>$%80T^@<>Xy`u)&mWXKML5wc67(?y^_E$QZ3_jwQFe`#!yToP(iw zltzZ2Jl7edZTor(PO`dhC`B%>WC%GC3FPo0SqZ=AW>xqH0P-ab|bHT2h0pX8b|D2(gB;PrHOf88308)su>C0I4iNKa=jDKA$< z#>5mp+1fJ0L`8)w*Yd%$tX@Wy`zWJ7(SFy8^?R-3{7QX!f9E^1XI6G-Hf-ZUazz|3 zXJt4_vVp&y>D#gI2tMO`QAggVhs#$C&(7I)87ST`ykE{JT(Qto zrajw=MgGT(ut(%YirGMnU8q@$>j*ZaTS%FQ*QOLb;# z4ZIwHy<>T-I6&)MQX^oBd(G2xs_P8SgiUM=nqf_^-$`Q^4He#?G+Q$6NOaMWTHRhg zZU#Sc#^q+3>mOfoV>m-mSz0j2xjq;{Nl=O&!74Y`V%(5c0%~B^4pGSX4`@s)pxn`^Yfge#5+bA zh=mjujc0j!ylE2}cIZ3W<-$8MW)UEBM}aH$PrsabhK#PQ=&E|PoNE0(t1=&A^m@55 z+o;`_pEiNW%47KfKuw%T;T!^BVALOFrq@&5Rzspwqh9IzXhS2)M*o*&v{A$G7g5fA zqJ=a+D$7U9;!kUFBg&Z}cPbK!tAJI@!by1if`JVlS!V`OhAunu{&9GRn0t0);xxwA zt<0&JB&%@o%^v2l0zWR!nwdkkxYSzmVJvi@fs!D4+a4OL-zbf5*u}j%{Es^uL6M+O zuamOE{$upZad!S#Kj=_2_TC2@nG1_}53M0qx|*&)8ZQ&^9)y@%KdyDOvnJj>aXeYu z4i}xhSp_N;-GvsfRRjq$4m3$rvIKoI+nPWleklB9u};3LBdp29hsMU3_gFC;CCwft zy2iM+>81zZB;-qDHiC{nirjz3bIHFiV;eHBxw5gbK^w~!p*)ry2gV}W0tc)G-~1B_ zF*>hA`p&S{_XzJZmmlDsS$obX;|(`oB^uv^UN8eMR!h{2Hs{K8Yb9wCxHU92CvW1g z*#9WqS?S(^gq)etv3N6>Nt;jJKI=T7h*S8E`+WZ8V zW=svW8cWRxkGoAQfyAWgzl+fswqcGl5_HB^O2}hpW`=4dezr5K@S5%OGoJrR>{AD!P%oZkE%EKyS_cuBXoYCvBfKR1ZtT6E99~9Xst=h86iIY(^O)X%Cm`b`HbXhK{yymN4N;EOVb_z)YwT zH#-)PC-W0Gf6{tbI)2eh)8F1XGf}oje(iDg^h#5S!jwCj{+iD32AC#AW((V4og!> zyVz9yf?0H;de~OlALZLT$`OFWU(_2#!O-m0wm_8M>vd1sTte~|5Vt>tgbd^!XoIey zP$dl()N*nuv&8PNJUP@3$xfSxU#1Oy(D=g0l!yw(zdK?Gp2Zq}0|c}H0+=oHslI3w z|3*AT3xVzru}RE$t_MHvIUSq{VLpC~dlBMqqWeJCQQRmUr7wc)`!0%#<|DaWT^k2wBjH1pm|3wf~gYE!hJMBC-fdZ)?p$#13X6-acmF~< zgeWl5=Ks0>?yG_T>Pi)u^zYo~BC1InM$O_~BO`Bau{v1?TIo7*7IJV;)us*fyDCDj zLvPZM>BcKR$BO6oMh=QM`qO}5Jpiw}q?A->esM9o@t5b$j4LhfK_0JQD)(W6;?ZcC zky3a!Q7&$+#~{_c$gWGox*Co=B)9}7{nihn^hc?&V$Ro++jo1WUCQZ*JP$8H!9JQ^ zpb%YJ-6zw@krZ|nNcRE_jPm!n^8NAy86*I%-iGl$L^T@*D;4!&VoFcss( zEgc>i3E(pyjGs+`NYHo(=}5ZjO-&Wc1q-za^8+T_}-u-`x-aJ)$M&DSU?QZ)l1T< zjU;LG3U6u&4mcpsx(hS%<$bT+{D$;T@DQ9Tl)p&PP(yb?_1(t4k2S;B%kPQdL4We&7OcZhXYR;UuRW z2NgwE=94#$$Vv894k!I*(*}l8dDMK}bZsFt;f2A+VQc=&ez|q?T2-5iP0?yqxHCcn z5FOh2MbZ5ChgVJYtCE@{#N1B=fJq1UjXytLj<3aX{`h6ZnxbT`SW{Z&WV6QtJ;Rq zPs))+^IO6ktE;p9*C_T`J$=zt_IPi5=i|BoD>~S9 z#$&o``$@GtJ1ym}Ys2|H7xX7*(DO$~&uE5iIy zP3ZFaa#dz1)vD-$zgei|@A(q4JE*6y_tbB`@9%?NNDk%{h?4Q)6G8W4;*>@yTnkTX zar=hwIEu~YxpFP!nQ4;Ut`0IRDn>~3Z6+kyQ1O$0AJo*A!=r(J*9%oDn;hlg!sWaK|u z738H>q0O5&+vt7wuzAz%lqL_6pE$;`=_$TGUSZXTKE{?UTV#Q4eNlNy5f~X6vC;eP zVar?IL^}QqvwNN<9++V9)D&M@mNI(ZJ=}l){r{0jyrc*W4-ebj%iAbbjxqbUooH}4 zuZUNi7mlaxe8H{Yp@$wSHWB%^MdKw!V8@OfbY&U!zwaWH1ECZMSs=**Axr2VTE>nY zJBTp?U=3MN%Nye7^JNh+5usEnkslf-lmqG&b&3m$`XUlKILOS*6L|lEeL0JH(vmpIP@3Z^}f3}I(e8SSttw+1qk&H*S&}e3GMAA ze*25>uxL>y9qlEuEJammu}RJZ5CH{IL<&-v!LqCF#LVnM6r2|T?>)7XyLk5G&`*lKvIwdGy#_(nzjI3(5CqS2q6%0s89LCN8ZARpWMe?PmD9V?HShd%D^46n-da~Q0bB!|EBq>kbB>Eu-+5C=y+<^lE)vp=*IvDh z&wTt&rcO=q;MU#j89PizM@H}-Rga;VI;Lj~b&!c7sK&G4*;xL@AYv=42@Ky5Lkv(r``>09+Sn36l=6 z84v~GqWqsXfEXi~07CEyNgBxW6tgmEaLm=~L<2=p=SYIbsghVP_0%`Ra6A$gv2LUnu6t|!IS4XAcz)5gy2b%K$<2%qgy+N3n``vNcr^Q zmN%H6A>=IzEhvB(BZ#2Rkw+mU4vPUNDKQ4}7*SQ6I$|_XE%HVk!F!HZs!SX_&UNe8 zV*mzw_wDD{i7DQ&ZY_yR5m5{S?2-V?s}HCuqD8fE!Q(XHcTbKIP5Il?2N)Zlp}ni0 za%UfZ+;xO+eeXBy-2EKRC+t6XlI=Ujd1TvD?EA+dL=(RI{a^Cj{$q4^cJkf(9z?V- zy=Zh7FQM}W(AiN&)T2Jd`+%zF=0aLf|5ja=Oj3vEYJhk@_ zcieg%Z{4_#y<_|N!;^pK%{N|)i16Nb-pC`5Zs*$9E@RE=6|KR{@N{=|@#U}mkozBa zj9YHH9ytHdc0QR`4!oEwUD8c=cYEu3QFjMp&rY!6`ZX<(dEW4(%~6}32H?SmA7lON zR&w3Ct9g3QKbfn~0`2E6ziF8+3;xuMO6%lbHX&cK1 zdW%z5qc3DxiJNa&2Ph%Hrs124#YGz`7*fm{3t91PH2%;Sh14O&014#tFeAXyE|BL>6|K8yg#=x3{Y}v$mQ|(ef=8&(R{e zL9_a)N)Z7RXqL$0RL7Y$UOcE4&XC3=YFzLj)09gtqt8D33|9;d6d^{yIQ_RMW=f2X zJSurEg~sANv%)wU9tJ56E=`rjI*mptS^!FtWMKeo-MZDbZTmI1-F7=51=pLSuF;4{ zF{zqqL#5?pYt9WczAK7ZY-vG5hcpI7K^jBj#pRMHG%+#32i|iVi98n4YW;xYr_3{riW@h)^doN%7{9V+h zk6;!#cyN-uUgNL3_Aq(mIDg$ehQ&xndmCL{ZLD10&oygSAp(N~y+srn0E~zbkyt-# zpQs+SIn0db4jg3nt}!Z=%7OqWPF0rk)D zr>8l2s>1lB@$ff)#?*sGJVnVz0zW@d(3twxNo#p`CGHJ_WD_uk{2YrQse z#LSqPnK|p?*UYHb>#ak)bB-iQNRot7sf73b^6y4fwdLW$YlU&m+vcV=Lw@G-xp$l1 z`?IJaBE%S5qeD}ZB)L2a{V&M>_pg-y4e|OV literal 0 HcmV?d00001 diff --git a/docs/images/nut_layering.png b/docs/images/nut_layering.png new file mode 100644 index 0000000000000000000000000000000000000000..ff451b4bc4db1e403ab32e20d4f2213fa1655862 GIT binary patch literal 83521 zcmXtf18^tL^Y-Tx8yDNQZQJHW7u$AnF)p@k+qP{x7d!8LfB$-Gt7~ezXP$a`W@>i3 zxA(WAyaYT9HVgm&fR~aKRR#cnCjaCC3gVvz#z({WUjuYfmJkM1Pvf5byMZv0kq`xZ z|99nfl_dVtK-)`dIsG&A{3k&0SK0S}N=RoZIWfp}7+eGbZu;RIsedXgXE9A@5jz_j zQ(I?%h@b`!d=az}8c30!M#phvmPY)|I zU2CG)8w>;=%5>r$IK!Iu_6%jodRt(jm>e%7Bn}r9bCidrO*3^{Gj-Y?+xk3z9=V>J zo|ND8@0atjm3Mu6%vjmc&{L~9U!ox;4o~uYqLu{rhXokI03N{n>8A+b2dU&8A{M^! z%K(bd08@Y>2!IA?sQ*)_Mx@R;uny`ly9-tx!v6$l_yYj-mn&Q)b04*&_75z80kjt} zzA%kgN`1cdvh-Yq?2=@cB~59tJQ8;@`+w>=5w} zVbM(aKWnExL9^69tA;%&z#Gb8$NqmqT~K}C0EnpgmRJ2qA}|ME;3pvcBeRDz#hju4 zH<-wo08`m zxY%nz!VY`C8s!;`Dm`?l6_8%W@D8f~u`OefLIiw+`FjOv|HH&E2O3fUOorWuu4h_h@su=f#gt7{by#mGh-Nlj*%aqxhCvE49OCdlPM<(lRDd>^V*_JM2hIPOoUN*m`_~|1 z5wXz6{U6{AQ5*^}^x>WeYoPjs{k?0+ep3UaMKDe^tJS?d*d>V4Cq{e zg3_Fj{Cs=3X(>Yl2{4%r2=sJpAg$JGcs^Ukk8fkNQ%CbRLA52RN0XheI& z94N957&@8qsQHELdLzx1%BQt6>{?j~${G7(lIAfe61%r+&nu2Bjlg zW!#_PByDKboulvF6B#p9GjP+~}kO|R&H^^bZd!QIhtP@@UH?TbPXtEDg) zNx5fc#Q@;Xg&rilw3QUd%2j=Z8{eU;5>Cm3NNX zq>r0>*C=r*D|@b(*S{p*sNqv4QKUQ@IYv9ch=iF~`ig}-7m32SKNS(BeLI+JMfZYC zSPCWBTl$*TIkOgAf${66>9~ha6PO1nV%|LyL>CAHqUa=m8*HYlb6g0$QS6F~on*7l zXS#DyL8#Z1QQQ_hD6^UMoNaHf)e=!}69geCL|PD**c!7&z zmQvtCE#+s_psgeyhm)nNm`Hk!#>lSF_sNn5b=~3cjSneD9GRf5G79boe=VH9<6x2$ z+H|&v*gtmc5KA-mRWgf9tSPN{?H`jgG{yYs;RZXPa+H8ZTC09)4~d{DK1oMa>+WUw|$W z#73hSJ8!H{A_lIu1?i#IVSAhnuD9oyr*_rCdPbt)>NpnmX?1>lh zpE8HP0EP{L#*0RnFPN~ar0zcO!GZ@ww<5sS=3PAV)TYVb=WJh^i9!K%72IfG%06(& zh|TH@%}X)5a{8an`jAxRJZBIk=C}+kdV~`8T8nJ<)N~pzE-4u*y7e~|+x5z4v-gcGo>!4KbYcU0)%kQv)}Jk8j}ue>@W#c3r#lSRQu9&E zerL88TRz4Wt6>FEyO!?l%m=K~*Yh0VcbH@5iGpMM$MT?dA#}v$aFnd9$zxX~qWkTz zodu4GU%3fr;YG7g0|Qb4&cmWXX^Z z+rtOiY&ZTfQ z;;#B0R`=H-tlux1?DNXRu{GZ_#j3m&2+(|i=#HXGEcd@Ej197BW2cv;ahkb~x*)eA zehH>w5x?6cZE?BPEulq+So6Jwat(2c{t-n1QozA5f_sNdDK+I{GvpUPat1M)>pkw+4wRNAb4T3AQLfN2kyB)CRQ~lqiX?`C9en>l9lVP+9||63 z%N$x@N5*yKpC=8DT(!NL8S(>dI-z*1bKcZ^%TpSV#a7wZni3cw(X`ylVIu7b-ET5X z4L#5}XKaak#&00(6@z}9kC^xRL8DAyWm2qSd^a@_)0JOkR6Lfz36CW`S2^Er43jlj zQFm{Zq2V?F7oIl$W8i#W1jPB>jfB}pa}6^wgx4}veUc#|iNTC*^%?)JB{(*j=KO>O z=aTJFH+nI)YF|bqu)2gYBH3S2Ky1+)_%(|p9Zbwf*d*55tTHEFoCq&Z)V0smP_Amk znjGG>kE0^Izow+!Bid&_WUns7Y7f@OhFv|Rp5+2p?J49xwhpRI>(hr?rM9B@7NAsf zRy2oIU$EPQ^bw(SPlL7w=&2up})Mbw}Uhjx5F#e*e95j`)JS1sVGkZ|_bD^Ygu z&3=R3l6A9q$+Er4rVTq1hiJLTp~N$~pukBMK7a3Y06PA-U;8ebjL89}87oMW@iMA8 zOL8m$a9|#iy)v~T)<37uVo-vXz?NT3<1)_jlfr20cdI;W8Ew(N0lHe5VLaoZC0#?Z zpD7cCp7-T;&$Rar4^V>+#jyT5JTxMwK6sE>9d@lliFJ@I2wzEw^76C#TnwVY!K5|p zX{B-wD9Z#Qg&9ITxEv603V+7_LnJtnRV+c9MFQuC$c3j=#T6N$^qdZ1z_O_G@n5)FJoFDtii(Lsp83>#ZS`+g6FsP0c( zpB-!IPTIi74RTrIlO_4yrh;0zI56H2n}xsS3=cv_mi~e<<7aTQZ(c%R*xZUFQRB2y; z3AZmV7FDk3UI_Co@msQd7{D}6H?N%5WU`^D!ROI69%PppU@UUz4j2W-2YL$S+;(Bi zCrtBf<$?lcCBq4N5|Rf&y&pkDP=m?qZtrW@y-LGWD>ojw?@3|opCD;FsJO#C%}WHt zT8_enpJje7={MfCSVgW#r7K%FJo0A!@%%mT?4>aP5iNf{Bpk){q5m_=F$xnz!{6RZ zA@Eg}2}aj=i2A&_ECKL)xu`ufYNIk>MHfDU6Ab~2T@6~AM%Cr7bcgYXehRL2 zX}Ru@=xi-gZxaN`?8$byUIQ^4{@yj?aI}_+tKuYs2uWbILz=u?$KW-E3bRE3sgOfQ-<5syv6QIflq}Fnk8jjfqT(W- zRM^N8gjH1?IF^<8$*WmWueZbkANPn@!zR4>8;+D{`sbWd1f_ppyZQ+N(rCnI?y_N; zxKN^*Jfm=E+&URvdE^9lVUM+3kfL&jC`GaEDU>OZ#AcZH(#|;b#(C_1HM0`yGh#N; zLcIaXKzXg=dz{EyMQ3aOi0*QFxULGjhVQpLIM>-!b zJnX&Yn3+r9Txme}XQKT~OaZICImFXtQgDYGs*;vNm4N_60lIkXO^9a}K;mwk(9aK= ztp^7RFk4`Uamqu9f~FPPrGuy};z9=id6>A4E&?wyVU^~zR~6u`=g1kqiv;=;7D!;6 zGUf7I>$at-rkor9MaHBh$8^4fvR|vTcej$C<&fIa(4DA0ztX2X5%qCN5`R*S)i*j?PBVV@s@P@E)G7W9) z`9dMz}vA-&Y?Lfh-_ znydYlHfmLCiuKJAZHXlCgshj-e}k}K)g{69UlZzU72FYKL&G(r_SyFj{POS_@i_?D z@7LDmwQDJ{Yd^dGU0FOI5$U@*9RSGoI? z+>^kX=>c7K7&AO!w*}P%B(TupCz=xK?mmvZsX=F3T#x-tiTCCi=-)4lYEuaW)PsZ@ zjoCN{(A&j(g?Uq%_ zWmO4~;tj@RExBYVokC^yFjkNsuJ@s5N1t%Z`vAn_eOdXg@%^wurm$zHLvgLK+W!qv zdPt$WO*m74B1M6-3uC>~cJw?xoPnRo;PWaa3k=GBj?H*Y4>4=t=>(swWD6d&zGV0Q z*{AAyM@ulDa<-sGk3u$`9UJk6u6URm=i{->YLyO!Kp6=2_4rs|y)<)i)@VUtEai*! zNHCWo=XXcKOoqAJ&qLq09)aEZ7}B%v_1ry(XtM?m088`n>J>5Q3B}GrFOQT7fQBu%1bRnAj&Wae={YNY;g!O+Dmdn6dDTm2w`bjE_#0B^W||M zOkPu0YNbyIxO?#Td>pH+Rv7HiZE`)T4XN7|u`pmyOm|!JzTYizb+$J~{CbiUGv|Mn zvRgc;{k`TsBICBZ?onYekr3@XWxP_rH3mkNR@UlxY{Z-n?|e_=H{wQJ?k+TK3kGOC zYoe%qF3qd8euGoirRRLk)?u_d1$-PP_xu0|TGr?@p6^>IHro+Yety78UeDo8dz=!L zQc(wPMPh_yF*Z;Jo^sQI$P@oNWz~qyg9{ncvxxWB=hrE21N*ol`m1QEr7z5vA51fW zVNEiQyN4_dXPFZe`~UW=qHsM{IOnMxx4$DmO>OV?+S?Fn*3Df2lhG5Y({o;R!3I@p=SHVyt8E3G+9E`00#LTOx5-RwYu02q)TP|7L{DO>Env%HTLy>BBp7K3;YL4QCNNF8v@ z29Uh>cm3ikTtCOzoA01EY2o+cv3+$x*>YRQ({Ux z+?tPD-ki0*G!Ix=@QL4!Z0QLoM0WSCns?VFh3&Y8lCu6X+1^m>Gik6TJKmswt~X#O zwtaC}H>W{jprdRyHh5+Vi*%WWOsJ_7lWLAxSv$GAn%Qsf4}Mgzt#++irYTe*N+XrSL^!h1Yyb{Uj~LnSici~s}5Y83^-FY+j`=_E^?>b&0Ok z8wV@jH!OZ9JwDGgHkz$5>~#7HDD=E|zq;SZb{;0Ewf}AjbGLG(Kq%mb003t`^@fXo zq!>?*p3SFPoD2_QdwQS0-Q(Y)31GX#V{f0zSg`gw-tqlEd%h7adOm(cwAh7pqfm%@ zLq9|T+b7Z>MV9o)VU(3gd7&7?6~G55yW*}W53?iia1dY9*BYG$famih@IU}N-9(;E zh3lN(aSvf<*9+QS{sx0!(3&6skml2#zi=JAb>SBJ^zK|MB1u}}cU*Adk7Lk{*n<~o zbhH94aCL0k0+Wd{nUN%77KsoVdmSSxs&)kLyj?`1^>m6q3I-tx7O{Cq#O-q~x!LH5 zc(tQ-ikG-`ev@PHde2?I%u&_rxN?+Gm}Iz=c|_Qe!F>H(xd9X*j}Zj`giwE;S{&F< z^rIa%a#Y1|OzHhtJRyjQ%7>cNqinu4YNM2-Laoi3kCZVkkX`8EEaiXOon>S~%r9-u z`f0A8L<*ed_oM8%Wy0{q2Gf|yeD zp?+<-@KnAZ_r$T-`Jxn0M(f%L?)Z!<>5M|~?Uxxpz717eHFxBcl}1tbV-CIVjN4)G zgLCHpuJ;-EX~#3ob!f{a%lH0^5YU^Tb@7sTvq=tzzZGVqoeVl*R<+-h#O9lISULGu zTV4zjCaU2G0SZ_hoci_#xKLqyMY(N1R z{qEK6H?Fq%rJt`u{^)n*!;%xeGLljN(DyK9BaqsjEHDb;HMq=Od~cA*iqf?|r7gt+ z4eZMFe)Rpc@*GnW3vtVN$((WbLCXiE zziH!4X4J*Zd>N5xprJ9hlke?oU3m1q?>*B3B@>>_e0n&t_au*B+yKl1T>2OJhLdEP@q z-q22fOJu9v43Ws;QlOF|%k2uwo$-Vah=h90P|QUzO#*?7?$Z>P*s!aM6Qub*qhI>9gwiO zd0e0Z{E-$_uG^Ptq69RO&0;^rGKOO87y}8_6abUFYVyW>qiDW(P_DpN8`|-yD#z7q za3gcOCu(=Pa~hx5vN9iC{kpwQzzA7jNZ-AospskXM4^b|!;$8-$R7+~TE_LTska^d zWz3EYEW?d!61-^M_*{#00z|=uCORn=p)TET$R-w-Thh5cNLh5Ns#%0|gU-)c&w2D@ zu#$DC-K-hE=Ze#KeB*nJ6Y|zJ^eQ+msVxoEu%s+J{1PbPU-MD4n-|%x79s60;j}mx zy`+ugj6+>a@Qa|1qz7e{#A(q985~5nZg*uVkY8Dc!eu1g@^Vv-KvrIu($rfc<&A_X zKig55RAS&gBYQp2z$jbUb|L3^+$4{pnK(B;J>9M&`LQ1}e6CF>AIDZ2+X9XPHi|pj z0xux6$8rhM?bfd9{#@WQZj5N!LLHn(i5n&U{j5=g5paL&x&monK=;*r1Uze@^GhMm z++KO7zueIi1^^H`aBy8Ya96kT8!f4ED4S%6%^$HDDKHIhp1f~jFL$yf%JdStY!I(_ zFF)N}q|iv+r25QXh^bic5bP!%pL80%2<+8D2BRK|TSFGWC7v(gt3fvsxb@UZs3j)Q z+H^t*8_&%7$?XODZtSMO-=cN+oPDxDA>gF!(s+X)LSxUiVbYZjyjq<5kV2y`g2cim zx+bhTmY^ehbmV5X-q3Ttk7`(7%NOdZPC)*g-~okD^S*=Uwr@ORCLyxcz|cHiuh2== z#emf}2Tz8S=N)ZoMcAN>uvtdfv^>pPpRgI8pKI=YbSL{&3fulxzFHCp z6`<$T7ly|;ET?aNo1ut)Pqf)CSE`*)1a7-nE7?01Mp|YN_;JWXpa;lAOt6}2s2DnD zQBqr2tSRrUcj-j5skT|3bA|!Xa##o_2ANa;X8v+rUpAjoP&fey0O-nN`5M#)5ztlU zHy)#noDXq1-)V_3Rk)?MXc!D(G%zQit@bd5iD$WSORkd}Jd{!;3jSgpTtuV*QDgLU zFp=E_Sc>9*e1&H$WA$|AejE2!GG?yroD|P90TA}`aZLT0!Fq3g z&#bc>ztA`e;n$4PwyUz|+T5*e%bnS!y;<=IedujJ4^4GYLjzCk?fhg_T^4*M`t0&^ zJ6nMSlL`ziPd{F2U#AW?m=XKYXd#^uyW{=Tm0s@mNyp`KAfIAv(9P4laGN0wP}E!z zoei4F=-zHVqx3s1V;P*N!5fQ&so0CSkYFm=+LCVl6?+!KvE_%bQST|B=Xd}{E)7DP z)$kh>pzAb)>gujQgf~SKa>&YpfFl6qsD7fnkvs%u8Wt;fefMa;cJQ3vS4hz^1#u!^ zPl0Z|1O2Mwv~KgVn}54%BnVgBMnFoKu@vH_e_!Ny z1aGWmrvAhCa}P#eOGZ_;FKTBjrKJw>xo}ftts8BQ+aQVK zBW1icjuM4Be+_%!|F%wf+m|Vc5D6=0j1+_2Xij!aDJf>~)HMb341zFYc#Sl%aTfX( zI(zY(p;N}e!HtW{4ard#SdvAU`~S57#8<1zl59!vixqa*elQ*Ec%&s$&^}?#BOCI5tipdm;Kphi^uNOK-`?1s<|A%$>vJ(>$DkEkofNEx z1Ij_L>N`6rPZvzp%9egB!+={uKWacx_xWvaRdqhiYnD|`?!_~4`U!P=t`+%&^!Iym z*Vd%dx0lu!vP!pJwt(P&Y*|fJ{M3`dH2DRNRH<8=WZ-dPqOPVq)L}w45PUCw(4pWx zP4ZHs^Qo>s&5!MSJf^6k3=yriRBPJj=y}>>x4&wUm}mHo(7GGIW4}_bwp+i}YrYIQ z@`p9k;>QyEO?~T!Zeki!ZwP_g6u0}}RduO)QZG*PVSDDyWNC%fqi(vWmf97z(k!@p zBvhcan8neA4yzx-%^HtV*W2-2U{fEs(=XeTu&1Q^^9b=CBJYoNBj5GIKKCavjfRK> zZTEAAobpFDIeqk!0dS3N7krrs+5Uunm~pMH40PXnodxBQADp;ZFF}ww5s;@@wxMP5fv@q^43l3zqVYQ9zl7OuHO9o z}opaL~OOt_Q{Glp{6|{Zj5E4wr5}yU* zwA&VP`Tnxxr{xJjJ6=(qURLIR9^w1g{gM{o_jvjnGJeXWSEus~w%Kt(iN~*q00n?| zL1;C*(;1&d)-rE4|GE6D!o9Eihh;Onk}J*a=2lLri1_26{wMS7mE(fM_uDj24a3$e zIRm%m>1b>`1P4zTvT6jYhjx-+294o;G=0#i=`Q=cfAO zI~`v>9&_6Km{gmVI{kA5)juN&JZo)`N3)4b@OAl|iakdd+%0o{PQ2(ulr$In$nWEH z^r+Bkg?fC_FOwKhSk~r9A<-UsJds;WW}LSK_+51_e@OebzArE0uoc6;A70QD{T11^ zf8T=LJ`p)qQHgo|+qteQFr5-MTC+;S8e4O;#)s+Qt|?|c{3o8_n3^%zZ1NN4-qWw7 zO_Gj%uhNso4-`<@Wbx;tk0q9oDgYD^XF2i~MBu_kE^Adra7vdB>)UjN#M!(EZC#eM zf~|5FL!~Ll2Ul8lGE>pr1m_ch?Bzg~bMfWao3fMl%JuQOG*E!=dxTu~xXe?CuH`Rz z>a~M-4OBP1h0I>;xq->r%{r=n zfh2K3%2k#ATfE!k5R<>j9SWyx=oT$q_=wT)qTw}WEKx`f-Ufcrv~HdI9|YXF*Z-Tc zS5uVJ4q2Pp6F)oF)EO`+y>kjUTU5Rauo2W44&N#y=1p1YTWNDtIIvPm;Ehu$+{lyB zx|#lGgK`mV5Q#&ATHx$^9M9*#kGHi=N3nNKT3KiBF$J#9^3J>|ixM91y0(k{lbS*5^_iY_H1IQ1`D*x>sj+1L&sLSDuFG8w60X5bk?09m3E+b~&}a zJlD|=NX6?IX8y;AvulCFHJ;xic$q;{saJ4=|MLA!6^>NR?|P@A`d77ooo{{GY!hkC zbWN_pLC?=B|9XBJw~&!_eTr(o@gBT>%v+s|`$ZJU@7O(0^`SC?DW+Np?8_DVv| zON`&P>R#ep_{_|Jyw9dS?wLgD-IHF zi2)IUV?SHZw#u}s^lQI;IO#M{A5j(ZKx}StptxN|7$Q0!->X*;HAKXvDLQ{|1#0;) zC)9w0Gn(1?TgHYkbhvr}J9C-ss}3CQPWNh%Rb1bOrg{WU2jfJsc&53a^dMfEGX!n$ zUjW-u<9hZqbdRO=te+U?Ii@unOkXCqvC9eY`LOm}sVGUE%zGF7u`s-{kp=ky8G#3o zjH`0O+=AU@iMQ$R7>K;AawuujoZ+z)nHD)-gy?W8`9Vb_UH zWR+1zm&B!3qOXdfT1FIC_O9mQIwH>2e*-o}DiQ^=@N`QfcD%wqfU+RRt`_p+;6=Px zN?F@<2S%Ho46!OD3mh~0M{JbEA~PXtO*7)k)2-FwYPG}pR_Bch+Eq2?UH^{q{4m1Y zxxiaqx8>cI1mgSlis8X|J8sF}a;6P~!5Q3(=rq9*eS9R^}7%Zyea}sxefP4H*ySz>& zl8y)K@aPRXVvDh{m9M^?_;br3j)c-_~REIi*=#>>1zMAg!hPj}nWV(Z+eyP~qr41JK4SHuXLFUa{vb=Gi= zx>z0>V=nSLuOgb9Tvshfn@&6BY2&D`zD3pZf+v7hZ47Cgw60`4 zl_MJZ&LKq+Jmq*83Gq7Oor<~zxXl}x9+-V; zJK}NNxjqz$!eBk?@YOzDIXn@3wv~}CClTEnukc1S_Y>vV$@au<4>LZ2d!DM~Z&>1s zJmP*Tqm5&hiid769JgIzWZTM)N?P#G zO=_R~NwCqpUs+1VtT8k2=hN zX>06fzuq5pU^HbXP&Qz{Yye4S?prQq5k``fo^-_w<5g5W+B__6unqQi!p@K7H4e7I zL=#8yt}c~Jh7)Ieu8a_d#X~>2E5w<2xowFoXo~U?kWDNlk8&?=Rhq8r$O_pzsgC|w zlKK?OhK-8;cVK}%KSgy&|LiqJtJ^P?;Tf{Tc9u}myNWGeZ@jz0h2yT9NquDlX%5R| zHXx6#3ScroXSTWMHJ?-~@i`+PP)(Wi;%m5BpQ(qS-7>HF_W|Y>uHfjc?6}ZLo|*J8 zWpw)a*NVo7wzf`+ix8f3hO$AH00|cMayp#(pC53a0ePrU!lfUsmRFA!TGND~1WG3~ z6UhWM%Bt&hI7iZD9Scmi0giplgGAawL3FqQd`2nEoJ5KuQ^OvyBA&`C97 zj=&_O3dS?#+K<8YO^-n-b!FraH?q7mDXPEHpIW*hxYtH$g|@D*#~PkeQ^fdQOCIzo zsN^+In$%^+1R93=>v1a?N#pfaJcQj^mR%lqxYsW%e_l&7eP)(AE$S$jFi@w00BXeA ze+~kwu0uK!I$}<1*xt?)z^!bW6#P_Gv=@+uh~SYWZFx%_QfOt3t|8z_ropP2cbP$z zk-9b~KXq5-5C?qRw^?{_k)V+Iq@!Ehbw(5EWr1(u=_)#1VL?A-a_DUMeAqteU)zxR z!Xk)Jq>!CA!MT^HFx4dXsiKWqWX|WlWn*JBfaS1wrakE%Q}PYHQhCx20cFudrVOxRoBlv=<&v({1iN!S;rq6} z$|V-B`8vKCsof0rtG-PF4dGjvtfyURy0gn%_WP3cg!yZ!ckzGKiCs6IjMh~Vpa^ZM zMd@ViS6C`mMU^z?M*bIJ{W)G;v&3->^#3iNxR+Z(8Z@YvWn;Z?BgM{@bL%N$ZPLGj z>1i?zxfp$VgZS`zJ&8y>i*8yo@zG(kBNfZsSV z1g>C0smAGt>=-$_|1nK;e0=p;-V}f&#A4I^sl7ypsoG&to8{6|u0C5#l@(pE>8^M{ ztCbE`Ee`+Vmn4jcnkm?Ia)O>OxTrTAg+MGkA|rV&mcdTY+6R0PI&B{!2LTBnXd85M zh_T4{Wh0@eN2mUQ;k)2CKHr|Q zyM8r?v0YRUUu?2ls?}YL-L_nS(|a z1avATd4T-+@WVQOp%nIrPm6BjO99lUk4HA~04^cp=phE+{uxa;&h@LWH+g>uc?0|f z1#}qsA-nf4vC_TP^cVm5a$kd)0p(vpW5CY4wr@&nj$b_)R5`@%;y#61DG>WSMVq<; z;|?ao2?uI(%9)x2zP15hL)9u#f@@!xt=Vl=t8M#~UN14&HZ0iz3Cv71+EADdJI=#< zgCDq@3?K!cSH2(;IrGH=nd`uCG`FfnVnmFf@=-do1B|PAt;sW z52G$$p2XRvs9a?fF_FYtu5{|FMYlkjRU6SsR_Z3!=K;9A`}+haFA%LK(26^(-u@|s zCfa37crHiMMtC|V@$wTY@2sc7-+Mg-eY7ux82n=6yF~=r@!K^Z0Gl8H_t?W5ygoKA zN}cc>`c{1hQjJ!QK@T(FvPERbNdOj37YJFgA1FePAy5tzp^|ugs8_Ol-ma$@n;$R| zVrwsC&BMzgR<@Z{xblGf_!f{!G~h3?*VT_4{(dcgd#xzAvxVRrcCWG(m=XBs)-l-)${dsz8TdDBPs@v?|VrgZrU4)3cj^@OEL;{E- zoAd8_D>7EEQQaGRWU9k@+= zFHooW%mZoWBP9&l_5^*JOKcXJUb5YEcM^_n&cF-fcU6_fy!JG2H2+IqUMZ+$A7P_}=#tdy&|Y z&8D4$D-+gZ=eD@{CjGh>gI{VSK)qz+QQvi}5K?fNp_NxkFDj{D{nPWYH zv5LkN5+iWiZhQj!RMHo1%l=*T??Fp46)*+*-+v&(5T+7V7W-O3Yvn~9t-VOoZRV^x z-GpIoH(8F@y==u_Z0&neu0Gn_oVb~ z?ppopHhwJ0WHA*>QQmn_8yQJ%xXPc+E1u?Sf5(dn)pV{g71=I_284~C{^ABfL7jsOT{eWkANANatqjj! z#5)dc&Art*?37?t&sUW}TX2*Irsn#u5Xa0#3);AH1lvT~oZc63q)ZTeKAT-3vapvo zsYMGBn9XHYo&S*;fvQNp-Y+13FfI~XQdQEH*zzhOLK6Jy{xPkF;KuJzR_i?NnceeE z3A9_0GN^;PM!>kslbitK+^9s6!OKw5_~4&{8_1@LW0tS$|Au0_^rnzuh+z#+mkmrd zs;&aZ7rSsZA8Jv8S?pC|`}`h0eW5GfiR{c5=9H;9_1$=#*=D2g=`@%%#jQzpJhZX1 za>R>{+dw{6!I2n6tJHs16sY=BB{kWpAmm5G9HoZcPdsQJ$h8jyA(|#M&&VC;Q5351 z6Ug0uTUi+V?yO}jjdi}N=R5yY(4!ti|elFx9_0l3zr)Y>l~x{s#BExdsBX@>lqEUEI~`(Zukii3y^Y+n6ZH0xr)~$eq->BNIBQ@D(Dj~bSz=pF&*3N ziLyUfxxy7wHA|x7IEMZOs}2S@S8`JwSE9=+e43tw`tYKprT+6MLGNQ8hrE6cA)QMCR z`TDE(vIEb_9Mqu~y}aZOf7ko!{RqyFewU{ulrzxf&IOx7`N&nGe)p-MPxxZ0e3R1} zaV4W7vH(0|_cIY#vwnM^aFn#aD6Wc>10G#wM!}}f|yft>B_c4XzR}*{cGpe zpr|4XDEbbZR&2Y)@Xv{3*Ce-|G>?3k!{MzQ zw-t(Pj80jN2arF3FI0h3TH*X8nMy%*REv~bzBc6Zn+_u$(u z19H=byMm>~G~=&^S+D}}N!qkTDh(U<=9H5!YXXfU^n&oMrf_9*XjEJN4bLi)tvEkG zO;)8^Ky8?KMmD9n-Vxr zG`4Xw_WYy&&lPc0@B^`eDXQ^OMzPg8Tt>6+;-)3`bUxz(OR3o~lby$j=evmcc6H-r zbF$XwoRr80j-LFi?p>-W#0>qVb!=SL&z**)<~GuN4~Mf<%5rmy1g!+h6N4@V){9l8 z7pwGX-hh_j(3V#UW_R5Eng1toq8jHfF2y8 zFMs|S`6U4WV6WzztVzEMSa93T>AvsySmT*EJbngpRBq1vlaqcz%*ijKBIftVBY%Ls zxdPKB|D&l}ZR4e+>0`e4&d2TVZe_0vcFck5D9yvRU^wwwPoL>NJLM)&+e%)gN}lVa#j-ZIFPuOpDOD%a_|c z>$yA{$`>LrY6RGtVakLJ zzwW4B!vvwFSG*l7$S0i|T*m`U8yTIEk!b1#s)&xjJ$6AIxAEP8QgC;_?FA1z_V#y6 zOjhNJLq_TDZwK$n4$l^;dHCaC0A|#4kexvR(q^DgR4SA@U5Mq%ym2nu^^DgdLUuvS zu11h@jRS$f2hy4_zj9e?IgZ+MmI_Myh09*mp$r9fB7}3IY+K0nFuM*!63=9QvqIsI z3nuL{)ZrYQd2V=S2$)-&kQWAJ9=db;Wac4CoPuurN6qg_rasa?;7j_%Sy1Tp=cUWc zO!0xYzMS87l!>H)H7UHyjABQ|F}_~rk~GBqEY46Cs$urtH}z0LHIwC27un?4-5!M# zaYTHqZ@m{$z)kkGgs+ciD$s~>)c2123+Z*3d|jtm(sR#2g_j7G$whF}IXyQ)H(}nW zaji};g?C9A`MM+C(}OT#b-1*qVQnsl@M*_0FqIaA>d4~n zpZ-a>m(DG5*KpQ2o0xr5f=I94Da~Wyly7qZ5rvvqmWeSbs^_C+3;3S5iRB^!cJ*rf zz8=aszG(>_f*fO)ZOf;-cd-|h5(Y2b#ktGlNl%ona^t-aMcuunOmND?u-JjW@bSyH zylREAm@aBJStdsH{eDLI9;GuMea<|2%4ZZ%;A7`)G_)ko7^qUV3=qH-NVuU8`0b-! z6=C>UAsSXo_R~{;yE#Vu{=Ar~V69>U6WZ=p{@RwgH>sH*El)ftEl|$kInAEEg2;CK zVWz;1*6nea#@2}BQs%*i)3in1D034EJoCPDr%)P zaJ_|gzM$}Z4QKnBPy=S2h-PJDf5)(`L;sF1nUiYXOY!9sVzzMpX}LkS7t?y(lY6`8U?7P~#7-0oJeo}X_%a=KECAS%Y_>X3tUVFO&ub^38$38TPup}x%0 z*qp6Hp(zdp!S0iiU}l!4N7w2mK?F&7x=e!Bs11Zg{C@zuKt#VBB>;fFgR{WaXot$; z3W(ZrZvO7>r)&TKAOJ~3K~y`)7R>-FKl*Wc{&t{NK}mnyRThc4$f-g^2TEi+fZQQM z*iRs*4zo78zG`713T@Hec3mIs;@?YUr%UyQhn+5!epym1KXlJf?W50Za`-(P0$5BM zxaEd{nn42+1x4YoVN;p%!;c4K-h4uu$)tgM?jE7-nrX!K>yN56HFi=}4l7p_C@Cp= z9Dj0_kh`;t0|4j^BHVi07)}5FDXhG#k-qtIi@UtEfdBw9x|s32^9PB;M|NdymjVms z?NTDu9kX;r`YjJbcii{a3jD_njTtgq`LlDKmP8iM| zfB+ND7{G40^9@u+)#z7Boi|-> zL9fCIu*>2P{h+8JG-&OryMpmPqG*)VWGGFz}PPaZxjU3li{({!Uob`byox@4O1 zf@uT1rH0@8;3ECW(`eUV|6iaE5T- zbJs|Ddy1&B&PuO;|CmOU1ONaSF<~%!>ixe-)n&D?WBp!!-TjvdSN!!N0RW)i@IH9+ zSLN`z(|=YgOR7keM3A%+Joe$^LRn!c&HZRL&t12J3>HJD#G8uu9)RAXhPSEb z?RK|91Fk7LQPQTREG=jr(l$i$JFURT?wbe36CDEUH1G4OXhvyf&$dPkD28kv9;QfQCjZc z-~D*l{m6aUy1O4*>lYD$JJdM7PgR-i6gaFsEbCL5ZaA&ef=O_+S!ne3LwI zPzIa*-F7)=Te0^LeT@DHOqzPxXz`qBBZR+R^}fq#cYANV;qG(9g|j!R-%Vd8BM=lE zD4{Qx{8RhEOS8Q%#;i|%RdUwt;Rpn$O&uc)9owJnT)&rJa_eMa#r*Z^x9`kV064mx zF1Y*Io5UYKoTv5~+6ya7swj8E9`3X|;K26%9D$%qj|`M_8r;2ZCsmhKQC`k|!YIxk zZ3|Tv6j7J{y%7;3o@e7{32_cPDbcPObX_@|Af)R#sirRPjUJMrf8fFY;g{{v`ER2Q z!1=YSu59Erm38Q`a*iIUA_PvJ?I3x3i>awTo^LPFo=eoR8pG%r1*g zcb^&4-C}z0Dz`N!Rbv{Vgql0ENx}xJ+*DH6cT+n8y#MJw=gMEET1E~_W`HdzM_R1_ z@BZJZhTc8RLV2Zw3k)DFP0s)Tx@VbL;gJSjU+?mCM%#1Bf@=IeeUex~K`pPYwsTMJ z%BBrR)U56a3;^KG*Ot2;e|oak?LLbZ{hX`JnYm4=ud`D${@NiUv)KJlPSgDJz8S8P zq8h*KlAis#us#F3!s+J@7d*GivI6OuNocKa(mgvi?)NIG(j%4Bt#=0QT)!8(_3nbp z=B)MlqIay_&GjZdB&1ky&4LYl`1ql0`kD_kJJ;^wOTS&hbJy?UWk3#_TX>)moo360Ay z>Z1VwIQQb88vzKexVW$8;rmAm007n1PTn=s#55WKWOtJu=-VfWRaV-SKwRqToRpq! zL_uJ{Rh0k$vbra-{d>z*0Dz^7_9@Gj?o&pM&Ju38b)05!b{FBX`(`^s`R_cGl4iyi z-nvfv`FqRUTh|{_1A}J`bvF8S-WGN4jMYj&#cNDXHDi-MmIqDxZ>+OHM)y>2;3TtW z1`-k28yzIO-SEbP?;y<%+&nUBtl9soeGCe0?8GhN5ol(+IB|9P@j1d*qn z_ts8_bD7g^-@^h1O@IIg^BdJZJ&i)B2mAD!1FpV(ENs}2B+r=ul%A$Xo2|*ZOGwb- zWf%9AJXXh!U6o2*or~Xn=SZ#5AmIh)_mu_?O!4;bTdq21d#TDf!G#wOmH+^TW@iYa z#&i?buFh9QkwLfaiHxfRTQ?t3f0?^WPD(Za0DvS3aOZtzXj0S7fecNO#NfrZuhDMX zn5X{m)taDtCs+TvOPzN01RRu%2PLF7{dPvL zu6XgiSBFe2I_=7-IAGjx@847Iz5%=R=>Y%$db0_pJ@6OQTfDm`A+2Y3C_QjEs#h2R zV2#bCNepVC5Z@?D6OI_0gMRZAWkrn-+B42fs^3MrbipxAZa?fv!d ze|{k7`qtr4=>1RkxSo4_v^TqO=A1+BkKQ`nxOCn{W}{JpALkyDd-qHb007)>6&`$K znf>`^Pt{*@)gaCPvv=L`Q5Na{nR(0h-DI=r6%sl~uSyZSVm%A?dMbLhJIh(mv!3Yb z+4$K#D;88NC!m7Zks_TyDCr?R+sj*Ket&Edb~n45O$d-OUq3PAeP`xwoBx4n5e4X1B zpnkthF+%7+Pp%9A05upj=*sJk5mtP;RcVT7>+w?taihlO;!$IB@rkF83kz6ZUu&lq z&V9`H@f$xVscB~P_KJJ7m8JE>VAP`8>Lz;UWzPjV>$=b0SfLIYmW^Ltxlr_b1GKrW z1s2}?oD2YT#>rE-d6%DzYb)x&XfeQ^&AaK=U$>GGlZNBlp8G4`w7-#ZJO^H<2cExW zp#lJqJ2W31f5~aw7cVZ3`tdmC+*8oDAAg74Yd2E>fK#r&81LUxO6vBNQ=Q2Gr`~im zTJ!1usNd-X0Dz-Tm8|+=&+f5nPDa;SNr?cW$t$VfM$<|Yr7Wu^T@D*y_%6g?s; z0eg#wwmp01oFeX=3&x9oTkwHDQYHkX)$@oz9N7^93OtX&mTpFFyN7x`K0vfR4+;;j zO2cGAlz`r#0gYBbjwS~^kd7dYR)nM!6Kbk$q*PH4oX*7|NJ&dVUWbeNy}tIcFZkPK zoY(25|9kl(8c~nd=aM%05da0;em%6l!GEV03o8S5>b}}`Kkgw`a^*C zq8b0(CT34}!T>PLs`@i8VrOrZb-5GAN}d;$PL!FDEqXj>b%UZcS@s69_xe;mkz z+pYmY!7)S*^jqt-V48?Ll(t_B{;jr-&Gz(RWrke?0yuabVNhG&H4+@dR1GTwQ-S~p zU{G7@qPEtJ02fxK3K$5i@?%fku`h1m&G~^o*wz0lUsUki0Ybj9Y<6!YWB>rgRV~`T ze{i(O4bd2qPf!rz;Fu{kKFK2BufM61!(;W(@RvG*{0>+?LWvvTii<~x))XC~KVE+71J*uik5*z@HNq+6b4H5T-k4VQJPXJX{G?4@8NXW+^Ql{vH+~HY3I+3aM zL(}>)Lx;H71VzXmRtAQS`Nqzgh<2{sLS?THg_qa14obp42AFmr1@F-0*C7+~X-b6zP z1Vs>XgofCGki%a7oGc@rd2}|PWYM6?3I|!avQ&{}C0co*!Qf+%Rly5$}lesKoH5rIlg^#oXLC^&v9DXO1>zBkb|=s+D^!AXAid#ayv=4X_#$Z~?zQ-9yJ* zR;?{Otx?BoSSZ%Eh8GP=@+psOa{lt%kU+~0o7pmlBH%g%0ty-12VB%*#lYxvF^}Sn6K5&#_m_U|a~g6aIAeOiH0hcOm~>4A5C!?lRwvs_ zmgkU`W<3zZ@yLWVVm1;r*;J#+B%RnFBLdg-0NJ$%d7(W-f^oX3!*0ONp4n+RJ@(}X z03;CwS|kr@P*u4>Ra7716^Yj<)Hb%68+m?}m^Q|v1%`MqA9HhwVlS&`S^MTtAz(C` zOw#~ip|kdnM|u&PN@y3nC1|X%7yrYZxQ}v&cc5PK(aluj^c0;}&L4GoHP?T-HtNQZ zz73A2y29g|b%n<_w_Q>_b)rrL=V0a>4F-oEEG`%)M3_{h%7PFp$_%#P;Rgd2;wM3 zm=MHKiZLOGBS>eJAbU5fGUGe^&^L>s5MydxwI)BY3LcX;;8xidDK4x z`1g4YIS~z7XFMUGD?Fizy~>9Vm^Hy6hhQ7xwH$j_F#v$-t`q%rTTC8%jh?u7>p_+{ zglNcH9s9$Nq8x4-Mh7V3BiyFIplC`5jaNQub9)X_Pc(%m_#A>cLiMSBYRU7Ulp$_0 zW1JfRKnmlQOF;K#sH4y4FOyL_KJwQk-3jl!pJIWpafbspUri!CV*;nb@b1b&d9F-=l~+fZ8vPWy`=-FuVVbGXzgx5Eo z9G%M?DG!QR$O+FIRgQ@IcIX!f&mXP6@!K6mtpkZ5VG>#|6sMeU*(r%q-wtgM@;h?u zkeFkqLw-t7tZ{HajX5C5q%$be87Km( zbogR-JT$#CpPHx#Z6>BwcIAGTKw~L!2UmxKN}EXf9;$ASwr7kw&~DV19-_J)(y1symWP4S9`p?n7I6OHN;3%v@i-us{trSsWnbtDqlv zElD+7OwQG>jyG861D9e`BSucokxIA7ynUYE*{m+M9O%frkB9g}(L-rFB~ElinxKK20>bLd}Pw3V1Ckh$? z!MA-qxVLA^r&+EaKbUAvzkzU~jr72fp%FjbOiMdSOS>XR$JZkKz{DPs`JmDs2BPbR z2vH7~>{7XL^B$H8(;gnPhYda1bRx!Zik>qRt$%isvigyseUz_C0m1KWb>gG6*oOcx z69D?;CMw^qm8sIMk|D;lE0p*rX~g-;qljemAm(KWacnPmOS&sk*Yk!NMY}jdpz&r1 zhe{JaWLiGz1={A})yNMGrfGRiQq{^~8-6t?+|jq~>0=G}Zu#Q{G^&OS08svTfdde{ z*B8Gwa?>82_mA&J=~K>8I%o*-Kh0g$CVD_qq0!ABD9UOM^tjB2U1RQ^RzwrjUg;qs zmF_5)2cwYEgJ`RsoFR0z&yKtjK3u~KgZF$jOxeA{)`vK2P5I*mn?mam)mB{oSiy2Y zu(CtP_3|IbcP~yb+AdR%)Bx`ByaP>U28M&cbS=^){rc|-#NWdA0lq2+1TRF^0mpeM zUjqbN`^wkG_4``|8r@t05Z}2b*E!)FN}FmYX+v%uK8?BO(k38t%w}gFg2cO|SGLuW zH($&ZWHbHtA7gqsUo`=OC(0i!2qa9%<&PAo0Pr{fd>`dy?^Qok3828f9eIL&xB`hR zrqPK1x;)_M;Tg=fQu+-WU?Y0ls|`2E@n{b`8bd&=Ky4AF<98?jRDr zk%ESwyg=h^qzIlv+A$JW%#8&otQ;DBqeE!gm>W81gq$5WY=o3c!d%x7?bvVO8#3Z; zP=VMRLpt<-WZmLzvWbv`Ms5rt;q4xtKP-Idfg{C2%ZxU5VsG|oPfJO-95h}Y5)qy? zy#H|2K8?|Tl%iOhVj{1h4t75fwf%j@Zkcy=Yx8oBI3!0B@E* zTp-0t#3xcx`NIXv@*gPs9RSXUpa({;novsByVDJ(W7LQ>vqQJ)9)4*0AzGoQQPTEF zRj4ce!ZhM~0%_Y*cEw`@#qE(pQyp;csvd;lv3II$5fWjl)S(GRU0$2|w=>Bm(hjWt!I*8}=RNjLj z9X35?=mW@A-G;68#YQoGg!>4IPzM0(0APLjKMP6{e$^=L{u`G6V3`pBQUD;S^@l&) zwRZgQ+)%PtxLIqSc|OM%;H2 zQ5wf&5!nZ!CYp}#mqSs|r<%O~(_Z|}Cx?lO2mm+%zzzT{-DVoS^P>eJ z2`&_mkWrTixd+-k#Edyxk2j^Hn*^UnBIUdH2Yy?*-P_XOJZL|2gISNC`{JIg2d;Rwwx+C3 z>ADiYfyHX%TI%g88!5e1Q9}qsjFbDC+=v&z7>F!U(0^OD4Ilk*J0gNOl5 znqFWo+tc7{YH-T{01mrP1%Q?t?mRy2+)F2?ZrfDl*}JpOmz-kY|9sor^s_FUWc|xU zZ#Z;YLiD`RF%d+xbkDt07o-Qr?VvHaq!^$<+ zH4~yHo;4-Y$^|@r>T$XW8%aly8Tw$~iFFuiM}5sGK`EO}PDu3)2fn=4b&Z>?^MJ z|NE}@>Z|tF$*pC;g*Tp*boynplLUcBn8UE?mz}IW6d1L0Z~=>?A2wCPZoXYvSnJi2j9Lc6#(F!jW1;b0DSZQD)-y} zdf$2W^=BB5JAbxOYtSN5BcjUPRq}o3J-|*oXJCZPaA+ZlJj%>T(tP;l?+sneJ9YL@ zBLF~6MYA03{twHxI4@psoXwo9=YIKSoBQ|G#a?HNTMZ#>_{XBFGMgKm%FX9IT>(Jh zh6nzX`oN-VG8UZnuPRkh=-F2tYdQV0*-49ESl+zyli%C{zXW5Z4ADeBE6HZ&?tAHm zG)J>b{pU5$)l0qrJ^#kjEVECaW_;@Amm0RN*%_EPd$jJBC$CAVD5;XyeYes7;AKxV zJhJ$nv`fcdUrkgMApo#trEq6nJJ0;^<&QV+-MUZ42w=##LV=AG21dvXha72HW&t4t z4Rx-B7RAoFbeeVM2_sDfMXB1N5m~w)mTzrKvgU--7Aaes?4Zu$^iR=!Pq?*5PJOLx^s02JQ&&)3b5zkOr&*l9)DKYrfn zn|JXn%lg&ZJ)i&gduN;3W#cc!{!mRmt00}fchLgt*57ye|L=i!n+XZ7(w}6Zn+YYg?ThD3om6&DJ&;7$Gwp zdNkI$WJ)Qdq#6?%LoSC;ZE18X<$LR$uRr~5{rX?_cw?PRp{fMF`}_~r%Fq9Bo0D|- z#B(N@FSz#D6j3AKg}1*~mzkR)_&fo!eZ#(Xa@@XQpWo~8lgzwSUZdTMtZ8Qc_mx|{ z@npK?iOW+iQyMcNNB_l#8||MrW` zj`g8e0Kk-Fz&f1z}SW+5E}N%bWlJ0bhVpLgBqH$Pz6t zsg`D(G*R!edx*>KA@0^6pW8%tg8RzaHZ^zCnkg+1K4abMuUtDdWS z;I+S`X|y7G>xqx;uRQdA^L?+}l=jqT_h+p6<`1tbD^PUQV6l8>g|uYRmo9swgH)7M zNw+<-AZ7QKebV+d#Q{^20Z%<~l5WS^;(#J6Fn;z}O<8fdw0G-1nHiB85=ED{P9p>Y z089XY@c@tp0I2|A1pw}dsQCPi<4qYCn8UZP2B(=Q?D)25@g!RRM$yA>CK$^ivb@N6 z1kh2AXj_&65Q+?|7!iImBs?XGh{phwM3JNOu$NJ{PNR-(aQ&^5wBN7TCzljAlF0l= zP0Zk?9-YhQ4^HCTE{Sg6RI4oiyjWHh0$L45m)|f&v+UCya#gvV1nU%A4g>&$huQGd zS%dk!!6{g05Kv>Si~O`=r?T~r3iUvH5H$C+QT+JngE)i%{`h5|y83@xmC$jJl5Rq$ zUo=I?&bMNh!$;Sx-lhKjeX*+1@NmI`IpUXZ{USSB+!O&oUQrsJHE$gM!xtNrs(tm; znrcEPT`-N$9+ZkCzYJx&YRIq4H>oZ4P6|Lks}o?%v>{yK=v-W~sg#tL)X-V;CUJQ~ zGBF{9ZvVZ6Z2EZzaW*??TRm}<*c}HEelueGcjVY5QO0nrb|>8rzZo+QO4~UQVRA%l zosN(Zb*KZ1^-hM$jG}D!MnGY4ZC*{e@B5z)BOS>A(AfG@3jk{YU^}IW2R=)fkP(7m z0B|t?Ob38ovjYZk_vD$=k2fGBM#K`1PKqcP+!taEqG)6mBX)7bz<>?|KPvf$$`ezL z_;GnVlmieg9&%XB^Jpa7G1hF%4@kVAKG3D$LMXH^NXTJ&}}@!BA?oC9U!$QTlc#QRu>T?_pnqo~g$5I?vOfmpFD5F!vixDbs=?D1rd zjAI<-1B7CcEC2vT(aUN3AV>Qcg7zg=XN}=|kO%@12764oa z0LMdbbm5_y0irgTI6j*NhGbx1XosKZd&9o=6aY8}08U2;J_UgPQVKCmdAJiYo(TYN z1HcK;OZ_P+$@LSpfh|rlFfg>ktEwQ=EU6cXBmlq#0Pr?KFucozj1XJ_0RI92eeZ7i z30_62VA?SQ14BC+WguR4s;d`@mI?s>hY-w7n2-^I3jyF-=o7n)@?=%=Fh@@Y28MQQ zb6Wx`JHD<2!Su^GhNN{2YdQx6=t>*GD46G00sS_ zV^rn2eV(Sz6{6HIQf6Qn0PqtPKB=>KY6G9{0ucJ@o`mTL0pF$}kL*9)BT`j zvrqQ_!FKR5F!WT;WtCe z={)>qN7bq zc-1a*q(x5m+vUkFx4NJXAg@1$OR(_a1k|5lRVlflUXh?)kyHSv5df-0gepY<57&E| zAe?y6AuPKqKu53*dP|w8H_3#0wrG@SM$~il>R1#C`|uH}R~1?i0LYaAa^ya|V3%+= z4A3K-I0$xfu1x84Pj8l#g|TDkRRe+O@7Znj* zN(yC%qB1ZrFdS(@-m(R|i;Ad@H5mf~1H+*~!W!>WPl@~g_dnmrd+!ZoKK{67KVi;e z3=9n2gh_C6N2jkck4oNbND^BFi|F7DoQDhgUT{DtM=8ZXC{GFC;NO6O5)M>oy$6^Q z!UF|NRmuUSm{Q6GuTu^P#gstsdidWc@^2uNYkv-*IG6`;Fb!>cJ_40;R3-xTD0lk#o9DFF26NNt$aVR6dk&X|SADLME81t;DUi=A~_fO>yhD=XH#uU3z9_d1hr8PDB=1|{S3U18)+^x6c}o?#m)k6nLE?p9ac`5kZ-s_TLu7SY-lks zFmwg;@;*$yWz@q399A%;e7|;_(_k5oP1<8j*R}}jn}@j-(lu?F1>a#{U^ryBZOlKi z?;Lw~p@;(mifd9ecJUb7R*Ql6cWD~XF%2C` zG;9bmFfafBEEw^4=AR1wn>kSHZ{YphWb00ofR%(dd3MRK_<;ukS-0LQnSsXFfa^Yq-tyVyT{!= z7`FyP8tAZ!E}_U&lh7WHgvs-wi{#X%CL~>Sk#5hjWxSJ+@LlaYcVa)!1Io{*BI^PM zhJlN}jCv?r$9p)|5(iLVsMBh&+$rBCOvnWVMEmWxe6uV^4=>{N23_6^2Bsl1Fbq@- zv253#nDc2GYl(1hNJT}aYHg1Za!m~mOqigWV%?uOkr*fiC@#i+*8B_%0~6;Del?9l zDl=6?L6)vbgHe1lPQrw|W)0^WHjEffIYsFZ%swN7^0(X~NdY&79L>p@P{=_(hBS1@q=9Hlva9 zmtU^m#hRUgVPK-ryhEF%uh3G;%*U~iu5A(P{Ymmc6S6D=J@r(5@#BvNa?d+YPUkp4 z1qGm+FhMo%+=<<{-l{8Jzn=55CLh>9XtUO4`y$C;DAO8^9<0*^Hv~`$KwD3hA_UXm zH5B(6r6|^QN=V1Flp-4M+JR>UueUxoYFbsrR8=`pRg)^qBYl*f;snsL@a%DLly#k+ zwL*NDc`w%^8ZrPtQxj6Iy;fU#^Ud1w5hGMhN($w-ZsmM+bx2`NJ#fMEJG4bbk7X7W z?bXehQ!gHK41uI1kr2Xxs&Z6SIZ6m_|99&T5Q3?q@L~5Ag%3-sCEYz!Pgs&4;56S6`GAi%x;l+P09*QUY7lidi3 zU79tCSV0J4pM;h0qTVa7_y&FbwRiX>m&jI)2G}am$tzTD_nhxW zED97zL_QLu97+k$9zWTY9=yro$tT6yMT>;``STU){P}X~g%`@17hNQ0?%s_(OO^-? zZ@wus)YdXva(~D0;a3*C{`%*(5hD&Phz(R=Y*nq+yZ1LYKbav(_v{BqXXC#Iv7)+6 zD0R6wyA(jX98KIHlU2QN&?H}`K1F@C8HM-Y#8-lWM}^?{n1Ciu#Fzg9REXf8frG*QOj`;X938p zU3w4!RYgD4RtP6%6-tYypXJQfThx{NOEdrge;zv9g8<<6(PujEAA5l#$B?S7Y1ppW z(6m!~>xhdT503jwQ-Lu@UQ+gz2>?JP3M%)Mi$>n4-ZJv;hGR2MaR-PWZE0DnKQ;Rz z`+}j5*Gj~XOPuR;002A^>4}*)G+jRUg_`s8|6LOx9=yK!{X_0!-E9@8tPD#JKB%c4 zGsdv#y6d#Nd_JVknWI?QFzTPs>whp_fBm!BC!G{vHq#E!QloJ}J;sk@u(s$~46~%D zM_JPq4k4J4Rv;JK>tfF8H#F|j3^r!Vjea}c?JO75bvC8cT_LoYBY4cyW71}OdBjuH zx(qhde3U<3n=1=gLx-9scq_a+wZXI^6|k0;IDgTvZ~oXqsEV2bWry60gzx?fO7R63 zD9Q8Z%V|@msuqj^?bw0cYzXyFOrCsK-rxS_5Ze5L86wRWSu)RO%96BE2QZ#_AoUQ^ zwEA}AuAUdDUzKCe;1xf@$ceYv_lUv6QV~qCjrXZEIHOAzttyWNNv%x`Nw-A4>|2BwmW__3^I)OPDwe}sZx&q+VJjS*%F>GAzyi=oN~tjM;{o-NM>M5xy(KiV-FX8ARl@AqWxC!jr6kG7>-A!d z#zFwNBc>qm{Fx3_eKw6!M#$a4iP_n5zR^U2gqy6U>&)#Y3!|W+CuR?q+Lgp1vpn0H z_wzMAJEss8GIc5H9iuL3`L$u2c4Kp~#=slNF!K-z03cbDtWLIt_sKBx7{7r}ZZAJY zlO>NZPxAr*3xhtC{k`BMwm#Z4hSO31IjF4VhR zNM&Y;frYHB7t^l1vRMG=Iot83O-}yKJBtnPyfejNHiw@=e9=W;+pfO)DA%l6gZwQm zKK$3eE^9ltk?Qptnv-LbPCtE`Gc7Gu1_0Q-yF&B%=c|(I>Ka7=0E{tBPtTCfKmY3e zf?!r_Ys)pCeDYEjr3es0RHrkmI$e^SkulaiY}jdbfSx`DSwjE<%-f=yI5{UrA(W#O z0ESttDxo~I*?bMWNKeff8Bp8**3ikeB8dV9mGYEO0ISAKPR*X_4L4Z;B#X)F^wb%? zQ2X%+%Q!y)4%%FhZJI14S0&;0qiJ#5$v91I=0-k6pK(34xCRh5FrqaqsRkTI`UMv4-Q8A~aE&nKg+ zub$x;G$>8lx38IBzI?0k#TUP_-FM%mwSK>h-hTV@)WX6%|M};i)tHi!F4xuB`EA>F zvU#-`t$u5_RYig<%w{2UIvU~TcGWZr5Q`;Ewpz2LoSad<(W6hX&ztvHsVw`rjT>J} z?`e4v8WaH7%L45%96CZ?zMOBFI#sn~Wl^?GbO6C*a`&p0JdVSyVKXV@=B7(L&(pPQ zHyM0Bf0vfhwOX?}c<`K-+S<*=9)GEDt_)Dl2$|u~nJm8lo^#Hf%h^}1^o(A#NUSa{ z#y+<@{B#gi1-fn>voZH4n9WE2uu8W(fbDiK-n+M%|LUvFCbLv!)i(|+~Um$p@_RwZ9`)h$(`Xi?*v77kT391UUHs1M=; zEX!zPa~&rU3OV{@l5a>JFt+%F3HiPEgoZ!<;Ntr8sVW;x{S7{!rpF^2YqdeMLw$V! zSu6(*nP_SXnjN&-aP9W4yH02xK0G@R9%Md*{xl+;K7EpV%9N?Dx;h8{(n~L9Z{7Nb zapJ^d=RadkkI0lCn}^MOC#h#%fap%+W6^O2zquM*GKF zbL8b!yTod*le@g==zcp3PneLGE#sZbmVuKEnSlkD%h=5FNy`5Hm6~|zB*}yK?fW4qEp1GXZ}%spOaqW7vC-2tNGgFZ zDk_8r$4~a<8s^wBOgJnVyRS6&s zcVK(9L$2W+Qk{?_76mle*5mI+w_{mkWKfFjwzHk)}mV}?~;v7%1Q z%{3_#C#FkVwloP}eO0C{C@?F9g-J>xZgyp5`^D|sD>M@)j`f($R>kM@;SC$M8Je4$ zgozW6wufu_P7WbG?{Yb~hK5Sb)~(B}81r=E#B1t$zSSy3fEg^VOIJT+KtUk{8vTBh zA7X*$5Qf@-7j0{)<$a2bmR4-mrfV(gS^1NFztr#4EH3?7KiHV5lzZy<3D)6(^9xRP z0|0zj`lU(7>1d^=hR@JtD21k>(p!7qvMPNr&P%raSK( z;(hYTJ^FwAV~dI7FenOvkt410op(-jB9xfb;(3lLii&uiCsU^$ zZJ#)Cx=RUB6_zgjPcA|jbUL$QFj(cHqS^MLL+7;s7>LrtDg~w00zeVdkh^Ni;y5_B zV37RG_RZQ{T;+D)tA@_>Qp!=UDx;6fe%1eZ=!x!8 zNkx)V4xk4&zL`AEIwDYH9wY$(coiSIbM!4u2sD%chRX}DX$Igar5sdwtNC~KyosjS3-E3S|;86o#Cl$2c7xO(+6 z+nhN)t0-HoB7OAH(QdC7Lrsl@tX3TnMGXlaa@v+gN8Ww+;@aRLr_mGyn|#YHm)7}w z1T{6eF~%Y_7*bS91=3~{&dM4Txap?n_QXEq^iZ^#jCy_t;K0B+1qJd6+4=Hs_4WMk z4RzctYrZx9b@X)asHCh8Vcx2}%^U!NQAv3+0DzI#(Lz(UT(ol&*T>Ean z{l02pyM4Q+%2Oc(h=f$CAdlk2Dq!SOU0k7YydMBSz#5vZAK`C%R*i4FPQ-e$zUiH0 zLMadmpin<{$@>KZpC|WJ{S&74`|l5AXJk;#amVR5&z`N{zIQJQGpzsg6X(pxpc>|< z+`r)W&vPtZob5kU<%=Swxw!^ar|Uj}iK0N$(rij{ai&0d1cMMsGOow3OvGq(E%D0Fi%5|bxIPjxf5@+V5xSlU2Veqf%Eb4*;N06?VHS#TDcn2Ae@fH|ndh!i3 zJt8*ts6j7blZ7AviWlK6BO|C8*VQ4J4Xyr#ZQEWbfAGQI%nKLRYglW<2BrH%N>gM2 z6Jf2NZ-RR^L)vD3bGM5Wid)@eNqi1*l07fTgC?D?Iqy7w49c{U;0L}h_%!%wQwTVPyhe~ z2u{enq~(jMmu=hZKN~!XgG&)}C5(bDm}8Pob5(dZ>OU&KHaAB<*&`DPH3fESPR)L~ z>WC2Xu3gwWZ=RB>*Hi5Eq7DP@+;f!_w;L&CWtdIZ`W;f#Wy?-!zWL_2GPAN+YsA#> z0{^v9`mbu%65T_FPDfup`WW91yAwMk1&y_)E5j{ms+Q9bLIF&IhCV&zY*(q&mKNmf@zgcSFteQM|N%`ZcMj`0h#vy^u%YL}F#=BE&k!l11o78d1SNHf# zC}Bc==_R4=oO9&#&pz`Fd+s^0rfnfSC57^L+#zM0cb=U7{PQ9^DWRWY@80Jsue|aP zGgabcIk1ZDbt0o}sjb-)sX$7>1fh1SsV|rI_X!iX=)fRRN&fQ><}F4o)v5D?inL zU~x#b!Z6cJPxwb;R3J?|CZM*SL~_K!Z?0d@dGEhpv+uzN1A`VX_9amYAW15@=ps22 z0ASTBzUkqIH8pHV^;Zb=mtVdrx%S$bBmeu~{mgU`rWvm?1_BlpApGSWa33Yb(5Fo` z2Hv9Xa&FRj+?%x~-lm>k@KCLuw-B|5Sy!d896{a(ZDQ(OE2% z-@6z4zWtW7fBdn)7Bc!hQkCV)-`;c0HJ24V|9qW>=h@L+Uhguq$5Ss*dRN^*Z;J+h zW}h}!+B8|paT%A`31CWTn}*)A&yWdE2t^04A-7@QJ}ljFhlZIZ2JF;)ig(G9?|0PH zoH^{(SNG^rQU>lhdk)8IHn+RT&&W84T5mR6Kk95YMdF*Z4r+^uMgwTjAR;0b*J?n4 z(oE%-Uw+Q%j|TerGqPIXV6?wRR6-*>()M*BIsEd*Oq5lLMP8@OH^^aLwh-RrPo zCk>{W66IOjOh-iai+~slEyT*t)mTexci=OX4ExR7mTm%;3{IHHK%M+_62rfDsZlQu zNrbt|j&Io48YF?dgrl^DF4Q!gN9U3iKN3fIbk%#D2@wDh#VJlY^j}EKoli1{MXa~J z0c9cx2K6RM!JD+EM{D|bFrT8Knzq(u*?Qe>YzHFlS`Bxbf%Q%g7S*~efW^dMMA8*b zUt`kFI2aFK4y=(b;h7kG55>`w2RSP0rLKCeG`rxJDDpLB-gR?I$}ebGhI^kk`fcxz z2W5Frp2Pi%6C*6iy0U)4(11X~$2`zRrF^T*G#-T+&Ej0rI@~?ebAvhy^X7mEk{!vc z>sg6P3V^?Yz;4z6&mPP)96(V~C_RqmKM>MsouH~Hd5TU%3D^pq-O!_QNJc>n11^-6 zmB42dY6;ivJ0~SAO$0bd(;tX)V!@$?2H5i;&xeBo+)OQO3O5YY-H|pZRw4T6QuVAe zX_9MgwsycJhgi^%y9BEV;bp*_?{5UkrTt_x|1lXsvYLu*7`w3s-mBe#yM|b zIUZ$1+KeEbKfVQsb^JEK+WF(Zv*l8IPTLZPUl*VaH{|RjlfO=ki_(HKNPbYQUGI0P z^O0IC^YY5?Rd+l>*q(YfvuyKq!O37f^SM%AF?|ftU>xzUFO&oXi2?j2m=ke9Y84F? zrd$5|A^tRp+nM4#Rv%-!@DkBf#r{7wU;w2J#Djf(_Eh$tJDk>-m_3OmXd8U_c;tOx zm4$q*tS85CPQ#JI;$>U=(Oe`2iSn8JQ@J1p2;YN&5Che5N;RG4%KOls82 zubiPR@BLXdZ@OX+ilc)p};H?7R!;ZorX173Ap#~ZKKz0FbgU0UBeT|_S zEri@5>$3kaJxlMVtBT>Mo-fz+#JP#bH&xwUHY*Ou#3I78kySrCoYOOCY*x@ZDq#2e zXCF#t=3|nD_?qPe(*#nGSQ7$Cs)PPqJoiIN)n}~B(b|@qQvPUP}U3Q zL;E2qN+clm(|qP?&pQ_6aY@0v<{&jA+#q8mT`zxxRYKxP4X90G#W7#ehdNNWEb zImj%$o*|%%yQ2f!;-gbl^#4OLsWR7L+Y_3hK<0mu#f-8D9UuBC++qOcF<^x(^nax3 z2f!}<3UJL%S5>Imfg7v0W$!+6bd2r@1yGQTb-D1@QcX zJX?S0x$KdJ5v);+TLA7HTFZrz=&@G(=&tw&-kTSFU+$asc-};=XuN zbjLya#0?STmFND~;#dBmwITtL|L;|-Qh{nLDg0G&p+1&vxR+R29!*^!GC4=oVj|W> z$iYNVQU3X}2EuVCUI6Tm|L<|+>KW2QBBe9j=1W7zkn!11YtjAWpn_51zh_vDh~`Cn zWR8>7 zRbITB%t;U!o}AR53re|kli+(y1i+Rb#@!!(ciKj0l*%%AC7Uo0C$aXaG!EfI_zG+SNkCivLs^22KV0^y53+SXUQiXgZfPkq!gpZ); ztC>Ygi)yX;@^da~=uqESW{MpJg*S%3G&+h4FhfsZeOVV9=$>K9D@Xvsr^9LC=Lgkl zO|zqBqYU-QJ|>~~@_zRkm!QSb&7AoWQNLVe^GNB@YIh{S(vuX6crUK#M~SnNU{V4z z=neYUfd7a>Q()}J?1+?)=z#)NNU>q#+bCLcAUpunP;So>ak?L~h8cHU2KE0?L9Md* za@}-WB0<1Ed9cu5+OjNO%+S7$5h@n_wgixRkZpRx#Ad{hRWPh z(9Am+VIrbPd7~q;O@6Q0ZDtfv`Z)JjQcSv1vw%ERsz8N-H@&nKrx>W^7mLLf>K|Bl z9!sRWkQ9u^OC%kK$|9W}zmNJ8E%1zi*ljB{EIfXenCw7r`7#H^G0+B^#wjp3x}ykrGI|67`W#*RN&O!CK8`fIPW>;1#W&p$deV$}+~)3Ad?t#F z_@UInSS?^|L1;ZP@gTE^K(r9711xYbfaj!yFvse>mvb5`P_eDSKx)o0YKyDVej}KU zA0VVB-0(brdyKaAb`6K`%EJF~%Nj4KCg2r~hMXh;wKB7hMa_VEywnqdu5&pRfPJY$I_NF@N?0|)r8 z7VJ_e%rs{^T$VKz9)E);jh33fojlDbas8dcN4lMzV1fYvJYHJDN`i%Kyghf}#r`d; zKJO&VOWSvTUZ`j|Dr2@tQu($~gdHTe{#AButEGM9u;z0XUeEn1MyStuQsbACg!}@= zjq?27ON-CDbOqS`sL=TZ{<()*ZB)A-)`dX!OK%h%ZP z`MMq_H;*fNc^a0w?40^k8TVPo$I;rNYz1O#Q;%;I*C)NW~R^FEMfVwgC?5pRx%UXo$;f*X2ln#Q)e`~UNOKznL z0GR1HI?tU*1vv-y5eEZ`O|(NgDoibQx3{Xj-m8I)xR2{8?*-qczU$jL3wT}af%wA* zs;p1rw_Z*YPv>c>n#Dhd53HWhHJ~rM?^m_N)Tsb{)d;n9)z8Yts-U4y^=yOfrmaSo3%a7eUnf#z>~Xg(|d~n0QiROR@XqV>>Av zR-@<^XNht?^8=!M_s!ToR?heJ%coaR3-=x)=C#iwi>4y5o2@2s*&k_l-v|Xia^G4R z{m!nLx!#Tt9vY|l_1?}O;&{LSrr9o4M|&_eoLo4Wa7t>D(lY(E+Ye1%cW%AZsPa5o zlX%$^#m2>kR;Dx{^7H4+lb2)Y_aoc)UOy~Lnac3Oo(SV_(}%vF*M4(nZURXwxC0<; zg{h!tn%=L+SoM1w3=kr*%XILu?9Khu49D6yd zyK;J|C^oWpGS+$}~`JFJU)MqcJ*SPm~rF695w^al}4{|?$l3*dTf1y4=uG}D6 z!k+$LT()J`Cn0{VoNCKSOH%IIizaTlIU* z3hzHDV~(tz)GA~!dXDVwEV*vZ1TB0u8$@33$28V!h=oZT(h4#CtGAGZx*qp3d1M;o zxtEmpHG5gDA%3t!m&av&~(>31+GEmbz)O}wo*N<;Nax93It*@dn{&NjB%$P%$+*iA= ze%trnN$a~5rMe!8r!OgA^1Y7xh zV9y~*R2c2wm)_R^?F%_PK!_SDZ+-m}?B7ZANiE~H*%;O60YT@rt(TDtKNuk0eb2f7 z`2OGRg;#P_0UtvpRor@`Vc72mEqhZ#J=qLxOWd*WLdt82shsIn7mc(cjZtv)srxM?{xo!7b}XK0bNJ2EuTMWQ&>S{Q5C7kN`aLpwXs)Rr($ ztr$_6tNd-@tRa-Cuyo{5gI*mKbHQ09B;;y4adB=(dE9MTQm)xmO%0Bn9DC0bFZrU% znsI*ioJ3e;VX$dZQQGjMBIfg<^7A@M3pvMgHDdUsHOK1H;dG`)7w9H6RxY&>dc_gk zJfAz|b)YmaVFdtKYjV_Bx)q;WIv}I{t>v&21+%Nex?x=wII~~Zz4*w;Oq!11L45Ul z>|yPS-LrnnU3K)FRl0Iah&l+hhr*0J<%kdd_YD%9;)f)7zul+=WiSCa+(9wf4-}#w zM8U7WWm!wo_qIA0y|^Vx?J{0`t71J{zpZS&bxf1nWaap{KIVc1i5w4qPN1k`K>{kC zl7Z@B)iXT3A1inDDmBmb4~bs3bqEFii(k6=41VwWH;PVCrx%`O$SlO8;7s59$guQ0 z#{hiK(*so@RP$fk#`LL!LY_E_tv(#xp5_m`#S6alr$bELR!h4AHIzXU7@M0by=k5X z{*I%MHkklGQVE9qv$(|Q`W6IaNRjJo~8{S9gI%Z7I zd-ifc$8?8rlf3cISWz2rfGE0~tq!VtfnK60(_1jf`lH+fUk&-8TC$bu59%>&P6oS? z5*+cqUAcyYWam~@O@gOE_F7ULR5G!Awi=H{)TeOTL6oQ{N1eOz&@QZ5m+;y2gBUA< zWvSy_BKF0wu|+e1el9Z-u)&c}UL|ETnqe0OXn;A-;4dB55tlgr5}e0TrJ-EBroyR=4u4zFvr1UqkzR}jEFFzm!r}1-SOzU4Lg2_Xe^Dt zv(u!pz(LmUzOt*5OU>CbQyBTNCbM*7yILzX(jM{QW14e$zgfqCMAIZQd|7ko{L%Zd zem*FS#{+`xt7nh{Pg+IA;r&gqwmjJZJ&@Pz$5>6|-|@-dR7C8diQSR{ZE}M_dn?Y``>+9dM zVex_suJV}r;x1QF51QGLeP0W_S5M=i>_s+hqw1~~blSVvMrkJg7G3BqV9g?r3kUzo zo-HLzY|=g-3}*f#&sIF4@m=i@sw)3N|h93kL3M4H}X#C#$T%c_5856 z05wkqGx{30{P)tq;4>~3Ga4BE`7i0rhOyLo-M0wSIB|O65VRBdaWE6U@%nLA9S}%= zUGlb8dqojM08u?XGr_yrI{$F-^;k5Odq1~-fK)nV+v{6%aR^yxyYNYWoAABw7oZXB z9nkjy*dmAQC57}LWf7r(Yy`Z6_nAA1+R1qZk?!R~=yr?^VUA5^gGrzV7kIPJ>$#U;9HyCg#{+YXj6uWBXzXOQ-UC zNBjcy0B{`FLn}7UI8L5&+q)^l=Y5+I8_@MI8TNX>y?yO7KI( z{gzYV#7f5XzUTWV zNw8L+`^g;d{dSLg>kms?FE%><@f+%Ij)SNMZg`DoG(RK%9Gb9jjge z&KWV5#tY}G8jPhmV>(m0yc~w)%bUiMVJgPlM3F+|kn`>Nfer!Ek*3p(rh10KN*eGk zuT5P71Z+;`5EMY>w4(mzIM6C6n|aB{)9U2se2(#1v^9+sn)Z@feMJLCZg@m|#y$m7 zDU_GnLUSdec$@6gJ~|6*`U(qXN0YVBRS8B!zq{MCa1w4x~TlVo<#VI!fz|Sf*9x zb4~NQ2OZYwTyDd#DXLooZs)S~zH1tUQAtdp6t=*^d3oPw3~yVFg-_XpyPZv(vs!hX zKyUHo@>4;>Nl}S`ZcS;CmzUWI_CZ-?Wa%A~mmF==_bh=m*aN>jbvhtmW0cz!F*6=6 z0KHEa5X+C&K{V$2AlhjM7i%nH>y>dr-xqZw-+8w68V*>7Ub^t;kPrlx|2&uY+GHn^ z|K8rHXT0jRP}j2!1}yr&v1aANp;7=0v`2A| z-;B-`fOF(dQRbLUcSf3x8JZzu)^5VU*{{#fw)I|xp1fw zR2+~ITByAx@ISt@tE_nBz_nl7yJKgAHUS*)h_SrKRdF#K7(@=Oz%r`*pyV7}F_8;1 zcwmJKAQc`R3!9MHJx^<%U8<-f*fvaT096N@i8h?dDQ|7DNI=UQOi21tM`{c(So>ML zn>wye-ZiJHpU&ivZseA3^;Mm>xKh;91N`Ba>?-0)V9OYB+FKdkg0T>){VBzTkWpxY zN`b^$2Ko$9;C%f#EvUeF2|BY8hEl=_veJ69$ue`7V?-QEzxV_lQPMa;o^ z83KnI#^gL*UxR+u@-Nt+@YbH1>BxReP%PFTP5u;To?w*_;j)QpcBBz9e~3nN4sw+v z7gmIZbio3p2@ZAJh$@=6s*)-SrJHRp;;lJQQs_gD{qOzg?qijNqI~y_LkWLFo`pZo zwrLEspc`_>v~;*W$)IG%f{ix_Y(4Y&w&mxx{Kj4MWd%Jic(2jgud5KM=sWZFt>-%_ zMDEOYp`I?ncBK2yXQngWXsc0!+(xsPq7lEMJTshF?-!falDhZag&k; zV>LsgLgp4C*ksY~W~n?PN!b`fT#S(p^D%>z86nmb^Cj9|8! zu4ZELe+}WyU2EbDd0-Q^nU(sUVFR~L>mrl_9KfOxvK^2?e?I~HO*UDM!(!7y{q2Ap zglwk(Rz)TXM1sB8!LX{hNo0Q9&ELz9gPSqhKZJtb{FtSH%t$nBlcUS>8B91#Q^hF0X4?R2wpC-FrugRv(8 zxlJ}EY@v5Xp^&-AnDL*(Bd%bWL2l`t;&s}arPg>SjQ&TgYZ>b=qS|WgysIY3ItJuSpFXoJ1GYyN)DhoM?Ra_|6x`{EvGGsR} zm=I$X<(Fn9olmPw55_HpgjCjn#YPNbWp#4eVFaS1t3m-P(eLME7ANg`kinxc*E#*J z16G`;*rj747bPch>0B%hj?-3SC1{=!iFnCXfpd(9-tAZbe|qg;tYaZ9oHX%IrEzj;H%;A|3-vIgxRg1p!|W!nC;P2k zx7-zZf9AxMkxs&^&(_wvSL(EHNnlvih!nuYM*^6)8}PXO@iC;IG<85tMimc$ zpBxCS{n9^1Y>q*^-|84&9_N}-<6;bl2yq~~^WXG^Do98q{WoYsCE55~d@HH-?hohj z<%`05#mC?M$A7FI%kb{VLW;4QY_Xx`8mGNomITt=oM=r_RVP)WO+3z5pt#OHueqp5 zkAY6rTs(9%F^N7}Ie}F?9|&&uCcF$ajdhqw;i!w*hjrM&U@r&stSO1OI6mv}Z@F8a zm}LXgZRL%ntdZL&tTl?*2U)14wACOesuAJYq73ZnE-9KfvtoUNoh^%@9`7PLE`|KA z4iR5;STi~K^?Z9+9o(E6?ev^NWub(&R#7Hu0tiFa z4rCqYE<<($N83S*RMazCwu}#dEL-$eq+(W zWj1Z?h7s?lyT4N*7z+h!Av4O!YyL7T3W;MDy$t%0_s}U?eBy6!CVKj9E*xCHRKmEt z`N4Pqt6|UX~$yPW>!jgDcl~}#gg-hRc`x@{J z3;|p&g9j%!d>Je@YrV?8w@H6~{W|%FnCMc6G(a9^j0fE}3}vX3eOG`*6zCLTh12&k zp|>MOXm3Hv#Lkh7f}qn`MamAdy0SslG>9%j$5WfjK ze_)D>n$-L7#^ku9`T$cjXijIT3}*xx+0Qp+)-!yEziqZ#ru@^<;M_oVOqS2}o-M1a z{T%)XA}lL1I&gJYFx08xCeE_a8@>8kIeprWFRWV#shv~vH99{27HY{+g3m&hHiR78uscaI}U*=woQzTqL*E+KDW1v3gt1E zLa_HmxRzzP7EdIWa8S&V&#cxGi0`E3`MVtB@>>TcFFCnFLB65Uj(iRG6z4(?V`GEf zCFZe&8NYbfrKOF4^mK`uxih^Q$?8Z!jfEswM`yAsJ4oL#!p6>SB#oi@lJGL>k8>WM z-{(t+f?)T^kt6ne6{%e7fg}C5@!JjipMUL~&<@jF`huVT9k#72D>pbVT(klQEt{E# z?IC|F(bf?`Ze$|T*#IJqe$w~vx-a|8NwpqrIYx;C5(qyzd$J7$KIA0jH zC!CR0s7PaBUHRD9{Zq&I&i8}1?P<%sKm2KI&vhcs&wDLcLvPjQ$rCiGS3H|bO0p}j z|Mi&)U)72z7mHg>ndd#5F8CgRT&i*)(L}WSyYDZ0UvH9sZK(0X{te%;cE>&Ei`!N? ziZEBhIw_Mh*kvvFBQPoT+yE)k9niy&FEwXLCu;*R`CYr#D zaf}!nL;yv}_Qpj|y?Sb%JQNNLbqa>zQk9kXrg!5YH58{wx}wp04Yd0ZCl(7cPcvc* z;rq^aO_?+n74M5W)}4OoohMCyo`UV(VXjn-rHB!e5=(9*uRIaEh!IK6(e0m4<6xpL z#S%FMp4q|8=5L>M82QN6PG~k{A(PHlm_m{I9302qY0=-KsK~slZVU+JWZ1QkT4S z+}|z*KksA9e3WW@eBIry@sG_%G-0eaS|S^}6l zk;`PxoBMG6NM>PzuZ!G35fyQ*7k3d9G`gt@Bb-{ldLmGv7Djo&E&tV5)`7QoG5J5Z1J1?HOj0@nRVXh0;saMzTdN z?wS%WC#;5eEpghlSX-_d;sa@-RY?8_s53@8dP;2Uu#RvrDr0M&f~38%Ue#e=s#^zB zJ9t?BXe4jPfth3{IQR{3x?MS^BYGQ1&K1W*-u9Mfe|7Y{)i*VHvD9=pGZ+D=q5gf7=MG?8!Ykr`bDFVFlS9IS#f7W#KeHjUObxnWF%5cX9xdv z=r@%CIw_(?K|#tTwNp{}z-*2TsQ+!UpRLQWZ+Rni_BCyo{{Ck%*0IE#7kqKg+^nTz zQ=eK_%iWS{Xm4JyO4E$~F;+te*15(=11Rtk9R0G3CKLK7x1Sk=k+n+V?vf%=mcL5S zQ{nS3_FF`9_PaY$&!lS_C{Ff z<`>2N4ru5XEn_UZFqRb0X}wi0hX?LW2nIc}x??zX+48s9K?WMu7a#`3uy{|@L zLS%X;1f^V}Fr~pHo0-M2O~!L{nO>}u*TFxFNQ$un+91EgVZEV4Nxb!~*TPm81$Z-okZ(>PqM zE5yV5jF?l-x3}qHv6J#sQ`n`^(S3)$ZOp!2Y-*9y1Al9+0=ud zX69GQF8CzH)T3>NYxeiQgfaXT>kxq!Z~{*%=&Ro>nPCR6vImh!lM9u0w9&a+7A>(KjJyFebl58Njl3KFMbku3< zG#U*ljEivQ3dK5}md`=U%V1&8{YOkW2L3gcjsUTV|5JYEQ>jv5U|cyYJ%4eS124XH zFCKOkcsQWzHsmzTBO~+R*?vDpDRQ?r^q2#!r_|c(T`~!(`0yFrfy5RYZMu4NM^!SHpV;+?Ndu3m=LF%^(i3tqG~E-G=PNNbveM%JoF( zWBFAXrpnPYyZDHj8coEIb7Gp=BJWx8Kl}9S4IK&I2sXCC)3s*AKq`3e^Iv(HiE}9i z1BM~iYpV271*0QzGfGq!QU-Ez^m{!%?2e$hN@kAkKY_Zsb$mL~LaXCqDkUwwp1;HG zA*ID~1WasT$21l;n+A=m(j@-X^egf51+%s11ze=yZCFMR1tlpmeO2K#wT?{cq53O~(#yvSXH65FBBFjbEWIr>3qvY5_jeS5d(bE@ z4=v4JY+28YC%)x?^}Je^KMbNa8foY-Q)k0UqsF+x<~kt_V-dLT1bPbno)PFAf7=bS z(t#6!_Me+`1d^xesAlB}GOW#^pb&VS2XtxZ`_KU2?`kXUd03m~=5m$}C%!V-jfOqs z;1HnXqEw_!d~e4T&JAVvvN#2kT8u{aH3hcciFWvepe86_>b!E0bIymzb_U@35-AMy zu-utY+vXw zH~boWWa)jij54}dyNFFj%hOU*v&!K2ay8f;V9f+GxZ1*RnWl*n`lIIwtQIsG*+=d_ zl-58y)L;00W1hJ1G>}};0?X_6*;Q9|@?cZIMS}#0Zl24`jG{C)?&=Jgqh=QKn8AnN zOrnJyGSp>k2BX=1UnaR8kl#6PiM{L4*~vTYJBYube;1)szp}Edf7Qr5>@dkZlrI)_)bjaITU&a*t#9GLga3LnGV`R6!NPAG zjiEtiv)VA*Zansol6WwSJwIku%b&jQSWJU}@!kaucszeu>2}zswTMJPgUzqgN?P=| z`>aO*sMiX(d3(MVl)Sz^CGFktAP^^)7VGM!Bs-h@HOO+r?9ODRQ;hVj23JE0~B&_@IBA6b6w+2^0u^W;4z&%NiPAjZIyU> zQAW#S)V=XkVUvSsXdD^gT9(q?B(Rc}9yzhOKS6y@#t}BSy~SuwPU%kBd$Mcs;A{LD zJp^aOgM|urtj_Tq3kSg9bPJB``UBM_5B8a5{KGL7yy_mD5jvm|JXB1~trC8&njdLP z_)i6mxZrDr20C>SPgxxvfMIsps=_$(XJ0 z`y$#hkwVC;c)QajRpRWNMAzG_tp-(7A%ozr9}SIR10aEXwxYP6=Jh-VWz zt#n}P77xemmKWkJ@72OM;71(rAXR&*gB~Mb+v}?S6H{Mj<9R2DlB2Yg*BS87B{l|^ zwpzY4WYg~}v4ggjuh?R-Las*e^Jd#Zr36hJlscJ~GJ?li=<;&=-5X9J%Hs~Bg$s}2 zW7ADv62f0W(1)EH0|CzISWo#oASDI&T;K1*dFf6ah zOo6|-|MY3ZJj^zeh>}tYNaR5~?;`%Iw6DFqoLbjZM7=WS#oOZIjS9VuO!F5T4jNBd zRyH5Ql9Fu=Nu(=3L2Vj%z*Ng(r9yU>=~N&!E(acOas7?h_P?$7bK9JcsYVnAYU zpofmK#luM~P4$}96fLY;9Rb204t03QS(kEZO0IjUvB9yERM1ar)RNs4qflZ7alGN@ zmAMAb>;o6*XGkY-U{Oj&U(LxQnt|HTL{Qd*WBbMc?asba@4UkrCOm+`Ii14wgD|x; zODI%bEXV2H$4#T#TC7d%`HyFo$sa2t&+K=f85y6W*A2oo3r)4B*vhxhr;5DW<_g5W zd(=pe7e5;4f?hv-BpfHkS-|JNqkY#*l^FhDp_DMi)X%Q@Rh^vYtQ^T>rJneD+3A82 zLeZ}fNt0=f0j1WKvu&`u%nwmtgo$Y=<{~bYhu0qS!}jDP|V(7Z3L+Ed2`HL&ce;& zdkGZJnkof@JUwOYq~r47OZsVHVfIShTz`K*fosgodGyrFQ}zv^C<{X}wHfU2#8K+K zR1lxg#5m~DM7Ni$O5_lx0KT6<=#q_=9M)) zwPwA^c=C77(xU8jYrece=WelcK2n3Ksx+v?=FPL-DKO(E`nh7OzOPgWxoyDA1*E!% z|9ZnKC7I2?i`m^D&-_nlVXhbO@G@yNk2+3MmNVlii@M>4_a{XR7k&$6s_Z|)VRd^` z(3%T>GL5RKd369lpOy*>csZ%DI5&b_FFucpoXr*+h0^Y?&($G9zpgU(#R?V5@(RCy zq9WnCn88vx;%g(JVB-PGt5|ToU8u0|eK$z~N)ljC#cn0JyL}YOgU%de;7_#74XpoG zK6PlVT*nDkhgC}osR_;p3>|dI@q{XI3Q*8rRy|5v+;+g&h0vFX&0;JRe`QnAiL)*B z%Q)~$V_*F$RQ@%PU7bWCYlrdM^G_)+=Q2|GcIaL?roe+Lc`+!eTU^{U68Qp!SvCfW z5puwOWO@(o--gR-#R_y(GB~cW#XUatrfGxyDIlRcIN-X^#w*>@nA~PIQbrg4BZ;RV z?P!^ifsX;5Nah&!w}z9QT`D7E7-rX%(xTBUZ==ic5Lix5PRU+cj6R4u|D{-_H$Eds z@lQX8Ki49^hVWUb-@R*&g)6ae(|H?0;Vvt4ZvoiMDh(IQLnBAeAg`8{S%9_;K0dDQ zNuj_H366%2e&r!HoA1S!RN&tyHd~0>|BsjCO-eZxCC2yk(euGlXlM4MQYxDL0fqmZ zp70vTL)vuIY5QjlJbRYIiZ&_0d+49rClR0vhb{IAQS9`3vhf$JoyBa&sM*&iR&kRN z*y~AQ_ga(1SpKkhC`bjZf$#pG_;N5Db;XQX)5zSMP?}vuSC^Dyr_Em+4ox~&ibxbY z%Zhkb*3uB(B{>>;Bnj6IEW@uN-}{p&92DVG>W7m|)95YsYRw-*N;cb@u2wS~=*U>> zCSZ|kuwS&D%%~G;Jg~3bx1a8=|>mVotRc{H&&hR8ZDsXYph;dj#8?79R1@8quH1q z4qsU{mBYGQ4IR5O+CEiE(WmeZQUo7^(L=%js_$3zUD$pcQie1cnN37|OYE#`#Dt-7 zz}!b>B!c;$O)FmFOn-UkUkxudE!6u<%jv|U_>P;~ikK^eH>y>MV2)5h^IqRa&GMUZ z+QoCf4_cnfS&2hS=@`yESEpSwK@}Ch8wB#F=HMyPh zs)ucC7ycTH7?k2i;qk&s2_vcltm}^Lchi`4Q&bPrlAm_g(erb2>NiJO$E|qQEEtd( zVue$4Z&zR5bj2tLVU_f#lzQ6akw{A#Fd51BNuiOE6T@oi1gsItwd33&MA5(@Qft+3 zR8(LTp#imgeNZk!Bz0e1zlo&Sr^{Oayytyh>m3R-o#XXCKik_;{60N;f50>UZVuE? z9XwsuZ;fm;^HL3hWha>+ffU}+tDT(TV`Y4tlXNv$=C$^*Gc`4A>+%Nek@K7c9?YdFHiRR=x0TTS>j#}qqNsQ{tcYk05HjvsrD z?Sqyd8(TtxYgv-$`nU8I{@k{T=uH5P5X|vR2{^XHA2RqRWg$|31y0{yYXHG0)VK*K zP~tu~&mls9lBIBGV$OKJ`CBbreu;fCd}xbKjR;LJ%U;CYuTp;nwFyWcy(1SM*(ZBsiYAbE^wbB(TDftl*(q zb02dgj#D6#S|zcm_rr!$v$I7wSAgGZ&^kq<>RBO@Nb()Dn5lJtSd?hgsCk!I8wgom z!s=KWkhD0}AQ)~EfbfI?2j=9Ia_nA1r_H$C5XHQ8B3b`69PvjYj^krtt#dFEvNTte zbZwEqtkFcp zV0hPTUeBp?zC4fRKH^kcT-3JdH|RdOk&WQN3#tEPNnWv*5OZ|eUd4g;IRaN!Q{pRT zC)hSIq>}@70N#N(2AYW1DG+Vl4OVL<%~^=^t?=0C$}rjg#-Q74A6E>gU5_#tKE^1u zp9exZFZM^YH9guzjwc3N)1d7?sX z?^XX@M2e6zc2z~WO;ug|cb*?Zi@-8IxCL=P^w_#%cvN)<; zF1NZD>y5`;QWA}KOLILvE_%Ow{4P`J2|X#~`BnvO*0|-=)UvYex?LVty1Jm~3r=Q% zKu)ewg|D9$W++=t7E<{mjYR(z?rY+dvo7y+Ibho_5_n4z;2iS^D$1T0lCsuY@f#+{ zZ@8W2Qet)Nnl=XpY}4Ew97^Ug&aF8R@|cKgbrF*?Gpk%?))F%^DzVyEd3vL6W<|I9 zrlWjLPbI=slu@`Jpd0&=Yuj{;GEunqMIFRN=LhxZ9AgomoMFMfHMStUW`L^Y9%04&fir-HpT2oR|Z5zQba&raPQQ)BpDjtR zLr`H=cBX0mLSq9sR{aYM<6cKPY|b~Odzr>}A@PgAZG?x-4;gvY*Qu#)@dSJ{{wR$) zkpWAM6{5N|y33<@LhlRYR|#oS7;(KkWMr4G^&ZwQA2E=(C~4`$Gtql@&W<7lmbh8x zP-+uQOLee_;x$FTE5!^+b~IDv8s_M=j(s(h@^lPythICf!tmYBFcUoV=g$b^ldrBM zU88UPRT1j-cWLSFow3Va=Dg>vg8nc4{{4KnmSx4{fZ@)5oc2%wNvZ38OvredQmkvv zP4hBF2&J5~(o(fmYKyH+Vq?R`+DiQ}`1ZkA#?AZt0fU_3aP$pwS|xDQZm9~p|Nh=N z#3@#hii%FJt7!UIMgtMG4(*~SDRpUK;k?yx+Mu3m^|W+bqr(N*xh3>x9Q@hi|IqZ# z(UE-J`*z1pCYTtL$;5U#p4hf++s4GUJrmo`#5OwS#J1l4Jiqt*N3T`2s!nzF*>$SA z_PO?bn;q5#R+G&joqi=3g9?;IjWZ7v06yQq3hBHEww=4Y6U8O;6*Lg0HFjPPVd5?8 zAz=m&`FDwV6{04meiR!XjG-mP@-WOsD0W*Uh)e$%zW2b$!4rgMa;sD(VIM1U-(NVT zs>tsxBF9LX%HiQ&O4x5SK4kLq(d%>$2Mc_rGaDO;2`Tj+yBu?5sh_U5t=iai)jHTQ zCG4wUb!8?ry5x&)WPo*l+B1yoT%^6$R(3xyuqi4Gu}8}JG%Ei_}r*l*W8v_X0aXR2AHfR zx+Wl=lbzCK%|c8|XA$^Went^T85k>flA}jRtW$7n6nHzGotGaa!i#i&dk4E_Jke>E zOPF4y);B_mOWp;q2~e_DlMSd5jyn?)Ja>Lvn*?fPh+duS`3fK}40CAl%~6SdV-Zle z?D>g#Qz)7#J`eUumABzz(iV!aUt?q7o-va4*XZPul-*zFc~~)NB0F_izCD~AS2>&* zjd7o>M3%`&taABGKb)YB#9a;Id6>-em#Mfe_(JGB;TU*9)|H)IXkm7^|EpU0$K6O0 zMGk0z9ejvx9yCb`qW$@f+hIy9CFxnYe>bZtapWhba8;f{ zOZLn~QI;)>VAG;=2#zzA(YSc*f3A%Dfg4ddG(XD0HX@{Yz#gRZq8#KoT4;#S;~VD} zV^7Sca5{l-p7$f%UY8(c?`!y`^N*i2c|>cnwO4+svq8>&d{G?-WVN#`QHM1s-aq6u zLwj+1czltjAB%0jMa+GY>%9v!9;!9O>?@Ux%3Q9(l*PRM8BjN=_N{9fw!?ZkXsOFv z)k?~eX@wH1%UjM4q=pqCwu+uoGin4JzI5|%bp5CP0YaJ}NvPbE#Eu|IN-h4>7p=nO zgC;Xc5$A7#5^Q(XvMC-Tyc-73osO|TZdy~Lg#Pk7Z<4xbcil;h0Nro?m+ zt+w6vMGAb(I*JTVko_H^n#48IF+kmxHV;4A3>+Ynep|?PInN3+GZg>kAc4%#uT@mr zaBr&~X)44!$qnR4G)2<_xVnmTJnFTXy|@gQV#?Lp`+Ru*F`K|O^Z!?%v9sB=b3DyY zK;-*&ooQWr;Cnq-Q?cba?Dp3O+R~D;S*t2T_`AHW{`t0#S*!iBQPBNqP37y0^}WRO z5D?H^2ZdSWYYrv3yy@@nmtQxFOuHeFD+lX0$2M1@B*Y{@rs^Jvp|-T}iy$kjJI(Uw zU8Pu8t#@}a{_cfGoA)IF3x2xY8-|{nx*J&Xk zuWS$g2wf z`s7Pu!YZa)7b`K&VYP=iWBmk`9a`!@Hy8oOznZ^d-Se=*qHgqe&N-H8dvaDAA9>)>eNoF6v3rY}2=OO=QD z-fHE3Nse!nuC$ooMaaPg<@nxC3OuemjmHhYe>_G~4>DMw2Ykvx5z~KiTpTuNJatCX z#W;@baSwJI&{n}ON+BNQf9d5qAWUZc;y@7)9N-w}{KY{Ic!Y%vE%s(&4C2ZQa)unD zhNHrz9O5^7gMr5_n}I-;BUQ$cZirPfIhp6dzDK=iK#Pi>pKtRxF0mQ|9{sl58)k(& z>Q&cA_(;=B#6LM1`EsYE_A!X_x#~MBS|;mpn1NU^XvE?B4Se4hF!}dVuSM27ZeU=3 zy8LOpHOa|{=lyz4SP1W&4wnMxnS}Mzvv1WzGgD(x)2!QlJYZOs_2gVPkeU$;w)hLx zR%2BxbchOrQ9|YNdM6U_JOy!rN7b&Sso=oiFfi5+uP_a&ByETL%{f+({Zmk#7K|wm zj0HIj@dR!86W~fYkUI6jlwX1YfV~!bG})f#!zZdNl)IhqgPT9fMAq{BtKIJz=EY*N z1o(IkxkU{6-Aif(10?%OGk zha~x-A^E(ib^A`zr9974-|=F}Sd^A6yFVxND>F0kl{MOrvr{CWPZLAK#Lma!da+z# zsi~ho78l=_D=gzup#~-&Q>tx24^!0yc2u#QH&P+>WOgx;P#zR`9&D4}5;_e>6;;c` z1wNiW-Sj+7_1=QfVnsH5k|F&ip!gl2{LBB*E4M^kYM9n}vc~AR=eRyfGe%4%zyskK zCHB1^c$K}T`9PKSJ?{c-N4Xt~o)4?|bg2XCZ4(;N&5b_0cdz60*G~s1+44jXnD`Ou zD!i%>6RcU46>1v^&U2DYH$gDORW;Ex;b?(x!%#MjP&gb=0z?qf0a&)Thn((PuFIf{ zWxZGBL*NmcM1vU+?Y2Ou0noY6Y9yh*F#~+ekFbXeaYhxo!U2f;*3gK#X^6$VNUx`B$0Yf1ioN9==I6&hNcaKX1+gC6|7+Q))>}|W8 zKUopWDrS&u-a0{{W5Ba32>;I^?d#h3aVy$E#Ft+=)3a<5VD_+FkZtXIh>#yM;R8|v zyg1$A?AHT0KQi*EzQjEaYqP_7>ebcP%CZc{Kj6 zEm~sp){j-ow0#F)y3Zd~OyqYwJm`wg&eJ!ern-vK)D#p81Eh_YLJ5_*iGuQYW{0>< zguQIlyGB~7=n-<(5?8u=th2CMtD`nP&91{&rNtOWd^iVZrXz=T@o_+RjY3(uYWvYh5xz5|PE&sh9uFYRb!@cr zrT;k${@uD%2&cQ6%Jquyt+cIEI9kxKkjX}x^IO*lIO86DslE7(opNtA_5$KZSUo=! zl0;~DeV^g5`BGRU#tan5Lu);I7{n2hP!#i0q?QPD(!_ckmpihfEzxBqbCC0T?@2T6 zEW1d#^U7fkBJcWV#WS|ug`0AxN_>Q|+(;ODt1~F^4@>p`}DC)2u5@{IW zYtojW6K*6j>@7dWBMH*+S5#GMeTFKdLU++OJAo zS`nFqjQ=+E_2o})Zu+pY_}!menJAn52gHLpYw-T6g^EVyWdAYryWb3F+(z_$$)V+W zWThpgc7>$JTO=nS`iwm1jax1owW|DPtzwjfxVR{{3D-4LDQrQ|V(}J`LtX+)&4`mc z59F0F?YZ-A^p|Zl@BW)0_6V>03o|LhAK??K0ZH01g9Y|TlR=XYsl#?#b`4tEA{DBn z#kQo~6*k=aYpQ<#zTa-fx~5sHd)`wl>zRVWb$B+*b^u1kg1JUNxMUZ*`GBd?49nVj z9lkY#W=Ov{w6g)74QDSN9}Fyqe5RY-lO3bwpxZ|q|E~4mN2NRlSEJ|vX2>Z%{3GMt zUh1Fo5c^-g?}L3jtg@Mf-Mc=#T>9%xQ{Ta~RzmO*0(QaZ=wq3=scj1m7IcVlToY^F zbQR`zR^2oWb#1kREZd41yT^=`3zNOI$*HEj^=AE!81r3^Lc)PqWs%2Ec3GRP3m?0! z40h@F@V=NGbe0!oXhyCpj`n-xsV0Cy2@;qNB|_Ox)x zP>=>9DNx@UkWc@%ie3@jF`CbWbhCMGK@JHowCq?&McH4tMa+e0?n zWiefp{|E^QW8K$>iQLUE>P>0tK&ECM-oyw_*|?m$0Y0X1)#EUBe;||^?HgdTv@=5w zTZJlvCMZ4TTq+Cx+qt1CdSt;CbQ*M`+Fy_*Tt1C^vkmyDZ}M!EPsH+L`&P(T_0nzPGN+n(j5)l#RJQ z^{F>6rwItcZH`i78+e@SUy2Uz+6C?h>$SG0|Gej$#OO!nlW^JTxDr(&-xv3 zIqsr(a&8fFu<|@0@IX!3LFnDbszl^1H_go7&b>|oYU@j7ULWw99M+tIw{1=n7j4tEwskATO?i0eSA7Y^u8R@W5?Y4Mfn!wq^ghS-gK#b zBwuC?J>~$uEJ5CFlvDbQS9~r%iVpPfU8)IW7dr2~)L(HnR|V!4of5uwN<`Jq7heB^ zs0eta@3lL+%d}3;o>Ri-d$AaP>A0v@>A8)?U8xHm;(wKa=evzw@K|?zsEQL{P{+n$ zT}~t~w|8hk0n3p-b^(F)K#XG?AkCMuFiV{pV`Rgr>_>1mv~<$qQ(_qaoA2(MM_1Df z9@}aiRGD2`pXns9-A)G3yWv&UNHeRJdP{kKU8m{>x4seQWdD)9Dz(bWjCowfK$~y1 zlNlP&iVkVSb(M7E=u4{U)_O^}Etxx*!eliU2jo+4(%tZWq{|f|7*5^>?ZfIeCg=wx}{RL?Lm(28jEI1i{ofc>4{lxA$AKmFE zM1#n85&u*AI{kT4Q3(AuC5zE1v*0lTKCe47aiv6HIRRm!3z?{*JQlWHQ^&^cqh2fl z2XB0n`=x+#H%O~hkru@dMXN!K`ym`XS zErY&RTKt<5%vTtK!h9pyv&=l^p~N73@4{JJ_U6CDvW0bqqJu&C-y*SojzNxt)l53( z&F$X({MYGOI~rhCU_xH`r+InYkCvRLeJ_DWJX^rUzUsgs`^*-+sI!6MjX)aVtnE`y zpW42LAr_w7#@_z*aS&alZo#=SmB!q?%xbGjC?&;9&a1#Ed2G^4G!GAoF?3DqxW~8p zZiP zM)<6)BqD2q1d_O=(Ri*>=&xM`K6A0J@ei+Gu@zN}4qpzX^QgYKv-M}EYX6uTn@BP< zZ7sGuX0Wt%h7lM%PUNrIGW2P`bGCL~7={$oU756VNW-6YokXE`oJ8wZt6Q(0>lSYl z=N>}LW2ck$s(8u!!*c#k94pBUocXe9$WS|ptH8j)7Z5L(r-_Y+m+amF$AQvb5GX+i zmzW{hHZ-(3KrlM`>6YtNF4yv2vHAO2vPB5Vg&+wC1-pfI4{cS0I(dTi(?nyx5Ao5xp}O+* z;nUqA0(VU$#LBUY4MVqaY=Pn15IxU>k*m64vtRBTO{;pkMEg3`Kc0^SNJwy5DYO@= zV|G*2yIm{wx`xM?LQqL^Ne>T9f8F2PzBMi9f(kuTF+4B34yd(T>{=iI!`F9zF>zXl zV{aM?<;njSm-dEX!Dc8+t+N^KNZv6 zSEdR+m13}0rVd7+-h=rXov*b0DP`xVj2JDQi-C8{MIl8c{}Z{Vi95?I2(S0UWh)EO0Qkj)PxdtcDB?1xaEKJC4`FA=HCUuiH8f{@nbjpX3-*g*kDrOiK!3Ih5_bfM);Jl zlN0Y-78bi2TRT5GZLEq(u|1i*jSqtus_JIZ@A769Rsp7~r}(=a!~zMZZ;U9vSs+GP z9K2|+%3i=yyK!Yu2NVW2xE}nRx4{vO7@d&8VQe#zY}m-9u~y3vQLFSAZu5ObbCaUxiY=Qj z%iCbFT8Q8WtaP}?_>QMO&LJYn+koo!x?DsPMuK22&sJ)8s(GWx8MRdIDkx$A_)i-h zB!t-THqDs*ic*2m(b^TZ&Cv}_FdwXb_3PqUF{FL&y7UVTcJ#Hsq_a-^x z;J5rgTem^>oVcIQ(;KPN0`_crPLhruZ%;DE&qwYWdj7uQ_qpC|LV8VBah@CPPPZxQ zQChV)lCmuHnp-;6yoQB^dDW1{E}5Q_8f1!I0E()6D|l@oSz2ock`yl$H$&R zQc`~X$G70jTJ!wQ2)fyHcTJ=cCJL;!req|aI?2(aeSHk^`<$IB`|Qn)_Dxn6$@tWm zSF@0}q7?EB->Kja!C`_wR;&i;sGSW^Tt#WCg`$vGf1rB#G3)bxGu7?~4A?+J!-nx~ zum0vW&R<(N{=0JcKA}diX~|1^>-8x3U=F5l19XgWF~Ed2v#|=OEH6y_u|>~{hA7_K zq$x}ztj})|=IXhBVj_clXJG-Wt+0R6`fq_jUy!FBz{1w{pxJK2sHU=#O+L?0DGPLd z2xe%wMN<(<<@i8QfYarkV>)`>lwGIEyBHGxZXT?ghQi-%$%~65l$>mpGSoEf?SV(P zAqu~jR<3syk^uy$_D*bU>nHVEI9?Nn^If*K{sa``RoR7Xcpe}1W}?@1g-==N$VrTl zx1g$QG2+&C1S+h6CXVgPwg908dexLZ+;^Jb7Wc1)qgAXYSJP@pi}p3!KL`J+4rzlH|Uf2qgwQ zoi(5-pPrP<9%VbL`kI+3y1YKfHZ%74@UgP93!J#beqpOvndIcWtj%@k=S!iOcTgmQ z$Z%;}!s2mfa8(?e>+cVLT(hBs{*I2u2(Qew_^kY>dhI~K_A9p0Ck(3 z@~T6~cI-KY*mlOUi)f_|ZzQz|*Jn4wj6>T(@Q;-7(8@jx5{sy+>AwtfR7|j9{ko2V zK~kCgG}hP9!A{TTS#A4w8qF^z{f>0H9nI^!UM|gCwpxZNiW**T*Ly9d&NrtvazaUU-P zs3rgQPuD2hMQ=WLf6?wql$0u5zdIhwKOhDdp66A#pZviTCi*&la}yRpXs!SrG+Fzo z;Oo|cZ45lP)WO^(GGKY`ot?fAlRFV$mr90#(hO1pA& z)L0k~uK_CYuX2ND@=Vu=qSFmV%cNU|b}CS$NSnT3#yX?J`a$ylSO7^$5<9q9B+J)l zx{Nvb#CG`S>3d!6X#`8`b%BNsc(7g(Z>?)o>fsVZaJlBBd9yb4b%;%q+bG!Ol<)2C zc=YCan1>u3h26n{kjJeWPPeu;$Obdns^cYXbFZkVoW#Ofm(9-ItE0S2X8RQdOYS}7 zvW1_i=6Sx^(^iX-JSoXoqBOMZQCe7{^`_%u!^dTL%WOU#iYloc z%9%nJf+Lklckq)|QVPsZ@i@D1vabyj@}?ggj5}*uJ%s)m8gSI`L&!ET_SzE@jr`@kh8p1?BzW@gAT#6~R;uK*QP&Ix=7jlk@HEuh0rT|4jOHj|M$!ZSD1 z!qQZW01=th*GET!h>Xf)90y~1u&_)bVq)}A0a{wTgaDtbzTrP4K39@fU|F-m-r{1D zUu#hhJBE>kU!(%Fv#X8~A->RLLDxPJMx!rX0nV zE|?*eE^=(mFAw}VRby7y!@RG8DL?+UL&m{MRo)6D%c?|1AO%l&m@XUSF%6vc#3`yR znRp!K#5{zBaWG(@<4I9tiIPVa#>e6oPnxC8&$E`GhPt##ec$qX{logj;-GVrLr&FH zNr8#JpduyB-3xR$iMH?ARg$`}kkMUPd8?(#!D;spv%x>TY{-7=BN<|tXcC)6e8NRc zN^U6CqS4W;aRIoPgc+j~j9*+oy@*IC3cfbsjh|6iHjwk}>dp4^3d6OZB_F4!hlB`N zTl*$WeYKxNK-4=_y`mvPVdoxy9w|*Ji5jkY{!OurRg;09o)szpw9&6DRp)dNZb_@o zAU{8nCYTB{WOV$UBDk-#xD*?q%TsX2Atk|-UP@{1ZYJ>SdB*BwPVPCB-snQN{wb^) zImBKZgjh(RJ{wezot%m@w_2?4ct=^*8!#81kJ$g{){M=HwBmM3dw*(d z%+~*!RYi66;V0{My78gcR~QA=u*}JfM6tIbva+0qmdLO$7G>9a{NYkr|4CYE%Zlky zV8;g4v3)A3F!fgnpU$m;OYhXt56ALA(s&i_{21C`ztV+MQ(*rrR*@{d+*mTO|AAS9 z>WiwWfl*aB-7OW>@(s3II@^yBu+)CYyRMX$riH9Ta;+Aj@VNN zhsJ6KeDh;=4l&%+MPj)I&5q5jPrr6XN=i+&#n|sBbf&A-uRkR&hYIVuw#WY)h1of} zxQm?-lLNm}AcpZ?eD<8OWfd2x$i{8yNHwhr;d0yvu1gz%f!^yY^aI74fR(jNnM6pR z#*VH4Uz#f+>?=!_+V;jWepK1_xZPc3%i&m9V{v#g+-R1A1C+4NP8r4dCY4pICMpm( z6OV-z9eqcqfEJC*48+pU@3#K5v@9Z{rr!G=v~A9pOW({Oba6SDND;C7=+@9ihSf4D zVwn;82wYW+(jJt3COQ&yS$bE`{RW;rI8Xo`h$ih1*F z)i_=?QWHA%5u5}m(!(s zV#l97ThmR=?Z9v{X~=-FF(uY%0+o&p>V`^DQ{2?lG=FmfRx`)`T@bImvTikbZgzIm zhN-E%DLZG+Q8f9!?*N+FWYep56~`DF;1ZeX55MHaSiK-x5jWOJ;$E?&+jGaI&$_Dm zpO7QGwIzx~BA(9mr|Un7X3rq3j*a|kZFTF;yE$a)2hwHkFy!7v8CNN_3fa}BQ*rB` zeXS1Dv7}I)<;4+(0fC@*NhPlr(~I1Y9BPzeZjn1x z7N(}GMV%jz{x%D+1=WOqP|OC$nZMv>HjA3)u=BT?N_T-Zg}wQTihqc&G*$Gar=^j) z;iA%w&xIl#wRGPvgj$Ven&si>-EipOMPP*G=OFwO54#ibsao5{gv%B&hO zt=L%DZT?H=ea;;V3`d@}y7#c7yLtB0laPp|lGLZbOa#UB#y&#$6Qfo(KnYX*QndDyqiso792Eb%cS(FrNTt* zu?&lebLq^9O*0hbj}(7j>D5=L?frCHMATM@WP%-%I5Ht7kzzF^N?wq50*JDqL6Gts zSg4Tm_SnPZA|cNG2p=c}-_pfi8!d|l2so0n+|J9{$ZPi(9yh&NeTSlxK)l3gp95&t ziQpH)1G11_lX}`B@w}O4-&aI)HX0^|WgGu*Gh+xry(Z>)`?U1Fq#HZ9UzxL_3JVkn zj&5z6frRsKul`MxaO{Kc!qsZZ4_k6E60ku){%!wb!7yYKi4FQhg^>cPNQ(Z7>M``1 zcB`_3Y-bLxSRjSuTIcF;9Dd3VR+(@a4X;V|yjG2FqjvZPKL{s61<$klhf$0EPP4|;omW@fesfcfX20X`GxSc9iV(}+Tuq=HIu$o; zYb}h&@*m9!f19{v{R2oyIwtC3lz&~hsM%ZDR80)HXL%ZOJoK_M@|=UV-c!JVqUUFh z66s3~Iz1hXdJwz(ck;o)P3LJy@S|}Vmkd2L+i{5Plfb@GvVKT~jX=Q9g^Q1`!fzm~ zYH4i^zi8G%Eh=g_R4f{o;No0oC>l6FztA|ozTUZb;;@f2U%H`w>=2DM&SKE;Rn*xD zyKV14mrz!+?ROh(vQw(M>hY$-Q-g_M=<3@IvEsT#2^+`6oe+8L9IVf=#JXq6SpI$J zx`2$^+Coj%+u3!7A~I&+r}otw_&EArG> z7Ku@WVigLf^A=kTDf zhfVBb6l1e?p6`RPxt?CB!zg)~H~*7?tW#x0PC^1{ECDC=)uKAB63kBnDJcpVvq^5y zd;&46?+c7w5wj)(qy8lo<0s9kiB!seFVx_EiAYWBNhO6R-n5v&PE7L09vN$2s3O`b z&79l|3UL|yr@^7T`|Q}~u}kx%y^^B=k+%WPgBwX>7rGQWAk7`h{a~=us!(FZwji`(P?OUsT)2NABrKM00{c|wf}ZODmy$p{H0tbhv3q-WBeU# zkR^PMCSX&`&Y?!&xmnn*vnLc9nk0mefPxbhC4aFa3(gZ4{?;5BD89Snlz#tEpHpe-Gho?JEh<+NO)T#SrJ8bv5>?#Z!=lgi z5jIvYOR3NfSXO37Vw8owD2Kp)X_O=-cU&@%9(N!m+_Yi6V;($=W}Pd($Wdo#&Hq+j zE>mW1z*Kuz7&R2i-5DB-Gm;G?M;A4;6b(%Sb+q)gTFesK`=ry!<_h@daw?8|N58o> zhq<{qeA@FqvFus3A%kvc`+-le#*`&4>glJ$=H_p9+ol)WQCl@2z1wO`ruAAXrL*Z$tAGB*VK3e(N6K_JX)NY>NtFLZ`MZf?HqO&-)N8V2(t|I^anC7qwn%q&<**3s zM5~z8On6I?!^_TP*gqktek)5cRREq6{|Wjx8>Q7@4mNx8tm~+~!lCEO%7&y+4ph*1 z>fzIxXcVrKzrB6S=+-bjY9+{`j+tcO+N$t1ay*HxzHDKm>|WbRR13#O>FrwG;L#WP zZvLFg_!-6GRtc#Jqk+wJD??9j{rbQJHi%5i6Yx*}B4BZ>z|dwQM5Q=VnEy?AY@C2% zFmdW?2e?~n=;;XM^5@U--1RV{g)COR1NUv{{(hmw6SyQV$7xwrERbnL3O!wxc#gw(r)K(YA$omS24*Ohs{?%7tUrwNoyE zVM^aq3chlrxo$#eZ-;*)jnD7&X$36c<{Jn6O3ZEY(M(QhD->*#{Gw9tuww=qN#Gbf zN|JDO4awo*l;(QgC;VBHKu9TG+CfN7L{_PnL(QPK&hmRcS~Imz7%gYM)7_qyaU2@# z#H^&1sjP%`gLyegne?8giWj%4NqrK|9yW4ZbDErlhVp{S#qe7 z-*u=^_VjzCu@*_)-fpUlG!n0V+q#*qO6e23*ewk8(@Yt${(8xUCDn)FHli22SfIMZ zwzonhKA{5aEh0=rKEJs^S_i{QX*}M|t_sKBDJiv0(#fidk7x)SWct&0FE)<6ma4l1 z>|b1pUWN#Up}{OMO!jXdyUw2U#hc-9noDpPjVw~ z`>u3~vfdIhv(P>8W$U(CsHfdIvbDL7rH-S&A7$^vjg@+xwq!COF*|f19lY~Qm1-a5vQ%4ZGuiJbki1J^OLrG)s0|I-WH~rtGvm&!{?eba8OC=i2c}ffi zCd6BHeVWm@%t*5Ax^p0P7E=GEWoEvfUi55H{}lI^XDGV&CgicOH08)GqC7Gg(O=?p zOzHb}tDGPrVrlCBywzfkJ1k1{cJ*^UN0=f&x5KW&`*sq(h}KizgB^yeXnL*;)cjs& zx60B*Zn)(^iIBcE9JN;IcRRV7o5OP-S?jxZ?XvxH*tc1cV9I2#kxH0oQeR#WXdNqt z3d-;a!Z2`y<8NXYcgL3|M1sO*@Kt!v6&Cwd&r8;6v+DSv+X0=EjA>McPQ?yE`3O|_ z7TF+F)5*fBphj^VdV*Ov0r0Vhc_DVV_OP?pX?GF%@kPNENb#4_t%}3_BHk0jSUE8T zv%bMpo^8x$QDeBu-g5t~&|%~P*d@y{vgtjIfBm#43tORTAGH_?fa1-B zdGiH0{a9(cjj1QF&*nVIFo*QA@AB|pg0F0XdR!!lE{c(pQxppf%@4S^d(r6mXGpD4 zt{_-~j3otNQh|X`)s*^~KbVH6Fs6VAi5OO%Z1D*N)wK7i0zyp=ltNJL1DyL)+is!Z zBGv*-sbHYO(iiD&SE!~}RGauHs*q=u-A2Y4RMonb9AD3mzS8UB8?vx)<;W-uK%tpH zp)H(`-!1TY>(Tcdqz;l@v<**}l+=0I!QgXkcN1>QyFyJP)>dr!K3;b9eB2L`ecYtM z8?&8klm*I~ZTHAksonI!Of%u8C05@NE*Mjn(8Z7}?ERL)vk3M8OZqj%?7`jRHe%8& zJ`5;)rE9#&qT@axt(fs!jva3#i7SBHE8s@%hcR=V&V77XcN7o2dVee^;`ON;LgdYb z;8iPHG+x2cSR~>}y=;3vOh||!2rXJa|CoY&V@L8RhLzZ$1k#L27%rB_N!PT~2v=4l z#W?}H6Obz%ER;W8%XSR5nMeh(@9(G8Ki)5+_~Ljmj6iF#972{m0Uh;C87BT!(!9E^ zf~aU!e>_WeKVGNrdGF$7I`yupl8VA%E=FNFv;xGf0^d=Bfho2iwX^PvcFZn$UI_U9 z*+YjjX2=#)D37&<*wEO5zlN&RYeyZM?~Cf{&8exIDSU2c6d(jjhsNJj=kRjkFH?{{ z*~REr_F0W$*>JH-OIcY0uV-l&wxAC#o87-LOP;p@g@wsvTwnLRk**XI)x2(o4t*aP zFnZR@D@bZQpATR!vh4kMd|vK04q=dfB&L`Gg+L|BfILv(qT4s+x!pl8`0L*k`>|id zoNt9)Cns4nTP}RX)t1CZ@$l$7M}IK6@x-T^<|^YsF}a z&VDR^bUAN4T;?=c7=My{lT_22+Wr~pEW9J)-h!NeGyA2ZduZIz8nbBI+n9|MfdlG zRO)lBnk<>M18JiR(d7psZk&dmsn?cjh}NTQa9DEhBLru<}e zYCeYF=+_@WHJU}tQrNqb(;~t!JI)ew?rxO*y}J=U#qx5#wJmSy;0JZ^UM%ssgd*xk)Q*Hmd!?@nKv0@Zd!b~8 zQ>4k>UgMG3<=+f5l?C$ANys`Hbkk-105|FBOo6dN?JOUU$G57SSXd9ytV+y!R3h#$ zLX;ieKkND!bL6u;nV}|%lqN*nE`(S-9Orzb5e; zWCIp=kOLnu=VlQ!!%>NX!-gcP8!K;a#B?#Pzo_cbqnSNwi);PwSjaTFpyv))c{btc z)?Yt0zfl&>d_<`phg1rO$Nm(RXs&4S{ah#h$$p{=2eBZYE#%52j62f)|IT=(uF2Kv zX{QP;dA^7jWr}un-?lpl!aVoi|5}sw-JINlh}Xd7LB;s7QqrsRKO(kTQlVA2uhJ6b zMz~%6;j;KBxEh{Lo_^@AQ4s6On$QZZ&fe!LLTH*k{@G6XfBPueSn_eaMXBc5eCD47 ziT%m@Ga%sVL7vswY}#p`)$*-TUFIi&A#)FbV3xO-8942>VedfIEkC9LZMnv8jf$pTX`5-#plYeqRy-5 z8Nt57ARZ^|gHN6Yu0KmAdrhB9(4MYQ=H;ImbFbDkZ_X}VB#3=bQBCx zk`Ie<7Fs@yG|1lw_zN-gtXMpV7YXusUS>0=yu-6q%$|E z{PT&oU4n3H;V>xDus%618#`O(q6q0>$N5w7tdX7XhMN%rail*rUX4$`>s~&RpaYJS z%1emdDNR@d(jfMUby*6yjGwwzkFYx9RTFirwU$M8Vj=y|uO!#D1Yh-g;MWDd;wEAA z!2N_6dmEh_YY)v$bK_GYE0@z;Zt7+xyKQUCi}PVKce!DZZr9|?#}(22Riw>3{F1xj zsV|$Mk4AYP=J>~+QdjY&Z2kHV=xh}mSTHgE)~k-v8vzsy?7DnMKvY1NNKjv*xA5$~ ztJ6}HUA*_(y5cH%(x-$Q#&F`H?f~$@^|}>H8>QcCkFyu0wNsQ;Iq!o8<&2-&lqNZw z2>?7Kx6A-kVuwsXGun$qB$JCc==aQchrfDD!9l&6?oqn|rwVQjk*o7&W#zOI(iv$g z!T#tgI^N2ue45%qF6ixsfiJt*^Bev8S8~pSob(3Xs+o&}Xq(GZzh&h0Hi-0;l7yS! z`2cE5D4tlJu^A%UqJGB958Dm*$uw^l+e;i;szE--H&9MINYax#01o0xJQvxdzWCqc zz?4f@D)Zc|MdSJKS0!W{2}z|urykws_8qKg=MLg3M9DVss(U8)m4OT#?02$?A8q{@ z1aTx%Y+_t5#;3EVYSR;56z98z!%kvlXU!(aGf-XUv5QnyuA&00`wIT>-2@}C=Vh4#DI98A3EuJ2#WPakc!v-fT&2OzU5e1#_dM1KNBcaOSzXXzf>R+a#bRMgog z9{d#UZQ3eJiBdMoFb&891Qa7J&^FIwz#R-E=*@$OexcTX-){_O!D-)gTk|YY|IQ${ zW=87(@3^py8Az)RC5;%k!M}aC(>vY~C><3z+STe<1=;sFne^U8Bwo;)c8?iMvdpXO zTZ|@z*XFe;q4h$@&~CIqa#M}p)Q?AU1M$&C@YDx2F|n}kw}IbF1T!bwd%qVjf8%v= zI=1+zc4ni!QbtawrV~_2L3021s^wUKz*}llO#HjhLj+*jVo2N;p2|w!S`FL5m6HNq zqBq)IyBluqZsi(~Z3bXejP$>67Rp0IDzUJb?o5Z<#s>feM5%3@KD#ZGULR$Bt8RC% zHItACWgQ=uTPD|n{pXkrRD;F(DX=|E-7iDHoUYe+3qkW~I~=@I?2m6{(^5f%b$8!} zkKC-N)p`WPlI~3_0(xYiN=*S<91xGTQZgg;ne@*k5nlM~5Zk5K0WE0&;Y`W2X}=)I zC* zZ33tORDOp>2H*tTJ;)>a?JAea*!)ujIAY&S&#|}Q0sMH-J&YL*4#A36XTAc^<%ruP z?F^{M8L3^%ji(Bf-&qW7mt~O3JjopkzKBI3xr;ZOj+f1x)+57H4-J7Z@Khh|mtb!& zc0z2nm-jHN`PaXOe$bG zcBvZ&7@$pg-$N4io2KNcr8*00AnUd{cj3ZwaAzT|-G@&ThN5TVK5Ic5+QaKGsY2kl z*Dkmk^L_7K`LtRnsE#xRk`zHB9c^MXlEgul<*vD9wnka1t6c?+Fq`^TSNothR3E^Y1CWteG%dosAr-7{qE%DFIia^JHU8~zV71*|*L%IXcB6feS;iuO z^HixOJ^HeY(4HNJScq6zIe&9W{vYieU)xn3fJnJm^)gCd1DwBB?ie^19fNu zMIH9wQ4g=9S6DJ|jH|;Wf`q^>9$nWL8z9}an%)r5O9-q9#e zH{}5F_%4%{0Pc@3vWD~_JF!-*X@s!(GX-sv++ktyIPC#jK1Heoulb0rRw`+oFfc1i z<(d=Ruq5&%W#fXB`vbV@u_xby4u5fsL>P+_frnC`d#aF3jx@>CIG1giaI6L?IGHFkv+9Z)m(8rGB$H7tnn`UNHA25J_#B2#g zhYh7hs?k%B8>MtLzezyNsHV{_l`MD9hxCx^wX~SFZ=F6kXZMs6$ZFM<=B6i>rUVnh zQ^D_LssY{ory!tR1P(A5_X4XxpU?OHHUIc4vlQU$$lCA(ZP(3WcB-!w;8YNk;R5V4 z*%Br0gesYGSjL)uJ1u>j2gvc1(&y$xAsznt)wt!a6bd!8d1LzQQLv_zEV{o_mrDx93pgpDfP$!>W|74;u}sV z8S(Qu@%~+Ew_>|4UB3Mik{DOJ2)eEeMvAuF&oqD|)SYMI->9hNQ^X_n;ghs8Ywd%^ z`maY2fHaofIDm<6*Qnf6A%79i#U5Ab%2@h=nYJ%GLx{x+w(!^@H_@C71@;LzH0JzC@XXU-FJ1evH z%R+V)R%QZt6TpnDEEZM^!QOH?p=E5f5EK{l%#Yh7RhEwo<2lWw&Cbg(1K+pwbmtVR zYgu1NiGFK3mifZQkd9~@?GcYlL)oBJ1Q{!ToKzUuX^L|nW8!=fnP9E)a<^n0CLPIg z&uV@%ZC?1Lyj)Y1>2zef#XGanlrV{{I;e%@0N{UnfpZJBYKJEc176n+V+hp_6aP@i0KScm@UI#1*HYDxBI!>BMgX|abywvRRrlm?9WWug3MyS7SOp*# z0M0+p!c3fCAXi-NNoW@q7xT;;|4rj(9N#Fq-Sn`cs(kuy!(7|T#_^6?#>gZ-wIqYo zBeVGYBH)VET5)cl*yXad3EIF?qUqBaW|=(gEJ^6xQ2@IGNpwy4)W}BuEW_3X27tzl^W1OBbG(ba z_ZCi7zDmzG2RXw4bG9?gK&znrUDF8M+g?m4+oF+mcNkgVL`PMR+>2I$(7n_Z{KRru z`KH248+0Cyw_gGL-gQ^yGgbHGe;xY+p$WLtRZwXI@HGfJD*^xJ275dqcY75cH_J#~ zdd|sDoz*C|c~zQVbTZLsCGGKh-=nFtpV4gEn{@;LMck*{qU0ydV=Oz^Ec3wfrs_gk zF`GHrT0cENt7{Qe241M%Clc(5eQ9ZL1dS6Z~!^F$I%dqEi-y_nr zpDdRFpT9+E;1=UgX~%M_?FE()JJgdpA~H}RIHgtUnV#jwrA?GE(gQjFK6SQtnf9;K z{pjpq=s=10-PFb6Kl6*R$DV0c`<&ABR=L(KWK^=&Px7tyc>dRoz~{BVJ$+Pr6IGx( zYLnLU$2Yu@e)k@cPm>ROoj$bBpbX&8RrloY>W`3@0XQ@E#QP#-r;{N!|Hi>AI?K$C zozx&uI-mKjU4@UUjw*9JnSIU_!KPjC) z^v|FV1b?i$JKvL#kX;3p3jr(xKqpQ#kXQfXWC4KXv_N2@_^`pC?fv}^Bg!p*Xp;wc zA%~2RV~?53tm76ZJ!%u1UUK;vA{dxE>SB67E$Q{eP(#D*v z-k&jp`^-^b_OZtOjNk+%pj^z7K2sLEzcAg>48jc6`TwK|Id*w?aCOpo;YSKe)E!B= z7I~ljm52;fNh!iweqQ~u^t<;`)~x;{b^7o)-*2n#&VQl@A-f7HS!mf5qXE$2E{0MIV3#Ksnp-&&+cO?tE)Eku zQZDqYHT|C(AP4hdJn{%RW;reNgZ2EtUkb<5&8c~2ktH!6NTr+}`GQ|qzanjE1z3*m zmkf16?(2NFRo$KcKzBlZ7r=r8KJlM8A$KjSbO!%V^Qn&4OeK~&)?uI!6ku;CSzQ}C zRrnzK`=E>zdITuLVR`;J(mK-;Jd!nr`@tfCr<>$i{x`|3O@2e6c!(axBbt!AmMM<& zJUQ$X@vXcjCMWzq$I`uS>%`ze;)SD?kST!cItkg8UugwF697|RC!U$XlHy_x>FF#O zChm6tzz54CiXhMmv(+vyU+yjIF_uQ4lE;-N2uzd^xtokad3IaXircC%SLU|+nNa6x2I))ZR zFMO=ysKCTnLN4fQ&GXN*Fc+S0WxiP_&=sFW)gQNss-pCKlX%-yeg2vb9XfREJJMna zxzC0~$NtPn{C*X`{8g(QiO~K{eH}V<=+Ln*NM;5~$dM?;_Zvht647~AhYlS&hMJI# zeXaT3cLE(dmM2D|9zfNhLx+wb06XB(k`IEn;4u=)8M(VKkg(4j-e;9|g4 z9DaF?jaj_N%-C%V=ALL`1c5?KP&aGd=}n@?qYv!q(4j-ekP&iKwSuqL2)$N<>9CkZ zQ6JpXp+kp`AtmIGKZ&Rxe-epdU_Hx1hYlS&1`~S5y$&5Zbo|sT*P@0`6zxXn$rlm1t z3+=a$A~NKM;H@j4e2V&XDFP}r7)c1;AWyw1yZDfmxX3ljx=+s=x5{3mr~lt zE4jTXDD7RwG4kjXUyK}ShkO&<1JX_YAle2Xh;K&&fZ@$5Ys!#VQh_^eX0`@%lwOuZZ@huRY3d#!bK?l=iq6G^U&*X}_m& z`)*%m2pHZbv(^lOvt%E&0;%m+QVCiI0iJda&6 zOz_N-xQCW@+Yjxz-_CNFG~qMcLq`Eh7=|+T^eC5<72#70LR^X~de8}ZZ@GjkF1ImO z3sFMho{Bhqnl`6;Pno=bq(fyyg6p_wxPnn+o}qL&fNaXJthCHGq)V#_f_!>=$U}C9SNPyuW>@-S9irRVZ9oN$? zyO{Iuke4P8CQim$`>u{{m>9Ve?b?A38B-7f6& z>~(aWe>a)ZSUscKcZ$w+X{=6nt*nm=2w5mlxA{4?E9;5N(@I88e-F*}07> zw=qhjo)?)tR_C5(2w_T#FZ z_m!oTFi-&rO1RD-x7J#P+OJb+^bG?zD5m_WE#?u&dkzXAfA&RGz4jVA^ZVa9*vFp? z#F5FE(LDLXZyntC8$`9KS=nbo4*5Re!huQ#SWFmpF(nM842iKmNz5CO#8?-d@bxuP&;1aoiG1*;zck2?P6$DG-O!;o^>Gjvyncw`{&Wa*Mn^&72-PEjN>}Z|@f+}5dv0JLBkZBLst(Wc! zvQ&q*<~IzKUI2!f5NoM*l3zD6iM5cslLcZe<3X~J4~US_N4Ek>C4^euFjK0)p7o1x z!jQ-SyA=rjZ3bV}%4Ai(nh>TiMlL-q-~m|3G?9gzkdWK0hd2wF46=nBD_=r83Ax>p zSE(Fg0u?W(GKOT?mVZ&(fpm)q*RQb$_H4_f>Msdlv($J`D4vk_)j~$Bg}iTstPU0- zgNd;|na+En5(ZQen%Q9KbJ>Qp(SGa5vpoANLl96Zg&EK1Pmh-TvuuPpM~%07ds_Dc zwvb8R7V^O)WH9af?I2`AL0HYAj+8A+lbXIuPCn^(rHnaQN*HSGCCs@`6GNVSI-vgI za*w=Wqeuw>(wr=@+X$Au6IM@M(A-7F13)CSk?}NsZUFuahM9QO1@8&rVavQYY)YCb zdaM6xr)p%s21A35pIY1YmZzxlUkFIy(I-dFsyd3Vb91&r(Yy0+8KBC3$um#gvmPUW}UL;bUA7AZ8cB{Fn^`)iC%?>|0C^4)GH3T#lySE=fv|L-@^9Vz+%U2A zR2yNYstGK(qryUN{|$tps_6N_5~=#gnLO>*s(rDLrPe(b_vb6dg5F0!*tl~(nk?il zc`ERIeeVeC_ysk_yvhDSw~%|p+xFxACq{QML9dTv$VGaNOUF&%lGLQ!Uk7}(Pud5% zP1yalIoy(C1y0cg*fAht$(8JdmwSArkEIWE8~^Ti(ge?38^~0>7E3z}>Bof3uKBJ0 zEzjl*co0DG0c0>G!AM^!;ctlO&MC0_R$j*#1QpJaqzsUi=CD64$A$W74ECx0i?MXNeMZ>V zy3wKt9+ovZdzGVq*LRt~pLBif1=bN~d)n6Bmv45>Z6mCqR~ZF!s5mr-^54oOwiI15=LU2kGCmZfSUi7ti^ zv#$SrJp}2C!oJ!k>`8ey1`_=qY1?3wBFFIr`h>{7U@yG1HL&*uXVT~!n-h}A-Vah0 z;R0SuS<=y~9LHSJ5ZLxowqxS8^@-hHnS^##=7Rj6F04La$QmCEZ+knJiXoO5tjYls z@{}nC(%Pot+Ur{7XmsDZPWwD7c;Ghu&h+~_Wx-oUN>aF#L zGs8gfsOBNBB0rm8(RrFlrMf zbo2$=)T=7|-@W8Yntgrw0TXgvor20rnMR}guEUgykR>|-*de*l-(1ggvJ5=+tQ42j ze#*%ld-g((z3#?{2mt4wW8h9dh35!BC7GhJnX2zC7vzmU$enMjxpR2#(hE%nS02L( zBBfQes`BpgsQAg3f^@KMoF(2l!`%aP(l`~zY^4| zuCQ^VN_bMbOWG&tM}prlR6V&pm2B`aWfDsSvF9ndh7)qq@mwc?m5gMVaidx0sb>Yz zY@s;$1fIM6V!Pp&HwGiiKNF?-b9wIh$L-cv--?Q_zZ;EGO6jBtJUev?&mBxc24MiI z_OO9NO{=X`xpdHD$3L6IvP*B`jR2@hf#w!f{c4>eFZ)0eC;*F@ke8pb*Z@GKfV)*y z>zk;uZi6JQ{#FuW_jUUX7Q4?+)u&zw#|=y_KE-4{Wsbr8%R7ATgJvZgQWaGW^w7F+ z%?~Lce>@}%a>M1Ey(6v9AB4JXk1B55rgYXqSaKR?%T6a81rUrtscllE-PNjC-Jr(F zdD1A(G;KU*er8!T?q!pn!f+R#Vo3Sl7tz)xFC7$}HD*o^QFsgXZDDYuGB*E2A45@Wvn95%T)pBN21NL2$BUim=w zeDaMF0D!x$HDrw&!B_}DgAuAUwo-9#of`S?3ds|d=|O!dGv-u5@z)#Kq#WUZ2>HA9 z0$qBWS9#*G6n4dDQTpZTsN(giu^|fpKxLIoyB8RWhWE0Bx!|yPOSQJC^rim_5+M}- zctH@q_`q(x^dggC`DdcEXo1nNWt*%ly(bju$V2{Qr6_hyvp#rWjoFGU)UmNstHof{ z0Fr{iwnj432|4v-j=Sw%A*!gL$4zIsfBwy2oj!$Se|JwL%=5tf6M4gnuL_Y}WvY^r z3{sTOvNv91PhP)Sk}kPE=nVw5v4dkL@`h%&+9O6*GE9N#Fq z-SJ(gRn>sQ6}$E*O34Tn&GU{Dp-Ya;kcWM8GQqmNP$a1*>p%ax9C%~790UP=c`;=8lOWlgBcqXYMlRJadO-*x5G)D-VSn31?QRA~1wCcIu<#X|NHd zU`Q;?nNx@{F9+PkzfqdD?V=(WNR_}V9QV9W?&_`@}P`n^xfO;5chw{}bn zd2f~CfA&quEvj8Fii&zQ`sC|kOUJ|zvx(Haa+j&-(Hl%7kH10rq1CS*6c3oSXNpR= z)!3^AJ4*!6kfA;0{Pcjj9-cLl$B$u| zxwCn0>vk=M{Q5hBl#)!yrqwC-Cm*y~7M)=rK(~y zg4k`O*L%0OQc?c?d?d7Fq0wwHlf&{Jv*s*Wjx_R}x+sSjsyK#Bj@MkmTK0Zx$lSET zm{GIdnEmh_d{SRJ^v%d0cX13zh%zn%vg?xB3<;yW425*$feZs<-?-Qkm)?hI5bS zQx6*hVxTL|pJ!r3kz(QE7TM!b_bJPQs)tW6)saOE^Yse5#bO~OD}#{DTV>@hk46Ll zDBZ0nQ%~{+&R=Zc&p5@v|Ls1z<<^_5ru!caM&A2G5DzXPr>Tn6%5=$4BvdsX6w=Gh zVVH}~ zW-mU2G2VF#Yrp6;BS`tQfM%+1?r^owuQ@GI{q zfx0Gi%Be69hTWAks;bzpImb24RP^|%n4e7!YAB8LVY>{NkWD6nO`ApP@$9=E54H0z zNfe1JIlGMzsar9@`bMfQy(=sz3Q*susx@^=M`=X>Kp;rz^Z$;DFZ?$uW@i%e;N5of zt-rCE-(PWX30W((O=DhaVM3{SNRPPoQ;UsZ09PKv)HSH;wKqkA{cYp*YbTlPActiK zbB431RE{uR;ffFg)jA{zKfk)1vA+G`|F`$u(Qy^m|956y*{&{I#gg26!5tSc25e(v z;?PR~6O#~HAP#(~3B^Dlzfj^pAS8eT1e<1TnkhE!z4xkSS+aWB{>se!{#fm5ceN@u zk}TWro}+WLugsfw=g#NdxpNEkE%}c50RdmTnW>+CO}(?G5=%HB|7wEgWBZ)z zaoit%O%lFb!CZGesg*GRaM%FnpWr_$U8u{;b%&+%#Co67rry;rB;c-H2`Vi;wVcNY zwJ#_ao#6aeHxoh#K=^jjs1X7_Q5d07Qxc?FD83cRH$*CQ*SCFK_dwsLiybGx-M zINPiUQQGkW&U6pPf`v5zw2dL;Y!@!}$U>x74ic`oR1RreqR2s2BR9nAT%1)@aeAzf zX|KGi)&8`RdRtogBLt8f4`OL0)9a;!6QQvZB8t(qaN3BEnuj1UGN7S7HuIwC$F!>kGKV=g65I2CBq^VNk6qubWuBswpk;Ky;?HS6EeV;vEa&B&MuBMUgWVY9jQt7p{C;q5C{>dbCKFl(kjf+E_dH^w7|W4vl@>tW!sNurRL5NYq8 zF-4Xr1t==%*jn0Dt-wS~Vhs~gPL<-*4j_c4YMRuc_m{drGZaj zQ3<0Xhl)}(RE!)f$|p*x-q8Xc2n^{OTILFtObzgfb^&CsAMtk=GS8UlYQ>ltYWbKe z)v^)O)Uq)%m9p^bzFI-O^ZudL&R?KAS8QOu*0g=m2*DzW2puh?3IM>#O0L_?i1hDH zA~uLF=p$GH%W>>$0L%aYAOJ~3K~&nNn^e?ODhalX2v;p6unrqfRRjL!htye84%+mK zi4_1~$A0D?+y_jVT~1HKz43A}(Ig?f{Rne+q)hT=zLu?ik-L6l!?S*2#&#QqF{5Ro zX`J|Dc+y=yy-cmDiquLGVjSAhacu2+#@_gsroaA*EI#>&Bve%~K6ntp>o-z5|DS5B z1@o6z%F>&!h~nX+l-Aa9KB&JytX6<|e{*|l>lp9IZ7Zsl5F)43$mKV1*5QyAn^Kc8 ze)wM5I(@Qay7hi{AYdK=EMKQ8w_R(p&YB{dmj0-CIRFgqD~Ln-3DWEDdpq0{gZfSi zqNAVE03sHKh?{ZR_RH<9JDGOXRBU?oRoxXM{pM*?{~lO+;rFJlI}YmJW$Odp89NW@ zKFWY!GE%S|EYL%K%;N?N_KF&=mR2#XE#HuO%4A|ok1*R|3DH2U%eJ>%4CswSyB*Nx zT|6{)V=usRdMb!{MFD&JzZTKj*;kYJ|2!{e-2S+7qP!|#UnT_5V|R)vOIFg_{dufW zy*rbH(2Y}s#K&%vvwqm3SN^zFb9R<3=~e@B;c*IU*D0*IB^3aGsx~$QV5~xWuU4OZ zLDm1aNT)*wBV;xsIF_rhtvhH~`67V#KT@@?zSWw9w0j?NdwcaDcwm1*5)%+wwAim~ z*{SN4)r@ttAF}2>CYs{M`y&BaJ)@guuRUkBdHrUdn1FDc9ibh2b?urvT{SD$Yif|k z->gvm?|tI;y#10R@#(qD;qoxvucsic*`oUYzQEJrn^C&=q-0K;>Wbu}pVD>!xr@b&P*xfe`}H8ERa)Am2i7MWnairU`tA}vkE#f;S*{rJSDwhDIwCS@pZl!eQ4L+~WAA2q3_HaJy zR<{#SAd;`Fg3-ca##D{bSiF4rId|Q=ANxGR1`2{C0UXNJwXJ(KHI$6LBbSHNhY^t@ z-b=7Dg(|8DAhzkVPMicfcDhzM=N4q{-vP6#6fs~bjiPz8Bp**f`*~9$x$?OAj z{y5jB-KiE1?T@9weUL0k07r{>*}5INCs^e4>9>@Uq$70$~vw!B&hE= zdGzdEnrb@9&zxIl&^DzKi00y;2_BDi1W4BaWmq{K^`IlDC=CtYas%to3 zwXWX28$&oL1z5FS*BVz0X}ZmW$8`NruC7K@4C!cdg}+R|QbMB@ku7I*wNka*4(N(D zwoWJ@u^E73$m^WXmYp5{OnBM(dbJmYTbj6U^z_n3xeYZ(C>HHZIAJ*b#nI2PvAp{hF1)UF<$_79b(Gv!`$CcF{I)A&cnja)GY-jFJqk(ngAw#9Om|SsQ&^N*v}R^4l8Kt}qfcwMHHb ze@cuW{cvGSWh*_t%2jvBhEQK4yHHE3-l{w^2^KwVf=)?qdGYyp^6tNrgz@8Ktg0Le z3Mh|{$1wXgD_QYfsx)Do++=%k$uo6;4~$W1d5sOazkrD5-Z5?6j?A$xguXTS)B-WB zj&Q0VVoHt4M@v>#HSpa=64Mq)t2ts8tX-9+64X0}Usp^l|MeT3YMI>I7v$K-&M9aU zK%P0njIX)cf){@5VG|~mX|t}a&~CZCQlB!tT>Hf}721hn%K!dyf@m_umT^Hy=b~K7 z06fOXG^f>7EVfuuu5Qv5N{$<*h}JC{7?~rRC0E}2iT0kiH(7efmNTt}m=~)Cr&<7! zLmzjw54yeSjW2|`Z9wlLfXxQ8njy7#r(HO1H<5fVv}vgCts%lyk;zIn$kwRM+MGx5Te}O8u2k_MlBNlW*~AC2V#G5%v0@LFTV5o@)kxQJ)Z z!YupfJC3(>ZL0y9bAa4jy-AvEH~ zrE3LKI*rTjU5C&jgK<%$yYnTbW{=t0ZB~mu&vMcruPsNf0{F?0$0$-xZniPaC78QS zYL)MJ^5wrffK5-U0MuY!6mUA%Jl{9|(nk(KD|TC34anQJseJea60$TAp*LZ?j1`5$ z-u+s$nwuzh=eGD1o$>z~gB1j0tr|Ov->^9{?`d_!kU3$rV(n7nM(8Vpfni|mD)=Zd zuJ66APJ(aiF}+Go+2{mVZ!jb^8%{i~$&ypn5F} z)vkJ~pKZiV`Ph=!ssOcC1M(M3y=?7zg}?Vsk}zVpghVj_%nk>Jn{Tw@c~8X)cmKXx zQ`MGNfEN3B8lRl0bN&(l=;!sAsh)#^tLy_yT-HM_giWWke70v?<#uGc>j1xg-Y>iT zShb!CRa{arzZ0N4v*on=C zLM9AV3qn|rF&`gR&l*0)Rb3aBanRODv8DWfpa0h zN6th3qcM0G{+lxexhp;~VPfIdlxuwTd}%t^CN>Xw0Mv8E+Whb0nRXLKcwiV`0)DAs zJmew1q1flc`X9I!NANhx51EG|80($v8~k7q2ZVq{_#vav^MiiO;n(xv@6a~mx0}09z;*4od>@N5)kytWRYvwQNn&NlN-%z{E&G_PI1`(4aWo5;Q9&K*bkWppC6Jx1U!s~;rtJb8-@_S5r&X2Z~gh; zm@tHaQ-6uzKD?l-DQ!fJIp?z4)8!!`;GC+cYUSH~wW8 zha-5(!{4pJ_c-c*9LCeee#pEbFeE6K0DuGh2puDwg~pX|jxaC?J|EZ1X#IE~0vs@B zzQYSs^}55>_)F#H#r2aC&SMsHeGX>ka-&&1D$Is@YsmpM;DRpRW-N8kv{&K&Av+EHOdY#jor@Av& z_8ni6h$WH5k9^=b5==ka2#kotlP|mPkW#kKR=4F3J*jtsjD)M`xg3MQsfzr0UnOgm z+wGP?SDdhqz3%vF@vgNRa*LtTr>@;aeJvRGd$tjuXD^`|L7aC1gfan8I$)9-ysjw? zIn?gY(U2SZ{4+G>EhC)y0SPv4Nw`cQQW|Xo9ya>TxrTgIYfb*@ zLbI+>Jr(JQEPkNY7kiHX7^hU8v{S!TXTUW?y+soB70Jw7Bm#9|Bmgz{xwuTu8eQ9>M%;{s+=&1=vZIXF zg07VyT`NOWuf|X>v(3C%U?Md8`Dy3_3O%y{%p=|ah4X+%UW^*>uTdYuo4_VU_ zi_KbHg_TncMUG|T3UJ|lLlN&5YYcevbA(5YK{RHd7-JUIJ|Y4qjxIhSA=4)&cK2X& zg5KO5JSPA-Cg4U5PAuVWMv&SB;7*0PZ7R&2p}(E6{~gQ!*fQI6A6k~_&LFcL2*}19 zJWU(&(4i9g=))wkb*su} vK-DAgh-(_nt_Wz>G8s|ec$RL9ZGN@&05|FE_C@fy$ zWBK_3ZT!GNjeoJk$6{y%5y-D7+yG;P3^K@|(;&lSVJw#nlZ9cjFiaMm-DF|V`AfS0 zgrK<(i>fnE);uR9Mm-o9MWGz!9HGEAe}v!y0FSw90toXZk4-#cQ!K{)u~%jsngz4) z4cn&Li{99c^_Vd4o7iei_=$*3;-)sLA~#N(en%eh%%EpX@Kg{0FyUCV>0(^APfY0T zk&*^_qsuKBbe5YeqA5FDKsni@$*B<($_<-TrfG)N;%p(!naKTF3o9em;9eDUEe!XfK)j*k zSi`eIpP@*2UBr5F-_ zjsWtktIYVmd+aTST3>i^sajcS*pWLcG2MxMRjbV2icMDP_X-^P0KgT1g@+l!LVYAs zgo_(*Mzb}jGY}RzHl^yaCDkpbPIT1+JpkgsnIDwW)%Lob|LR74B{DH5DW;4G)s~zo zHAu7=83WH&Kwk2tkL}vsxX5N=B7sR4%Xr*{GJ5LSI=!yW0OQU`s%wu_SMX_^?xP~W z6@bXg9O1-r9zb>k#6cdQXVH;_u@tR{Xv{u_P(>fwvb+NdvqF zr#i`awbiEH+y@dG5y zzz}Zd+pP5D$DeuVh~W~>&Jv8=vYmju6)Vi8JN}sFD$a5M{}izBQ~-?6 zQtH(mlgA#At#7|~WTA$jgq0|(D004S)HvsuelI|}O%6C7MT3b+^0O%8r z$uAke*t$Vmw02SL=!>Ao%tpYvS$KOXlD;kKQj^XJ0Q_!tYB<#Y7Up zkjIvm$ynmHez%n;U;6GrZ~ltp$`!xwOTFbrHR3bzk!*`bvaxYWm8O`@ z2(mITv6vD1hT#wDV;dlnXs7EtZG z)mo^Q;q*z8dDAY{KX#ZX_vl81H~!~yp7X#gSXjc?=km4M{pPAw|JT>rYi6mn&ovds z%<6=IeDh6KeA5kwak*}}`%j)q0DxDYv?L!dF=;+O z=erN-=T%i@F>!z|Wy*pB)oUN>#gtmXK4i{GV}^AyKvonEE?47;URkO0HR}|6=uyJIiaju$if z(mxe93d@MLeGgTi_^Zze2w=&7tVvTZ7EK>4R=mHx*<`g@5E^&2vlJl?FTIJJhgT+K zyzzm*Zr>5A0RZedq$>~o#ZwJ2gHFzMbs0h8MK2$%-TX{W-L}`d#f^Nh$e3xJ2#`Nt z>}8)X_J-%OXd!K#K^;LgdH;;_*N!(KbnQ9$eu@HImSV%9BmwfZkUQnum0C!<-FJwp zBZd&^gT>$-J(S281A6DL)}-Khub=aQy#*-<$jjGjzVlta62?B2U%UPPb#v`|zpH)F zZKcMH>m-0|Q0F7fmnZnDt1SqwJ!jwXXda{8(lJhmN2n&u$6XWw`u8Tn!Y`T!O}D4v z9?Aen{r)EB07vqf_Mb(HE9mz2&L@7?u|gIqMp<6Pj1tNK5I^dnqVi?42U>bguOjAT zBP6>WsnuQuZf6OoO=uh@;PlP;vC@D5BQuPykT*y{nDDa zb1&5f^d&-VP2H!TT0vaMvpHeG$?ZGW?se&6|6@mw}hG#^|Z zpZ?=I)yFx&xDldh=5L%QPnR!8cMA1}l8*IDrN zX=a?8r}MpgRqk|go}Na~xC>>>IKaoBdMK;6G9v`Mut?{NKJii`Qm={MKO;)0I`_4B zU(K)02=x!-V2kK)L*!Xh$(yJWRB+Zr>PZs7s0)bDBO8s0Q`c% zL{t>c_Z_C%_)&ti`v6tl-oP_^WFaDo2#(}YJs6cYdZ-}v?}bH=kMqsDb^nP{rUL+s zA1TOt4(Y1f%Nd-bk$R!}f5AQn_{{)EjCZiEBKI9%o}fF6Wc!diPM($wpJQ|IjHcf# zDAeJCp%QxP**dy#k%xt6oN+iX{NuF*At@2V!;jVKF<;D}HYLq-TtcYtdBbB>1z5j@ zYU{U9tx*_sJy8mT0+g<{xKz^gUa4>+04$Tn))={rUCVbtNox+8_Xs zyN+^t^S*HU<3-dkRdfI$WK;n#=nTjm77V#-M{0dOydDvm%{3Ng+Bepv2jkN>$=Gg#U&B-wka-imz|gfBQF zAHeH=NrVCY5#}8D(Ok~ITTbvw49O`Z#-bgM&38RRl%UnekG003;*r0}UT%Jn<$tkR!-zK+g+-9`WJ zv08oFmF3!f4_0eVr;*B{qsW?kp%0lh8W zRbM_z0oJWo___^BB>Ebr{tniVhpD3FQ&saGlK}NPBbw>vt(3m>s-^-0`12#8boU%l z{Nk%X9*FT{2^l&FlapnffBn6#>N}8<)g9wLJuz9fBJjI!FHB4_ z!0rP9pzEH6$>a${zy#ojmAZPoByc=C6O+s|go;WSyX+!C+JA&nW zzbh!8BZm-S*$4L2y@wl8ZHgkGnU_kY%rq?QKSI@?HU*B4879b17o&&r8rmJyN04L* zVEcYeIh;>br<;f7K%5=nX%l5jMk*$`C#be;o#N5-fXm&`zJfe{m}K!OoPM=haaB1R zfP7eA(KKP0WM!Q5RofNUfqcDF79#Z(E>9rVu71JZ%_x-Gj*F0R4Y@e_?69E{8ZknO zfLcjHV2=^7*RPL=?*6Tf7~#?#M~QvrRwMkUPGKgfs^O5B5Lj_N`-CWe{()@m+Z&T- z9~Vt4mYQvn1fZ&%zxRg8n%ylB;{3>il6lcPCVQ9EK&6i-=E~-AqXiKF;L0h2wES~R z+_+Ihyl^BDS1qw7TrfCL{o|4eg80UZX2+5R*7$*aiI5nNTD8*KzDL)-S)ux_zcP@> z-fl%`{@Qxz?1S z{R9~Rpnp#yZCsR?efN##1e*onYp0qVLwbu60Kok>TM`z&6ra_vyC6@WC_8?7C$VSO zBrE^`Jav~X^>2T0WF$BcNlzx?tRgr7od)?y4JW^=Px^|^np*cYQ-CZ_p zw_&*Dw#v{K{g#`o`0+;_r1yZ52;=^sK_Z^}fJ69nv6p#$MxoP=AR;C)d-^z+v-lZ1 zf~PwC`Q0)xnlzD+fddeE@E%c`|E8v7W+42)J)%5mhR?loH={%VIK0(jpMA3^y}dwF zH*KZ*xKk4e^i9}fVIa4Q&CF1k1C_aP$UYTdIJvvYEeDFtort}=6Y0}siYL0wXYRKqZQP}K=RD~w z4Ug38nu5tAbF5viytgKQ_YqwI0RH|9aTyQ%%9`}pd}rD838uKm-*6TGw57hy`bfRb zg~kk3t(@D(KIrx$L}bGz*@1w3z~IN(N4B)9-JE>}u9CTSgkSDZ+tHYjm?R|%=vW?S z_xwTiuUbd7D=sHObv5TZcL$c`lmaYYMfIVBumAw+s&!PKG=Yfgw@|&hhO;H#>guHN zg1G-6rK$#S_!y%(Ss15vL3qaHf^@}XA_4;Fl7etnCJt>R?>|hnvI>660AZ2<`Rh}5 zjv6Y+Rtv)ad8u9#M!*$~^Zq@FxO{`=U%5&1{%V$Nd;Se?%`Lx>ZQrj^JuXjU&>YfN zFg^KqccaQ0!~2US#)02|vo$FgR-4&{NLF(|qyOXwU-es$JF?d7P+cGY;II90v%gbS zCE--Tl|S9n*V_B4QghCf8e_J#JC%e3@@4=i2Y^(AFJ~9oGp=i2_Zzc3c_I! zVS%pO6tE?89%$#2rJ7Px!&xxThN=S#Gm)IuDs1EsLCP(pq37&BOw|vU)F&cBffSsF zas%f-`ciQ}H`ki@mp8pNS5J}c_s?^e$7+*t08wZhWX(B%t^sjsF!XAB1f-02B? zNM8QHQ?+=dzwXAV=Jq2wZq&j1kbqH+_ z+1?5Zau@)7ZSdsmBunZPZ(^@$)c{umu=Qtb;k#ouqYgVlqlO2xS(6Fi(u;|(V>hJ$ z0K4`wDhPn?yiJr>uG6)WQqFvS&TqY5lvk|}0Ab+?#)?le+NTF5o3>Le__u2x)lb{J zLjWF_W3r7HLgc@{qqqS8Hg4DbqlXcB)6RzUo11s(N=;n=Fqf@Xy%rPT$M3czPzHR} z=GZQ7JNE1TD<{de=;K@WYkolh6lX(Z!!FGi{5y~r*to+OprC|mFTUrlxc9}nqOpTT zduNa(Z|;($sujQMA2;d``Q~m07bd+;|b(^R*?NUKnw>bh6 zL*@Vg1tdvCK~w;+Yc^2r&Ra#(Piys%N5g%OD(-jZo9r{E3exsHRO^|8g|Z4x?|szQ zYCqVKLj>u|_iRaaE5hBguuxRO^c(N>R30m!Iv{}8-u1gK9xIp*{1~6{<2ubJNdV(V zh^Dbu*A;vGoKp(0_y^Vfz-)8EKi>B>sgwVCzNhl@`Hqb3pC#t3+@gAVXA9C_{_UyU zyjS!6`E_^c>yJA!b{*Edc|}y|-$O91-mbd;`d@eDj)lp6Htg2iP7k9KhfDSkzVV&W zf}*-JU#{EsT#l67-2AL&6_J!AAT)~X(I^WJ2}Fs zye-pj4(NxmPhmX2Ai|~^IzMP2!b1mPTvE#U>h)A>5HrrZXJee2ity&`0gX5#9pN6? z2(Q~*?_yT}tb_!FCXOLOVglfTB2L$D4Y<#xbwM~a8KFG~X=G->U`k5h&^;UDoJ=fm z0AB0l?05;IHMNX3q|1bmj7}IyA zZsF58HL(DB008U)0QAQA@(WaRZP$moO;K9g?%~vv}Q4 zM1VUuBIDWFm=8G$cq7wq#sK7qV@=(Ig3srTjs*cZERXRymJgY8-|?>#eEEx0uqj@( z55B!vN*?TOR~a?{xvBnsQTTMuX85T}0ZKe^Jbl&*@W-XhtQ zKCU`x@~eliWT!@8*BPT@0I)Pn$BB)f+1(4?0|dWn$1kCwA)leIv*ybaz2&Pc{_4GE zrVAKg976bFhDa|CAQ>9+IiewR>cLvwepxA7?a*rX+7Kp8?m7Y30Vn>V#*#gyT8Qti zbhr!~b1?dM6#)FH@R^+2)&Q~$2o?gsOaqY5-Q^Mo4JkF7WMAcWi{>ek7^Rpqi~za< zp#FfM7YF3v2s;3fonh?YfXoIUpJ71e)Qy<#BwVkCTq8ZGi`yV}ok^K$796{8}H=Jyyj8eGv z9%vx?ePUbInm!-VcOJXnO}%eS`R2`?4}fy4?!S|}22Iu@-I%MM+P z@8J^@2Y84%SwAHiFaWuu`+Ecsyju87PF-X1Y=wV)c8`K90Ks1YpsxYQ=LaC4HT~~c z{>PTtru)#cOm_yEH2}Gz`s;^4tjE&AXLDlu)VB(d0RXal77zfK4FG=xfL;b58-Q#8 zvH{2jAh)W&UO=!G02UWMo6~G~e5(OD3Y_}`f|&p?0RYkfperCqg7Eyx1|S=NYyh$W y$mbs*djX&Z5Yz&|2>{p%00#=^<+Lhy_WuWQ($^k-s2xoJ0000}K^F!T=>$RJqNot0 zhYndvZwn-pBoHY90)%1+0RkuPbI$I2-+k|Me`RFO@yu_`@s0A1cYe=IjSYB@i5>$0 zfcN&To8|z(c@zLZIBpL1mFbghQtY2Y9@mVn0l=peo;~No?Ee};`qn`fe(ph`&H-+K zwUv~WTR`ALKbX`NrArr`rKHT=LNui=T~@vfQHH2Uonx;c1$Pc|@szrxboo5-q|$8w zkOFSsyk;4OS|Ms>OxCq4neK(&Eg)+w6vRoSC4RdWY}$78s@UOUFezK7m%yQB$+5`r z;Cp6KdS`Av(vO)wAWAX-K#%+M7OnI298W#Bfx`e-L@e&5=ZNyF&iCcZoj9n+*A@^UhFYXf_N zkFU8W_a)NFgVE8nSL967IAz|^UCY(6`oX1kEN|-cwp2j+n~JaV*b(?ks%kQ7V(o({ z36a^cq(qve&3$R`cEtQqctp#Vo)Zom-<{EUZl|hWzXcLV#^B{ASV|_=cUSQn&g6{_ z&^UL<+SU5t6#pjlw&;SPZZRfI6G14 z!p+1k-1UIAq@lti9hZHk#}G+G!S|aBPac|T#nmD`o#974`jvVR4Pf01ozU|50LSIe z{3?Daukl({W{cquhO-&vsk?5u&0~s^Lax$d_i30i2ZhOAoW-h1z3YLU;)U`Cvze2n zp?!txxVU|2d8IEjK58;$V?_W`E2R)Vc{>`}hmELuufMfefq2_9wd&5#^TVUv_Qz7M ze0LDeqBUlCX#G+rcuQ^eXNMZrutkxw9n<$uZjvS~mPrlhqROjUR6nXnn3R zvj)5@5%5tGnSBodRxW3W%{SPPknnOz0r?qx*-ac0j#Ne`0089KyS8QK(FB{ z?~w#Mbq>!wr$hE-V9`V_~+zaYIgz;ihA05HYg;0U9Y|R)=J?-(QNxRHV3Q6C| zV+mLS(4PM~Q2#cm=980HR6It%8#ElXzsY3MJe-f*{k|~*8Uc|;W6gxZ+@F3L8#n8_ zl4?2RZNX*AWxW+1J~09SXU4e!sZ`|u2sQ=EY8R&z2|~7b=a$hFH>*H?hMQH8iewKv zp(2Yp`)n)u>R>k;VA;6Am6?pF^Xhq<^2?^d1p?_Eu@nq3+Ve# z4Z3MXf#!38wo0c;IPYEF(r_xO#RW^-1Vt0X=SA-obG|i^4hSyDOtd@W^}^?n*=p8; z^)t=E6T7wkY~#)dBhOjJ+;ca-U1p@l5mN=T>Sy)R**@9E9Ze~7KrFC65?9*USsQl4 z6ZWf`YD}^EJ0rNcPkPc*#aBpR|5mc6etbftqv?;EKxcrTO}wl0Q?D;70gyLFOL|(V zyR~?xjd-1!uUA!ZWGc_Tn2-4zzD_-4aS5kAG3?y~yIh}}Nyj>>@nnp;2~1P&ZW$+b zaj7-^M9B9s{kl`*+&i*jmmWUW1QZ9S{@RUy_UFG5Y;?eM2}e{^&iZ3|@BOcF-ecY@ zc8!=!SKjEtumnJ@ZKVOkh2TfQZ|#4Tv*T!0OP(yOfr@5fjm`K0C7KH|og~Tdcpk<& z-prNc0mUK+^;d%8d%V|471+h$(QH(u)*QqnG$Pcn$r)l`genQRf#nwgaw-hfM3?k` z#bcV*)_1VEHth^T<%s61!1)Z`_+pjKCcKGQLur?-$)iqSFsHi0Y>pW`l~DP~)=^pI zD*kFT3rBUujz^UE&xe4fFRRtVsxpW3=<3uzMtm6r_ap#*On3n5GPfhIT}mXW_$=A@ z*`6LYKMEkVRuNu@!H*MMFWUGGgQq}vYEL?$K6eA~9EReNsfZ7O0qVcdb7F<=Q{Xj( z-_YI7V@1d3aVm>m0GIBj}Y6miH5Q$g5CR16mEY#DpWqe3|qm_=7o3 zxf8OG8{xx#nFyP;pDo?g*FNjc5>VLBuO##Oi2$mz-`DF(e(n&$xU=H7oSJqfKg$}2 z;twCGH0n)8y0Jn(|=*3x+Ya2tsbChvVD@eRaIfQ9=BlO~Hl9XQ4=T|p`kX{F( zua~JjQ;M!{?#n~!|3I}NzhqQy$Ye$Xb>%oWbhZnBvoGfo6lu2NsOq9CbnL*UvEu#` zeN&Xzd{}4JRir8n1iz%^fu2pzU8SdX;S`1D^9dCem8IS7DWWo$&*Qu5uTrYm`#a%Z z&^*?aY1MS$lLI3&r@e)^GwE%KK4ua2u-yp$O7ymv+z8SNxuL3lU;;L9+V$x3 zGUAMR$F`$-&ivL~fk6XT+zOAW$n*NVVh7!`avZm7J4iAb{E0tXRhy~R-_tGn_^5y9 zbEJASub(d!b}rO$teCxMduX)y1!Y@r$s6|Q)l;s@0uk%9sj?M$jZfZ)^VeD!7 z*Sf`E#ZGbEz+D@0&o)TK(6tMvt|jmnGmIwxSi=V6GMCf5KZq>-LaeK4*OSL0O8Hd2 zrHvQki!D8~<$LcJuQz>e=to$tD+O7bygx_Ht@QF?Y zsFi{5jDq@ai)%bZOWbV9jY98N^}gg0QyoAP=Wj*47-ohOTXY}zO|`>SmX4^bYP#r- zb`+3NP5l!l3>v?yxQDKhLorUWkpl<0)I*!ENDPiy%~SVN&|Ire!1C_Wa{R) zO#b#t29N!cFhO=WD_;U0EDUr-Uo1SJS3v?<7zO;*5bE4ze4})Sw>9eQp~ni0`Mt`ntZ8P%GD$-`A8ZE=JmD9j1*!~L2-g#fZ!oC^sdJw2+;^A(wN z9v?f~Y{eyd8hkAuEdg1AY8?{@pGhs(X8msu{5LiG|NE_-td?If2hH=CL%=lmygQnW zg_X?tfEek)!Xtl`3;zZH_lXPd;xUd%X`F@3J<8_h)Iif6P;2mowX3Qryv_y^6t32a zDz?9FR2%!34Bq@B_?{ajJ8_LKq1=tmKcZR?1-s{{GCj;Vu$4ojYndd$uReuixw;z_)Y!5lkPR<(9E9qMV{7SWqua14_f=28yLuS0M)E?DZ5 z5A78{<9IWMN$c44ZJDjvU!WEGdG9*B_xrrtynKnOH-ve}VKI8QKxr+uvy# zt54pkcG%E{J(%%6TC^KgCO;1H2QRf=^Rz(g56loZ^S=nBs#H|DjP;XPq+Ibx|`7oxx-@X_?1+Nn&4Ydt!uFlN_lEFD>>@=I?~6$cJ`DiVKMgVoFUx$C8S{ z$nqqx96LmDXCOr-;6&{zUD80sr{QG_wRbK5u#r8XW45j;Pjk}0&xh|%G%#y+FU*mD zCwM7Peky5*?iqe%TQWs}%Usc2BFz+1PPo6k479HDMP9)Lb+xLXvg~Re_2X+2&Qq!_ zo!4P!AjX$Z(Mh1`)T)wFPmGWAtR|4<(?ErG)x0PF-tJU=r^J!+SQeW-A8j~rp2vY+ za^a7vXG%sOxC+<}Z8udw{=K%;OmHN{Jr@;d`O1!wn9WKoL>S`q=ZlqpX!`%RW_u;L zA%$t@YTLzglGvl@*Kqu9|9$I_btm;Di=0L}+2CHwOyNqOYoa1BHl*Y0rR;q*zj#mM zooS|hL?A3=pR{aYXjsOZH^ygx)q(`ljY zdPnEZ@X9Tj9cslchv(bSZss<&!dpM^fgNv%?w;q(jA(fF@G$k{!wJ&W>HWh6{vYhr zMU&5DUA@00+w7ZH;utj!2~1Lcbca}6n%G-Z<>R=#Bd+fIb{`6e^=*t76XY!+fz039 zucB)lbScH{Dcv$n*}}}U!lrSi7Hr}s5(bF<`biS>zhFDd+dc6#yWVJ|1zzt0`=T;A7f*LF{5s|zg@%;jVE{?;9tmYK7+fU*?=9@&lKdva~K zcQ*EE2*DJVhduHUf9rYD*=MVsx1S_Ioo9~&xX++zDPt6JNpeqTDHd!nX=*e%x|TW+ zmyLE8>wlen_!eKjqCTh`DOg)FcjTnlWMBBksPNQaT>O3Iiq}Q=ZrWBi3t~=A>GE!+z5PXm{YKT^>hF zI%>Y&jOLn81z9W{QNbR)fbD03BNQD1DN%lTeziJ^CO_SAm@1VQ5oxgK&c7Xcqy2|* z25O?g(P89Xo9I7E7mr=>xFNV2hFQ+DsHC@}R4r1+KkSRoy`3Cmqp4ANHG6W1fw)RT zbHf!oev<-{**X8OxP!kP$^Mb~_;F>yg~rkP8YWrGF1M&t*H0N!B2rHlT-7cHXRZ;_ z?VE^Rj3 zRpNP*797pD$AQYOt;gFpeVa)W`R66G4-#}Y_rfa&79AT-Lp-RmNJ8n@LDI*4U^0JzRgZYHd6 z*No)|)r>_(U8s_{?lT2+u7^E7{*AHmry%@Oe?O>8Jnpf5WljJ_9^l73 zW5=UCsoi#6yLlh{4J^`pqJ4@1ZZ=^~)y$E)DJh?q^tPw2QT3uyHkVrQKR-Dy#^sRx zaK_~`8%bbH3L0!%RtPV`=mVJ3X*yq0Xp-~PuOrD}cN_8DEni#7vdy$Yd@n0_E9Cps zVLvi${(9kARnSyr?>nY_J&ew zjkA%mD0*T`b2C8nyB=!j_n_}vlZb3%5*r8D|9+U7N5_cDiXDq>S~Z%9>3@lQ&2$g8PuEiETMF@JVWAcIFKU%!8D)seBhMecgW25((A`Sj z+X~K29-BHh&SZRL$$S)B628x@kP)N5i-Xj@RtsjnD^c$;rL~uDI_9Q!#KNwcUz!N| z-N&*xiC3rBb32n7LDLS6oS>&svtGIJ$c}*6xk!5L?KujW7%>igP5P}Bt)}@t4>lp& z-}9=b^D8Kr(+1A&eFcPZZTx1$^0zl-9Ruc~M-_nbZ0*UB2z!#3lD|oAB|eOh`zG{d z)YuG|X|e3m(=BIcuWSLow2m*cP)5iP&xk6)$pR+|5S>s`xrr zqXy-NSNq8sU2%tr{2tN9sVAM|ZP9S5?J$rb14c-D0eUk(3b!ZIM`c9^!vxD8)Em8& zEsi4i&@Rbh@6z}0!m2`F5vxi$TUEvUmpdYeAT&d%=R|s&=k~2vvl9s>zo1NClNNI5 zwp=mZWA#S9l~<^}yA$s3yJWghpDeetwpw4z>Ky?F(~K(3F!qJJV!O_j#zxY{FgT@~ zmzT0^+=V4TP%C&>y9S4rLJ-(63@TFIE?t5Q}k59idq>H7((OIT5M1xhQFt#^YClc z(W8JtO_bVuv23`8+j9IARamn6jqCOI`PSBfSW6eV1WRskx_!5sM1vMEEt*U!gl123 z06l*xSvue*gw>uQIHz$Q;YWYZ-if&zmhzMfQ9;HuRen4=ZzLo5twy+Re$e=m0AJcCgCxyQmq17Ik924WDtImn2W z%NTNa!mt9^Kb7BETuJB6(Go3N*gAW-WzcKZR0a9zc4M4STflm>aQs|o_B*Y1=g{uQ zAB0_m2M(uEBII%R17dzZ>~ixmM@IUcN5zeYfy9cyXf)GfF6WwXgUeZ%;NcA7O*eAS zOz1tBXTWI?`%TA$Bj-glvD;M!A0*n!!KM(2zVXqu*t2XRPTCy}k=u5jLX*DxmVsCP zFje(J54XQPqQRyD7hH6e0_YFgw95ZyUkFx@PXSr(>1@m{_f<|(OIKyHjfQ?}^5#}k zJ`XD_Ae41L_jcwIyb!UqOSz zPQAmrm1bO^JWd`U@)tc?pLKDI-1IExEVxGLghGDI9@Y+9+%5u0#i-EN8=3~`hNn0H zU#|~iK5%r`L-+P86F|XXHk~MFyf^UsAT?=or&@h~5Z=FfN6=7)Rpb&h$ zZm>BzE6TnrJ-OEcQ9yp}&x#)1gVI^)wouIP-svlcvRzdZz^;myT*@g^6^&zX9 z)&r*!ewzqmbCxQUeyHDY*W<^Z#(h_CabF#yY-ZjH0LS}ZBNOI3;`GfwPd?~X_E_ap zZQ};!>%ttDv%B#x0x-!dN%q<95xh?^(ayAWZeZH5-=A2#|8VU}KG@MAYTLVFGr-7k zdA8z7Y0Jjw@FUf%CXYUV0%V&I}{C;~IAYcr559 z?V9=77k)+B!0J@hb)sh?qVI)|%1h-x##glLI2sfPZ3VC@T(j(LN1p;nlOP$fw(M2l zHtB|*t<*SnWq>eRykVK)<&QN;wiJ?O({A6o5>YB{8fhcVb7YMXWXKqP)@P(p?Lc7N zd#v`SF8(+B9Dd9p87}7I62{D?0XLc5qjgtLKmI{a5hQ9O>kgRYnSInL$DKNU;iD;Q zT6?6;yjj-v-VlQ4hgR)iw72ti;q`4b9NvNEWS@UxNDO}1C-6HM0 zM&4uT)qkCyOj~2cAM4QJyQ;mvcR-hD5Oi@1d&Es9<%jnf7PJh>7b002zIMyxcoIpe zAA~^I(>+ZTgMr{_sjXgUSJLe!E@CJq?mJALJ)8NwObErC<>Fn^K3=NM3L0_^(`MSu zB}R17F0>Al%fNFvkL4wkF1^=3AI?RC-@qQv&?+BwtUOP+-dGdxv!;D{{HN7yiZ-X1 z5_s;T|9c75od@CCxUlabB?!qlHL)PA`xomj(#39R8mUcuexFH53AYn^4tSz`EZuBc zeoH^b**gn9c0$Z;xntwX3eOcwrRIX!7uRu)az6F=%&4)M_g6i_*F{%Q7w4m`P&OFx ztLpv8dVk+7RS4K#y}s!6MaKmm=8kH3Yfkz0))QqvO>F=5u0%$&3RM%F5ZskF0W zBN{!t_SGJhlJ+N*t9rv=(a$nuuRe0`XAVG>4FUk5=JY=>LVwQ@l~=1uaPW!^i?q-x z1njI#lZm#>nuy^!v3PwkSS0=%tN(e?S6c1$_#(~vLr5BZ9YeHjb4L*lj z7a}vSQ>r4CDxGq_kX*+4%oSA--OyGc2lekqGDVW*!j;Wgu$=G@Av}}`@$^umxn^)f z;J`itKgB)Pxd|WdoXW$iIrGcXPDkH;hHv?VyKH9VX*B6REXQi@f$EK#bE*0&QL1~M zt-O;PiT@yy>(XxCrQg4g$V3*LR&@~#PORq5mUe+@qbyf-D(u9wLZ-&U4Q}g{%oa8E zHS1`x*siN@lR;HBFfo%t6!+ zZfX+5%9v0|bjz%ESw|p9-RKs!dp9K{V?ULxv#tI6&x?O<;s0;KU)a)7^sjIE3iwQE z2dgQOa}DzxI&n#>w>ptM*#W?9edC*D*PY`2 E3%(Y_v;Y7A literal 0 HcmV?d00001 diff --git a/docs/images/simple.png b/docs/images/simple.png new file mode 100644 index 0000000000000000000000000000000000000000..d30355f3cd163fca81d9e9d484cc20b4bcbd44ab GIT binary patch literal 10145 zcmV;SCtlczP)Mg6P=?G5gT7W)(t1d15V( z!^K8;H+F&&MlG<_G4{xzH3de(4j18BO^m}i52FajMn7OZFjE2g0Z~FoGD0mOH4>%} zKSH$H*p>k|7D6D@fDrm?gb~;gH7E0{Jbmikn>RBnv#PRNed5xjsdA`oH#KtF>&_n*-Mu${qc`~q(abh=FgvB zC{!uYKSQ&u*X#J&c#|>9!-o(5>Q}#d?X}mAA3uKT)TuLP&P+~DB1=-eR4SnwY+52? z`a#&ON|toF*ZhNoc`Xk_Q0Qi zbq&(h^S`3}0QFB8GE5;e{8D9656I=+W0-fBmhu-r_7HDweV=SN-IUIdos4 zs$@wDaUI~AvV82Z$DVlNiKm`=>bd8h8yy`5w3J7=T#lRN*w|QMa2Q!~#$h!~Sw8&m z!#j5D*u8uA{{8z89y|zW<7W9!4>rEK1a^9N`JW> zr)0@bHm9(ZoS&^euld|UN=@$fl@!yVXb-)S->zM|Mn*=YnM|IaSMe=&!=m5Tty_2Q z+$n8j#`)FjMVa54HEY;Pkf7lXuB&V@D4Fvk2Y~Bysx1vnM6uvENx?ty^cw?_UfsHN z>yTfqR-+6C2M5jh(VJq(&nh5*Y`ZB-DhjS~1GThdKtl2hw-vge$)*h0Z^Jd!_Tt5h zLyHJ=*l@~I`NeL^IWsm%{rydjb5W!;GHJ58_Tos#O$21hN^~c`M$pQaO;QLEsMhJVzf6?ssIXAw83tKWcQT1*CSDY}%V|zWMgsZ&QO$X6C~WKRkc_{6`;s z1p6i}EZ#p^FENYPZ46<|UVQOIvS%;9{4$xeS6_XV4Cxzhyg|0~op;`O@4fdv_}~Lr zRH>m8`170+XjrY*iSpF?l*+@D=)#_chbJicKdHB&;ei7O$gn*7?6YKBUV7=JFi6=X zWS}9LdTL6C>kW3ko833f3@b_YA(0<@-tw=aA@Pd(dQU$2Bz57m1bRP=y%WB(vY+o zxM!694h;=8`%oqgk^bzj@3r)hA&P^^8gAOOiTclvJo3o)?c1sEE+JjCXb~GS>8$7& zhWRcA4e7_MA^uX|+w*Mv{#uxZl&=2LPs23y+jR9SGR&|6x~V{MsS^#~2<1j%Bw2In zSwlm;Gas!X5^31YozN&WOMxiLwrU5q*owv+#o{3uP%wFVP7c|Pk>5H zUacH_g+5N;SF=irV(7lY2WSLiHe5|yYmLB#Z5<&ZpV=QeX?pykt?!&bRYfJbPMURS zqmV%vyDM=ANCJhsr=hWFaYH1_d^3EOUFcOz)UhDZI~H6i@$*$DP2^~LwslDwQlZIT zIePRcxuE2l9Y21YyzNt`PEoJo%$YOfZBI^4e*E#rpMCb(pZ@eG_DCU$%Vr!JiO|pq z9Lt8^3PIJ(HH_?1T)cRZl)QZTvaVqpU8fce(fEe_Griy~J#^?0DM`*JDM`-f`1m;W zCr+F=aq{Fz>Q9_LefsR#vllL0xOC}~QA2is$g_!=Z?}0E*=gc_Fx|Xn&6+IVQbq7w zHm0RgIi-1ohSZHXc<>-8dHC?*BS(%{Xvsb|YdB|4zx2NoXh`;*dbHHFC6}e**5mYm zF>c(3hLPPurX@5)=P(t9@Vw!;q1=9&j?a$OtJ(Eg30kp(Qse8EE*u zzrSzUZTCsPl=}N&z1}blbz`kGchE4h;|p5;;0Hg*OhXdV@VdWTiSDn(^N!T8(P~1K z0Y7L+z5AUzckbT3d+*-8`}gk;qvh(=t25S+00f5aP|dAPTKX1J!}voOl%S!pYp>Jt zuDkAH4bh^qV&oMh)9{N6Z-R#C1iRHroc>|kJlwo_Gby=k+cr{i*REY*w7m1qJLPDA z5yLngd{4t~f7^wIiF&}18tM)MG~Bpx<3kTUv}MZ{eLM(?(`x>St2^eMhLeS)tP4Pg(b zYC#O=*fb>dBoD{N#$t|QSTU^YABFWTSRaf;&FSlx<>vmx)cBgf(1smrs9;#F#ln!% zyubP9sbwf*ElW}eLbt4bPTlsh7&7CLHD$F52`R}#HT1SqrPE&?V(Tlk3~Eq|MITxw zYMdLdUkMGrR#=IF;P@j^VS{L>d&@wZd!w;G-0b_w0UOe-9E`OoZ$8--46%`V`nN3@ z!raRN#kd-pgaFhBOLcLB*;}Z=%?y9SN}}|nHpX(~L#lxglGHebVo2(d#g~&7X*7&f zk6cZD10`IFVs0?9=!#WAZS?89p+s(Gl4;mq(I4lJ1xID+PqXt&=!OiLy4sjxdp#RZ zL-N;}B#fhB7DJ3s5`|`gVt|)HgUp*Z&-jo=Fkaedb%XJ!<^}%8=DtBj$ZJt2T88w4 zr(`P_DdqQ52MxRhZ`x}ZDWLIKXM{&``zoWzkcl4vE#>&zxn2yZ@u-_$&)AFdFP#piHY~#d++q=(;s~B z!G|Ayc<$V}3l}a-PELOG(MKPD{P8EBeDdk1pMLh)XHKwg!ZnG%4%F+va&k3x!-+r5bJay{SyYIgH z{`>C($g^k9o=rPlSqLLUf$*7Uo;i5%;B(JC_reP=y!hga=}E~DmRlz`xr3_!#w}{c zA(Sn3sZ{1vsZ=B95+f5H#m{$>EYVIX3WNs^9QegAe)06vPh(yrJt-xG<x zA=M^kN2yjZ9lD`9>W!GXW3}3N6NB<_f2l^vxIP*SqIptSN%yQhpwF*f{ohw+sD=~; z!hQSpJ^AF5`}gmE>ZzvyWJ*#h5GpA4213`L{soHI5v&X@ z{GpPFQq7&$A*+VdL&$*DeQC5#o68QhBi3$NAbjkx#~y$D@m;%i5tdIp@kB~e-hKDo zI)tlNukJB~pLebT3jyTv!Iq)@s@FV@sSrA$i}z!~83ti`Q6PNu(MPv$-~RKT{~WXF zDM`6%)hZoANkk)rbLRAS7DCM5gN4|RFQ?bsp_;ci-rrl22tqrY#AEkg8=XiBgtc1j zkw+dOAh&JXwqwVRl%)LL_rB+}ZU9k;X!J-22M0R~;Z@Exl7-4zj8diE+#4k4p%Ox< z1KGKe9R_lBrcIjwq)y7^%a013 z0Ry2McwJ9eN0zs#D@1gH7(mL3CMVd1CRvyX7n@6F*A0y_^8h54V~{VyE29v8C_RLZ zHJp#Rl-|vCls58ax`!b&!lTse+_`g=^-8)ZmEKpFA{Jpu%*OH<%w9K_GKt|Bz=`!; znKYg)l|u?+8I)w9=e7jQE0o;8HO&k{O78#rX5;+M$W(vg|8pD+0MuMiVf__7e2PFn z`dfU+pDbFmNUkm;2z9b5!Yf}0D#A$#)j)3sPbjWiw@zP%K!Ru)M~@z*3;O4pHER&t z0`V-QBzn0U78V*ig;_$FWWLnDxz4L$Qc4(3SVt!N=?YZxhARIy6Xf|d@Laigmv z)`!lUH;?&8?PplyiIpQd;}fao{f1cx`)8zJ<`Bj#A5|Syej=5OQt?OY`}_N;#<@w9 zcwqjWn@Wjg7%v$}1vC5FyUfKa3bBxq-kr!E!oa;w)QV;zsCod&>pT@K6?(a?tB)j> zVVH$2cy)q--!$_xj%C|6hzOj#ISK(A$?%v4VWc7K9aNEmw#$g6Bp>+3I0O-*1sp*w6I;})IP9HJE|j=w0Ggcq5| z#0*P9<5P+W%>(y*ZG@05qAQ~L@B&MxbpdpQnURf2p-`NrP(=#W2(Y~2h8w~F%dO%w zaN$K7QRtGDFr{37l!s#)$T$xCp&LwvHbkq7-!@E>YqJn`T#Uw#+f2D(Q89k(TQ!6U z)Sa4H2)iL!t=2R)<}(e#q86ppB5p$IwQ^>eX%M=8^w~mdthTHK+m&Sxve)W*G6NyR zD2#nNNeUoOBm|+{K_Pcd=u?lK=JCvg5Yu?F9x+XriIn`^HpM^yr*T`%pe86xwkjJQ zC;e%5WR;i5?c`eCG@?NG^2;w{&C4sVyz=U+uVNwEv17;Hc;gMMD8%YeEc4|h+vm=m zJAeNC#fuktL(JvNmk~tG307SwLvbul)WVDSLAqj!0YV9t^l_Dc@*=@pi2`AUyI}}O zY-<7+?GT1-YwGhP2N33Ys6v5obaa&05)z6>j~)ez-_ZyG@+ zf^hNT#TFLYQ?@G4a0oNpRtP#Wgav<*V{|swt`KEIOa~#9qr-BGFQxQbe3f0k9UWa%Ak1)QC`_XQp-#l! zG^BnPxVbb2+j=W*y;Sy&Q;l=xQDmZL>U)4QA7_Fn5RQzDFpA_tr#FrHg%JCDpL=fV z*hXyBo}!TzQ6N;WPmYD`($+U>cL%}@H}}Fc<`lwjf7|6<+U2UZ%eOkr2RJKf92eEv zL?lS|lnI3TLlg-2?AgPc2nogXrcsAbF^9c@@XObKLqZs~6xd(HHlZxYM;PQbk`Y3= ziC#vUazwB^M{K%}gfOf9+1#k=5SEkgwa*?xVj)&@V?nSLLi3)AHh?rj=!!LWPV0Gw ze1ih59m1VEcQT69sHQiKIfZa&sE!5QytyeUglzz6bV^;ZV2j}~E)bFnDJ>9YwZ)!I zBOt`!S&krN{J_PwAxs2hSib@l!Pm+`OZo~vJA~V}Z|D8>!^6YrO`{P)83QT~gkie3 z4aT85?Cb0M$xnWgNt6UOjYbIVK})E2uf$`^ z7(!PZjHB;tBJkXy8X&|;@rm}qSb$vdBRA2BB{35{mLa5CUbbx6)~#C^#q_4p2w~Y8 zw1j$-^qh`Eh_>|JZC<%H4Ui6XY!x9svw4P@~qw-XUd=&=&Qfq{Yafi9$JYy-l< z!9iu>B6|p_A%!gjesX`B2cGK~_Sz>;-ET;#mX|JFif|=}a*^INwgI7@`U<77@rkTd z_6kIpNnb`G;{P64oe6|E(z(kJ-g3(=VX;b*nnrr;9e3Oj1|fIwV?v0q3z-1v6^OuN zTS)jR5OUm-;d z5j7$q3En2jwzf>`{dzdH3&p}EzSjM0u$F`91 zONktdmxqF%Y)Cm0sd=w`TZ!-^E+#6aAGf3)GkOV5wlV^yED6*BGYZ`x&sHQvaSEX$ z)|VjEf()L)$Z?~JS0O9pSiDEW7T)nsqq;4mhLj9p5Q!}t2+^FHk9ahtpz-vptl-qE z5%;@ghZ|BOU^0N05imWZ7h}e-ad-tZr{v8t1=*M3pAd4z!Ai{+S^M-TY@p$N8tp*% z#f3M)77|DpAXPdQG8k!Q5YGQfoB(VHoYs0WsTWD8KK$dzUqRd-{Vig!(O-N*@JO`e z37=siBSE2}Wq6aKe-bCE-LCG9bL z5W*HReiFh$d2C{$p@sxb4Iw?ja?q$u^;O=vqka?W`k^FY zM0X+$elp-7;vNDIMotNxr!z7vu$~^j4WICNuY{r{VzaS{PTJCV5Ms&~_=PRJXc^<~ zB82|?SWL-3swwJsJFN#l^EPWEHg4;Q(F&;Yhx{u&=GWrIi_;W4rg-iQ+d@R;MvIyg z2&w+lx1X-x-wz9#$L*&MkAj@!96w5-os^Wtjww^N5H5^zx^{0Nq{__1{(*%+k?LA$ zNR7xz`==l$0|SSJ+UrgvQivmuH?a6J89*2eQpDd=k<}JdwuKz`P_~&&N2MWE3>AZI zpgf}MJx+x%#u~D^~z%beY zJWGS&nzp$&wB?o!?NBj!t=#X37zk5%B9g2Mp;M+54Pm}vQv|QMu~AJFSeB5Bqpxf~ zi$Pe}Mmh*vekDI@&YlDZQrVEvs>8LcScG|^6P6{ekLZZZ>kPy19 zF@uXD7;vLCqObu%B}<8A%Vc5D)FiC5JPOkhjjDxqK(5nTw?T#kft{g1&%Kh&g)}Pp z$2{GB`|Z6#E{)8za0zV-8$uvQT+9%;M9&E$VrT^Z#KoD>(h1Y<2Ag>JTAD!pnhPK| z06~ne!YqUx7j{E{B5$jc;7PC55xegi!M0hZp#FNzLfCPUeYl2jK6#Xi|2iVtx)TzM zb{4`Oh#f*@^rs;R%KTG)t3JQe3d~BQt*(MmW^LiL6t}rT+;CW>UF-{JJ10)7a2qr8 zx}#aiED7^2=&52f*U6Q`M6*6~<_zM?BRDyt%wN2C5$8VO01rNlpblW6VaPBBD7W z6d*#Zf{h4zjEK3+Mxx@o@4m}aRM-eAf{l~DFdIQdKI2M~(05eJIPp<&FBgidQ@iufJT8AU>Ujk(Au)Wh={2i!#IbAk=fE72?Gu%9+=T%81@>;P|0t}W(8s=A!6Pl z>@5OO=glzcB!mj`Fo8~!5Uy;mkqnjmmaGvhL%+fuS33!x_Jt}6Y|Noy3?m^Vl8Taq zWYBnk)FO0`?w3w`5;7T#5;my{>F+Nn=UApZ)3Q>j^3UnvGB3r?>2TF`N$eyLaDph#o5Ycmj(_STrHWh6`+qZ9IWQ3`hL&F$JLj4@_E0lz!?ZSmcKL1rF zx8{ZGT6NE^Yd*Ko@~#slm>xP^nW9N4WF%61XU!sAJ^w3R!^4T1iHW?S5k*2AY=Z;C zp7bSehB1E0=`w9Br8pGw*AKmB#4Ke!TStPTZ!1bDV-S5o~RnK=|20@pe95 z-AQqDb2mvS`@_mt_)t2xZm|G;dA`%)&qAUQC|8!cH$l~Y95yP%n zDwLjtII)i$46reWhA|EaEynN)BBA3SwI%7dZfF#oq(o-Wa;SD#f<25$!mbgr4R=(& z4Pca`Z9HWX>V{74AZcVxLY%p%P%%G-@%!KZeoPXE8N(}!gg77u^h0Q893n~vkhs)M z5_Xi3M8e4To<;Ia#tr2~vu?2ejjPd4Lf$54yg#fA7835*u>%K6;~d+(8OFQszFU$I z#SYu?FiS!Q3}pJjDuPZMs-tbVqXrVr>2EW7es+XRM8Z6XorE~OmQMxGn_*nNdUbpf z8jWFwB+M=D9tqJ@v;Qfb(t&$Maa2qg32~62cc4^l5+@qkNa&|L-W!tuGpkl5Jr>()`>Z@A%x=}JN>+~=LE z^giLT+wS8&AtiE6O`|Up?of?h6|j*{ro^aB=SbK#A;};9&tG@{+lIz;NmN=3370Kf z_J}Vy(>-s7@vgh>ViIzM3kwN#V;F~ogM)*VBl*BT``OQ?F$ur8@Fqz=rBCQvyapd; zs93_W@v3K9#>Q~YefLS2h>%3W+=5}0Fn1Ir92gjQ*q1F^wt$VfGK_cLd1oRL>c%jp zJKEo0;e)QHD+zg$Q1%Jg|0M1$AH2_K49WUcYh_qMBMDnb(s>d_QZdh97{yM)rAwDS za#z_S2{nk#xTW+~!lP{p+=FOYCY#3LrT={=} z`R;eW>sTcw2^C|Ql7tBKq>xZ1B4ib(SM^SsBxD1~PU(;TrG`evMp|+Itx$6R zaqUJg>T~O;Obcm>Feu@jJXt(gwhzsCm}~w(+XC?rd}fnmDCeLPLYrjrV3@B5UfL2aFuHyAsIki z3=IwCjf9kXNWx$xjrSs@ae(b4T(V@z{rBJhzyl9}iW@g>v>3))1G($0VmQBYbA z^rDzVyF`+Zs1;{#VNw$Igpf@V@=8&nA1{<)`bADu5Eb3pBoB?6Ntk@5zBe5D^#A|| zM@d9MR1-Yx4hj9KdCG_=m^Q+yorLtsl0aheDkZfPg6TnDSa^FUya4Q#;{wnVEYIit zO-w?CaykQzoaDeWF-h1H@6>^w$~rZoqE0_!w~*%vjgy3VAfdv;PLt5}mc>vOE+w*s z>0=z*Nti9Q;uDPIT3_bQo$H7dv-AcliC$~@iZ{eD^eD5j47}ObPD15F?g2`J$=~*u zDtVxsE=>~3J|VI3-fb%VU=@E@zE2?`Tu|^(AC;-rCh|bSKl|%@n=|!a`f2A#82F!f zei3h4CQqj4P&X-)vnY)IVHm+kZj3F&M*S@}Cc3ROSZ0E;$Pf)wLKs6PVI0co-9l;o zazZ&>9L&^XM3k40F1zi%>;6)8O7#s*#653jV!Rqg!jua~Gv{IFNQeO#-vBmzC*N^0 z-NFwZ+DRCbV8j*>Y|)}c@i``ie#k6U9xh*cx~8PuFn|7hswtd{41w1=GBQH1P_0&T z{Zo_aHu)<#&Z)3YWoDs-wjd_uz;h+aMpmfB6pw^*JFlfrh`khgpAcIHWuGvIBm@t= zg`@v)Yvb&r8K(NqANqVN`t?}{1O4Q}9{K|_eoOz=FQv)I@dEb58j6sT$eLN$l~k}) z-8G3qFh%e>5hvHJTj#b$FoK~|{nEaEV%_2uYm0*w{mgnPWLo*XXO~zx=84)e6oCAW zvOkvFg;4Ph&(zC7QKlcIhgN^H`C8K3oZ;@Th3smubfVXCTfyU_6dLdFH`hmr<5+jHrJPKuMOVr z%7vpmDw9JJ{=>EZ;oSfHj~z;m=j#^ziY+qz9$VO{>>?9oofXq`vt~DF7QRUdI|5DN zA&X)j+b~n~bLGjffkb1Be$fRzQ_tGz*jg*^xmP*Y@Q@64(@Xl%HP6)R3^XP)2}yE5 z!Vc9V+#BBot-}EN7P8)nyxI^Hk32VY(&$2e?=23b#h}?A64NTuS8Ry5iwlQPc5&$% zR*@ghKaXD(PT=u^e${ZHZ*_av33NOX%GKLSpAe?c9%Ci}346=Hj*-xx0dsu%6+yrB zGZQIAc}*3gB*#S*(Fa9h@-3!qRIDOpNB>{jlUdJ zKFa8b5}+`TFq>SM4qC#_yXDD)E z{oqGcDiyF%Ctf6TbiT#(MfHwfBvJLBM6yoOujdt>m3VdWpPc{7n>NY+XEInynSx?Q}g`SSJO zkeesuh$yj9UnMi0NZ4QTMuWu6QdSk`zk+$8A4GPUlraVvMta@brkvs>#xaj!*;BF924L1ObPUS(M})VC3FRL1}9DhV+K()#MSt-*P(1d%HC@}+mgG)7T`oW#qIuek9- zzI>a!NB^9&a6`h$q8jyU5WfA@H!IMi^; zV8Ft+dGqGYb|2D9eox7ml^zP5RrX6I*>c;1=%~BvBwsj+I*j%3HVQN=SB`YS8OucU zF%>z#!qY80#Nuk_ZONGl{#@QH9c(#&!%UO6g$>M_3!i08%*w3vLfr7#f=0-gXG7a) z;`5~V+*=RlCT;3Ko>(CI+!Ym1A<%$+q zBwW|E^U3A>p(G@mJNdbB0V;nO`H3u5%pu}g63)uZ5hpjhD}qQ1vE<(Y5z`P)d5JJSZ-4p;tQ2(;H4XU?3FZEbBMB9Srp8#ivqs;a6%@Ub8@O_QNeC{BaH;Gi0YAq~Sw2|iX=u3R}{ z63TGCE2We@Jw3ee!V4Tbb}Y`{bzLVA2+-NtiD4Ln-?&^Z?DqKZQdO0loSZ?w&(F_C z2!X1qgJV1%56?gUJgZl)X71d%j2kx&hr=;sU=K+^N+~@a4}13P;n=Zbae*2Ng=lYY z=i0A+g|>O~kVZ%)rM0z8udPkBCL1?yWbN9u%$YN1SQ2Wg##r$C_wP>v9}EWR?Cj*? zd+!n2ycr3DnyEDH-OHcr>XN_%96x@XqeqYO_19n1-QA607|1l1PPqe7@O5={yz#~x zNtW;E=->}O`x*8G001LO;y~%{-OQ-2PT9A1?ON8aU(a24-IaDHk_bpCrQ7Z1z<~oC zIdUYfFBA&V)YL@7haVz$?i?Z1)S>{TJ9aSh#TQfduUN5yZQHgnW5$e>B;p82DdpwM zm#MF>=hatVjhiSK4AR!t#y2NVVx+McKr`^#z+VYG3@ijnfUF^i+*VV=tX;d}+M?K= zeDX;uD=Sm)L~N?Oe*L=Kx^-((E)N6(^2(Jf@}ph5DaEQ$%QrSQa`^CJ z4jnoaXN9QSTsmaxn`iRg#%1d1IUEt#jzvcE>bNSwcTNv-sDV=f$g+;|^eI7c#Z9>P%-9MO5 z-l)<1VD4Y>n+u=fZR+LLsH?d|WP9 zWCvEQT9wlB4Gj%kJ9!d+bu|(Y2^x(aS9Tu4)Cv2#7(Zq-iWNc#1IyGZcKkop$05@PI%zO2~0WQ|m#Kl519$tCn73%8hXl`yM5C}vFOrAVB4!o}G zw6wHviyrWTG(k!b0##8^L}a8M^zx?*XPI%&LK@p| zaP*T?90A&53=-9bpZ=7K)zwK=?t}>w$j!~g?RMky`H~MZ(==&lXrS@^_vx*zO>&u3 zYEu;u7E)M95k?9t#yKp6X&{9FX<>Kea_2Lh+uy={oeMBjg*KHVs2!K9f==8`Z7US5-k)!pfYjNRBVbJPje%t?x)`u!lv30 zmWhxGrfEh1}VLtGgRZwIh&VnFuKmLPtrlUZzE1#sq!`EP8Pla@-g?y1TjX z*)KW!<$vM^^pGE67JwPT=5T?{fvP%CRTZ1fh27!6<;ub5?P6llZG?P%xLgi|jI5HX z6wkCYPa-gQT}x;`4eTjj&iJBYq?Gtqt>&wL`#HO|*YeH(oMrZ3&m${48)wdF6uT3f z%|f+1QEdt~RRyP${4wLX|G~wC`a21F`!K>9L2oB{DGZjW#1V+~v&0E+1=?DgDVR73 zhuzMoafK{gy^cGlP2tU>Yk<8>x#RncxuqCaZUIu2Sf+(U!KOG-RU3-aN%rV5I2<;# zKo5O=y+A1LR3AbAs%_6l2HX?dHd*Y&VTvu^m}^{!a_q@#s{=)vp5X1sLZ zQxX`wCnQYf0OkUpeeeNBD2Qd~NXrDF<8Wm&wrD!@7L~DbO%)|mr{VW@6ZHF{ca6y5 zWg1A!z|_O&S_mx^1Z((1b0|q7;B-1sRW;>A(|~tgIl}qheuWkaV3}d0FhLkNoen0H zexLD^ZYL*qG+{5GJZ3$QxJ0sL^8wu6>ahuuL5h4qzBMdMJn%4AAfO z67u<&pg`^r*1x-|Dsuu+KPxCG;J!ECq;S!qBx~dW3xExet-^in3gKY?fRzofbX1|? z%y!{)Wnr_aAPl7LN7wx5p#WOYM|Vd%-kx@(9zeg6p1_=Eo?+ghLxjWOB#dzcVlNC3 zc||KMEaZpBj#0R9Vba8tfYrbgKQ8A_e>{)w_hN%Lww}v46qni4aIM)a{Qx%0u<_#J-|LF~+{;*#Y|d`%`Yuc(>#nSlT zpAVxq!|i;RMx%1~x^+DK_S;A)(RDq}xQe0-K1r&o8rgy4$B$E9UYs5%<>D zGwHzxlTvE|@Dy-I4=lLvF;2bzuXwvV2>E^V_jJbqHqdieCEODX^OV}uasx}F67kw+e(yu6%g)21=QeJn=_W~}DwAg{S;F#9J^?_}w79;;#zxk!U!M}Z&1O>u!&y~TB`+_J zl9Cek?c2xl<;(GSJaOOwii?Z6@2$5eo;PoZD`t949DnEH#c9DeG&E3IS(z3*B%A}W zBwl*yCAMtY!i5VLl47Eyq=X0FeV5zj&CBT4mQJTX{4h^^`e|D58#ZiU*|KG6!9$wo z^+b0{7ZZJbeSB74&NpYzCiM*`(|`0MRu3eEMDXX%onyz29h8-o4GBIifkYBJckZOB zs)`35cwn$U_PbQi9+^lqRmRHs^XJ*Rbt@}YtQZ#jkOUG*)YR1Q?6c1@fByVoL1h9w zm7G6+p68x>j^)djGiAz@VZjeeAdy5}T^)}<{x}sC6*mQbsQ%NZPjm3#!HnEyLC^LFIoa=8#f zux8B~N=r*e1b##W;5!m6EiGKTc8$KizQH%j|BFO_H=Z(O3X>;K&KNw5kN`wT1cO2P z`ufl`EvXd08BtZ0tgI~Z^Yh8c$w5`sjDPI>U*&+9vOrPmY5)KL07*qoM6N<$f*8*h AfdBvi literal 0 HcmV?d00001 diff --git a/docs/macros.txt b/docs/macros.txt index dd55481..95aed93 100644 --- a/docs/macros.txt +++ b/docs/macros.txt @@ -1,66 +1,72 @@ -Desc: NUT-specific autoconf macros -File: macros.txt -Date: 27 December 2006 -Auth: Peter Selinger +NUT-specific autoconf macros +---------------------------- The following NUT-specific autoconf macros are defined in the m4/ directory. - - Macro: NUT_TYPE_SOCKLEN_T - - Macro: NUT_TYPE_UINT8_T - - Macro: NUT_TYPE_UINT16_T - Check for the corresponding type in the system header files, and - #define a replacement if necessary. +- NUT_TYPE_SOCKLEN_T +- NUT_TYPE_UINT8_T +- NUT_TYPE_UINT16_T - - Macro: NUT_CHECK_LIBGD - - Macro: NUT_CHECK_LIBHAL - - Macro: NUT_CHECK_LIBNEON - - Macro: NUT_CHECK_LIBNETSNMP - - Macro: NUT_CHECK_LIBPOWERMAN - - Macro: NUT_CHECK_LIBSSL - - Macro: NUT_CHECK_LIBUSB - - Macro: NUT_CHECK_LIBWRAP - Determine the compiler flags for the corresponding library. On - success, set nut_have_libxxx="yes" and set LIBXXX_CFLAGS and - LIBXXX_LDFLAGS. On failure, set nut_have_libxxx="no". This macro - can be run multiple times, but will do the checking only once. - Here "xxx" should of course be replaced by the respective library name. + Check for the corresponding type in the system header files, and + #define a replacement if necessary. - The checks for each library grow organically to compensate for - various bugs in the libraries, pkg-config, etc. This is why we have - a separate macro for each library. +- NUT_CHECK_LIBGD +- NUT_CHECK_LIBHAL +- NUT_CHECK_LIBNEON +- NUT_CHECK_LIBNETSNMP +- NUT_CHECK_LIBPOWERMAN +- NUT_CHECK_LIBSSL +- NUT_CHECK_LIBUSB +- NUT_CHECK_LIBWRAP - - Macro: NUT_CHECK_IPV6 - Check for various features required to compile the IPv6 support. - dnl Check for various features required for IPv6 support. Define a - preprocessor symbol for each individual feature (HAVE_GETADDRINFO, - HAVE_FREEADDRINFO, HAVE_STRUCT_ADDRINFO, HAVE_SOCKADDR_STORAGE, - SOCKADDR_IN6, IN6_ADDR, HAVE_IN6_IS_ADDR_V4MAPPED, - HAVE_AI_ADDRCONFIG). Also set the shell variable nut_have_ipv6=yes - if all the required features are present. Set nut_have_ipv6=no - otherwise. + Determine the compiler flags for the corresponding library. On + success, set nut_have_libxxx="yes" and set LIBXXX_CFLAGS and + LIBXXX_LDFLAGS. On failure, set nut_have_libxxx="no". This macro + can be run multiple times, but will do the checking only once. + Here "xxx" should of course be replaced by the respective library name. - - Macro: NUT_CHECK_OS - Check for the exact system name and type. - This was only used in the past to determine the packaging rule to be used - through the OS_NAME variable, but may be useful for other purposes in the - future. + The checks for each library grow organically to compensate for + various bugs in the libraries, pkg-config, etc. This is why we have + a separate macro for each library. - - Macro: NUT_REPORT_FEATURE(FEATURE, VALUE) - Schedule a line for the end-of-configuration feature summary. The - FEATURE is a descriptive string such that the sentence "Checking - whether to FEATURE" makes sense, and VALUE describes the decision - taken (typically yes or no). The feature is also reported to the - terminal. +- NUT_CHECK_IPV6 - - Macro: NUT_REPORT(FEATURE, VALUE) - Schedule a line for the end-of-configuration feature summary, without - printing anything to the terminal immediately. + Check for various features required to compile the IPv6 support. + dnl Check for various features required for IPv6 support. Define a + preprocessor symbol for each individual feature (HAVE_GETADDRINFO, + HAVE_FREEADDRINFO, HAVE_STRUCT_ADDRINFO, HAVE_SOCKADDR_STORAGE, + SOCKADDR_IN6, IN6_ADDR, HAVE_IN6_IS_ADDR_V4MAPPED, + HAVE_AI_ADDRCONFIG). Also set the shell variable nut_have_ipv6=yes + if all the required features are present. Set nut_have_ipv6=no + otherwise. - - Macro: NUT_PRINT_FEATURE_REPORT - Print out a list of the features that have been reported by - previous NUT_REPORT_FEATURE macro calls. +- NUT_CHECK_OS - - Macro: NUT_ARG_WITH(FEATURE, DESCRIPTION, DEFAULT) - Declare a simple --with-FEATURE option with the given DESCRIPTION - and DEFAULT. Sets the variable nut_with_FEATURE. + Check for the exact system name and type. + This was only used in the past to determine the packaging rule to be used + through the OS_NAME variable, but may be useful for other purposes in the + future. + +- NUT_REPORT_FEATURE(FEATURE, VALUE) + + Schedule a line for the end-of-configuration feature summary. The + FEATURE is a descriptive string such that the sentence "Checking + whether to FEATURE" makes sense, and VALUE describes the decision + taken (typically yes or no). The feature is also reported to the + terminal. + +- NUT_REPORT(FEATURE, VALUE) + + Schedule a line for the end-of-configuration feature summary, without + printing anything to the terminal immediately. + +- NUT_PRINT_FEATURE_REPORT + + Print out a list of the features that have been reported by + previous NUT_REPORT_FEATURE macro calls. + +- NUT_ARG_WITH(FEATURE, DESCRIPTION, DEFAULT) + + Declare a simple --with-FEATURE option with the given DESCRIPTION + and DEFAULT. Sets the variable nut_with_FEATURE. diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am new file mode 100644 index 0000000..b82f7b5 --- /dev/null +++ b/docs/man/Makefile.am @@ -0,0 +1,452 @@ +# Network UPS Tools: man +# + +# Notes: +# - sources (.txt) and groff formats are both distributed, +# - only sources are versioned ; groff files are generated at worst +# during 'make dist' +# - HTML files are built upon request, if AsciiDoc is available, +# - groff update will only happen if AsciiDoc is available too, +# - all this can probably (and hopefully) by improved, but I've not +# found a way to do pattern replacement on the fly for target deps! +# - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html + +# Base configuration and client manpages, always installed +SRC_CONF_PAGES = \ + nut.conf.txt \ + ups.conf.txt \ + upsd.conf.txt \ + upsd.users.txt \ + upsmon.conf.txt \ + upssched.conf.txt + +MAN_CONF_PAGES = \ + nut.conf.5 \ + ups.conf.5 \ + upsd.conf.5 \ + upsd.users.5 \ + upsmon.conf.5 \ + upssched.conf.5 + +man5_MANS = $(MAN_CONF_PAGES) + +HTML_CONF_MANS = \ + nut.conf.html \ + ups.conf.html \ + upsd.conf.html \ + upsd.users.html \ + upsmon.conf.html \ + upssched.conf.html + +SRC_CLIENT_PAGES = \ + nutupsdrv.txt \ + upsc.txt \ + upscmd.txt \ + upsd.txt \ + upsdrvctl.txt \ + upslog.txt \ + upsmon.txt \ + upsrw.txt \ + upssched.txt + +MAN_CLIENT_PAGES = \ + nutupsdrv.8 \ + upsc.8 \ + upscmd.8 \ + upsd.8 \ + upsdrvctl.8 \ + upslog.8 \ + upsmon.8 \ + upsrw.8 \ + upssched.8 + +man8_MANS = $(MAN_CLIENT_PAGES) + +HTML_CLIENT_MANS = \ + nutupsdrv.html \ + upsc.html \ + upscmd.html \ + upsd.html \ + upsdrvctl.html \ + upslog.html \ + upsmon.html \ + upsrw.html \ + upssched.html + + +# CGI (--with-cgi) related manpages +SRC_CGI_PAGES = \ + hosts.conf.txt \ + upsset.conf.txt \ + upsstats.html.txt \ + upsset.cgi.txt \ + upsstats.cgi.txt \ + upsimage.cgi.txt + +MAN5_CGI_PAGES = \ + hosts.conf.5 \ + upsset.conf.5 \ + upsstats.html.5 + +MAN8_CGI_PAGES = \ + upsset.cgi.8 \ + upsstats.cgi.8 \ + upsimage.cgi.8 + +if WITH_CGI + man5_MANS += $(MAN5_CGI_PAGES) + + man8_MANS += $(MAN8_CGI_PAGES) +endif + +HTML_CGI_MANS = \ + hosts.conf.html \ + upsset.conf.html \ + upsstats.html.html \ + upsset.cgi.html \ + upsstats.cgi.html \ + upsimage.cgi.html + + +# Development (--with-dev) related manpages +SRC_DEV_PAGES = \ + upsclient.txt \ + upscli_connect.txt \ + upscli_disconnect.txt \ + upscli_fd.txt \ + upscli_get.txt \ + upscli_list_next.txt \ + upscli_list_start.txt \ + upscli_readline.txt \ + upscli_sendline.txt \ + upscli_splitaddr.txt \ + upscli_splitname.txt \ + upscli_ssl.txt \ + upscli_strerror.txt \ + upscli_upserror.txt \ + libupsclient-config.txt \ + skel.txt + +MAN3_DEV_PAGES = \ + upsclient.3 \ + upscli_connect.3 \ + upscli_disconnect.3 \ + upscli_fd.3 \ + upscli_get.3 \ + upscli_list_next.3 \ + upscli_list_start.3 \ + upscli_readline.3 \ + upscli_sendline.3 \ + upscli_splitaddr.3 \ + upscli_splitname.3 \ + upscli_ssl.3 \ + upscli_strerror.3 \ + upscli_upserror.3 + +MAN1_DEV_PAGES = \ + libupsclient-config.1 + +if WITH_DEV + man3_MANS = $(MAN3_DEV_PAGES) + +if !WITH_PKG_CONFIG + man1_MANS = $(MAN1_DEV_PAGES) +endif +# WITH_DEV +endif + +HTML_DEV_MANS = \ + upsclient.html \ + upscli_connect.html \ + upscli_disconnect.html \ + upscli_fd.html \ + upscli_get.html \ + upscli_list_next.html \ + upscli_list_start.html \ + upscli_readline.html \ + upscli_sendline.html \ + upscli_splitaddr.html \ + upscli_splitname.html \ + upscli_ssl.html \ + upscli_strerror.html \ + upscli_upserror.html \ + libupsclient-config.html \ + skel.html + + +# Drivers related manpages + +# (--with-drivers=...) +if SOME_DRIVERS + man8_MANS += $(DRIVER_MAN_LIST) + +else + +# (--with-serial) +SRC_SERIAL_PAGES = \ + apcsmart.txt \ + bcmxcp.txt \ + belkin.txt \ + belkinunv.txt \ + bestfortress.txt \ + bestuferrups.txt \ + bestups.txt \ + bestfcom.txt \ + blazer.txt \ + clone.txt \ + dummy-ups.txt \ + etapro.txt \ + everups.txt \ + gamatronic.txt \ + genericups.txt \ + isbmex.txt \ + ivtscd.txt \ + liebert.txt \ + liebert-esp2.txt \ + masterguard.txt \ + metasys.txt \ + mge-shut.txt \ + mge-utalk.txt \ + oneac.txt \ + microdowell.txt \ + optiups.txt \ + powercom.txt \ + powerpanel.txt \ + rhino.txt \ + safenet.txt \ + solis.txt \ + tripplite.txt \ + tripplitesu.txt \ + upscode2.txt \ + victronups.txt + +MAN_SERIAL_PAGES = \ + apcsmart.8 \ + bcmxcp.8 \ + belkin.8 \ + belkinunv.8 \ + bestfortress.8 \ + bestuferrups.8 \ + bestups.8 \ + bestfcom.8 \ + blazer.8 \ + clone.8 \ + dummy-ups.8 \ + etapro.8 \ + everups.8 \ + gamatronic.8 \ + genericups.8 \ + isbmex.8 \ + ivtscd.8 \ + liebert.8 \ + liebert-esp2.8 \ + masterguard.8 \ + metasys.8 \ + mge-shut.8 \ + mge-utalk.8 \ + oneac.8 \ + microdowell.8 \ + optiups.8 \ + powercom.8 \ + powerpanel.8 \ + rhino.8 \ + safenet.8 \ + solis.8 \ + tripplite.8 \ + tripplitesu.8 \ + upscode2.8 \ + victronups.8 + +if WITH_SERIAL + man8_MANS += $(MAN_SERIAL_PAGES) +endif + +HTML_SERIAL_MANS = \ + apcsmart.html \ + bcmxcp.html \ + belkin.html \ + belkinunv.html \ + bestfortress.html \ + bestuferrups.html \ + bestups.html \ + bestfcom.html \ + blazer.html \ + clone.html \ + dummy-ups.html \ + etapro.html \ + everups.html \ + gamatronic.html \ + genericups.html \ + isbmex.html \ + ivtscd.html \ + liebert.html \ + liebert-esp2.html \ + masterguard.html \ + metasys.html \ + mge-shut.html \ + mge-utalk.html \ + oneac.html \ + microdowell.html \ + optiups.html \ + powercom.html \ + powerpanel.html \ + rhino.html \ + safenet.html \ + solis.html \ + tripplite.html \ + tripplitesu.html \ + upscode2.html \ + victronups.html + +# (--with-snmp) +SRC_SNMP_PAGES = snmp-ups.txt +MAN_SNMP_PAGES = snmp-ups.8 + +if WITH_SNMP + man8_MANS += $(MAN_SNMP_PAGES) +endif + +HTML_SNMP_MANS = snmp-ups.html + +# (--with-usb) +SRC_USB_LIBUSB_PAGES = \ + bcmxcp_usb.txt \ + richcomm_usb.txt \ + tripplite_usb.txt \ + usbhid-ups.txt + +MAN_USB_LIBUSB_PAGES = \ + bcmxcp_usb.8 \ + richcomm_usb.8 \ + tripplite_usb.8 \ + usbhid-ups.8 + +if WITH_USB + man8_MANS += $(MAN_USB_LIBUSB_PAGES) +endif + +HTML_USB_LIBUSB_MANS = \ + bcmxcp_usb.html \ + richcomm_usb.html \ + tripplite_usb.html \ + usbhid-ups.html + +# (--with-neon) +SRC_NETXML_PAGES = netxml-ups.txt +MAN_NETXML_PAGES = netxml-ups.8 + +if WITH_NEONXML + man8_MANS += $(MAN_NETXML_PAGES) +endif + +HTML_NETXML_MANS = netxml-ups.html + +# (--with-powerman) +SRC_POWERMAN_PAGES = powerman-pdu.txt +MAN_POWERMAN_PAGES = powerman-pdu.8 + +if WITH_LIBPOWERMAN + man8_MANS += $(MAN_POWERMAN_PAGES) +endif + +HTML_POWERMAN_MANS = powerman-pdu.html + +# SOME_DRIVERS +endif + +MAN_MANS = \ + $(MAN_CONF_PAGES) \ + $(MAN_CLIENT_PAGES) \ + $(MAN5_CGI_PAGES) \ + $(MAN8_CGI_PAGES) \ + $(MAN1_DEV_PAGES) \ + $(MAN3_DEV_PAGES) \ + $(MAN_SERIAL_PAGES) \ + $(MAN_SNMP_PAGES) \ + $(MAN_USB_LIBUSB_PAGES) \ + $(MAN_NETXML_PAGES) \ + $(MAN_POWERMAN_PAGES) + +# distribute everything, even those not installed by default +# Note that 'dist' target requires AsciiDoc! +EXTRA_DIST = \ + $(SRC_CONF_PAGES) \ + $(SRC_CLIENT_PAGES) \ + $(SRC_CGI_PAGES) \ + $(SRC_DEV_PAGES) \ + $(SRC_SERIAL_PAGES) \ + $(SRC_SNMP_PAGES) \ + $(SRC_USB_LIBUSB_PAGES) \ + $(SRC_NETXML_PAGES) \ + $(SRC_POWERMAN_PAGES) \ + $(MAN_MANS) \ + asciidoc.conf + +HTML_MANS = \ + $(HTML_CONF_MANS) \ + $(HTML_CLIENT_MANS) \ + $(HTML_CGI_MANS) \ + $(HTML_DEV_MANS) \ + $(HTML_SERIAL_MANS) \ + $(HTML_SNMP_MANS) \ + $(HTML_USB_LIBUSB_MANS) \ + $(HTML_NETXML_MANS) \ + $(HTML_POWERMAN_MANS) + +all: + +man-index.html: index.html + cp -f $< $@ + +html-man: $(HTML_MANS) man-index.html + +CLEANFILES = *.xml *.html + +SUFFIXES = .txt .html .1 .3 .5 .8 + +if HAVE_ASCIIDOC + +.txt.html: + $(ASCIIDOC) --backend=xhtml11 \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + -o $@ $< + +### The --destination-dir flag doesn't seem to affect the intermediate .xml file. +### Hence, the copying dance below. +A2X_MANPAGE_OPTS = -f manpage --attribute nutversion="@PACKAGE_VERSION@" + +.txt.1: + test -f `basename $<` || cp -p $< . + $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +.txt.3: + test -f `basename $<` || cp -p $< . + $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +.txt.5: + test -f `basename $<` || cp -p $< . + $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +.txt.8: + test -f `basename $<` || cp -p $< . + $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +else !HAVE_ASCIIDOC + +.txt.html: + @echo "Not (re)building $@ manual page, since 'asciidoc' was not found." + +.txt.1: + @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +.txt.3: + @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +.txt.5: + @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +.txt.8: + @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +endif !HAVE_ASCIIDOC diff --git a/man/Makefile.in b/docs/man/Makefile.in similarity index 58% rename from man/Makefile.in rename to docs/man/Makefile.in index 8031353..78a79f9 100644 --- a/man/Makefile.in +++ b/docs/man/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,17 @@ @SET_MAKE@ # Network UPS Tools: man +# + +# Notes: +# - sources (.txt) and groff formats are both distributed, +# - only sources are versioned ; groff files are generated at worst +# during 'make dist' +# - HTML files are built upon request, if AsciiDoc is available, +# - groff update will only happen if AsciiDoc is available too, +# - all this can probably (and hopefully) by improved, but I've not +# found a way to do pattern replacement on the fly for target deps! +# - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -36,24 +47,28 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@WITH_DEV_TRUE@@WITH_PKG_CONFIG_FALSE@am__append_1 = libupsclient-config.1 -@WITH_CGI_TRUE@am__append_2 = $(CGI_PAGES) -@WITH_DEV_TRUE@am__append_3 = $(LIB_PAGES) -@SOME_DRIVERS_TRUE@am__append_4 = $(DRIVER_MAN_LIST) -@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_5 = $(SERIAL_PAGES) -@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_6 = $(SNMP_PAGES) -@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_7 = $(USB_LIBUSB_PAGES) -@SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__append_8 = $(NETXML_PAGES) -@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_9 = $(POWERMAN_PAGES) -subdir = man +@WITH_CGI_TRUE@am__append_1 = $(MAN5_CGI_PAGES) +@WITH_CGI_TRUE@am__append_2 = $(MAN8_CGI_PAGES) + +# Drivers related manpages + +# (--with-drivers=...) +@SOME_DRIVERS_TRUE@am__append_3 = $(DRIVER_MAN_LIST) +@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_4 = $(MAN_SERIAL_PAGES) +@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_5 = $(MAN_SNMP_PAGES) +@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_6 = $(MAN_USB_LIBUSB_PAGES) +@SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__append_7 = $(MAN_NETXML_PAGES) +@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_8 = $(MAN_POWERMAN_PAGES) +subdir = docs/man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ - $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -63,6 +78,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.in @@ -102,11 +118,13 @@ man3dir = $(mandir)/man3 man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 NROFF = nroff -MANS = $(man_MANS) +MANS = $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ +ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -119,8 +137,10 @@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -137,7 +157,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ HAL_FDI_PATH = @HAL_FDI_PATH@ HAL_USER = @HAL_USER@ -HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -148,22 +167,22 @@ LDFLAGS = @LDFLAGS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ LIBOBJS = @LIBOBJS@ LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ LIBTOOL = @LIBTOOL@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -259,77 +278,357 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -LIB_PAGES = upsclient.3 upscli_connect.3 upscli_disconnect.3 \ - upscli_readline.3 upscli_sendline.3 upscli_splitaddr.3 \ - upscli_splitname.3 upscli_strerror.3 upscli_fd.3 upscli_get.3 \ - upscli_list_next.3 upscli_list_start.3 upscli_ssl.3 \ - upscli_upserror.3 $(am__append_1) -CONF_PAGES = nut.conf.5 ups.conf.5 upssched.conf.5 upsd.conf.5 \ - upsmon.conf.5 upsd.users.5 -CLIENT_PAGES = upsc.8 upsrw.8 upscmd.8 upslog.8 upssched.8 \ - upsmon.8 upsd.8 nutupsdrv.8 upsdrvctl.8 +# Base configuration and client manpages, always installed +SRC_CONF_PAGES = \ + nut.conf.txt \ + ups.conf.txt \ + upsd.conf.txt \ + upsd.users.txt \ + upsmon.conf.txt \ + upssched.conf.txt -CGI_PAGES = hosts.conf.5 upsset.conf.5 upsstats.html.5 \ - upsset.cgi.8 upsstats.cgi.8 upsimage.cgi.8 +MAN_CONF_PAGES = \ + nut.conf.5 \ + ups.conf.5 \ + upsd.conf.5 \ + upsd.users.5 \ + upsmon.conf.5 \ + upssched.conf.5 -SERIAL_PAGES = \ - apcsmart.8 \ - bcmxcp.8 \ - belkin.8 \ - belkinunv.8 \ - bestfortress.8 \ - bestuferrups.8 \ - bestups.8 \ - bestfcom.8 \ - blazer.8 \ - dummy-ups.8 \ - etapro.8 \ - everups.8 \ - gamatronic.8 \ - genericups.8 \ - isbmex.8 \ - ivtscd.8 \ - liebert.8 \ - liebertgxt2.8 \ - masterguard.8 \ - metasys.8 \ - mge-shut.8 \ - mge-utalk.8 \ - oneac.8 \ - microdowell.8 \ - optiups.8 \ - powercom.8 \ - powerpanel.8 \ - megatec.8 \ - rhino.8 \ - safenet.8 \ - solis.8 \ - tripplite.8 \ - tripplitesu.8 \ - upscode2.8 \ - victronups.8 \ - clone.8 +man5_MANS = $(MAN_CONF_PAGES) $(am__append_1) +HTML_CONF_MANS = \ + nut.conf.html \ + ups.conf.html \ + upsd.conf.html \ + upsd.users.html \ + upsmon.conf.html \ + upssched.conf.html -SNMP_PAGES = snmp-ups.8 -USB_LIBUSB_PAGES = usbhid-ups.8 bcmxcp_usb.8 tripplite_usb.8 megatec_usb.8 richcomm_usb.8 -NETXML_PAGES = netxml-ups.8 -POWERMAN_PAGES = powerman-pdu.8 +SRC_CLIENT_PAGES = \ + nutupsdrv.txt \ + upsc.txt \ + upscmd.txt \ + upsd.txt \ + upsdrvctl.txt \ + upslog.txt \ + upsmon.txt \ + upsrw.txt \ + upssched.txt -# decide which pages to install -man_MANS = $(CONF_PAGES) $(CLIENT_PAGES) $(am__append_2) \ - $(am__append_3) $(am__append_4) $(am__append_5) \ - $(am__append_6) $(am__append_7) $(am__append_8) \ - $(am__append_9) +MAN_CLIENT_PAGES = \ + nutupsdrv.8 \ + upsc.8 \ + upscmd.8 \ + upsd.8 \ + upsdrvctl.8 \ + upslog.8 \ + upsmon.8 \ + upsrw.8 \ + upssched.8 -# distribute everything, even that which is not installed by default -EXTRA_DIST = $(LIB_PAGES) $(CONF_PAGES) $(CLIENT_PAGES) \ - $(CGI_PAGES) $(SERIAL_PAGES) $(SNMP_PAGES) $(USB_LIBUSB_PAGES) \ - $(NETXML_PAGES) $(POWERMAN_PAGES) libupsclient-config.1 skel.8 +man8_MANS = $(MAN_CLIENT_PAGES) $(am__append_2) $(am__append_3) \ + $(am__append_4) $(am__append_5) $(am__append_6) \ + $(am__append_7) $(am__append_8) +HTML_CLIENT_MANS = \ + nutupsdrv.html \ + upsc.html \ + upscmd.html \ + upsd.html \ + upsdrvctl.html \ + upslog.html \ + upsmon.html \ + upsrw.html \ + upssched.html + +# CGI (--with-cgi) related manpages +SRC_CGI_PAGES = \ + hosts.conf.txt \ + upsset.conf.txt \ + upsstats.html.txt \ + upsset.cgi.txt \ + upsstats.cgi.txt \ + upsimage.cgi.txt + +MAN5_CGI_PAGES = \ + hosts.conf.5 \ + upsset.conf.5 \ + upsstats.html.5 + +MAN8_CGI_PAGES = \ + upsset.cgi.8 \ + upsstats.cgi.8 \ + upsimage.cgi.8 + +HTML_CGI_MANS = \ + hosts.conf.html \ + upsset.conf.html \ + upsstats.html.html \ + upsset.cgi.html \ + upsstats.cgi.html \ + upsimage.cgi.html + + +# Development (--with-dev) related manpages +SRC_DEV_PAGES = \ + upsclient.txt \ + upscli_connect.txt \ + upscli_disconnect.txt \ + upscli_fd.txt \ + upscli_get.txt \ + upscli_list_next.txt \ + upscli_list_start.txt \ + upscli_readline.txt \ + upscli_sendline.txt \ + upscli_splitaddr.txt \ + upscli_splitname.txt \ + upscli_ssl.txt \ + upscli_strerror.txt \ + upscli_upserror.txt \ + libupsclient-config.txt \ + skel.txt + +MAN3_DEV_PAGES = \ + upsclient.3 \ + upscli_connect.3 \ + upscli_disconnect.3 \ + upscli_fd.3 \ + upscli_get.3 \ + upscli_list_next.3 \ + upscli_list_start.3 \ + upscli_readline.3 \ + upscli_sendline.3 \ + upscli_splitaddr.3 \ + upscli_splitname.3 \ + upscli_ssl.3 \ + upscli_strerror.3 \ + upscli_upserror.3 + +MAN1_DEV_PAGES = \ + libupsclient-config.1 + +@WITH_DEV_TRUE@man3_MANS = $(MAN3_DEV_PAGES) +@WITH_DEV_TRUE@@WITH_PKG_CONFIG_FALSE@man1_MANS = $(MAN1_DEV_PAGES) +# WITH_DEV +HTML_DEV_MANS = \ + upsclient.html \ + upscli_connect.html \ + upscli_disconnect.html \ + upscli_fd.html \ + upscli_get.html \ + upscli_list_next.html \ + upscli_list_start.html \ + upscli_readline.html \ + upscli_sendline.html \ + upscli_splitaddr.html \ + upscli_splitname.html \ + upscli_ssl.html \ + upscli_strerror.html \ + upscli_upserror.html \ + libupsclient-config.html \ + skel.html + + +# (--with-serial) +@SOME_DRIVERS_FALSE@SRC_SERIAL_PAGES = \ +@SOME_DRIVERS_FALSE@ apcsmart.txt \ +@SOME_DRIVERS_FALSE@ bcmxcp.txt \ +@SOME_DRIVERS_FALSE@ belkin.txt \ +@SOME_DRIVERS_FALSE@ belkinunv.txt \ +@SOME_DRIVERS_FALSE@ bestfortress.txt \ +@SOME_DRIVERS_FALSE@ bestuferrups.txt \ +@SOME_DRIVERS_FALSE@ bestups.txt \ +@SOME_DRIVERS_FALSE@ bestfcom.txt \ +@SOME_DRIVERS_FALSE@ blazer.txt \ +@SOME_DRIVERS_FALSE@ clone.txt \ +@SOME_DRIVERS_FALSE@ dummy-ups.txt \ +@SOME_DRIVERS_FALSE@ etapro.txt \ +@SOME_DRIVERS_FALSE@ everups.txt \ +@SOME_DRIVERS_FALSE@ gamatronic.txt \ +@SOME_DRIVERS_FALSE@ genericups.txt \ +@SOME_DRIVERS_FALSE@ isbmex.txt \ +@SOME_DRIVERS_FALSE@ ivtscd.txt \ +@SOME_DRIVERS_FALSE@ liebert.txt \ +@SOME_DRIVERS_FALSE@ liebert-esp2.txt \ +@SOME_DRIVERS_FALSE@ masterguard.txt \ +@SOME_DRIVERS_FALSE@ metasys.txt \ +@SOME_DRIVERS_FALSE@ mge-shut.txt \ +@SOME_DRIVERS_FALSE@ mge-utalk.txt \ +@SOME_DRIVERS_FALSE@ oneac.txt \ +@SOME_DRIVERS_FALSE@ microdowell.txt \ +@SOME_DRIVERS_FALSE@ optiups.txt \ +@SOME_DRIVERS_FALSE@ powercom.txt \ +@SOME_DRIVERS_FALSE@ powerpanel.txt \ +@SOME_DRIVERS_FALSE@ rhino.txt \ +@SOME_DRIVERS_FALSE@ safenet.txt \ +@SOME_DRIVERS_FALSE@ solis.txt \ +@SOME_DRIVERS_FALSE@ tripplite.txt \ +@SOME_DRIVERS_FALSE@ tripplitesu.txt \ +@SOME_DRIVERS_FALSE@ upscode2.txt \ +@SOME_DRIVERS_FALSE@ victronups.txt + +@SOME_DRIVERS_FALSE@MAN_SERIAL_PAGES = \ +@SOME_DRIVERS_FALSE@ apcsmart.8 \ +@SOME_DRIVERS_FALSE@ bcmxcp.8 \ +@SOME_DRIVERS_FALSE@ belkin.8 \ +@SOME_DRIVERS_FALSE@ belkinunv.8 \ +@SOME_DRIVERS_FALSE@ bestfortress.8 \ +@SOME_DRIVERS_FALSE@ bestuferrups.8 \ +@SOME_DRIVERS_FALSE@ bestups.8 \ +@SOME_DRIVERS_FALSE@ bestfcom.8 \ +@SOME_DRIVERS_FALSE@ blazer.8 \ +@SOME_DRIVERS_FALSE@ clone.8 \ +@SOME_DRIVERS_FALSE@ dummy-ups.8 \ +@SOME_DRIVERS_FALSE@ etapro.8 \ +@SOME_DRIVERS_FALSE@ everups.8 \ +@SOME_DRIVERS_FALSE@ gamatronic.8 \ +@SOME_DRIVERS_FALSE@ genericups.8 \ +@SOME_DRIVERS_FALSE@ isbmex.8 \ +@SOME_DRIVERS_FALSE@ ivtscd.8 \ +@SOME_DRIVERS_FALSE@ liebert.8 \ +@SOME_DRIVERS_FALSE@ liebert-esp2.8 \ +@SOME_DRIVERS_FALSE@ masterguard.8 \ +@SOME_DRIVERS_FALSE@ metasys.8 \ +@SOME_DRIVERS_FALSE@ mge-shut.8 \ +@SOME_DRIVERS_FALSE@ mge-utalk.8 \ +@SOME_DRIVERS_FALSE@ oneac.8 \ +@SOME_DRIVERS_FALSE@ microdowell.8 \ +@SOME_DRIVERS_FALSE@ optiups.8 \ +@SOME_DRIVERS_FALSE@ powercom.8 \ +@SOME_DRIVERS_FALSE@ powerpanel.8 \ +@SOME_DRIVERS_FALSE@ rhino.8 \ +@SOME_DRIVERS_FALSE@ safenet.8 \ +@SOME_DRIVERS_FALSE@ solis.8 \ +@SOME_DRIVERS_FALSE@ tripplite.8 \ +@SOME_DRIVERS_FALSE@ tripplitesu.8 \ +@SOME_DRIVERS_FALSE@ upscode2.8 \ +@SOME_DRIVERS_FALSE@ victronups.8 + +@SOME_DRIVERS_FALSE@HTML_SERIAL_MANS = \ +@SOME_DRIVERS_FALSE@ apcsmart.html \ +@SOME_DRIVERS_FALSE@ bcmxcp.html \ +@SOME_DRIVERS_FALSE@ belkin.html \ +@SOME_DRIVERS_FALSE@ belkinunv.html \ +@SOME_DRIVERS_FALSE@ bestfortress.html \ +@SOME_DRIVERS_FALSE@ bestuferrups.html \ +@SOME_DRIVERS_FALSE@ bestups.html \ +@SOME_DRIVERS_FALSE@ bestfcom.html \ +@SOME_DRIVERS_FALSE@ blazer.html \ +@SOME_DRIVERS_FALSE@ clone.html \ +@SOME_DRIVERS_FALSE@ dummy-ups.html \ +@SOME_DRIVERS_FALSE@ etapro.html \ +@SOME_DRIVERS_FALSE@ everups.html \ +@SOME_DRIVERS_FALSE@ gamatronic.html \ +@SOME_DRIVERS_FALSE@ genericups.html \ +@SOME_DRIVERS_FALSE@ isbmex.html \ +@SOME_DRIVERS_FALSE@ ivtscd.html \ +@SOME_DRIVERS_FALSE@ liebert.html \ +@SOME_DRIVERS_FALSE@ liebert-esp2.html \ +@SOME_DRIVERS_FALSE@ masterguard.html \ +@SOME_DRIVERS_FALSE@ metasys.html \ +@SOME_DRIVERS_FALSE@ mge-shut.html \ +@SOME_DRIVERS_FALSE@ mge-utalk.html \ +@SOME_DRIVERS_FALSE@ oneac.html \ +@SOME_DRIVERS_FALSE@ microdowell.html \ +@SOME_DRIVERS_FALSE@ optiups.html \ +@SOME_DRIVERS_FALSE@ powercom.html \ +@SOME_DRIVERS_FALSE@ powerpanel.html \ +@SOME_DRIVERS_FALSE@ rhino.html \ +@SOME_DRIVERS_FALSE@ safenet.html \ +@SOME_DRIVERS_FALSE@ solis.html \ +@SOME_DRIVERS_FALSE@ tripplite.html \ +@SOME_DRIVERS_FALSE@ tripplitesu.html \ +@SOME_DRIVERS_FALSE@ upscode2.html \ +@SOME_DRIVERS_FALSE@ victronups.html + + +# (--with-snmp) +@SOME_DRIVERS_FALSE@SRC_SNMP_PAGES = snmp-ups.txt +@SOME_DRIVERS_FALSE@MAN_SNMP_PAGES = snmp-ups.8 +@SOME_DRIVERS_FALSE@HTML_SNMP_MANS = snmp-ups.html + +# (--with-usb) +@SOME_DRIVERS_FALSE@SRC_USB_LIBUSB_PAGES = \ +@SOME_DRIVERS_FALSE@ bcmxcp_usb.txt \ +@SOME_DRIVERS_FALSE@ richcomm_usb.txt \ +@SOME_DRIVERS_FALSE@ tripplite_usb.txt \ +@SOME_DRIVERS_FALSE@ usbhid-ups.txt + +@SOME_DRIVERS_FALSE@MAN_USB_LIBUSB_PAGES = \ +@SOME_DRIVERS_FALSE@ bcmxcp_usb.8 \ +@SOME_DRIVERS_FALSE@ richcomm_usb.8 \ +@SOME_DRIVERS_FALSE@ tripplite_usb.8 \ +@SOME_DRIVERS_FALSE@ usbhid-ups.8 + +@SOME_DRIVERS_FALSE@HTML_USB_LIBUSB_MANS = \ +@SOME_DRIVERS_FALSE@ bcmxcp_usb.html \ +@SOME_DRIVERS_FALSE@ richcomm_usb.html \ +@SOME_DRIVERS_FALSE@ tripplite_usb.html \ +@SOME_DRIVERS_FALSE@ usbhid-ups.html + + +# (--with-neon) +@SOME_DRIVERS_FALSE@SRC_NETXML_PAGES = netxml-ups.txt +@SOME_DRIVERS_FALSE@MAN_NETXML_PAGES = netxml-ups.8 +@SOME_DRIVERS_FALSE@HTML_NETXML_MANS = netxml-ups.html + +# (--with-powerman) +@SOME_DRIVERS_FALSE@SRC_POWERMAN_PAGES = powerman-pdu.txt +@SOME_DRIVERS_FALSE@MAN_POWERMAN_PAGES = powerman-pdu.8 +@SOME_DRIVERS_FALSE@HTML_POWERMAN_MANS = powerman-pdu.html + +# SOME_DRIVERS +MAN_MANS = \ + $(MAN_CONF_PAGES) \ + $(MAN_CLIENT_PAGES) \ + $(MAN5_CGI_PAGES) \ + $(MAN8_CGI_PAGES) \ + $(MAN1_DEV_PAGES) \ + $(MAN3_DEV_PAGES) \ + $(MAN_SERIAL_PAGES) \ + $(MAN_SNMP_PAGES) \ + $(MAN_USB_LIBUSB_PAGES) \ + $(MAN_NETXML_PAGES) \ + $(MAN_POWERMAN_PAGES) + + +# distribute everything, even those not installed by default +# Note that 'dist' target requires AsciiDoc! +EXTRA_DIST = \ + $(SRC_CONF_PAGES) \ + $(SRC_CLIENT_PAGES) \ + $(SRC_CGI_PAGES) \ + $(SRC_DEV_PAGES) \ + $(SRC_SERIAL_PAGES) \ + $(SRC_SNMP_PAGES) \ + $(SRC_USB_LIBUSB_PAGES) \ + $(SRC_NETXML_PAGES) \ + $(SRC_POWERMAN_PAGES) \ + $(MAN_MANS) \ + asciidoc.conf + +HTML_MANS = \ + $(HTML_CONF_MANS) \ + $(HTML_CLIENT_MANS) \ + $(HTML_CGI_MANS) \ + $(HTML_DEV_MANS) \ + $(HTML_SERIAL_MANS) \ + $(HTML_SNMP_MANS) \ + $(HTML_USB_LIBUSB_MANS) \ + $(HTML_NETXML_MANS) \ + $(HTML_POWERMAN_MANS) + +CLEANFILES = *.xml *.html +SUFFIXES = .txt .html .1 .3 .5 .8 + +### The --destination-dir flag doesn't seem to affect the intermediate .xml file. +### Hence, the copying dance below. +@HAVE_ASCIIDOC_TRUE@A2X_MANPAGE_OPTS = -f manpage --attribute nutversion="@PACKAGE_VERSION@" all: all-am .SUFFIXES: +.SUFFIXES: .txt .html .1 .3 .5 .8 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -339,9 +638,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu man/Makefile + $(AUTOMAKE) --gnu docs/man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -366,13 +665,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-man1: $(man_MANS) +install-man1: $(man1_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ + @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -395,22 +692,18 @@ install-man1: $(man_MANS) uninstall-man1: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ + @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -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; } -install-man3: $(man_MANS) +install-man3: $(man3_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list=''; test -n "$(man3dir)" || exit 0; \ + @list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -433,22 +726,18 @@ install-man3: $(man_MANS) uninstall-man3: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man3dir)" || exit 0; \ + @list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -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; } -install-man5: $(man_MANS) +install-man5: $(man5_MANS) @$(NORMAL_INSTALL) test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list=''; test -n "$(man5dir)" || exit 0; \ + @list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -471,22 +760,18 @@ install-man5: $(man_MANS) uninstall-man5: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man5dir)" || exit 0; \ + @list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -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; } -install-man8: $(man_MANS) +install-man8: $(man8_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ + @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -509,10 +794,8 @@ install-man8: $(man_MANS) uninstall-man8: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ + @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ @@ -592,6 +875,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -686,6 +970,50 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \ uninstall-man8 +all: + +man-index.html: index.html + cp -f $< $@ + +html-man: $(HTML_MANS) man-index.html + +@HAVE_ASCIIDOC_TRUE@.txt.html: +@HAVE_ASCIIDOC_TRUE@ $(ASCIIDOC) --backend=xhtml11 \ +@HAVE_ASCIIDOC_TRUE@ --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ +@HAVE_ASCIIDOC_TRUE@ --attribute localtime=`TZ=UTC date +%H:%M:%S` \ +@HAVE_ASCIIDOC_TRUE@ -o $@ $< + +@HAVE_ASCIIDOC_TRUE@.txt.1: +@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< . +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +@HAVE_ASCIIDOC_TRUE@.txt.3: +@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< . +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +@HAVE_ASCIIDOC_TRUE@.txt.5: +@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< . +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +@HAVE_ASCIIDOC_TRUE@.txt.8: +@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< . +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<` + +@HAVE_ASCIIDOC_FALSE@.txt.html: +@HAVE_ASCIIDOC_FALSE@ @echo "Not (re)building $@ manual page, since 'asciidoc' was not found." + +@HAVE_ASCIIDOC_FALSE@.txt.1: +@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +@HAVE_ASCIIDOC_FALSE@.txt.3: +@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +@HAVE_ASCIIDOC_FALSE@.txt.5: +@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." + +@HAVE_ASCIIDOC_FALSE@.txt.8: +@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/docs/man/apcsmart.8 b/docs/man/apcsmart.8 new file mode 100644 index 0000000..4c0075b --- /dev/null +++ b/docs/man/apcsmart.8 @@ -0,0 +1,124 @@ +'\" t +.\" Title: apcsmart +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "APCSMART" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +apcsmart \- Driver for American Power Conversion Smart Protocol UPS equipment +.SH "SYNOPSIS" +.sp +\fBapcsmart\fR \-h +.sp +\fBapcsmart\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the apcsmart driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +apcsmart should recognize all recent APC models that use a serial protocol at 2400 bps\&. This is primarily the Smart\-UPS, Matrix\-UPS and Back\-UPS Pro lines\&. +.sp +The driver attempts to support every bell and whistle of the APC reporting interface, whether or not this is strictly sensible\&. +.sp +Some older hardware may only report a handful of variables\&. This is usually not a bug\(emthey just don\(cqt support anything else\&. +.SH "CABLING" +.sp +This driver expects to see a 940\-0024C cable or a clone by default\&. You can switch to the 940\-0095B dual\-mode cable support with the cable= definition described below\&. +.sp +If your 940\-0024C cable is broken or missing, use this diagram to build a clone: +.sp +http://www\&.networkupstools\&.org/cables/940\-0024C\&.jpg +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBcable=940\-0095B\fR +.RS 4 +Configure the serial port for the APC 940\-0095B dual\-mode cable\&. +.RE +.PP +\fBsdtype=\fR\fInum\fR +.RS 4 +Use shutdown type +\fInum\fR, according to this table: +.PP +0 +.RS 4 +soft shutdown or powerdown, depending on battery status +.RE +.PP +1 +.RS 4 +soft shutdown followed by powerdown +.RE +.PP +2 +.RS 4 +instant power off +.RE +.PP +3 +.RS 4 +power off with grace period +.RE +.PP +4 +.RS 4 +"force OB" hack method for CS 350 +.RE +.RE +.sp +Modes 0 and 1 will power up the load when power returns\&. Modes 2 and 3 will keep the load turned off when the power returns\&. +.sp +Mode 4 exploits an oddity in the CS 350 models since they only seem to support the S command, but then only when running on battery\&. As a result, the driver will force the UPS to go on battery if necessary before sending the shutdown command\&. This ensures that the load gets reset\&. +.SH "BUGS" +.sp +Some older APC UPS models return bogus data in the status register during a front panel test\&. This is usually detected and discarded, but some other unexpected values have occasionally slipped through\&. +.sp +APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa\&. +.SH "AUTHOR" +.sp +Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&. +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/apcsmart.8 b/docs/man/apcsmart.txt similarity index 53% rename from man/apcsmart.8 rename to docs/man/apcsmart.txt index 7e9d866..33835c0 100644 --- a/man/apcsmart.8 +++ b/docs/man/apcsmart.txt @@ -1,52 +1,68 @@ -.TH APCSMART 8 "Mon Sep 29 2003" "" "Network UPS Tools (NUT)" -.SH NAME -apcsmart \- Driver for American Power Conversion Smart Protocol UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -apcsmart driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +APCSMART(8) +=========== + +NAME +---- + +apcsmart - Driver for American Power Conversion Smart Protocol UPS equipment + +SYNOPSIS +-------- + +*apcsmart* -h + +*apcsmart* -a 'UPS_NAME' ['OPTIONS'] + +NOTE: This man page only documents the hardware-specific features of the +apcsmart driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ -.SH SUPPORTED HARDWARE apcsmart should recognize all recent APC models that use a serial -protocol at 2400 bps. This is primarily the Smart\(hyUPS, Matrix\(hyUPS and -Back\(hyUPS Pro lines. +protocol at 2400 bps. This is primarily the Smart-UPS, Matrix-UPS and +Back-UPS Pro lines. The driver attempts to support every bell and whistle of the APC reporting interface, whether or not this is strictly sensible. Some older hardware may only report a handful of variables. This is -usually not a bug \(hy they just don't support anything else. +usually not a bug--they just don't support anything else. -.SH CABLING +CABLING +------- -This driver expects to see a 940\(hy0024C cable or a clone by default. You -can switch to the 940\(hy0095B dual\(hymode cable support with the cable= +This driver expects to see a 940-0024C cable or a clone by default. You +can switch to the 940-0095B dual-mode cable support with the `cable=` definition described below. -If your 940\(hy0024C cable is broken or missing, use this diagram to build +If your 940-0024C cable is broken or missing, use this diagram to build a clone: -http://random.networkupstools.org/cables/940\(hy0024C.jpg +http://www.networkupstools.org/cables/940-0024C.jpg + +EXTRA ARGUMENTS +--------------- -.SH EXTRA ARGUMENTS This driver supports the following optional settings in the -\fBups.conf\fR(5): +linkman:ups.conf[5]: -.IP "cable=940\(hy0095B" -Configure the serial port for the APC 940\(hy0095B dual\(hymode cable. +*cable=940-0095B*:: +Configure the serial port for the APC 940-0095B dual-mode cable. -.IP "sdtype=\fInum\fR" -Use shutdown type \fInum\fR, according to this table: +*sdtype=*'num':: +Use shutdown type 'num', according to this table: -0: soft shutdown or powerdown, depending on battery status +0;; soft shutdown or powerdown, depending on battery status -1: soft shutdown followed by powerdown +1;; soft shutdown followed by powerdown -2: instant power off +2;; instant power off -3: power off with grace period +3;; power off with grace period -4: 'force OB' hack method for CS 350 +4;; "force OB" hack method for CS 350 Modes 0 and 1 will power up the load when power returns. Modes 2 and 3 will keep the load turned off when the power returns. @@ -57,7 +73,9 @@ result, the driver will force the UPS to go on battery if necessary before sending the shutdown command. This ensures that the load gets reset. -.SH BUGS +BUGS +---- + 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. @@ -65,15 +83,19 @@ other unexpected values have occasionally slipped through. APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa. -.SH AUTHOR +AUTHOR +------ Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll). This driver was called newapc for a time and was renamed in the 1.5 series. -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/asciidoc.conf b/docs/man/asciidoc.conf new file mode 100644 index 0000000..077dea5 --- /dev/null +++ b/docs/man/asciidoc.conf @@ -0,0 +1,46 @@ +## Borrowed from 'linkgit' in the Git distribution. +## linkman: macro +# +# Usage: linkman:command[manpage-section] +# +# Note, {0} is the manpage section, while {target} is the command. +# +# Show NUT link as: (

    ); if section is defined, else just show +# the command. + +[macros] +(?su)[\\]?(?Plinkman):(?P\S*?)\[(?P.*?)\]= + +ifdef::backend-docbook[] +[linkman-inlinemacro] +{0%{target}} +{0#} +{0#{target}{0}} +{0#} +endif::backend-docbook[] + +ifdef::backend-xhtml11[] +[linkman-inlinemacro] +{target}{0?({0})} +endif::backend-xhtml11[] + +# Meta info for a2x manpage conversion: +ifdef::doctype-manpage[] +ifdef::backend-docbook[] +[header] +template::[header-declarations] + + +{mantitle} +{manvolnum} +Network UPS Tools +{nut_version} +NUT Manual + + + {manname} + {manpurpose} + +endif::backend-docbook[] +endif::doctype-manpage[] + diff --git a/docs/man/bcmxcp.8 b/docs/man/bcmxcp.8 new file mode 100644 index 0000000..2a7af9d --- /dev/null +++ b/docs/man/bcmxcp.8 @@ -0,0 +1,130 @@ +'\" t +.\" Title: bcmxcp +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BCMXCP" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bcmxcp \- Driver for UPSes supporting the serial BCM/XCP protocol +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bcmxcp driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver should recognize all serial BCM/XCP\-compatible UPSes\&. It has been developed and tested on Powerware PW5115 and PW9120 hardware\&. If your UPS has a USB connection, you may also consult the \fBbcmxcp_usb\fR(8) driver documentation\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5)\&. +.PP +\fBshutdown_delay=\fR\fIdelay\fR +.RS 4 +The number of seconds that the UPS should wait between receiving the shutdown command (upsdrvctl shutdown) and actually shutting off\&. +.RE +.PP +\fBbaud_rate=\fR\fIrate\fR +.RS 4 +Communication speed for the UPS\&. If this is set to 9600, it tries to connect to the UPS at 9600bps\&. If it fails to communicate, it will go into baud\-hunting\&. It starts at 1200 and goes up to 19200\&. If it succeeds, it tell you the speed it connected with\&. If not included in the config, it defaults to baud\-hunting\&. +.RE +.SH "DEFAULT VALUES FOR THE EXTRA ARGUMENTS" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fBshutdown_delay =\fR +\fI120\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fBbaud_rate =\fR +\fInone\fR +.RE +.SH "INSTANT COMMANDS" +.sp +This driver supports the following Instant Commands: +.PP +\fBshutdown\&.return\fR +.RS 4 +Turn off the load and return when power is back\&. +.RE +.PP +\fBshutdown\&.stayoff\fR +.RS 4 +Turn off the load and remain off\&. +.RE +.PP +\fBtest\&.battery\&.start\fR +.RS 4 +Start a battery test\&. +.RE +.PP +\fBoutlet\&.n\&.shutdown\&.return\fR +.RS 4 +Turn off the load on outlet +\fIn\fR +and return when power is back\&. (\fIn\fR +is the outlet number reported by the upsc command) +.RE +.SH "TODO LIST" +.PP +Report UPS statistics informations +.RS 4 +BCM/XCP supports reporting of UPS statistics data\&. +.RE +.PP +Change settings +.RS 4 +Access the config register to change settings\&. +.RE +.SH "BUGS" +.sp +None known\&. +.SH "AUTHOR" +.sp +Tore Ørpetveit +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "The USB BCM/XCP driver:" +.sp +\fBbcmxcp_usb\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/bcmxcp.txt b/docs/man/bcmxcp.txt new file mode 100644 index 0000000..8f5ed32 --- /dev/null +++ b/docs/man/bcmxcp.txt @@ -0,0 +1,88 @@ +BCMXCP(8) +========= + +NAME +---- + +bcmxcp - Driver for UPSes supporting the serial BCM/XCP protocol + +NOTE +---- +This man page only documents the hardware-specific features of the +bcmxcp driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver should recognize all serial BCM/XCP-compatible UPSes. It has +been developed and tested on Powerware PW5115 and PW9120 hardware. If your UPS +has a USB connection, you may also consult the linkman:bcmxcp_usb[8] driver +documentation. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]. + +*shutdown_delay=*'delay':: +The number of seconds that the UPS should wait between receiving the +shutdown command (`upsdrvctl shutdown`) and actually shutting off. + +*baud_rate=*'rate':: +Communication speed for the UPS. If this is set to 9600, it tries to connect +to the UPS at 9600bps. If it fails to communicate, it will go into baud-hunting. +It starts at 1200 and goes up to 19200. If it succeeds, it tell you the speed it +connected with. If not included in the config, it defaults to baud-hunting. + +DEFAULT VALUES FOR THE EXTRA ARGUMENTS +-------------------------------------- + - *shutdown_delay =* '120' + - *baud_rate =* 'none' + +INSTANT COMMANDS +---------------- +This driver supports the following Instant Commands: + +*shutdown.return*:: +Turn off the load and return when power is back. + +*shutdown.stayoff*:: +Turn off the load and remain off. + +*test.battery.start*:: +Start a battery test. + +*outlet.n.shutdown.return*:: +Turn off the load on outlet 'n' and return when power is back. +('n' is the outlet number reported by the upsc command) + +TODO LIST +--------- + +Report UPS statistics informations:: +BCM/XCP supports reporting of UPS statistics data. + +Change settings:: +Access the config register to change settings. + +BUGS +---- +None known. + +AUTHOR +------ +Tore Ørpetveit + +SEE ALSO +-------- +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +The USB BCM/XCP driver: +~~~~~~~~~~~~~~~~~~~~~~~ +linkman:bcmxcp_usb[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.8 new file mode 100644 index 0000000..591c43e --- /dev/null +++ b/docs/man/bcmxcp_usb.8 @@ -0,0 +1,114 @@ +'\" t +.\" Title: bcmxcp_usb +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BCMXCP_USB" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bcmxcp_usb \- Experimental driver for UPSes supporting the BCM/XCP protocol over USB +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bcmxcp_usb driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. This driver is a variant of the serial driver bcmxcp and uses the same core code\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver should recognize all BCM/XCP\-compatible UPSes that are connected via USB\&. It has been developed and tested on Powerware PW3501 hardware\&. It also has been tested on PW5110 hardware\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5)\&. +.PP +\fBshutdown_delay=\fR\fIdelay\fR +.RS 4 +The number of seconds that the UPS should wait between receiving the shutdown command and actually shutting off\&. +.RE +.SH "DEFAULT VALUES FOR THE EXTRA ARGUMENTS" +.sp +\fBshutdown_delay =\fR\fI120\fR +.SH "INSTANT COMMANDS" +.sp +This driver supports the following Instant Commands: +.PP +\fBshutdown\&.return\fR +.RS 4 +Turn off the load and return when power is back\&. +.RE +.PP +\fBshutdown\&.stayoff\fR +.RS 4 +Turn off the load and remain off\&. +.RE +.PP +\fBtest\&.battery\&.start\fR +.RS 4 +Start a battery test\&. +.RE +.SH "TODO LIST" +.PP +\fBReport UPS alarm status\fR +.RS 4 +BCM/XCP supports reporting a wide range of UPS alarm conditions\&. +.RE +.PP +\fBReport UPS statistics informations\fR +.RS 4 +BCM/XCP supports reporting of UPS statistics data\&. +.RE +.SH "EXPERIMENTAL DRIVER" +.sp +This driver has been tagged experimental, even if it has been reported to be stable\&. Thus it is not suitable for production systems and it is not built by default\&. This is mainly due to the fact that it is a new driver\&. +.SH "INSTALLATION" +.sp +This driver is not built by default\&. You can build it by using "configure \-\-with\-usb=yes"\&. Note that it will also install other USB drivers\&. +.sp +You also need to install manually the hotplug files (libhidups and libhid\&.usermap), generally in etc/hotplug/usb/, to address the permission settings problem\&. Lastly note that the libhidups file must have execution flag set (ie using chmod +x \&...)\&. +.SH "IMPLEMENTATION" +.sp +bcmxcp_usb only supports 1 UPS at this time\&. You can put the "auto" value for port in ups\&.conf, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[pw3105] + driver = bcmxcp_usb + port = auto +.fi +.if n \{\ +.RE +.\} +.SH "KNOWN ISSUES AND BUGS" +.SS ""Got EPERM: Operation not permitted upon driver startup"" +.sp +You have forgotten to install the hotplug files, as explained in the INSTALLATION section above\&. Don\(cqt forget to restart hotplug so that it applies these changes\&. +.SH "AUTHOR" +.sp +Tore Ørpetveit , Wolfgang Ocker +.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/ diff --git a/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.txt similarity index 57% rename from man/bcmxcp_usb.8 rename to docs/man/bcmxcp_usb.txt index de238d3..a69d631 100644 --- a/man/bcmxcp_usb.8 +++ b/docs/man/bcmxcp_usb.txt @@ -1,58 +1,70 @@ -.TH BCMXCP_USB 8 "Sun Sep 19 2004" "" "Network UPS Tools (NUT)" -.SH NAME -bcmxcp \- Experimental driver for UPS'es supporting the BCM/XCP protocol over USB -.SH NOTE -This man page only documents the hardware\(hyspecific features of the +BCMXCP_USB(8) +============= + +NAME +---- +bcmxcp_usb - Experimental driver for UPSes supporting the BCM/XCP protocol over USB + +NOTE +---- +This man page only documents the hardware-specific features of the bcmxcp_usb driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. This driver is a variant of the serial driver bcmxcp and uses the same core code. -.SH SUPPORTED HARDWARE -This driver should recognize all BCM/XCP-compatible UPS'es that are connected +SUPPORTED HARDWARE +------------------ +This driver should recognize all BCM/XCP-compatible UPSes that are connected via USB. It has been developed and tested on Powerware PW3501 hardware. It also has been tested on PW5110 hardware. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following optional settings in the -\fBups.conf\fR(5). +linkman:ups.conf[5]. -.IP "shutdown_delay=\fIdelay\fR" +*shutdown_delay=*'delay':: The number of seconds that the UPS should wait between receiving the shutdown command and actually shutting off. -.SH DEFAULT VALUES FOR THE EXTRA ARGUMENTS -.IP "shutdown_delay = \fI120\fR" +DEFAULT VALUES FOR THE EXTRA ARGUMENTS +-------------------------------------- +*shutdown_delay =*'120' -.SH INSTANT COMMANDS +INSTANT COMMANDS +---------------- This driver supports the following Instant Commands: -.IP "shutdown.return" +*shutdown.return*:: Turn off the load and return when power is back. -.IP "shutdown.stayoff" +*shutdown.stayoff*:: Turn off the load and remain off. -.IP "test.battery.start" +*test.battery.start*:: Start a battery test. -.SH TODO LIST +TODO LIST +--------- -.IP "Report UPS alarm status" +*Report UPS alarm status*:: BCM/XCP supports reporting a wide range of UPS alarm conditions. -.IP "Report UPS statistics informations" +*Report UPS statistics informations*:: BCM/XCP supports reporting of UPS statistics data. -.SH EXPERIMENTAL DRIVER +EXPERIMENTAL DRIVER +------------------- This driver has been tagged experimental, even if it has been reported to be stable. Thus it is not suitable for production systems and it is not built by default. This is mainly due to the fact that it is a new driver. -.SH INSTALLATION +INSTALLATION +------------ This driver is not built by default. You can build it by using -"configure \-\-with\-usb=yes". Note that it will also install other USB +"configure --with-usb=yes". Note that it will also install other USB drivers. You also need to install manually the hotplug files (libhidups and @@ -60,31 +72,36 @@ libhid.usermap), generally in etc/hotplug/usb/, to address the permission settings problem. Lastly note that the libhidups file must have execution flag set (ie using chmod +x ...). -.SH IMPLEMENTATION +IMPLEMENTATION +-------------- bcmxcp_usb only supports 1 UPS at this time. You can put the -"auto" value for port in \fBups.conf\fR, i.e.: +"auto" value for port in `ups.conf`, i.e.: -.nf [pw3105] driver = bcmxcp_usb port = auto -.fi -.SH KNOWN ISSUES AND BUGS -.SS "Got EPERM: Operation not permitted upon driver startup" +KNOWN ISSUES AND BUGS +--------------------- +"Got EPERM: Operation not permitted upon driver startup" +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You have forgotten to install the hotplug files, as explained in the INSTALLATION section above. Don't forget to restart hotplug so that it applies these changes. -.SH AUTHOR -Tore \[/O]rpetveit , +AUTHOR +------ +Tore Ørpetveit , Wolfgang Ocker -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/belkin.8 b/docs/man/belkin.8 new file mode 100644 index 0000000..4aa1378 --- /dev/null +++ b/docs/man/belkin.8 @@ -0,0 +1,68 @@ +'\" t +.\" Title: belkin +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BELKIN" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +belkin \- Driver for Belkin serial UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the belkin driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The \fBbelkin\fR driver is known to support the Regulator Pro 525 (F6C525\-SER)\&. Other similar models such as the 425 and 625 should also work\&. +.sp +The Trust UPS and older Belkin units are not supported\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "BUGS" +.sp +There are dragons lurking within the protocol to this UPS\&. I have one that essentially behaves like a glorified power strip due to some invasive probing on my part\&. Don\(cqt mess with it directly\&. +.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 +the driver doesn\(cqt go anywhere near these character sequences, so it won\(cqt zap your UPS\&. I only mention this here as yet another reminder of the perils of closed hardware\&. +.sp .5v +.RE +.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/ diff --git a/man/belkin.8 b/docs/man/belkin.txt similarity index 54% rename from man/belkin.8 rename to docs/man/belkin.txt index 6f1596f..495201e 100644 --- a/man/belkin.8 +++ b/docs/man/belkin.txt @@ -1,36 +1,49 @@ -.TH BELKIN 8 "Tue Jul 29 2003" "" "Network UPS Tools (NUT)" -.SH NAME -belkin \- Driver for Belkin serial UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -belkin driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +BELKIN(8) +========= -.SH SUPPORTED HARDWARE -The belkin driver is known to support the Regulator Pro 525 (F6C525\(hySER). +NAME +---- + +belkin - Driver for Belkin serial UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +belkin driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The *belkin* driver is known to support the Regulator Pro 525 (F6C525-SER). Other similar models such as the 425 and 625 should also work. The Trust UPS and older Belkin units are not supported. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver does not support any extra settings in the -\fBups.conf\fR(5). +linkman:ups.conf[5]. -.SH BUGS +BUGS +---- There are dragons lurking within the protocol to this UPS. I have one that essentially behaves like a glorified power strip due to some invasive probing on my part. Don't mess with it directly. -Note: the driver doesn't go anywhere near these character sequences, +NOTE: the driver doesn't go anywhere near these character sequences, so it won't zap your UPS. I only mention this here as yet another reminder of the perils of closed hardware. -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/belkinunv.8 b/docs/man/belkinunv.8 new file mode 100644 index 0000000..eca4c8c --- /dev/null +++ b/docs/man/belkinunv.8 @@ -0,0 +1,352 @@ +'\" t +.\" Title: belkinunv +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BELKINUNV" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +belkinunv \- Driver for Belkin "Universal UPS" and compatible +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the belkin driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The belkinunv driver is known to work with the Belkin Universal UPS models F6C800\-UNV and F6C120\-UNV, and is expected to work with other Belkin Universal UPS models\&. The driver only supports serial communication, not USB\&. +.sp +The Trust UPS and older Belkin units are not supported by this driver, and neither are the Belkin Home Office models (F6H500\-SER and so forth)\&. However, some Belkin models, such as the Regulator Pro, are supported by the \fBbelkin\fR(8) driver, and the Home Office models are supported using the \fBgenericups\fR(8) driver with upstype=7\&. +.SH "SOFT SHUTDOWN WORKAROUND" +.sp +One problem with the Belkin Universal UPS is that it cannot enter a soft shutdown (shut down the load until AC power returns) unless the batteries are completely depleted\&. Thus, one cannot just shut off the UPS after operating system shutdown; it will not come back on when the power comes back on\&. Therefore, the belkinunv driver should never be used with the \fB\-k\fR option\&. Instead, the \fB\-x wait\fR option is provided as a workaround\&. +.sp +When called with the \fB\-x wait\fR option, \fBbelkinunv\fR behaves as a standalone program (i\&.e\&., it does not fork into the background)\&. It performs one simple task: it connects to the UPS, waits for AC power to return, and then exits with status 0\&. +.sp +This is meant to be used in a shutdown script as follows: during a shutdown, after all filesystems have been remounted read\-only, and just before the system would normally be halted: check /etc/killpower (or similar) to see if this shutdown was caused by \fBupsmon\fR(8), and if yes, call \fBbelkinunv \-x wait\fR\&. If AC power comes back on, \fBbelkinunv\fR exits, and things should be arranged so that the system reboots in this case\&. If AC power does not come back on, the UPS will eventually run out of batteries, kill the computer\(cqs power supply, and go into soft shutdown mode, which means everything will reboot properly when the power returns\&. In either case, a deadlock is avoided\&. +.sp +In addition, if an optional integer argument is given to the \fB\-x wait\fR option, this causes \fBbelkinunv\fR to wait not only for AC power to be present, but also for the battery charge to reach the given level\&. I use this as part of my startup scripts, to ensure that the batteries are sufficiently charged before the computer continues booting\&. This should be put very early in the startup script, before any filesystems are mounted read/write, and before any filesystem checks are performed\&. +.sp +Several other \fB\-x\fR options are provided to fine\-tune this behavior\&. See the options below for detailed descriptions\&. See the examples below for examples of how to use \fBbelkinunv\fR in shutdown and startup scripts\&. +.SH "OPTIONS" +.sp +See also \fBnutupsdrv\fR(8) for generic options\&. Never use the \fB\-k\fR option with this driver; it does not work properly\&. +.PP +\fB\-x wait\fR[=\fIlevel\fR] +.RS 4 +When this option is used, +\fBbelkinunv\fR +does not fork into the background, but behaves as a standalone program\&. It connects to the UPS and waits until AC power is present\&. If +\fIlevel\fR +is specified, it also waits until the battery charge reaches at least the given level in percent\&. Then, and only then, +\fBbelkinunv\fR +exits\&. In addition, while +\fBbelkinunv\fR +runs in this mode, it displays a status line with information on the UPS status and battery level\&. This is intended for use in the computer\(cqs shutdown and startup scripts, as described under +Soft Shutdown Workaround +above\&. +.RE +.PP +\fB\-x nohang\fR +.RS 4 +This option only has an effect when used in conjunction with the +\fB\-x wait\fR +option\&. It causes +\fBbelkinunv\fR +to exit if a connection with the UPS cannot be established or is lost, instead of retrying forever, which is the default behavior\&. The +\fB\-x nohang\fR +option should be used in a startup script, to ensure the computer remains bootable even if the UPS has been disconnected during the power failure (for instance, you attached your computer to a generator, carried it to a neighbor\(cqs house, or whatever)\&. +.RE +.PP +\fB\-x flash\fR +.RS 4 +This option only has an effect when used in conjunction with the +\fB\-x wait\fR +option\&. It causes the UPS load to be shut off for a short time ("flashed") just after the AC power has returned and the requested battery level (if any) has been attained\&. This is useful if slaves are attached to this UPS; the flash will cause all of them to reboot\&. Note that, due to the design of the Belkin UPS hardware, the load shutdown lasts ca\&. 1\(em2 minutes; a shorter flash cannot be performed reliably\&. Also, the computers will reboot at the scheduled time, on battery power if necessary, even if AC power fails again in the meantime\&. This should not be a problem, as your startup scripts can catch this situation\&. +.RE +.PP +\fB\-x silent\fR +.RS 4 +This option only has an effect when used in conjunction with the +\fB\-x wait\fR +option\&. It suppresses the status line which +\fBbelkinunv\fR +would normally print\&. +.RE +.PP +\fB\-x dumbterm\fR +.RS 4 +This option only has an effect when used in conjunction with the +\fB\-x wait\fR +option\&. It changes the way in which +\fBbelkinunv\fR +prints its status line\&. Normally, terminal control sequences are used to overwrite the same line with new status information, each time the status is updated\&. This may not work on all terminals\&. If the +\fB\-x dumbterm\fR +option is given, each status update is written on a new line\&. +.RE +.SH "VARIABLES" +.PP +\fBbattery\&.charge\fR, \fBbattery\&.runtime\fR +.RS 4 +not supported by all hardware\&. +.RE +.PP +\fBbattery\&.voltage\fR, \fBbattery\&.voltage\&.nominal\fR, \fBdriver\&.version\&.internal\fR, \fBinput\&.frequency\fR, \fBinput\&.frequency\&.nominal\fR +.RS 4 +e\&.g\&. 60 for 60Hz +.RE +.PP +\fBinput\&.sensitivity\fR +.RS 4 +writable: normal/medium/low +.RE +.PP +\fBinput\&.transfer\&.high\fR +.RS 4 +writable: high transfer voltage point in V +.RE +.PP +\fBinput\&.transfer\&.low\fR +.RS 4 +writable: low transfer voltage point in V +.RE +.PP +\fBinput\&.voltage\fR, \fBinput\&.voltage\&.maximum\fR, \fBinput\&.voltage\&.minimum\fR, \fBinput\&.voltage\&.nominal\fR, \fBoutput\&.frequency\fR, \fBoutput\&.voltage\fR, \fBups\&.beeper\&.status\fR +.RS 4 +writable\&. Values: enabled/disabled/muted\&. This variable controls the state of the panel beeper\&. Enabled means sound when the alarm is present, disabled means never sound, and muted means the sound is temporarily disabled until the alarm would normally stop sounding\&. In the muted state, the beeper is automatically turned back on at the next event (AC failure, battery test, etc)\&. Also, the beeper can\(cqt be turned off during a critical event (low battery)\&. Note that not all UPS models support the "disabled" state\&. +.RE +.PP +\fBups\&.firmware\fR, \fBups\&.load\fR, \fBups\&.model\fR, \fBups\&.power\&.nominal\fR +.RS 4 +e\&.g\&. 800 for an 800VA system +.RE +.PP +\fBups\&.status\fR +.RS 4 +a list of flags; see the +status flags +below\&. +.RE +.PP +\fBups\&.temperature\fR +.RS 4 +not supported by all hardware\&. +.RE +.PP +\fBups\&.test\&.result\fR, \fBups\&.delay\&.restart\fR +.RS 4 +time to restart (read only) +.RE +.PP +\fBups\&.delay\&.shutdown\fR +.RS 4 +time to shutdown (read only)\&. This is always a multiple of 60 seconds\&. +.RE +.PP +\fBups\&.type\fR +.RS 4 +ONLINE/OFFLINE/LINEINT\&. This describes the basic layout of this UPS (for GUI clients which want to draw an animated picture of power flow)\&. An offline UPS has a direct connection from AC input to AC output, and also a connection from AC input to the battery, and from the battery to AC output\&. An online UPS lacks the direct connection from AC input to AC output, whereas a line interactive UPS lacks the connection from AC input to the battery\&. +.RE +.SH "COMMANDS" +.PP +\fBbeeper\&.enable, beeper\&.disable, beeper\&.mute\fR +.RS 4 +Enable, disable or mute the panel beeper\&. Note that if the beeper is muted, it is automatically turned back on at the next event (AC failure, battery test, etc)\&. Also, the beeper can\(cqt be turned muted during a critical event (low battery)\&. +.RE +.PP +\fBreset\&.input\&.minmax\fR +.RS 4 +Reset the variables +\fBinput\&.voltage\&.minimum\fR +and +\fBinput\&.voltage\&.maximum\fR\&. +.RE +.PP +\fBshutdown\&.reboot\fR +.RS 4 +Shut down load immediately for about 1\(em2 minutes\&. +.RE +.PP +\fBshutdown\&.reboot\&.graceful\fR +.RS 4 +After 40 second delay, shut down load for about 1\(em2 minutes\&. +.RE +.PP +\fBshutdown\&.stayoff\fR +.RS 4 +Shut down load immediately and stay off\&. The only way it can be turned back on is by manually pressing the front panel button\&. +.RE +.PP +\fBtest\&.battery\&.start, test\&.battery\&.stop\fR +.RS 4 +Start/stop 10 second battery test\&. +.RE +.PP +\fBtest\&.failure\&.start, test\&.failure\&.stop\fR +.RS 4 +Start/stop "deep" battery test\&. +.RE +.SH "STATUS FLAGS" +.PP +\fBOB\fR +.RS 4 +load is on battery, including during tests +.RE +.PP +\fBOFF\fR +.RS 4 +load is off +.RE +.PP +\fBOL\fR +.RS 4 +load is online +.RE +.PP +\fBACFAIL\fR +.RS 4 +AC failure\&. Note that this refers to the AC input, and thus it is not the same as "OB"\&. An AC failure can occur at any time, for instance, during a battery test, or when the UPS load is off\&. +.RE +.PP +\fBOVER\fR +.RS 4 +overload +.RE +.PP +\fBOVERHEAT\fR +.RS 4 +overheat +.RE +.PP +\fBCOMMFAULT\fR +.RS 4 +UPS fault +.RE +.PP +\fBLB\fR +.RS 4 +low battery +.RE +.PP +\fBCHRG\fR +.RS 4 +charging +.RE +.PP +\fBDEPLETED\fR +.RS 4 +the battery is depleted\&. When the UPS raises this flag, it simultaneously switches off the load\&. +.RE +.PP +\fBRB\fR +.RS 4 +replace battery +.RE +.SH "EXAMPLES" +.sp +Here is an example for how \fBbelkinunv\fR should be used in a computer\(cqs shutdown script\&. These commands should go in the very last part of the shutdown script, after all file systems have been mounted read\-only, and just before the computer halts\&. Note that \fBbelkinunv\fR must be installed in a directory which is still readable at that point\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# NEAR END OF SHUTDOWN SCRIPT: +# if shutdown was caused by UPS, perform Belkin UPS workaround\&. +if [ \-f /etc/killpower ] ; then + echo "Waiting for AC power, or for UPS batteries to run out\&.\&.\&." + /usr/bin/belkinunv \-x wait /dev/ttyS1 +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf + # we get here if the power came back on\&. Reboot\&. + echo "Power is back\&. Rebooting\&.\&.\&." + reboot +fi +.fi +.if n \{\ +.RE +.\} +.sp +And here is an example of how to use \fBbelkinunv\fR in the startup script\&. These commands should go near the beginning of the startup script, before any file systems are mounted read/write, and before any file system integrity checks are done\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# NEAR BEGINNING OF STARTUP SCRIPT: +# if we are recovering from a power failure, wait for the UPS to +# charge to a comfortable level before writing anything to disk +if [ \-f /etc/killpower ] ; then + echo "Waiting for UPS battery charge to reach 60%\&.\&.\&." + /usr/bin/belkinunv \-x wait=60 \-x nohang /dev/ttyS1 +fi +.fi +.if n \{\ +.RE +.\} +.SH "EXIT STATUS" +.sp +When used normally, \fBbelkinunv\fR forks into the background and its diagnostics are the same as for all NUT drivers, see \fBnutupsdrv\fR(8)\&. +.sp +When used with the \fB\-x wait\fR option, the exit status is normally \fB0\fR\&. If the \fB\-x nohang\fR option has also been specified, an exit status of \fB1\fR indicates that communication with the UPS was lost\&. If the \fB\-x flash\fR option has been specified, an exit status of \fB2\fR indicates that the timed shutdown has failed\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in \fBups.conf\fR(5)\&. +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The NUT (Network UPS Tools) home page: +http://www\&.networkupstools\&.org/ +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The documentation for the protocol used by this UPS: +belkin\-universal\-ups\&.html +.RE +.SH "AUTHOR" +.sp +Peter Selinger diff --git a/docs/man/belkinunv.txt b/docs/man/belkinunv.txt new file mode 100644 index 0000000..9f7b6af --- /dev/null +++ b/docs/man/belkinunv.txt @@ -0,0 +1,344 @@ +BELKINUNV(8) +============ + +NAME +---- + +belkinunv - Driver for Belkin "Universal UPS" and compatible + +NOTE +---- +This man page only documents the hardware-specific features of the +belkin driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The belkinunv driver is known to work with the Belkin Universal UPS +models F6C800-UNV and F6C120-UNV, and is expected to work with other +Belkin Universal UPS models. The driver only supports serial +communication, not USB. + +The Trust UPS and older Belkin units are not supported by this driver, +and neither are the Belkin Home Office models (F6H500-SER and so +forth). However, some Belkin models, such as the Regulator Pro, are +supported by the linkman:belkin[8] driver, and the Home Office models +are supported using the linkman:genericups[8] driver with +`upstype=7`. + +SOFT SHUTDOWN WORKAROUND +------------------------ +One problem with the Belkin Universal UPS is that it cannot enter a +soft shutdown (shut down the load until AC power returns) unless the +batteries are completely depleted. Thus, one cannot just shut off the +UPS after operating system shutdown; it will not come back on when the +power comes back on. Therefore, the belkinunv driver should never be +used with the *-k* option. Instead, the *-x wait* option is +provided as a workaround. + +When called with the *-x wait* option, *belkinunv* behaves as +a standalone program (i.e., it does not fork into the background). It +performs one simple task: it connects to the UPS, waits for AC power +to return, and then exits with status 0. + +This is meant to be used in a shutdown script as follows: during a +shutdown, after all filesystems have been remounted read-only, and +just before the system would normally be halted: check /etc/killpower +(or similar) to see if this shutdown was caused by linkman:upsmon[8], +and if yes, call *belkinunv -x wait*. If AC power comes back on, +*belkinunv* exits, and things should be arranged so that the +system reboots in this case. If AC power does not come back on, the +UPS will eventually run out of batteries, kill the computer's power +supply, and go into soft shutdown mode, which means everything will +reboot properly when the power returns. In either case, a deadlock is +avoided. + +In addition, if an optional integer argument is given to the *-x wait* +option, this causes *belkinunv* to wait not only for AC power to be present, +but also for the battery charge to reach the given level. I use this as part of +my startup scripts, to ensure that the batteries are sufficiently charged +before the computer continues booting. This should be put very early in the +startup script, before any filesystems are mounted read/write, and before any +filesystem checks are performed. + +Several other *-x* options are provided to fine-tune this +behavior. See the <<_options,options>> below for detailed descriptions. See the +<<_examples,examples>> +below for examples of how to use *belkinunv* in shutdown and +startup scripts. + +OPTIONS +------- +See also linkman:nutupsdrv[8] for generic options. Never use the +*-k* option with this driver; it does not work properly. + +*-x wait*[='level']:: +When this option is used, *belkinunv* does not fork into the +background, but behaves as a standalone program. It connects to the UPS and +waits until AC power is present. If 'level' is specified, it also +waits until the battery charge reaches at least the given level in +percent. Then, and only then, *belkinunv* exits. In addition, +while *belkinunv* runs in this mode, it displays a status line +with information on the UPS status and battery level. This is intended +for use in the computer's shutdown and startup scripts, as described +under <<_soft_shutdown_workaround,Soft Shutdown Workaround>> above. + +*-x nohang*:: +This option only has an effect when used in conjunction with the *-x wait* +option. It causes *belkinunv* to exit if a connection with +the UPS cannot be established or is lost, instead of retrying forever, +which is the default behavior. The *-x nohang* option should be +used in a startup +script, to ensure the computer remains bootable even if the UPS has +been disconnected during the power failure (for instance, you attached +your computer to a generator, carried it to a neighbor's house, or +whatever). + +*-x flash*:: +This option only has an effect when used in conjunction with the *-x wait* +option. It causes the UPS load to be shut off for a short time +("flashed") just after the AC power has returned and the requested +battery level (if any) has been attained. This is useful if slaves are +attached to this UPS; the flash will cause all of them to reboot. Note +that, due to the design of the Belkin UPS hardware, the load shutdown lasts +ca. 1--2 minutes; a shorter flash cannot be performed reliably. Also, +the computers will reboot at the scheduled time, on battery power if +necessary, even if AC power fails again in the meantime. This should +not be a problem, as your startup scripts can catch this situation. + +*-x silent*:: +This option only has an effect when used in conjunction with the *-x wait* +option. It suppresses the status line which *belkinunv* +would normally print. + +*-x dumbterm*:: +This option only has an effect when used in conjunction with the *-x wait* +option. It changes the way in which *belkinunv* prints its +status line. Normally, terminal control sequences are used to +overwrite the same line with new status information, each time the +status is updated. This may not work on all terminals. If the *-x dumbterm* +option is given, each status update is written on a new +line. + +VARIABLES +--------- +*battery.charge*:: + +*battery.runtime*:: +not supported by all hardware. + +*battery.voltage*:: + +*battery.voltage.nominal*:: + +*driver.version.internal*:: + +*input.frequency*:: + +*input.frequency.nominal*:: +e.g. 60 for 60Hz + +*input.sensitivity*:: +writable: normal/medium/low + +*input.transfer.high*:: +writable: high transfer voltage point in V + +*input.transfer.low*:: +writable: low transfer voltage point in V + +*input.voltage*:: + +*input.voltage.maximum*:: + +*input.voltage.minimum*:: + +*input.voltage.nominal*:: + +*output.frequency*:: + +*output.voltage*:: + +*ups.beeper.status*:: +writable. Values: enabled/disabled/muted. This variable controls the +state of the panel beeper. Enabled means sound when the alarm is +present, disabled means never sound, and muted means the sound is +temporarily disabled until the alarm would normally stop sounding. In +the muted state, the beeper is automatically turned back on at the +next event (AC failure, battery test, etc). Also, the beeper can't be +turned off during a critical event (low battery). Note that not all +UPS models support the "disabled" state. + +*ups.firmware*:: + +*ups.load*:: + +*ups.model*:: + +*ups.power.nominal*:: +e.g. 800 for an 800VA system + +*ups.status*:: +a list of flags; see the <<_status_flags,status flags>> below. + +*ups.temperature*:: +not supported by all hardware. + +*ups.test.result*:: + +*ups.delay.restart*:: +time to restart (read only) + +*ups.delay.shutdown*:: +time to shutdown (read only). This is always a multiple of 60 seconds. + +*ups.type*:: +ONLINE/OFFLINE/LINEINT. This describes the basic layout of this UPS +(for GUI clients which want to draw an animated picture of power +flow). An offline UPS has a direct connection from AC input to AC +output, and also a connection from AC input to the battery, and from +the battery to AC output. An online UPS lacks the direct connection +from AC input to AC output, whereas a line interactive UPS lacks the +connection from AC input to the battery. + + +COMMANDS +-------- + +*beeper.enable, beeper.disable, beeper.mute*:: +Enable, disable or mute the panel beeper. Note that if the beeper is +muted, it is automatically turned back on at the next event (AC failure, +battery test, etc). Also, the beeper can't be turned muted during a +critical event (low battery). + +*reset.input.minmax*:: +Reset the variables *input.voltage.minimum* and +*input.voltage.maximum*. + +*shutdown.reboot*:: +Shut down load immediately for about 1--2 minutes. + +*shutdown.reboot.graceful*:: +After 40 second delay, shut down load for about 1--2 minutes. + +*shutdown.stayoff*:: +Shut down load immediately and stay off. The only way it can be turned +back on is by manually pressing the front panel button. + +*test.battery.start, test.battery.stop*:: +Start/stop 10 second battery test. + +*test.failure.start, test.failure.stop*:: +Start/stop "deep" battery test. + + +STATUS FLAGS +------------ + +*OB*:: +load is on battery, including during tests + +*OFF*:: +load is off + +*OL*:: +load is online + +*ACFAIL*:: +AC failure. Note that this refers to the AC input, and thus it is not +the same as "OB". An AC failure can occur at any time, for instance, +during a battery test, or when the UPS load is off. + +*OVER*:: +overload + +*OVERHEAT*:: +overheat + +*COMMFAULT*:: +UPS fault + +*LB*:: +low battery + +*CHRG*:: +charging + +*DEPLETED*:: +the battery is depleted. When the UPS raises this flag, it +simultaneously switches off the load. + +*RB*:: +replace battery + +EXAMPLES +-------- + +Here is an example for how *belkinunv* should be used in a +computer's shutdown script. These commands should go in the very last +part of the shutdown script, after all file systems have been mounted +read-only, and just before the computer halts. Note that +*belkinunv* must be installed in a directory which is still +readable at that point. + + + # NEAR END OF SHUTDOWN SCRIPT: + # if shutdown was caused by UPS, perform Belkin UPS workaround. + if [ -f /etc/killpower ] ; then + echo "Waiting for AC power, or for UPS batteries to run out..." + /usr/bin/belkinunv -x wait /dev/ttyS1 + + # we get here if the power came back on. Reboot. + echo "Power is back. Rebooting..." + reboot + fi + +And here is an example of how to use *belkinunv* in the startup +script. These commands should go near the beginning of the startup +script, before any file systems are mounted read/write, and before any +file system integrity checks are done. + + + # NEAR BEGINNING OF STARTUP SCRIPT: + # if we are recovering from a power failure, wait for the UPS to + # charge to a comfortable level before writing anything to disk + if [ -f /etc/killpower ] ; then + echo "Waiting for UPS battery charge to reach 60%..." + /usr/bin/belkinunv -x wait=60 -x nohang /dev/ttyS1 + fi + +EXIT STATUS +----------- + +When used normally, *belkinunv* forks into the background and its +diagnostics are the same as for all NUT drivers, see +linkman:nutupsdrv[8]. + +When used with the *-x wait* option, the exit status is normally +*0*. If the *-x nohang* option has also been specified, an exit +status of *1* indicates that communication with the UPS was lost. If the +*-x flash* option has been specified, an exit status of *2* +indicates that the timed shutdown has failed. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in linkman:ups.conf[5]. + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ + - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + - The documentation for the protocol used by this UPS: +link:http://www.mscs.dal.ca/~selinger/ups/belkin-universal-ups.html[belkin-universal-ups.html] + +AUTHOR +------ + +Peter Selinger diff --git a/docs/man/bestfcom.8 b/docs/man/bestfcom.8 new file mode 100644 index 0000000..dfeafd1 --- /dev/null +++ b/docs/man/bestfcom.8 @@ -0,0 +1,56 @@ +'\" t +.\" Title: bestfcom +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BESTFCOM" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bestfcom \- Driver for Best Power Fortress/Ferrups +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bestfcom driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +Best Power Fortress/Ferrups implementing the Fortress UPS Protocol (f\-command set)\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHORS" +.sp +Kent Polk (bestfcom) +.sp +Andreas Wrede, John Stone (bestuferrups) +.sp +Grant Taylor (bestfort) +.sp +Russell Kroll (bestups) +.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/ diff --git a/man/bestfcom.8 b/docs/man/bestfcom.txt similarity index 57% rename from man/bestfcom.8 rename to docs/man/bestfcom.txt index 985558d..d742e8a 100644 --- a/man/bestfcom.8 +++ b/docs/man/bestfcom.txt @@ -1,21 +1,30 @@ -.TH bestfcom 8 "Thu Jul 8 2004" "" "Network UPS Tools (NUT)" -.SH NAME -bestfcom \- Driver for Best Power Fortress/Ferrups -.SH NOTE +BESTFCOM(8) +=========== + +NAME +---- + +bestfcom - Driver for Best Power Fortress/Ferrups + +NOTE +---- This man page only documents the hardware-specific features of the bestfcom driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH SUPPORTED HARDWARE +SUPPORTED HARDWARE +------------------ Best Power Fortress/Ferrups implementing the Fortress UPS Protocol (f-command set). -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver does not support any extra settings in the -\fBups.conf\fR(5). +linkman:ups.conf[5]. -.SH AUTHORS +AUTHORS +------- Kent Polk (bestfcom) Andreas Wrede, John Stone (bestuferrups) @@ -24,10 +33,13 @@ Grant Taylor (bestfort) Russell Kroll (bestups) -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bestfortress.8 b/docs/man/bestfortress.8 new file mode 100644 index 0000000..031c8fe --- /dev/null +++ b/docs/man/bestfortress.8 @@ -0,0 +1,65 @@ +'\" t +.\" Title: bestfortress +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BESTFORTRESS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bestfortress \- Driver for old Best Fortress UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bestfortress driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports old Best Fortress UPS equipment using a serial connection\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBbaudrate\fR=\fInum\fR +.RS 4 +Set the speed of the serial connection \- 1200, 2400, 4800 or 9600\&. +.RE +.PP +\fBmax_load\fR=\fIVA\fR +.RS 4 +Set the full\-scale value of the +\fBups\&.load\fR +variable\&. +.RE +.SH "AUTHOR" +.sp +Holger Dietze , Stuart D\&. Gathman +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "The newer Best Power drivers:" +.sp +\fBbestups\fR(8), \fBbestuferrups\fR(8), \fBbestfcom\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/bestfortress.txt b/docs/man/bestfortress.txt new file mode 100644 index 0000000..8bc969a --- /dev/null +++ b/docs/man/bestfortress.txt @@ -0,0 +1,49 @@ +BESTFORTRESS(8) +=============== + +NAME +---- + +bestfortress - Driver for old Best Fortress UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +bestfortress driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports old Best Fortress UPS equipment using a serial connection. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*baudrate*='num':: +Set the speed of the serial connection - 1200, 2400, 4800 or 9600. + +*max_load*='VA':: +Set the full-scale value of the *ups.load* variable. + +AUTHOR +------ +Holger Dietze , +Stuart D. Gathman + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +The newer Best Power drivers: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:bestups[8], linkman:bestuferrups[8], linkman:bestfcom[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bestuferrups.8 b/docs/man/bestuferrups.8 new file mode 100644 index 0000000..e45ab0a --- /dev/null +++ b/docs/man/bestuferrups.8 @@ -0,0 +1,54 @@ +'\" t +.\" Title: bestuferrups +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BESTUFERRUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bestuferrups \- Driver for Best Power Micro\-Ferrups +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bestuferrups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +Best Power Micro\-Ferrups ME3100, probably other similar models too\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHORS" +.sp +Andreas Wrede, John Stone (bestuferrups) +.sp +Grant Taylor (bestfort) +.sp +Russell Kroll (bestups) +.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/ diff --git a/docs/man/bestuferrups.txt b/docs/man/bestuferrups.txt new file mode 100644 index 0000000..49f4645 --- /dev/null +++ b/docs/man/bestuferrups.txt @@ -0,0 +1,42 @@ +BESTUFERRUPS(8) +=============== + +NAME +---- + +bestuferrups - Driver for Best Power Micro-Ferrups + +NOTE +---- +This man page only documents the hardware-specific features of the +bestuferrups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +Best Power Micro-Ferrups ME3100, probably other similar models too. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +AUTHORS +------- +Andreas Wrede, John Stone (bestuferrups) + +Grant Taylor (bestfort) + +Russell Kroll (bestups) + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bestups.8 b/docs/man/bestups.8 new file mode 100644 index 0000000..aed0cee --- /dev/null +++ b/docs/man/bestups.8 @@ -0,0 +1,105 @@ +'\" t +.\" Title: bestups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BESTUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +bestups \- Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the bestups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +\fBbestups\fR was designed to monitor Best Power UPS hardware like the Fortress, Fortress Telecom, Axxium Rackmount and Patriot Pro\&. It also recognizes and supports SOLA units such as the 325, 520 and 620\&. In addition, the Best 610 is supported using the \(oqID\(cq option\&. +.sp +Other UPS hardware using the Phoenixtec protocol should also work, but they will generate a warning since their battery information is not known\&. +.sp +This driver does not support some older Best/SOLA units\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBnombattvolt=\fR\fInum\fR +.RS 4 +Override the battery float voltage which is normally determined by asking the hardware\&. This is useful if your UPS constantly reports +battery\&.charge +values just below 100% even when it\(cqs completely charged\&. +.sp +If you have this problem, set this to whatever +battery\&.voltage +reports when the UPS is known to be completely charged with a good battery\&. +.sp +The author\(cqs Best Fortress 750 uses +nombattvolt=27\&.4\&. +.RE +.PP +\fBbattvoltmult=\fR\fInum\fR +.RS 4 +Multiply the reported battery voltage by this number\&. Some devices report only a fraction of the total battery voltage\&. +.sp +For example, the SOLA 610 700VA UPS (with a 24V battery) reports the single cell voltage (about 2\&.27V when fully charged)\&. In this particular case you can set +battvoltmult = 12 +in +\fBups.conf\fR(8) +to fix this\&. +.RE +.PP +\fBID=\fR\fIstring\fR +.RS 4 +Set the Identification response string\&. This should only be used with hardware that supports the Phoenixtec protocol status inquiry commands, but not the "ID" command, such as the Best/SOLA 610\&. Format of the ID string is: AAA,BBBB,CCC,DDD,EE\&.E,FF\&.F +.sp +AAA is the three\-character identification for the UPS model\&. +.sp +BBBB is the output power in VA (volt amperes)\&. B is an integer number ranging from 0 to 9\&. +.sp +CCC is the Nominal Input Voltage\&. C is an integer number ranging from 0 to 9\&. The unit is Volts AC\&. +.sp +DDD is the Nominal Output Voltage\&. D is an integer number ranging from 0 to 9\&. The unit is Volts AC\&. +.sp +EE\&.E is the Battery Voltage that will cause the UPS to shut itself off\&. E is an integer number ranging from 0 to 9\&. Then unit is Volts DC and a decimal point is present\&. +.sp +FF\&.F or FFF\&.F is the Battery Voltage at full charge\&. F is an integer number ranging from 0 to 9\&. Then unit is Volts DC\&. Typically, for 700VA, 1KVA and 1\&.5KVA units, the format is FF\&.F\&. For 2KVA and 3KVA units, the format is FFF\&.F\&. +.sp +Example: a Best 610 1\&.5KVA unit would use the string "610,1500,120,120,10\&.0,48\&.0"\&. +.RE +.SH "BUGS" +.sp +The battery charge percentage value (in battery\&.charge) is derived from the voltage data that the UPS returns, since the UPS doesn\(cqt return that value directly\&. On some hardware, the charge will remain at 100% for a long time and then drops quickly shortly before the battery runs out\&. You can confirm from the battery\&.voltage readings that this is a problem with the UPS and not this driver\&. +.sp +Similarly, the float from the charger in some models forces the battery charge percentage back up to 100% immedately after the UPS goes back on\-line, so you can\(cqt tell when it is really recharged\&. +.sp +Finally, some models give one value for the battery\(cqs nominal voltage and yet actually have a nominal voltage slightly below that\&. This leads to things such as the perpetual 98\&.7% charge on the author\(cqs Fortress 750, even when it\(cqs been charging for weeks\&. You can use nombattvolt= in \fBups.conf\fR(8) to fix this\&. +.SH "AUTHOR" +.sp +Russell Kroll, Jason White +.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/ diff --git a/man/bestups.8 b/docs/man/bestups.txt similarity index 70% rename from man/bestups.8 rename to docs/man/bestups.txt index c385b18..61704f6 100644 --- a/man/bestups.8 +++ b/docs/man/bestups.txt @@ -1,13 +1,21 @@ -.TH BESTUPS 8 "Wed Jul 28 2004" "" "Network UPS Tools (NUT)" -.SH NAME -bestups \- Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -bestups driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +BESTUPS(8) +========== -.SH SUPPORTED HARDWARE -bestups was designed to monitor Best Power UPS hardware like the Fortress, +NAME +---- + +bestups - Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +bestups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +*bestups* was designed to monitor Best Power UPS hardware like the Fortress, Fortress Telecom, Axxium Rackmount and Patriot Pro. It also recognizes and supports SOLA units such as the 325, 520 and 620. In addition, the Best 610 is supported using the `ID' option. @@ -17,87 +25,93 @@ they will generate a warning since their battery information is not known. This driver does not support some older Best/SOLA units. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following optional settings in the -\fBups.conf\fR(5): +linkman:ups.conf[5]: -.IP "nombattvolt=\fInum\fR" +*nombattvolt=*'num':: Override the battery float voltage which is normally determined by asking the hardware. This is useful if your UPS constantly reports -battery.charge values just below 100% even when it's completely charged. - -If you have this problem, set this to whatever battery.voltage reports +`battery.charge` values just below 100% even when it's completely charged. ++ +If you have this problem, set this to whatever `battery.voltage` reports when the UPS is known to be completely charged with a good battery. ++ +The author's Best Fortress 750 uses `nombattvolt=27.4`. -The author's Best Fortress 750 uses nombattvolt=27.4. - -.IP "battvoltmult=\fInum\fR" +*battvoltmult=*'num':: Multiply the reported battery voltage by this number. Some devices report only a fraction of the total battery voltage. - ++ For example, the SOLA 610 700VA UPS (with a 24V battery) reports the single cell voltage (about 2.27V when fully charged). In this particular -case you can set 'battvoltmult = 12' in \fBups.conf\fR(8) to fix this. +case you can set `battvoltmult = 12` in linkman:ups.conf[8] to fix this. -.IP "ID=\fIstring\fR" +*ID=*'string':: Set the Identification response string. This should only be used with hardware that supports the Phoenixtec protocol status inquiry commands, but not the "ID" command, such as the Best/SOLA 610. Format of the ID string is: AAA,BBBB,CCC,DDD,EE.E,FF.F - ++ AAA is the three-character identification for the UPS model. - ++ BBBB is the output power in VA (volt amperes). B is an integer number ranging from 0 to 9. - ++ CCC is the Nominal Input Voltage. C is an integer number ranging from 0 to 9. The unit is Volts AC. - ++ DDD is the Nominal Output Voltage. D is an integer number ranging from 0 to 9. The unit is Volts AC. - ++ EE.E is the Battery Voltage that will cause the UPS to shut itself off. E is an integer number ranging from 0 to 9. Then unit is Volts DC and a decimal point is present. - ++ FF.F or FFF.F is the Battery Voltage at full charge. F is an integer number ranging from 0 to 9. Then unit is Volts DC. Typically, for 700VA, 1KVA and 1.5KVA units, the format is FF.F. For 2KVA and 3KVA units, the format is FFF.F. - ++ Example: a Best 610 1.5KVA unit would use the string "610,1500,120,120,10.0,48.0". -.SH BUGS +BUGS +---- -The battery charge percentage value (in battery.charge) is derived from +The battery charge percentage value (in `battery.charge`) is derived from the voltage data that the UPS returns, since the UPS doesn't return that value directly. On some hardware, the charge will remain at 100% for a long time and then drops quickly shortly before the battery runs out. -You can confirm from the battery.voltage readings that this is a problem +You can confirm from the `battery.voltage` readings that this is a problem with the UPS and not this driver. Similarly, the float from the charger in some models forces the battery charge percentage back up to 100% immedately after the UPS goes back -on\(hyline, so you can't tell when it is really recharged. +on-line, so you can't tell when it is really recharged. Finally, some models give one value for the battery's nominal voltage and yet actually have a nominal voltage slightly below that. This leads to things such as the perpetual 98.7% charge on the author's Fortress 750, -even when it's been charging for weeks. You can use nombattvolt= in -\fBups.conf\fR(8) to fix this. +even when it's been charging for weeks. You can use `nombattvolt=` in +linkman:ups.conf[8] to fix this. -.SH AUTHOR +AUTHOR +------ Russell Kroll, Jason White -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/blazer.8 b/docs/man/blazer.8 new file mode 100644 index 0000000..781eea8 --- /dev/null +++ b/docs/man/blazer.8 @@ -0,0 +1,313 @@ +'\" t +.\" Title: blazer +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "BLAZER" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +blazer \- Driver for Megatec/Q1 protocol serial (blazer_ser) and USB (blazer_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)\&. +.SH "SUPPORTED HARDWARE" +.sp +The blazer driver is known to work with various UPSes from Blazer, Energy Sistem, Fenton Technologies, 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\&. +.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\&. +.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 +\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 = 270,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 +.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" +.PP +\fBvendorid =\fR \fIregex\fR, \fBproductid =\fR \fIregex\fR, \fBvendor =\fR \fIregex\fR, \fBproduct =\fR \fIregex\fR, \fBserial =\fR \fIregex\fR +.RS 4 +Select a specific UPS, in case there is more than one connected via USB\&. Each option specifies an extended regular expression (see +\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 +.\} +.nf +\-x vendor="Foo\&.Corporation\&.*" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-x vendorid=051d # (APC) +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-x product="\&.*(Smart|Back)\-?UPS\&.*" +.fi +.if n \{\ +.RE +.\} +.PP +\fBbus =\fR \fIregex\fR +.RS 4 +Select a UPS on a specific USB bus or group of busses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. bus="002", bus="00[2\-3]")\&. +.RE +.PP +\fBsubdriver =\fR \fIstring\fR +.RS 4 +Select a serial\-over\-USB subdriver to use\&. You have a choice between +\fBphoenix\fR, +\fBippon\fR, +\fBcypress\fR, and +\fBkrauler\fR\&. When using this option, it is mandatory to also specify the +\fBvendorid\fR +and +\fBproductid\fR\&. +.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 [\fIvalue\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 [\fIvalue\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 +seconds (truncated to units of 60 seconds)\&. +.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 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 , Alexander Gordeev +.SH "SEE ALSO" +.sp +\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/ diff --git a/man/blazer.8 b/docs/man/blazer.txt similarity index 55% rename from man/blazer.8 rename to docs/man/blazer.txt index 186b7c3..4fcb055 100644 --- a/man/blazer.8 +++ b/docs/man/blazer.txt @@ -1,223 +1,226 @@ -.TH BLAZER 8 "Mon Feb 16 2009" "" "Network UPS Tools (NUT)" -.SH NAME -blazer_ser, blazer_usb \- Driver for Megatec/Q1 protocol serial/USB based UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -blazer driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +BLAZER(8) +========= -.SH SUPPORTED HARDWARE +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 +------------------ The blazer driver is known to work with various UPSes from Blazer, Energy Sistem, Fenton Technologies, 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't been tested. -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. +All devices with a serial interface (use the *blazer_ser* driver) and +many with a USB interface (use the *blazer_usb* driver) are supported. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- 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)): +will need changing (see linkman:ups.conf[5]): -.IP "default.battery.voltage.high = \fIvalue\fR" +*default.battery.voltage.high =* 'value':: 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 \fBBATTERY CHARGE\fR). +If you want the driver to report a guesstimated *battery.charge*, you need +to specify this (see <<_battery_charge,BATTERY CHARGE>>). -.IP "default.battery.voltage.low = \fIvalue\fR" +*default.battery.voltage.low =* 'value':: 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 \fBBATTERY CHARGE\fR). +If you want the driver to report a guesstimated *battery.charge*, you need +to specify this (see <<_battery_charge,BATTERY CHARGE>>). -.IP "default.battery.voltage.nominal = \fIvalue\fR" -.IP "override.battery.voltage.nominal = \fIvalue\fR" +*default.battery.voltage.nominal =* 'value':: +*override.battery.voltage.nominal =* 'value':: Some devices show a wrong nominal battery voltage (or none at all), so you may need to override or set a default value. -.IP "override.battery.packs = \fIvalue\fR" +*override.battery.packs =* 'value':: 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 +*battery.voltage.nominal* is 24 V, but it reports a *battery.voltage* +of around 2 V, the number of *battery.packs* 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. -.IP "ondelay = \fIvalue\fR" +*ondelay =* '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. -.IP "offdelay = \fIvalue\fR" +*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. -.IP "norating" +*norating*:: Some UPSes will lock up if you attempt to read rating information from them. Setting this flag will make the driver skip this step. -.IP "novendor" +*novendor*:: Some UPSes will lock up if you attempt to read vendor information from them. Setting this flag will make the driver skip this step. -.IP "runtimecal = \fIvalue,value,value,value\fR" +*runtimecal =* 'value,value,value,value':: 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 - - \fBruntimecal = 270,100,720,50\fR - ++ + runtimecal = 270,100,720,50 ++ 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't get too close to no load (prediction of runtime depends more on idle load for the battery then). -.IP "chargetime = \fIvalue\fR" +*chargetime =* 'value':: 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. +*runtimecal* is also specified. -.IP "idleload= \fIvalue\fR" +*idleload =* 'value':: 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, the driver defaults to 10%. Only used if *runtimecal* is also specified. -.SH SERIAL INTERFACE ONLY +SERIAL INTERFACE ONLY +--------------------- -.IP "cablepower = \fIstring\fR" +*cablepower =* 'string':: -By default the driver will set DTR and clear RTS (\fInormal\fR). If you find that +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 (\fIreverse\fR), set DTR and RTS (\fIboth\fR) or -clear DTR and RTS (\fInone\fR) improves this situation. +try if clear DTR and set RTS ('reverse'), set DTR and RTS ('both') or +clear DTR and RTS ('none') improves this situation. -.SH USB INTERFACE ONLY +USB INTERFACE ONLY +------------------ -.IP "vendorid = \fIregex\fR" -.IP "productid = \fIregex\fR" -.IP "vendor = \fIregex\fR" -.IP "product = \fIregex\fR" -.IP "serial = \fIregex\fR" +*vendorid =* 'regex':: +*productid =* 'regex':: +*vendor =* 'regex':: +*product =* 'regex':: +*serial =* 'regex':: Select a specific UPS, in case there is more than one connected via USB. Each option specifies an extended regular expression (see -\fBregex(7)\fR) that must match the UPS's entire vendor/product/serial +*regex(7)*) that must match the UPS's 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 +hexadecimal code for vendorid and productid. Try *-DD* for finding out the strings to match. Examples: - \fB-x vendor="Foo.Corporation.*"\fR + -x vendor="Foo.Corporation.*" - \fB-x vendorid=051d\fR (APC) + -x vendorid=051d # (APC) - \fB-x product=".*(Smart|Back)-?UPS.*"\fR + -x product=".*(Smart|Back)-?UPS.*" -.IP "bus = \fIregex\fR" +*bus =* 'regex':: Select a UPS on a specific USB bus or group of busses. The argument is a regular expression that must match the bus name where the UPS is connected (e.g. bus="002", bus="00[2-3]"). -.IP "subdriver = \fIstring\fR" +*subdriver =* 'string':: -Select a serial-over-USB subdriver to use. You have a choice between \fIphoenix\fR -\fIippon\fR, \fIcypress\fR and \fIkrauler\fR. When using this option, it is mandatory to also -specify the vendorid and productid. Note that since nut-2.4.2 the \fIippon\fR subdriver is used -where previously the \fIphoenix\fR was selected. If this doesn't work for you, add the -following to the \fBups.conf\fR(5) entry for your UPS: -.nf - vendorid = 06da - productid = 0003 - subdriver = phoenix -.fi +Select a serial-over-USB subdriver to use. You have a choice between *phoenix*, +*ippon*, *cypress*, and *krauler*. When using this option, it is mandatory to also +specify the *vendorid* and *productid*. -.SH UPS COMMANDS +UPS COMMANDS +------------ -This driver supports some instant commands (see \fBupscmd\fR(8)): +This driver supports some instant commands (see linkman:upscmd[8]): -.IP "beeper.toggle" +*beeper.toggle*:: Toggle the UPS beeper. (Not available on some hardware.) -.IP "load.on" +*load.on*:: Turn on the load immediately. -.IP "load.off" +*load.off*:: -Turn off the load immediately (see \fBKNOWN PROBLEMS\fR). +Turn off the load immediately (see <<_known_problems,KNOWN PROBLEMS>>). -.IP "shutdown.return [\fIvalue\fR]" +*shutdown.return* ['value']:: Turn off the load and return when power is back. Uses the timers defined by -\fBondelay\fR and \fBoffdelay\fR. +*ondelay* and *offdelay*. -.IP "shutdown.stayoff [\fIvalue\fR]" +*shutdown.stayoff* ['value']:: -Turn off the load and remain off (see \fBKNOWN PROBLEMS\fR). Uses the timer -defined by \fBoffdelay\fR. +Turn off the load and remain off (see <<_known_problems,KNOWN PROBLEMS>>). Uses +the timer defined by *offdelay*. -.IP "shutdown.stop" +*shutdown.stop*:: Stop a shutdown in progress. -.IP "test.battery.start.deep" +*test.battery.start.deep*:: Perform a long battery test (Not available on some hardware.) -.IP "test.battery.start.quick" +*test.battery.start.quick*:: Perform a (10 second) battery test. -.IP "test.battery.start \fIvalue\fR" +*test.battery.start* 'value':: -Perform a battery test for the duration of \fInum\fR seconds (truncated to units of +Perform a battery test for the duration of 'value' seconds (truncated to units of 60 seconds). -.IP "test.battery.stop" +*test.battery.stop*:: Stop a running battery test (not available on some hardware.) -.SH BATTERY CHARGE +BATTERY CHARGE +-------------- -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 \fBEXTRA -PARAMETERS\fR listed above. +Due to popular demand, this driver will report a guesstimated *battery.charge* +and optionally *battery.runtime*, provided you specified a couple of the +<<_extra_arguments,EXTRA ARGUMENTS>> listed above. -If you specify both \fBbattery.voltage.high\fR and \fBbattery.voltage.low\fR in -\fBups.conf\fR(5), but don't enter \fBruntimecal\fR, it will guesstimate the state +If you specify both *battery.voltage.high* and *battery.voltage.low* in +linkman:ups.conf[5], but don't enter *runtimecal*, 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't practical if the power went out and the UPS is providing power for your systems. -.nf battery.voltage - battery.voltage.low battery.charge = ------------------------------------------ x 100 % battery.voltage.high - battery.voltage.low -.fi There is a way to get better readings without disconnecting the load but this requires 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 +the battery. If you specified the *runtimecal*, 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 @@ -225,18 +228,40 @@ obviously doesn't work. The driver also has no way of determining the degradation of the battery capacity over time, so you'll have to deal with this yourself (by adjusting the values -in \fBruntimecal\fR. Also note that the driver guesses the initial state of charge +in *runtimecal*). 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. 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't complain with the author. If you need something better, -buy a UPS that reports \fBbattery.charge\fR and \fBbattery.runtime\fR all by itself +linkman:ups.conf[5], so don't complain with the author. If you need something better, +buy a UPS that reports *battery.charge* and *battery.runtime* all by itself without the help of a NUT driver. -.SH KNOWN PROBLEMS +NOTES FOR THE PREVIOUS USER OF MEGATEC DRIVERS +---------------------------------------------- + +The blazer drivers having replaced the megatec ones, some configuration +changes may be required by users switching to blazer. + +Part of this, the following megatec options, in ups.conf, have to be changed: + +*battvolts*:: + +You need to use 'default.battery.voltage.high' and 'default.battery.voltage.low' + +*dtr and rts*:: + +You need to use 'cablepower' + +*ignoreoff*:: + +This parameter can simply be discarded, since it was a wrong understanding +of the specification. + +KNOWN PROBLEMS +-------------- Some UPS commands aren't supported by all models. In most cases, the driver will send a message to the system log when the user tries to execute an @@ -244,24 +269,27 @@ unsupported command. Unfortunately, some models don't even provide a way for the driver to check for this, so the unsupported commands will silently fail. -Both the \fBload.off\fR and \fBshutdown.stayoff\fR instant commands are meant to +Both the *load.off* and *shutdown.stayoff* instant commands are meant to turn the load off indefinitely. However, some UPS models don't allow this. -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 +Some models report a bogus value for the beeper status (will always be 'enabled' +or 'disabled'). So, the *beeper.toggle* command may appear to have no effect 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. -.SH AUTHORS +AUTHORS +------- -Arjen de Korte +Arjen de Korte , Alexander Gordeev -.SH SEE ALSO +SEE ALSO +-------- -\fBnutupsdrv\fR(8), \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8) +linkman:nutupsdrv[8], linkman:upsc[8], linkman:upscmd[8], linkman:upsrw[8] -.SS Internet resources: +Internet Resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/clone.8 b/docs/man/clone.8 new file mode 100644 index 0000000..94b04be --- /dev/null +++ b/docs/man/clone.8 @@ -0,0 +1,135 @@ +'\" t +.\" Title: clone +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "CLONE" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +clone \- UPS driver clone +.SH "NOTE" +.sp +This man page only documents the specific features of the clone driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "DESCRIPTION" +.sp +This driver, which sits on top of another driver socket, allows users to group clients to a particular outlet of a device and deal with this output as if it was a normal UPS\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following settings: +.PP +\fBload\&.off\fR=\fIcommand\fR +.RS 4 +Recommended\&. Set the command on the "real" UPS driver that will be used to switch off the outlet\&. You need both +\fBload\&.off\fR +and +\fBload\&.on\fR +in order to power cycle the outlet\&. Otherwise, shutting down the clients powered by an outlet is a one way street (see +IMPORTANT)\&. +.RE +.PP +\fBload\&.on\fR=\fIcommand\fR +.RS 4 +Recommended\&. Set the command on the "real" UPS driver that will be used to switch on the outlet\&. You need both +\fBload\&.off\fR +and +\fBload\&.on\fR +in order to power cycle the outlet\&. Otherwise, shutting down the clients powered by an outlet is a one way street (see +IMPORTANT)\&. +.RE +.PP +\fBload\&.status\fR=\fIvalue\fR +.RS 4 +Recommended\&. Set the variable on the "real" UPS driver that will be used to indicate the outlet status (i\&.e\&. on/off)\&. If not specified, the clone driver will attempt to keep track of the outlet status, but this is less reliable\&. +.RE +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Set the timer (in seconds) before the outlet is turned off after the shutdown condition (OB LB) for this outlet is met or a command to shutdown was issued\&. Defaults to 120 seconds\&. +.RE +.PP +\fBondelay\fR=\fInum\fR +.RS 4 +Set the timer (in seconds) for the outlet to switch on in case the power returns after the oulet has been switched off\&. Defaults to 30 seconds\&. +.RE +.PP +\fBmincharge\fR=\fIvalue\fR +.RS 4 +Set the remaining battery level when the clone UPS switches to LB (percent)\&. +.RE +.PP +\fBminruntime\fR=\fIvalue\fR +.RS 4 +Set the remaining battery runtime when the clone UPS switches to LB (seconds)\&. +.RE +.SH "IMPLEMENTATION" +.sp +The port specification in the \fBups.conf\fR(5) reference the driver socket that the "real" UPS driver is using\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[realups] + driver = usbhid\-ups + port = auto +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[clone\-outlet\-1] + driver = clone + port = usbhid\-ups\-realups + load\&.on = outlet\&.1\&.load\&.on + load\&.off = outlet\&.1\&.load\&.off + load\&.status = outlet\&.1\&.status + [\&.\&.\&.] +.fi +.if n \{\ +.RE +.\} +.SH "IMPORTANT" +.sp +Unlike a real UPS, you should \fBnot\fR configure a upsmon master for this driver\&. When a upsmon master sees the OB LB flags and tells the upsd server it is OK to initiate the shutdown sequence, the server will latch the FSD status and it will not be possible to restart the systems connected without restarting the upsd server\&. +.sp +This will be a problem if the power returns after the clone UPS initiated the shutdown sequence on it\(cqs outlet, but returns before the real UPS begins shutting down\&. The solution is in the clone driver, that will insert the FSD flag if needed without the help of a upsmon master\&. +.SH "CAVEATS" +.sp +The clone UPS will follow the status on the real UPS driver\&. You can only make the clone UPS shutdown earlier than the real UPS driver, not later\&. If the real UPS driver initiates a shutdown, the clone UPS driver will immediately follow\&. +.sp +Be aware that the commands to shutdown/restart an outlet on the real UPS drivers are not affected, so if you tell the real UPS driver to shutdown the outlet of the clone UPS driver, your clients will lose power without warning\&. +.SH "AUTHOR" +.sp +Arjen de Korte +.SH "SEE ALSO" +.sp +\fBupscmd\fR(1), \fBupsrw\fR(1), \fBups.conf\fR(5), \fBnutupsdrv\fR(8) +.SS "Internet Resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/clone.8 b/docs/man/clone.txt similarity index 56% rename from man/clone.8 rename to docs/man/clone.txt index 2701878..6a844ac 100644 --- a/man/clone.8 +++ b/docs/man/clone.txt @@ -1,77 +1,81 @@ -.TH CLONE 8 "Mon Jul 20 2009" "" "Network UPS Tools (NUT)" -.SH NAME -clone \- UPS driver clone +CLONE(8) +======== -.SH NOTE +NAME +---- +clone - UPS driver clone + +NOTE +---- This man page only documents the specific features of the clone driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH DESCRIPTION -This driver, which sits on top of another driver socket, allows to group -clients to a particular outlet of a device and deal with this output as -if it was a normal UPS. +DESCRIPTION +----------- +This driver, which sits on top of another driver socket, allows users to group +clients to a particular outlet of a device and deal with this output as if it +was a normal UPS. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following settings: -.IP "load.off=\fIcommand\fR" -Recommended. Set the command on the 'real' UPS driver that will be used to -switch off the outlet. You need both \fIload.off\fR and \fIload.on\fR in +*load.off*='command':: +Recommended. Set the command on the "real" UPS driver that will be used to +switch off the outlet. You need both *load.off* and *load.on* in order to power cycle the outlet. Otherwise, shutting down the clients -powered by an outlet is a one way street (see \fBIMPORTANT\fR). +powered by an outlet is a one way street (see <<_important,IMPORTANT>>). -.IP "load.on=\fIcommand\fR" -Recommended. Set the command on the 'real' UPS driver that will be used to -switch on the outlet. You need both \fIload.off\fR and \fIload.on\fR in +*load.on*='command':: +Recommended. Set the command on the "real" UPS driver that will be used to +switch on the outlet. You need both *load.off* and *load.on* in order to power cycle the outlet. Otherwise, shutting down the clients -powered by an outlet is a one way street (see \fBIMPORTANT\fR). +powered by an outlet is a one way street (see <<_important,IMPORTANT>>). -.IP "load.status=\fIvalue\fR" -Recommended. Set the variable on the 'real' UPS driver that will be used -to indicate the outlet status (ie on/off). If not specified, the clone +*load.status*='value':: +Recommended. Set the variable on the "real" UPS driver that will be used +to indicate the outlet status (i.e. on/off). If not specified, the clone driver will attempt to keep track of the outlet status, but this is less reliable. -.IP "offdelay=\fInum\fR" +*offdelay*='num':: Set the timer (in seconds) before the outlet is turned off after the -shutdown condition (OB LB) for this outlet is met or a command to shutdown +shutdown condition (+OB LB+) for this outlet is met or a command to shutdown was issued. Defaults to 120 seconds. -.IP "ondelay=\fInum\fR" +*ondelay*='num':: Set the timer (in seconds) for the outlet to switch on in case the power returns after the oulet has been switched off. Defaults to 30 seconds. -.IP "mincharge=\fIvalue\fR" +*mincharge*='value':: Set the remaining battery level when the clone UPS switches to LB (percent). -.IP "minruntime=\fIvalue\fR" +*minruntime*='value':: Set the remaining battery runtime when the clone UPS switches to LB (seconds). -.SH IMPLEMENTATION -The port specification in the \fBups.conf\fR(5) reference the driver -socket that the 'real' UPS driver is using. For example: +IMPLEMENTATION +-------------- +The port specification in the linkman:ups.conf[5] reference the driver +socket that the "real" UPS driver is using. For example: -.nf -[realups] - driver = usbhid-ups - port = auto -.fi + [realups] + driver = usbhid-ups + port = auto -.nf -[clone-outlet-1] - driver = clone - port = usbhid-ups-realups - load.on = outlet.1.load.on - load.off = outlet.1.load.off - load.status = outlet.1.status - [...] -.fi + [clone-outlet-1] + driver = clone + port = usbhid-ups-realups + load.on = outlet.1.load.on + load.off = outlet.1.load.off + load.status = outlet.1.status + [...] -.SH IMPORTANT -Unlike a real UPS, you should \fBnot\fR configure a upsmon master for this +IMPORTANT +--------- +Unlike a real UPS, you should *not* configure a upsmon master for this driver. When a upsmon master sees the OB LB flags and tells the upsd server it is OK to initiate the shutdown sequence, the server will latch the FSD status and it will not be possible to restart the systems connected without @@ -82,7 +86,8 @@ the shutdown sequence on it's outlet, but returns before the real UPS begins shutting down. The solution is in the clone driver, that will insert the FSD flag if needed without the help of a upsmon master. -.SH CAVEATS +CAVEATS +------- The clone UPS will follow the status on the real UPS driver. You can only make the clone UPS shutdown earlier than the real UPS driver, not later. If the real UPS driver initiates a shutdown, the clone UPS driver will @@ -93,15 +98,18 @@ drivers are not affected, so if you tell the real UPS driver to shutdown the outlet of the clone UPS driver, your clients will lose power without warning. -.SH AUTHOR +AUTHOR +------ Arjen de Korte -.SH SEE ALSO +SEE ALSO +-------- -\fBupscmd\fR(1), -\fBupsrw\fR(1), -\fBups.conf\fR(5), -\fBnutupsdrv\fR(8) +linkman:upscmd[1], +linkman:upsrw[1], +linkman:ups.conf[5], +linkman:nutupsdrv[8] -.SS Internet resources: +Internet Resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/dummy-ups.8 b/docs/man/dummy-ups.8 new file mode 100644 index 0000000..f50bf03 --- /dev/null +++ b/docs/man/dummy-ups.8 @@ -0,0 +1,145 @@ +'\" t +.\" Title: dummy-ups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "DUMMY\-UPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +dummy-ups \- Driver for multi\-purpose UPS emulation +.SH "NOTE" +.sp +This man page only documents the specific features of the dummy\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "DESCRIPTION" +.sp +This program is a multi\-purpose UPS emulation tool\&. Its behavior depends on the running mode: +.SS "Dummy Mode" +.sp +\fBdummy\-ups\fR looks like a standard device driver to \fBupsd\fR(8) and allows to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other real driver\&. This mode is mostly useful for development and testing purposes\&. +.SS "Repeater Mode" +.sp +\fBdummy\-ups\fR acts as a NUT client, simply forwarding data\&. This can be useful for supervision purposes\&. This can also allow some load sharing between several UPS instances, using a point\-to\-point communication with the UPS\&. +.SH "IMPLEMENTATION" +.sp +The port specification depends on the running mode, and allows the driver to select the right mode\&. +.SS "Dummy Mode" +.sp +Port is a definition file name for \fBdummy\-ups\fR\&. This can either be an absolute or a relative path name\&. In the latter case the NUT sysconfig directory (ie /etc/nut, /usr/local/ups/etc, \&...) is prepended\&. +.sp +For instance: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[dummy] + driver = dummy\-ups + port = evolution500\&.dev + desc = "dummy\-ups in dummy mode" +.fi +.if n \{\ +.RE +.\} +.sp +This file is generally named "something\&.dev"\&. It contains a list of all valid data and associated values, and has the same format as an \fBupsc\fR(8) dump (: )\&. So you can easilly create definition files from an existing UPS using "upsc > file\&.dev"\&. It can also be empty, in which case only a basic set of data is available: device\&.\fB, driver\&.\fR, ups\&.mfr, ups\&.model, ups\&.status +.sp +Samples definition files are available in the "data" directory of the nut source tree, and generally in the sysconfig directory of your system distribution\&. +.sp +Since \fBdummy\-ups\fR will loop on reading this file, you can dynamically modify it to interact with the driver\&. This will avoid message spam into your system log files, if you are using NUT default configuration\&. +.sp +You can also use the "TIMER " instruction to create scheduled events sequences\&. For example, the following sequence will loop on switching ups\&.status between "OL", "OB" and "OB LB" every minute: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ups\&.status: OL +TIMER 60 +ups\&.status: OB +TIMER 60 +ups\&.status: LB +TIMER 60 +.fi +.if n \{\ +.RE +.\} +.sp +It is wise to end the script with a TIMER\&. Otherwise dummy\-ups will directly go back to the beginning of the file\&. +.SS "Repeater Mode" +.sp +Port is the name of a remote UPS, using the NUT form, ie: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[@[:]] +.fi +.if n \{\ +.RE +.\} +.sp +For instance: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[repeater] + driver = dummy\-ups + port = ups@hostname + desc = "dummy\-ups in repeater mode" +.fi +.if n \{\ +.RE +.\} +.SH "INTERACTION" +.sp +Once the driver is loaded in dummy mode, you can change any variables, except those of the driver\&.* and server\&.* collections\&. You can do this by either editing the definition file, or use the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands\&. +.sp +Note that in simulation mode, new variables can be added on the fly, by adding these to the definition file\&. Conversely, if you need to remove variable (such as transient ones, like ups\&.alarm), simply update these by setting an empty value\&. As a result, they will get removed from the data\&. +.sp +In repeater mode, the driver acts according to the capabilities of the UPS, and so support the same instant commands and settable values\&. +.SH "BACKGROUND" +.sp +This driver was written in one evening to replace the previous dummycons testing driver\&. It was too limited and required to work from a terminal to interact\&. +.sp +\fBdummy\-ups\fR is useful for NUT client development, and other testing purpose\&. +.sp +It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework\&. +.sp +It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows to build a virtual device, composed of several other devices (either UPS, PDUs)\&. +.SH "BUGS" +.sp +Instant commands are not yet supported in Dummy Mode, and data need name/value checking enforcement, as well as boundaries or enumeration definition\&. +.SH "AUTHOR" +.sp +Arnaud Quette +.SH "SEE ALSO" +.sp +\fBupscmd\fR(1), \fBupsrw\fR(1), \fBups.conf\fR(5), \fBnutupsdrv\fR(8) +.SS "Internet Resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/dummy-ups.8 b/docs/man/dummy-ups.txt similarity index 55% rename from man/dummy-ups.8 rename to docs/man/dummy-ups.txt index e59db28..ef55db5 100644 --- a/man/dummy-ups.8 +++ b/docs/man/dummy-ups.txt @@ -1,43 +1,60 @@ -.TH DUMMY-UPS 8 "Tue Oct 6 2009" "" "Network UPS Tools (NUT)" -.SH NAME -dummy-ups \- Driver for multi purpose UPS emulation +DUMMY-UPS(8) +============ -.SH NOTE +NAME +---- +dummy-ups - Driver for multi-purpose UPS emulation + +NOTE +---- This man page only documents the specific features of the dummy-ups driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH DESCRIPTION -This program is a multi purpose UPS emulation tool. +DESCRIPTION +----------- +This program is a multi-purpose UPS emulation tool. Its behavior depends on the running mode: -.IP "Dummy mode" +Dummy Mode +~~~~~~~~~~ -looks like a standard UPS driver to \fBupsd\fR(8) and +*dummy-ups* looks like a standard device driver to linkman:upsd[8] and allows to change any value for testing purposes. It is both interactive, -controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or +controllable through the linkman:upsrw[1] and linkman:upscmd[1] commands (or equivalent graphical tool), and batchable through script files. It can be configured, launched and used as any other real driver. This mode is mostly useful for development and testing purposes. -.IP "Repeater mode" +Repeater Mode +~~~~~~~~~~~~~ -acts as a NUT client, simply forwarding data. This can be useful for supervision -purposes. This can also allow some load sharing between several UPS instances, -using a point\(hyto\(hypoint communication with the UPS. +*dummy-ups* acts as a NUT client, simply forwarding data. This can be useful +for supervision purposes. This can also allow some load sharing between several +UPS instances, using a point-to-point communication with the UPS. -.SH ARGUMENTS -The port specification depends on the running mode, and allows the automatic -guessing of it. +IMPLEMENTATION +-------------- -.IP "Dummy mode" +The port specification depends on the running mode, and allows the driver to +select the right mode. -Port is a definition file name for dummy-ups. This can either +Dummy Mode +~~~~~~~~~~ + +Port is a definition file name for *dummy-ups*. This can either be an absolute or a relative path name. In the latter case the NUT sysconfig directory (ie /etc/nut, /usr/local/ups/etc, ...) is prepended. -This file is generally named something.dev. It contains a list of all -valid data and associated values, and has the same format as an upsc +For instance: + + [dummy] + driver = dummy-ups + port = evolution500.dev + desc = "dummy-ups in dummy mode" + +This file is generally named "something.dev". It contains a list of all +valid data and associated values, and has the same format as an linkman:upsc[8] dump (: ). So you can easilly create definition files from an existing UPS using "upsc > file.dev". It can also be empty, in which case only a basic set of data is available: @@ -46,67 +63,62 @@ device.*, driver.*, ups.mfr, ups.model, ups.status Samples definition files are available in the "data" directory of the nut source tree, and generally in the sysconfig directory of your system distribution. -Since dummy-ups will loop on reading this file, you can dynamically modify it to -interact with the driver. +Since *dummy-ups* will loop on reading this file, you can dynamically modify +it to interact with the driver. This will avoid message spam into your +system log files, if you are using NUT default configuration. You can also use the "TIMER " instruction to create scheduled events sequences. For example, the following sequence will loop on switching ups.status between "OL", "OB" and "OB LB" every minute: -.nf ups.status: OL TIMER 60 ups.status: OB TIMER 60 ups.status: LB TIMER 60 -.fi It is wise to end the script with a TIMER. Otherwise dummy-ups will directly go back to the beginning of the file. -.IP "Repeater mode" +Repeater Mode +~~~~~~~~~~~~~ Port is the name of a remote UPS, using the NUT form, ie: [@[:]] -.SH IMPLEMENTATION -You will need add to at least one entry in \fBups.conf\fR(5) like: +For instance: -.nf -[dummy] - driver = dummy-ups - port = evolution500.dev - desc = "dummy-ups in dummy mode" -.fi + [repeater] + driver = dummy-ups + port = ups@hostname + desc = "dummy-ups in repeater mode" -.nf -[repeater] - driver = dummy-ups - port = ups@hostname - desc = "dummy-ups in repeater mode" -.fi - -You can declare as many entries, and so run multiple instances, as you need. - -.SH INTERACTION +INTERACTION +----------- Once the driver is loaded in dummy mode, you can change any variables, except those of the driver.* and server.* collections. You can do this by either editing the definition file, or use the -\fBupsrw\fR(1) and \fBupscmd\fR(1) commands. +linkman:upsrw[1] and linkman:upscmd[1] commands. + +Note that in simulation mode, new variables can be added on the fly, by +adding these to the definition file. Conversely, if you need to remove +variable (such as transient ones, like ups.alarm), simply update these +by setting an empty value. As a result, they will get removed from the data. In repeater mode, the driver acts according to the capabilities of the UPS, and so support the same instant commands and settable values. -.SH BACKGROUND +BACKGROUND +---------- This driver was written in one evening to replace the previous dummycons testing driver. It was too limited and required to work from a terminal to interact. -dummy-ups is useful for NUT client development, and other testing purpose. +*dummy-ups* is useful for NUT client development, and other testing purpose. It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework. @@ -115,19 +127,23 @@ It now offers a repeater mode. This will help in building the Meta UPS approach, which allows to build a virtual device, composed of several other devices (either UPS, PDUs). -.SH BUGS -Instant commands are not yet supported in Dummy Mode, and data need name / -value checking enforcement, as well as boundaries or enumeration definition. +BUGS +---- +Instant commands are not yet supported in Dummy Mode, and data need name/value +checking enforcement, as well as boundaries or enumeration definition. -.SH AUTHOR +AUTHOR +------ Arnaud Quette -.SH SEE ALSO +SEE ALSO +-------- -\fBupscmd\fR(1), -\fBupsrw\fR(1), -\fBups.conf\fR(5), -\fBnutupsdrv\fR(8) +linkman:upscmd[1], +linkman:upsrw[1], +linkman:ups.conf[5], +linkman:nutupsdrv[8] -.SS Internet resources: +Internet Resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/etapro.8 b/docs/man/etapro.8 new file mode 100644 index 0000000..236dd99 --- /dev/null +++ b/docs/man/etapro.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: etapro +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "ETAPRO" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +etapro \- Driver for ETA UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the etapro driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports ETA UPS equipment with the "PRO" option for smart mode\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHOR" +.sp +Marek Michalkiewicz +.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/ diff --git a/docs/man/etapro.txt b/docs/man/etapro.txt new file mode 100644 index 0000000..3b827e2 --- /dev/null +++ b/docs/man/etapro.txt @@ -0,0 +1,35 @@ +ETAPRO(8) +========= + +NAME +---- +etapro - Driver for ETA UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +etapro driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports ETA UPS equipment with the "PRO" option for smart mode. + +EXTRA ARGUMENTS +--------------- +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +AUTHOR +------ +Marek Michalkiewicz + +SEE ALSO +-------- +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/everups.8 b/docs/man/everups.8 new file mode 100644 index 0000000..94ce786 --- /dev/null +++ b/docs/man/everups.8 @@ -0,0 +1,53 @@ +'\" t +.\" Title: everups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "EVERUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +everups \- Driver for Ever UPS models +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the everups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver should recognize the NET *\-DPC and AP *\-PRO models\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "BUGS" +.sp +This UPS can only switch off the load if it\(cqs running on battery\&. This means you may be vulnerable to power races if your shutdown scripts don\(cqt sleep and force a reboot\&. +.SH "AUTHOR" +.sp +Bartek Szady +.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/ diff --git a/docs/man/everups.txt b/docs/man/everups.txt new file mode 100644 index 0000000..cf01bc0 --- /dev/null +++ b/docs/man/everups.txt @@ -0,0 +1,44 @@ +EVERUPS(8) +========== + +NAME +---- +everups - Driver for Ever UPS models + +NOTE +---- +This man page only documents the hardware-specific features of the +everups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver should recognize the NET *-DPC and AP *-PRO models. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +BUGS +---- + +This UPS can only switch off the load if it's running on battery. This +means you may be vulnerable to power races if your shutdown scripts +don't sleep and force a reboot. + +AUTHOR +------ +Bartek Szady + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/gamatronic.8 b/docs/man/gamatronic.8 new file mode 100644 index 0000000..2c64b44 --- /dev/null +++ b/docs/man/gamatronic.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: gamatronic +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "GAMATRONIC" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +gamatronic \- Driver for Gamatronic UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the gamatronic driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +Various \- Rebuilt to work with Gamatronic UPS Units, but should recognize any UPS that speaks the SEC protocol at 1200\-19200 bps\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHOR" +.sp +Nadav Moskovitch +.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/ diff --git a/man/gamatronic.8 b/docs/man/gamatronic.txt similarity index 56% rename from man/gamatronic.8 rename to docs/man/gamatronic.txt index 4f61ebf..ac9db3f 100644 --- a/man/gamatronic.8 +++ b/docs/man/gamatronic.txt @@ -1,27 +1,38 @@ -.TH GAMATRONIC 8 "Tue Sep 8 2009" "" "Network UPS Tools (NUT)" -.SH NAME -gamatronic \- Driver for Gamatronic UPS equipment -.SH NOTE +GAMATRONIC(8) +============= + +NAME +---- +gamatronic - Driver for Gamatronic UPS equipment + +NOTE +---- This man page only documents the hardware-specific features of the gamatronic driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH SUPPORTED HARDWARE +SUPPORTED HARDWARE +------------------ Various - Rebuilt to work with Gamatronic UPS Units, but should recognize any UPS that speaks the SEC protocol at 1200-19200 bps. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver does not support any extra settings in the -\fBups.conf\fR(5). +linkman:ups.conf[5]. -.SH AUTHOR +AUTHOR +------ Nadav Moskovitch -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver +~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources +~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/genericups.8 b/docs/man/genericups.8 new file mode 100644 index 0000000..64a8b74 --- /dev/null +++ b/docs/man/genericups.8 @@ -0,0 +1,593 @@ +'\" t +.\" Title: genericups +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "GENERICUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +genericups \- Driver for contact\-closure UPS equipment +.SH "NOTE" +.sp +This man page only documents the specific features of the genericups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports hardware from many different manufacturers as it only uses the very simplest of signaling schemes\&. Contact closure refers to a kind of interface where basic high/low signals are provided to indicate status\&. This kind of UPS can only report line power and battery status\&. +.sp +This means that you will only get the essentials in ups\&.status: OL, OB, and LB\&. Anything else requires a smarter UPS\&. +.SH "CABLING" +.sp +Cabling is different for every kind of UPS\&. See the table below for information on what is known to work with a given UPS type\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following settings in the \fBups.conf\fR(5): +.PP +upstype=\fItype\fR +.RS 4 +Required\&. Configures the driver for a specific kind of UPS\&. See the +UPS Types +section below for more information on which entries are available\&. +.RE +.PP +mfr=\fIstring\fR +.RS 4 +Optional\&. The very nature of a generic UPS driver sometimes means that the stock manufacturer data has no relation to the actual hardware that is attached\&. With the +mfr +setting, you can change the value that is seen by clients that monitor this UPS\&. +.RE +.PP +model=\fIstring\fR +.RS 4 +Optional\&. This is like +mfr +above, but it overrides the model string instead\&. +.RE +.PP +serial=\fIstring\fR +.RS 4 +Optional\&. This is like +mfr +above and intended to record the identification string of the UPS\&. It is titled "serial" because usually this string is referred to as the serial number\&. +.RE +.PP +sdtime=\fIvalue\fR +.RS 4 +Optional\&. The driver will sleep for this many seconds after setting the shutdown signal\&. This is necessary for some hardware which requires a sustained level to activate the shutdown sequence\&. +.sp +The default behavior of the driver is to exit immediately\&. If this doesn\(cqt reliably trigger a shutdown in your UPS hardware, use this setting to give it more time to react\&. +.RE +.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 +very large values for sdtime may create warnings from upsdrvctl if it gets tired of waiting for the driver to return\&. +.sp .5v +.RE +.SH "CUSTOM CONFIGURATIONS" +.sp +You may override the values for CP, OL, LB, and SD by defining them in the \fBups.conf\fR(5) after the upstype setting\&. +.sp +For example, to set the cable power to DTR and the low battery value to DCD, it would look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CP = DTR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +LB = DCD +.fi +.if n \{\ +.RE +.\} +.sp +Recognized values for input lines are CTS, DCD, and RNG\&. Recognized values for output lines are DTR, RTS, and ST\&. See below for more about what these signals mean\&. +.sp +These values may be negated for active low signals\&. That is, "LB=\-DCD" recognizes a low battery condition when DCD is not held high\&. +.SH "TYPE INFORMATION" +.sp +The essence of a UPS definition in this driver is how it uses the serial lines that are available\&. These are the abbreviations you will see below: +.PP +OL +.RS 4 +On line (no power failure) (opposite of OB \- on battery) +.RE +.PP +LB +.RS 4 +Low battery +.RE +.PP +SD +.RS 4 +Shutdown load +.RE +.PP +CP +.RS 4 +Cable power (must be present for cable to have valid reading) +.RE +.PP +CTS +.RS 4 +Clear to Send\&. Received from the UPS\&. +.RE +.PP +RTS +.RS 4 +Ready to Send\&. Sent by the PC\&. +.RE +.PP +DCD +.RS 4 +Data Carrier Detect\&. Received from the UPS\&. +.RE +.PP +RNG +.RS 4 +Ring indicate\&. Received from the UPS\&. +.RE +.PP +DTR +.RS 4 +Data Terminal Ready\&. Sent by the PC\&. +.RE +.PP +ST +.RS 4 +Send a BREAK on the transmit data line +.RE +.sp +A "\-" in front of a signal name (like \-RNG) means that the indicated condition is signaled with an active low signal\&. For example, [LB=\-RNG] means the battery is low when the ring indicate line goes low, and that the battery is OK when that line is held high\&. +.SH "UPS TYPES" +.sp +0 = UPSonic LAN Saver 600 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR+RTS] [OL=\-CTS] [LB=DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.sp +1 = APC Back\-UPS/Back\-UPS Pro/Smart\-UPS with 940\-0095A/C cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=\-RNG] [LB=DCD] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +2 = APC Back\-UPS/Back\-UPS Pro/Smart\-UPS with 940\-0020B cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=\-CTS] [LB=DCD] [SD=DTR+RTS] +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +Type 2 has also been reported to work with the 940\-0020C cable\&. +.fi +.if n \{\ +.RE +.\} +.sp +3 = PowerTech Comp1000 with DTR cable power +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=DCD] [SD=DTR+RTS] +.fi +.if n \{\ +.RE +.\} +.sp +4 = Generic RUPS Model +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=\-RTS] +.fi +.if n \{\ +.RE +.\} +.sp +5 = Tripp Lite UPS with Lan2\&.2 interface (black 73\-0844 cable) +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=DTR+RTS] +.fi +.if n \{\ +.RE +.\} +.sp +6 = Best Patriot with INT51 cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +7 = CyberPower Power99 Also Upsonic Power Guardian PG\-500, Belkin Belkin Home Office, F6H350\-SER, F6H500\-SER, F6H650\-SER +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.sp +8 = Nitram Elite 500 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=???] +.fi +.if n \{\ +.RE +.\} +.sp +9 = APC Back\-UPS/Back\-UPS Pro/Smart\-UPS with 940\-0023A cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=none] [OL=\-DCD] [LB=CTS] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +10 = Victron Lite with crack cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.sp +11 = Powerware 3115 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=\-CTS] [LB=\-DCD] [SD=ST] +.fi +.if n \{\ +.RE +.\} +.sp +12 = APC Back\-UPS Office with 940\-0119A cable +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=\-CTS] [LB=DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.sp +13 = RPT Repoteck RPT\-800A/RPT\-162A +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR+RTS] [OL=DCD] [LB=\-CTS] [SD=ST] +.fi +.if n \{\ +.RE +.\} +.sp +14 = Online P\-series +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=DCD] [LB=\-CTS] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +15 = Powerware 5119, 5125 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=ST] +.fi +.if n \{\ +.RE +.\} +.sp +16 = Nitram Elite 2002 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR+RTS] [OL=CTS] [LB=\-DCD] [SD=???] +.fi +.if n \{\ +.RE +.\} +.sp +17 = PowerKinetics 9001 +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=???] +.fi +.if n \{\ +.RE +.\} +.sp +18 = TrippLite Omni 450LAN with Martin\(cqs cabling +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=DCD] [SD=none] +.fi +.if n \{\ +.RE +.\} +.sp +19 = Fideltronic Ares Series +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=CTS] [LB=\-DCD] [SD=RTS] +.fi +.if n \{\ +.RE +.\} +.sp +20 = Powerware 5119 RM +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=DTR] [OL=\-CTS] [LB=DCD] [SD=ST] +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +Check docs/cables/powerware\&.txt +.fi +.if n \{\ +.RE +.\} +.sp +21 = Generic RUPS 2000 (Megatec M2501 cable) +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=RTS+DTR] +.fi +.if n \{\ +.RE +.\} +.sp +22 = Gamatronic All models with alarm interface (also CyberPower SL series) +.sp +.if n \{\ +.RS 4 +.\} +.nf +[CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] +.fi +.if n \{\ +.RE +.\} +.SH "SIMILAR MODELS" +.sp +Many different UPS companies make models with similar interfaces\&. The RUPS cable seems to be especially popular in the "power strip" variety of UPS found in office supply stores\&. If your UPS works with an entry in the table above, but the model or manufacturer information don\(cqt match, don\(cqt despair\&. You can fix that easily by using the mfr and model variables documented above in your \fBups.conf\fR(5)\&. +.SH "TESTING COMPATIBILITY" +.sp +If your UPS isn\(cqt listed above, you can try going through the list until you find one that works\&. There is a lot of cable and interface reuse in the UPS world, and you may find a match\&. +.sp +To do this, first make sure nothing important is plugged into the outlets on the UPS, as you may inadvertently switch it off\&. Definitely make sure that the computer you\(cqre using is not plugged into that UPS\&. Plug in something small like a lamp so you know when power is being supplied to the outlets\&. +.sp +Now, you can either attempt to make an educated guess based on the documentation your manufacturer has provided (if any), or just start going down the list\&. +.SS "Step 1" +.sp +Pick a driver to try from the list (genericups \-h) and go to step 2\&. +.SS "Step 2" +.sp +Start the driver with the type you want to try \- +.sp +.if n \{\ +.RS 4 +.\} +.nf +genericups \-x upstype=n /dev/port +.fi +.if n \{\ +.RE +.\} +.sp +Let upsd sync up (watch the syslog), and then run upsc to see what it found\&. If the STATUS is right (should be OL for on line), continue to Step 3, otherwise go back to step 1\&. +.sp +Alternatively, you can run genericups in debug mode \- +.sp +.if n \{\ +.RS 4 +.\} +.nf +genericups \-DDDDD \-x upstype=n /dev/port +.fi +.if n \{\ +.RE +.\} +.sp +In this mode it will be running in the foreground and continuously display the line and battery status of the UPS\&. +.SS "Step 3" +.sp +Disconnect the UPS from the wall/mains power\&. This is easiest if you have a switched outlet in between it and the wall, but you can also just pull the plug to test\&. The lamp should stay lit, and the status should switch to "OB"\&. If the lamp went out or the status didn\(cqt go to "OB" within about 15 seconds, go to Step 1\&. Otherwise, continue to Step 4\&. +.SS "Step 4" +.sp +At this point, we know that OL and OB work\&. If nothing else beyond this point works, you at least know what your OL/OB value should be\&. +.sp +Wait for the UPS to start complaining about a low battery\&. Depending on the size of your UPS battery and the lamp\(cqs bulb, this could take awhile\&. It should start complaining audibly at some point\&. When this happens, STATUS should show "OB LB" within 15 seconds\&. If not, go to Step 1, otherwise continue to Step 5\&. +.SS "Step 5" +.sp +So far: OL works, OB works, and LB works\&. +.sp +With the UPS running on battery, run the genericups driver with the \-k switch to shut it down\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +genericups \-x upstype=n \-k /dev/port +.fi +.if n \{\ +.RE +.\} +.sp +If the UPS turns off the lamp, you\(cqre done\&. At this point, you have verified that the shutdown sequence actually does what you want\&. You can start using the genericups driver with this type number for normal operations\&. +.sp +You should use your findings to add a section to your ups\&.conf\&. Here is a quick example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[myups] + driver = genericups + port = /dev/ttyS0 + upstype = 1 +.fi +.if n \{\ +.RE +.\} +.sp +Change the port and upstype values to match your system\&. +.SH "NEW SUPPORT" +.sp +If the above testing sequence fails, you will probably need to create a new entry to support your hardware\&. All UPS types are determined from the table in the genericups\&.h file in the source tree\&. +.sp +On a standard 9 pin serial port, there are 6 lines that are used as the standard "high/low" signal levels\&. 4 of them are incoming (to the PC, from the UPS), and the other 2 are outgoing (to the UPS, from the PC)\&. The other 3 are the receive/transmit lines and the ground\&. +.sp +Be aware that many manufacturers remap pins within the cable\&. If you have any doubts, a quick check with a multimeter should confirm whether the cable is straight\-through or not\&. Another thing to keep in mind is that some cables have electronics in them to do special things\&. Some have resistors and transistors on board to change behavior depending on what\(cqs being supplied by the PC\&. +.SH "SPECIFIC MODEL NOTES" +.sp +These have been contributed by users of this driver\&. +.sp +The Centralion CL series may power down the load if the driver starts up with the UPS running on battery as the default line settings contain the shutdown sequence\&. \- Neil Muller +.sp +The Tripp\-Lite Internet Office 700 must be used with the black 73\-0844 cable instead of the gray 73\-0743 cable\&. This entry should work with any of their models with the Lan 2\&.2 interface \- see the sticker by the DB9 connector on the UPS\&. \- Stephen Brown +.sp +Type 5 should work with the Tripp\-Lite Lan 2\&.1 interface and the 73\-0724 cable\&. This was tested with the OmniSmart 675 PNP on Red Hat 7\&.2\&. \- Q Giese +.sp +Types 7 and 10 should both work with the PhoenixTec A1000\&. +.SH "BUGS" +.sp +There is no way to reliably detect a contact\-closure UPS\&. This means the driver will start up happily even if no UPS is detected\&. It also means that if the connection between the UPS and computer is interrupted, you may not be able to sense this in software\&. +.sp +Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using slave \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. +.sp +The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command\&. +.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/ diff --git a/man/genericups.8 b/docs/man/genericups.txt similarity index 59% rename from man/genericups.8 rename to docs/man/genericups.txt index 523525e..9a7efc7 100644 --- a/man/genericups.8 +++ b/docs/man/genericups.txt @@ -1,12 +1,17 @@ -.TH GENERICUPS 8 "Thu Aug 11 2005" "" "Network UPS Tools (NUT)" -.SH NAME -genericups \- Driver for contact\(hyclosure UPS equipment +GENERICUPS(8) +============= -.SH NOTE +NAME +---- +genericups - Driver for contact-closure UPS equipment + +NOTE +---- This man page only documents the specific features of the genericups -driver. For information about the core driver, see \fBnutupsdrv\fR(8). +driver. For information about the core driver, see linkman:nutupsdrv[8]. -.SH SUPPORTED HARDWARE +SUPPORTED HARDWARE +------------------ This driver supports hardware from many different manufacturers as it only uses the very simplest of signaling schemes. Contact closure refers to a kind of interface where basic high/low signals are provided to indicate @@ -15,53 +20,57 @@ status. This kind of UPS can only report line power and battery status. This means that you will only get the essentials in ups.status: OL, OB, and LB. Anything else requires a smarter UPS. -.SH CABLING +CABLING +------- Cabling is different for every kind of UPS. See the table below for information on what is known to work with a given UPS type. -.SH EXTRA ARGUMENTS -This driver supports the following settings in the \fBups.conf\fR(5): +EXTRA ARGUMENTS +--------------- +This driver supports the following settings in the linkman:ups.conf[5]: -.IP "upstype=\fItype\fR" +upstype='type':: -Required. Configures the driver for a specific kind of UPS. See the UPS -Types section below for more information on which entries are available. +Required. Configures the driver for a specific kind of UPS. See the +<<_ups_types,UPS Types>> section below for more information on which entries +are available. -.IP "mfr=\fIstring\fR" +mfr='string':: Optional. The very nature of a generic UPS driver sometimes means that the stock manufacturer data has no relation to the actual hardware that is -attached. With the mfr setting, you can change the value that is seen by +attached. With the `mfr` setting, you can change the value that is seen by clients that monitor this UPS. -.IP "model=\fIstring\fR" +model='string':: -Optional. This is like mfr above, but it overrides the model string +Optional. This is like `mfr` above, but it overrides the model string instead. -.IP "serial=\fIstring\fR" +serial='string':: -Optional. This is like mfr above and intended to record the identification -string of the UPS. It is titled serial because usually this string is +Optional. This is like `mfr` above and intended to record the identification +string of the UPS. It is titled "serial" because usually this string is referred to as the serial number. -.IP "sdtime=\fIvalue\fR" +sdtime='value':: Optional. The driver will sleep for this many seconds after setting the shutdown signal. This is necessary for some hardware which requires a sustained level to activate the shutdown sequence. - ++ The default behavior of the driver is to exit immediately. If this doesn't reliably trigger a shutdown in your UPS hardware, use this setting to give it more time to react. -Note: very large values for sdtime may create warnings from upsdrvctl if +NOTE: very large values for +sdtime+ may create warnings from upsdrvctl if it gets tired of waiting for the driver to return. -.SH CUSTOM CONFIGURATIONS +CUSTOM CONFIGURATIONS +--------------------- You may override the values for CP, OL, LB, and SD by defining them in -the \fBups.conf\fR after the upstype setting. +the linkman:ups.conf[5] after the upstype setting. For example, to set the cable power to DTR and the low battery value to DCD, it would look like this: @@ -74,136 +83,153 @@ Recognized values for input lines are CTS, DCD, and RNG. Recognized values for output lines are DTR, RTS, and ST. See below for more about what these signals mean. -These values may be negated for active low signals. That is, "LB=\-DCD" +These values may be negated for active low signals. That is, "LB=-DCD" recognizes a low battery condition when DCD is not held high. -.SH TYPE INFORMATION +TYPE INFORMATION +---------------- The essence of a UPS definition in this driver is how it uses the serial lines that are available. These are the abbreviations you will see below: - OL \(hy On line (no power failure) (opposite of OB \(hy on battery) +OL:: On line (no power failure) (opposite of OB - on battery) - LB \(hy Low battery +LB:: Low battery - SD \(hy Shutdown load +SD:: Shutdown load - CP \(hy Cable power (must be present for cable to have valid reading) +CP:: Cable power (must be present for cable to have valid reading) - CTS \(hy Clear to Send. Received from the UPS. +CTS:: Clear to Send. Received from the UPS. - RTS \(hy Ready to Send. Sent by the PC. +RTS:: Ready to Send. Sent by the PC. - DCD \(hy Data Carrier Detect. Received from the UPS. +DCD:: Data Carrier Detect. Received from the UPS. - RNG \(hy Ring indicate. Received from the UPS. +RNG:: Ring indicate. Received from the UPS. - DTR \(hy Data Terminal Ready. Sent by the PC. +DTR:: Data Terminal Ready. Sent by the PC. - DSR \(hy Data Set Ready. Received from the UPS. +ST:: Send a BREAK on the transmit data line - ST \(hy Send a BREAK on the transmit data line - -A \- in front of a signal name (like \-RNG) means that the indicated -condition is signaled with an active low signal. For example, [LB=\-RNG] +A "-" in front of a signal name (like -RNG) means that the indicated +condition is signaled with an active low signal. For example, [LB=-RNG] means the battery is low when the ring indicate line goes low, and that the battery is OK when that line is held high. -.SH UPS TYPES +UPS TYPES +--------- 0 = UPSonic LAN Saver 600 - [CP=DTR+RTS] [OL=\-CTS] [LB=DCD] [SD=DTR] -1 = APC Back\(hyUPS/Back\(hyUPS Pro/Smart\(hyUPS with 940\-0095A/C cable - [CP=DTR] [OL=\-RNG] [LB=DCD] [SD=RTS] + [CP=DTR+RTS] [OL=-CTS] [LB=DCD] [SD=DTR] -2 = APC Back\(hyUPS/Back\(hyUPS Pro/Smart\(hyUPS with 940\-0020B cable - [CP=RTS] [OL=\-CTS] [LB=DCD] [SD=DTR+RTS] +1 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0095A/C cable - Type 2 has also been reported to work with the 940\-0020C cable. + [CP=DTR] [OL=-RNG] [LB=DCD] [SD=RTS] + +2 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0020B cable + + [CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR+RTS] + + Type 2 has also been reported to work with the 940-0020C cable. 3 = PowerTech Comp1000 with DTR cable power + [CP=DTR] [OL=CTS] [LB=DCD] [SD=DTR+RTS] 4 = Generic RUPS Model - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=\-RTS] -5 = Tripp Lite UPS with Lan2.2 interface (black 73\-0844 cable) - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=DTR+RTS] + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=-RTS] + +5 = Tripp Lite UPS with Lan2.2 interface (black 73-0844 cable) + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=DTR+RTS] 6 = Best Patriot with INT51 cable - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=RTS] + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=RTS] 7 = CyberPower Power99 - also Upsonic Power Guardian PG\-500 + Also Upsonic Power Guardian PG-500, Belkin Belkin Home Office, + F6H350-SER, F6H500-SER, F6H650-SER - Also Belkin Belkin Home Office - F6H350\-SER, F6H500\-SER, F6H650\-SER - - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR] 8 = Nitram Elite 500 - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=???] -9 = APC Back\(hyUPS/Back\(hyUPS Pro/Smart\(hyUPS with 940\-0023A cable - [CP=none] [OL=\-DCD] [LB=CTS] [SD=RTS] + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=???] + +9 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0023A cable + + [CP=none] [OL=-DCD] [LB=CTS] [SD=RTS] 10 = Victron Lite with crack cable - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] + + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR] 11 = Powerware 3115 - [CP=DTR] [OL=\-CTS] [LB=\-DCD] [SD=ST] -12 = APC Back\-UPS Office with 940\-0119A cable - [CP=RTS] [OL=\-CTS] [LB=DCD] [SD=DTR] + [CP=DTR] [OL=-CTS] [LB=-DCD] [SD=ST] -13 = RPT Repoteck RPT\-800A/RPT\-162A - [CP=DTR+RTS] [OL=DCD] [LB=\-CTS] [SD=ST] +12 = APC Back-UPS Office with 940-0119A cable -14 = Online P\-series - [CP=DTR] [OL=DCD] [LB=\-CTS] [SD=RTS] + [CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR] + +13 = RPT Repoteck RPT-800A/RPT-162A + + [CP=DTR+RTS] [OL=DCD] [LB=-CTS] [SD=ST] + +14 = Online P-series + + [CP=DTR] [OL=DCD] [LB=-CTS] [SD=RTS] 15 = Powerware 5119, 5125 - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=ST] + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=ST] 16 = Nitram Elite 2002 - [CP=DTR+RTS] [OL=CTS] [LB=\-DCD] [SD=???] + + [CP=DTR+RTS] [OL=CTS] [LB=-DCD] [SD=???] 17 = PowerKinetics 9001 - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=???] + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=???] 18 = TrippLite Omni 450LAN with Martin's cabling + [CP=DTR] [OL=CTS] [LB=DCD] [SD=none] - http://lists.exploits.org/upsdev/Jul2002/00012.html - 19 = Fideltronic Ares Series - [CP=DTR] [OL=CTS] [LB=\-DCD] [SD=RTS] + + [CP=DTR] [OL=CTS] [LB=-DCD] [SD=RTS] 20 = Powerware 5119 RM - [CP=DTR] [OL=\-CTS] [LB=DCD] [SD=ST] + + [CP=DTR] [OL=-CTS] [LB=DCD] [SD=ST] Check docs/cables/powerware.txt 21 = Generic RUPS 2000 (Megatec M2501 cable) - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=RTS+DTR] - http://lists.exploits.org/upsdev/Oct2004/00004.html + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=RTS+DTR] 22 = Gamatronic All models with alarm interface - also CyberPower SL series + (also CyberPower SL series) - [CP=RTS] [OL=CTS] [LB=\-DCD] [SD=DTR] + [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR] -.SH SIMILAR MODELS +SIMILAR MODELS +-------------- Many different UPS companies make models with similar interfaces. The RUPS cable seems to be especially popular in the "power strip" variety of UPS found in office supply stores. If your UPS works with an entry in the table above, but the model or manufacturer information don't match, don't despair. You can fix that easily by using the mfr and model -variables documented above in your \fBups.conf\fR(5). +variables documented above in your linkman:ups.conf[5]. -.SH TESTING COMPATIBILITY +TESTING COMPATIBILITY +--------------------- If your UPS isn't listed above, you can try going through the list until you find one that works. There is a lot of cable and interface reuse in @@ -220,35 +246,40 @@ documentation your manufacturer has provided (if any), or just start going down the list. Step 1 +~~~~~~ -Pick a driver to try from the list (genericups \-h) and go to step 2. +Pick a driver to try from the list (genericups -h) and go to step 2. Step 2 +~~~~~~ -Start the driver with the type you want to try \(hy +Start the driver with the type you want to try - - genericups \-x upstype=n /dev/port + genericups -x upstype=n /dev/port Let upsd sync up (watch the syslog), and then run upsc to see what it -found. If the STATUS is right (should be OL for on line), go to step 3, -otherwise go back to step 1. +found. If the STATUS is right (should be OL for on line), continue to +<<_step_3,Step 3>>, otherwise go back to step 1. -Alternatively, you can run genericups in debug mode \(hy +Alternatively, you can run genericups in debug mode - - genericups -DDDDD \-x upstype=n /dev/port + genericups -DDDDD -x upstype=n /dev/port In this mode it will be running in the foreground and continuously display the line and battery status of the UPS. Step 3 +~~~~~~ Disconnect the UPS from the wall/mains power. This is easiest if you have a switched outlet in between it and the wall, but you can also just pull the plug to test. The lamp should stay lit, and the status should switch to "OB". If the lamp went out or the status didn't go to "OB" -within about 15 seconds, go to step 1. Otherwise, continue to step 4. +within about 15 seconds, go to <<_step_1,Step 1>>. Otherwise, continue +to <<_step_4,Step 4>>. Step 4 +~~~~~~ At this point, we know that OL and OB work. If nothing else beyond this point works, you at least know what your OL/OB value should be. @@ -257,16 +288,17 @@ Wait for the UPS to start complaining about a low battery. Depending on the size of your UPS battery and the lamp's bulb, this could take awhile. It should start complaining audibly at some point. When this happens, STATUS should show "OB LB" within 15 seconds. If not, go to -step 1, otherwise continue to step 5. +<<_step_1,Step 1>>, otherwise continue to <<_step_5,Step 5>>. Step 5 +~~~~~~ So far: OL works, OB works, and LB works. -With the UPS running on battery, run the genericups driver with the \-k +With the UPS running on battery, run the genericups driver with the -k switch to shut it down. - genericups \-x upstype=n \-k /dev/port + genericups -x upstype=n -k /dev/port If the UPS turns off the lamp, you're done. At this point, you have verified that the shutdown sequence actually does what you want. You @@ -283,7 +315,8 @@ Here is a quick example: Change the port and upstype values to match your system. -.SH NEW SUPPORT +NEW SUPPORT +----------- If the above testing sequence fails, you will probably need to create a new entry to support your hardware. All UPS types are determined from the @@ -296,48 +329,53 @@ The other 3 are the receive/transmit lines and the ground. Be aware that many manufacturers remap pins within the cable. If you have any doubts, a quick check with a multimeter should confirm whether the -cable is straight\(hythrough or not. Another thing to keep in mind is that +cable is straight-through or not. Another thing to keep in mind is that some cables have electronics in them to do special things. Some have resistors and transistors on board to change behavior depending on what's being supplied by the PC. -.SH SPECIFIC MODEL NOTES +SPECIFIC MODEL NOTES +-------------------- These have been contributed by users of this driver. The Centralion CL series may power down the load if the driver starts up with the UPS running on battery as the default line settings contain the -shutdown sequence. \(hy Neil Muller +shutdown sequence. - Neil Muller -The Tripp\(hyLite Internet Office 700 must be used with the black 73\(hy0844 -cable instead of the gray 73\(hy0743 cable. This entry should work with any -of their models with the Lan 2.2 interface \(hy see the sticker by the DB9 -connector on the UPS. \(hy Stephen Brown +The Tripp-Lite Internet Office 700 must be used with the black 73-0844 +cable instead of the gray 73-0743 cable. This entry should work with any +of their models with the Lan 2.2 interface - see the sticker by the DB9 +connector on the UPS. - Stephen Brown -Type 5 should work with the Tripp\(hyLite Lan 2.1 interface and the 73\(hy0724 -cable. This was tested with the OmniSmart 675 PNP on Red Hat 7.2. \(hy Q +Type 5 should work with the Tripp-Lite Lan 2.1 interface and the 73-0724 +cable. This was tested with the OmniSmart 675 PNP on Red Hat 7.2. - Q Giese Types 7 and 10 should both work with the PhoenixTec A1000. -.SH BUGS +BUGS +---- -There is no way to reliably detect a contact\(hyclosure UPS. This means the +There is no way to reliably detect a contact-closure UPS. This means the driver will start up happily even if no UPS is detected. It also means that if the connection between the UPS and computer is interrupted, you may not be able to sense this in software. -Most contact\(hyclosure UPSes will not power down the load if the line power -is present. This can create a race when using slave \fBupsmon\fR(8) -systems. See the \fBupsmon\fR(8) man page for more information. +Most contact-closure UPSes will not power down the load if the line power +is present. This can create a race when using slave linkman:upsmon[8] +systems. See the linkman:upsmon[8] man page for more information. The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command. -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver +~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources +~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/hosts.conf.5 b/docs/man/hosts.conf.5 new file mode 100644 index 0000000..caf89a3 --- /dev/null +++ b/docs/man/hosts.conf.5 @@ -0,0 +1,61 @@ +'\" t +.\" Title: hosts.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "HOSTS\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +hosts.conf \- Access control for Network UPS Tools CGI programs +.SH "DESCRIPTION" +.sp +The CGI programs (\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8)) use this file to determine if they are allowed to talk to a host\&. This keeps random visitors from using your web server to annoy others by creating outgoing connections\&. +.SH "DIRECTIVES" +.PP +\fBMONITOR\fR \fIups\fR \fIdescription\fR +.RS 4 +The +\fIups\fR +element is in the form +upsname[@hostname[:port]]\&. To allow connections to a UPS called "snoopy" on a system called "doghouse" that runs upsd on port 7877, it would look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +MONITOR snoopy@doghouse:7877 "Joe Cool" +.fi +.if n \{\ +.RE +.\} +.sp +The description must be one element, so if it has spaces, then it must be wrapped with quotes as shown above\&. The default hostname is "localhost"\&. +.RE +.SH "SEE ALSO" +.sp +\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/hosts.conf.5 b/docs/man/hosts.conf.txt similarity index 50% rename from man/hosts.conf.5 rename to docs/man/hosts.conf.txt index 276e0c3..273ae98 100644 --- a/man/hosts.conf.5 +++ b/docs/man/hosts.conf.txt @@ -1,30 +1,39 @@ -.TH HOSTS.CONF 5 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -hosts.conf \- Access control for Network UPS Tools CGI programs +HOSTS.CONF(5) +============= -.SH DESCRIPTION +NAME +---- -The CGI programs (\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), -\fBupsimage.cgi(8)\fR) use this file to determine if they are allowed to +hosts.conf - Access control for Network UPS Tools CGI programs + +DESCRIPTION +----------- + +The CGI programs (linkman:upsset.cgi[8], linkman:upsstats.cgi[8], +linkman:upsimage.cgi[8]) use this file to determine if they are allowed to talk to a host. This keeps random visitors from using your web server to annoy others by creating outgoing connections. -.SH DIRECTIVES +DIRECTIVES +---------- -.IP "MONITOR \fIups\fR \fIdescription\fR" +*MONITOR* 'ups' 'description':: -The \fIups\fR element is in the form "upsname[@hostname[:port]]". +The 'ups' element is in the form `upsname[@hostname[:port]]`. To allow connections to a UPS called "snoopy" on a system called "doghouse" that runs upsd on port 7877, it would look like this: MONITOR snoopy@doghouse:7877 "Joe Cool" - ++ The description must be one element, so if it has spaces, then it must be wrapped with quotes as shown above. The default hostname is "localhost". -.SH SEE ALSO -\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +SEE ALSO +-------- -.SS Internet resources: +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/isbmex.8 b/docs/man/isbmex.8 new file mode 100644 index 0000000..f649265 --- /dev/null +++ b/docs/man/isbmex.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: isbmex +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "ISBMEX" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +isbmex \- Driver for ISBMEX UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the isbmex driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports SOLA/BASIC Mexico ISBMEX protocol UPS equipment\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHOR" +.sp +Edscott Wilson Garcia +.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/ diff --git a/docs/man/isbmex.txt b/docs/man/isbmex.txt new file mode 100644 index 0000000..9b97d16 --- /dev/null +++ b/docs/man/isbmex.txt @@ -0,0 +1,39 @@ +ISBMEX(8) +========= + +NAME +---- + +isbmex - Driver for ISBMEX UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +isbmex driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports SOLA/BASIC Mexico ISBMEX protocol UPS equipment. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +AUTHOR +------ +Edscott Wilson Garcia + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/ivtscd.8 b/docs/man/ivtscd.8 new file mode 100644 index 0000000..f1365f2 --- /dev/null +++ b/docs/man/ivtscd.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: ivtscd +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "IVTSCD" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ivtscd \- driver for the IVT Solar Controller Device +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the \fBivtscd\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "DESCRIPTION" +.sp +This driver allows to access the IVT SCD\-series devices\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra argument\&. +.SH "AUTHOR" +.sp +Arjen de Korte +.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/ diff --git a/docs/man/ivtscd.txt b/docs/man/ivtscd.txt new file mode 100644 index 0000000..6a2c7c4 --- /dev/null +++ b/docs/man/ivtscd.txt @@ -0,0 +1,34 @@ +IVTSCD(8) +========= + +NAME +---- +ivtscd - driver for the IVT Solar Controller Device + +NOTE +---- +This man page only documents the hardware-specific features of the +*ivtscd* driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +DESCRIPTION +----------- +This driver allows to access the IVT SCD-series devices. + +EXTRA ARGUMENTS +--------------- +This driver does not support any extra argument. + +AUTHOR +------ +Arjen de Korte + +SEE ALSO +-------- +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/libupsclient-config.1 b/docs/man/libupsclient-config.1 new file mode 100644 index 0000000..99d9dcd --- /dev/null +++ b/docs/man/libupsclient-config.1 @@ -0,0 +1,70 @@ +'\" t +.\" Title: libupsclient-config +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "LIBUPSCLIENT\-CONFIG" "1" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +libupsclient-config \- script to get information about the installed version of libupsclient +.SH "SYNOPSIS" +.sp +\fBlibupsclient\-config\fR [\-\-version] [\-\-libs] [\-\-cflags] +.SH "DESCRIPTION" +.sp +\fBlibupsclient\-config\fR is a tool that is used to determine the compiler and linker flags that should be used to compile and link programs that use \fBlibupsclient\fR from the Network UPS Tools project\&. +.SH "OPTIONS" +.sp +\fBlibupsclient\-config\fR accepts the following options: +.PP +\fB\-\-version\fR +.RS 4 +Print the currently installed version of +\fBlibupsclient\fR +on the standard output\&. +.RE +.PP +\fB\-\-libs\fR +.RS 4 +Print the linker flags that are necessary to link a +\fBlibupsclient\fR +program\&. +.RE +.PP +\fB\-\-cflags\fR +.RS 4 +Print the compiler flags that are necessary to compile a +\fBlibupsclient\fR +program\&. +.RE +.SH "AUTHORS" +.sp +This manual page was written by Arnaud Quette \&. +.SH "SEE ALSO" +.sp +\fBupsclient\fR(3) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/libupsclient-config.txt b/docs/man/libupsclient-config.txt new file mode 100644 index 0000000..730a5b2 --- /dev/null +++ b/docs/man/libupsclient-config.txt @@ -0,0 +1,46 @@ +LIBUPSCLIENT-CONFIG(1) +====================== + +NAME +---- + +libupsclient-config - script to get information about the installed version of libupsclient + +SYNOPSIS +-------- +*libupsclient-config* [--version] [--libs] [--cflags] + +DESCRIPTION +----------- + +*libupsclient-config* is a tool that is used to determine the compiler and +linker flags that should be used to compile and link programs that use +*libupsclient* from the Network UPS Tools project. + +OPTIONS +------- + +*libupsclient-config* accepts the following options: + +*--version*:: +Print the currently installed version of *libupsclient* on the standard output. + +*--libs*:: +Print the linker flags that are necessary to link a *libupsclient* program. + +*--cflags*:: +Print the compiler flags that are necessary to compile a *libupsclient* program. + +AUTHORS +------- +This manual page was written by Arnaud Quette . + +SEE ALSO +-------- + +linkman:upsclient[3] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + diff --git a/docs/man/liebert-esp2.8 b/docs/man/liebert-esp2.8 new file mode 100644 index 0000000..d574af1 --- /dev/null +++ b/docs/man/liebert-esp2.8 @@ -0,0 +1,55 @@ +'\" t +.\" Title: liebert-esp2 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "LIEBERT\-ESP2" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +liebert-esp2 \- Driver for Liebert UPS, using the ESP\-II serial protocol +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the liebert\-esp2 driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This is an experimental driver\&. You have been warned\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in \fBups.conf\fR(5): +.PP +\fBbaudrate=\fR\fInum\fR +.RS 4 +Set the speed of the serial connection \- 1200, 2400 (default), 4800, 9600 or 19200\&. +.RE +.SH "AUTHOR" +.sp +Richard Gregory , Arjen de Korte +.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/ diff --git a/docs/man/liebert-esp2.txt b/docs/man/liebert-esp2.txt new file mode 100644 index 0000000..e34fb06 --- /dev/null +++ b/docs/man/liebert-esp2.txt @@ -0,0 +1,40 @@ +LIEBERT-ESP2(8) +============== + +NAME +---- + +liebert-esp2 - Driver for Liebert UPS, using the ESP-II serial protocol + +NOTE +---- +This man page only documents the hardware-specific features of the +liebert-esp2 driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This is an experimental driver. You have been warned. + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in linkman:ups.conf[5]: + +*baudrate=*'num':: +Set the speed of the serial connection - 1200, 2400 (default), 4800, 9600 or 19200. + +AUTHOR +------ +Richard Gregory , Arjen de Korte + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/liebert.8 b/docs/man/liebert.8 new file mode 100644 index 0000000..b1524fa --- /dev/null +++ b/docs/man/liebert.8 @@ -0,0 +1,52 @@ +'\" t +.\" Title: liebert +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "LIEBERT" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +liebert \- Driver for Liebert contact\-closure UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the liebert driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports some Liebert UPS equipment with a contact\-closure interface\&. This includes the UPStation GXT2 with their contact\-closure cable\&. The smart mode ("Multilink") cable is not supported by this driver\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "BUGS" +.sp +This driver does not yet support shutdowns by raising DTR\&. Be aware that shutdowns are not possible with the stock contact\-closure cable\&. You may have to build another cable with DTR connected through to the UPS for it to work\&. +.sp +There is no way for this driver to detect the hardware or cable\&. It will start up successfully even if no UPS is present\&. This is a fundamental limitation of any contact\-closure driver\&. +.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/ diff --git a/docs/man/liebert.txt b/docs/man/liebert.txt new file mode 100644 index 0000000..dfaa795 --- /dev/null +++ b/docs/man/liebert.txt @@ -0,0 +1,49 @@ +LIEBERT(8) +========== + +NAME +---- + +liebert - Driver for Liebert contact-closure UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +liebert driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports some Liebert UPS equipment with a contact-closure +interface. This includes the UPStation GXT2 with their contact-closure +cable. The smart mode ("Multilink") cable is not supported by this +driver. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +BUGS +---- + +This driver does not yet support shutdowns by raising DTR. Be aware +that shutdowns are not possible with the stock contact-closure cable. +You may have to build another cable with DTR connected through to the +UPS for it to work. + +There is no way for this driver to detect the hardware or cable. It +will start up successfully even if no UPS is present. This is a +fundamental limitation of any contact-closure driver. + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/masterguard.8 b/docs/man/masterguard.8 new file mode 100644 index 0000000..11dc582 --- /dev/null +++ b/docs/man/masterguard.8 @@ -0,0 +1,53 @@ +'\" t +.\" Title: masterguard +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "MASTERGUARD" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +masterguard \- Driver for Masterguard UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the masterguard driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports Masterguard UPS equipment\&. +.SH "EXTRA ARGUMENTS" +.PP +\fBCS\fR +.RS 4 +Cancel the shutdown procedure\&. +.RE +.SH "AUTHOR" +.sp +Michael Spanier +.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/ diff --git a/docs/man/masterguard.txt b/docs/man/masterguard.txt new file mode 100644 index 0000000..0820025 --- /dev/null +++ b/docs/man/masterguard.txt @@ -0,0 +1,37 @@ +MASTERGUARD(8) +============== + +NAME +---- +masterguard - Driver for Masterguard UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +masterguard driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports Masterguard UPS equipment. + +EXTRA ARGUMENTS +--------------- + +*CS*:: +Cancel the shutdown procedure. + +AUTHOR +------ +Michael Spanier + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/metasys.8 b/docs/man/metasys.8 new file mode 100644 index 0000000..7d0f54c --- /dev/null +++ b/docs/man/metasys.8 @@ -0,0 +1,137 @@ +'\" t +.\" Title: metasys +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "METASYS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +metasys \- Driver for Meta System UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the metasys driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The \fBmetasys\fR driver was written with the "Meta System UPS Protocol Rev\&.1\&.12" kindly supplied from Meta System\&. +.sp +The driver should support all the common features of the ups models: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +HF Line (/2) 1\-8 boards +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +HF Millennium (810, 820) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +HF TOP Line (910, 920, 930, 940, 950, 970, 980) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ECO Network (750, 1000, 1050, 1500, 1800, 2000, 2100, 2500, 3000) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ECO (305, 308, 311, 511, 516, 519, 522, SX, SXI) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ally HF (800, 1000, 1250, 1600, 2000, 2500) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Megaline (1250, 2500, 3750, 5000, 6250, 7500, 8750, 10000) +.RE +.SH "CABLING" +.sp +The needed cable is a standard pin\-to\-pin serial cable with at least pins 2, 3, and 5 (on DB9 connector) connected\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports no extra arguments from \fBups.conf\fR(5)\&. +.SH "BUGS" +.sp +This driver has been tested on Meta System HF Millennium 820 and ally HF 1000 only\&. +.sp +Any informations about the use of the driver with the other listed UPS are really welcome\&. +.SH "AUTHOR" +.sp +Fabio Di Niro +.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/ diff --git a/man/metasys.8 b/docs/man/metasys.txt similarity index 61% rename from man/metasys.8 rename to docs/man/metasys.txt index a4f8e1a..2e29557 100644 --- a/man/metasys.8 +++ b/docs/man/metasys.txt @@ -1,16 +1,26 @@ -.TH METASYS 8 "Mon May 17 2004" "" "Network UPS Tools (NUT)" -.SH NAME -metasys \- Driver for Meta System UPS equipment -.SH NOTE +METASYS(8) +========== + +NAME +---- + +metasys - Driver for Meta System UPS equipment + +NOTE +---- + This man page only documents the hardware-specific features of the metasys driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -.SH SUPPORTED HARDWARE -Metasys driver have been written with the "Meta System UPS Protocol Rev.1.12" +SUPPORTED HARDWARE +------------------ + +The *metasys* driver was written with the "Meta System UPS Protocol Rev.1.12" kindly supplied from Meta System. The driver should support all the common features of the ups models: + - HF Line (/2) 1-8 boards - HF Millennium (810, 820) - HF TOP Line (910, 920, 930, 940, 950, 970, 980) @@ -20,29 +30,34 @@ The driver should support all the common features of the ups models: - Megaline (1250, 2500, 3750, 5000, 6250, 7500, 8750, 10000) -.SH CABLING -The needed cable is a standard pin-to-pin serial cable with, at least, +CABLING +------- +The needed cable is a standard pin-to-pin serial cable with at least pins 2, 3, and 5 (on DB9 connector) connected. -.SH EXTRA ARGUMENTS -This driver supports no extra arguments from the \fBups.conf\fR(5) +EXTRA ARGUMENTS +--------------- +This driver supports no extra arguments from linkman:ups.conf[5]. -.SH BUGS +BUGS +---- This driver has been tested on Meta System HF Millennium 820 and ally HF 1000 only. -Any informations about the use of the driver with the other listed -ups are really welcome. -.SH AUTHOR +Any informations about the use of the driver with the other listed +UPS are really welcome. + +AUTHOR +------ Fabio Di Niro -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS The metasys driver: -\fBmetasys\fR(8) - -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/mge-shut.8 b/docs/man/mge-shut.8 new file mode 100644 index 0000000..d174e06 --- /dev/null +++ b/docs/man/mge-shut.8 @@ -0,0 +1,122 @@ +'\" t +.\" Title: mge-shut +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "MGE\-SHUT" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +mge-shut \- Driver for SHUT Protocol UPS equipment +.SH "SYNOPSIS" +.sp +\fBmge\-shut\fR \-h +.sp +\fBmge\-shut\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the mge\-shut driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +mge\-shut supports all recent Eaton, MGE and Dell UPS models which use the SHUT (Serial HID UPS Transfer) protocol\&. +.sp +Older MGE models, such as Pulsar ESV+, Pulsar EX and Pulsar ES+, use the U\-Talk protocol and should use the mge\-utalk driver\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver also supports the following optional settings: +.PP +\fBlowbatt\fR=\fInum\fR +.RS 4 +Set the low battery warning threshold at which shutdown is initiated by +\fBupsmon\fR(8)\&. +.sp +The factory default value is 30 (in percent), and can be settable depending on the exact model\&. +.RE +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Set the timer before the UPS is turned off after the kill power command is sent (via the +\fB\-k\fR +switch)\&. +.sp +The default value is 20 (in seconds)\&. Usually this +\fBmust be lower\fR +than +\fIondelay\fR, but the driver will +\fBnot\fR +warn you upon startup if it isn\(cqt\&. +.RE +.PP +\fBondelay\fR=\fInum\fR +.RS 4 +Set the timer for the UPS to switch on in case the power returns after the kill power command had been sent but before the actual switch off\&. This ensures the machines connected to the UPS are, in all cases, rebooted after a power failure\&. +.sp +The default value is 30 (in seconds)\&. Usually this +\fBmust be greater\fR +than offdelay, but the driver will +\fBnot\fR +warn you upon startup if it isn\(cqt\&. Some UPS\(cqes will restart no matter what, even if the power is (still) out at the moment this timer elapses\&. In that case, you could try if setting +\fIondelay = \-1\fR +in +\fBups\&.conf\fR +helps\&. +.RE +.PP +\fBnotification\fR=\fInum\fR +.RS 4 +Set notification type to 1 (no), 2 (light) or 3 (yes)\&. +.sp +The default value is 3 (yes) because of some early Ellipse models which need it\&. +.RE +.SH "KNOWN ISSUES" +.SS "Repetitive timeout and staleness" +.sp +Some models tends to be unresponsive with the default polling frequency\&. The result is that you have some "data stale" errors in your system log\&. +.sp +In this case, simply modify the general parameter "pollinterval" to a higher value (like 10 for 10 seconds)\&. This should solve the issue\&. +.sp +Using \fInotification=3\fR might also help\&. +.SH "AUTHOR" +.sp +Arnaud Quette +.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/ diff --git a/docs/man/mge-shut.txt b/docs/man/mge-shut.txt new file mode 100644 index 0000000..76a9241 --- /dev/null +++ b/docs/man/mge-shut.txt @@ -0,0 +1,94 @@ +MGE-SHUT(8) +=========== + +NAME +---- + +mge-shut - Driver for SHUT Protocol UPS equipment + +SYNOPSIS +-------- + +*mge-shut* -h + +*mge-shut* -a 'UPS_NAME' ['OPTIONS'] + +NOTE: This man page only documents the hardware-specific features of the +mge-shut driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +mge-shut supports all recent Eaton, MGE and Dell UPS models which use the SHUT +(Serial HID UPS Transfer) protocol. + +Older MGE models, such as Pulsar ESV+, Pulsar EX and Pulsar ES+, use the U-Talk +protocol and should use the mge-utalk driver. + +EXTRA ARGUMENTS +--------------- + +This driver also supports the following optional settings: + +*lowbatt*='num':: +Set the low battery warning threshold at which shutdown is initiated by +linkman:upsmon[8]. ++ +The factory default value is 30 (in percent), and can be settable depending on +the exact model. + +*offdelay*='num':: +Set the timer before the UPS is turned off after the kill power command is +sent (via the *-k* switch). ++ +The default value is 20 (in seconds). Usually this *must be lower* than +'ondelay', but the driver will *not* warn you upon startup if it isn't. + +*ondelay*='num':: +Set the timer for the UPS to switch on in case the power returns after the +kill power command had been sent but before the actual switch off. This +ensures the machines connected to the UPS are, in all cases, rebooted after +a power failure. ++ +The default value is 30 (in seconds). Usually this *must be greater* +than offdelay, but the driver will *not* warn you upon startup if it +isn't. Some UPS'es will restart no matter what, even if the power is +(still) out at the moment this timer elapses. In that case, you could try +if setting 'ondelay = -1' in *ups.conf* helps. + +*notification*='num':: +Set notification type to 1 (no), 2 (light) or 3 (yes). ++ +The default value is 3 (yes) because of some early Ellipse models which +need it. + +KNOWN ISSUES +------------ + +Repetitive timeout and staleness +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some models tends to be unresponsive with the default polling frequency. +The result is that you have some "data stale" errors in your system log. + +In this case, simply modify the general parameter "pollinterval" to a higher +value (like 10 for 10 seconds). This should solve the issue. + +Using 'notification=3' might also help. + +AUTHOR +------ + +Arnaud Quette + +SEE ALSO +-------- + +The core driver +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources +~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/mge-utalk.8 b/docs/man/mge-utalk.8 new file mode 100644 index 0000000..82d1812 --- /dev/null +++ b/docs/man/mge-utalk.8 @@ -0,0 +1,120 @@ +'\" t +.\" Title: mge-utalk +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "MGE\-UTALK" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +mge-utalk \- Driver for MGE UPS SYSTEMS UTalk protocol equipment +.SH "SYNOPSIS" +.sp +\fBmge\-utalk\fR \-h +.sp +\fBmge\-utalk\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the mge\-utalk driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +mge\-utalk supports the following legacy units, using the MGE UTalk protocol: +.sp +.if n \{\ +.RS 4 +.\} +.nf +Pulsar ESV+, +Pulsar ES+, +Pulsar EL, +Pulsar EX, +Pulsar EXtreme, +Comet EXtreme, +Comet (Utalk Serial Card, ref 66060), +Galaxy (Utalk Serial Card, ref 66060)\&. +.fi +.if n \{\ +.RE +.\} +.sp +This driver also support some newer models with backward UTalk compatibility, such as Pulsar Evolution and Pulsar EXtreme C\&. As these models also support the SHUT protocol, prefer mge\-shut for serial communication, or use the USB port, if available, with the usbhid\-ups driver\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBlowbatt\fR=\fInum\fR +.RS 4 +Set the low battery warning threshold at which shutdown is initiated by +\fBupsmon\fR(8)\&. +.sp +The factory default value is 30 (in percent), and can be settable depending on the exact model\&. +.RE +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Set the timer before the UPS is turned off after the kill power command is sent (via the +\fB\-k\fR +switch)\&. +.sp +The default value is 20 (in seconds)\&. +.RE +.PP +\fBondelay\fR=\fInum\fR +.RS 4 +Set the delay before the UPS is turned on, after the power returns\&. +.sp +The default value is 1 (in minutes)\&. +.RE +.PP +\fBoldmac\fR +.RS 4 +Set this flag if you are running Linux on an Oldworld Macintosh box (all beige Apple Macintosh)\&. This might also be needed for other OSs (like *BSD) running on PowerMac\&. +.RE +.SH "KNOWN ISSUES" +.SS "Repetitive timeout and staleness" +.sp +Older models, such as ES/ESV ones, might report repetitive "data stale" errors\&. This is due to the fact that these models don\(cqt support too much polling\&. To solve this problem, add "pollinterval=20" in ups\&.conf, and change the value of MAXAGE to 25 in upsd\&.conf, and DEADTIME to 25 in upsmon\&.conf\&. +.SH "AUTHOR" +.sp +Hans Ekkehard Plesser, Arnaud Quette, Martin Loyer, Patrick Agrain, Nicholas Reilly, Dave Abbott, Marek Kralewski +.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/ diff --git a/docs/man/mge-utalk.txt b/docs/man/mge-utalk.txt new file mode 100644 index 0000000..ef11baa --- /dev/null +++ b/docs/man/mge-utalk.txt @@ -0,0 +1,98 @@ +MGE-UTALK(8) +============ + +NAME +---- + +mge-utalk - Driver for MGE UPS SYSTEMS UTalk protocol equipment + +SYNOPSIS +-------- + +*mge-utalk* -h + +*mge-utalk* -a 'UPS_NAME' ['OPTIONS'] + +NOTE: This man page only documents the hardware-specific features of the +mge-utalk driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +mge-utalk supports the following legacy units, using the MGE UTalk protocol: + + Pulsar ESV+, + Pulsar ES+, + Pulsar EL, + Pulsar EX, + Pulsar EXtreme, + Comet EXtreme, + Comet (Utalk Serial Card, ref 66060), + Galaxy (Utalk Serial Card, ref 66060). + +This driver also support some newer models with backward UTalk compatibility, +such as Pulsar Evolution and Pulsar EXtreme C. As these models also support +the SHUT protocol, prefer mge-shut for serial communication, or use the USB +port, if available, with the usbhid-ups driver. + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in the linkman:ups.conf[5]: + +*lowbatt*='num':: +Set the low battery warning threshold at which shutdown is initiated by +linkman:upsmon[8]. ++ +The factory default value is 30 (in percent), and can be settable depending on +the exact model. + +*offdelay*='num':: +Set the timer before the UPS is turned off after the kill power command is +sent (via the *-k* switch). ++ +The default value is 20 (in seconds). + +*ondelay*='num':: +Set the delay before the UPS is turned on, after the power returns. ++ +The default value is 1 (in minutes). + +*oldmac*:: +Set this flag if you are running Linux on an Oldworld Macintosh box +(all beige Apple Macintosh). This might also be needed for other +OSs (like *BSD) running on PowerMac. + +KNOWN ISSUES +------------ + +Repetitive timeout and staleness +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Older models, such as ES/ESV ones, might report repetitive "data stale" errors. +This is due to the fact that these models don't support too much polling. +To solve this problem, add "pollinterval=20" in ups.conf, and change the value +of MAXAGE to 25 in upsd.conf, and DEADTIME to 25 in upsmon.conf. + +AUTHOR +------ + +Hans Ekkehard Plesser, +Arnaud Quette, +Martin Loyer, +Patrick Agrain, +Nicholas Reilly, +Dave Abbott, +Marek Kralewski + +SEE ALSO +-------- + +The core driver +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources +~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/microdowell.8 b/docs/man/microdowell.8 new file mode 100644 index 0000000..a166d56 --- /dev/null +++ b/docs/man/microdowell.8 @@ -0,0 +1,50 @@ +'\" t +.\" Title: microdowell +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "MICRODOWELL" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +microdowell \- Driver for Microdowell Enterprise UPS series +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the Microdowell driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver was developed for the Enterprise Nxx and Bxx models\&. Other Microdowell models may work, too\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver does not support any extra settings in the \fBups.conf\fR(5)\&. +.SH "AUTHOR" +.sp +Elio Corbolante +.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/ diff --git a/docs/man/microdowell.txt b/docs/man/microdowell.txt new file mode 100644 index 0000000..9277379 --- /dev/null +++ b/docs/man/microdowell.txt @@ -0,0 +1,40 @@ +MICRODOWELL(8) +============== + +NAME +---- + +microdowell - Driver for Microdowell Enterprise UPS series + +NOTE +---- + +This man page only documents the hardware-specific features of the +Microdowell driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver was developed for the Enterprise Nxx and Bxx models. Other +Microdowell models may work, too. + +EXTRA ARGUMENTS +--------------- + +This driver does not support any extra settings in the +linkman:ups.conf[5]. + +AUTHOR +------ +Elio Corbolante + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/netxml-ups.8 b/docs/man/netxml-ups.8 new file mode 100644 index 0000000..2ecc4e0 --- /dev/null +++ b/docs/man/netxml-ups.8 @@ -0,0 +1,159 @@ +'\" t +.\" Title: netxml-ups +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NETXML\-UPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +netxml-ups \- Driver for Eaton / MGE Network Management Card / Proxy (XML/HTTP Protocol) equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the netxml\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +netxml\-ups support all recent Eaton / MGE models which use a Network Management Card or Proxy (MGE XML/HTTP protocol based)\&. This applies to both Eaton (previously MGE Office Protection Systems) and to MGE UPS SYSTEMS\&. Supported card and proxy models are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NMC Minislot (Ref 66102, firmware EA or newer), +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SNMP/Web Minislot card (Ref 66244) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NMC Transverse (Ref 66074), +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NMC & Modbus/JBus (Ref 66103), +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Network Management Proxy, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ePDU Monitored (newer version)\&. +.RE +.sp +Older models, such as SNMP card (Ref 66062 and Ref 66045), use the SNMP protocol and should use the \fBsnmp-ups\fR(8) driver with the "mibs=mge" parameter\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBtimeout\fR=\fIvalue\fR +.RS 4 +The timeout for connecting to and reading from the UPS\&. Defaults to 5 seconds\&. Don\(cqt change this value unless you know exactly what you\(cqre doing\&. +.RE +.sp +This value \fBmust never\fR be higher than half the MAXAGE value specified in \fBupsd.conf\fR(5), otherwise you run the risk that \fBupsd\fR(8) declares the driver stale while it is waiting for a connection to timeout\&. +.PP +\fBlogin\fR=\fIvalue\fR +.RS 4 +Set the login value for authenticated mode\&. This feature also needs the +\fBpassword\fR +argument, and allows value settings in the card\&. This feature is not used yet\&. +.RE +.PP +\fBpassword\fR=\fIvalue\fR +.RS 4 +Set the password value, needed with the login for authenticated mode\&. This feature is not used yet\&. +.RE +.SH "IMPLEMENTATION" +.sp +The hostname of the UPS is specified with the "port" value in \fBups\&.conf\fR, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mgexml] + driver = netxml\-ups + port = http://netxml\-ups\&.example\&.com:80 +.fi +.if n \{\ +.RE +.\} +.sp +Specifying the method to connect to the UPS (http, https) is mandatory\&. If the port is equal to the default for the method specified (80 for http, 443 for https) it may be omitted\&. +.sp +In order not to overload older NMCs by polling them too frequently, it is recommended to increase the "pollinterval" (see \fBnutupsdrv\fR(8)) and \fBups.conf\fR(5)) to at least 5 seconds\&. +.SH "KNOWN ISSUES" +.sp +Don\(cqt connect to the UPS through a proxy\&. Although it would be trivial to add support for proxies, this is not recommended and don\(cqt ask for it\&. Not only because it will prevent the driver to make a persistent connection to the UPS, but also it adds an additional failure mode\&. If the proxy goes down (for whatever reason), the driver will no longer be able to reach the UPS\&. +.SH "AUTHORS" +.sp +Arjen de Korte +.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/ diff --git a/docs/man/netxml-ups.txt b/docs/man/netxml-ups.txt new file mode 100644 index 0000000..ffa5b92 --- /dev/null +++ b/docs/man/netxml-ups.txt @@ -0,0 +1,93 @@ +netxml-ups(8) +============= + +NAME +---- +netxml-ups - Driver for Eaton / MGE Network Management Card / Proxy +(XML/HTTP Protocol) equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +netxml-ups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +netxml-ups support all recent Eaton / MGE models which use a Network +Management Card or Proxy (MGE XML/HTTP protocol based). This applies to both +Eaton (previously MGE Office Protection Systems) and to MGE UPS SYSTEMS. +Supported card and proxy models are: + + * NMC Minislot (Ref 66102, firmware EA or newer), + * SNMP/Web Minislot card (Ref 66244) + * NMC Transverse (Ref 66074), + * NMC & Modbus/JBus (Ref 66103), + * Network Management Proxy, + * ePDU Monitored (newer version). + +Older models, such as SNMP card (Ref 66062 and Ref 66045), use the SNMP +protocol and should use the linkman:snmp-ups[8] driver with the "mibs=mge" +parameter. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*timeout*='value':: +The timeout for connecting to and reading from the UPS. Defaults to 5 seconds. +Don't change this value unless you know exactly what you're doing. + +This value *must never* be higher than half the MAXAGE value specified in +linkman:upsd.conf[5], otherwise you run the risk that linkman:upsd[8] declares +the driver stale while it is waiting for a connection to timeout. + +*login*='value':: +Set the login value for authenticated mode. This feature also needs the +*password* argument, and allows value settings in the card. +This feature is not used yet. + +*password*='value':: +Set the password value, needed with the login for authenticated mode. +This feature is not used yet. + +IMPLEMENTATION +-------------- +The hostname of the UPS is specified with the "port" value in +*ups.conf*, i.e.: + + [mgexml] + driver = netxml-ups + port = http://netxml-ups.example.com:80 + +Specifying the method to connect to the UPS (http, https) is mandatory. +If the port is equal to the default for the method specified (80 for http, +443 for https) it may be omitted. + +In order not to overload older NMCs by polling them too frequently, it is +recommended to increase the "pollinterval" (see linkman:nutupsdrv[8]) and +linkman:ups.conf[5]) to at least 5 seconds. + +KNOWN ISSUES +------------ +Don't connect to the UPS through a proxy. Although it would be trivial to add +support for proxies, this is not recommended and don't ask for it. Not only +because it will prevent the driver to make a persistent connection to the UPS, +but also it adds an additional failure mode. If the proxy goes down (for +whatever reason), the driver will no longer be able to reach the UPS. + +AUTHORS +------- +Arjen de Korte + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nut.conf.5 b/docs/man/nut.conf.5 new file mode 100644 index 0000000..9665388 --- /dev/null +++ b/docs/man/nut.conf.5 @@ -0,0 +1,169 @@ +'\" t +.\" Title: nut.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUT\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nut.conf \- UPS definitions for Network UPS Tools +.SH "DESCRIPTION" +.sp +This file attempts to standardize the various files being found in different installations, like /etc/default/nut on Debian based systems and /etc/sysconfig/ups on RedHat based systems\&. +.sp +Distribution\(cqs init script should source this file in order to determine which components have to be started\&. +.sp +Blank lines are ignored\&. Lines with a hash (\fI#\fR) character at the 1st position of the line are ignored, too\&. They can be used to add comments\&. +.SH "DIRECTIVES" +.PP +\fBMODE\fR +.RS 4 +Required\&. Recognized values are +\fInone\fR, +\fIstandalone\fR, +\fInetserver\fR +and +\fInetclient\fR\&. Defaults to +\fInone\fR\&. +.PP +none +.RS 4 +Indicates that NUT should not get started automatically, possibly because it is not configured or that an Integrated Power Management or some external system, is used to startup the NUT components\&. +.RE +.PP +standalone +.RS 4 +Addresses a local only configuration, with 1 UPS protecting the local system\&. This implies to start the 3 NUT layers (driver, upsd and upsmon), with the related configuration files\&. This mode can also address UPS redundancy\&. +.RE +.PP +netserver +.RS 4 +Like the standalone configuration, but also possibly need one or more specific LISTEN directive(s) in upsd\&.conf\&. Since this MODE is open to the network, a special care should be applied to security concerns\&. +.RE +.PP +netclient +.RS 4 +When only upsmon is required, possibly because there are other hosts that are more closely attached to the UPS, the MODE should be set to netclient\&. +.RE +.RE +.PP +\fBUPSD_OPTIONS\fR +.RS 4 +Optional\&. Set upsd specific options\&. See +\fBupsd\fR(8) +for more details\&. It is ignored when +\fIMODE\fR +above indicates that no upsd should be running\&. +.RE +.PP +\fBUPSMON_OPTIONS\fR +.RS 4 +Optional\&. Set upsmon specific options\&. See +\fBupsmon\fR(8) +for more details\&. It is ignored when +\fIMODE\fR +above indicates that no upsmon should be running\&. +.RE +.PP +\fBPOWEROFF_WAIT\fR +.RS 4 +Optional\&. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off\&. This may fail for a number of reasons\&. Most notably is the case that mains power returns during the shutdown process\&. See the section "Power races" in /usr/share/doc/nut/docs/shutdown\&.txt\&.gz\&. The system will wait this long for the UPS to cut power, and then reboot\&. It should be long enough to exhaust the batteries, in case line power continues to be unavailable\&. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned\&. See sleep(1) for compatible time syntax\&. If you specify the time in seconds, use the "s" suffix\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +.sp +this workaround might be dangerous under some circumstances\&. Please read http://bugs\&.debian\&.org/358696 for more details\&. +.sp .5v +.RE +.SH "EXAMPLE" +.sp +.if n \{\ +.RS 4 +.\} +.nf +# /etc/nut/nut\&.conf\&. See nut\&.conf(5) +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +MODE = none +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +UPSD_OPTIONS = "" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +UPSMON_OPTIONS = "" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +# POWEROFF_WAIT = 15m +.fi +.if n \{\ +.RE +.\} +.SH "INTEGRATION" +.sp +An init script, such as /etc/init\&.d/nut, is expected to source this file in order to determine which component(s) has to be started\&. +.SH "SEE ALSO" +.sp +\fBups.conf\fR(5), \fBupsd.conf\fR(5), \fBupsd.users\fR(5), \fBupsmon.conf\fR(5) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/nut.conf.5 b/docs/man/nut.conf.txt similarity index 56% rename from man/nut.conf.5 rename to docs/man/nut.conf.txt index 6665818..26ed896 100644 --- a/man/nut.conf.5 +++ b/docs/man/nut.conf.txt @@ -1,56 +1,61 @@ -.TH NUT.CONF 5 "Sun May 10 2009" "" "Network UPS Tools (NUT)" -.SH NAME -nut.conf \- UPS definitions for Network UPS Tools +NUT.CONF(5) +=========== -.SH DESCRIPTION +NAME +---- +nut.conf - UPS definitions for Network UPS Tools + +DESCRIPTION +----------- This file attempts to standardize the various files being found in different installations, like /etc/default/nut on Debian based -systems and /etc/sysconfig/nut on RedHat based systems. +systems and /etc/sysconfig/ups on RedHat based systems. Distribution's init script should source this file in order to -determine which component(s) has to be started. +determine which components have to be started. Blank lines are ignored. Lines with a hash ('#') character at the -1st position of the line are ignored too. They can be used to add +1st position of the line are ignored, too. They can be used to add comments. -.SH DIRECTIVES +DIRECTIVES +---------- -.IP MODE -Required. Recognized values are none, standalone, netserver and -netclient. Defaults to none. +*MODE*:: +Required. Recognized values are 'none', 'standalone', 'netserver' and +'netclient'. Defaults to 'none'. -none: Indicates that NUT should not get started automatically, +none;; Indicates that NUT should not get started automatically, possibly because it is not configured or that an Integrated Power Management or some external system, is used to startup the NUT components. -standalone: Addresses a local only configuration, with 1 UPS +standalone;; Addresses a local only configuration, with 1 UPS protecting the local system. This implies to start the 3 NUT layers (driver, upsd and upsmon), with the related configuration files. This mode can also address UPS redundancy. -netserver: Like the standalone configuration, but also need some -more ACLs and possibly a specific LISTEN directive in upsd.conf. +netserver;; Like the standalone configuration, but also possibly +need one or more specific LISTEN directive(s) in upsd.conf. Since this MODE is open to the network, a special care should be applied to security concerns. -netclient: When only upsmon is required, possibly because +netclient;; When only upsmon is required, possibly because there are other hosts that are more closely attached to the UPS, the MODE should be set to netclient. -.IP UPSD_OPTIONS -Optional. Set upsd specific options. See \fBupsd\fR(8) for more -details. It is ignored when MODE above indicates that no upsd +*UPSD_OPTIONS*:: +Optional. Set upsd specific options. See linkman:upsd[8] for more +details. It is ignored when 'MODE' above indicates that no upsd should be running. -.IP UPSMON_OPTIONS -Optional. Set upsmon specific options. See \fBupsmon\fR(8) for -more details. It is ignored when MODE above indicates that no +*UPSMON_OPTIONS*:: +Optional. Set upsmon specific options. See linkman:upsmon[8] for +more details. It is ignored when 'MODE' above indicates that no upsmon should be running. -.IP POWEROFF_WAIT +*POWEROFF_WAIT*:: Optional. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off. This may fail for a number of reasons. Most notably is the case that mains power returns during @@ -60,32 +65,37 @@ long for the UPS to cut power, and then reboot. It should be long enough to exhaust the batteries, in case line power continues to be unavailable. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line -power has returned. See \fBsleep\fR(1) for compatible time syntax. +power has returned. See sleep(1) for compatible time syntax. If you specify the time in seconds, use the "s" suffix. WARNING: this workaround might be dangerous under some circumstances. Please read http://bugs.debian.org/358696 for more details. -.SH EXAMPLE +EXAMPLE +------- -# /etc/nut/nut.conf. See nut.conf(5) + # /etc/nut/nut.conf. See nut.conf(5) + + MODE = none + + UPSD_OPTIONS = "" + + UPSMON_OPTIONS = "" + + # POWEROFF_WAIT = 15m -MODE = none - -UPSD_OPTIONS = "" - -UPSMON_OPTIONS = "" - -# POWEROFF_WAIT = 15m - -.SH INTEGRATION +INTEGRATION +----------- An init script, such as /etc/init.d/nut, is expected to source this file in order to determine which component(s) has to be started. -.SH SEE ALSO -\fBups.conf\fR(5), \fBupsd.conf\fR(5), \fBupsd.users\fR(5), -\fBupsmon.conf\fR(5) +SEE ALSO +-------- -.SS Internet resources: +linkman:ups.conf[5], linkman:upsd.conf[5], linkman:upsd.users[5], +linkman:upsmon.conf[5] + +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nutupsdrv.8 b/docs/man/nutupsdrv.8 new file mode 100644 index 0000000..043fed2 --- /dev/null +++ b/docs/man/nutupsdrv.8 @@ -0,0 +1,175 @@ +'\" t +.\" Title: nutupsdrv +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTUPSDRV" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutupsdrv \- generic manual for unified NUT drivers +.SH "SYNOPSIS" +.sp +\fBnutupsdrv\fR \fI\-h\fR +.sp +\fBnutupsdrv\fR [OPTIONS] +.SH "DESCRIPTION" +.sp +\fBnutupsdrv\fR is not actually a driver\&. This is a combined man page for the shared code that is the core of many drivers within the Network UPS Tools package\&. +.sp +For information on the specific drivers, see their individual man pages\&. +.sp +UPS drivers provide a communication channel between the physical UPS hardware and the \fBupsd\fR(8) server\&. The driver is responsible for translating the native protocol of the UPS to the common format used by the rest of this package\&. +.sp +The core has two modes of operation which are determined by the command line switches\&. In the normal mode, the driver will periodically poll the UPS for its state and parameters\&. The results of this command is presented to upsd\&. The driver will also handle setting variables and instant commands if available\&. +.sp +The driver can also instruct the UPS to shut down the load, possibly after some delay\&. This mode of operation is intended for cases when it is known that the UPS is running out of battery power and the systems attached must be turned off to ensure a proper reboot when power returns\&. +.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 +You probably don\(cqt want to use any of these options directly\&. You should use \fBupsdrvctl\fR(8) to control your drivers, and \fBups.conf\fR(5) to configure them\&. The rest of this manual describes options and parameters that generally are not needed by normal users\&. +.sp .5v +.RE +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display a help message without doing anything else\&. This will also list possible values for +\fI\-x\fR +in that driver, and other help text that the driver\(cqs author may have provided\&. +.RE +.PP +\fB\-a\fR \fIid\fR +.RS 4 +Autoconfigure this driver using the +\fIid\fR +section of +\fBups.conf\fR(5)\&. +\fBThis argument is mandatory when calling the driver directly\&.\fR +.RE +.PP +\fB\-D\fR +.RS 4 +Raise the debugging level\&. Use this multiple times to see more details\&. Running a driver in debug mode will prevent it from backgrounding after startup\&. It will keep on logging information to the console until it receives a SIGINT (usually Ctrl\-C) or SIGTERM signal\&. +.sp +The level of debugging needed depends both on the driver and the problem you\(cqre trying to diagnose\&. Therefore, first explain the problem you have with a driver to a developer/maintainer, before sending them debugging output\&. More often than not, if you just pick a level, the output may be either too limited or too verbose to be of any use\&. +.RE +.PP +\fB\-i\fR \fIinterval\fR +.RS 4 +Set the poll interval for the device\&. +.RE +.PP +\fB\-V\fR +.RS 4 +Print only version information, then exit\&. +.RE +.PP +\fB\-L\fR +.RS 4 +Print a parseable list of driver variables\&. Mostly useful for configuration wizard programs\&. +.RE +.PP +\fB\-k\fR +.RS 4 +("Kill" power) Forced shutdown mode\&. The UPS will power off the attached load, if possible\&. +.sp +You should use +upsdrvctl shutdown +whenever possible instead of calling this directly\&. +.RE +.PP +\fB\-r\fR \fIdirectory\fR +.RS 4 +The driver will chroot(2) to +\fIdirectory\fR +during initialization\&. This can be useful when securing systems\&. +.sp +In addition to the state path, many systems will require /dev/null to exist within +\fIdirectory\fR +for this to work\&. The serial ports are opened before the chroot call, so you do not need to create them inside the jail\&. In fact, it is somewhat safer if you do not\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +If started as root, the driver will setuid(2) to the user id associated with +\fIusername\fR\&. +.sp +If you do not specify this value and start it as root, the driver will switch to the default value that was compiled into the code\&. This is typically +\fInobody\fR, and is far from ideal\&. +.RE +.PP +\fB\-x\fR \fIvar\fR=\fIval\fR +.RS 4 +Define a variable called +\fIvar\fR +with the value of +\fIvar\fR +in the driver\&. This varies from driver to driver \- see the specific man pages for more information\&. +.sp +This is like setting +\fIvar\fR=\fIval\fR +in +\fBups.conf\fR(5), but +\fB\-x\fR +overrides any settings from that file\&. +.RE +.SH "DIAGNOSTICS" +.sp +Information about the startup process is printed to stdout\&. Additional messages after that point are available in the syslog\&. After \fBupsd\fR(8) starts, the UPS clients such as \fBupsc\fR(8) can be used to query the status of an UPS\&. +.SH "PROGRAM CONTROL" +.sp +You should always use \fBupsdrvctl\fR(8) to control the drivers\&. While drivers can be started by hand for testing purposes, it is not recommended for production use\&. +.SH "FILES" +.PP +ups\&.conf +.RS 4 +Required configuration file\&. This contains all details on which drivers to start and where the hardware is attached\&. +.RE +.SH "BUGS" +.sp +Some of the drivers may have bugs\&. See their manuals for more information\&. +.SH "SEE ALSO" +.sp +Server: \fBupsd\fR(8) +.sp +Clients: \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupslog\fR(8), \fBupsmon\fR(8) +.sp +CGI programs: \fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.sp +Driver control: \fBupsdrvctl\fR(8) +.sp +Drivers: \fBapcsmart\fR(8), \fBbcmxcp\fR(8), \fBbcmxcp_usb\fR(8), \fBbelkin\fR(8), \fBbelkinunv\fR(8), \fBbestfcom\fR(8), \fBbestuferrups\fR(8), \fBbestups\fR(8), \fBblazer\fR(8), \fBcyberpower\fR(8), \fBdummy-ups\fR(8), \fBetapro\fR(8), \fBeverups\fR(8), \fBgamatronic\fR(8), \fBgenericups\fR(8), \fBisbmex\fR(8), \fBliebert\fR(8), \fBmasterguard\fR(8), \fBmetasys\fR(8), \fBmge-shut\fR(8), \fBmge-utalk\fR(8), \fBmge-xml\fR(8), \fBnewmge-shut\fR(8), \fBnitram\fR(8), \fBoneac\fR(8), \fBoptiups\fR(8), \fBpowercom\fR(8), \fBpowerman-pdu\fR(8), \fBpowerpanel\fR(8), \fBrhino\fR(8), \fBrichcomm_usb\fR(8), \fBsafenet\fR(8), \fBsnmp-ups\fR(8), \fBsolis\fR(8), \fBtripplite\fR(8), \fBtripplitesu\fR(8), \fBtripplite_usb\fR(8), \fBusbhid-ups\fR(8), \fBupscode2\fR(8), \fBvictronups\fR(8) +.sp +Internet resources: The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/nutupsdrv.txt b/docs/man/nutupsdrv.txt new file mode 100644 index 0000000..5a67d7e --- /dev/null +++ b/docs/man/nutupsdrv.txt @@ -0,0 +1,197 @@ +NUTUPSDRV(8) +============ + +NAME +---- + +nutupsdrv - generic manual for unified NUT drivers + +SYNOPSIS +-------- + +*nutupsdrv* '-h' + +*nutupsdrv* [OPTIONS] + +DESCRIPTION +----------- + +*nutupsdrv* is not actually a driver. This is a combined man page for the +shared code that is the core of many drivers within the Network UPS Tools +package. + +For information on the specific drivers, see their individual man pages. + +UPS drivers provide a communication channel between the physical UPS +hardware and the linkman:upsd[8] server. The driver is responsible for +translating the native protocol of the UPS to the common format used by +the rest of this package. + +The core has two modes of operation which are determined by the +command line switches. In the normal mode, the driver will periodically +poll the UPS for its state and parameters. The results of this command +is presented to upsd. The driver will also handle setting variables and +instant commands if available. + +The driver can also instruct the UPS to shut down the load, possibly +after some delay. This mode of operation is intended for cases when it is +known that the UPS is running out of battery power and the systems +attached must be turned off to ensure a proper reboot when power returns. + +NOTE: You probably don't want to use any of these options directly. You +should use linkman:upsdrvctl[8] to control your drivers, and +linkman:ups.conf[5] to configure them. The rest of this manual describes +options and parameters that generally are not needed by normal users. + +OPTIONS +------- +*-h*:: +Display a help message without doing anything else. This will also list +possible values for '-x' in that driver, and other help text that the +driver's author may have provided. + +*-a* 'id':: +Autoconfigure this driver using the 'id' section of linkman:ups.conf[5]. +*This argument is mandatory when calling the driver directly.* + +*-D*:: +Raise the debugging level. Use this multiple times to see more details. +Running a driver in debug mode will prevent it from backgrounding after +startup. It will keep on logging information to the console until it +receives a SIGINT (usually Ctrl-C) or SIGTERM signal. ++ +The level of debugging needed depends both on the driver and the +problem you're trying to diagnose. Therefore, first explain the problem you +have with a driver to a developer/maintainer, before sending them debugging +output. More often than not, if you just pick a level, the output may be +either too limited or too verbose to be of any use. + +*-i* 'interval':: +Set the poll interval for the device. + +*-V*:: +Print only version information, then exit. + +*-L*:: +Print a parseable list of driver variables. Mostly useful for configuration +wizard programs. + +*-k*:: +("Kill" power) Forced shutdown mode. The UPS will power off the +attached load, if possible. ++ +You should use +upsdrvctl shutdown+ whenever possible instead of +calling this directly. + +*-r* 'directory':: +The driver will chroot(2) to 'directory' during initialization. +This can be useful when securing systems. ++ +In addition to the state path, many systems will require /dev/null to +exist within 'directory' for this to work. The serial ports are +opened before the chroot call, so you do not need to create them inside +the jail. In fact, it is somewhat safer if you do not. + +*-u* 'username':: +If started as root, the driver will setuid(2) to the user id +associated with 'username'. ++ +If you do not specify this value and start it as root, the driver will +switch to the default value that was compiled into the code. This is +typically 'nobody', and is far from ideal. + +*-x* 'var'='val':: +Define a variable called 'var' with the value of 'var' in the +driver. This varies from driver to driver - see the specific man pages +for more information. ++ +This is like setting 'var'='val' in linkman:ups.conf[5], but +*-x* overrides any settings from that file. + +DIAGNOSTICS +----------- + +Information about the startup process is printed to stdout. Additional +messages after that point are available in the syslog. After linkman:upsd[8] +starts, the UPS clients such as linkman:upsc[8] can be used to query the status +of an UPS. + +PROGRAM CONTROL +--------------- + +You should always use linkman:upsdrvctl[8] to control the drivers. While +drivers can be started by hand for testing purposes, it is not recommended for +production use. + +FILES +----- +ups.conf:: +Required configuration file. This contains all details on which drivers +to start and where the hardware is attached. + +BUGS +---- + +Some of the drivers may have bugs. See their manuals for more +information. + +SEE ALSO +-------- + +Server: +linkman:upsd[8] + +Clients: +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upslog[8], linkman:upsmon[8] + +CGI programs: +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] + +Driver control: +linkman:upsdrvctl[8] + +Drivers: +linkman:apcsmart[8], +linkman:bcmxcp[8], +linkman:bcmxcp_usb[8], +linkman:belkin[8], +linkman:belkinunv[8], +linkman:bestfcom[8], +linkman:bestuferrups[8], +linkman:bestups[8], +linkman:blazer[8], +linkman:cyberpower[8], +linkman:dummy-ups[8], +linkman:etapro[8], +linkman:everups[8], +linkman:gamatronic[8], +linkman:genericups[8], +linkman:isbmex[8], +linkman:liebert[8], +linkman:masterguard[8], +linkman:metasys[8], +linkman:mge-shut[8], +linkman:mge-utalk[8], +linkman:mge-xml[8], +linkman:newmge-shut[8], +linkman:nitram[8], +linkman:oneac[8], +linkman:optiups[8], +linkman:powercom[8], +linkman:powerman-pdu[8], +linkman:powerpanel[8], +linkman:rhino[8], +linkman:richcomm_usb[8], +linkman:safenet[8], +linkman:snmp-ups[8], +linkman:solis[8], +linkman:tripplite[8], +linkman:tripplitesu[8], +linkman:tripplite_usb[8], +linkman:usbhid-ups[8], +linkman:upscode2[8], +linkman:victronups[8] + +Internet resources: +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/oneac.8 b/docs/man/oneac.8 new file mode 100644 index 0000000..507e23c --- /dev/null +++ b/docs/man/oneac.8 @@ -0,0 +1,82 @@ +'\" t +.\" Title: oneac +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "ONEAC" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +oneac \- Driver for Oneac UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the oneac driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports Oneac EG and ON UPS equipment with the Advanced Interface\&. If your UPS is equipped with the Basic Interface card, use the genericups driver\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file: +.PP +\fBtesttime\fR=\fInum\fR +.RS 4 +Change battery test time from the 2 minute default\&. +.RE +.SH "INSTANT COMMANDS" +.sp +This driver supports the following Instant Commands\&. +.PP +\fBreset\&.input\&.minmax\fR +.RS 4 +Reset the minimum and maximum input line voltage values seen since the last reset or power on\&. +.RE +.PP +\fBtest\&.battery\&.start\fR +.RS 4 +Start a battery test\&. The default time is 2 minutes\&. This time can be set in the +\fBups\&.conf\fR +file\&. See +\fBtestime\fR +above\&. +.RE +.PP +\fBtest\&.battery\&.stop\fR +.RS 4 +Stops a battery test that is in progress\&. +.RE +.PP +\fBtest\&.failure\&.start\fR +.RS 4 +Starts a 15 second long simulation of an input power failure\&. +.RE +.SH "AUTHOR" +.sp +Eric Lawson +.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/ diff --git a/man/oneac.8 b/docs/man/oneac.txt similarity index 55% rename from man/oneac.8 rename to docs/man/oneac.txt index c1c6e4f..88f6aa6 100644 --- a/man/oneac.8 +++ b/docs/man/oneac.txt @@ -1,48 +1,62 @@ -.TH ONEAC 8 "Tue Oct 22 2002" "" "Network UPS Tools (NUT)" -.SH NAME -oneac \- Driver for Oneac UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -oneac driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +ONEAC(8) +======== -.SH SUPPORTED HARDWARE +NAME +---- + +oneac - Driver for Oneac UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +oneac driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ This driver supports Oneac EG and ON UPS equipment with the Advanced Interface. If your UPS is equipped with the Basic Interface card, use the genericups driver. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following optional settings in the -\fBups.conf\fR(5): +linkman:ups.conf[5] file: -.IP "testtime=\fInum\fR" +*testtime*='num':: Change battery test time from the 2 minute default. -.SH INSTANT COMMANDS +INSTANT COMMANDS +---------------- This driver supports the following Instant Commands. -.IP "reset.input.minmax" +*reset.input.minmax*:: Reset the minimum and maximum input line voltage values seen since the last reset or power on. -.IP "test.battery.start" +*test.battery.start*:: Start a battery test. The default time is 2 minutes. This -time can be set in the ups.conf file. See \fBtestime\fR above. +time can be set in the *ups.conf* file. See *testime* above. -.IP "test.battery.stop" +*test.battery.stop*:: Stops a battery test that is in progress. -.IP "test.failure.start" +*test.failure.start*:: Starts a 15 second long simulation of an input power failure. -.SH AUTHOR +AUTHOR +------ Eric Lawson -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/optiups.8 b/docs/man/optiups.8 new file mode 100644 index 0000000..ec18abc --- /dev/null +++ b/docs/man/optiups.8 @@ -0,0 +1,98 @@ +'\" t +.\" Title: optiups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "OPTIUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +optiups \- Driver for Opti\-UPS (Viewsonic) UPS and Zinto D (ONLINE\-USV) equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the optiups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +\fBoptiups\fR was originally written against a PowerES 280es in nut\-0\&.45\&. It was revised for nut\-2\&.0\&.1 and tested against a PowerES 420E\&. It is expected to work with at least the PowerES, PowerPS, and PowerVS models\&. +.sp +This driver additionally supports a Zinto D from ONLINE USV\-Systeme AG because of their very similar commands, but it is unknown if it also works with other UPS from them\&. +.sp +This driver will not work with the PowerES stock serial cable\&. You will need to construct your own three conductor cable: +.sp +.if n \{\ +.RS 4 +.\} +.nf +UPS 6 \-> PC 3 +UPS 9 \-> PC 2 +UPS 4 \-> PC 5 +.fi +.if n \{\ +.RE +.\} +.sp +The cable for Online\-USV uses pin UPS 7 (not UPS 4) → PC 5\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file: +.PP +\fBstatus_only\fR +.RS 4 +Only poll for critical status information\&. Without this, +\fBoptiups\fR +(and all NUT drivers) poll all sorts of information from the UPS fairly often\&. It is probably not often enough to hurt anything, so this option probably is not very useful, unless you have a flaky serial connection or a highly loaded machine\&. +.RE +.PP +\fBnowarn_noimp\fR +.RS 4 +Does not print warnings when the UPS reports that a variable is not implemented or not pollable\&. Without the option you will get a message sent to your system logs each time NUT polls the UPS\&. If you specify +\fBnowarn_noimp\fR, this message will only be logged once\&. +.RE +.PP +\fBfake_lowbatt\fR +.RS 4 +This forces the low battery flag true\&. Without it, if you want to test your UPS, you will have to unplug it and wait until the battery drops to a low/critical voltage level before NUT will respond and power down your system\&. With the flag, NUT should power down the system soon after you pull the plug\&. When you are done testing, you should remove this flag\&. +.sp +For basic shutdown configuration testing, the command +\fIupsmon \-c fsd\fR +is preferred\&. +.RE +.PP +\fBpowerup\fR +.RS 4 +Zinto D from ONLINE\-USV cannot be identified when switched to standby\&. Set this flag to allow the driver to power\-up your Zinto UPS\&. This will also power\-up your equipment connected to the UPS! +.RE +.SH "BUGS" +.sp +On the 420E, ups\&.serial and ups\&.temperature are unsupported features\&. This is not a bug in NUT or the NUT driver, just the way things are with this UPS\&. +.SH "AUTHOR" +.sp +Russell Kroll, Scott Heavner, Matthias Goebl +.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/ diff --git a/docs/man/optiups.txt b/docs/man/optiups.txt new file mode 100644 index 0000000..25f7342 --- /dev/null +++ b/docs/man/optiups.txt @@ -0,0 +1,92 @@ +OPTIUPS(8) +========== + +NAME +---- + +optiups - Driver for Opti-UPS (Viewsonic) UPS and Zinto D (ONLINE-USV) equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +optiups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +*optiups* was originally written against a PowerES 280es in nut-0.45. It was +revised for nut-2.0.1 and tested against a PowerES 420E. It is expected to +work with at least the PowerES, PowerPS, and PowerVS models. + +This driver additionally supports a Zinto D from ONLINE USV-Systeme AG +because of their very similar commands, but it is unknown if it also works +with other UPS from them. + +This driver will not work with the PowerES stock serial cable. You will need +to construct your own three conductor cable: + + UPS 6 -> PC 3 + UPS 9 -> PC 2 + UPS 4 -> PC 5 + +The cable for Online-USV uses pin UPS 7 (not UPS 4) -> PC 5. + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in the +linkman:ups.conf[5] file: + +*status_only*:: + +Only poll for critical status information. Without this, *optiups* (and +all NUT drivers) poll all sorts of information from the UPS fairly often. +It is probably not often enough to hurt anything, so this option probably +is not very useful, unless you have a flaky serial connection or a highly +loaded machine. + +*nowarn_noimp*:: + +Does not print warnings when the UPS reports that a variable is not +implemented or not pollable. Without the option you will get a message +sent to your system logs each time NUT polls the UPS. If you specify +*nowarn_noimp*, this message will only be logged once. + +*fake_lowbatt*:: + +This forces the low battery flag true. Without it, if you want to test your +UPS, you will have to unplug it and wait until the battery drops to a low/critical +voltage level before NUT will respond and power down your system. With the flag, +NUT should power down the system soon after you pull the plug. When you are done +testing, you should remove this flag. ++ +For basic shutdown configuration testing, the command 'upsmon -c fsd' is preferred. + +*powerup*:: + +Zinto D from ONLINE-USV cannot be identified when switched to standby. +Set this flag to allow the driver to power-up your Zinto UPS. +This will also power-up your equipment connected to the UPS! + +BUGS +---- + +On the 420E, `ups.serial` and `ups.temperature` are unsupported features. This +is not a bug in NUT or the NUT driver, just the way things are with this UPS. + +AUTHOR +------ +Russell Kroll, Scott Heavner, Matthias Goebl + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/powercom.8 b/docs/man/powercom.8 new file mode 100644 index 0000000..d3a4560 --- /dev/null +++ b/docs/man/powercom.8 @@ -0,0 +1,267 @@ +'\" t +.\" Title: powercom +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "POWERCOM" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +powercom \- UPS driver for Powercom/Trust/Advice UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the powercom driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports many similar kinds of UPS hardware\&. The most common ones are the Trust 425/625, Powercom, and Advice Partner/King PR750\&. Others using the same protocol may also work\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file: +.PP +\fBlinevoltage\fR=\fIvalue\fR +.RS 4 +An integer specifying the mains voltage\&. It can\(cqt be auto detected\&. Acceptable values are in the range of 110\(em120 or 220\(em240\&. The default is +\fI230\fR\&. +.RE +.PP +\fBmanufacturer\fR=\fIname\fR +.RS 4 +Specify the manufacturer name, which also can\(cqt be auto detected\&. This is a user defined string, so any name is acceptable\&. The default is +\fIPowerCom\fR\&. +.RE +.PP +\fBmodelname\fR=\fIname\fR +.RS 4 +Specify the model name, which also can\(cqt be auto detected\&. This is a user defined string, so any name is acceptable\&. The default is +\fIUnknown\fR\&. +.RE +.PP +\fBserialnumber\fR=\fIvalue\fR +.RS 4 +Like modelname above, but for the serial number\&. The default is +\fIUnknown\fR\&. +.RE +.PP +\fBtype\fR=\fIname\fR +.RS 4 +The exact type of the communication protocol within the powercom family, that will be used to communicate with the UPS\&. The type is named after the first modelname that was coded with that protocol\&. The acceptable names are +\fIKP625AP\fR, +\fITrust\fR, +\fIEgys\fR, +\fIKIN\fR, +\fIBNT\fR, +\fIIMP\fR +and +\fIBNT\-other\fR\&. The default is +\fITrust\fR\&. +.sp +\fIBNT\-other\fR +is a special type for BNT 100\-120V models\&. For this type you can (I think must!) specify voltage, batteryPercentage, loadPercentage and validationSequence\&. +.RE +.PP +\fBnumOfBytesFromUPS\fR=\fIvalue\fR +.RS 4 +The number of bytes in a UPS frame\&. The default is type\-dependent and is given below\&. +.RE +.PP +\fBmethodOfFlowControl\fR=\fIname\fR +.RS 4 +The method of serial communication flow control that is engaged by the UPS\&. The default is type\-dependent and is given below\&. Acceptable names are +\fIdtr0rts1\fR, +\fIdtr1\fR +or +\fIno_flow_control\fR\&. +.RE +.PP +\fBshutdownArguments\fR={{\fIminutes\fR,\fIseconds\fR},\fIwhether_minutes_should_be_used\fR} +.RS 4 +The minutes and seconds that the UPS should wait between receiving the shutdown command and actually shutting off\&. The other argument should be set to the character +\fIn\fR +only when the minutes value should be skipped and not sent to the UPS\&. The default is type\-dependent and is given below\&. The braces and commas are mandatory\&. Note that there should be no whitespace characters\&. +.RE +.PP +\fBvoltage\fR={\fIcoefficient1\fR,\fIcoefficient2\fR,\fIcoefficient3\fR,\fIcoefficient4\fR} +.RS 4 +(Only for types KP625AP, Trust, Egys, BNT\-other\&.) A quad that is used convert the raw data to a human\-readable voltage reading\&. The default is type\-dependent and is given below\&. Do note that the braces and commas are mandatory, as well as the lack of whitespace characters\&. +.RE +.PP +\fBfrequency\fR={\fIcoefficient1\fR,\fIcoefficient2\fR} +.RS 4 +(Only for types KP625AP, Trust, Egys\&.) A pair to convert the raw data to a human\-readable frequency reading\&. The default is type\-dependent and is given below\&. Do note that the braces and commas are mandatory as well, as the lack of whitespace characters\&. +.RE +.PP +\fBbatteryPercentage\fR={\fIcoefficient1\fR,\fIcoefficient2\fR,\fIcoefficient3\fR,\fIcoefficient4\fR,\fIcoefficient5\fR} +.RS 4 +(Only for KP625AP, Trust, Egys, BNT\-other\&.) A 5 tuple to convert the raw data to a human\-readable battery percentage reading\&. The default is type\-dependent and is given below\&. Do note that the braces and commas are mandatory, as the lack of white space characters\&. +.RE +.PP +\fBloadPercentage\fR={\fIcoefficient1\fR,\fIcoefficient2\fR,\fIcoefficient3\fR,\fIcoefficient4\fR} +.RS 4 +(Only for types KP625AP, Trust, Egys, BNT\-other\&.) A quad to convert the raw data to human readable load percentage reading\&. The default is type\-dependent and is given below\&. Do note that the braces and commas are mandatory, as the lack of white space characters\&. +.RE +.PP +\fBvalidationSequence\fR={{\fIindex1\fR,\fIvalue1\fR},{\fIindex2\fR,\fIvalue2\fR},{\fIindex3\fR,\fIvalue3\fR}} +.RS 4 +(Only for types KP625AP, Trust, Egys, BNT\-other\&.) 3 pairs to be used for validating the UPS by comparing bytes of the raw data with constant values\&. The default is type\-dependent and is given below\&. The braces and commas are mandatory, as the lack of white space characters\&. +.RE +.SH "DEFAULT VALUES FOR THE EXTRA ARGUMENTS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +linevoltage = 230 +manufacturer = PowerCom +modelname = Unknown +serialnumber = Unknown +type = Trust +.fi +.if n \{\ +.RE +.\} +.sp +The rest of the default values for the extra arguments are type\-dependent: +.SS "Trust" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 11 +methodOfFlowControl = dtr0rts1 +validationSequence = {{5,0},{7,0},{8,0}} +shutdownArguments = {{0,10},n} +frequency = {0\&.00020997,0\&.00020928} +loadPercentage = {6\&.1343,\-0\&.3808,4\&.3110,0\&.1811} +batteryPercentage = {5\&.0000,0\&.3268,\-825\&.00,4\&.5639,\-835\&.82} +voltage = {1\&.9216,\-0\&.0977,0\&.9545,0\&.0000} +.fi +.if n \{\ +.RE +.\} +.SS "KP625AP" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = dtr0rts1 +validationSequence = {{5,0x80},{7,0},{8,0}} +shutdownArguments = {{0,10},n} +frequency = {0\&.00020997,0\&.00020928} +loadPercentage = {6\&.1343,\-0\&.3808,4\&.3110,0\&.1811} +batteryPercentage = {5\&.0000,0\&.3268,\-825\&.00,4\&.5639,\-835\&.82} +voltage = {1\&.9216,\-0\&.0977,0\&.9545,0\&.0000} +.fi +.if n \{\ +.RE +.\} +.SS "Egys" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{5,0x80},{7,0},{8,0}} +shutdownArguments = {{0,10},n} +frequency = {0\&.00020997,0\&.00020928} +loadPercentage = {6\&.1343,\-0\&.3808,1\&.3333,0\&.6667} +batteryPercentage = {5\&.0000,0\&.3268,\-825\&.00,2\&.2105,\-355\&.37} +voltage = {1\&.9216,\-0\&.0977,0\&.9545,0\&.0000} +.fi +.if n \{\ +.RE +.\} +.SS "IMP" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{5,0xFF},{7,0},{8,0}} +shutdownArguments = {{1,30},y} +.fi +.if n \{\ +.RE +.\} +.SS "KIN" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{11,0x4b},{8,0},{8,0}} +shutdownArguments = {{1,30},y} +.fi +.if n \{\ +.RE +.\} +.SS "BNT" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{11,0x42},{8,0},{8,0}} +shutdownArguments = {{1,30},y} +.fi +.if n \{\ +.RE +.\} +.SS "BNT\-other" +.sp +.if n \{\ +.RS 4 +.\} +.nf +numOfBytesFromUPS = 16 +methodOfFlowControl = no_flow_control +validationSequence = {{8,0},{8,0},{8,0}} +shutdownArguments = {{1,30},y} +loadPercentage = {1\&.4474,0\&.0,0\&.8594,0\&.0} +batteryPercentage = {5\&.0000,0\&.3268,\-825\&.00,0\&.46511,0} +voltage = {1\&.9216,\-0\&.0977,0\&.82857,0\&.0000} +.fi +.if n \{\ +.RE +.\} +.SH "AUTHOR" +.sp +Peter Bieringer , Alexey Sidorov +.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/ diff --git a/docs/man/powercom.txt b/docs/man/powercom.txt new file mode 100644 index 0000000..020599d --- /dev/null +++ b/docs/man/powercom.txt @@ -0,0 +1,205 @@ +POWERCOM(8) +=========== + +NAME +---- + +powercom - UPS driver for Powercom/Trust/Advice UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +powercom driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports many similar kinds of UPS hardware. The most common +ones are the Trust 425/625, Powercom, and Advice Partner/King PR750. +Others using the same protocol may also work. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5] file: + +*linevoltage*='value':: +An integer specifying the mains voltage. It can't be auto detected. +Acceptable values are in the range of 110--120 or 220--240. The default +is '230'. + +*manufacturer*='name':: +Specify the manufacturer name, which also can't be auto detected. This is +a user defined string, so any name is acceptable. The default is +'PowerCom'. + +*modelname*='name':: +Specify the model name, which also can't be auto detected. This is a +user defined string, so any name is acceptable. The default is +'Unknown'. + +*serialnumber*='value':: +Like modelname above, but for the serial number. The default is +'Unknown'. + +*type*='name':: +The exact type of the communication protocol within the powercom family, +that will be used to communicate with the UPS. The type is named after +the first modelname that was coded with that protocol. The acceptable +names are 'KP625AP', 'Trust', 'Egys', 'KIN', 'BNT', 'IMP' and 'BNT-other'. The +default is 'Trust'. ++ +'BNT-other' is a special type for BNT 100-120V models. +For this type you can (I think must!) specify voltage, batteryPercentage, +loadPercentage and validationSequence. + +*numOfBytesFromUPS*='value':: +The number of bytes in a UPS frame. The default is type-dependent and +is given below. + +*methodOfFlowControl*='name':: +The method of serial communication flow control that is engaged by the +UPS. The default is type-dependent and is given below. Acceptable names +are 'dtr0rts1', 'dtr1' or 'no_flow_control'. + +*shutdownArguments*={{'minutes','seconds'},'whether_minutes_should_be_used'}:: +The minutes and seconds that the UPS should wait between receiving the +shutdown command and actually shutting off. The other argument should +be set to the character 'n' only when the minutes value should be +skipped and not sent to the UPS. The default is type-dependent and is +given below. The braces and commas are mandatory. Note that there should +be no whitespace characters. + +*voltage*={'coefficient1','coefficient2','coefficient3','coefficient4'}:: +(Only for types KP625AP, Trust, Egys, BNT-other.) +A quad that is used convert the raw data to a human-readable voltage +reading. The default is type-dependent and is given below. Do note that +the braces and commas are mandatory, as well as the lack of whitespace +characters. + +*frequency*={'coefficient1','coefficient2'}:: +(Only for types KP625AP, Trust, Egys.) +A pair to convert the raw data to a human-readable frequency reading. The +default is type-dependent and is given below. Do note that the braces +and commas are mandatory as well, as the lack of whitespace characters. + +*batteryPercentage*={'coefficient1','coefficient2','coefficient3','coefficient4','coefficient5'}:: +(Only for KP625AP, Trust, Egys, BNT-other.) +A 5 tuple to convert the raw data to a human-readable battery percentage +reading. The default is type-dependent and is given below. Do note that +the braces and commas are mandatory, as the lack of white space +characters. + +*loadPercentage*={'coefficient1','coefficient2','coefficient3','coefficient4'}:: +(Only for types KP625AP, Trust, Egys, BNT-other.) +A quad to convert the raw data to human readable load percentage +reading. The default is type-dependent and is given below. Do note that +the braces and commas are mandatory, as the lack of white space +characters. + +*validationSequence*={{'index1','value1'},{'index2','value2'},{'index3','value3'}}:: +(Only for types KP625AP, Trust, Egys, BNT-other.) +3 pairs to be used for validating the UPS by comparing bytes of the raw +data with constant values. The default is type-dependent and is given +below. The braces and commas are mandatory, as the lack of white space +characters. + +DEFAULT VALUES FOR THE EXTRA ARGUMENTS +-------------------------------------- + linevoltage = 230 + manufacturer = PowerCom + modelname = Unknown + serialnumber = Unknown + type = Trust + +The rest of the default values for the extra arguments are type-dependent: + +Trust +~~~~~ + numOfBytesFromUPS = 11 + methodOfFlowControl = dtr0rts1 + validationSequence = {{5,0},{7,0},{8,0}} + shutdownArguments = {{0,10},n} + frequency = {0.00020997,0.00020928} + loadPercentage = {6.1343,-0.3808,4.3110,0.1811} + batteryPercentage = {5.0000,0.3268,-825.00,4.5639,-835.82} + voltage = {1.9216,-0.0977,0.9545,0.0000} + +KP625AP +~~~~~~~ + numOfBytesFromUPS = 16 + methodOfFlowControl = dtr0rts1 + validationSequence = {{5,0x80},{7,0},{8,0}} + shutdownArguments = {{0,10},n} + frequency = {0.00020997,0.00020928} + loadPercentage = {6.1343,-0.3808,4.3110,0.1811} + batteryPercentage = {5.0000,0.3268,-825.00,4.5639,-835.82} + voltage = {1.9216,-0.0977,0.9545,0.0000} + + +Egys +~~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{5,0x80},{7,0},{8,0}} + shutdownArguments = {{0,10},n} + frequency = {0.00020997,0.00020928} + loadPercentage = {6.1343,-0.3808,1.3333,0.6667} + batteryPercentage = {5.0000,0.3268,-825.00,2.2105,-355.37} + voltage = {1.9216,-0.0977,0.9545,0.0000} + + +IMP +~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{5,0xFF},{7,0},{8,0}} + shutdownArguments = {{1,30},y} + + +KIN +~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{11,0x4b},{8,0},{8,0}} + shutdownArguments = {{1,30},y} + + +BNT +~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{11,0x42},{8,0},{8,0}} + shutdownArguments = {{1,30},y} + + +BNT-other +~~~~~~~~~ + + numOfBytesFromUPS = 16 + methodOfFlowControl = no_flow_control + validationSequence = {{8,0},{8,0},{8,0}} + shutdownArguments = {{1,30},y} + loadPercentage = {1.4474,0.0,0.8594,0.0} + batteryPercentage = {5.0000,0.3268,-825.00,0.46511,0} + voltage = {1.9216,-0.0977,0.82857,0.0000} + +AUTHOR +------ +Peter Bieringer , +Alexey Sidorov + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/powerman-pdu.8 b/docs/man/powerman-pdu.8 new file mode 100644 index 0000000..f8afcdd --- /dev/null +++ b/docs/man/powerman-pdu.8 @@ -0,0 +1,113 @@ +'\" t +.\" Title: powerman-pdu +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "POWERMAN\-PDU" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +powerman-pdu \- Driver for Powerman PDU +.SH "SYNOPSIS" +.sp +\fBpowerman\-pdu\fR \-h +.sp +\fBpowerman\-pdu\fR \-a \fIPDU_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the powerman\-pdu driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +This driver supports a wide range of PDUs through the Powerman project\&. +.sp +This includes various models from APC, Baytech, Cyclades, but also support IPMI and various blade management modules from HP, IBM and Sun\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver doesn\(cqt support any optional settings\&. +.SH "INSTALLATION" +.sp +This driver is not built by default\&. You can build it by using "configure \-\-with\-powerman=yes"\&. +.SH "UPS COMMANDS" +.sp +The following instant commands (see \fBupscmd\fR(8)) are available for each outlet of the PDU, with \fBX\fR standing for the outlet number: +.PP +\fBoutlet\&.X\&.load\&.on\fR +.RS 4 +Power on the outlet\&. +.RE +.PP +\fBoutlet\&.X\&.load\&.off\fR +.RS 4 +Power off the outlet\&. +.RE +.PP +\fBoutlet\&.X\&.load\&.cycle\fR +.RS 4 +Cycle the outlet (power off then power on, possibly with a delay)\&. +.RE +.SH "IMPLEMENTATION" +.sp +The hostname of the Powerman server is specified using the "port" value in \fBups\&.conf\fR, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[pdu] + driver = powerman\-pdu + port = host\&.example\&.com:port +.fi +.if n \{\ +.RE +.\} +.sp +The port used to reach \fIpowermand\fR is optional if the default port is used\&. +.SH "KNOWN ISSUES" +.sp +In the current NUT version (2\&.4\&.1), ups\&.status is still exposed, with the value "WAIT"\&. Some other values from the ups collection are also exposed\&. +.SH "AUTHOR" +.sp +Arnaud Quette +.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/ +.sp +The PowerMan home page: http://powerman\&.sourceforge\&.net/ diff --git a/docs/man/powerman-pdu.txt b/docs/man/powerman-pdu.txt new file mode 100644 index 0000000..a7b914d --- /dev/null +++ b/docs/man/powerman-pdu.txt @@ -0,0 +1,87 @@ +POWERMAN-PDU(8) +=============== + +NAME +---- + +powerman-pdu - Driver for Powerman PDU + +SYNOPSIS +-------- + +*powerman-pdu* -h + +*powerman-pdu* -a 'PDU_NAME' ['OPTIONS'] + +NOTE: This man page only documents the hardware-specific features of the +powerman-pdu driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +This driver supports a wide range of PDUs through the Powerman project. + +This includes various models from APC, Baytech, Cyclades, but also support +IPMI and various blade management modules from HP, IBM and Sun. + +EXTRA ARGUMENTS +--------------- + +This driver doesn't support any optional settings. + +INSTALLATION +------------ + +This driver is not built by default. You can build it by using +"configure --with-powerman=yes". + +UPS COMMANDS +------------ +The following instant commands (see linkman:upscmd[8]) are available for each +outlet of the PDU, with *X* standing for the outlet number: + +*outlet.X.load.on*:: + +Power on the outlet. + +*outlet.X.load.off*:: + +Power off the outlet. + +*outlet.X.load.cycle*:: + +Cycle the outlet (power off then power on, possibly with a delay). + +IMPLEMENTATION +-------------- +The hostname of the Powerman server is specified using the "port" value in +*ups.conf*, i.e.: + + [pdu] + driver = powerman-pdu + port = host.example.com:port + +The port used to reach 'powermand' is optional if the default port is used. + +KNOWN ISSUES +------------ +In the current NUT version (2.4.1), ups.status is still exposed, with the value +"WAIT". Some other values from the +ups collection are also exposed. + +AUTHOR +------ +Arnaud Quette + +SEE ALSO +-------- +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + +The PowerMan home page: http://powerman.sourceforge.net/ diff --git a/docs/man/powerpanel.8 b/docs/man/powerpanel.8 new file mode 100644 index 0000000..ddfe8b3 --- /dev/null +++ b/docs/man/powerpanel.8 @@ -0,0 +1,172 @@ +'\" t +.\" Title: powerpanel +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "POWERPANEL" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +powerpanel \- Driver for PowerPanel Plus compatible UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the powerpanel driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports CyberPower BC1200, PR2200 and many other similar devices, both for the text and binary protocols\&. The driver will autodetect which protocol is used\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in \fBups.conf\fR(5): +.PP +\fBprotocol=\fR[\fItext,binary\fR] +.RS 4 +Override the default autodetection of the protocol\&. +.RE +.PP +\fBmanufacturer=\fR\fIvalue\fR +.RS 4 +If you don\(cqt like the autodetected value, you can override this by setting it here\&. +.RE +.PP +\fBmodel=\fR\fIvalue\fR +.RS 4 +Like manufacturer above\&. +.RE +.PP +\fBserial=\fR\fIvalue\fR +.RS 4 +Like manufacturer above\&. +.RE +.PP +\fBondelay=\fR\fIvalue\fR +.RS 4 +Time to wait before switching on the UPS (1 \- 9999 minutes, 0=indefinite)\&. Only available with the text protocol driver (see +Support Status)\&. +.RE +.PP +\fBoffdelay=\fR\fIvalue\fR +.RS 4 +Time to wait before shutting down the UPS (6 \- 600 seconds)\&. Values below 60 seconds will be truncated to 6 seconds intervals, values above 60 seconds to 60 seconds intervals\&. Only available with the text protocol driver (see +Support Status)\&. +.RE +.SH "VARIABLES" +.sp +Depending on the type of your UPS unit, some of the following variables may be changed with \fBupsrw\fR(8)\&. If the driver can\(cqt read a variable from the UPS, it will not be made available\&. +.PP +\fBinput\&.transfer\&.high\fR +.RS 4 +writable: high transfer voltage point in V +.RE +.PP +\fBinput\&.transfer\&.low\fR +.RS 4 +writable: low transfer voltage point in V +.RE +.PP +\fBbattery\&.charge\&.low\fR +.RS 4 +writable: remaining battery charge percentage for low battery warning +.RE +.PP +\fBoutput\&.voltage\&.nominal\fR +.RS 4 +writable: nominal output voltage in V +.RE +.PP +\fBups\&.start\&.battery\fR +.RS 4 +writable: allow cold start from battery +.RE +.SH "COMMANDS" +.sp +Depending on the type of your UPS unit, some of the following commands may be available\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.battery\&.start\&.quick, test\&.battery\&.stop +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +beeper\&.enable, beeper\&.disable, beeper\&.toggle +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.return, shutdown\&.reboot, shutdown\&.stayoff +.RE +.sp +On many devices, these commands are unreliable, so before using them you must verify that these work as expected (see Shutdown Issues)\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.stop +.RE +.SH "SUPPORT STATUS" +.sp +Vendor support is absent for this driver, so if you need some features that are currently not available, provide ample documentation on what the driver should sent to the UPS in order to make this work\&. If more information would be available on the binary protocol, it would probably be possible to make \fIondelay\fR and \fIoffdelay\fR configurable\&. So far, nobody has taken the time to investigate what we should tell the UPS to make this work, and CyberPower isn\(cqt willing to share this with us\&. +.SH "SHUTDOWN ISSUES" +.sp +If the \fBshutdown\&.return\fR command on your UPS doesn\(cqt seem to work, chances are that your UPS is an older model\&. Try a couple of different settings for \fIoffdelay\fR\&. If no value in the range 6\&.\&.600 works, your UPS likely doesn\(cqt support this\&. In order to get the expected behaviour, it requires \fBshutdown\&.stayoff\fR (when on battery) and \fBshutdown\&.reboot\fR (when on mains)\&. The driver will automatically fallback to these commands if \fBshutdown\&.return\fR fails, and tries to detect which one should be used when called with the \fI\-k\fR option (or through \fBupsdrvctl shutdown\fR)\&. +.sp +This isn\(cqt bullet\-proof, however, and you should be prepared that the power will either not be shutdown or that it doesn\(cqt return when the power comes back\&. All models supported by the binary protocol and many supported through the text protocol are affected by this\&. +.SH "KNOWN PROBLEMS" +.sp +The CyberPower OP series don\(cqt offer direct voltage, charge, frequency and temperature readings\&. Instead, they will return a binary value that needs conversion to the actual value\&. +.sp +The exact conversion needed is unknown at the time of this writing, hence an estimation was made based om readings from actual devices\&. This may (probably will) be off, possibly a lot\&. Unless you can tell us the exact mapping between values from the UPS and actual readings, don\(cqt bother to complain\&. We\(cqve done the best we can based on the limited information available\&. Remember, a UPS isn\(cqt a measuring instrument\&. +.SH "AUTHORS" +.sp +Arjen de Korte , Doug Reynolds +.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/ diff --git a/man/powerpanel.8 b/docs/man/powerpanel.txt similarity index 53% rename from man/powerpanel.8 rename to docs/man/powerpanel.txt index bc88174..6ba2b6e 100644 --- a/man/powerpanel.8 +++ b/docs/man/powerpanel.txt @@ -1,103 +1,115 @@ -.TH POWERPANEL 8 "Tue Dec 23 2008" "" "Network UPS Tools (NUT)" -.SH NAME -powerpanel \- Driver for PowerPanel Plus compatible UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -powerpanel driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +POWERPANEL(8) +============= -.SH SUPPORTED HARDWARE +NAME +---- + +powerpanel - Driver for PowerPanel Plus compatible UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +powerpanel driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ This driver supports CyberPower BC1200, PR2200 and many other similar devices, both for the text and binary protocols. The driver will autodetect which protocol is used. -.SH EXTRA ARGUMENTS -This driver supports the following optional settings in \fBups.conf\fR(5): +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in linkman:ups.conf[5]: -.IP "protocol=\fI[text,binary]\fR" +*protocol=*['text,binary']:: Override the default autodetection of the protocol. -.IP "manufacturer=\fIvalue\fR" +*manufacturer=*'value':: If you don't like the autodetected value, you can override this by setting it here. -.IP "model=\fIvalue\fR" +*model=*'value':: Like manufacturer above. -.IP "serial=\fIvalue\fR" +*serial=*'value':: Like manufacturer above. -.IP "ondelay=\fIvalue\fR" -Time to wait before switching on the UPS (1 - 9999 minutes, 0 indefinite). -Only available with the text protocol driver (see \fBSUPPORT STATUS\fR). +*ondelay=*'value':: +Time to wait before switching on the UPS (1 - 9999 minutes, 0=indefinite). +Only available with the text protocol driver (see <<_support_status,Support Status>>). -.IP "offdelay=\fIvalue\fR" +*offdelay=*'value':: Time to wait before shutting down the UPS (6 - 600 seconds). Values below 60 seconds will be truncated to 6 seconds intervals, values above 60 seconds to 60 seconds intervals. Only available with the text protocol driver (see -\fBSUPPORT STATUS\fR). +<<_support_status,Support Status>>). -.SH VARIABLES +VARIABLES +--------- Depending on the type of your UPS unit, some of the following variables may -be changed. If the driver can't read a variable from the UPS, it will not be -made available. -.TP 12 -.B input.transfer.high -writable: high transfer voltage point in V -.TP -.B input.transfer.low -writable: low transfer voltage point in V -.TP -.B battery.charge.low -writable: remaining battery charge percentage for low battery warning -.TP -.B output.voltage.nominal -writable: nominal output voltage in V -.TP -.B ups.start.battery -writable: allow cold start from battery -.PD +be changed with linkman:upsrw[8]. If the driver can't read a variable from the +UPS, it will not be made available. -.SH COMMANDS +*input.transfer.high*:: +writable: high transfer voltage point in V + +*input.transfer.low*:: +writable: low transfer voltage point in V + +*battery.charge.low*:: +writable: remaining battery charge percentage for low battery warning + +*output.voltage.nominal*:: +writable: nominal output voltage in V + +*ups.start.battery*:: +writable: allow cold start from battery + +COMMANDS +-------- Depending on the type of your UPS unit, some of the following commands may be available. -.TP 12 -.B test.battery.start.quick, test.battery.stop -.TP -.B beeper.enable, beeper.disable, beeper.toggle -.TP -.B shutdown.return, shutdown.reboot, shutdown.stayoff -On many devices, these commands are unreliable, so before using them you -must verify that these work as expected (see \fBSHUTDOWN ISSUES\fR). -.TP -.B shutdown.stop -.PD -.SH SUPPORT STATUS + * test.battery.start.quick, test.battery.stop + + * beeper.enable, beeper.disable, beeper.toggle + + * shutdown.return, shutdown.reboot, shutdown.stayoff + +On many devices, these commands are unreliable, so before using them you +must verify that these work as expected (see <<_shutdown_issues,Shutdown Issues>>). + + * shutdown.stop + +SUPPORT STATUS +-------------- Vendor support is absent for this driver, so if you need some features that are currently not available, provide ample documentation on what the driver should sent to the UPS in order to make this work. If more information would be available on the binary protocol, it would probably be possible to -make ondelay and offdelay configurable. So far, nobody has taken the time -to investigate what we should tell the UPS to make this work and CyberPower +make 'ondelay' and 'offdelay' configurable. So far, nobody has taken the time +to investigate what we should tell the UPS to make this work, and CyberPower isn't willing to share this with us. -.SH SHUTDOWN ISSUES -If the \fBshutdown.return\fR command on your UPS doesn't seem to work, -chances are that your UPS is of an older model. Try a couple of different -settings for \fIoffdelay\fR. If no value in the range 6..600 works, your +SHUTDOWN ISSUES +--------------- +If the *shutdown.return* command on your UPS doesn't seem to work, +chances are that your UPS is an older model. Try a couple of different +settings for 'offdelay'. If no value in the range 6..600 works, your UPS likely doesn't support this. In order to get the expected behaviour, -it requires \fBshutdown.stayoff\fR (when on battery) and \fBshutdown.reboot\fR +it requires *shutdown.stayoff* (when on battery) and *shutdown.reboot* (when on mains). The driver will automatically fallback to these commands if -\fBshutdown.return\fR fails and tries to detect which one should be used when -called with the '\(hyk' option (or through \fBupsdrvctl shutdown\fR). +*shutdown.return* fails, and tries to detect which one should be used when +called with the '-k' option (or through *upsdrvctl shutdown*). -This isn't bullet proof however and you should be prepared that the +This isn't bullet-proof, however, and you should be prepared that the power will either not be shutdown or that it doesn't return when the power comes back. All models supported by the binary protocol and many supported through the text protocol are affected by this. -.SH KNOWN PROBLEMS +KNOWN PROBLEMS +-------------- The CyberPower OP series don't offer direct voltage, charge, frequency and temperature readings. Instead, they will return a binary value that needs conversion to the actual value. @@ -110,13 +122,17 @@ don't bother to complain. We've done the best we can based on the limited information available. Remember, a UPS isn't a measuring instrument. -.SH AUTHORS -Arjen de Korte , Doug Reynolds +AUTHORS +------- +Arjen de Korte , Doug Reynolds -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/rhino.8 b/docs/man/rhino.8 new file mode 100644 index 0000000..3030456 --- /dev/null +++ b/docs/man/rhino.8 @@ -0,0 +1,154 @@ +'\" t +.\" Title: rhino +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "RHINO" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +rhino \- Driver for Brazilian Microsol RHINO UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the rhino driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver has been tested with : +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Rhino 6000 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Rhino 7500 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Rhino 10000 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Rhino 20000 VA +.RE +.sp +All Rhino models are sinusoidal on\-line\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver support the following extra optional settings in \fBups.conf\fR(5): +.sp +\fBbattext = n\fR \- (default = 0, no extra battery, where n = Ampere*hour ) +.SH "COMMANDS" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +load\&.on \- Turn on the load immediately +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +load\&.off \- Turn off the load immediately +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +bypass\&.start \- Put the UPS in bypass mode +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +bypass\&.stop \- Put the UPS out of bypass mode +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.stayoff \- Shut down in 3 minutes and do not return +.RE +.SH "AUTHOR" +.sp +Silvino B\&. Magalhães +.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/ diff --git a/docs/man/rhino.txt b/docs/man/rhino.txt new file mode 100644 index 0000000..e4638e2 --- /dev/null +++ b/docs/man/rhino.txt @@ -0,0 +1,59 @@ +RHINO(8) +======== + +NAME +---- +rhino - Driver for Brazilian Microsol RHINO UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +rhino driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver has been tested with : + + * Rhino 6000 VA + * Rhino 7500 VA + * Rhino 10000 VA + * Rhino 20000 VA + +All Rhino models are sinusoidal on-line. + +EXTRA ARGUMENTS +--------------- + +This driver support the following extra optional settings in +linkman:ups.conf[5]: + +*battext = n* - (default = 0, no extra battery, where n = Ampere*hour ) + +COMMANDS +-------- + + * load.on - Turn on the load immediately + + * load.off - Turn off the load immediately + + * bypass.start - Put the UPS in bypass mode + + * bypass.stop - Put the UPS out of bypass mode + + * shutdown.stayoff - Shut down in 3 minutes and do not return + +AUTHOR +------ +Silvino B. Magalhães + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/richcomm_usb.8 b/docs/man/richcomm_usb.8 new file mode 100644 index 0000000..22c29a3 --- /dev/null +++ b/docs/man/richcomm_usb.8 @@ -0,0 +1,55 @@ +'\" t +.\" Title: richcomm_usb +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "RICHCOMM_USB" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +richcomm_usb \- Driver UPS equipment using Richcomm dry\-contact to USB solution +.SH "NOTE" +.sp +This man page only documents the specific features of the richcomm_usb driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The Richcomm dry\-contact to USB solution is a generic interface that is used to upgrade an existing (RS\-232) contact closure UPS interface to USB\&. As such, all the limitations of the underlying contact closure interface apply\&. This means that you will only get the essentials in ups\&.status: OL, OB, and LB\&. See also \fBgenericups\fR(8)\&. +.SH "BUGS" +.sp +Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using slave \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. +.sp +The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command\&. +.SH "AUTHORS" +.sp +Peter van Valderen , Dirk Teurlings +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "The generic serial driver:" +.sp +\fBgenericups\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/richcomm_usb.txt b/docs/man/richcomm_usb.txt new file mode 100644 index 0000000..3f52861 --- /dev/null +++ b/docs/man/richcomm_usb.txt @@ -0,0 +1,50 @@ +RICHCOMM_USB(8) +=============== + +NAME +---- +richcomm_usb - Driver UPS equipment using Richcomm dry-contact to USB +solution + +NOTE +---- +This man page only documents the specific features of the richcomm_usb +driver. For information about the core driver, see linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The Richcomm dry-contact to USB solution is a generic interface that is +used to upgrade an existing (RS-232) contact closure UPS interface to USB. +As such, all the limitations of the underlying contact closure interface +apply. This means that you will only get the essentials in ups.status: OL, +OB, and LB. See also linkman:genericups[8]. + +BUGS +---- +Most contact-closure UPSes will not power down the load if the line power +is present. This can create a race when using slave linkman:upsmon[8] +systems. See the linkman:upsmon[8] man page for more information. + +The solution to both of these problems is to upgrade to a smart protocol +UPS of some kind that allows detection and proper load cycling on command. + +AUTHORS +------- + +Peter van Valderen , +Dirk Teurlings + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +The generic serial driver: +~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:genericups[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/safenet.8 b/docs/man/safenet.8 new file mode 100644 index 0000000..a3ca1c8 --- /dev/null +++ b/docs/man/safenet.8 @@ -0,0 +1,135 @@ +'\" t +.\" Title: safenet +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "SAFENET" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +safenet \- Driver for SafeNet compatible UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the safenet driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports UPS equipment which can be controlled via SafeNet v1\&.0 for Windows (serial interface only)\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file: +.PP +\fBmanufacturer=\fR\fIvalue\fR +.RS 4 +Autodetection of this parameter is not possible yet (and it probably never will be)\&. Therefore, this user\-defined string accepts any name\&. The default is +\fIunknown\fR\&. +.RE +.PP +\fBmodelname=\fR\fIvalue\fR +.RS 4 +Like manufacturer above\&. The default is +\fIunknown\fR\&. +.RE +.PP +\fBserialnumber=\fR\fIvalue\fR +.RS 4 +Like manufacturer above\&. The default is +\fIunknown\fR\&. +.RE +.PP +\fBondelay=\fR\fIvalue\fR +.RS 4 +Time to wait before switching on the UPS (minutes)\&. Defaults to 1 minute\&. +.RE +.PP +\fBoffdelay=\fR\fIvalue\fR +.RS 4 +Time to wait before shutting down the UPS (seconds)\&. Defaults to 30 seconds\&. +.RE +.SH "UPSCMD" +.sp +This driver supports some instant commands (see \fBupscmd\fR(8)): +.PP +\fBtest\&.battery\&.start\fR +.RS 4 +Start UPS self test +.RE +.PP +\fBtest\&.battery\&.stop\fR +.RS 4 +Cancel UPS self test +.RE +.PP +\fBtest\&.failure\&.start\fR +.RS 4 +Start simulated power failure +.RE +.PP +\fBtest\&.failure\&.stop\fR +.RS 4 +Cancel simulated power failure +.RE +.PP +\fBbeeper\&.enable\fR +.RS 4 +Enable the UPS beeper +.RE +.PP +\fBbeeper\&.mute\fR +.RS 4 +Temporarily mute the UPS beeper +.RE +.PP +\fBbeeper\&.toggle\fR +.RS 4 +Toggle the UPS beeper +.RE +.PP +\fBshutdown\&.return\fR +.RS 4 +Turn off the load and wait for the power to return\&. Uses the timer defined by +\fBoffdelay\fR\&. +.RE +.PP +\fBshutdown\&.reboot\fR +.RS 4 +Turn off the load and return\&. Uses the timers defined by +\fBoffdelay\fR +and +\fBondelay\fR\&. +.RE +.SH "KNOWN PROBLEMS" +.sp +If you run the \fBshutdown\&.return\fR command with mains present, the output may stay on or switch off and not back on again\&. The \fBshutdown\&.reboot\fR command will unconditionally switch on the load again (with or without mains present)\&. +.sp +If the driver is called with the \fI\-k\fR option (or through \fBupsdrvctl shutdown\fR) it tries to detect which command should be used in an attempt to stay off until mains is present again or to cycle the output if the power returned in the mean time\&. This isn\(cqt bullet\-proof, and you should be prepared that the power will either not be shutdown, or that it doesn\(cqt return when the power comes back\&. +.SH "AUTHOR" +.sp +Arjen de Korte +.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/ diff --git a/docs/man/safenet.txt b/docs/man/safenet.txt new file mode 100644 index 0000000..f6f5a5a --- /dev/null +++ b/docs/man/safenet.txt @@ -0,0 +1,101 @@ +SAFENET(8) +========== + +NAME +---- +safenet - Driver for SafeNet compatible UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +safenet driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports UPS equipment which can be controlled via +SafeNet v1.0 for Windows (serial interface only). + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5] file: + +*manufacturer=*'value':: +Autodetection of this parameter is not possible yet (and it probably +never will be). Therefore, this user-defined string accepts any name. The +default is 'unknown'. + +*modelname=*'value':: +Like manufacturer above. The default is 'unknown'. + +*serialnumber=*'value':: +Like manufacturer above. The default is 'unknown'. + +*ondelay=*'value':: +Time to wait before switching on the UPS (minutes). Defaults to 1 minute. + +*offdelay=*'value':: +Time to wait before shutting down the UPS (seconds). Defaults to 30 seconds. + +UPSCMD +------ +This driver supports some instant commands (see linkman:upscmd[8]): + +*test.battery.start*:: +Start UPS self test + +*test.battery.stop*:: +Cancel UPS self test + +*test.failure.start*:: +Start simulated power failure + +*test.failure.stop*:: +Cancel simulated power failure + +*beeper.enable*:: +Enable the UPS beeper + +*beeper.mute*:: +Temporarily mute the UPS beeper + +*beeper.toggle*:: +Toggle the UPS beeper + +*shutdown.return*:: +Turn off the load and wait for the power to return. Uses the timer +defined by *offdelay*. + +*shutdown.reboot*:: +Turn off the load and return. Uses the timers defined by *offdelay* +and *ondelay*. + +KNOWN PROBLEMS +-------------- +If you run the *shutdown.return* command with mains present, the output +may stay on or switch off and not back on again. The *shutdown.reboot* +command will unconditionally switch on the load again (with or without mains +present). + +If the driver is called with the '-k' option (or through *upsdrvctl +shutdown*) it tries to detect which command should be used in an attempt +to stay off until mains is present again or to cycle the output if the +power returned in the mean time. This isn't bullet-proof, and you should be +prepared that the power will either not be shutdown, or that it doesn't +return when the power comes back. + +AUTHOR +------ +Arjen de Korte + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/skel.txt b/docs/man/skel.txt new file mode 100644 index 0000000..f98cd2c --- /dev/null +++ b/docs/man/skel.txt @@ -0,0 +1,111 @@ +SKEL(8) +======= + +NAME +---- +skel - skeleton driver man page + +NOTE +---- +This man page only documents the hardware-specific features of the +*skel* driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +////////////////////////////////////////// +The following lines are comments. + +When copying this man page for your new driver, be sure to replace all +occurrances of "skel" and "SKEL" by your actual driver name. + +If you have AsciiDoc installed, you can test the formatting of your man page by +running: + asciidoc --backend=xhtml11 -o skel.html skel.txt + +After writing a man page, be sure to add it to the appropriate variable in +Makefile.am in this directory. + +In the "NAME" section, you must follow the format above, including separating +the driver name from its description by "-". This is to ensure that the +apropos(8) database is properly rebuilt. +////////////////////////////////////////// + +SUPPORTED HARDWARE +------------------ +*skel* supports ... + +////////////////////////////////////////// +If the driver only works with certain cables, this is a good place to +mention it: + +CABLING +------- + +////////////////////////////////////////// + +EXTRA ARGUMENTS +This driver also supports the following optional settings: + +*option1*='num':: +Set the value of ... to 'num'. Contrast with *option2*. + +*option2*='string':: +Some other option. + +////////////////////////////////////////// +Optional: list supported instant commands here: + +INSTANT COMMANDS +---------------- + +*instcmd1*:: +Command 1. +////////////////////////////////////////// + +////////////////////////////////////////// +Optional: use INSTALLATION if you need special parameters to the configure +script, or additional libraries as prerequisites. + +INSTALLATION +------------ + +////////////////////////////////////////// + +////////////////////////////////////////// +You may leave this as "none known at this time", or describe any trouble +encountered when implementing the protocol for your UPS. + +KNOWN ISSUES AND BUGS +--------------------- +*Got "EPERM: Operation not permitted" upon driver startup*:: + +You have forgotten to install the udev files, as explained +in the INSTALLATION section above. Don't forget to restart +udev so that it applies these changes. +////////////////////////////////////////// + +////////////////////////////////////////// +An email address is not strictly necessary, but you may wish to provide +some form of contact information so that users can report bugs. +////////////////////////////////////////// + +AUTHORS +------- +J Random User + +////////////////////////////////////////// +If this driver is ever made obsolete by another driver, mention the +replacement driver in the "SEE ALSO" section. You may also wish to point +the user to other drivers which may better support their hardware, if there +is ambiguity based on the driver name. +////////////////////////////////////////// + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/snmp-ups.8 b/docs/man/snmp-ups.8 new file mode 100644 index 0000000..5345521 --- /dev/null +++ b/docs/man/snmp-ups.8 @@ -0,0 +1,205 @@ +'\" t +.\" Title: snmp-ups +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "SNMP\-UPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +snmp-ups \- Multi\-MIB Driver for SNMP UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the snmp\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The snmp\-ups driver automatically detects and supports a wide range of devices by loading various MIBS: \fBietf\fR:: UPS that is RFC 1628 (UPS MIB) compliant, e\&.g\&. MGE UPS SYSTEMS, Liebert, perhaps others (default) +.PP +\fBmge\fR +.RS 4 +MGE UPS SYSTEMS and MGE Office Protection Systems devices with SNMP cards (ref 66062, 66045, 66074 and 66244) +.RE +.PP +\fBapcc\fR +.RS 4 +APC AP9606 APC Web/SNMP management card, perhaps others +.RE +.PP +\fBnetvision\fR +.RS 4 +Socomec Sicon UPS with Netvision Web/SNMP management card/external box +.RE +.PP +\fBpw\fR +.RS 4 +Powerware devices with ConnectUPS SNMP cards +.RE +.PP +\fBaphel_genesisII\fR +.RS 4 +Eaton Powerware ePDU Monitored +.RE +.PP +\fBaphel_revelation\fR +.RS 4 +Eaton Powerware ePDU Managed +.RE +.PP +\fBraritan\fR +.RS 4 +Various Raritan PDUs +.RE +.PP +\fBbaytech\fR +.RS 4 +Various BayTech PDUs +.RE +.PP +\fBcpqpower\fR +.RS 4 +HP/Compaq AF401A management card, perhaps others +.RE +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBmibs\fR=\fIname\fR +.RS 4 +Set MIB compliance (default=auto, allowed entries: refer to the above SUPPORTED HARDWARE)\&. With "auto", the driver will try a select set of SNMP objects until it finds one that the device responds to\&. +.RE +.PP +\fBcommunity\fR=\fIname\fR +.RS 4 +Set community name (default = public)\&. Note that you require a RW community name to change UPS settings (as for a powerdown)\&. +.RE +.PP +\fBsnmp_version\fR=\fIversion\fR +.RS 4 +Set SNMP version (default = v1, the other allowed value is v2c) +.RE +.PP +\fBpollfreq\fR=\fIvalue\fR +.RS 4 +Set polling frequency in seconds, to reduce network flow (default=30) +.RE +.PP +\fBnotransferoids\fR +.RS 4 +Disable the monitoring of the low and high voltage transfer OIDs in the hardware\&. This will remove input\&.transfer\&.low and input\&.transfer\&.high from the list of variables\&. This should only be used on APCC Symmetra equipment which has strangeness in the three\-phase power reporting\&. +.RE +.PP +\fBsecLevel\fR=\fIvalue\fR +.RS 4 +Set the securityLevel used for SNMPv3 messages (default=noAuthNoPriv, allowed: authNoPriv,authPriv) +.RE +.PP +\fBsecName\fR=\fIvalue\fR +.RS 4 +Set the securityName used for authenticated SNMPv3 messages (no default) +.RE +.PP +\fBauthPassword\fR=\fIvalue\fR +.RS 4 +Set the authentication pass phrase used for authenticated SNMPv3 messages (no default) +.RE +.PP +\fBprivPassword\fR=\fIvalue\fR +.RS 4 +Set the privacy pass phrase used for encrypted SNMPv3 messages (no default) +.RE +.PP +\fBauthProtocol\fR=\fIvalue\fR +.RS 4 +Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 messages (default=MD5) +.RE +.PP +\fBprivProtocol\fR=\fIvalue\fR +.RS 4 +Set the privacy protocol (DES or AES) used for encrypted SNMPv3 messages (default=DES) +.RE +.SH "REQUIREMENTS" +.sp +You will need to install the Net\-SNMP package from http://www\&.net\-snmp\&.org/ before building this driver\&. +.sp +SNMP v3 also requires OpenSSL support from http://www\&.openssl\&.org\&. +.SH "LIMITATION" +.SS "Shutdown" +.sp +This driver does not provide a proper upsdrv_shutdown() function\&. There probably never will be one, since at the time this script should run (near the end of the system halt script), there will be no network capabilities anymore\&. Probably the only way to shutdown an SNMP UPS is by sending it a shutdown with delay command through \fBupscmd\fR(8) and hope for the best that the system will have finished shutting down before the power is cut\&. +.SH "INSTALLATION" +.sp +This driver is only built if the Net\-SNMP development files are present on the system\&. You can also force it to be built by using "configure \-\-with\-snmp=yes" before calling make\&. +.SH "IMPLEMENTATION" +.sp +The hostname of the UPS is specified with the "port" value in ups\&.conf, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[snmpv1] + driver = snmp\-ups + port = snmp\-ups\&.example\&.com + community = public + snmp_version = v1 + mibs = ietf + pollfreq = 15 + desc = "Example SNMP v1 device" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[snmpv3] + driver = snmp\-ups + port = 166\&.99\&.224\&.132 + mibs = mge + secLevel = authPriv + secName = mysecurityname + authPassword = myauthenticationpassphrase + privPassword = myprivatepassphrase + desc = "Example SNMP v3 device, with the highest security level" +.fi +.if n \{\ +.RE +.\} +.SH "AUTHORS" +.sp +Arnaud Quette, Dmitry Frolov +.sp +Sponsored by Eaton http://www\&.eaton\&.com and originally by MGE UPS SYSTEMS http://www\&.mgeups\&.com/ +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "NUT SNMP Protocols Library" +.sp +Available at: http://www\&.networkupstools\&.org/protocols/snmp/ +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/snmp-ups.txt b/docs/man/snmp-ups.txt new file mode 100644 index 0000000..87b850d --- /dev/null +++ b/docs/man/snmp-ups.txt @@ -0,0 +1,167 @@ +snmp-ups(8) +=========== + +NAME +---- + +snmp-ups - Multi-MIB Driver for SNMP UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +snmp-ups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +The snmp-ups driver automatically detects and supports a wide range of devices by loading various MIBS: +*ietf*:: +UPS that is RFC 1628 (UPS MIB) compliant, e.g. MGE UPS SYSTEMS, Liebert, perhaps others (default) + +*mge*:: +MGE UPS SYSTEMS and MGE Office Protection Systems devices with SNMP cards (ref 66062, 66045, 66074 and 66244) + +*apcc*:: +APC AP9606 APC Web/SNMP management card, perhaps others + +*netvision*:: +Socomec Sicon UPS with Netvision Web/SNMP management card/external box + +*pw*:: +Powerware devices with ConnectUPS SNMP cards + +*aphel_genesisII*:: +Eaton Powerware ePDU Monitored + +*aphel_revelation*:: +Eaton Powerware ePDU Managed + +*raritan*:: +Various Raritan PDUs + +*baytech*:: +Various BayTech PDUs + +*cpqpower*:: +HP/Compaq AF401A management card, perhaps others + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*mibs*='name':: +Set MIB compliance (default=auto, allowed entries: refer to the above SUPPORTED HARDWARE). +With "auto", the driver will try a select set of SNMP objects until it finds +one that the device responds to. + +*community*='name':: +Set community name (default = public). +Note that you require a RW community name to change UPS settings (as for a powerdown). + +*snmp_version*='version':: +Set SNMP version (default = v1, the other allowed value is v2c) + +*pollfreq*='value':: +Set polling frequency in seconds, to reduce network flow (default=30) + +*notransferoids*:: +Disable the monitoring of the low and high voltage transfer OIDs in +the hardware. This will remove input.transfer.low and input.transfer.high +from the list of variables. This should only be used on APCC Symmetra +equipment which has strangeness in the three-phase power reporting. + +*secLevel*='value':: +Set the securityLevel used for SNMPv3 messages (default=noAuthNoPriv, +allowed: authNoPriv,authPriv) + +*secName*='value':: +Set the securityName used for authenticated SNMPv3 messages (no default) + +*authPassword*='value':: +Set the authentication pass phrase used for authenticated SNMPv3 messages +(no default) + +*privPassword*='value':: +Set the privacy pass phrase used for encrypted SNMPv3 messages (no default) + +*authProtocol*='value':: +Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 +messages (default=MD5) + +*privProtocol*='value':: +Set the privacy protocol (DES or AES) used for encrypted SNMPv3 messages +(default=DES) + +REQUIREMENTS +------------ +You will need to install the Net-SNMP package from +http://www.net-snmp.org/ before building this driver. + +SNMP v3 also requires OpenSSL support from http://www.openssl.org. + +LIMITATION +---------- +Shutdown +~~~~~~~~ + +This driver does not provide a proper upsdrv_shutdown() function. There probably +never will be one, since at the time this script should run (near the end of +the system halt script), there will be no network capabilities anymore. +Probably the only way to shutdown an SNMP UPS is by sending it a shutdown +with delay command through linkman:upscmd[8] and hope for the best that the +system will have finished shutting down before the power is cut. + +INSTALLATION +------------ +This driver is only built if the Net-SNMP development files are present on the system. +You can also force it to be built by using "configure --with-snmp=yes" before calling make. + +IMPLEMENTATION +-------------- +The hostname of the UPS is specified with the "port" value in +`ups.conf`, i.e.: + + [snmpv1] + driver = snmp-ups + port = snmp-ups.example.com + community = public + snmp_version = v1 + mibs = ietf + pollfreq = 15 + desc = "Example SNMP v1 device" + + [snmpv3] + driver = snmp-ups + port = 166.99.224.132 + mibs = mge + secLevel = authPriv + secName = mysecurityname + authPassword = myauthenticationpassphrase + privPassword = myprivatepassphrase + desc = "Example SNMP v3 device, with the highest security level" + +AUTHORS +------- +Arnaud Quette, Dmitry Frolov + +Sponsored by Eaton +and originally by MGE UPS SYSTEMS + + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +NUT SNMP Protocols Library +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Available at: http://www.networkupstools.org/protocols/snmp/ + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/solis.8 b/docs/man/solis.8 new file mode 100644 index 0000000..6478e12 --- /dev/null +++ b/docs/man/solis.8 @@ -0,0 +1,123 @@ +'\" t +.\" Title: solis +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "SOLIS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +solis \- Driver for Brazilian Microsol SOLIS UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the solis driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver has been tested with : +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solis 1000 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solis 1500 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solis 2000 VA +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solis 3000 VA +.RE +.sp +All Solis models are sinusoidal on\-line +.SH "EXTRA ARGUMENTS" +.sp +This driver support the following extra optional settings in the \fBups.conf\fR(5)\&. +.sp +\fBbattext = n\fR \- (default = 0, no extra battery, where n = Ampere*hour ) +.sp +\fBprgshut = 1\fR \- (default = 0, no programable shutdown ) +.SH "COMMANDS" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.return \- Shut down in \&.3 minutes and restart in \&.3 minutes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.stayoff \- Shut down in \&.3 minutes and do not return +.RE +.SH "AUTHOR" +.sp +Silvino B\&. Magalhães +.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/ diff --git a/docs/man/solis.txt b/docs/man/solis.txt new file mode 100644 index 0000000..37bc48d --- /dev/null +++ b/docs/man/solis.txt @@ -0,0 +1,57 @@ +SOLIS(8) +======== + +NAME +---- + +solis - Driver for Brazilian Microsol SOLIS UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the +solis driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver has been tested with : + + * Solis 1000 VA + * Solis 1500 VA + * Solis 2000 VA + * Solis 3000 VA + +All Solis models are sinusoidal on-line + +EXTRA ARGUMENTS +--------------- + +This driver support the following extra optional settings in the +linkman:ups.conf[5]. + +*battext = n* - (default = 0, no extra battery, where n = Ampere*hour ) + +*prgshut = 1* - (default = 0, no programable shutdown ) + +COMMANDS +-------- + + * shutdown.return - Shut down in .3 minutes and restart in .3 minutes + + * shutdown.stayoff - Shut down in .3 minutes and do not return + +AUTHOR +------ +Silvino B. Magalhães + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/tripplite.8 b/docs/man/tripplite.8 new file mode 100644 index 0000000..2904180 --- /dev/null +++ b/docs/man/tripplite.8 @@ -0,0 +1,71 @@ +'\" t +.\" Title: tripplite +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "TRIPPLITE" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tripplite \- Driver for Tripp\-Lite SmartPro UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the tripplite driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver should work on the SmartPro line, including the SMART700 and SMART700SER\&. It only supports SmartPro models that communicate using the serial port\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Time to wait before the UPS is turned off after the kill power command is sent\&. The default value is 64 (in seconds)\&. +.RE +.PP +\fBrebootdelay\fR=\fInum\fR +.RS 4 +Set the timer before the UPS is cycled after the reboot command is sent\&. The default value is 64 (in seconds)\&. +.RE +.PP +\fBstartdelay\fR=\fInum\fR +.RS 4 +Set the time that the UPS waits before it turns itself back on after a reboot command\&. The default value is 60 (in seconds)\&. +.RE +.SH "KNOWN ISSUES AND BUGS" +.sp +Battery charge information may not be correct for all UPSes\&. It is tuned to be correct for a SMART700SER\&. Other models may not provide correct information\&. Information from the manufacturer would be helpful\&. +.SH "AUTHORS" +.sp +Rickard E\&. (Rik) Faith, Nicholas Kain +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Other drivers for Tripp\-Lite hardware:" +.sp +\fBtripplitesu\fR(8), \fBtripplite_usb\fR(8), \fBusbhid-ups\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/tripplite.8 b/docs/man/tripplite.txt similarity index 50% rename from man/tripplite.8 rename to docs/man/tripplite.txt index d4ff187..dc6f1c8 100644 --- a/man/tripplite.8 +++ b/docs/man/tripplite.txt @@ -1,47 +1,60 @@ -.TH TRIPPLITE 8 "Sat Aug 21 2004" "" "Network UPS Tools (NUT)" -.SH NAME -tripplite \- Driver for Tripp\(hyLite SmartPro UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the -tripplite driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +TRIPPLITE(8) +============ -.SH SUPPORTED HARDWARE +NAME +---- +tripplite - Driver for Tripp-Lite SmartPro UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +tripplite driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ This driver should work on the SmartPro line, including the SMART700 and SMART700SER. It only supports SmartPro models that communicate using the serial port. -.SH EXTRA ARGUMENTS +EXTRA ARGUMENTS +--------------- This driver supports the following optional settings in the -\fBups.conf\fR(5): +linkman:ups.conf[5]: -.IP "offdelay=\fInum\fR" +*offdelay*='num':: Time to wait before the UPS is turned off after the kill power command is -sent. -The default value is 64 (in seconds). +sent. The default value is 64 (in seconds). -.IP "rebootdelay=\fInum\fR" +*rebootdelay*='num':: Set the timer before the UPS is cycled after the reboot command is sent. The default value is 64 (in seconds). -.IP "startdelay=\fInum\fR" +*startdelay*='num':: Set the time that the UPS waits before it turns itself back on after a -reboot command. -The default value is 60 (in seconds). +reboot command. The default value is 60 (in seconds). -.SH KNOWN ISSUES AND BUGS +KNOWN ISSUES AND BUGS +--------------------- Battery charge information may not be correct for all UPSes. It is tuned to be correct for a SMART700SER. Other models may not provide correct information. Information from the manufacturer would be helpful. -.SH AUTHORS -Rickard E. (Rik) Faith -Nicholas Kain +AUTHORS +------- +Rickard E. (Rik) Faith, Nicholas Kain -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Other drivers for Tripp-Lite hardware: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:tripplitesu[8], linkman:tripplite_usb[8], linkman:usbhid-ups[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/tripplite_usb.8 b/docs/man/tripplite_usb.8 new file mode 100644 index 0000000..df2c950 --- /dev/null +++ b/docs/man/tripplite_usb.8 @@ -0,0 +1,272 @@ +'\" t +.\" Title: tripplite_usb +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "TRIPPLITE_USB" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tripplite_usb \- Driver for older Tripp Lite USB UPSes (not PDC HID) +.SH "SYNOPSIS" +.sp +\fBtripplite_usb\fR \-h +.sp +\fBtripplite_usb\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +.SH "SUPPORTED HARDWARE" +.sp +This driver should work with older Tripp Lite UPSes which are detected as USB HID\-class devices, but are not true HID Power\-Device Class devices\&. So far, the devices supported by tripplite_usb have product ID 0001, and the newer units (such as those with "LCD" in the model name) with product ID 2001 require the \fBusbhid-ups\fR(8) driver instead\&. Please report success or failure to the nut\-upsuser mailing list\&. A key piece of information is the protocol number, returned in ups\&.debug\&.0\&. Also, be sure to turn on debugging (\fI\-DDD\fR) for more informative log messages\&. If your Tripp Lite UPS uses a serial port, you may wish to investigate the \fBtripplite\fR(8) or \fBtripplite_su\fR(8) driver\&. +.sp +This driver has been tested with the following models: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +INTERNETOFFICE700 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +OMNIVS1000 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +OMNIVS1500XL (some warnings) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SMART700USB +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SMART1500RM2U +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SMART2200RMXL2U +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SMART3000RM2U +.RE +.sp +If you have used Tripp Lite\(cqs PowerAlert software to connect to your UPS, there is a good chance that \fItripplite_usb\fR will work if it uses one of the following protocols: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Protocol 0004 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Protocol 1001 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Protocol 2001 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Protocol 3003 +.RE +.sp +On the other hand, if the web page for your UPS on the Tripp\-Lite website says "HID\-compliant USB port also enables direct integration with built\-in power management and auto\-shutdown features of Windows and MAC OS X", then you should use the \fBusbhid-ups\fR(8) driver instead\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5) file (or with \fI\-x\fR on the command line): +.PP +\fBoffdelay\fR +.RS 4 +This setting controls the delay between receiving the "kill" command (\fI\-k\fR) and actually cutting power to the computer\&. +.RE +.PP +\fBbus\fR +.RS 4 +This regular expression is used to match the USB bus (as seen in +/proc/bus/usb/devices +or lsusb(8); including leading zeroes)\&. +.RE +.PP +\fBproduct\fR +.RS 4 +A regular expression to match the product string for the UPS\&. This would be useful if you have two different Tripp Lite UPS models connected to the system, and you want to be sure that you shut them down in the correct order\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This regex is matched against the full USB product string as seen in lsusb(8)\&. The ups\&.model in the \fBupsc\fR(1) output only lists the name after TRIPP LITE, so to match a SMART2200RMXL2U, you could use the regex \&.*SMART2200\&.*\&. +.sp .5v +.RE +.PP +\fBproductid\fR +.RS 4 +The productid is a regular expression which matches the UPS PID as four hexadecimal digits\&. So far, the only devices that work with this driver have PID +0001\&. +.RE +.PP +\fBserial\fR +.RS 4 +It does not appear that these particular Tripp Lite UPSes use the +iSerial +descriptor field to return a serial number\&. However, in case your unit does, you may specify it here\&. +.RE +.sp +For more information on regular expressions, see regex(7) +.SH "RUNTIME VARIABLES" +.PP +\fBups\&.delay\&.shutdown\fR +.RS 4 +This variable is the same as the +\fIoffdelay\fR +setting, but it can be changed at runtime by +\fBupsrw\fR(8)\&. +.RE +.PP +\fBups\&.id\fR +.RS 4 +Some SMARTPRO models feature an ID that can be set and retrieved\&. If your UPS supports this feature, this variable will be listed in the output of +\fBupsrw\fR(8)\&. +.RE +.PP +\fBoutlet\&.1\&.switch\fR +.RS 4 +Some Tripp Lite units have a switchable outlet (usually outlet #1) which can be turned on and off by writing +\fI1\fR +or +\fI0\fR, respectively, to +outlet\&.1\&.switch +with +\fBupsrw\fR(8)\&. If your unit has multiple switchable outlets, substitute the outlet number for +\fI1\fR +in the variable name\&. Be sure to test this first \- there is no other way to be certain that the number used by the driver matches the label on the unit\&. +.RE +.SH "KNOWN ISSUES AND BUGS" +.sp +The driver was not developed with any official documentation from Tripp Lite, so certain events may confuse the driver\&. If you observe any strange behavior, please re\-run the driver with \-DDD to increase the verbosity\&. +.sp +So far, the Tripp Lite UPSes do not seem to have a serial number or other globally unique identifier accessible through USB\&. Thus, when monitoring several Tripp Lite USB UPSes, you should use either the \fIbus\fR or \fIproduct\fR configuration options to uniquely specify which UPS a given driver instance should control\&. +.sp +For instance, you can easily monitor an OMNIVS1000 and a SMART1500RM2U at the same time, since they have different USB Product ID strings\&. If you have two SMART1500RM2U units, you would have to find which USB bus number each unit is on (via lsusb(8)), which may result in ambiguities if the available USB ports are on the same bus\&. +.sp +Some of the SMART*2U models have an ID number, but because this ID is not exposed as a USB string descriptor, there is no easy way to use this ID to distinguish between multiple UPS units on a single machine\&. The UPS would need to be claimed by the driver in order to read this ID\&. +.SH "AUTHOR" +.sp +Written by Charles Lepple, based on the \fBtripplite\fR(8) driver by Rickard E\&. (Rik) Faith and Nicholas Kain\&. Please do not email the authors directly \- use the nut\-upsdev mailing list\&. +.sp +A Tripp Lite OMNIVS1000 was graciously donated to the NUT project by Bradley Feldman (http://www\&.bradleyloritheo\&.com) +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Other drivers for Tripp\-Lite hardware:" +.sp +\fBtripplite\fR(8), \fBtripplitesu\fR(8), \fBusbhid-ups\fR(8) +.SS "Other tools:" +.sp +regex(7), lsusb(8) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/tripplite_usb.txt b/docs/man/tripplite_usb.txt new file mode 100644 index 0000000..9e4e59e --- /dev/null +++ b/docs/man/tripplite_usb.txt @@ -0,0 +1,168 @@ +TRIPPLITE_USB(8) +================ + + +NAME +---- +tripplite_usb - Driver for older Tripp Lite USB UPSes (not PDC HID) + +SYNOPSIS +-------- +*tripplite_usb* -h + +*tripplite_usb* -a 'UPS_NAME' ['OPTIONS'] + +SUPPORTED HARDWARE +------------------ +This driver should work with older Tripp Lite UPSes which are detected as USB +HID-class devices, but are not true HID Power-Device Class devices. So far, +the devices supported by tripplite_usb have product ID 0001, and the newer +units (such as those with "LCD" in the model name) with product ID 2001 require +the linkman:usbhid-ups[8] driver instead. Please report success or failure to +the nut-upsuser mailing list. A key piece of information is the protocol +number, returned in `ups.debug.0`. Also, be sure to turn on debugging ('-DDD') +for more informative log messages. If your Tripp Lite UPS uses a serial port, +you may wish to investigate the linkman:tripplite[8] or linkman:tripplite_su[8] +driver. + +This driver has been tested with the following models: + + * INTERNETOFFICE700 + * OMNIVS1000 + * OMNIVS1500XL (some warnings) + * SMART700USB + * SMART1500RM2U + * SMART2200RMXL2U + * SMART3000RM2U + +If you have used Tripp Lite's PowerAlert software to connect to your UPS, there +is a good chance that 'tripplite_usb' will work if it uses one of the +following protocols: + + * Protocol 0004 + * Protocol 1001 + * Protocol 2001 + * Protocol 3003 + +On the other hand, if the web page for your UPS on the Tripp-Lite website says +"HID-compliant USB port also enables direct integration with built-in power +management and auto-shutdown features of Windows and MAC OS X", then you should +use the linkman:usbhid-ups[8] driver instead. + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in the linkman:ups.conf[5] +file (or with '-x' on the command line): + +*offdelay*:: + +This setting controls the delay between receiving the "kill" command ('-k') +and actually cutting power to the computer. + +*bus*:: + +This regular expression is used to match the USB bus (as seen in +`/proc/bus/usb/devices` or lsusb(8); including leading zeroes). + +*product*:: + +A regular expression to match the product string for the UPS. This would be +useful if you have two different Tripp Lite UPS models connected to the +system, and you want to be sure that you shut them down in the correct order. + +NOTE: This regex is matched against the full USB product string as seen in +lsusb(8). The `ups.model` in the linkman:upsc[1] output only lists the name after +`TRIPP LITE`, so to match a SMART2200RMXL2U, you could use the regex +`.*SMART2200.*`. + +*productid*:: + +The productid is a regular expression which matches the UPS PID as four +hexadecimal digits. So far, the only devices that work with this driver have +PID `0001`. + +*serial*:: + +It does not appear that these particular Tripp Lite UPSes use the `iSerial` +descriptor field to return a serial number. However, in case your unit does, +you may specify it here. + +For more information on regular expressions, see regex(7) + +RUNTIME VARIABLES +----------------- + +*ups.delay.shutdown*:: + +This variable is the same as the 'offdelay' setting, but it can be changed at +runtime by linkman:upsrw[8]. + +*ups.id*:: + +Some SMARTPRO models feature an ID that can be set and retrieved. If your UPS +supports this feature, this variable will be listed in the output of linkman:upsrw[8]. + +*outlet.1.switch*:: + +Some Tripp Lite units have a switchable outlet (usually outlet #1) which can be +turned on and off by writing '1' or '0', respectively, to `outlet.1.switch` +with linkman:upsrw[8]. +If your unit has multiple switchable outlets, substitute the outlet number for +'1' in the variable name. Be sure to test this first - there is no other way to +be certain that the number used by the driver matches the label on the unit. + +KNOWN ISSUES AND BUGS +--------------------- + +The driver was not developed with any official documentation from Tripp Lite, +so certain events may confuse the driver. If you observe any strange behavior, +please re-run the driver with `-DDD` to increase the verbosity. + +So far, the Tripp Lite UPSes do not seem to have a serial number or other +globally unique identifier accessible through USB. Thus, when monitoring +several Tripp Lite USB UPSes, you should use either the 'bus' or 'product' +configuration options to uniquely specify which UPS a given driver instance +should control. + +For instance, you can easily monitor an OMNIVS1000 and a SMART1500RM2U at the +same time, since they have different USB Product ID strings. If you have two +SMART1500RM2U units, you would have to find which USB bus number each unit is +on (via lsusb(8)), which may result in ambiguities if the available USB ports +are on the same bus. + +Some of the SMART*2U models have an ID number, but because this ID is not +exposed as a USB string descriptor, there is no easy way to use this ID to +distinguish between multiple UPS units on a single machine. The UPS would need +to be claimed by the driver in order to read this ID. + +AUTHOR +------ +Written by Charles Lepple, based on the linkman:tripplite[8] driver by Rickard E. (Rik) +Faith and Nicholas Kain. Please do not email the authors directly - use the +nut-upsdev mailing list. + +A Tripp Lite OMNIVS1000 was graciously donated to the NUT project by Bradley +Feldman (http://www.bradleyloritheo.com) + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Other drivers for Tripp-Lite hardware: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:tripplite[8], linkman:tripplitesu[8], linkman:usbhid-ups[8] + +Other tools: +~~~~~~~~~~~~ +regex(7), lsusb(8) + + +INTERNET RESOURCES +------------------ + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + diff --git a/docs/man/tripplitesu.8 b/docs/man/tripplitesu.8 new file mode 100644 index 0000000..9857093 --- /dev/null +++ b/docs/man/tripplitesu.8 @@ -0,0 +1,59 @@ +'\" t +.\" Title: tripplitesu +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "TRIPPLITESU" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +tripplitesu \- Driver for Tripp\-Lite SmartOnline (SU) UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the tripplitesu driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports the Tripp Lite SmartOnline family (via the serial port)\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBlowbatt\fR=\fInum\fR +.RS 4 +Set the low battery warning threshold in percent at which shutdown is initiated by +\fBupsmon\fR(8)\&. By default, the UPS may not report low battery until there are only a few seconds left\&. Common values are around 25\(em30\&. +.RE +.SH "AUTHOR" +.sp +Allan N\&. Hessenflow +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Other drivers for Tripp\-Lite hardware:" +.sp +\fBtripplite\fR(8), \fBtripplite_usb\fR(8), \fBusbhid-ups\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/tripplitesu.txt b/docs/man/tripplitesu.txt new file mode 100644 index 0000000..6416699 --- /dev/null +++ b/docs/man/tripplitesu.txt @@ -0,0 +1,45 @@ +TRIPPLITESU(8) +============== + +NAME +---- +tripplitesu - Driver for Tripp-Lite SmartOnline (SU) UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +tripplitesu driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports the Tripp Lite SmartOnline family (via the serial port). + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*lowbatt*='num':: +Set the low battery warning threshold in percent at which shutdown is +initiated by linkman:upsmon[8]. By default, the UPS may not report low battery +until there are only a few seconds left. Common values are around 25--30. + +AUTHOR +------ +Allan N. Hessenflow + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Other drivers for Tripp-Lite hardware: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +linkman:tripplite[8], linkman:tripplite_usb[8], linkman:usbhid-ups[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/ups.conf.5 b/docs/man/ups.conf.5 new file mode 100644 index 0000000..e120145 --- /dev/null +++ b/docs/man/ups.conf.5 @@ -0,0 +1,155 @@ +'\" t +.\" Title: ups.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPS\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ups.conf \- UPS definitions for Network UPS Tools +.SH "DESCRIPTION" +.sp +This file is read by the driver controller \fBupsdrvctl\fR(8), the UPS drivers that use the common core (see \fBnutupsdrv\fR(8), and \fBupsd\fR(8))\&. The file begins with global directives, and then each UPS has a section which contains a number of directives that set parameters for that UPS\&. +.sp +A UPS section begins with the name of the UPS in brackets, and continues until the next UPS name in brackets or until EOF\&. The name "default" is used internally in upsd, so you can\(cqt use it in this file\&. +.sp +You must define the \fIdriver\fR and \fIport\fR elements for each entry\&. Anything after that in a section is optional\&. A simple example might look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[myups] + driver = blazer_ser + port = /dev/ttyS0 + desc = "Web server UPS" +.fi +.if n \{\ +.RE +.\} +.sp +A slightly more complicated version includes some extras for the hardware\-specific part of the driver: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[bigups] + driver = apcsmart + port = /dev/cua00 + cable = 940\-0095B + sdtype = 2 + desc = "Database server UPS" +.fi +.if n \{\ +.RE +.\} +.sp +In this case, the \fBapcsmart\fR(8) driver will receive variables called "cable" and "sdtype" which have special meanings\&. See the man pages of your driver(s) to learn which variables are supported and what they do\&. +.SH "GLOBAL DIRECTIVES" +.PP +\fBchroot\fR +.RS 4 +Optional\&. The driver will chroot(2) to this directory during initialization\&. This can be useful when securing systems\&. +.RE +.PP +\fBdriverpath\fR +.RS 4 +Optional\&. Path name of the directory in which the UPS driver executables reside\&. If you don\(cqt specify this, the programs look in a built\-in default directory, which is often /usr/local/ups/bin\&. +.RE +.PP +\fBmaxstartdelay\fR +.RS 4 +Optional\&. Same as the UPS field of the same name, but this is the default for UPSes that don\(cqt have the field\&. +.RE +.PP +\fBpollinterval\fR +.RS 4 +Optional\&. The status of the UPS will be refreshed after a maximum delay which is controlled by this setting\&. This is normally 2 seconds\&. This may be useful if the driver is creating too much of a load on your system or network\&. +.RE +.PP +\fBuser\fR +.RS 4 +Optional\&. If started as root, the driver will setuid(2) to the user id associated with +\fIusername\fR\&. +.RE +.SH "UPS FIELDS" +.PP +\fBdriver\fR +.RS 4 +Required\&. This specifies which program will be monitoring this UPS\&. You need to specify the one that is compatible with your hardware\&. See +\fBnutupsdrv\fR(8) +for more information on drivers in general and pointers to the man pages of specific drivers\&. +.RE +.PP +\fBport\fR +.RS 4 +Required\&. This is the serial port where the UPS is connected\&. On a Linux system, the first serial port usually is +\fI/dev/ttyS0\fR\&. On FreeBSD and similar systems, it probably will be +\fI/dev/cuaa0\fR\&. +.RE +.PP +\fBsdorder\fR +.RS 4 +Optional\&. When you have multiple UPSes on your system, you usually need to turn them off in a certain order\&. upsdrvctl shuts down all the 0s, then the 1s, 2s, and so on\&. To exclude a UPS from the shutdown sequence, set this to \-1\&. +.sp +The default value for this parameter is 0\&. +.RE +.PP +\fBdesc\fR +.RS 4 +Optional\&. This allows you to set a brief description that upsd will provide to clients that ask for a list of connected equipment\&. +.RE +.PP +\fBnolock\fR +.RS 4 +Optional\&. When you specify this, the driver skips the port locking routines every time it starts\&. This may allow other processes to seize the port if you start more than one accidentally\&. +.sp +You should only use this if your system won\(cqt work without it\&. +.sp +This may be needed on Mac OS X systems\&. +.RE +.PP +\fBmaxstartdelay\fR +.RS 4 +Optional\&. This can be set as a global variable above your first UPS definition and it can also be set in a UPS section\&. This value controls how long upsdrvctl will wait for the driver to finish starting\&. This keeps your system from getting stuck due to a broken driver or UPS\&. +.sp +The default is 45 seconds\&. +.RE +.sp +All other fields are passed through to the hardware\-specific part of the driver\&. See those manuals for the list of what is allowed\&. +.SH "INTEGRATION" +.sp +\fBupsdrvctl\fR(8) uses this file to start and stop the drivers\&. +.sp +The drivers themselves also obtain configuration data from this file\&. Each driver looks up its section and uses that to configure itself\&. +.sp +\fBupsd\fR(8) learns about which UPSes are installed on this system by reading this file\&. If this system is called "doghouse" and you have defined a UPS in your \fBups\&.conf\fR called "snoopy", then you can monitor it from \fBupsc\fR(8) or similar as "snoopy@doghouse"\&. +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsdrvctl\fR(8) +.SS "Internet resources" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/ups.conf.txt b/docs/man/ups.conf.txt new file mode 100644 index 0000000..432b1f4 --- /dev/null +++ b/docs/man/ups.conf.txt @@ -0,0 +1,143 @@ +UPS.CONF(5) +=========== + +NAME +---- +ups.conf - UPS definitions for Network UPS Tools + +DESCRIPTION +----------- + +This file is read by the driver controller linkman:upsdrvctl[8], the UPS drivers +that use the common core (see linkman:nutupsdrv[8], and linkman:upsd[8]). The +file begins with global directives, and then each UPS has a section which +contains a number of directives that set parameters for that UPS. + +A UPS section begins with the name of the UPS in brackets, and continues +until the next UPS name in brackets or until EOF. The name "default" is +used internally in upsd, so you can't use it in this file. + +You must define the 'driver' and 'port' elements for each entry. Anything +after that in a section is optional. A simple example might look like this: + + [myups] + driver = blazer_ser + port = /dev/ttyS0 + desc = "Web server UPS" + +A slightly more complicated version includes some extras for the +hardware-specific part of the driver: + + [bigups] + driver = apcsmart + port = /dev/cua00 + cable = 940-0095B + sdtype = 2 + desc = "Database server UPS" + +In this case, the linkman:apcsmart[8] driver will receive variables called +"cable" and "sdtype" which have special meanings. See the man pages of +your driver(s) to learn which variables are supported and what they do. + +GLOBAL DIRECTIVES +----------------- + +*chroot*:: + +Optional. The driver will chroot(2) to this directory during initialization. +This can be useful when securing systems. + +*driverpath*:: + +Optional. Path name of the directory in which the UPS driver executables +reside. If you don't specify this, the programs look in a built-in default +directory, which is often /usr/local/ups/bin. + +*maxstartdelay*:: + +Optional. Same as the UPS field of the same name, but this is the +default for UPSes that don't have the field. + +*pollinterval*:: + +Optional. The status of the UPS will be refreshed after a maximum +delay which is controlled by this setting. This is normally 2 seconds. This +may be useful if the driver is creating too much of a load on your system or +network. + +*user*:: + +Optional. If started as root, the driver will setuid(2) to the user id +associated with 'username'. + +UPS FIELDS +---------- +*driver*:: + +Required. This specifies which program will be monitoring this UPS. You +need to specify the one that is compatible with your hardware. See +linkman:nutupsdrv[8] for more information on drivers in general and pointers to the +man pages of specific drivers. + +*port*:: + +Required. This is the serial port where the UPS is connected. On a Linux +system, the first serial port usually is '/dev/ttyS0'. On FreeBSD and +similar systems, it probably will be '/dev/cuaa0'. + +*sdorder*:: + +Optional. When you have multiple UPSes on your system, you usually need to +turn them off in a certain order. upsdrvctl shuts down all the 0s, +then the 1s, 2s, and so on. To exclude a UPS from the shutdown sequence, +set this to -1. ++ +The default value for this parameter is 0. + +*desc*:: + +Optional. This allows you to set a brief description that upsd will provide +to clients that ask for a list of connected equipment. + +*nolock*:: + +Optional. When you specify this, the driver skips the port locking routines +every time it starts. This may allow other processes to seize the port if +you start more than one accidentally. ++ +You should only use this if your system won't work without it. ++ +This may be needed on Mac OS X systems. + +*maxstartdelay*:: + +Optional. This can be set as a global variable above your first UPS +definition and it can also be set in a UPS section. This value controls how +long upsdrvctl will wait for the driver to finish starting. This keeps your +system from getting stuck due to a broken driver or UPS. ++ +The default is 45 seconds. + +All other fields are passed through to the hardware-specific part of the +driver. See those manuals for the list of what is allowed. + +INTEGRATION +----------- + +linkman:upsdrvctl[8] uses this file to start and stop the drivers. + +The drivers themselves also obtain configuration data from this file. +Each driver looks up its section and uses that to configure itself. + +linkman:upsd[8] learns about which UPSes are installed on this system by +reading this file. If this system is called "doghouse" and you have +defined a UPS in your *ups.conf* called "snoopy", then you can monitor it +from linkman:upsc[8] or similar as "snoopy@doghouse". + +SEE ALSO +-------- +linkman:upsd[8], linkman:nutupsdrv[8], linkman:upsdrvctl[8] + +Internet resources +~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsc.8 b/docs/man/upsc.8 new file mode 100644 index 0000000..59828f0 --- /dev/null +++ b/docs/man/upsc.8 @@ -0,0 +1,120 @@ +'\" t +.\" Title: upsc +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSC" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsc \- example lightweight UPS client +.SH "SYNOPSIS" +.sp +\fBupsc\fR \-l | \-L [\fIhost\fR] +.sp +\fBupsc\fR \fIups\fR [\fIvariable\fR] +.SH "DESCRIPTION" +.sp +\fBupsc\fR is provided as a quick way to poll the status of a UPS server\&. It can be used inside shell scripts and other programs that need UPS data but don\(cqt want to include the full interface\&. +.SH "OPTIONS" +.PP +\fB\-l\fR \fIhost\fR +.RS 4 +List all UPS names configured at +\fIhost\fR, one name per line\&. The hostname defaults to "localhost"\&. You may optionally add a colon and a port number\&. +.RE +.PP +\fB\-L\fR \fIhost\fR +.RS 4 +As above, list all UPS names configured at +\fIhost\fR, including their description provided by the remote upsd(8) from ups\&.conf(5)\&. The hostname defaults to "localhost"\&. You may optionally add a colon and a port number to override the default port\&. +.RE +.PP +\fIups\fR +.RS 4 +Display the status of that UPS\&. The format for this option is +\fIupsname[@hostname[:port]]\fR\&. The default hostname is "localhost"\&. +.RE +.PP +\fIvariable\fR +.RS 4 +Display the value of this variable only\&. By default, upsc retrieves the list of variables from the server and then displays the value for each\&. This may be useful in shell scripts to save an additional pipe into grep\&. +.RE +.SH "EXAMPLES" +.sp +To list all variables on an UPS named "myups" on a host called "mybox", with upsd(8) running on port 1234: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ upsc myups@mybox:1234 +battery\&.charge: 100\&.0 +battery\&.voltage: 13\&.9 +battery\&.voltage\&.nominal: 13\&.6 +\&. \&. \&. +.fi +.if n \{\ +.RE +.\} +.sp +To list the UPSes configured on this system, along with their descriptions: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ upsc \-L +apc: Back\-UPS 500 +ppro2: Patriot Pro II +.fi +.if n \{\ +.RE +.\} +.sp +To retrieve the status for all UPSes connected to mybox, using Bourne\-shell syntax: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ for UPS in `upsc \-l mybox:1234`; do + upsc $UPS ups\&.status +done +.fi +.if n \{\ +.RE +.\} +.SH "DIAGNOSTICS" +.sp +upsc will either print a list of UPS names, a list of all supported variables and their values on the UPS, or an error message\&. If you receive an error, make sure you have specified a valid UPS on the command line, that \fBupsd\fR(8) is really running on the other host and that no firewalls are blocking you\&. +.SH "HISTORY" +.sp +Earlier versions of this program used the \fIupsfetch\fR library and UDP sockets to talk to upsd\&. This version of upsc uses the new \fIupsclient\fR library, which only talks TCP\&. This is why \fIupsct\fR no longer exists\&. +.SH "SEE ALSO" +.sp +\fBupsd\fR(8) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsc.txt b/docs/man/upsc.txt new file mode 100644 index 0000000..74c96a9 --- /dev/null +++ b/docs/man/upsc.txt @@ -0,0 +1,96 @@ +UPSC(8) +======= + + +NAME +---- +upsc - example lightweight UPS client + +SYNOPSIS +-------- +*upsc* -l | -L ['host'] + +*upsc* 'ups' ['variable'] + +DESCRIPTION +----------- + +*upsc* is provided as a quick way to poll the status of a UPS server. It can +be used inside shell scripts and other programs that need UPS data but don't +want to include the full interface. + +OPTIONS +------- +*-l* 'host':: + + List all UPS names configured at 'host', one name per line. The hostname + defaults to "localhost". You may optionally add a colon and a port number. + +*-L* 'host':: + + As above, list all UPS names configured at 'host', including their description + provided by the remote upsd(8) from ups.conf(5). The hostname defaults to + "localhost". You may optionally add a colon and a port number to override the + default port. + +'ups':: + + Display the status of that UPS. The format for this option is + 'upsname[@hostname[:port]]'. The default hostname is "localhost". + +'variable':: + + Display the value of this variable only. By default, upsc retrieves the list + of variables from the server and then displays the value for each. This may + be useful in shell scripts to save an additional pipe into grep. + +EXAMPLES +-------- + +To list all variables on an UPS named "myups" on a host +called "mybox", with upsd(8) running on port 1234: + + $ upsc myups@mybox:1234 + battery.charge: 100.0 + battery.voltage: 13.9 + battery.voltage.nominal: 13.6 + . . . + +To list the UPSes configured on this system, along with their descriptions: + + $ upsc -L + apc: Back-UPS 500 + ppro2: Patriot Pro II + +To retrieve the status for all UPSes connected to mybox, using Bourne-shell +syntax: + + $ for UPS in `upsc -l mybox:1234`; do + upsc $UPS ups.status + done + +DIAGNOSTICS +----------- + +upsc will either print a list of UPS names, a list of all supported variables +and their values on the UPS, or an error message. If you receive an error, +make sure you have specified a valid UPS on the command line, that +linkman:upsd[8] is really running on the other host and that no firewalls are +blocking you. + +HISTORY +------- + +Earlier versions of this program used the 'upsfetch' library and UDP sockets to +talk to upsd. This version of upsc uses the new 'upsclient' library, which +only talks TCP. This is why 'upsct' no longer exists. + +SEE ALSO +-------- + +linkman:upsd[8] + +INTERNET RESOURCES +------------------ + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upscli_connect.3 b/docs/man/upscli_connect.3 new file mode 100644 index 0000000..7ad7b85 --- /dev/null +++ b/docs/man/upscli_connect.3 @@ -0,0 +1,55 @@ +'\" t +.\" Title: upscli_connect +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_CONNECT" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_connect \- Open a connection to a NUT upsd +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_connect()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure and opens a TCP connection to the \fIhost\fR on the given \fIport\fR\&. +.sp +\fIflags\fR may be either UPSCLI_CONN_TRYSSL to try a SSL connection, or UPSCLI_CONN_REQSSL to require a SSL connection\&. +.sp +If SSL mode is required, this function will only return successfully if it is able to establish a SSL connection with the server\&. Possible reasons for failure include no SSL support on the server, and if \fBupsclient\fR itself hasn\(cqt been compiled with SSL support\&. +.sp +You must call \fBupscli_disconnect\fR(3) when finished with a connection, or your program will slowly leak memory and file descriptors\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_connect()\fR function modifies the UPSCONN_t structure and returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_disconnect\fR(3), \fBupscli_fd\fR(3), \fBupscli_splitaddr\fR(3), \fBupscli_splitname\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_connect.txt b/docs/man/upscli_connect.txt new file mode 100644 index 0000000..d493dd0 --- /dev/null +++ b/docs/man/upscli_connect.txt @@ -0,0 +1,45 @@ +UPSCLI_CONNECT(3) +================= + +NAME +---- + +upscli_connect - Open a connection to a NUT upsd + +SYNOPSIS +-------- + + #include + + int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags); + +DESCRIPTION +----------- +The *upscli_connect()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure and opens a TCP connection to the 'host' on +the given 'port'. + +'flags' may be either `UPSCLI_CONN_TRYSSL` to try a SSL +connection, or `UPSCLI_CONN_REQSSL` to require a SSL connection. + +If SSL mode is required, this function will only return successfully if +it is able to establish a SSL connection with the server. Possible +reasons for failure include no SSL support on the server, and if +*upsclient* itself hasn't been compiled with SSL support. + +You must call linkman:upscli_disconnect[3] when finished with a +connection, or your program will slowly leak memory and file +descriptors. + +RETURN VALUE +------------ + +The *upscli_connect()* function modifies the `UPSCONN_t` structure and +returns 0 on success, or -1 if an error occurs. + +SEE ALSO +-------- +linkman:upscli_disconnect[3], linkman:upscli_fd[3], +linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], +linkman:upscli_ssl[3], linkman:upscli_strerror[3], +linkman:upscli_upserror[3] diff --git a/docs/man/upscli_disconnect.3 b/docs/man/upscli_disconnect.3 new file mode 100644 index 0000000..e745421 --- /dev/null +++ b/docs/man/upscli_disconnect.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upscli_disconnect +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_DISCONNECT" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_disconnect \- disconnect from a UPS server +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_disconnect(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_disconnect()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, shuts down the connection to the server, and frees dynamic memory used by the state structure\&. The UPSCONN_t structure is no longer valid after this function is called\&. +.sp +This function must be called, or your program will leak memory and file descriptors\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_disconnect()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_connect\fR(3), \fBupscli_fd\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_disconnect.txt b/docs/man/upscli_disconnect.txt new file mode 100644 index 0000000..8c7d5ca --- /dev/null +++ b/docs/man/upscli_disconnect.txt @@ -0,0 +1,35 @@ +UPSCLI_DISCONNECT(3) +==================== + +NAME +---- + +upscli_disconnect - disconnect from a UPS server + +SYNOPSIS +-------- + + #include + + int upscli_disconnect(UPSCONN_t *ups); + +DESCRIPTION +----------- +The *upscli_disconnect()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, shuts down the connection to the server, and +frees dynamic memory used by the state structure. The `UPSCONN_t` structure +is no longer valid after this function is called. + +This function must be called, or your program will leak memory and +file descriptors. + +RETURN VALUE +------------ + +The *upscli_disconnect()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- +linkman:upscli_connect[3], linkman:upscli_fd[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_fd.3 b/docs/man/upscli_fd.3 new file mode 100644 index 0000000..c243aa1 --- /dev/null +++ b/docs/man/upscli_fd.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upscli_fd +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_FD" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_fd \- Get file descriptor for connection +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_fd(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_fd()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure and returns the value of the file descriptor for that connection, if any\&. +.sp +This may be useful for determining if the connection to \fBupsd\fR(8) has been lost\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_fd()\fR function returns the file descriptor, which may be any non\-negative number\&. It returns \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_connect\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_fd.txt b/docs/man/upscli_fd.txt new file mode 100644 index 0000000..c42b098 --- /dev/null +++ b/docs/man/upscli_fd.txt @@ -0,0 +1,35 @@ +UPSCLI_FD(3) +============ + +NAME +---- + +upscli_fd - Get file descriptor for connection + +SYNOPSIS +-------- + + #include + + int upscli_fd(UPSCONN_t *ups); + +DESCRIPTION +----------- + +The *upscli_fd()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure and returns the value of the file descriptor +for that connection, if any. + +This may be useful for determining if the connection to linkman:upsd[8] +has been lost. + +RETURN VALUE +------------ + +The *upscli_fd()* function returns the file descriptor, which +may be any non-negative number. It returns -1 if an error occurs. + +SEE ALSO +-------- + +linkman:upscli_connect[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_get.3 b/docs/man/upscli_get.3 new file mode 100644 index 0000000..ec72a15 --- /dev/null +++ b/docs/man/upscli_get.3 @@ -0,0 +1,179 @@ +'\" t +.\" Title: upscli_get +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_GET" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_get \- retrieve data from a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_get(UPSCONN_t *ups, int numq, const char **query, + int *numa, char ***answer) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_get()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, and the pointer \fIquery\fR to an array of \fInumq\fR query elements\&. It builds a properly\-formatted request from those elements and transmits it to \fBupsd\fR(8)\&. +.sp +Upon success, the response will be split into separate components\&. A pointer to those components will be returned in \fIanswer\fR\&. The number of usable answer components will be returned in \fInuma\fR\&. +.SH "USES" +.sp +This function implements the "GET" command in the protocol\&. As a result, you can use it to request many different things from the server\&. Some examples are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET NUMLOGINS +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET UPSDESC +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET VAR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET TYPE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET DESC +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +GET CMDDESC +.RE +.SH "QUERY FORMATTING" +.sp +To generate a request for GET NUMLOGINS su700, you would populate query and numq as follows: +.sp +.if n \{\ +.RS 4 +.\} +.nf +int numq; +const char *query[2]; +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +query[0] = "NUMLOGINS"; +query[1] = "su700"; +numq = 2; +.fi +.if n \{\ +.RE +.\} +.sp +All escaping of special characters and quoting of elements with spaces is handled for you inside this function\&. +.SH "ANSWER FORMATTING" +.sp +The raw response from upsd to the above query would be NUMLOGINS su700 1\&. Since this is split up for you, the values work out like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +numa = 3; +answer[0] = "NUMLOGINS" +answer[1] = "su700" +answer[2] = "1" +.fi +.if n \{\ +.RE +.\} +.sp +Notice that the value which you seek typically starts at answer[numq]\&. +.SH "ERROR CHECKING" +.sp +This function will check your query against the response from \fBupsd\fR(8)\&. For example, if you send "VAR" "su700" "ups\&.status", it will expect to see those at the beginning of the response\&. +.sp +If the results from \fBupsd\fR do not pass this case\-insensitive test against your request, this function will return an error\&. When this happens, \fBupscli_upserror\fR(3) will return \fIUPSCLI_ERR_PROTOCOL\fR\&. +.SH "ANSWER ARRAY LIFETIME" +.sp +The pointers contained within the \fIanswer\fR array are only valid until the next call to a \fIupsclient\fR function which references them\&. If you need to use data from multiple calls, you must copy it somewhere else first\&. +.sp +The \fIanswer\fR array and its elements may change locations, so you must not rely on previous addresses\&. You must only use the addresses which were returned by the most recent call\&. You also must not attempt to use more than \fInuma\fR elements in \fIanswer\fR\&. Such behavior is undefined, and may yield bogus data or a crash\&. +.sp +The array will be deleted after calling \fBupscli_disconnect\fR(3)\&. Any access after that point is also undefined\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_get()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_list_start\fR(3), \fBupscli_list_next\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_get.txt b/docs/man/upscli_get.txt new file mode 100644 index 0000000..00aea76 --- /dev/null +++ b/docs/man/upscli_get.txt @@ -0,0 +1,102 @@ +UPSCLI_GET(3) +============= + +NAME +---- +upscli_get - retrieve data from a UPS + +SYNOPSIS +-------- + + #include + + int upscli_get(UPSCONN_t *ups, int numq, const char **query, + int *numa, char ***answer) + +DESCRIPTION +----------- +The *upscli_get()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, and the pointer 'query' to an array of +'numq' query elements. It builds a properly-formatted request from +those elements and transmits it to linkman:upsd[8]. + +Upon success, the response will be split into separate components. A +pointer to those components will be returned in 'answer'. The +number of usable answer components will be returned in 'numa'. + +USES +---- + +This function implements the "GET" command in the protocol. As a +result, you can use it to request many different things from the server. +Some examples are: + + * GET NUMLOGINS + * GET UPSDESC + * GET VAR + * GET TYPE + * GET DESC + * GET CMDDESC + +QUERY FORMATTING +---------------- +To generate a request for `GET NUMLOGINS su700`, you would populate +query and numq as follows: + + int numq; + const char *query[2]; + + query[0] = "NUMLOGINS"; + query[1] = "su700"; + numq = 2; + +All escaping of special characters and quoting of elements with spaces +is handled for you inside this function. + +ANSWER FORMATTING +----------------- +The raw response from upsd to the above query would be `NUMLOGINS su700 1`. +Since this is split up for you, the values work out like this: + + numa = 3; + answer[0] = "NUMLOGINS" + answer[1] = "su700" + answer[2] = "1" + +Notice that the value which you seek typically starts at answer[numq]. + +ERROR CHECKING +-------------- +This function will check your query against the response from +linkman:upsd[8]. For example, if you send "VAR" "su700" "ups.status", it +will expect to see those at the beginning of the response. + +If the results from *upsd* do not pass this case-insensitive test +against your request, this function will return an error. When this +happens, linkman:upscli_upserror[3] will return 'UPSCLI_ERR_PROTOCOL'. + +ANSWER ARRAY LIFETIME +--------------------- +The pointers contained within the 'answer' array are only valid +until the next call to a 'upsclient' function which references them. +If you need to use data from multiple calls, you must copy it somewhere +else first. + +The 'answer' array and its elements may change locations, so you +must not rely on previous addresses. You must only use the addresses +which were returned by the most recent call. You also must not attempt +to use more than 'numa' elements in 'answer'. Such behavior is +undefined, and may yield bogus data or a crash. + +The array will be deleted after calling linkman:upscli_disconnect[3]. Any +access after that point is also undefined. + +RETURN VALUE +------------ +The *upscli_get()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- +linkman:upscli_list_start[3], linkman:upscli_list_next[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_list_next.3 b/docs/man/upscli_list_next.3 new file mode 100644 index 0000000..acbb024 --- /dev/null +++ b/docs/man/upscli_list_next.3 @@ -0,0 +1,69 @@ +'\" t +.\" Title: upscli_list_next +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_LIST_NEXT" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_list_next \- retrieve list items from a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_list_next(UPSCONN_t *ups, int numq, const char **query, + int *numa, char ***answer) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_list_next()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, and the pointer \fIquery\fR to an array of \fInumq\fR query elements\&. It performs a read from the network and expects to find either another list item or the end of a list\&. +.sp +You must call \fBupscli_list_start\fR(3) before calling this function\&. +.sp +This function will return 1 and set values in \fInuma\fR and \fIanswer\fR if a list item is received\&. If the list is done, it will return 0, and the values in \fInuma\fR and \fIanswer\fR are undefined\&. +.sp +Calling this function after it returns something other than 1 is undefined\&. +.SH "QUERY FORMATTING" +.sp +You may not change the values of \fInumq\fR or \fIquery\fR between the call to \fBupscli_list_start\fR(3) and the first call to this function\&. You also may not change the values between calls to this function\&. +.SH "ANSWER FORMATTING" +.sp +The contents of \fInuma\fR and \fIanswer\fR work just like a call to \fBupscli_get\fR(3)\&. The values returned by \fBupsd\fR(8) are identical to a single item request, so this is not surprising\&. +.SH "ERROR CHECKING" +.sp +This function checks the response from \fBupsd\fR(8) against your query\&. If the response is not part of the list you have requested, it will return an error code\&. +.sp +When this happens, \fBupscli_upserror\fR(3) will return UPSCLI_ERR_PROTOCOL\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_list_next()\fR function returns 1 when list data is present, 0 if the list is finished, or \-1 if an error occurs\&. +.sp +It is possible to have an empty list\&. The function will return 0 for its first call in that case\&. +.SH "SEE ALSO" +.sp +\fBupscli_list_start\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_list_next.txt b/docs/man/upscli_list_next.txt new file mode 100644 index 0000000..30fc7b3 --- /dev/null +++ b/docs/man/upscli_list_next.txt @@ -0,0 +1,70 @@ +UPSCLI_LIST_NEXT(3) +=================== + +NAME +---- + +upscli_list_next - retrieve list items from a UPS + +SYNOPSIS +-------- + + #include + + int upscli_list_next(UPSCONN_t *ups, int numq, const char **query, + int *numa, char ***answer) + +DESCRIPTION +----------- + +The *upscli_list_next()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, and the pointer 'query' to an array of +'numq' query elements. It performs a read from the network and +expects to find either another list item or the end of a list. + +You must call linkman:upscli_list_start[3] before calling this function. + +This function will return 1 and set values in 'numa' and +'answer' if a list item is received. If the list is done, it will +return 0, and the values in 'numa' and 'answer' are undefined. + +Calling this function after it returns something other than 1 is +undefined. + +QUERY FORMATTING +---------------- + +You may not change the values of 'numq' or 'query' between the +call to linkman:upscli_list_start[3] and the first call to this function. +You also may not change the values between calls to this function. + +ANSWER FORMATTING +----------------- + +The contents of 'numa' and 'answer' work just like a call to +linkman:upscli_get[3]. The values returned by linkman:upsd[8] are identical to +a single item request, so this is not surprising. + +ERROR CHECKING +-------------- + +This function checks the response from linkman:upsd[8] against your query. +If the response is not part of the list you have requested, it will +return an error code. + +When this happens, linkman:upscli_upserror[3] will return +`UPSCLI_ERR_PROTOCOL`. + +RETURN VALUE +------------ + +The *upscli_list_next()* function returns 1 when list data is +present, 0 if the list is finished, or -1 if an error occurs. + +It is possible to have an empty list. The function will return 0 for +its first call in that case. + +SEE ALSO +-------- +linkman:upscli_list_start[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_list_start.3 b/docs/man/upscli_list_start.3 new file mode 100644 index 0000000..aec5052 --- /dev/null +++ b/docs/man/upscli_list_start.3 @@ -0,0 +1,139 @@ +'\" t +.\" Title: upscli_list_start +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_LIST_START" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_list_start \- begin multi\-item retrieval from a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +int upscli_list_start(UPSCONN_t *ups, int numq, const char **query) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_list_start()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, and the pointer \fIquery\fR to an array of \fInumq\fR query elements\&. It builds a properly\-formatted request from those elements and transmits it to \fBupsd\fR(8)\&. +.sp +Upon success, the caller must call \fBupscli_list_next\fR(3) to retrieve the elements of the list\&. Failure to retrieve the list will most likely result in the client getting out of sync with the server due to buffered data\&. +.SH "USES" +.sp +This function implements the "LIST" command in the protocol\&. As a result, you can use it to request many different things from the server\&. Some examples are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST UPS +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST VAR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST RW +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST CMD +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST ENUM +.RE +.SH "QUERY FORMATTING" +.sp +To see the list of variables on a UPS called \fIsu700\fR, the protocol command would be LIST VAR su700\&. To start that list with this function, you would populate query and numq as follows: +.sp +.if n \{\ +.RS 4 +.\} +.nf +int numq; +const char *query[2]; +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +query[0] = "VAR"; +query[1] = "su700"; +numq = 2; +.fi +.if n \{\ +.RE +.\} +.sp +All escaping of special characters and quoting of elements with spaces are handled for you inside this function\&. +.SH "ERROR CHECKING" +.sp +This function checks the response from \fBupsd\fR(8) against your query\&. If it is not starting a list, or is starting the wrong type of list, it will return an error code\&. +.sp +When this happens, \fBupscli_upserror\fR(3) will return UPSCLI_ERR_PROTOCOL\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_list_start()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_list_start.txt b/docs/man/upscli_list_start.txt new file mode 100644 index 0000000..a017d9c --- /dev/null +++ b/docs/man/upscli_list_start.txt @@ -0,0 +1,80 @@ +UPSCLI_LIST_START(3) +==================== + +NAME +---- + +upscli_list_start - begin multi-item retrieval from a UPS + +SYNOPSIS +-------- + + #include + int upscli_list_start(UPSCONN_t *ups, int numq, const char **query) + +DESCRIPTION +----------- + +The *upscli_list_start()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, and the pointer 'query' to an array of +'numq' query elements. It builds a properly-formatted request from +those elements and transmits it to linkman:upsd[8]. + +Upon success, the caller must call linkman:upscli_list_next[3] to retrieve +the elements of the list. Failure to retrieve the list will most likely +result in the client getting out of sync with the server due to buffered +data. + +USES +---- + +This function implements the "LIST" command in the protocol. As a +result, you can use it to request many different things from the server. +Some examples are: + + - LIST UPS + - LIST VAR + - LIST RW + - LIST CMD + - LIST ENUM + +QUERY FORMATTING +---------------- + +To see the list of variables on a UPS called 'su700', the protocol command +would be `LIST VAR su700`. To start that list with this function, you +would populate query and numq as follows: + + int numq; + const char *query[2]; + + query[0] = "VAR"; + query[1] = "su700"; + numq = 2; + +All escaping of special characters and quoting of elements with spaces +are handled for you inside this function. + +ERROR CHECKING +-------------- + +This function checks the response from linkman:upsd[8] against your query. +If it is not starting a list, or is starting the wrong type of list, it +will return an error code. + +When this happens, linkman:upscli_upserror[3] will return +`UPSCLI_ERR_PROTOCOL`. + +RETURN VALUE +------------ +The *upscli_list_start()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] + diff --git a/docs/man/upscli_readline.3 b/docs/man/upscli_readline.3 new file mode 100644 index 0000000..226cd90 --- /dev/null +++ b/docs/man/upscli_readline.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upscli_readline +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_READLINE" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_readline \- read a single response from a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_readline()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, receives a single line from the server, and copies up to \fIbuflen\fR bytes of the response into the buffer \fIbuf\fR\&. +.sp +Some parsing of the string occurs during reception\&. In particular, ERR messages from \fBupsd\fR(8) are detected and will cause this function to return \-1\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_readline()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_readline.txt b/docs/man/upscli_readline.txt new file mode 100644 index 0000000..52106ad --- /dev/null +++ b/docs/man/upscli_readline.txt @@ -0,0 +1,39 @@ +UPSCLI_READLINE(3) +================== + +NAME +---- + +upscli_readline - read a single response from a UPS + +SYNOPSIS +-------- + + #include + + int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen); + +DESCRIPTION +----------- +The *upscli_readline()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, receives a single line from the server, and +copies up to 'buflen' bytes of the response into the buffer +'buf'. + +Some parsing of the string occurs during reception. In particular, +ERR messages from linkman:upsd[8] are detected and will cause this +function to return -1. + +RETURN VALUE +------------ + +The *upscli_readline()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_sendline.3 b/docs/man/upscli_sendline.3 new file mode 100644 index 0000000..5f3004f --- /dev/null +++ b/docs/man/upscli_sendline.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upscli_sendline +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_SENDLINE" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_sendline \- send a single command to a UPS +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_sendline()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure and transmits a buffer \fIbuf\fR of size \fIbuflen\fR to the server\&. +.sp +The data in \fIbuf\fR must be a fully formatted protocol command as no parsing of the buffer occurs within this function\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_sendline()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_sendline.txt b/docs/man/upscli_sendline.txt new file mode 100644 index 0000000..c449c6d --- /dev/null +++ b/docs/man/upscli_sendline.txt @@ -0,0 +1,39 @@ +UPSCLI_SENDLINE(3) +================== + +NAME +---- + +upscli_sendline - send a single command to a UPS + +SYNOPSIS +-------- + + + #include + + int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen); + +DESCRIPTION +----------- + +The *upscli_sendline()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure and transmits a buffer 'buf' of size +'buflen' to the server. + +The data in 'buf' must be a fully formatted protocol command as no +parsing of the buffer occurs within this function. + +RETURN VALUE +------------ + +The *upscli_sendline()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_splitaddr.3 b/docs/man/upscli_splitaddr.3 new file mode 100644 index 0000000..79145c6 --- /dev/null +++ b/docs/man/upscli_splitaddr.3 @@ -0,0 +1,68 @@ +'\" t +.\" Title: upscli_splitaddr +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_SPLITADDR" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_splitaddr \- split a listening address into its components +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_splitaddr(const char *buf, char **hostname, + int *port) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_splitaddr()\fR function takes a pointer to the raw UPS definition \fIbuf\fR and returns pointers to dynamically allocated memory in \fIupsname\fR and \fIhostname\fR\&. It also copies the port number into \fIport\fR\&. +.SH "FORMATTING" +.sp +A listening address definition is specified according to this format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[:] +.fi +.if n \{\ +.RE +.\} +.sp +Definitions without an explicit port value receive the default value of 3493\&. +.SH "MEMORY USAGE" +.sp +You must \fBfree\fR(3) the pointer \fIhostname\fR when you are done with it to avoid memory leaks\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_splitaddr()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_splitname\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_splitaddr.txt b/docs/man/upscli_splitaddr.txt new file mode 100644 index 0000000..4633762 --- /dev/null +++ b/docs/man/upscli_splitaddr.txt @@ -0,0 +1,54 @@ +UPSCLI_SPLITADDR(3) +=================== + +NAME +---- + +upscli_splitaddr - split a listening address into its components + +SYNOPSIS +-------- + + + #include + + int upscli_splitaddr(const char *buf, char **hostname, + int *port) + +DESCRIPTION +----------- + +The *upscli_splitaddr()* function takes a pointer to the raw UPS +definition 'buf' and returns pointers to dynamically allocated +memory in 'upsname' and 'hostname'. It also copies the port +number into 'port'. + +FORMATTING +---------- + +A listening address definition is specified according to this format: + + [:] + +Definitions without an explicit port value receive the default value of +3493. + +MEMORY USAGE +------------ + +You must *free*(3) the pointer 'hostname' when you are done +with it to avoid memory leaks. + +RETURN VALUE +------------ + +The *upscli_splitaddr()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_splitname[3], linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_splitname.3 b/docs/man/upscli_splitname.3 new file mode 100644 index 0000000..ca0c3d0 --- /dev/null +++ b/docs/man/upscli_splitname.3 @@ -0,0 +1,70 @@ +'\" t +.\" Title: upscli_splitname +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_SPLITNAME" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_splitname \- split a UPS definition into its components +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_splitname(const char *buf, char **upsname, + char **hostname, int *port) +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_splitname()\fR function takes a pointer to the raw UPS definition \fIbuf\fR and returns pointers to dynamically allocated memory in \fIupsname\fR and \fIhostname\fR\&. It also copies the port number into \fIport\fR\&. +.SH "FORMATTING" +.sp +A UPS definition is specified according to this format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[@[:]] +.fi +.if n \{\ +.RE +.\} +.sp +When the UPS name is not given, this function will print an error to stderr and return \-1 without changing anything\&. +.sp +Definitions without an explicit port value receive the default value of 3493\&. The default hostname is "localhost"\&. +.SH "MEMORY USAGE" +.sp +You must \fBfree\fR(3) the pointers to \fIupsname\fR and \fIhostname\fR when you are done with them to avoid memory leaks\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_splitname()\fR function returns 0 on success, or \-1 if an error occurs\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_splitaddr\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_splitname.txt b/docs/man/upscli_splitname.txt new file mode 100644 index 0000000..1b714c6 --- /dev/null +++ b/docs/man/upscli_splitname.txt @@ -0,0 +1,55 @@ +UPSCLI_SPLITNAME(3) +=================== + +NAME +---- + +upscli_splitname - split a UPS definition into its components + +SYNOPSIS +-------- + + #include + + int upscli_splitname(const char *buf, char **upsname, + char **hostname, int *port) + +DESCRIPTION +----------- + +The *upscli_splitname()* function takes a pointer to the raw UPS +definition 'buf' and returns pointers to dynamically allocated +memory in 'upsname' and 'hostname'. It also copies the port +number into 'port'. + +FORMATTING +---------- + +A UPS definition is specified according to this format: + + [@[:]] + +When the UPS name is not given, this function will print an error to +stderr and return -1 without changing anything. + +Definitions without an explicit port value receive the default value of +3493. The default hostname is "localhost". + +MEMORY USAGE +------------ +You must *free*(3) the pointers to 'upsname' and 'hostname' +when you are done with them to avoid memory leaks. + +RETURN VALUE +------------ + +The *upscli_splitname()* function returns 0 on success, or -1 if an +error occurs. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_splitaddr[3], linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_ssl.3 b/docs/man/upscli_ssl.3 new file mode 100644 index 0000000..70bdd99 --- /dev/null +++ b/docs/man/upscli_ssl.3 @@ -0,0 +1,49 @@ +'\" t +.\" Title: upscli_ssl +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_SSL" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_ssl \- Check SSL mode for current connection +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_ssl(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_ssl\fR() function takes the pointer \fIups\fR to a UPSCONN_t state structure\&. It only returns 1 if SSL support has been compiled into the \fBupsclient\fR(3) library, and if it was successfully enabled for this connection\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_ssl\fR() function returns 1 if SSL is running, and 0 if not\&. It returns \-1 in the event of an error\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_ssl.txt b/docs/man/upscli_ssl.txt new file mode 100644 index 0000000..1b1620e --- /dev/null +++ b/docs/man/upscli_ssl.txt @@ -0,0 +1,36 @@ +UPSCLI_SSL(3) +============= + +NAME +---- + +upscli_ssl - Check SSL mode for current connection + +SYNOPSIS +-------- + + #include + + int upscli_ssl(UPSCONN_t *ups); + +DESCRIPTION +----------- + +The *upscli_ssl*() function takes the pointer 'ups' to a +`UPSCONN_t` state structure. It only returns 1 if SSL support has been +compiled into the linkman:upsclient[3] library, and if it was successfully +enabled for this connection. + + +RETURN VALUE +------------ + +The *upscli_ssl*() function returns 1 if SSL is running, and 0 if +not. It returns -1 in the event of an error. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_strerror.3 b/docs/man/upscli_strerror.3 new file mode 100644 index 0000000..64ff539 --- /dev/null +++ b/docs/man/upscli_strerror.3 @@ -0,0 +1,49 @@ +'\" t +.\" Title: upscli_strerror +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_STRERROR" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_strerror \- return string describing error condition +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +char *upscli_strerror(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_strerror\fR() function takes the pointer \fIups\fR to a UPSCONN_t state structure and returns a string describing the last error which occurred on this connection\&. The string is valid until the next call to \fBupscli_strerror\fR()\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_strerror\fR() function returns a description of the error, or an unknown error message if the error code is not recognized\&. +.SH "SEE ALSO" +.sp +\fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_strerror.txt b/docs/man/upscli_strerror.txt new file mode 100644 index 0000000..fa6da66 --- /dev/null +++ b/docs/man/upscli_strerror.txt @@ -0,0 +1,36 @@ +UPSCLI_STRERROR(3) +================== + +NAME +---- + +upscli_strerror - return string describing error condition + +SYNOPSIS +-------- + + #include + + char *upscli_strerror(UPSCONN_t *ups); + +DESCRIPTION +----------- + +The *upscli_strerror*() function takes the pointer 'ups' to a +`UPSCONN_t` state structure and returns a string describing the last error +which occurred on this connection. The string is valid until the next +call to *upscli_strerror*(). + +RETURN VALUE +------------ + +The *upscli_strerror*() function returns a description of the error, +or an unknown error message if the error code is not recognized. + +SEE ALSO +-------- + +linkman:upscli_fd[3], linkman:upscli_get[3], +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_ssl[3], +linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_upserror.3 b/docs/man/upscli_upserror.3 new file mode 100644 index 0000000..36711c0 --- /dev/null +++ b/docs/man/upscli_upserror.3 @@ -0,0 +1,53 @@ +'\" t +.\" Title: upscli_upserror +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLI_UPSERROR" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscli_upserror \- Get current error number for connection +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int upscli_upserror(UPSCONN_t *ups); +.fi +.SH "DESCRIPTION" +.sp +The \fBupscli_upserror\fR() function takes the pointer \fIups\fR to a UPSCONN_t state structure and returns the value of the internal error number, if any\&. +.sp +This is typically used to check for certain error values like UPSCLI_ERR_UNKCOMMAND\&. That specific error can be used for detecting older versions of \fBupsd\fR(8) which might not support a given command\&. +.sp +Some error messages have additional meanings, so you should use \fBupscli_strerror\fR(3) to obtain readable error messages\&. +.SH "RETURN VALUE" +.sp +The \fBupscli_upserror\fR() function returns one of the UPSCLI_ERR_* values from upsclient\&.h, or 0 if no error has occurred\&. +.SH "SEE ALSO" +.sp +\fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_strerror\fR(3) diff --git a/docs/man/upscli_upserror.txt b/docs/man/upscli_upserror.txt new file mode 100644 index 0000000..b8ac616 --- /dev/null +++ b/docs/man/upscli_upserror.txt @@ -0,0 +1,40 @@ +UPSCLI_UPSERROR(3) +================== + +NAME +---- + +upscli_upserror - Get current error number for connection + +SYNOPSIS +-------- + + #include + + int upscli_upserror(UPSCONN_t *ups); + +DESCRIPTION +----------- + +The *upscli_upserror*() function takes the pointer 'ups' to a +`UPSCONN_t` state structure and returns the value of the internal error +number, if any. + +This is typically used to check for certain error values like +`UPSCLI_ERR_UNKCOMMAND`. That specific error can be used for detecting +older versions of linkman:upsd[8] which might not support a given command. + +Some error messages have additional meanings, so you should use +linkman:upscli_strerror[3] to obtain readable error messages. + +RETURN VALUE +------------ + +The *upscli_upserror*() function returns one of the `UPSCLI_ERR_*` +values from `upsclient.h`, or 0 if no error has occurred. + +SEE ALSO +-------- + +linkman:upscli_readline[3], linkman:upscli_sendline[3], +linkman:upscli_strerror[3] diff --git a/docs/man/upsclient.3 b/docs/man/upsclient.3 new file mode 100644 index 0000000..1496883 --- /dev/null +++ b/docs/man/upsclient.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: upsclient +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCLIENT" "3" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsclient \- Network UPS Tools client access library +.SH "DESCRIPTION" +.sp +The Network UPS Tools (NUT) \fBupsclient\fR library provides a number of useful functions for programs to use when communicating with \fBupsd\fR(8)\&. Many of the low\-level socket and protocol details are handled automatically when using this interface\&. +.sp +State is maintained across calls in an opaque structure called UPSCONN_t\&. Callers are expected to create one per connection\&. These will be provided to most of the \fBupsclient\fR functions\&. The format of this structure is subject to change, and client programs must not reference elements within it directly\&. +.SH "NETWORK FUNCTIONS" +.sp +To create a new connection, use \fBupscli_connect\fR(3)\&. This will also initialize the UPSCONN_t structure\&. To verify that a connection has been established later, \fBupscli_fd\fR(3) can be used to return the file descriptor\&. Clients wishing to check for the presence and operation of SSL on a connection may call \fBupscli_ssl\fR(3)\&. +.sp +The majority of clients will use \fBupscli_get\fR(3) to retrieve single items from the server\&. To retrieve a list, use \fBupscli_list_start\fR(3) to get it started, then call \fBupscli_list_next\fR(3) for each element\&. +.sp +Raw lines of text may be sent to \fBupsd\fR(8) with \fBupscli_sendline\fR(3)\&. Reading raw lines is possible with \fBupscli_readline\fR(3)\&. Client programs are expected to format these lines according to the protocol, as no checking will be performed before transmission\&. +.sp +At the end of a connection, you must call \fBupsclient_disconnect\fR(3) to disconnect from \fBupsd\fR and release any dynamic memory associated with the UPSCONN_t structure\&. Failure to call this function will result in memory and file descriptor leaks in your program\&. +.SH "ERROR HANDLING" +.sp +In the event of an error, \fBupscli_strerror\fR(3) will provide human\-readable details on what happened\&. \fBupscli_upserror\fR(3) may also be used to retrieve the error number\&. These numbers are defined in \fBupsclient\&.h\fR as \fIUPSCLI_ERR_*\fR\&. +.SH "SEE ALSO" +.sp +\fBlibupsclient-config\fR(1), \fBupscli_connect\fR(3), \fBupscli_disconnect\fR(3), \fBupscli_fd\fR(3), \fBupscli_getvar\fR(3), \fBupscli_list_next\fR(3), \fBupscli_list_start\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_splitaddr\fR(3), \fBupscli_splitname\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upsclient.txt b/docs/man/upsclient.txt new file mode 100644 index 0000000..ec9931c --- /dev/null +++ b/docs/man/upsclient.txt @@ -0,0 +1,64 @@ +UPSCLIENT(3) +============ + +NAME +---- + +upsclient - Network UPS Tools client access library + +DESCRIPTION +----------- + +The Network UPS Tools (NUT) *upsclient* library provides a number of +useful functions for programs to use when communicating with +linkman:upsd[8]. Many of the low-level socket and protocol details are +handled automatically when using this interface. + +State is maintained across calls in an opaque structure called `UPSCONN_t`. +Callers are expected to create one per connection. These will be +provided to most of the *upsclient* functions. The format of this +structure is subject to change, and client programs must not reference +elements within it directly. + +NETWORK FUNCTIONS +----------------- + +To create a new connection, use linkman:upscli_connect[3]. This will also +initialize the `UPSCONN_t` structure. To verify that a connection has been +established later, linkman:upscli_fd[3] can be used to return the +file descriptor. Clients wishing to check for the presence and +operation of SSL on a connection may call linkman:upscli_ssl[3]. + +The majority of clients will use linkman:upscli_get[3] to retrieve single +items from the server. To retrieve a list, use +linkman:upscli_list_start[3] to get it started, then call +linkman:upscli_list_next[3] for each element. + +Raw lines of text may be sent to linkman:upsd[8] with +linkman:upscli_sendline[3]. Reading raw lines is possible with +linkman:upscli_readline[3]. Client programs are expected to format these +lines according to the protocol, as no checking will be performed before +transmission. + +At the end of a connection, you must call linkman:upsclient_disconnect[3] +to disconnect from *upsd* and release any dynamic memory associated +with the `UPSCONN_t` structure. Failure to call this function will result +in memory and file descriptor leaks in your program. + +ERROR HANDLING +-------------- +In the event of an error, linkman:upscli_strerror[3] will provide +human-readable details on what happened. linkman:upscli_upserror[3] may +also be used to retrieve the error number. These numbers are defined in +*upsclient.h* as 'UPSCLI_ERR_*'. + +SEE ALSO +-------- +linkman:libupsclient-config[1], +linkman:upscli_connect[3], linkman:upscli_disconnect[3], linkman:upscli_fd[3], +linkman:upscli_getvar[3], linkman:upscli_list_next[3], +linkman:upscli_list_start[3], linkman:upscli_readline[3], +linkman:upscli_sendline[3], +linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], +linkman:upscli_ssl[3], linkman:upscli_strerror[3], +linkman:upscli_upserror[3] diff --git a/docs/man/upscmd.8 b/docs/man/upscmd.8 new file mode 100644 index 0000000..944264a --- /dev/null +++ b/docs/man/upscmd.8 @@ -0,0 +1,94 @@ +'\" t +.\" Title: upscmd +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCMD" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscmd \- UPS administration program for instant commands +.SH "SYNOPSIS" +.sp +\fBupscmd\fR \-h +.sp +\fBupscmd\fR \-l \fIups\fR +.sp +\fBupscmd\fR [\-u \fIusername\fR] [\-p \fIpassword\fR] \fIups\fR \fIcommand\fR +.SH "DESCRIPTION" +.sp +\fBupscmd\fR allows you to invoke "instant commands" in your UPS hardware\&. Not all hardware supports this, so check the list with \-l to see if anything will work on your equipment\&. +.sp +On hardware that supports it, you can use this program to start and stop battery tests, invoke a front panel test (beep!), turn the load on or off, and more\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help message\&. +.RE +.PP +\fB\-l\fR \fIups\fR +.RS 4 +Show the list of supported instant commands on that UPS\&. Some hardware may not support any of them\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +Set the username for the connection to the server\&. This is optional, and you will be prompted for this when invoking a command if \-u is not used\&. +.RE +.PP +\fB\-p\fR \fIpassword\fR +.RS 4 +Set the password to authenticate to the server\&. This is also optional like \-u, and you will be prompted for it if necessary\&. +.RE +.PP +\fIups\fR +.RS 4 +Connect to this UPS\&. The format is +upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. +.RE +.SH "UNATTENDED MODE" +.sp +If you run this program inside a shell script or similar to invoke a command, you will need to specify all of the information on the command line\&. This means using \-u and \-p\&. Otherwise it will put up a prompt and your program will hang\&. +.sp +This is not necessary when displaying the list, as the username and password are not required for read\-only mode\&. +.SH "DANGEROUS COMMANDS" +.sp +Some drivers like \fBapcsmart\fR(8) have built\-in paranoia for the dangerous commands like load\&.off\&. To make them actually turn off the load, you will have to send the command twice within a short window\&. That is, you will have to send it once, then send it again after 3 seconds elapse but before 15 seconds pass\&. +.sp +This paranoia is entirely defined within the driver\&. upsd and upscmd have no control over the timing\&. +.SH "DIAGNOSTICS" +.sp +upscmd won\(cqt work unless you provide a valid username and password\&. If you get "access denied" errors, make sure that your \fBupsd.users\fR(5) has an entry for you, and that the username you are using has permissions to SET variables\&. +.SH "BUGS" +.sp +There is currently no way to tell the user when the driver requires confirmation to invoke a command such as load\&.off\&. Similarly, there is not yet a way to tell the user if a command succeeds or fails\&. +.sp +This is on the list of things to fix in the future, so don\(cqt despair\&. It involves magic cookies\&. +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBupsrw\fR(8) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upscmd.8 b/docs/man/upscmd.txt similarity index 52% rename from man/upscmd.8 rename to docs/man/upscmd.txt index c70ab73..d8550a9 100644 --- a/man/upscmd.8 +++ b/docs/man/upscmd.txt @@ -1,59 +1,67 @@ -.TH UPSCMD 8 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -upscmd \- UPS administration program for instant commands -.SH SYNOPSIS -.B upscmd \-h +UPSCMD(8) +========= -.B upscmd \-l \fIups\fR +NAME +---- +upscmd - UPS administration program for instant commands -.B upscmd [\-u \fIusername\fB] [\-p \fIpassword\fB] \fIups\fB \fIcommand\fR +SYNOPSIS +-------- +*upscmd* -h -.SH DESCRIPTION +*upscmd* -l 'ups' -.B upscmd -allows you to invoke "instant commands" in your UPS hardware. -Not all hardware supports this, so check the list with \-l to see if -anything will work on your equipment. +*upscmd* [-u 'username'] [-p 'password'] 'ups' 'command' + +DESCRIPTION +----------- + +*upscmd* allows you to invoke "instant commands" in your UPS hardware. +Not all hardware supports this, so check the list with -l to see if anything +will work on your equipment. On hardware that supports it, you can use this program to start and stop battery tests, invoke a front panel test (beep!), turn the load on or off, and more. -.SH OPTIONS +OPTIONS +------- -.IP \-h +*-h*:: Display the help message. -.IP "\-l \fIups\fR" +*-l* 'ups':: Show the list of supported instant commands on that UPS. Some hardware may not support any of them. -.IP "\-u \fIusername\fR" +*-u* 'username':: Set the username for the connection to the server. This is optional, and -you will be prompted for this when invoking a command if \-u is not used. +you will be prompted for this when invoking a command if -u is not used. -.IP "\-p \fIpassword\fR" +*-p* 'password':: Set the password to authenticate to the server. This is also optional -like \-u, and you will be prompted for it if necessary. +like -u, and you will be prompted for it if necessary. -.IP \fIups\fR -Connect to this UPS. The format is upsname[@hostname[:port]]. The default +'ups':: +Connect to this UPS. The format is `upsname[@hostname[:port]]`. The default hostname is "localhost". -.SH UNATTENDED MODE +UNATTENDED MODE +--------------- If you run this program inside a shell script or similar to invoke a command, you will need to specify all of the information on the command -line. This means using \-u and \-p. Otherwise it will put up a prompt and +line. This means using -u and -p. Otherwise it will put up a prompt and your program will hang. This is not necessary when displaying the list, as the username and -password are not required for read\(hyonly mode. +password are not required for read-only mode. -.SH DANGEROUS COMMANDS +DANGEROUS COMMANDS +------------------ -Some drivers like \fBapcsmart\fR(8) have built\(hyin paranoia for the -dangerous commands like load.off. To make them actually turn off the +Some drivers like linkman:apcsmart[8] have built-in paranoia for the +dangerous commands like `load.off`. To make them actually turn off the load, you will have to send the command twice within a short window. That is, you will have to send it once, then send it again after 3 seconds elapse but before 15 seconds pass. @@ -61,24 +69,28 @@ seconds elapse but before 15 seconds pass. This paranoia is entirely defined within the driver. upsd and upscmd have no control over the timing. -.SH DIAGNOSTICS +DIAGNOSTICS +----------- upscmd won't work unless you provide a valid username and password. If -you get "access denied" errors, make sure that your \fBupsd.users\fR(5) has +you get "access denied" errors, make sure that your linkman:upsd.users[5] has an entry for you, and that the username you are using has permissions to SET variables. -.SH BUGS +BUGS +---- There is currently no way to tell the user when the driver requires -confirmation to invoke a command such as load.off. Similarly, there is +confirmation to invoke a command such as `load.off`. Similarly, there is not yet a way to tell the user if a command succeeds or fails. This is on the list of things to fix in the future, so don't despair. It involves magic cookies. -.SH SEE ALSO -\fBupsd\fR(8), \fBupsrw\fR(8) +SEE ALSO +-------- +linkman:upsd[8], linkman:upsrw[8] -.SS Internet resources: +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upscode2.8 b/docs/man/upscode2.8 new file mode 100644 index 0000000..194362b --- /dev/null +++ b/docs/man/upscode2.8 @@ -0,0 +1,180 @@ +'\" t +.\" Title: upscode2 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSCODE2" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upscode2 \- Driver for UPScode II compatible UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the upscode2 driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +This driver supports UPS equipment which can be controlled via the UPScode II protocol\&. This is mainly Fiskars, Powerware equipment, but also some (probably OEM\(cqed) products from Compaq\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBmanufacturer\fR=\fIvalue\fR +.RS 4 +Autodetection of this parameter is not possible yet (and it probably never will be)\&. Therefore, this user\-defined string accepts any name\&. The default is +\fIunknown\fR\&. +.RE +.PP +\fBinput_timeout\fR=\fIvalue\fR +.RS 4 +The timeout waiting for a response from the UPS\&. Some UPS models have shown to be rather slow, resulting in frequent messages about empty responses from the UPS\&. If you see this, try increasing this value\&. +.RE +.PP +\fBoutput_pace\fR=\fIvalue\fR +.RS 4 +Delay between characters sent to the UPS\&. This was added for completeness with the above parameter\&. It has not shown to be needed yet\&. +.RE +.PP +\fBbaudrate\fR=\fIvalue\fR +.RS 4 +The default baudrate is 1200, which is the standard for the UPScode II protocol\&. +.RE +.PP +\fBfull_update_timer\fR=\fIvalue\fR +.RS 4 +Number of seconds between collection of normative values\&. +.RE +.PP +\fBuse_crlf\fR +.RS 4 +Flag to set if commands towards to UPS need to be terminated with CR\-LF, and not just CR\&. +.RE +.PP +\fBuse_pre_lf\fR +.RS 4 +Flag to set if commands towards to UPS need to be introduced with an LF\&. A Compaq T1500h is known to need this\&. +.RE +.SH "COMMANDS" +.sp +The driver supports the following commands for those UPSen that support them\&. The available commands are autodetected during initialization, so you should check availability with \fIupscmd \-l\fR\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.panel\&.start \- Start UPS self test +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.battery\&.start \- Start battery self test +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +beeper\&.enable \- Enable UPS beeper +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +beeper\&.disable \- Disable UPS beeper +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.return \- Shut down in 1 second and wait for power to return +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.stayoff \- Shut down in 1 seconds +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.reboot \- Shut down in 1 seconds and reboot after 1 minute +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown\&.reboot\&.graceful \- Shut down in 20 seconds and reboot after 1 minute +.RE +.SH "NOTES" +.sp +The Powerware UPS models that this driver has been tested against until now have not returned a value for \fIbattery\&.charge\fR\&. Therefore, the driver will guestimate a value based on the nominal battery min/max and the current battery voltage\&. +.SH "AUTHOR" +.sp +Håvard Lygre , Niels Baggesen +.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/ diff --git a/docs/man/upscode2.txt b/docs/man/upscode2.txt new file mode 100644 index 0000000..5e9cfda --- /dev/null +++ b/docs/man/upscode2.txt @@ -0,0 +1,99 @@ +UPSCODE2(8) +=========== + +NAME +---- +upscode2 - Driver for UPScode II compatible UPS equipment + +NOTE +---- +This man page only documents the hardware-specific features of the +upscode2 driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +This driver supports UPS equipment which can be controlled via the UPScode II +protocol. This is mainly Fiskars, Powerware equipment, but also +some (probably OEM'ed) products from Compaq. + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*manufacturer*='value':: +Autodetection of this parameter is not possible yet (and it probably +never will be). Therefore, this user-defined string accepts any name. The +default is 'unknown'. + +*input_timeout*='value':: +The timeout waiting for a response from the UPS. Some UPS models have +shown to be rather slow, resulting in frequent messages about empty +responses from the UPS. If you see this, try increasing this value. + +*output_pace*='value':: +Delay between characters sent to the UPS. This was added for completeness +with the above parameter. It has not shown to be needed yet. + +*baudrate*='value':: +The default baudrate is 1200, which is the standard for the UPScode II +protocol. + +*full_update_timer*='value':: +Number of seconds between collection of normative values. + +*use_crlf*:: +Flag to set if commands towards to UPS need to be terminated with CR-LF, +and not just CR. + +*use_pre_lf*:: +Flag to set if commands towards to UPS need to be introduced with an LF. +A Compaq T1500h is known to need this. + +COMMANDS +-------- + +The driver supports the following commands for those UPSen that support them. +The available commands are autodetected during initialization, +so you should check availability with 'upscmd -l'. + + * test.panel.start - Start UPS self test + + * test.battery.start - Start battery self test + + * beeper.enable - Enable UPS beeper + + * beeper.disable - Disable UPS beeper + + * shutdown.return - Shut down in 1 second and wait for power to return + + * shutdown.stayoff - Shut down in 1 seconds + + * shutdown.reboot - Shut down in 1 seconds and reboot after 1 minute + + * shutdown.reboot.graceful - Shut down in 20 seconds and reboot after 1 minute + +NOTES +----- + +The Powerware UPS models that this driver has been tested against until now +have not returned a value for 'battery.charge'. Therefore, the driver will +guestimate a value based on the nominal battery min/max and the current +battery voltage. + +AUTHOR +------ +Håvard Lygre , +Niels Baggesen + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsd.8 b/docs/man/upsd.8 new file mode 100644 index 0000000..1d29102 --- /dev/null +++ b/docs/man/upsd.8 @@ -0,0 +1,140 @@ +'\" t +.\" Title: upsd +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSD" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsd \- UPS information server +.SH "SYNOPSIS" +.sp +\fBupsd\fR \-h +.sp +\fBupsd\fR [\fIOPTIONS\fR] +.SH "DESCRIPTION" +.sp +\fBupsd\fR is responsible for serving the data from the drivers to the clients\&. It connects to each driver and maintains a local cache of the current state\&. Queries from the clients are served from this cache, so delays are minimal\&. +.sp +It also conveys administrative messages from the clients back to the drivers, such as starting tests, or setting values\&. +.sp +Communication between \fBupsd\fR and clients is handled on a TCP port\&. Configuration details for this port are described in \fBupsd.conf\fR(8)\&. +.sp +This program is essential, and must be running at all times to actually make any use out of the drivers and clients\&. +.sp +Controls in the configuration files allow you to limit access to the server, but you should also use a firewall for extra protection\&. Client processes such as \fBupsmon\fR(8) trust \fBupsd\fR for status information about the UPS hardware, so keep it secure\&. +.SH "OPTIONS" +.PP +\fB\-c\fR \fIcommand\fR +.RS 4 +Send +\fIcommand\fR +to the background process as a signal\&. Valid commands are: +.PP +\fBreload\fR +.RS 4 +reread configuration files +.RE +.PP +\fBstop\fR +.RS 4 +stop process and exit +.RE +.RE +.PP +\fB\-D\fR +.RS 4 +Raise the debug level\&. Use this multiple times for additional details\&. +.RE +.PP +\fB\-h\fR +.RS 4 +Display the help text\&. +.RE +.PP +\fB\-r\fR \fIdirectory\fR +.RS 4 +upsd will +\fBchroot\fR(2) to +\fIdirectory\fR +shortly after startup and before parsing any configuration files with this option set\&. You can use this to create a "jail" for greater security\&. +.sp +You must coordinate this with your drivers, as upsd must be able to find the state path within +\fIdirectory\fR\&. See +\fBupsdrvctl\fR(8) +and +\fBnutupsdrv\fR(8)\&. +.RE +.PP +\fB\-u\fR \fIuser\fR +.RS 4 +Switch to user +\fIuser\fR +after startup if started as root\&. This overrides whatever you may have compiled in with +configure \-\-with\-user\&. +.RE +.PP +\fB\-V\fR +.RS 4 +Display the version of the program\&. +.RE +.SH "RELOADING" +.sp +upsd can reload its configuration files without shutting down the process if you send it a SIGHUP or start it again with \-c reload\&. This only works if the background process is able to read those files\&. +.sp +If you think that upsd can\(cqt reload, check your syslogs for error messages\&. If it\(cqs complaining about not being able to read the files, then you need to adjust your system to make it possible\&. Either change the permissions on the files, or run upsd as another user that will be able to read them\&. +.sp +DO NOT make your upsd\&.conf or upsd\&.users world\-readable, as those files hold important authentication information\&. In the wrong hands, it could be used by some evil person to spoof your master upsmon and command your systems to shut down\&. +.SH "DIAGNOSTICS" +.sp +upsd expects the drivers to either update their status regularly or at least answer periodic queries, called pings\&. If a driver doesn\(cqt answer, upsd will declare it "stale" and no more information will be provided to the clients\&. +.sp +If upsd complains about staleness when you start it, then either your driver or configuration files are probably broken\&. Be sure that the driver is actually running, and that the UPS definition in \fBups.conf\fR(5) is correct\&. Also make sure that you start your driver(s) before starting upsd\&. +.sp +Data can also be marked stale if the driver can no longer communicate with the UPS\&. In this case, the driver should also provide diagnostic information in the syslog\&. If this happens, check the serial or USB cabling, or inspect the network path in the case of a SNMP UPS\&. +.SH "ACCESS CONTROL" +.sp +If the server is build with tcp\-wrappers support enabled, it will check if the NUT username is allowed to connect from the client address through the /etc/hosts\&.allow and /etc/hosts\&.deny files\&. Note that this will only be done for commands that require to be logged into the server\&. Further details are described in \fBhosts_access\fR(5)\&. +.SH "FILES" +.sp +The general upsd configuration file is \fBupsd.conf\fR(5)\&. The administrative functions like SET and INSTCMD for users are defined and controlled in \fBupsd.users\fR(5)\&. UPS definitions are found in \fBups.conf\fR(5)\&. +.SH "ENVIRONMENT VARIABLES" +.sp +\fBNUT_CONFPATH\fR is the path name of the directory that contains upsd\&.conf and other configuration files\&. If this variable is not set, \fBupsd\fR uses a built\-in default, which is often /usr/local/ups/etc\&. +.sp +\fBNUT_STATEPATH\fR is the path name of the directory in which \fBupsd\fR keeps state information\&. If this variable is not set, \fBupsd\fR uses a built\-in default, which is often /var/state/ups\&. The \fBSTATEPATH\fR directive in \fBupsd.conf\fR(5) overrides this variable\&. +.SH "SEE ALSO" +.SS "Clients:" +.sp +\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupslog\fR(8), \fBupsmon\fR(8) +.SS "CGI programs:" +.sp +\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.SS "Drivers:" +.sp +\fBnutupsdrv\fR(8), \fBapcsmart\fR(8), \fBbelkin\fR(8), \fBbelkinunv\fR(8), \fBbestuferrups\fR(8), \fBbestups\fR(8), \fBcyberpower\fR(8), \fBenergizerups\fR(8), \fBetapro\fR(8), \fBeverups\fR(8), \fBgenericups\fR(8), \fBisbmex\fR(8), \fBliebert\fR(8), \fBmasterguard\fR(8), \fBmge-shut\fR(8), \fBmge-utalk\fR(8), \fBoneac\fR(8), \fBpowercom\fR(8), \fBsafenet\fR(8), \fBsnmp-ups\fR(8), \fBtripplite\fR(8), \fBtripplitesu\fR(8), \fBvictronups\fR(8), +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsd.conf.5 b/docs/man/upsd.conf.5 new file mode 100644 index 0000000..2f9b2a8 --- /dev/null +++ b/docs/man/upsd.conf.5 @@ -0,0 +1,94 @@ +'\" t +.\" Title: upsd.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSD\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsd.conf \- Configuration for Network UPS Tools upsd +.SH "DESCRIPTION" +.sp +upsd uses this file to control access to the server and set some other miscellaneous configuration values\&. This file contains details on access controls, so keep it secure\&. Ideally, only the upsd process should be able to read it\&. +.SH "CONFIGURATION DIRECTIVES" +.PP +"MAXAGE \fIseconds\fR" +.RS 4 +upsd usually allows a driver to stop responding for up to 15 seconds before declaring the data "stale"\&. If your driver takes a very long time to process updates but is otherwise operational, you can use MAXAGE to make upsd wait longer\&. +.sp +Most users should leave this at the default value\&. +.RE +.PP +"STATEPATH \fIpath\fR" +.RS 4 +Tell upsd to look for the driver state sockets in +\fIpath\fR +rather than the default that was compiled into the program\&. +.RE +.PP +"LISTEN \fIinterface\fR \fIport\fR" +.RS 4 +Bind a listening port to the interface specified by its Internet address\&. This may be useful on hosts with multiple interfaces\&. You should not rely exclusively on this for security, as it can be subverted on many systems\&. +.sp +Listen on TCP port +\fIport\fR +instead of the default value which was compiled into the code\&. This overrides any value you may have set with +\fIconfigure \-\-with\-port\fR\&. If you don\(cqt change it with configure or this value, upsd will listen on port 3493 for this interface\&. +.sp +Multiple LISTEN addresses may be specified\&. The default is to bind to 127\&.0\&.0\&.1 if no LISTEN addresses are specified (and ::1 if IPv6 support is compiled in)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +LISTEN 127\&.0\&.0\&.1 +LISTEN 192\&.168\&.50\&.1 +LISTEN ::1 +LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344 +.fi +.if n \{\ +.RE +.\} +.sp +This parameter will only be read at startup\&. You\(cqll need to restart (rather than reload) upsd to apply any changes made here\&. +.RE +.PP +"MAXCONN \fIconnections\fR" +.RS 4 +This defaults to maximum number allowed on your system\&. Each UPS, each LISTEN address and each client count as one connection\&. If the server runs out of connections, it will no longer accept new incoming client connections\&. Only set this if you know exactly what you\(cqre doing\&. +.RE +.PP +"CERTFILE \fIcertificate file\fR" +.RS 4 +When compiled with SSL support, you can enter the certificate file here\&. The certificates must be in PEM format and must be sorted starting with the subject\(cqs certificate (server certificate), followed by intermediate CA certificates (if applicable_ and the highest level (root) CA\&. It should end with the server key\&. See +\fIdocs/security\&.txt\fR +or the Security chapter of NUT user manual for more information on the SSL support in NUT\&. +.RE +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsd.users\fR(5) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsd.conf.5 b/docs/man/upsd.conf.txt similarity index 51% rename from man/upsd.conf.5 rename to docs/man/upsd.conf.txt index f9245df..ab4d9c8 100644 --- a/man/upsd.conf.5 +++ b/docs/man/upsd.conf.txt @@ -1,67 +1,81 @@ -.TH UPSD.CONF 5 "Mon Nov 30 2009" "" "Network UPS Tools (NUT)" -.SH NAME -upsd.conf \- Configuration for Network UPS Tools upsd +UPSD.CONF(5) +============ -.SH DESCRIPTION +NAME +---- + +upsd.conf - Configuration for Network UPS Tools upsd + +DESCRIPTION +----------- upsd uses this file to control access to the server and set some other miscellaneous configuration values. This file contains details on access controls, so keep it secure. Ideally, only the upsd process should be able to read it. -.SH CONFIGURATION DIRECTIVES +CONFIGURATION DIRECTIVES +------------------------ -.IP "MAXAGE \fIseconds\fR" +"MAXAGE 'seconds'":: upsd usually allows a driver to stop responding for up to 15 seconds before declaring the data "stale". If your driver takes a very long time to process updates but is otherwise operational, you can use MAXAGE to make upsd wait longer. - ++ Most users should leave this at the default value. -.IP "STATEPATH \fIpath\fR" +"STATEPATH 'path'":: -Tell upsd to look for the driver state sockets in \fIpath\fR rather +Tell upsd to look for the driver state sockets in 'path' rather than the default that was compiled into the program. -.IP "LISTEN \fIinterface\fR \fIport\fR" +"LISTEN 'interface' 'port'":: Bind a listening port to the interface specified by its Internet address. This may be useful on hosts with multiple interfaces. You should not rely exclusively on this for security, as it can be subverted on many systems. - -Listen on TCP port \fIport\fR instead of the default value which was ++ +Listen on TCP port 'port' instead of the default value which was compiled into the code. This overrides any value you may have set -with 'configure \-\-with\-port'. If you don't change it with configure +with 'configure --with-port'. If you don't change it with configure or this value, upsd will listen on port 3493 for this interface. - ++ Multiple LISTEN addresses may be specified. The default is to bind to 127.0.0.1 if no LISTEN addresses are specified (and ::1 if IPv6 support is compiled in). -.IP -.nf LISTEN 127.0.0.1 LISTEN 192.168.50.1 LISTEN ::1 LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344 -.fi -.LP - ++ This parameter will only be read at startup. You'll need to restart (rather than reload) upsd to apply any changes made here. -.SH UPGRADING FROM OLDER VERSIONS +"MAXCONN 'connections'":: -The ACL/ACCEPT/REJECT mechanism that existed in versions before -nut-2.4.0 has been removed. You'll want to use the LISTEN directive -to limit the addresses the server listens at on multihomed systems. -If this is not fine grained enough, use a firewall. +This defaults to maximum number allowed on your system. Each UPS, each +LISTEN address and each client count as one connection. If the server +runs out of connections, it will no longer accept new incoming client +connections. Only set this if you know exactly what you're doing. -.SH SEE ALSO -\fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsd.users\fR(5) +"CERTFILE 'certificate file'":: -.SS Internet resources: +When compiled with SSL support, you can enter the certificate file here. +The certificates must be in PEM format and must be sorted starting with +the subject's certificate (server certificate), followed by intermediate +CA certificates (if applicable_ and the highest level (root) CA. It should +end with the server key. See 'docs/security.txt' or the Security chapter of +NUT user manual for more information on the SSL support in NUT. + +SEE ALSO +-------- + +linkman:upsd[8], linkman:nutupsdrv[8], linkman:upsd.users[5] + +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsd.txt b/docs/man/upsd.txt new file mode 100644 index 0000000..64cff41 --- /dev/null +++ b/docs/man/upsd.txt @@ -0,0 +1,160 @@ +UPSD(8) +======= + +NAME +---- + +upsd - UPS information server + +SYNOPSIS +-------- +*upsd* -h + +*upsd* ['OPTIONS'] + +DESCRIPTION +----------- + +*upsd* is responsible for serving the data from the drivers to the clients. It +connects to each driver and maintains a local cache of the current state. +Queries from the clients are served from this cache, so delays are minimal. + +It also conveys administrative messages from the clients back to the drivers, +such as starting tests, or setting values. + +Communication between *upsd* and clients is handled on a TCP port. +Configuration details for this port are described in linkman:upsd.conf[8]. + +This program is essential, and must be running at all times to actually +make any use out of the drivers and clients. + +Controls in the configuration files allow you to limit access to the +server, but you should also use a firewall for extra protection. Client +processes such as linkman:upsmon[8] trust *upsd* for status information about +the UPS hardware, so keep it secure. + +OPTIONS +------- + +*-c* 'command':: +Send 'command' to the background process as a signal. Valid commands +are: + + *reload*;; reread configuration files + *stop*;; stop process and exit + +*-D*:: +Raise the debug level. Use this multiple times for additional details. + +*-h*:: +Display the help text. + +*-r* 'directory':: +upsd will *chroot*(2) to 'directory' shortly after startup +and before parsing any configuration files with this option set. You +can use this to create a "jail" for greater security. ++ +You must coordinate this with your drivers, as upsd must be able to find +the state path within 'directory'. See linkman:upsdrvctl[8] and +linkman:nutupsdrv[8]. + +*-u* 'user':: +Switch to user 'user' after startup if started as root. This +overrides whatever you may have compiled in with `configure +--with-user`. + +*-V*:: +Display the version of the program. + +RELOADING +--------- + +upsd can reload its configuration files without shutting down the process +if you send it a SIGHUP or start it again with `-c reload`. This only works +if the background process is able to read those files. + +If you think that upsd can't reload, check your syslogs for error messages. +If it's complaining about not being able to read the files, then you need +to adjust your system to make it possible. Either change the permissions +on the files, or run upsd as another user that will be able to read them. + +DO NOT make your upsd.conf or upsd.users world-readable, as those files +hold important authentication information. In the wrong hands, it could +be used by some evil person to spoof your master upsmon and command your +systems to shut down. + +DIAGNOSTICS +----------- + +upsd expects the drivers to either update their status regularly or at +least answer periodic queries, called pings. If a driver doesn't +answer, upsd will declare it "stale" and no more information will be +provided to the clients. + +If upsd complains about staleness when you start it, then either your +driver or configuration files are probably broken. Be sure that the +driver is actually running, and that the UPS definition in +linkman:ups.conf[5] is correct. Also make sure that you start your +driver(s) before starting upsd. + +Data can also be marked stale if the driver can no longer communicate +with the UPS. In this case, the driver should also provide diagnostic +information in the syslog. If this happens, check the serial or +USB cabling, or inspect the network path in the case of a SNMP UPS. + +ACCESS CONTROL +-------------- + +If the server is build with tcp-wrappers support enabled, it will check if +the NUT username is allowed to connect from the client address through the +`/etc/hosts.allow` and `/etc/hosts.deny` files. Note that this will +only be done for commands that require to be logged into the server. Further +details are described in *hosts_access*(5). + +FILES +----- + +The general upsd configuration file is linkman:upsd.conf[5]. The +administrative functions like SET and INSTCMD for users are defined and +controlled in linkman:upsd.users[5]. UPS definitions are found in +linkman:ups.conf[5]. + +ENVIRONMENT VARIABLES +--------------------- + +*NUT_CONFPATH* is the path name of the directory that contains +`upsd.conf` and other configuration files. If this variable is not set, +*upsd* uses a built-in default, which is often `/usr/local/ups/etc`. + +*NUT_STATEPATH* is the path name of the directory in which +*upsd* keeps state information. If this variable is not set, +*upsd* uses a built-in default, which is often `/var/state/ups`. +The *STATEPATH* directive in linkman:upsd.conf[5] overrides this variable. + +SEE ALSO +-------- + +Clients: +~~~~~~~~ +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upslog[8], linkman:upsmon[8] + +CGI programs: +~~~~~~~~~~~~~ +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] + +Drivers: +~~~~~~~~ +linkman:nutupsdrv[8], +linkman:apcsmart[8], linkman:belkin[8], linkman:belkinunv[8], +linkman:bestuferrups[8], linkman:bestups[8], +linkman:cyberpower[8], linkman:energizerups[8], linkman:etapro[8], +linkman:everups[8], linkman:genericups[8], +linkman:isbmex[8], linkman:liebert[8], linkman:masterguard[8], +linkman:mge-shut[8], linkman:mge-utalk[8], linkman:oneac[8], +linkman:powercom[8], linkman:safenet[8], linkman:snmp-ups[8], +linkman:tripplite[8], linkman:tripplitesu[8], linkman:victronups[8], + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsd.users.5 b/docs/man/upsd.users.5 new file mode 100644 index 0000000..f6246ab --- /dev/null +++ b/docs/man/upsd.users.5 @@ -0,0 +1,133 @@ +'\" t +.\" Title: upsd.users +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSD\&.USERS" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsd.users \- Administrative user definitions for NUT upsd +.SH "DESCRIPTION" +.sp +Administrative commands such as setting variables and the instant commands are powerful, and access to them needs to be restricted\&. This file defines who may access them, and what is available\&. +.sp +Each user gets its own section\&. The fields in that section set the parameters associated with that user\(cqs privileges\&. The section begins with the name of the user in brackets, and continues until the next user name in brackets or EOF\&. These users are independent of /etc/passwd\&. +.sp +Here are some examples to get you started: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[admin] + password = mypass + actions = set + instcmds = all +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[pfy] + password = duh + instcmds = test\&.panel\&.start + instcmds = test\&.panel\&.stop +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[monmaster] + password = blah + upsmon master +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[monslave] + password = abcd + upsmon slave +.fi +.if n \{\ +.RE +.\} +.SH "FIELDS" +.PP +\fBpassword\fR +.RS 4 +Set the password for this user\&. +.RE +.PP +\fBactions\fR +.RS 4 +Allow the user to do certain things with upsd\&. Valid actions are: +.PP +SET +.RS 4 +change the value of certain variables in the UPS +.RE +.PP +FSD +.RS 4 +set the forced shutdown flag in the UPS\&. This is equivalent to an "on battery + low battery" situation for the purposes of monitoring\&. +.sp +The list of actions is expected to grow in the future\&. +.RE +.RE +.PP +\fBinstcmds\fR +.RS 4 +Let a user initiate specific instant commands\&. Use "ALL" to grant all commands automatically\&. To specify multiple commands, use multiple instances of the instcmds field\&. For the full list of what your UPS supports, use "upscmd \-l"\&. +.sp +The +cmdvartab +file supplied with the distribution contains a list of most of the known command names\&. +.RE +.PP +\fBupsmon\fR +.RS 4 +Add the necessary actions for a upsmon process to work\&. This is either set to "master" or "slave"\&. +.sp +Do not attempt to assign actions to upsmon by hand, as you may miss something important\&. This method of designating a "upsmon user" was created so internal capabilities could be changed later on without breaking existing installations\&. +.RE +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBupsd.conf\fR(5) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsd.users.5 b/docs/man/upsd.users.txt similarity index 64% rename from man/upsd.users.5 rename to docs/man/upsd.users.txt index 01f42a2..457bc33 100644 --- a/man/upsd.users.5 +++ b/docs/man/upsd.users.txt @@ -1,8 +1,12 @@ -.TH UPSD.USERS 5 "Mon Nov 30 2009" "" "Network UPS Tools (NUT)" -.SH NAME -upsd.users \- Administrative user definitions for NUT upsd +UPSD.USERS(5) +============= -.SH DESCRIPTION +NAME +---- +upsd.users - Administrative user definitions for NUT upsd + +DESCRIPTION +----------- Administrative commands such as setting variables and the instant commands are powerful, and access to them needs to be restricted. This @@ -11,12 +15,10 @@ file defines who may access them, and what is available. Each user gets its own section. The fields in that section set the parameters associated with that user's privileges. The section begins with the name of the user in brackets, and continues until the next user -name in brackets or EOF. +name in brackets or EOF. These users are independent of /etc/passwd. Here are some examples to get you started: -.IP -.nf [admin] password = mypass actions = set @@ -25,6 +27,7 @@ Here are some examples to get you started: [pfy] password = duh instcmds = test.panel.start + instcmds = test.panel.stop [monmaster] password = blah @@ -33,57 +36,53 @@ Here are some examples to get you started: [monslave] password = abcd upsmon slave -.fi -.LP -.SH FIELDS +FIELDS +------ -.IP password +*password*:: Set the password for this user. -.IP actions +*actions*:: Allow the user to do certain things with upsd. Valid actions are: - SET \(hy change the value of certain variables in the UPS + SET;; change the value of certain variables in the UPS - FSD \(hy set the forced shutdown flag in the UPS. This is + FSD;; set the forced shutdown flag in the UPS. This is equivalent to an "on battery + low battery" situation for the purposes of monitoring. - ++ The list of actions is expected to grow in the future. -.IP instcmds +*instcmds*:: Let a user initiate specific instant commands. Use "ALL" to grant all -commands automatically. For the full list of what your UPS supports, -use "upscmd \-l". - -The \fBcmdvartab\fR file supplied with the distribution contains a list +commands automatically. To specify multiple commands, use multiple +instances of the instcmds field. For the full list of what your UPS +supports, use "upscmd -l". ++ +The +cmdvartab+ file supplied with the distribution contains a list of most of the known command names. -.IP upsmon +*upsmon*:: Add the necessary actions for a upsmon process to work. This is either set to "master" or "slave". - ++ Do not attempt to assign actions to upsmon by hand, as you may miss something important. This method of designating a "upsmon user" was created so internal capabilities could be changed later on without breaking existing installations. -.SH UPGRADING FROM OLDER VERSIONS +SEE ALSO +-------- -The \fIallowfrom\fR mechanism that existed in versions before nut-2.4.0 -has been replaced by tcp-wrappers. Further details are described in -\fBupsd\fR(8). +linkman:upsd[8], linkman:upsd.conf[5] -.SH SEE ALSO - -\fBupsd\fR(8), \fBupsd.conf\fR(5) - -.SS Internet resources: +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsdrvctl.8 b/docs/man/upsdrvctl.8 new file mode 100644 index 0000000..2b9b068 --- /dev/null +++ b/docs/man/upsdrvctl.8 @@ -0,0 +1,127 @@ +'\" t +.\" Title: upsdrvctl +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSDRVCTL" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsdrvctl \- UPS driver controller +.SH "SYNOPSIS" +.sp +\fBupsdrvctl\fR \-h +.sp +\fBupsdrvctl\fR [\fIOPTIONS\fR] {start | stop | shutdown} [\fIups\fR] +.SH "DESCRIPTION" +.sp +\fBupsdrvctl\fR provides a uniform interface for controlling your UPS drivers\&. You should use upsdrvctl instead of direct calls to the drivers whenever possible\&. +.sp +When used properly, upsdrvctl lets you maintain identical startup scripts across multiple systems with different UPS configurations\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help text\&. +.RE +.PP +\fB\-r\fR \fIdirectory\fR +.RS 4 +If starting a driver, this value will direct it to +\fBchroot\fR(2) into +\fIdirectory\fR\&. This can be useful when securing systems\&. +.RE +.sp +This may be set in the ups\&.conf with "chroot" in the global section\&. +.PP +\fB\-t\fR +.RS 4 +Enable testing mode\&. This also enables debug mode\&. Testing mode makes upsdrvctl display the actions it would execute without actually doing them\&. Use this to test out your configuration without actually doing anything to your UPS drivers\&. This may be helpful when defining the +\fIsdorder\fR +directive in your +\fBups.conf\fR(5)\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +If starting a driver, this value will direct it to +\fBsetuid\fR(2) to the user id associated with +\fIusername\fR\&. +.RE +.sp +If the driver is started as root without specifying this value, it will use the username that was compiled into the binary\&. This defaults to "nobody", and is far from ideal\&. +.sp +This may be set in ups\&.conf with "user" in the global section\&. +.PP +\fB\-D\fR +.RS 4 +Raise the debug level\&. Use this multiple times for additional details\&. +.RE +.SH "COMMANDS" +.sp +upsdrvctl supports three commands \- start, stop and shutdown\&. They take an optional argument which is a UPS name from \fBups.conf\fR(5)\&. Without that argument, they operate on every UPS that is currently configured\&. +.PP +\fBstart\fR +.RS 4 +Start the UPS driver(s)\&. +.RE +.PP +\fBstop\fR +.RS 4 +Stop the UPS driver(s)\&. +.RE +.PP +\fBshutdown\fR +.RS 4 +Command the UPS driver(s) to run their shutdown sequence\&. Drivers are stopped according to their sdorder value \- see +\fBups.conf\fR(5)\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +.sp +this will probably power off your computers, so don\(cqt play around with this option\&. Only use it when your systems are prepared to lose power\&. +.sp .5v +.RE +.SH "ENVIRONMENT VARIABLES" +.sp +\fBNUT_CONFPATH\fR is the path name of the directory that contains upsd\&.conf and other configuration files\&. If this variable is not set, \fBupsdrvctl\fR the driver use a built\-in default, which is often /usr/local/ups/etc\&. +.SH "DIAGNOSTICS" +.sp +upsdrvctl will return a nonzero exit code if it encounters an error while performing the desired operation\&. This will also happen if a driver takes longer than the \fImaxstartdelay\fR period to enter the background\&. +.SH "SEE ALSO" +.sp +\fBnutupsdrv\fR(8), \fBupsd\fR(8), \fBups.conf\fR(5) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsdrvctl.8 b/docs/man/upsdrvctl.txt similarity index 52% rename from man/upsdrvctl.8 rename to docs/man/upsdrvctl.txt index 96031b9..f19fd77 100644 --- a/man/upsdrvctl.8 +++ b/docs/man/upsdrvctl.txt @@ -1,41 +1,49 @@ -.TH UPSDRVCTL 8 "Sat Jan 31 2004" "" "Network UPS Tools (NUT)" -.SH NAME -upsdrvctl \- UPS driver controller -.SH SYNOPSIS -.B upsdrvctl \-h +UPSDRVCTL(8) +============ -.B upsdrvctl [OPTIONS] {start | stop | shutdown} [\fIups\fB] +NAME +---- -.SH DESCRIPTION +upsdrvctl - UPS driver controller -upsdrvctl provides a uniform interface for controlling your UPS drivers. +SYNOPSIS +-------- +*upsdrvctl* -h + +*upsdrvctl* ['OPTIONS'] {start | stop | shutdown} ['ups'] + +DESCRIPTION +----------- + +*upsdrvctl* provides a uniform interface for controlling your UPS drivers. You should use upsdrvctl instead of direct calls to the drivers whenever possible. When used properly, upsdrvctl lets you maintain identical startup scripts across multiple systems with different UPS configurations. -.SH OPTIONS +OPTIONS +------- -.IP \-h -Display the help message. +*-h*:: +Display the help text. -.IP "\-r \fIdirectory\fR" -If starting a driver, this value will direct it to \fBchroot\fR(2) into -\fIdirectory\fR. This can be useful when securing systems. +*-r* 'directory':: +If starting a driver, this value will direct it to *chroot*(2) into +'directory'. This can be useful when securing systems. This may be set in the ups.conf with "chroot" in the global section. -.IP \-t +*-t*:: Enable testing mode. This also enables debug mode. Testing mode makes upsdrvctl display the actions it would execute without actually doing them. Use this to test out your configuration without actually doing anything to your UPS drivers. This may be helpful when defining the 'sdorder' -directive in your \fBups.conf\fR(5). +directive in your linkman:ups.conf[5]. -.IP "\-u \fIusername\fR" -If starting a driver, this value will direct it to \fBsetuid\fR(2) to -the user id associated with \fIusername\fR. +*-u* 'username':: +If starting a driver, this value will direct it to *setuid*(2) to +the user id associated with 'username'. If the driver is started as root without specifying this value, it will use the username that was compiled into the binary. This defaults to @@ -43,44 +51,51 @@ use the username that was compiled into the binary. This defaults to This may be set in ups.conf with "user" in the global section. -.IP "\-D" +*-D*:: Raise the debug level. Use this multiple times for additional details. -.SH COMMANDS +COMMANDS +-------- -upsdrvctl supports three commands \(hy start, stop and shutdown. They take -an optional argument which is a UPS name from \fBups.conf\fR(5). +upsdrvctl supports three commands - start, stop and shutdown. They take +an optional argument which is a UPS name from linkman:ups.conf[5]. Without that argument, they operate on every UPS that is currently configured. -.IP start +*start*:: Start the UPS driver(s). -.IP stop +*stop*:: Stop the UPS driver(s). -.IP shutdown +*shutdown*:: Command the UPS driver(s) to run their shutdown sequence. Drivers are -stopped according to their sdorder value \(hy see \fBups.conf\fR(5). +stopped according to their sdorder value - see linkman:ups.conf[5]. WARNING: this will probably power off your computers, so don't play around with this option. Only use it when your systems are prepared to lose power. -.SH ENVIRONMENT VARIABLES -\fBNUT_CONFPATH\fR is the path name of the directory that contains -\fBups.conf\fR. If this variable is not set, \fBupsdrvctl\fR and the -driver use a built\(hyin default, which is often \fB/usr/local/ups/etc\fR. +ENVIRONMENT VARIABLES +--------------------- -.SH DIAGNOSTICS +*NUT_CONFPATH* is the path name of the directory that contains +`upsd.conf` and other configuration files. If this variable is not set, +*upsdrvctl* the driver use a built-in default, which is often +`/usr/local/ups/etc`. + +DIAGNOSTICS +----------- upsdrvctl will return a nonzero exit code if it encounters an error while performing the desired operation. This will also happen if a -driver takes longer than the \fImaxstartdelay\fR period to enter the +driver takes longer than the 'maxstartdelay' period to enter the background. -.SH SEE ALSO -\fBnutupsdrv\fR(8), \fBupsd\fR(8) \fBups.conf\fR(5) +SEE ALSO +-------- +linkman:nutupsdrv[8], linkman:upsd[8], linkman:ups.conf[5] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsimage.cgi.8 b/docs/man/upsimage.cgi.8 new file mode 100644 index 0000000..d1f5eba --- /dev/null +++ b/docs/man/upsimage.cgi.8 @@ -0,0 +1,69 @@ +'\" t +.\" Title: upsimage.cgi +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSIMAGE\&.CGI" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsimage.cgi \- Image\-generating helper for upsstats\&.cgi +.SH "SYNOPSIS" +.sp +\fBupsimage\&.cgi\fR +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +As a CGI program, this should be invoked through your web server\&. If you run it from the command line, it will either complain about unauthorized access or spew a PNG at you\&. +.sp .5v +.RE +.SH "DESCRIPTION" +.sp +\fBupsimage\&.cgi\fR generates the graphical bars that make up the right side of the page generated by \fBupsstats.cgi\fR(8)\&. These represent the current battery charge, utility voltage, and UPS load where available\&. +.sp +The images are in PNG format, and are created by linking to Boutell\(cqs excellent gd library\&. +.SH "ACCESS CONTROL" +.sp +upsstats will only talk to \fBupsd\fR(8) servers that have been defined in your \fBhosts.conf\fR(5)\&. If it complains about "Access to that host is not authorized", check that file first\&. +.SH "FILES" +.sp +\fBhosts.conf\fR(5) +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBupsstats.cgi\fR(8) +.SS "Internet resources:" +.sp +The gd home page: http://www\&.boutell\&.com/gd/ +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsimage.cgi.txt b/docs/man/upsimage.cgi.txt new file mode 100644 index 0000000..1118bd2 --- /dev/null +++ b/docs/man/upsimage.cgi.txt @@ -0,0 +1,50 @@ +UPSIMAGE.CGI(8) +=============== + +NAME +---- + +upsimage.cgi - Image-generating helper for upsstats.cgi + +SYNOPSIS +-------- + +*upsimage.cgi* + +NOTE: As a CGI program, this should be invoked through your web server. +If you run it from the command line, it will either complain about +unauthorized access or spew a PNG at you. + +DESCRIPTION +----------- + +*upsimage.cgi* generates the graphical bars that make up the right side +of the page generated by linkman:upsstats.cgi[8]. These represent the +current battery charge, utility voltage, and UPS load where available. + +The images are in PNG format, and are created by linking to Boutell's +excellent gd library. + +ACCESS CONTROL +-------------- + +upsstats will only talk to linkman:upsd[8] servers that have been defined +in your linkman:hosts.conf[5]. If it complains about "Access to that host +is not authorized", check that file first. + +FILES +----- + +linkman:hosts.conf[5] + +SEE ALSO +-------- + +linkman:upsd[8], linkman:upsstats.cgi[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ + +The gd home page: http://www.boutell.com/gd/ + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upslog.8 b/docs/man/upslog.8 new file mode 100644 index 0000000..e3ff7f3 --- /dev/null +++ b/docs/man/upslog.8 @@ -0,0 +1,153 @@ +'\" t +.\" Title: upslog +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSLOG" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upslog \- UPS status logger +.SH "SYNOPSIS" +.sp +\fBupslog \-h\fR +.sp +\fBupslog\fR [\fIOPTIONS\fR] +.SH "DESCRIPTION" +.sp +\fBupslog\fR is a daemon that will poll a UPS at periodic intervals, fetch the variables that interest you, format them, and write them to a file\&. +.sp +The default format string includes variables that are supported by many common UPS models\&. See the description below to make your own\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help message\&. +.RE +.PP +\fB\-f\fR \fIformat\fR +.RS 4 +Monitor the UPS using this format string\&. Be sure to enclose +\fIformat\fR +in quotes so your shell doesn\(cqt split it up\&. Valid escapes within this string are: +.PP +%% +.RS 4 +Insert a single "%" +.RE +.PP +%TIME format% +.RS 4 +Insert the time with strftime formatting +.RE +.PP +%ETIME% +.RS 4 +Insert the number of seconds, ala time_t\&. This is now a 10 digit number\&. +.RE +.PP +%HOST% +.RS 4 +insert the local hostname +.RE +.PP +%UPSHOST% +.RS 4 +insert the host of the UPS being monitored +.RE +.PP +%PID% +.RS 4 +insert the pid of upslog +.RE +.PP +%VAR varname% +.RS 4 +insert the value of variable varname +.RE +.RE +.sp +The default format string is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +%TIME @Y@m@d @H@M@S% %VAR battery\&.charge% %VAR input\&.voltage% +%VAR ups\&.load% [%VAR ups\&.status%] %VAR ups\&.temperature% +%VAR input\&.frequency% +.fi +.if n \{\ +.RE +.\} +.PP +\fB\-i\fR \fIinterval\fR +.RS 4 +Wait this many seconds between polls\&. This defaults to 30 seconds\&. +.sp +If you require tighter timing, you should write your own logger using the +\fBupsclient\fR(3) +library\&. +.RE +.PP +\fB\-l\fR \fIlogfile\fR +.RS 4 +Store the results in this file\&. +.sp +You can use "\-" for stdout, but upslog will remain in the foreground\&. +.RE +.PP +\fB\-s\fR \fIups\fR +.RS 4 +Monitor this UPS\&. The format for this option is +upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +If started as root, upsmon will +\fBsetuid\fR(2) to the user id associated with +\fIusername\fR +for security\&. +.sp +If +\fIusername\fR +is not defined, it will use the value that was compiled into the program\&. This defaults to "nobody", which is less than ideal\&. +.RE +.SH "SERVICE DELAYS" +.sp +The interval value is merely the number given to \fBsleep\fR(3) after running through the format string\&. Therefore, a query will actually take slightly longer than the interval, depending on the speed of your system\&. +.SH "LOG ROTATION" +.sp +\fBupslog\fR writes its PID to upslog\&.pid, and will reopen the log file if you send it a SIGHUP\&. This allows it to keep running when the log is rotated by an external program\&. +.SH "SEE ALSO" +.SS "Server:" +.sp +\fBupsd\fR(8) +.SS "Clients:" +.sp +\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupsmon\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upslog.txt b/docs/man/upslog.txt new file mode 100644 index 0000000..b3603d8 --- /dev/null +++ b/docs/man/upslog.txt @@ -0,0 +1,110 @@ +UPSLOG(8) +========= + +NAME +---- + +upslog - UPS status logger + +SYNOPSIS +-------- + +*upslog -h* + +*upslog* ['OPTIONS'] + +DESCRIPTION +----------- + +*upslog* is a daemon that will poll a UPS at periodic intervals, fetch the +variables that interest you, format them, and write them to a file. + +The default format string includes variables that are supported by many +common UPS models. See the description below to make your own. + +OPTIONS +------- + +*-h*:: +Display the help message. + +*-f* 'format':: +Monitor the UPS using this format string. Be sure to enclose +'format' in quotes so your shell doesn't split it up. Valid escapes +within this string are: + +%%;; Insert a single "%" + +%TIME format%;; Insert the time with strftime formatting + +%ETIME%;; Insert the number of seconds, ala time_t. This is now a +10 digit number. + +%HOST%;; insert the local hostname + +%UPSHOST%;; insert the host of the UPS being monitored + +%PID%;; insert the pid of upslog + +%VAR varname%;; insert the value of variable varname + +The default format string is: + + %TIME @Y@m@d @H@M@S% %VAR battery.charge% %VAR input.voltage% + %VAR ups.load% [%VAR ups.status%] %VAR ups.temperature% + %VAR input.frequency% + +*-i* 'interval':: + +Wait this many seconds between polls. This defaults to 30 seconds. ++ +If you require tighter timing, you should write your own logger using +the linkman:upsclient[3] library. + +*-l* 'logfile':: + +Store the results in this file. ++ +You can use "-" for stdout, but upslog will remain in the foreground. + +*-s* 'ups':: +Monitor this UPS. The format for this option is ++upsname[@hostname[:port]]+. The default hostname is "localhost". + +*-u* 'username':: + +If started as root, upsmon will *setuid*(2) to the user id +associated with 'username' for security. ++ +If 'username' is not defined, it will use the value that was compiled into the +program. This defaults to "nobody", which is less than ideal. + +SERVICE DELAYS +-------------- + +The interval value is merely the number given to *sleep*(3) after running +through the format string. Therefore, a query will actually take slightly +longer than the interval, depending on the speed of your system. + +LOG ROTATION +------------ + +*upslog* writes its PID to `upslog.pid`, and will reopen the log file if you +send it a SIGHUP. This allows it to keep running when the log is rotated +by an external program. + +SEE ALSO +-------- + +Server: +~~~~~~~ +linkman:upsd[8] + +Clients: +~~~~~~~~ +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upsmon[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsmon.8 b/docs/man/upsmon.8 new file mode 100644 index 0000000..6f9c028 --- /dev/null +++ b/docs/man/upsmon.8 @@ -0,0 +1,426 @@ +'\" t +.\" Title: upsmon +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSMON" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsmon \- UPS monitor and shutdown controller +.SH "SYNOPSIS" +.sp +\fBupsmon\fR \-h +.sp +\fBupsmon\fR \-c \fIcommand\fR +.sp +\fBupsmon\fR [\-D] [\-p] [\-u \fIuser\fR] +.SH "DESCRIPTION" +.sp +\fBupsmon\fR is the client process that is responsible for the most important part of UPS monitoring\(emshutting down the system when the power goes out\&. It can call out to other helper programs for notification purposes during power events\&. +.sp +upsmon can monitor multiple systems using a single process\&. Every UPS that is defined in the \fBupsmon.conf\fR(5) configuration file is assigned a power value and a type (slave or master)\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help message\&. +.RE +.PP +\fB\-c\fR \fIcommand\fR +.RS 4 +Send the command +\fIcommand\fR +to the existing upsmon process\&. Valid commands are: +.PP +\fBfsd\fR +.RS 4 +shutdown all master UPSes (use with caution) +.RE +.PP +\fBstop\fR +.RS 4 +stop monitoring and exit +.RE +.PP +\fBreload\fR +.RS 4 +reread +\fBupsmon.conf\fR(5) +configuration file\&. See "reloading nuances" below if this doesn\(cqt work\&. +.RE +.RE +.PP +\fB\-D\fR +.RS 4 +Raise the debugging level\&. upsmon will run in the foreground and prints information on stdout about the monitoring process\&. Use this multiple times for more details\&. +.RE +.PP +\fB\-K\fR +.RS 4 +Test for the shutdown flag\&. If it exists and contains the magic string from upsmon, then upsmon will exit with +EXIT_SUCCESS\&. Any other condition will make upsmon exit with +EXIT_FAILURE\&. +.sp +You can test for a successful exit from +upsmon \-K +in your shutdown scripts to know when to call +\fBupsdrvctl\fR(8) +to shut down the UPS\&. +.RE +.PP +\fB\-p\fR +.RS 4 +Run privileged all the time\&. Normally upsmon will split into two processes\&. The majority of the code runs as an unprivileged user, and only a tiny stub runs as root\&. This switch will disable that mode, and run the old "all root all the time" system\&. +.sp +This is not the recommended mode, and you should not use this unless you have a very good reason\&. +.RE +.PP +\fB\-u\fR \fIuser\fR +.RS 4 +Set the user for the unprivileged monitoring process\&. This has no effect when using \-p\&. +.sp +The default user is set at configure time with +\fIconfigure \-\-with\-user=\&...\fR\&. Typically this is +\fInobody\fR, but other distributions will probably have a specific +\fInut\fR +user for this task\&. If your notification scripts need to run as a specific user, set it here\&. +.sp +You can also set this in the +\fBupsmon.conf\fR(5) +file with the RUN_AS_USER directive\&. +.RE +.SH "UPS DEFINITIONS" +.sp +In the \fBupsmon.conf\fR(5), you must specify at least one UPS that will be monitored\&. Use the MONITOR directive\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +MONITOR \*(Aqsystem\*(Aq \*(Aqpowervalue\*(Aq \*(Aqusername\*(Aq \*(Aqpassword\*(Aq \*(Aqtype\*(Aq +.fi +.if n \{\ +.RE +.\} +.sp +The \fIsystem\fR refers to a \fBupsd\fR(8) server, in the form upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. Some examples follow: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +"su700@mybox" means a UPS called "su700" on a system called "mybox"\&. This is the normal form\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +"fenton@bigbox:5678" is a UPS called "fenton" on a system called "bigbox" which runs +\fBupsd\fR(8) +on port "5678"\&. +.RE +.sp +The \fIpowervalue\fR refers to how many power supplies on this system are being driven this UPS\&. This is typically set to 1, but see the section on power values below\&. +.sp +The \fIusername\fR is a section in your \fBupsd.users\fR(5) file\&. Whatever password you set in that section must match the \fIpassword\fR set in this file\&. +.sp +The type set in that section must also match the \fItype\fR here\-\- \fBmaster\fR or \fBslave\fR\&. In general, a master process is one running on the system with the UPS actually plugged into a serial port, and a slave is drawing power from the UPS but can\(cqt talk to it directly\&. See the section on UPS types for more\&. +.SH "NOTIFY EVENTS" +.sp +\fBupsmon\fR senses several events as it monitors each UPS\&. They are called notify events as they can be used to tell the users and admins about the change in status\&. See the additional NOTIFY\-related sections below for information on customizing the delivery of these messages\&. +.PP +\fBONLINE\fR +.RS 4 +The UPS is back on line\&. +.RE +.PP +\fBONBATT\fR +.RS 4 +The UPS is on battery\&. +.RE +.PP +\fBLOWBATT\fR +.RS 4 +The UPS battery is low (as determined by the driver)\&. +.RE +.PP +\fBFSD\fR +.RS 4 +The UPS has been commanded into the "forced shutdown" mode\&. +.RE +.PP +\fBCOMMOK\fR +.RS 4 +Communication with the UPS has been established\&. +.RE +.PP +\fBCOMMBAD\fR +.RS 4 +Communication with the UPS was just lost\&. +.RE +.PP +\fBSHUTDOWN\fR +.RS 4 +The local system is being shut down\&. +.RE +.PP +\fBREPLBATT\fR +.RS 4 +The UPS needs to have its battery replaced\&. +.RE +.PP +\fBNOCOMM\fR +.RS 4 +The UPS can\(cqt be contacted for monitoring\&. +.RE +.SH "NOTIFY COMMAND" +.sp +In \fBupsmon.conf\fR(5), you can configure a program called the NOTIFYCMD that will handle events that occur\&. +.sp +NOTIFYCMD "\fIpath to program\fR" +.sp +NOTIFYCMD "/usr/local/bin/notifyme" +.sp +Remember to wrap the path in "quotes" if it contains any spaces\&. +.sp +The program you run as your NOTIFYCMD can use the environment variables NOTIFYTYPE and UPSNAME to know what has happened and on which UPS\&. It also receives the notification message (see below) as the first (and only) argument, so you can deliver a preformatted message too\&. +.sp +Note that the NOTIFYCMD will only be called for a given event when you set the EXEC flag by using the notify flags, below: +.SH "NOTIFY FLAGS" +.sp +By default, all notify events (see above) generate a global message (wall) to all users, plus they are logged via the syslog\&. You can change this with the NOTIFYFLAG directive in the configuration file: +.sp +NOTIFYFLAG \fInotifytype\fR \fIflags\fR +.sp +Examples: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +NOTIFYFLAG ONLINE SYSLOG +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +NOTIFYFLAG ONBATT SYSLOG+WALL +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC +.RE +.sp +The flags that can be set on a given notify event are: +.PP +\fBSYSLOG\fR +.RS 4 +Write this message to the syslog\&. +.RE +.PP +\fBWALL\fR +.RS 4 +Send this message to all users on the system via +\fBwall\fR(1)\&. +.RE +.PP +\fBEXEC\fR +.RS 4 +Execute the NOTIFYCMD\&. +.RE +.PP +\fBIGNORE\fR +.RS 4 +Don\(cqt do anything\&. If you use this, don\(cqt use any of the other flags\&. +.RE +.sp +You can mix these flags\&. "SYSLOG+WALL+EXEC" does all three for a given event\&. +.SH "NOTIFY MESSAGES" +.sp +upsmon comes with default messages for each of the NOTIFY events\&. These can be changed with the NOTIFYMSG directive\&. +.sp +NOTIFYMSG \fItype\fR "\fImessage\fR" +.sp +Examples: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +NOTIFYMSG ONLINE "UPS %s is getting line power" +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +` NOTIFYMSG ONBATT "Someone pulled the plug on %s"` +.RE +.sp +The first instance of %s is replaced with the identifier of the UPS that generated the event\&. These messages are used when sending walls to the users directly from upsmon, and are also passed to the NOTIFYCMD\&. +.SH "POWER VALUES" +.sp +The "current overall power value" is the sum of all UPSes that are currently able to supply power to the system hosting upsmon\&. Any UPS that is either on line or just on battery contributes to this number\&. If a UPS is critical (on battery and low battery) or has been put into "forced shutdown" mode, it no longer contributes\&. +.sp +A "power value" on a MONITOR line in the config file is the number of power supplies that the UPS runs on the current system\&. +.sp +MONITOR \fIupsname\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR +.sp +Normally, you only have one power supply, so it will be set to 1\&. +.sp +MONITOR myups@myhost 1 username mypassword master +.sp +On a large server with redundant power supplies, the power value for a UPS may be greater than 1\&. You may also have more than one of them defined\&. +.sp +MONITOR ups\-alpha@myhost 2 username mypassword master +.sp +MONITOR ups\-beta@myhost 2 username mypassword master +.sp +You can also set the power value for a UPS to 0 if it does not supply any power to that system\&. This is generally used when you want to use the upsmon notification features for a UPS even though it\(cqs not actually running the system that hosts upsmon\&. Don\(cqt set this to "master" unless you really want to power this UPS off when this instance of upsmon needs to shut down for its own reasons\&. +.sp +MONITOR faraway@anotherbox 0 username mypassword slave +.sp +The "minimum power value" is the number of power supplies that must be receiving power in order to keep the computer running\&. +.sp +MINSUPPLIES \fIvalue\fR +.sp +Typical PCs only have 1, so most users will leave this at the default\&. +.sp +MINSUPPLIES 1 +.sp +If you have a server or similar system with redundant power, then this value will usually be set higher\&. One that requires three power supplies to be running at all times would simply set it to 3\&. +.sp +MINSUPPLIES 3 +.sp +When the current overall power value drops below the minimum power value, upsmon starts the shutdown sequence\&. This design allows you to lose some of your power supplies in a redundant power environment without bringing down the entire system while still working properly for smaller systems\&. +.SH "UPS TYPES" +.sp +\fBupsmon\fR and \fBupsd\fR(8) don\(cqt always run on the same system\&. When they do, any UPSes that are directly attached to the upsmon host should be monitored in "master" mode\&. This makes upsmon take charge of that equipment, and it will wait for slaves to disconnect before shutting down the local system\&. This allows the distant systems (monitoring over the network) to shut down cleanly before upsdrvctl shutdown runs and turns them all off\&. +.sp +When upsmon runs as a slave, it is relying on the distant system to tell it about the state of the UPS\&. When that UPS goes critical (on battery and low battery), it immediately invokes the local shutdown command\&. This needs to happen quickly\&. Once it disconnects from the distant \fBupsd\fR(8) server, the master upsmon will start its own shutdown process\&. Your slaves must all shut down before the master turns off the power or filesystem damage may result\&. +.sp +upsmon deals with slaves that get wedged, hang, or otherwise fail to disconnect from \fBupsd\fR(8) in a timely manner with the HOSTSYNC timer\&. During a shutdown situation, the master upsmon will give up after this interval and it will shut down anyway\&. This keeps the master from sitting there forever (which would endanger that host) if a slave should break somehow\&. This defaults to 15 seconds\&. +.sp +If your master system is shutting down too quickly, set the FINALDELAY interval to something greater than the default 15 seconds\&. Don\(cqt set this too high, or your UPS battery may run out of power before the master upsmon process shuts down that system\&. +.SH "TIMED SHUTDOWNS" +.sp +For those rare situations where the shutdown process can\(cqt be completed between the time that low battery is signalled and the UPS actually powers off the load, use the \fBupssched\fR(8) helper program\&. You can use it along with upsmon to schedule a shutdown based on the "on battery" event\&. upssched can then come back to upsmon to initiate the shutdown once it has run on battery too long\&. +.sp +This can be complicated and messy, so stick to the default critical UPS handling if you can\&. +.SH "REDUNDANT POWER SUPPLIES" +.sp +If you have more than one power supply for redundant power, you may also have more than one UPS feeding your computer\&. upsmon can handle this\&. Be sure to set the UPS power values appropriately and the MINSUPPLIES value high enough so that it keeps running until it really does need to shut down\&. +.sp +For example, the HP NetServer LH4 by default has 3 power supplies installed, with one bay empty\&. It has two power cords, one per side of the box\&. This means that one power cord powers two power supply bays, and that you can only have two UPSes supplying power\&. +.sp +Connect UPS "alpha" to the cord feeding two power supplies, and UPS "beta" to the cord that feeds the third and the empty slot\&. Define alpha as a powervalue of 2, and beta as a powervalue of 1\&. Set the MINSUPPLIES to 2\&. +.sp +When alpha goes on battery, your current overall power value will stay at 3, as it\(cqs still supplying power\&. However, once it goes critical (on battery and low battery), it will stop contributing to the current overall power value\&. That means the value will be 1 (beta alone), which is less than 2\&. That is insufficient to run the system, and upsmon will invoke the shutdown sequence\&. +.sp +However, if beta goes critical, subtracting its contribution will take the current overall value from 3 to 2\&. This is just high enough to satisfy the minimum, so the system will continue running as before\&. If beta returns later, it will be re\-added and the current value will go back to 3\&. This allows you to swap out UPSes, change a power configuration, or whatever, as long as you maintain the minimum power value at all times\&. +.SH "MIXED OPERATIONS" +.sp +Besides being able to monitor multiple UPSes, upsmon can also monitor them as different roles\&. If you have a system with multiple power supplies serviced by separate UPS batteries, it\(cqs possible to be a master on one and a slave on the other\&. This usually happens when you run out of serial ports and need to do the monitoring through another system nearby\&. +.sp +This is also complicated, especially when it comes time to power down a UPS that has gone critical but doesn\(cqt supply the local system\&. You can do this with some scripting magic in your notify command script, but it\(cqs beyond the scope of this manual\&. +.SH "FORCED SHUTDOWNS" +.sp +When upsmon is forced to bring down the local system, it sets the "FSD" (forced shutdown) flag on any UPSes that it is running in master mode\&. This is used to synchronize slaves in the event that a master UPS that is otherwise OK needs to be brought down due to some pressing event on the master\&. +.sp +You can manually invoke this mode on the master upsmon by starting another copy with \-c fsd\&. This is useful when you want to initiate a shutdown before the critical stage through some external means, such as \fBupssched\fR(8)\&. +.SH "DEAD UPSES" +.sp +In the event that upsmon can\(cqt reach \fBupsd\fR(8), it declares that UPS "dead" after some interval controlled by DEADTIME in the \fBupsmon.conf\fR(5)\&. If this happens while that UPS was last known to be on battery, it is assumed to have gone critical and no longer contributes to the overall power value\&. +.sp +upsmon will alert you to a UPS that can\(cqt be contacted for monitoring with a "NOCOMM" notifier by default every 300 seconds\&. This can be changed with the NOCOMMWARNTIME setting\&. +.SH "RELOADING NUANCES" +.sp +upsmon usually gives up root powers for the process that does most of the work, including handling signals like SIGHUP to reload the configuration file\&. This means your \fBupsmon.conf\fR(8) file must be readable by the non\-root account that upsmon switches to\&. +.sp +If you want reloads to work, upsmon must run as some user that has permissions to read the configuration file\&. I recommend making a new user just for this purpose, as making the file readable by "nobody" (the default user) would be a bad idea\&. +.sp +See the RUN_AS_USER section in \fBupsmon.conf\fR(8) for more on this topic\&. +.sp +Additionally, you can\(cqt change the SHUTDOWNCMD or POWERDOWNFLAG definitions with a reload due to the split\-process model\&. If you change those values, you \fBmust\fR stop upsmon and start it back up\&. upsmon will warn you in the syslog if you make changes to either of those values during a reload\&. +.SH "SIMULATING POWER FAILURES" +.sp +To test a synchronized shutdown without pulling the plug on your UPS(es), you need only set the forced shutdown (FSD) flag on them\&. You can do this by calling upsmon again to set the flag, i\&.e\&.: +.sp +upsmon \-c fsd +.sp +After that, the master and the slaves will do their usual shutdown sequence as if the battery had gone critical\&. This is much easier on your UPS equipment, and it beats crawling under a desk to find the plug\&. +.SH "FILES" +.sp +\fBupsmon.conf\fR(5) +.SH "SEE ALSO" +.SS "Server:" +.sp +\fBupsd\fR(8) +.SS "Clients:" +.sp +\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupsmon\fR(8) +.SS "CGI programs:" +.sp +\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsmon.conf.5 b/docs/man/upsmon.conf.5 new file mode 100644 index 0000000..b00226c --- /dev/null +++ b/docs/man/upsmon.conf.5 @@ -0,0 +1,390 @@ +'\" t +.\" Title: upsmon.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSMON\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsmon.conf \- Configuration for Network UPS Tools upsmon +.SH "DESCRIPTION" +.sp +This file\(cqs primary job is to define the systems that \fBupsmon\fR(8) will monitor and to tell it how to shut down the system when necessary\&. It will contain passwords, so keep it secure\&. Ideally, only the upsmon process should be able to read it\&. +.sp +Additionally, other optional configuration values can be set in this file\&. +.SH "CONFIGURATION DIRECTIVES" +.PP +\fBDEADTIME\fR \fIseconds\fR +.RS 4 +upsmon allows a UPS to go missing for this many seconds before declaring it "dead"\&. The default is 15 seconds\&. +.sp +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\&. +.sp +A dead UPS that was last known to be on battery is assumed to have changed to a low battery condition\&. This may force a shutdown if it is providing a critical amount of power to your system\&. This seems disruptive, but the alternative is barreling ahead into oblivion and crashing when you run out of power\&. +.sp +Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT\&. Otherwise, you\(cqll have "dead" UPSes simply because upsmon isn\(cqt polling them quickly enough\&. Rule of thumb: take the larger of the two POLLFREQ values, and multiply by 3\&. +.RE +.PP +\fBFINALDELAY\fR \fIseconds\fR +.RS 4 +When running in master mode, upsmon waits this long after sending the NOTIFY_SHUTDOWN to warn the users\&. After the timer elapses, it then runs your SHUTDOWNCMD\&. By default this is set to 5 seconds\&. +.sp +If you need to let your users do something in between those events, increase this number\&. Remember, at this point your UPS battery is almost depleted, so don\(cqt make this too big\&. +.sp +Alternatively, you can set this very low so you don\(cqt wait around when it\(cqs time to shut down\&. Some UPSes don\(cqt give much warning for low battery and will require a value of 0 here for a safe shutdown\&. +.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 +If FINALDELAY on the slave is greater than HOSTSYNC on the master, the master will give up waiting for the slave to disconnect\&. +.sp .5v +.RE +.RE +.PP +\fBHOSTSYNC\fR \fIseconds\fR +.RS 4 +upsmon will wait up to this many seconds in master mode for the slaves to disconnect during a shutdown situation\&. By default, this is 15 seconds\&. +.sp +When a UPS goes critical (on battery + low battery, or "FSD": forced shutdown), the slaves are supposed to disconnect and shut down right away\&. The HOSTSYNC timer keeps the master upsmon from sitting there forever if one of the slaves gets stuck\&. +.sp +This value is also used to keep slave systems from getting stuck if the master fails to respond in time\&. After a UPS becomes critical, the slave will wait up to HOSTSYNC seconds for the master to set the FSD flag\&. If that timer expires, the slave will assume that the master is broken and will shut down anyway\&. +.sp +This keeps the slaves from shutting down during a short\-lived status change to "OB LB" that the slaves see but the master misses\&. +.RE +.PP +\fBMINSUPPLIES\fR \fInum\fR +.RS 4 +Set the number of power supplies that must be receiving power to keep this system running\&. Normal computers have just one power supply, so the default value of 1 is acceptable\&. +.sp +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\(cqd set it to 2\&. The idea is to keep the box running as long as possible, right? +.sp +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\&. +.sp +Also see the section on "power values" in +\fBupsmon\fR(8)\&. +.RE +.PP +\fBMONITOR\fR \fIsystem\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR +.RS 4 +Each UPS that you need to be monitor should have a MONITOR line\&. Not all of these need supply power to the system that is running upsmon\&. You may monitor other systems if you want to be able to send notifications about status changes on them\&. +.RE +.sp +You must have at least one MONITOR directive in upsmon\&.conf\&. +.sp +\fIsystem\fR is a UPS identifier\&. It is in this form: +.sp +[@[:]] +.sp +The default hostname is "localhost"\&. Some examples: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +"su700@mybox" means a UPS called "su700" on a system called "mybox"\&. This is the normal form\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +"fenton@bigbox:5678" is a UPS called "fenton" on a system called "bigbox" which runs +\fBupsd\fR(8) +on port "5678"\&. +.RE +.sp +\fIpowervalue\fR is an integer representing the number of power supplies that the UPS feeds on this system\&. Most normal computers have one power supply, and the UPS feeds it, so this value will be 1\&. You need a very large or special system to have anything higher here\&. +.sp +You can set the \fIpowervalue\fR to 0 if you want to monitor a UPS that doesn\(cqt actually supply power to this system\&. This is useful when you want to have upsmon do notifications about status changes on a UPS without shutting down when it goes critical\&. +.sp +The \fIusername\fR and \fIpassword\fR on this line must match an entry in that system\(cqs \fBupsd.users\fR(5)\&. If your username is "monmaster" and your password is "blah", the MONITOR line might look like this: +.sp +MONITOR myups@bigserver 1 monmaster blah master +.sp +Meanwhile, the upsd\&.users on bigserver would look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[monmaster] + password = blah + upsmon master # (or slave) +.fi +.if n \{\ +.RE +.\} +.sp +The \fItype\fR refers to the relationship with \fBupsd\fR(8)\&. It can be either "master" or "slave"\&. See \fBupsmon\fR(8) for more information on the meaning of these modes\&. The mode you pick here also goes in the upsd\&.users file, as seen in the example above\&. +.PP +\fBNOCOMMWARNTIME\fR \fIseconds\fR +.RS 4 +upsmon will trigger a NOTIFY_NOCOMM after this many seconds if it can\(cqt reach any of the UPS entries in this configuration file\&. It keeps warning you until the situation is fixed\&. By default this is 300 seconds\&. +.RE +.PP +\fBNOTIFYCMD\fR \fIcommand\fR +.RS 4 +upsmon calls this to send messages when things happen\&. +.sp +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\&. +.sp +If you need to use +\fBupssched\fR(8), then you must make it your NOTIFYCMD by listing it here\&. +.sp +Note that this is only called for NOTIFY events that have EXEC set with NOTIFYFLAG\&. See NOTIFYFLAG below for more details\&. +.sp +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\&. +.sp +Remember, this command also needs to be one element in the configuration file, so if your command has spaces, then wrap it in quotes\&. +.sp +NOTIFYCMD "/path/to/script \-\-foo \-\-bar" +.sp +This script is run in the background\(emthat is, upsmon forks before it calls out to start it\&. This means that your NOTIFYCMD may have multiple instances running simultaneously if a lot of stuff happens all at once\&. Keep this in mind when designing complicated notifiers\&. +.RE +.PP +\fBNOTIFYMSG\fR \fItype\fR \fImessage\fR +.RS 4 +upsmon comes with a set of stock messages for various events\&. You can change them if you like\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYMSG ONLINE "UPS %s is getting line power" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYMSG ONBATT "Someone pulled the plug on %s" +.fi +.if n \{\ +.RE +.\} +.sp +Note that +%s +is replaced with the identifier of the UPS in question\&. +.sp +The message must be one element in the configuration file, so if it contains spaces, you must wrap it in quotes\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYMSG NOCOMM "Someone stole UPS %s" +.fi +.if n \{\ +.RE +.\} +.sp +Possible values for +\fItype\fR: +.PP +ONLINE +.RS 4 +UPS is back online +.RE +.PP +ONBATT +.RS 4 +UPS is on battery +.RE +.PP +LOWBATT +.RS 4 +UPS is on battery and has a low battery (is critical) +.RE +.PP +FSD +.RS 4 +UPS is being shutdown by the master (FSD = "Forced Shutdown") +.RE +.PP +COMMOK +.RS 4 +Communications established with the UPS +.RE +.PP +COMMBAD +.RS 4 +Communications lost to the UPS +.RE +.PP +SHUTDOWN +.RS 4 +The system is being shutdown +.RE +.PP +REPLBATT +.RS 4 +The UPS battery is bad and needs to be replaced +.RE +.PP +NOCOMM +.RS 4 +A UPS is unavailable (can\(cqt be contacted for monitoring) +.RE +.RE +.PP +\fBNOTIFYFLAG\fR \fItype\fR \fIflag\fR[+\fIflag\fR][+\fIflag\fR]\&... +.RS 4 +By default, upsmon sends walls global messages to all logged in users) via /bin/wall and writes to the syslog when things happen\&. You can change this\&. +.sp +Examples: +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYFLAG ONLINE SYSLOG +NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC +.fi +.if n \{\ +.RE +.\} +.sp +Possible values for the flags: +.PP +SYSLOG +.RS 4 +Write the message to the syslog +.RE +.PP +WALL +.RS 4 +Write the message to all users with /bin/wall +.RE +.PP +EXEC +.RS 4 +Execute NOTIFYCMD (see above) with the message +.RE +.PP +IGNORE +.RS 4 +Don\(cqt do anything +.sp +If you use IGNORE, don\(cqt use any other flags on the same line\&. +.RE +.RE +.PP +\fBPOLLFREQ\fR \fIseconds\fR +.RS 4 +Normally upsmon polls the +\fBupsd\fR(8) +server every 5 seconds\&. If this is flooding your network with activity, you can make it higher\&. You can also make it lower to get faster updates in some cases\&. +.sp +There are some catches\&. First, if you set the POLLFREQ too high, you may miss short\-lived power events entirely\&. You also risk triggering the DEADTIME (see above) if you use a very large number\&. +.sp +Second, there is a point of diminishing returns if you set it too low\&. While upsd normally has all of the data available to it instantly, most drivers only refresh the UPS status once every 2 seconds\&. Polling any more than that usually doesn\(cqt get you the information any faster\&. +.RE +.PP +\fBPOLLFREQALERT\fR \fIseconds\fR +.RS 4 +This is the interval that upsmon waits between polls if any of its UPSes are on battery\&. You can use this along with POLLFREQ above to slow down polls during normal behavior, but get quicker updates when something bad happens\&. +.sp +This should always be equal to or lower than the POLLFREQ value\&. By default it is also set 5 seconds\&. +.sp +The warnings from the POLLFREQ entry about too\-high and too\-low values also apply here\&. +.RE +.PP +\fBPOWERDOWNFLAG\fR \fIfilename\fR +.RS 4 +upsmon creates this file when running in master mode when the UPS needs to be powered off\&. You should check for this file in your shutdown scripts and call +upsdrvctl shutdown +if it exists\&. +.sp +This is done to forcibly reset the slaves, so they don\(cqt get stuck at the "halted" stage even if the power returns during the shutdown process\&. This usually does not work well on contact\-closure UPSes that use the genericups driver\&. +.sp +See the shutdown\&.txt file in the docs subdirectory for more information\&. +.RE +.PP +\fBRBWARNTIME\fR \fIseconds\fR +.RS 4 +When a UPS says that it needs to have its battery replaced, upsmon will generate a NOTIFY_REPLBATT event\&. By default, this happens every 43200 seconds (12 hours)\&. +.sp +If you need another value, set it here\&. +.RE +.PP +\fBRUN_AS_USER\fR \fIusername\fR +.RS 4 +upsmon normally runs the bulk of the monitoring duties under another user ID after dropping root privileges\&. On most systems this means it runs as "nobody", since that\(cqs the default from compile\-time\&. +.sp +The catch is that "nobody" can\(cqt read your upsmon\&.conf, since by default it is installed so that only root can open it\&. This means you won\(cqt be able to reload the configuration file, since it will be unavailable\&. +.sp +The solution is to create a new user just for upsmon, then make it run as that user\&. I suggest "nutmon", but you can use anything that isn\(cqt already taken on your system\&. Just create a regular user with no special privileges and an impossible password\&. +.sp +Then, tell upsmon to run as that user, and make +upsmon\&.conf +readable by it\&. Your reloads will work, and your config file will stay secure\&. +.sp +This file should not be writable by the upsmon user, as it would be possible to exploit a hole, change the SHUTDOWNCMD to something malicious, then wait for upsmon to be restarted\&. +.RE +.PP +\fBSHUTDOWNCMD\fR \fIcommand\fR +.RS 4 +upsmon runs this command when the system needs to be brought down\&. If it is a slave, it will do that immediately whenever the current overall power value drops below the MINSUPPLIES value above\&. +.sp +When upsmon is a master, it will allow any slaves to log out before starting the local shutdown procedure\&. +.sp +Note that the command needs to be one element in the config file\&. If your shutdown command includes spaces, then put it in quotes to keep it together, i\&.e\&.: +.sp +.if n \{\ +.RS 4 +.\} +.nf +SHUTDOWNCMD "/sbin/shutdown \-h +0" +.fi +.if n \{\ +.RE +.\} +.RE +.SH "SEE ALSO" +.sp +\fBupsmon\fR(8), \fBupsd\fR(8), \fBnutupsdrv\fR(8)\&. +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsmon.conf.5 b/docs/man/upsmon.conf.txt similarity index 67% rename from man/upsmon.conf.5 rename to docs/man/upsmon.conf.txt index 592c929..7491806 100644 --- a/man/upsmon.conf.5 +++ b/docs/man/upsmon.conf.txt @@ -1,180 +1,183 @@ -.TH UPSMON.CONF 5 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -upsmon.conf \- Configuration for Network UPS Tools upsmon +UPSMON.CONF(5) +============== -.SH DESCRIPTION +NAME +---- -This file's primary job is to define the systems that \fBupsmon\fR(8) +upsmon.conf - Configuration for Network UPS Tools upsmon + +DESCRIPTION +----------- + +This file's primary job is to define the systems that linkman:upsmon[8] will monitor and to tell it how to shut down the system when necessary. -It will contain passwords, so keep it secure. Ideally,only the upsmon +It will contain passwords, so keep it secure. Ideally, only the upsmon process should be able to read it. Additionally, other optional configuration values can be set in this file. -.SH CONFIGURATION DIRECTIVES +CONFIGURATION DIRECTIVES +------------------------ -.IP "DEADTIME \fIseconds\fR" +*DEADTIME* 'seconds':: upsmon allows a UPS to go missing for this many seconds before declaring it "dead". The default is 15 seconds. - ++ 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 changed to a low battery condition. This may force a shutdown if it is providing a critical amount of power to your system. This seems disruptive, but the alternative is barreling ahead into oblivion and crashing when you run out of power. - ++ 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. -.IP "FINALDELAY \fIseconds\fR" +*FINALDELAY* 'seconds':: When running in master mode, upsmon waits this long after sending the NOTIFY_SHUTDOWN to warn the users. After the timer elapses, it then runs your SHUTDOWNCMD. By default this is set to 5 seconds. - ++ If you need to let your users do something in between those events, increase this number. Remember, at this point your UPS battery is almost depleted, so don't make this too big. - ++ 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, ++ +NOTE: If FINALDELAY on the slave is greater than HOSTSYNC on the master, the master will give up waiting for the slave to disconnect. -.IP "HOSTSYNC \fIseconds\fR" +*HOSTSYNC* 'seconds':: upsmon will wait up to this many seconds in master mode for the slaves to disconnect during a shutdown situation. By default, this is 15 seconds. - -When a UPS goes critical (on battery + low battery, or "FSD" \(hy forced ++ +When a UPS goes critical (on battery + low battery, or "FSD": forced shutdown), the slaves are supposed to disconnect and shut down right away. The HOSTSYNC timer keeps the master upsmon from sitting there forever if one of the slaves gets stuck. - ++ This value is also used to keep slave systems from getting stuck if the master fails to respond in time. After a UPS becomes critical, the slave will wait up to HOSTSYNC seconds for the master to set the FSD flag. If that timer expires, the slave will assume that the master is broken and will shut down anyway. - -This keeps the slaves from shutting down during a short\(hylived status ++ +This keeps the slaves from shutting down during a short-lived status change to "OB LB" that the slaves see but the master misses. -.IP "MINSUPPLIES \fInum\fR" +*MINSUPPLIES* 'num':: Set the number of power supplies that must be receiving power to keep this system running. Normal computers have just one power supply, so the default value of 1 is acceptable. - ++ 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 it 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\(hyservers.txt in the docs +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. ++ +Also see the section on "power values" in linkman:upsmon[8]. -Also see the section on "power values" in \fBupsmon\fR(8). - -.IP "MONITOR \fIsystem\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR" +*MONITOR* 'system' 'powervalue' 'username' 'password' 'type':: Each UPS that you need to be monitor should have a MONITOR line. Not all of these need supply power to the system that is running upsmon. You may monitor other systems if you want to be able to send notifications about status changes on them. -You must have at least one MONITOR directive in this file. +You must have at least one MONITOR directive in `upsmon.conf`. -\fIsystem\fR is a UPS identifier. It is in this form: +'system' is a UPS identifier. It is in this form: - [@[:]] ++[@[:]]+ The default hostname is "localhost". Some examples: - \(hy "su700@mybox" means a UPS called "su700" on a system called "mybox". + - "su700@mybox" means a UPS called "su700" on a system called "mybox". This is the normal form. + - "fenton@bigbox:5678" is a UPS called "fenton" on a system called +"bigbox" which runs linkman:upsd[8] on port "5678". - \(hy "fenton@bigbox:5678" is a UPS called "fenton" on a system called -"bigbox" which runs \fBupsd\fR(8) on port "5678". - -\fIpowervalue\fR is an integer representing the number of power supplies +'powervalue' is an integer representing the number of power supplies that the UPS feeds on this system. Most normal computers have one power supply, and the UPS feeds it, so this value will be 1. You need a very large or special system to have anything higher here. -You can set the \fIpowervalue\fR to 0 if you want to monitor a UPS that +You can set the 'powervalue' to 0 if you want to monitor a UPS that doesn't actually supply power to this system. This is useful when you want to have upsmon do notifications about status changes on a UPS without shutting down when it goes critical. -The \fIusername\fR and \fIpassword\fR on this line must match an entry -in that system's \fBupsd.users\fR(5). If your username is "monmaster" +The 'username' and 'password' on this line must match an entry +in that system's linkman:upsd.users[5]. If your username is "monmaster" and your password is "blah", the MONITOR line might look like this: -MONITOR myups@bigserver 1 monmaster blah master ++MONITOR myups@bigserver 1 monmaster blah master+ -Meanwhile, the upsd.users on 'bigserver' would look like this: +Meanwhile, the `upsd.users` on `bigserver` would look like this: [monmaster] - password = blah + upsmon master # (or slave) - upsmon master (or slave) - -The \fItype\fR refers to the relationship with \fBupsd\fR(8). It can -be either "master" or "slave". See \fBupsmon\fR(8) for more information +The 'type' refers to the relationship with linkman:upsd[8]. It can +be either "master" or "slave". See linkman:upsmon[8] for more information on the meaning of these modes. The mode you pick here also goes in -the upsd.users file, as seen in the example above. +the `upsd.users` file, as seen in the example above. -.IP "NOCOMMWARNTIME \fIseconds\fR" +*NOCOMMWARNTIME* 'seconds':: upsmon will trigger a NOTIFY_NOCOMM after this many seconds if it can't reach any of the UPS entries in this configuration file. It keeps warning you until the situation is fixed. By default this is 300 seconds. -.IP "NOTIFYCMD \fIcommand\fR" +*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. - -If you need to use \fBupssched\fR(8), then you must make it your ++ +If you need to use linkman:upssched[8], then you must make it your NOTIFYCMD by listing it here. - ++ 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 pager.txt in the docs directory. - -Remember, this also needs to be one element in the configuration file, ++ +Remember, this command also needs to be one element in the configuration file, so if your command has spaces, then wrap it in quotes. - - NOTIFYCMD "/path/to/script \-\-foo \-\-bar" - -This script is run in the background \(hy that is, upsmon forks before it ++ ++NOTIFYCMD "/path/to/script --foo --bar"+ ++ +This script is run in the background--that is, upsmon forks before it calls out to start it. This means that your NOTIFYCMD may have multiple instances running simultaneously if a lot of stuff happens all at once. Keep this in mind when designing complicated notifiers. -.IP "NOTIFYMSG \fItype\fR \fImessage\fR\" +*NOTIFYMSG* 'type' 'message':: upsmon comes with a set of stock messages for various events. You can change them if you like. @@ -182,146 +185,147 @@ change them if you like. NOTIFYMSG ONLINE "UPS %s is getting line power" NOTIFYMSG ONBATT "Someone pulled the plug on %s" - -Note that %s is replaced with the identifier of the UPS in question. - -Possible values for \fItype\fR: - - ONLINE \(hy UPS is back online - - ONBATT \(hy UPS is on battery - - LOWBATT \(hy UPS is on battery and has a low battery (is critical) - - FSD \(hy UPS is being shutdown by the master (FSD = "Forced Shutdown") - - COMMOK \(hy Communications established with the UPS - - COMMBAD \(hy Communications lost to the UPS - - SHUTDOWN \(hy The system is being shutdown - - REPLBATT \(hy The UPS battery is bad and needs to be replaced - - NOCOMM \(hy A UPS is unavailable (can't be contacted for monitoring) - ++ +Note that +%s+ is replaced with the identifier of the UPS in question. ++ The message must be one element in the configuration file, so if it contains spaces, you must wrap it in quotes. NOTIFYMSG NOCOMM "Someone stole UPS %s" ++ +Possible values for 'type': -.IP "NOTIFYFLAG \fItype\fR \fIflag\fR[+\fIflag\fR][+\fIflag\fR]..." +ONLINE;; UPS is back online + +ONBATT;; UPS is on battery + +LOWBATT;; UPS is on battery and has a low battery (is 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) + +*NOTIFYFLAG* 'type' 'flag'[\+'flag'][+'flag']...:: By default, upsmon sends walls global messages to all logged in users) via /bin/wall and writes to the syslog when things happen. You can change this. - ++ Examples: - ++ NOTIFYFLAG ONLINE SYSLOG - NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC - ++ Possible values for the flags: ++ +SYSLOG;; Write the message to the syslog - SYSLOG \(hy Write the message to the syslog +WALL;; Write the message to all users with /bin/wall - WALL \(hy Write the message to all users with /bin/wall - - EXEC \(hy Execute NOTIFYCMD (see above) with the message - - IGNORE \(hy Don't do anything +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. -.IP "POLLFREQ \fIseconds\fR" +*POLLFREQ* 'seconds':: -Normally upsmon polls the \fBupsd\fR(8) server every 5 seconds. If this +Normally upsmon polls the linkman:upsd[8] server every 5 seconds. If this is flooding your network with activity, you can make it higher. You can also make it lower to get faster updates in some cases. - ++ There are some catches. First, if you set the POLLFREQ too high, you -may miss short\(hylived power events entirely. You also risk triggering +may miss short-lived power events entirely. You also risk triggering the DEADTIME (see above) if you use a very large number. - ++ Second, there is a point of diminishing returns if you set it too low. While upsd normally has all of the data available to it instantly, most drivers only refresh the UPS status once every 2 seconds. Polling any more than that usually doesn't get you the information any faster. -.IP "POLLFREQALERT \fIseconds\fR" +*POLLFREQALERT* 'seconds':: This is the interval that upsmon waits between polls if any of its UPSes are on battery. You can use this along with POLLFREQ above to slow down polls during normal behavior, but get quicker updates when something bad happens. - ++ This should always be equal to or lower than the POLLFREQ value. By default it is also set 5 seconds. - -The warnings from the POLLFREQ entry about too\(hyhigh and too\(hylow values ++ +The warnings from the POLLFREQ entry about too-high and too-low values also apply here. -.IP "POWERDOWNFLAG \fIfilename\fR" +*POWERDOWNFLAG* 'filename':: upsmon creates this file when running in master mode when the UPS needs to be powered off. You should check for this file in your shutdown -scripts and call \fBupsdrvctl shutdown\fR if it exists. - +scripts and call `upsdrvctl shutdown` if it exists. ++ This is done to forcibly reset the slaves, so they don't get stuck at the "halted" stage even if the power returns during the shutdown -process. This usually does not work well on contact\(hyclosure UPSes that +process. This usually does not work well on contact-closure UPSes that use the genericups driver. - ++ See the shutdown.txt file in the docs subdirectory for more information. -.IP "RBWARNTIME \fIseconds\fR" +*RBWARNTIME* 'seconds':: When a UPS says that it needs to have its battery replaced, upsmon will -generate a NOTIFY_REPLBATT event. By default this happens every 43200 -seconds \(hy 12 hours. - +generate a NOTIFY_REPLBATT event. By default, this happens every 43200 +seconds (12 hours). ++ If you need another value, set it here. -.IP "RUN_AS_USER \fIusername\fR" +*RUN_AS_USER* 'username':: upsmon normally runs the bulk of the monitoring duties under another user ID after dropping root privileges. On most systems this means it runs -as "nobody", since that's the default from compile\(hytime. - +as "nobody", since that's the default from compile-time. ++ The catch is that "nobody" can't read your upsmon.conf, since by default it is installed so that only root can open it. This means you won't be able to reload the configuration file, since it will be unavailable. - ++ The solution is to create a new user just for upsmon, then make it run as that user. I suggest "nutmon", but you can use anything that isn't already taken on your system. Just create a regular user with no special privileges and an impossible password. - -Then, tell upsmon to run as that user, and make upsmon.conf readable by it. ++ +Then, tell upsmon to run as that user, and make `upsmon.conf` readable by it. Your reloads will work, and your config file will stay secure. - ++ This file should not be writable by the upsmon user, as it would be possible to exploit a hole, change the SHUTDOWNCMD to something malicious, then wait for upsmon to be restarted. -.IP "SHUTDOWNCMD \fIcommand\fR" +*SHUTDOWNCMD* 'command':: upsmon runs this command when the system needs to be brought down. If it is a slave, it will do that immediately whenever the current overall power value drops below the MINSUPPLIES value above. - ++ When upsmon is a master, it will allow any slaves to log out before starting the local shutdown procedure. - ++ Note that the command needs to be one element in the config file. If your shutdown command includes spaces, then put it in quotes to keep it together, i.e.: - SHUTDOWNCMD "/sbin/shutdown \-h +0" + SHUTDOWNCMD "/sbin/shutdown -h +0" -.SH SEE ALSO -\fBupsmon\fR(8), \fBupsd\fR(8), \fBnutupsdrv\fR(8). +SEE ALSO +-------- +linkman:upsmon[8], linkman:upsd[8], linkman:nutupsdrv[8]. -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/man/upsmon.8 b/docs/man/upsmon.txt similarity index 68% rename from man/upsmon.8 rename to docs/man/upsmon.txt index caca2ee..025c6e4 100644 --- a/man/upsmon.8 +++ b/docs/man/upsmon.txt @@ -1,149 +1,159 @@ -.TH UPSMON 8 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -upsmon \- UPS monitor and shutdown controller -.SH SYNOPSIS -.B upsmon \-h +UPSMON(8) +========= -.B upsmon \-c \fIcommand\fR +NAME +---- -.B upsmon [\-D] [\-p] [\-u \fIuser\fR] +upsmon - UPS monitor and shutdown controller -.SH DESCRIPTION +SYNOPSIS +-------- -.B upsmon -is the client process that is responsible for the most important part of -UPS monitoring \(hy shutting down the system when the power goes out. It +*upsmon* -h + +*upsmon* -c 'command' + +*upsmon* [-D] [-p] [-u 'user'] + +DESCRIPTION +----------- + +*upsmon* is the client process that is responsible for the most important part +of UPS monitoring--shutting down the system when the power goes out. It can call out to other helper programs for notification purposes during power events. upsmon can monitor multiple systems using a single process. Every UPS -that is defined in the \fBupsmon.conf\fR(5) configuration file is assigned +that is defined in the linkman:upsmon.conf[5] configuration file is assigned a power value and a type (slave or master). -.SH OPTIONS +OPTIONS +------- -.IP \-h +*-h*:: Display the help message. -.IP "\-c \fIcommand\fR" -Send the command \fIcommand\fR to the existing upsmon process. Valid +*-c* 'command':: +Send the command 'command' to the existing upsmon process. Valid commands are: -fsd \(hy shutdown all master UPSes (use with caution) +*fsd*;; shutdown all master UPSes (use with caution) -stop \(hy stop monitoring and exit +*stop*;; stop monitoring and exit -reload \(hy reread \fBupsmon.conf\fR(5) configuration file. See +*reload*;; reread linkman:upsmon.conf[5] configuration file. See "reloading nuances" below if this doesn't work. -.IP \-D +*-D*:: Raise the debugging level. upsmon will run in the foreground and prints information on stdout about the monitoring process. Use this multiple times for more details. -.IP \-K +*-K*:: Test for the shutdown flag. If it exists and contains the magic string -from upsmon, then upsmon will exit with EXIT_SUCCESS. Any other condition -will make upsmon exit with EXIT_FAILURE. +from upsmon, then upsmon will exit with `EXIT_SUCCESS`. Any other condition +will make upsmon exit with `EXIT_FAILURE`. ++ +You can test for a successful exit from `upsmon -K` in your shutdown +scripts to know when to call linkman:upsdrvctl[8] to shut down the UPS. -You can test for a successful exit from upsmon \-K in your shutdown -scripts to know when to call \fBupsdrvctl\fR(8) to shut down the UPS. - -.IP \-p +*-p*:: Run privileged all the time. Normally upsmon will split into two processes. The majority of the code runs as an unprivileged user, and only a tiny stub runs as root. This switch will disable that mode, and run the old "all root all the time" system. - ++ This is not the recommended mode, and you should not use this unless you have a very good reason. -.IP "\-u \fIuser\fR" +*-u* 'user':: Set the user for the unprivileged monitoring process. This has no effect -when using \-p. -.IP +when using -p. ++ The default user is set at configure time with 'configure -\-\-with\-user=...'. Typically this is 'nobody', but other distributions +--with-user=...'. Typically this is 'nobody', but other distributions will probably have a specific 'nut' user for this task. If your notification scripts need to run as a specific user, set it here. -.IP -You can also set this in the \fBupsmon.conf\fR(5) file with the ++ +You can also set this in the linkman:upsmon.conf[5] file with the RUN_AS_USER directive. -.SH UPS DEFINITIONS +UPS DEFINITIONS +--------------- -In the \fBupsmon.conf\fR(5), you must specify at least one UPS that will +In the linkman:upsmon.conf[5], you must specify at least one UPS that will be monitored. Use the MONITOR directive. - MONITOR \fIsystem\fR \fIpowervalue\fR \fIusername\fR -\fIpassword\fR \fItype\fR + MONITOR 'system' 'powervalue' 'username' 'password' 'type' -The \fIsystem\fR refers to a \fBupsd\fR(8) server, in the form -upsname[@hostname[:port]]. The default hostname is "localhost". Some +The 'system' refers to a linkman:upsd[8] server, in the form ++upsname[@hostname[:port]]+. The default hostname is "localhost". Some examples follow: - \(hy "su700@mybox" means a UPS called "su700" on a system called "mybox". + - "su700@mybox" means a UPS called "su700" on a system called "mybox". This is the normal form. - \(hy "fenton@bigbox:5678" is a UPS called "fenton" on a system called -"bigbox" which runs \fBupsd\fR(8) on port "5678". + - "fenton@bigbox:5678" is a UPS called "fenton" on a system called +"bigbox" which runs linkman:upsd[8] on port "5678". -The \fIpowervalue\fR refers to how many power supplies on this system are +The 'powervalue' refers to how many power supplies on this system are being driven this UPS. This is typically set to 1, but see the section on power values below. -The \fIusername\fR is a section in your \fBupsd.users\fR(5) file. -Whatever password you set in that section must match the \fIpassword\fR +The 'username' is a section in your linkman:upsd.users[5] file. +Whatever password you set in that section must match the 'password' set in this file. -The type set in that section must also match the \fItype\fR here \(hy -\fBmaster\fR or \fBslave\fR. In general, a master process is one +The type set in that section must also match the 'type' here-- +*master* or *slave*. In general, a master process is one running on the system with the UPS actually plugged into a serial port, and a slave is drawing power from the UPS but can't talk to it directly. See the section on UPS types for more. -.SH NOTIFY EVENTS +NOTIFY EVENTS +------------- -upsmon senses several events as it monitors each UPS. They are called +*upsmon* senses several events as it monitors each UPS. They are called notify events as they can be used to tell the users and admins about the -change in status. See the additional NOTIFY\(hyrelated sections below for +change in status. See the additional NOTIFY-related sections below for information on customizing the delivery of these messages. -.IP ONLINE +*ONLINE*:: The UPS is back on line. -.IP ONBATT +*ONBATT*:: The UPS is on battery. -.IP LOWBATT +*LOWBATT*:: The UPS battery is low (as determined by the driver). -.IP FSD +*FSD*:: The UPS has been commanded into the "forced shutdown" mode. -.IP COMMOK +*COMMOK*:: Communication with the UPS has been established. -.IP COMMBAD +*COMMBAD*:: Communication with the UPS was just lost. -.IP SHUTDOWN +*SHUTDOWN*:: The local system is being shut down. -.IP REPLBATT +*REPLBATT*:: The UPS needs to have its battery replaced. -.IP NOCOMM +*NOCOMM*:: The UPS can't be contacted for monitoring. -.SH NOTIFY COMMAND +NOTIFY COMMAND +-------------- -In \fBupsmon.conf\fR(5), you can configure a program called the NOTIFYCMD +In linkman:upsmon.conf[5], you can configure a program called the NOTIFYCMD that will handle events that occur. - NOTIFYCMD "\fIpath to program\fR" ++NOTIFYCMD+ "'path to program'" - NOTIFYCMD "/usr/local/bin/notifyme" ++NOTIFYCMD "/usr/local/bin/notifyme"+ Remember to wrap the path in "quotes" if it contains any spaces. @@ -155,57 +165,60 @@ only) argument, so you can deliver a preformatted message too. Note that the NOTIFYCMD will only be called for a given event when you set the EXEC flag by using the notify flags, below: -.SH NOTIFY FLAGS +NOTIFY FLAGS +------------ By default, all notify events (see above) generate a global message (wall) to all users, plus they are logged via the syslog. You can change this with the NOTIFYFLAG directive in the configuration file: - NOTIFYFLAG \fInotifytype\fR \fIflags\fR ++NOTIFYFLAG+ 'notifytype' 'flags' - Examples: +Examples: - NOTIFYFLAG ONLINE SYSLOG + - `NOTIFYFLAG ONLINE SYSLOG` - NOTIFYFLAG ONBATT SYSLOG+WALL + - `NOTIFYFLAG ONBATT SYSLOG+WALL` - NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC + - `NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC` The flags that can be set on a given notify event are: -.IP SYSLOG +*SYSLOG*:: Write this message to the syslog. -.IP WALL -Send this message to all users on the system via 'wall'. +*WALL*:: +Send this message to all users on the system via *wall*(1). -.IP EXEC +*EXEC*:: Execute the NOTIFYCMD. -.IP IGNORE +*IGNORE*:: Don't do anything. If you use this, don't use any of the other flags. -.P + You can mix these flags. "SYSLOG+WALL+EXEC" does all three for a given event. -.SH NOTIFY MESSAGES +NOTIFY MESSAGES +--------------- upsmon comes with default messages for each of the NOTIFY events. These can be changed with the NOTIFYMSG directive. - NOTIFYMSG \fItype\fR "\fImessage\fR" ++NOTIFYMSG+ 'type' "'message'" - Examples: +Examples: - NOTIFYMSG ONLINE "UPS %s is getting line power" + - `NOTIFYMSG ONLINE "UPS %s is getting line power"` - NOTIFYMSG ONBATT "Someone pulled the plug on %s" + - ` NOTIFYMSG ONBATT "Someone pulled the plug on %s"` The first instance of %s is replaced with the identifier of the UPS that generated the event. These messages are used when sending walls to the users directly from upsmon, and are also passed to the NOTIFYCMD. -.SH POWER VALUES +POWER VALUES +------------ The "current overall power value" is the sum of all UPSes that are currently able to supply power to the system hosting upsmon. Any @@ -216,18 +229,18 @@ put into "forced shutdown" mode, it no longer contributes. A "power value" on a MONITOR line in the config file is the number of power supplies that the UPS runs on the current system. - MONITOR \fIupsname\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR ++MONITOR+ 'upsname' 'powervalue' 'username' 'password' 'type' Normally, you only have one power supply, so it will be set to 1. - MONITOR myups@myhost 1 username mypassword master ++MONITOR myups@myhost 1 username mypassword master+ On a large server with redundant power supplies, the power value for a UPS may be greater than 1. You may also have more than one of them defined. - MONITOR ups\-alpha@myhost 2 username mypassword master ++MONITOR ups-alpha@myhost 2 username mypassword master+ - MONITOR ups\-beta@myhost 2 username mypassword master ++MONITOR ups-beta@myhost 2 username mypassword master+ You can also set the power value for a UPS to 0 if it does not supply any power to that system. This is generally used when you want to use the @@ -236,48 +249,49 @@ running the system that hosts upsmon. Don't set this to "master" unless you really want to power this UPS off when this instance of upsmon needs to shut down for its own reasons. - MONITOR faraway@anotherbox 0 username mypassword slave ++MONITOR faraway@anotherbox 0 username mypassword slave+ The "minimum power value" is the number of power supplies that must be receiving power in order to keep the computer running. - MINSUPPLIES \fIvalue\fR ++MINSUPPLIES+ 'value' Typical PCs only have 1, so most users will leave this at the default. - MINSUPPLIES 1 ++MINSUPPLIES 1+ If you have a server or similar system with redundant power, then this value will usually be set higher. One that requires three power supplies to be running at all times would simply set it to 3. - MINSUPPLIES 3 ++MINSUPPLIES 3+ When the current overall power value drops below the minimum power value, upsmon starts the shutdown sequence. This design allows you to lose some of your power supplies in a redundant power environment without bringing down the entire system while still working properly for smaller systems. -.SH UPS TYPES +UPS TYPES +--------- -upsmon and \fBupsd\fR(8) don't always run on the same system. When they +*upsmon* and linkman:upsd[8] don't always run on the same system. When they do, any UPSes that are directly attached to the upsmon host should be monitored in "master" mode. This makes upsmon take charge of that equipment, and it will wait for slaves to disconnect before shutting down the local system. This allows the distant systems (monitoring over -the network) to shut down cleanly before \fBupsdrvctl shutdown\fR runs +the network) to shut down cleanly before `upsdrvctl shutdown` runs and turns them all off. When upsmon runs as a slave, it is relying on the distant system to tell it about the state of the UPS. When that UPS goes critical (on battery and low battery), it immediately invokes the local shutdown command. This needs to happen quickly. Once it disconnects from the distant -\fBupsd\fR(8) server, the master upsmon will start its own shutdown +linkman:upsd[8] server, the master upsmon will start its own shutdown process. Your slaves must all shut down before the master turns off the power or filesystem damage may result. upsmon deals with slaves that get wedged, hang, or otherwise fail to -disconnect from \fBupsd\fR(8) in a timely manner with the HOSTSYNC +disconnect from linkman:upsd[8] in a timely manner with the HOSTSYNC timer. During a shutdown situation, the master upsmon will give up after this interval and it will shut down anyway. This keeps the master from sitting there forever (which would endanger that host) if a slave should @@ -288,19 +302,21 @@ interval to something greater than the default 15 seconds. Don't set this too high, or your UPS battery may run out of power before the master upsmon process shuts down that system. -.SH TIMED SHUTDOWNS +TIMED SHUTDOWNS +--------------- For those rare situations where the shutdown process can't be completed between the time that low battery is signalled and the UPS actually powers -off the load, use the \fBupssched\fR(8) helper program. You can use it +off the load, use the linkman:upssched[8] helper program. You can use it along with upsmon to schedule a shutdown based on the "on battery" event. -upssched can then come back to upsmon to initiate the shutdown once it's +upssched can then come back to upsmon to initiate the shutdown once it has run on battery too long. This can be complicated and messy, so stick to the default critical UPS handling if you can. -.SH REDUNDANT POWER SUPPLIES +REDUNDANT POWER SUPPLIES +------------------------ If you have more than one power supply for redundant power, you may also have more than one UPS feeding your computer. upsmon can handle this. Be @@ -328,11 +344,12 @@ the shutdown sequence. However, if beta goes critical, subtracting its contribution will take the current overall value from 3 to 2. This is just high enough to satisfy the minimum, so the system will continue running as before. If beta -returns later, it will be re\(hyadded and the current value will go back to +returns later, it will be re-added and the current value will go back to 3. This allows you to swap out UPSes, change a power configuration, or whatever, as long as you maintain the minimum power value at all times. -.SH MIXED OPERATIONS +MIXED OPERATIONS +---------------- Besides being able to monitor multiple UPSes, upsmon can also monitor them as different roles. If you have a system with multiple power supplies @@ -345,7 +362,8 @@ UPS that has gone critical but doesn't supply the local system. You can do this with some scripting magic in your notify command script, but it's beyond the scope of this manual. -.SH FORCED SHUTDOWNS +FORCED SHUTDOWNS +---------------- When upsmon is forced to bring down the local system, it sets the "FSD" (forced shutdown) flag on any UPSes that it is running in master @@ -354,15 +372,16 @@ that is otherwise OK needs to be brought down due to some pressing event on the master. You can manually invoke this mode on the master upsmon by starting another -copy with '\-c fsd'. This is useful when you want to initiate a shutdown +copy with `-c fsd`. This is useful when you want to initiate a shutdown before the critical stage through some external means, such as -\fBupssched\fR(8). +linkman:upssched[8]. -.SH DEAD UPSES +DEAD UPSES +---------- -In the event that upsmon can't reach \fBupsd\fR(8), it declares that UPS +In the event that upsmon can't reach linkman:upsd[8], it declares that UPS "dead" after some interval controlled by DEADTIME in the -\fBupsmon.conf\fR(5). If this happens while that UPS was last known to be +linkman:upsmon.conf[5]. If this happens while that UPS was last known to be on battery, it is assumed to have gone critical and no longer contributes to the overall power value. @@ -370,53 +389,61 @@ upsmon will alert you to a UPS that can't be contacted for monitoring with a "NOCOMM" notifier by default every 300 seconds. This can be changed with the NOCOMMWARNTIME setting. -.SH RELOADING NUANCES +RELOADING NUANCES +----------------- upsmon usually gives up root powers for the process that does most of the work, including handling signals like SIGHUP to reload the configuration -file. This means your \fBupsmon.conf\fR(8) file must be readable by -the non\(hyroot account that upsmon switches to. +file. This means your linkman:upsmon.conf[8] file must be readable by +the non-root account that upsmon switches to. If you want reloads to work, upsmon must run as some user that has permissions to read the configuration file. I recommend making a new user just for this purpose, as making the file readable by "nobody" (the default user) would be a bad idea. -See the RUN_AS_USER section in \fBupsmon.conf\fR(8) for more on this topic. +See the RUN_AS_USER section in linkman:upsmon.conf[8] for more on this topic. Additionally, you can't change the SHUTDOWNCMD or POWERDOWNFLAG -definitions with a reload due to the split\(hyprocess model. If you change -those values, you \fBmust\fR stop upsmon and start it back up. upsmon +definitions with a reload due to the split-process model. If you change +those values, you *must* stop upsmon and start it back up. upsmon will warn you in the syslog if you make changes to either of those values during a reload. -.SH SIMULATING POWER FAILURES +SIMULATING POWER FAILURES +------------------------- To test a synchronized shutdown without pulling the plug on your UPS(es), you need only set the forced shutdown (FSD) flag on them. You can do this -by calling upsmon again to set the flag \(hy i.e.: +by calling upsmon again to set the flag, i.e.: - upsmon \-c fsd ++upsmon -c fsd+ After that, the master and the slaves will do their usual shutdown sequence as if the battery had gone critical. This is much easier on your UPS equipment, and it beats crawling under a desk to find the plug. -.SH FILES +FILES +----- -\fBupsmon.conf\fR(5) +linkman:upsmon.conf[5] -.SH SEE ALSO +SEE ALSO +-------- -.SS Server: -\fBupsd\fR(8) +Server: +~~~~~~~ +linkman:upsd[8] -.SS Clients: -\fBupsc\fR(8), \fBupscmd\fR(8), -\fBupsrw\fR(8), \fBupsmon\fR(8) +Clients: +~~~~~~~~ +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upsmon[8] -.SS CGI programs: -\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +CGI programs: +~~~~~~~~~~~~~ +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsrw.8 b/docs/man/upsrw.8 new file mode 100644 index 0000000..f052567 --- /dev/null +++ b/docs/man/upsrw.8 @@ -0,0 +1,102 @@ +'\" t +.\" Title: upsrw +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSRW" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsrw \- UPS variable administration tool +.SH "SYNOPSIS" +.sp +\fBupsrw\fR \fIups\fR +.sp +\fBupsrw\fR \-h +.sp +\fBupsrw\fR \-s \fIvariable\fR [\-u \fIusername\fR] [\-p \fIpassword\fR] \fIups\fR +.SH "DESCRIPTION" +.sp +\fBupsrw\fR allows you to view and change the read/write variables inside your UPS\&. It sends commands via the server \fBupsd\fR(8) to your driver, which configures the hardware for you\&. +.sp +The list of variables that allow you to change their values is based on the capabilities of your UPS equipment\&. Not all models support this feature\&. Typically, cheaper hardware does not support any of them\&. Run upsrw with a UPS identifier to see what will work for you\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help message\&. +.RE +.PP +\fB\-s\fR \fIvariable\fR +.RS 4 +Specify the variable to be changed inside the UPS\&. For unattended mode such as in shell scripts, use the format VAR=VALUE to specify both the variable and the value, for example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-s input\&.transfer\&.high=129 +.fi +.if n \{\ +.RE +.\} +.sp +Without this argument, upsrw will just display the list of the variables and their possible values\&. +.sp +Some variables are strings, and can be set to any value within the length limit\&. Others are enumerated types and can only be set to one of those values\&. Refer to the list to know what\(cqs available in your hardware\&. +.RE +.PP +\fB\-u\fR \fIusername\fR +.RS 4 +Set the NUT username for the connection to the server\&. This is optional, and you will be prompted for this when using the \-s option if you don\(cqt specify \-u on the command line\&. NUT usernames are defined in +\fBupsd.users\fR(5), and are not linked to system usernames\&. +.RE +.PP +\fB\-p\fR \fIpassword\fR +.RS 4 +Set the password to authenticate to the server\&. This is also optional like \-u, and you will be prompted for it if necessary\&. +.RE +.PP +\fIups\fR +.RS 4 +View or change the settings on this UPS\&. The format for this option is +upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. +.RE +.SH "UNATTENDED MODE" +.sp +If you run this program inside a shell script or similar to set variables, you will need to specify all of the information on the command line\&. This means using \-s VAR=VALUE, \-u and \-p\&. Otherwise it will put up a prompt and your program will hang\&. +.sp +This is not necessary when displaying the list, as the username and password are not required for read\-only mode\&. +.SH "DIAGNOSTICS" +.sp +\fBupsrw\fR can\(cqt set variables on your UPS unless you provide a valid username and password\&. If you get "access denied" errors, make sure that your \fBupsd.users\fR(5) has an entry for you, and that the username you are using has permissions to SET variables\&. +.SH "HISTORY" +.sp +This program used to be called upsct2, which was ambiguous and confusing\&. +.SH "SEE ALSO" +.sp +\fBupsd\fR(8), \fBupscmd\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsrw.8 b/docs/man/upsrw.txt similarity index 54% rename from man/upsrw.8 rename to docs/man/upsrw.txt index ee5a74c..c58b040 100644 --- a/man/upsrw.8 +++ b/docs/man/upsrw.txt @@ -1,19 +1,25 @@ -.TH UPSRW 8 "Mon Jan 22 2007" "" "Network UPS Tools (NUT)" -.SH NAME -upsrw \- UPS variable administration tool -.SH SYNOPSIS -.B upsrw \fIups\fR +UPSRW(8) +======== -.B upsrw \-h +NAME +---- -.B upsrw \-s \fIvariable\fB [\-u \fIusername\fB] [\-p \fIpassword\fB] -\fIups\fR +upsrw - UPS variable administration tool -.SH DESCRIPTION +SYNOPSIS +-------- -.B upsrw -allows you to view and change the read/write variables inside your UPS. -It sends commands via the server \fBupsd\fR(8) to your driver, which +*upsrw* 'ups' + +*upsrw* -h + +*upsrw* -s 'variable' [-u 'username'] [-p 'password'] 'ups' + +DESCRIPTION +----------- + +*upsrw* allows you to view and change the read/write variables inside your UPS. +It sends commands via the server linkman:upsd[8] to your driver, which configures the hardware for you. The list of variables that allow you to change their values is based on @@ -21,63 +27,70 @@ the capabilities of your UPS equipment. Not all models support this feature. Typically, cheaper hardware does not support any of them. Run upsrw with a UPS identifier to see what will work for you. -.SH OPTIONS +OPTIONS +------- -.IP \-h +*-h*:: Display the help message. -.IP "\-s \fIvariable\fR" +*-s* 'variable':: Specify the variable to be changed inside the UPS. For unattended mode such as in shell scripts, use the format VAR=VALUE to specify both the variable and the value, for example: -\-s input.transfer.high=129 - + -s input.transfer.high=129 ++ Without this argument, upsrw will just display the list of the variables and their possible values. - ++ Some variables are strings, and can be set to any value within the length limit. Others are enumerated types and can only be set to one of those values. Refer to the list to know what's available in your hardware. -.IP "\-u \fIusername\fR" -Set the username for the connection to the server. This is optional, -and you will be prompted for this when using the \-s option if you don't -specify \-u on the command line. +*-u* 'username':: +Set the NUT username for the connection to the server. This is optional, +and you will be prompted for this when using the -s option if you don't +specify -u on the command line. NUT usernames are defined in +linkman:upsd.users[5], and are not linked to system usernames. -.IP "\-p \fIpassword\fR" +*-p* 'password':: Set the password to authenticate to the server. This is also optional -like \-u, and you will be prompted for it if necessary. +like -u, and you will be prompted for it if necessary. -.IP \fIups\fR +'ups':: View or change the settings on this UPS. The format for this option is -upsname[@hostname[:port]]. The default hostname is "localhost". +`upsname[@hostname[:port]]`. The default hostname is "localhost". -.SH UNATTENDED MODE +UNATTENDED MODE +--------------- If you run this program inside a shell script or similar to set variables, you will need to specify all of the information on the -command line. This means using \-s VAR=VALUE, \-u and \-p. Otherwise it +command line. This means using `-s VAR=VALUE`, `-u` and `-p`. Otherwise it will put up a prompt and your program will hang. This is not necessary when displaying the list, as the username and -password are not required for read\(hyonly mode. +password are not required for read-only mode. -.SH DIAGNOSTICS +DIAGNOSTICS +----------- -upsrw can't set variables on your UPS unless you provide a valid +*upsrw* can't set variables on your UPS unless you provide a valid username and password. If you get "access denied" errors, make sure -that your \fBupsd.users\fR(5) has an entry for you, and that the +that your linkman:upsd.users[5] has an entry for you, and that the username you are using has permissions to SET variables. -.SH HISTORY +HISTORY +------- This program used to be called upsct2, which was ambiguous and confusing. -.SH SEE ALSO -\fBupsd\fR(8), \fBupscmd\fR(8) +SEE ALSO +-------- +linkman:upsd[8], linkman:upscmd[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upssched.8 b/docs/man/upssched.8 new file mode 100644 index 0000000..2704421 --- /dev/null +++ b/docs/man/upssched.8 @@ -0,0 +1,139 @@ +'\" t +.\" Title: upssched +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSCHED" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upssched \- Timer helper for scheduling events from upsmon +.SH "SYNOPSIS" +.sp +\fBupssched\fR +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +\fBupssched\fR should be run from \fBupsmon\fR(8) via the NOTIFYCMD\&. You should never run it directly during normal operations\&. +.sp .5v +.RE +.SH "DESCRIPTION" +.sp +\fBupssched\fR was created to allow users to execute programs at times relative to events being monitored by \fBupsmon\fR(8)\&. The original purpose was to allow for a shutdown to occur after some fixed period on battery, but there are other uses that are possible\&. +.SH "INTEGRATION" +.sp +upssched needs to be called as the NOTIFYCMD in your \fBupsmon.conf\fR(5)\&. It determines what is happening based on the UPSNAME and NOTIFYTYPE environment variables\&. You should never have to deal with them directly\&. +.sp +Set the EXEC flag on the events that you want to see in upssched\&. For example, to make sure that upssched hears about ONLINE, ONBATT and LOWBATT events, the flags would look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYFLAG ONLINE EXEC +NOTIFYFLAG ONBATT EXEC +NOTIFYFLAG LOWBATT EXEC +.fi +.if n \{\ +.RE +.\} +.sp +If you also want to continue writing to the syslog, just add it in: +.sp +.if n \{\ +.RS 4 +.\} +.nf +NOTIFYFLAG ONLINE SYSLOG+EXEC +NOTIFYFLAG ONBATT SYSLOG+EXEC +NOTIFYFLAG LOWBATT SYSLOG+EXEC +.fi +.if n \{\ +.RE +.\} +.sp +For a full list of notify flags, see the \fBupsmon\fR(8) documentation\&. +.SH "CONFIGURATION" +.sp +See \fBupssched.conf\fR(5) for information on configuring this program\&. +.SH "EARLY SHUTDOWNS" +.sp +To shut down the system early, define a timer that starts due to an ONBATT condition\&. When it triggers, make your CMDSCRIPT call your shutdown routine\&. It should finish by calling upsmon \-c fsd so that upsmon gets to shut down the slaves in a controlled manner\&. +.sp +Be sure you cancel the timer if power returns (ONLINE)\&. +.SH "DEBOUNCING EVENTS" +.sp +If your UPS goes on and off battery frequently, you can use this program to reduce the number of pager messages that are sent out\&. Rather than sending pages directly from \fBupsmon\fR(8), use a short timer here\&. If the timer triggers with the UPS still on battery, then send the page\&. If the power returns before then, the timer can be cancelled and no page is necessary\&. +.SH "BACKGROUND" +.sp +This program was written primarily to fulfill the requests of users for the early shutdown scenario\&. The "outboard" design of the program (relative to upsmon) was intended to reduce the load on the average system\&. Most people don\(cqt have the requirement of shutting down after \fIN\fR seconds on battery, since the usual OB+LB testing is sufficient\&. +.sp +This program was created separately so those people don\(cqt have to spend CPU time and RAM on something that will never be used in their environments\&. +.sp +The design of the timer handler is also geared towards minimizing impact\&. It will come and go from the process list as necessary\&. When a new timer is started, a process will be forked to actually watch the clock and eventually start the CMDSCRIPT\&. When a timer triggers, it is removed from the queue\&. Cancelling a timer will also remove it from the queue\&. When no timers are present in the queue, the background process exits\&. +.sp +This means that you will only see upssched running when one of two things is happening: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +There\(cqs a timer of some sort currently running +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +upsmon just called it, and you managed to catch the brief instance +.RE +.sp +The final optimization handles the possibility of trying to cancel a timer when there are none running\&. If the timer daemon isn\(cqt running, there are no timers to cancel, and furthermore there is no need to start a clock\-watcher\&. So, it skips that step and exits sooner\&. +.SH "FILES" +.sp +\fBupssched.conf\fR(5) +.SH "SEE ALSO" +.sp +\fBupsmon\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upssched.conf.5 b/docs/man/upssched.conf.5 new file mode 100644 index 0000000..2bace08 --- /dev/null +++ b/docs/man/upssched.conf.5 @@ -0,0 +1,186 @@ +'\" t +.\" Title: upssched.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSCHED\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upssched.conf \- Configuration for upssched timer program +.SH "DESCRIPTION" +.sp +This file controls the operations of \fBupssched\fR(8), the timer\-based helper program for \fBupsmon\fR(8)\&. +.SH "CONFIGURATION DIRECTIVES" +.PP +\fBCMDSCRIPT\fR \fIscriptname\fR +.RS 4 +Required\&. This must be above any AT lines\&. This script is used to invoke commands when your timers are triggered\&. It receives a single argument which is the name of the timer that caused it to trigger\&. +.RE +.PP +\fBPIPEFN\fR \fIfilename\fR +.RS 4 +Required\&. This sets the file name of the socket which will be used for interprocess communications\&. This should be in a directory where normal users can\(cqt create the file, due to the possibility of symlinking and other evil\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBCaution\fR +.ps -1 +.br +.sp +if you are running Solaris or similar, the permissions that upssched sets on this file \fBare not enough\fR to keep you safe\&. If your OS ignores the permissions on a FIFO, then you MUST put this in a protected directory! +.sp .5v +.RE +.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 +by default, \fBupsmon\fR(8) will run upssched as whatever user you have defined with RUN_AS_USER in \fBupsmon.conf\fR(8)\&. Make sure that user can create files and write to files in the path you use for PIPEFN and LOCKFN\&. +.sp .5v +.RE +.sp +My recommendation: create a special directory for upssched, make it owned by your upsmon user, then use it for both\&. +.sp +The stock version of the upssched\&.conf ships with PIPEFN disabled to make you visit this portion of the documentation and think about how your system works before potentially opening a security hole\&. +.PP +\fBLOCKFN\fR \fIfilename\fR +.RS 4 +Required\&. upssched attempts to create this file in order to avoid a race condition when two events are dispatched from upsmon at nearly the same time\&. This file will only exist briefly\&. It must not be created by any other process\&. +.sp +You should put this in the same directory as PIPEFN\&. +.RE +.PP +\fBAT\fR \fInotifytype\fR \fIupsname\fR \fIcommand\fR +.RS 4 +Define a handler for a specific event +\fInotifytype\fR +on UPS +\fIupsname\fR\&. +\fIupsname\fR +can be the special value * to apply this handler to every UPS\&. +.sp +This will perform the command +\fIcommand\fR +when the +\fInotifytype\fR +and +\fIupsname\fR +match the current activity\&. Possible values for +\fIcommand\fR +are: +.PP +\fBSTART\-TIMER\fR \fItimername\fR \fIinterval\fR +.RS 4 +Start a timer of +\fIinterval\fR +seconds\&. When it triggers, it will pass the argument +\fItimername\fR +as an argument to your CMDSCRIPT\&. +.sp +Example: +.sp +Start a timer that\(cqll execute when any UPS (*) has been gone for 10 seconds +.sp +.if n \{\ +.RS 4 +.\} +.nf +AT COMMBAD * START\-TIMER upsgone 10 +.fi +.if n \{\ +.RE +.\} +.RE +.PP +\fBCANCEL\-TIMER\fR \fItimername\fR [\fIcmd\fR] +.RS 4 +Cancel a running timer called +\fItimername\fR, if possible\&. If the timer has passed then pass the optional argument +\fIcmd\fR +to CMDSCRIPT\&. +.sp +Example: +.sp +If a specific UPS (myups@localhost) comes back online, then stop the timer before it triggers +.sp +.if n \{\ +.RS 4 +.\} +.nf +AT COMMOK myups@localhost CANCEL\-TIMER upsgone +.fi +.if n \{\ +.RE +.\} +.RE +.PP +\fBEXECUTE\fR \fIcommand\fR +.RS 4 +Immediately pass +\fIcommand\fR +as an argument to CMDSCRIPT\&. +.sp +Example: +.sp +If any UPS (*) reverts to utility power, then execute +ups\-back\-on\-line +via CMDSCRIPT\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +AT ONLINE * EXECUTE ups\-back\-on\-line +.fi +.if n \{\ +.RE +.\} +.RE +.RE +.sp +Note that any AT that matches both the \fInotifytype\fR and the \fIupsname\fR for the current event will be used\&. +.sp +For a complete list of \fInotifytype\fR possible values, refer to the section NOTIFY EVENTS in \fBupsmon\fR(8)\&. +.SH "SEE ALSO" +.sp +\fBupssched\fR(8), \fBupsmon\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upssched.conf.txt b/docs/man/upssched.conf.txt new file mode 100644 index 0000000..96aea56 --- /dev/null +++ b/docs/man/upssched.conf.txt @@ -0,0 +1,110 @@ +UPSSCHED.CONF(5) +================ + +NAME +---- + +upssched.conf - Configuration for upssched timer program + +DESCRIPTION +----------- + +This file controls the operations of linkman:upssched[8], the timer-based +helper program for linkman:upsmon[8]. + +CONFIGURATION DIRECTIVES +------------------------ + +*CMDSCRIPT* 'scriptname':: +Required. This must be above any AT lines. This script is used to +invoke commands when your timers are triggered. It receives a single +argument which is the name of the timer that caused it to trigger. + +*PIPEFN* 'filename':: +Required. This sets the file name of the socket which will be used for +interprocess communications. This should be in a directory where normal +users can't create the file, due to the possibility of symlinking +and other evil. + +CAUTION: if you are running Solaris or similar, the permissions that +upssched sets on this file *are not enough* to keep you safe. If +your OS ignores the permissions on a FIFO, then you MUST put this in a +protected directory! + +NOTE: by default, linkman:upsmon[8] will run upssched as whatever user +you have defined with RUN_AS_USER in linkman:upsmon.conf[8]. Make sure +that user can create files and write to files in the path you use for +PIPEFN and LOCKFN. + +My recommendation: create a special directory for upssched, make it +owned by your upsmon user, then use it for both. + +The stock version of the upssched.conf ships with PIPEFN disabled +to make you visit this portion of the documentation and think about how +your system works before potentially opening a security hole. + +*LOCKFN* 'filename':: +Required. upssched attempts to create this file in order to avoid a +race condition when two events are dispatched from upsmon at nearly +the same time. This file will only exist briefly. It must not be +created by any other process. ++ +You should put this in the same directory as PIPEFN. + +*AT* 'notifytype' 'upsname' 'command':: +Define a handler for a specific event 'notifytype' on UPS +'upsname'. 'upsname' can be the special value * to apply this +handler to every UPS. ++ +This will perform the command 'command' when the 'notifytype' +and 'upsname' match the current activity. Possible values for +'command' are: + +*START-TIMER* 'timername' 'interval';; +Start a timer of 'interval' seconds. When it triggers, it +will pass the argument 'timername' as an argument to your +CMDSCRIPT. ++ +Example: ++ +Start a timer that'll execute when any UPS (*) has been +gone for 10 seconds + + AT COMMBAD * START-TIMER upsgone 10 + +*CANCEL-TIMER* 'timername' ['cmd'];; +Cancel a running timer called 'timername', if possible. +If the timer has passed then pass the optional argument +'cmd' to CMDSCRIPT. ++ +Example: ++ +If a specific UPS (+myups@localhost+) comes back online, then +stop the timer before it triggers + + AT COMMOK myups@localhost CANCEL-TIMER upsgone + +*EXECUTE* 'command';; +Immediately pass 'command' as an argument to CMDSCRIPT. ++ +Example: ++ +If any UPS (*) reverts to utility power, then execute +`ups-back-on-line` via CMDSCRIPT. + + AT ONLINE * EXECUTE ups-back-on-line + +Note that any AT that matches both the 'notifytype' and the +'upsname' for the current event will be used. + +For a complete list of 'notifytype' possible values, refer to the section +NOTIFY EVENTS in linkman:upsmon[8]. + +SEE ALSO +-------- + +linkman:upssched[8], linkman:upsmon[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/man/upssched.8 b/docs/man/upssched.txt similarity index 68% rename from man/upssched.8 rename to docs/man/upssched.txt index 1adf3ad..2e377be 100644 --- a/man/upssched.8 +++ b/docs/man/upssched.txt @@ -1,20 +1,30 @@ -.TH UPSSCHED 8 "Wed Feb 6 2002" "" "Network UPS Tools (NUT)" -.SH NAME -upssched \- Timer helper for scheduling events from upsmon -.SH SYNOPSIS -.B upssched -.SH NOTE -\fBupssched\fR should be run from \fBupsmon\fR(8) via the NOTIFYCMD. +UPSSCHED(8) +=========== + +NAME +---- + +upssched - Timer helper for scheduling events from upsmon + +SYNOPSIS +-------- +*upssched* + +NOTE: *upssched* should be run from linkman:upsmon[8] via the NOTIFYCMD. You should never run it directly during normal operations. -.SH DESCRIPTION -\fBupssched\fR was created to allow users to execute programs at times -relative to events being monitored by \fBupsmon\fR(8). The original +DESCRIPTION +----------- + +*upssched* was created to allow users to execute programs at times +relative to events being monitored by linkman:upsmon[8]. The original purpose was to allow for a shutdown to occur after some fixed period on battery, but there are other uses that are possible. -.SH INTEGRATION -upssched needs to be called as the NOTIFYCMD in your \fBupsmon.conf\fR(5). +INTEGRATION +----------- + +upssched needs to be called as the NOTIFYCMD in your linkman:upsmon.conf[5]. It determines what is happening based on the UPSNAME and NOTIFYTYPE environment variables. You should never have to deal with them directly. @@ -22,54 +32,50 @@ Set the EXEC flag on the events that you want to see in upssched. For example, to make sure that upssched hears about ONLINE, ONBATT and LOWBATT events, the flags would look like this: -.IP -.nf NOTIFYFLAG ONLINE EXEC NOTIFYFLAG ONBATT EXEC NOTIFYFLAG LOWBATT EXEC -.fi -.LP If you also want to continue writing to the syslog, just add it in: -.IP -.nf NOTIFYFLAG ONLINE SYSLOG+EXEC NOTIFYFLAG ONBATT SYSLOG+EXEC NOTIFYFLAG LOWBATT SYSLOG+EXEC -.fi -.LP -For a full list of notify flags, see the \fBupsmon\fR(8) documentation. +For a full list of notify flags, see the linkman:upsmon[8] documentation. -.SH CONFIGURATION +CONFIGURATION +------------- -See \fBupssched.conf\fR(5) for information on configuring this program. +See linkman:upssched.conf[5] for information on configuring this program. -.SH EARLY SHUTDOWNS +EARLY SHUTDOWNS +--------------- To shut down the system early, define a timer that starts due to an ONBATT condition. When it triggers, make your CMDSCRIPT call your shutdown -routine. It should finish by calling "upsmon \-c fsd" so that upsmon gets +routine. It should finish by calling `upsmon -c fsd` so that upsmon gets to shut down the slaves in a controlled manner. Be sure you cancel the timer if power returns (ONLINE). -.SH DEBOUNCING EVENTS +DEBOUNCING EVENTS +----------------- If your UPS goes on and off battery frequently, you can use this program to reduce the number of pager messages that are sent out. Rather than -sending pages directly from \fBupsmon\fR(8), use a short timer here. +sending pages directly from linkman:upsmon[8], use a short timer here. If the timer triggers with the UPS still on battery, then send the page. If the power returns before then, the timer can be cancelled and no page is necessary. -.SH BACKGROUND +BACKGROUND +---------- This program was written primarily to fulfill the requests of users for the early shutdown scenario. The "outboard" design of the program (relative to upsmon) was intended to reduce the load on the average -system. Most people don't have the requirement of shutting down after n +system. Most people don't have the requirement of shutting down after 'N' seconds on battery, since the usual OB+LB testing is sufficient. This program was created separately so those people don't have to spend @@ -86,20 +92,24 @@ no timers are present in the queue, the background process exits. This means that you will only see upssched running when one of two things is happening: -\(hy There's a timer of some sort currently running - -\(hy upsmon just called it, and you managed to catch the brief instance + - There's a timer of some sort currently running + - upsmon just called it, and you managed to catch the brief instance The final optimization handles the possibility of trying to cancel a timer when there are none running. If the timer daemon isn't running, there are no timers to cancel, and furthermore there is no need to start -a clock\(hywatcher. So, it skips that step and exits sooner. +a clock-watcher. So, it skips that step and exits sooner. -.SH FILES -\fBupssched.conf\fR(5) +FILES +----- -.SH SEE ALSO -\fBupsmon\fR(8) +linkman:upssched.conf[5] -.SS Internet resources: +SEE ALSO +-------- + +linkman:upsmon[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsset.cgi.8 b/docs/man/upsset.cgi.8 new file mode 100644 index 0000000..7c09012 --- /dev/null +++ b/docs/man/upsset.cgi.8 @@ -0,0 +1,104 @@ +'\" t +.\" Title: upsset.cgi +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSET\&.CGI" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsset.cgi \- Web\-based UPS administration program +.SH "SYNOPSIS" +.sp +\fBupsset\&.cgi\fR +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +As a CGI program, this should be invoked through your web server\&. If you run it from the command line, it will sit there until you give it input resembling a POST request\&. +.sp .5v +.RE +.SH "DESCRIPTION" +.sp +\fBupsset\&.cgi\fR lets you access many administrative functions within the UPS software from your web browser\&. You can change settings and invoke instant commands where available\&. +.SH "CHANGING SETTINGS" +.sp +Some UPS hardware allows you to change certain variables to other values\&. To see what\(cqs available, pick a UPS from the chooser and select "settings", then select "View" to update the page\&. +.sp +You should see a list of items with the descriptions on the left side and the possible options or input spaces on the right\&. After changing something, be sure to "Save changes" to update the values in your UPS\&. +.sp +If your UPS doesn\(cqt support any read/write variables, there will be nothing to do on this page\&. +.sp +Setting values in read/write variables can also be done from the command line with \fBupsrw\fR(8)\&. +.SH "INSTANT COMMANDS" +.sp +Some UPS hardware also has provisions for performing certain actions at the user\(cqs command\&. These include battery tests, battery calibration, front panel tests (beep!) and more\&. To access this section, do as above, but pick "Commands" as the function\&. +.sp +If your UPS supports any instant commands, they will be listed in a chooser widget\&. Pick the one you like and "Issue command" to make it happen\&. +.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 +some dangerous commands like "Turn off load" may not happen right away\&. This is a feature, not a bug\&. +.sp .5v +.RE +.sp +The apcsmart driver and some others require that you send this command twice within a short window in order to make it happen\&. This is to keep you from accidentally killing your systems by picking the wrong one\&. +.sp +To actually turn off the load, you have to send the command once, then send it again after 3 seconds elapse but before 15 seconds pass\&. If you do it too quickly or slowly, you have to wait at least 3 seconds but not 15 seconds again\&. +.sp +You can also invoke instant commands from the command line with \fBupscmd\fR(8)\&. +.SH "ACCESS CONTROL" +.sp +upsset will only talk to \fBupsd\fR(8) servers that have been defined in your \fBhosts.conf\fR(8)\&. If it complains about "Access to that host is not authorized", check your hosts\&.conf first\&. +.SH "SECURITY" +.sp +upsset will not run until you convince it that your CGI directory has been secured\&. This is due to the possibility of someone using upsset to try password combinations against your \fBupsd\fR(8) server\&. +.sp +See the example upsset\&.conf file for more information on how you do this\&. The short explanation is\(emif you can\(cqt lock it down, don\(cqt try to run it\&. +.SH "FILES" +.sp +\fBhosts.conf\fR(5), \fBupsset.conf\fR(5) +.SH "SEE ALSO" +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsset.cgi.8 b/docs/man/upsset.cgi.txt similarity index 60% rename from man/upsset.cgi.8 rename to docs/man/upsset.cgi.txt index b93bde9..3cb7410 100644 --- a/man/upsset.cgi.8 +++ b/docs/man/upsset.cgi.txt @@ -1,21 +1,31 @@ -.TH upsset.cgi 8 "Sat Aug 31 2002" "" "Network UPS Tools (NUT)" -.SH NAME -upsset.cgi \- Web\(hybased UPS administration program -.SH SYNOPSIS -.B upsset.cgi +UPSSET.CGI(8) +============= -.SH NOTE -As a CGI program, this should be invoked through your web server. +NAME +---- + +upsset.cgi - Web-based UPS administration program + +SYNOPSIS +-------- + +*upsset.cgi* + +NOTE: As a CGI program, this should be invoked through your web server. If you run it from the command line, it will sit there until you give it input resembling a POST request. -.SH DESCRIPTION -.B upsset.cgi +DESCRIPTION +----------- + +*upsset.cgi* lets you access many administrative functions within the UPS software from your web browser. You can change settings and invoke instant commands where available. -.SH CHANGING SETTINGS +CHANGING SETTINGS +----------------- + Some UPS hardware allows you to change certain variables to other values. To see what's available, pick a UPS from the chooser and select "settings", then select "View" to update the page. @@ -28,9 +38,10 @@ If your UPS doesn't support any read/write variables, there will be nothing to do on this page. Setting values in read/write variables can also be done from the command -line with \fBupsrw\fR(8). +line with linkman:upsrw[8]. -.SH INSTANT COMMANDS +INSTANT COMMANDS +---------------- Some UPS hardware also has provisions for performing certain actions at the user's command. These include battery tests, battery calibration, front @@ -41,11 +52,12 @@ If your UPS supports any instant commands, they will be listed in a chooser widget. Pick the one you like and "Issue command" to make it happen. -Note \(hy some dangerous commands like "Turn off load" may not happen right -away. This is a feature, not a bug. The apcsmart driver and some -others require that you send this command twice within a short window in -order to make it happen. This is to keep you from accidentally killing -your systems by picking the wrong one. +NOTE: some dangerous commands like "Turn off load" may not happen right +away. This is a feature, not a bug. + +The apcsmart driver and some others require that you send this command twice +within a short window in order to make it happen. This is to keep you from +accidentally killing your systems by picking the wrong one. To actually turn off the load, you have to send the command once, then send it again after 3 seconds elapse but before 15 seconds pass. If @@ -53,26 +65,33 @@ you do it too quickly or slowly, you have to wait at least 3 seconds but not 15 seconds again. You can also invoke instant commands from the command line with -\fBupscmd\fR(8). +linkman:upscmd[8]. -.SH ACCESS CONTROL -upsset will only talk to \fBupsd\fR(8) servers that have been defined -in your \fBhosts.conf\fR(8). If it complains about "Access to that host +ACCESS CONTROL +-------------- + +upsset will only talk to linkman:upsd[8] servers that have been defined +in your linkman:hosts.conf[8]. If it complains about "Access to that host is not authorized", check your hosts.conf first. -.SH SECURITY +SECURITY +-------- upsset will not run until you convince it that your CGI directory has been secured. This is due to the possibility of someone using upsset -to try password combinations against your \fBupsd\fR(8) server. +to try password combinations against your linkman:upsd[8] server. -See the example upsset.conf file for more information on how you do this. -The short explanation is \(hy if you can't lock it down, don't try to run it. +See the example `upsset.conf` file for more information on how you do this. +The short explanation is--if you can't lock it down, don't try to run it. -.SH FILES -\fBhosts.conf\fR(5) +FILES +----- -.SH SEE ALSO +linkman:hosts.conf[5], linkman:upsset.conf[5] -.SS Internet resources: +SEE ALSO +-------- + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsset.conf.5 b/docs/man/upsset.conf.5 new file mode 100644 index 0000000..5e89519 --- /dev/null +++ b/docs/man/upsset.conf.5 @@ -0,0 +1,80 @@ +'\" t +.\" Title: upsset.conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSET\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsset.conf \- Configuration for Network UPS Tools upsset\&.cgi +.SH "DESCRIPTION" +.sp +This file only does one job\(emit lets you convince \fBupsset.cgi\fR(8) that your system\(cqs CGI directory is secure\&. The program will not run until this file has been properly defined\&. +.SH "SECURITY REQUIREMENTS" +.sp +\fBupsset.cgi\fR(8) allows you to try login name and password combinations\&. There is no rate limiting, as the program shuts down between every request\&. Such is the nature of CGI programs\&. +.sp +Normally, attackers would not be able to access your \fBupsd\fR(8) server directly as it would be protected by the LISTEN directives in your \fBupsd.conf\fR(5) file, tcp\-wrappers (if available when NUT was built), and hopefully local firewall settings in your OS\&. +.sp +\fBupsset\fR runs on your web server, so upsd will see it as a connection from a host on an internal network\&. It doesn\(cqt know that the connection is actually coming from someone on the outside\&. This is why you must secure it\&. +.sp +On Apache, you can use the \&.htaccess file or put the directives in your httpd\&.conf\&. It looks something like this, assuming the \&.htaccess method: +.sp +.if n \{\ +.RS 4 +.\} +.nf + +deny from all +allow from your\&.network\&.addresses + +.fi +.if n \{\ +.RE +.\} +.sp +You will probably have to set "AllowOverride Limit" for this directory in your server\-level configuration file as well\&. +.sp +If this doesn\(cqt make sense, then stop reading and leave this program alone\&. It\(cqs not something you absolutely need to have anyway\&. +.sp +Assuming you have all this done, and it actually works (test it!), then you may add the following directive to this file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +I_HAVE_SECURED_MY_CGI_DIRECTORY +.fi +.if n \{\ +.RE +.\} +.sp +If you lie to the program and someone beats on your upsd through your web server, don\(cqt blame me\&. +.SH "SEE ALSO" +.sp +\fBupsset.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsset.conf.5 b/docs/man/upsset.conf.txt similarity index 59% rename from man/upsset.conf.5 rename to docs/man/upsset.conf.txt index 9010ff5..e04a927 100644 --- a/man/upsset.conf.5 +++ b/docs/man/upsset.conf.txt @@ -1,25 +1,31 @@ -.TH UPSSET.CONF 5 "Wed Nov 26 2003" "" "Network UPS Tools (NUT)" -.SH NAME -upsset.conf \- Configuration for Network UPS Tools upsset.cgi +UPSSET.CONF(5) +============== -.SH DESCRIPTION +NAME +---- -This file only does one job \(hy it lets you convince \fBupsset.cgi\fR(8) +upsset.conf - Configuration for Network UPS Tools upsset.cgi + +DESCRIPTION +----------- + +This file only does one job--it lets you convince linkman:upsset.cgi[8] that your system's CGI directory is secure. The program will not run until this file has been properly defined. -.SH SECURITY REQUIREMENTS +SECURITY REQUIREMENTS +--------------------- -\fBupsset.cgi\fR(8) allows you to try login name and password combinations. +linkman:upsset.cgi[8] allows you to try login name and password combinations. There is no rate limiting, as the program shuts down between every request. Such is the nature of CGI programs. -Normally, attackers would not be able to access your \fBupsd\fR(8) server -directly as it would be protected by the ACL/ACCEPT/REJECT directives in -your \fBupsd.conf\fR(5) file and hopefully local firewall settings in -your OS. +Normally, attackers would not be able to access your linkman:upsd[8] server +directly as it would be protected by the LISTEN directives in +your linkman:upsd.conf[5] file, tcp-wrappers (if available when NUT was built), +and hopefully local firewall settings in your OS. -upsset runs on your web server, so upsd will see it as a connection from +*upsset* runs on your web server, so upsd will see it as a connection from a host on an internal network. It doesn't know that the connection is actually coming from someone on the outside. This is why you must secure it. @@ -28,17 +34,13 @@ On Apache, you can use the .htaccess file or put the directives in your httpd.conf. It looks something like this, assuming the .htaccess method: -.IP -.nf deny from all allow from your.network.addresses -.fi -.LP You will probably have to set "AllowOverride Limit" for this directory -in your server\(hylevel configuration file as well. +in your server-level configuration file as well. If this doesn't make sense, then stop reading and leave this program alone. It's not something you absolutely need to have anyway. @@ -51,8 +53,10 @@ you may add the following directive to this file: If you lie to the program and someone beats on your upsd through your web server, don't blame me. -.SH SEE ALSO -\fBupsset.cgi\fR(8) +SEE ALSO +-------- +linkman:upsset.cgi[8] -.SS Internet resources: +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.8 new file mode 100644 index 0000000..2aa8c97 --- /dev/null +++ b/docs/man/upsstats.cgi.8 @@ -0,0 +1,74 @@ +'\" t +.\" Title: upsstats.cgi +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSTATS\&.CGI" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsstats.cgi \- Web\-based UPS status viewer +.SH "SYNOPSIS" +.sp +\fBupsstats\&.cgi\fR +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +As a CGI program, this should be invoked through your web server\&. If you run it from the command line, it will either complain about unauthorized access or spew a bunch of HTML at you\&. +.sp .5v +.RE +.SH "DESCRIPTION" +.sp +\fBupsstats\&.cgi\fR uses template files to build web pages containing status information from UPS hardware\&. It can repeat sections of those template files to monitor several UPSes simultaneously, or focus on a single UPS\&. +.sp +These templates can also include references to \fBupsimage.cgi\fR(8) for graphical displays of battery charge levels, voltage readings, and the UPS load\&. +.SH "ACCESS CONTROL" +.sp +upsstats will only talk to \fBupsd\fR(8) servers that have been defined in your \fBhosts.conf\fR(5)\&. If it complains that "Access to that host is not authorized", check that file first\&. +.SH "TEMPLATES" +.sp +The web page that is displayed is actually a template containing commands to upsstats which are replaced by status information\&. The default file used for the overview is upsstats\&.html\&. +.sp +When monitoring a single UPS, the file displayed is upsstats\-single\&.html\&. +.sp +The format of these files, including the possible commands, is documented in \fBupsstats.html\fR(5)\&. +.SH "FILES" +.sp +\fBhosts.conf\fR(5), \fBupsstats.html\fR(5), upsstats\-single\&.html +.SH "SEE ALSO" +.sp +\fBupsimage.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.txt similarity index 53% rename from man/upsstats.cgi.8 rename to docs/man/upsstats.cgi.txt index 3bada83..141cfef 100644 --- a/man/upsstats.cgi.8 +++ b/docs/man/upsstats.cgi.txt @@ -1,46 +1,62 @@ -.TH upsstats.cgi 8 "Mon Sep 2 2002" "" "Network UPS Tools (NUT)" -.SH NAME -upsstats.cgi \- Web\(hybased UPS status viewer -.SH SYNOPSIS -.B upsstats.cgi +UPSSTATS.CGI(8) +=============== -.SH NOTE -As a CGI program, this should be invoked through your web server. +NAME +---- + +upsstats.cgi - Web-based UPS status viewer + +SYNOPSIS +-------- + +*upsstats.cgi* + +NOTE: As a CGI program, this should be invoked through your web server. If you run it from the command line, it will either complain about unauthorized access or spew a bunch of HTML at you. -.SH DESCRIPTION -.B upsstats.cgi +DESCRIPTION +----------- + +*upsstats.cgi* uses template files to build web pages containing status information from UPS hardware. It can repeat sections of those template files to monitor several UPSes simultaneously, or focus on a single UPS. -These templates can also include references to \fBupsimage.cgi\fR(8) +These templates can also include references to linkman:upsimage.cgi[8] for graphical displays of battery charge levels, voltage readings, and the UPS load. -.SH ACCESS CONTROL -upsstats will only talk to \fBupsd\fR(8) servers that have been defined -in your \fBhosts.conf\fR(5). If it complains that "Access to that host +ACCESS CONTROL +-------------- + +upsstats will only talk to linkman:upsd[8] servers that have been defined +in your linkman:hosts.conf[5]. If it complains that "Access to that host is not authorized", check that file first. -.SH TEMPLATES +TEMPLATES +--------- + The web page that is displayed is actually a template containing commands to upsstats which are replaced by status information. The default file used for the overview is upsstats.html. When monitoring a single UPS, the file displayed is -upsstats\-single.html. +`upsstats-single.html`. The format of these files, including the possible commands, is -documented in \fBupsstats.html\fR(5). +documented in linkman:upsstats.html[5]. +FILES +----- -.SH FILES -\fBhosts.conf\fR(5) \fBupsstats.html\fR(5) +linkman:hosts.conf[5], linkman:upsstats.html[5], upsstats-single.html -.SH SEE ALSO -\fBupsimage.cgi\fR(8) +SEE ALSO +-------- -.SS Internet resources: +linkman:upsimage.cgi[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsstats.html.5 b/docs/man/upsstats.html.5 new file mode 100644 index 0000000..b20ae24 --- /dev/null +++ b/docs/man/upsstats.html.5 @@ -0,0 +1,370 @@ +'\" t +.\" Title: upsstats.html +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "UPSSTATS\&.HTML" "5" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +upsstats.html \- HTML template for Network UPS Tools upsstats +.SH "DESCRIPTION" +.sp +This file is used by \fBupsstats.cgi\fR(8) to generate status pages\&. Certain commands are recognized, and will be replaced with various status elements on the fly\&. +.SH "FORMATTING" +.sp +Commands can be placed anywhere on a line, but must start and end with @\&. Any extra characters before or after the commands will be passed through unchanged\&. It is allowed to use more than one command on a single line, as long as each command has its own start and end character\&. If you need to use the @ sign, use @ to prevent it from being treated as a start character\&. +.SH "BLOCK CONTROL" +.sp +Some commands begin blocks \- sections of the template that will be included, excluded, or repeated depending on certain parameters\&. +.SS "BLOCK CONTROL \- ITERATION" +.PP +\fB@FOREACHUPS@\fR +.RS 4 +Starts a block that will be repeated for each MONITOR directive in the +\fBhosts.conf\fR(5)\&. This is how you can generate pages that monitor all of your systems simultaneously\&. +.RE +.PP +\fB@ENDFOR@\fR +.RS 4 +Ends a FOREACHUPS block\&. +.RE +.SS "BLOCK CONTROL \- MATCHING SPECIFIC CASES" +.PP +\fB@IFSUPP \fR\fB\fIvar\fR\fR@* +.RS 4 +Starts a block that will only be printed if the variable var is supported by the current UPS\&. This is generally used to suppress "not supported" messages by avoiding the label and variable call entirely\&. +.RE +.PP +\fB@IFEQ\fR \fIvar\fR \fIvalue\fR\fB@\fR +.RS 4 +Starts a block if the value returned from the variable +\fIvar\fR +matches +\fIvalue\fR\&. +.RE +.PP +\fB@IFBETWEEN\fR \fIvarlow\fR \fIvarhigh\fR \fIvarvalue\fR\fB@\fR +.RS 4 +Starts a block if the value returned by the variable +\fIvarvalue\fR +is between the values returned by the variables +\fIvarlow\fR +and +\fIvarhigh\fR\&. +.RE +.PP +\fB@ELSE@\fR +.RS 4 +If the previous IF\-command did not match, perform this instead\&. +.RE +.PP +\fB@ENDIF@\fR +.RS 4 +Ends an IF/ELSE\-block\&. +.RE +.SS "BLOCK CONTROL \- ADVANCED EXPRESSIONS" +.sp +Even though the parser is pretty limited, it\(cqs still possible to create rather advanced expressions\&. The key to this is the fact that multiple block control commands are AND:ed\&. This is illustrated with an example (more examples are available in upsstats\&.html)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +@IFSUPP ambient\&.humidity@ +@IFSUPP ambient\&.temperature@ +This UPS knows both ambient temperature and humidity\&. +@ELSE@ +@IFSUPP ambient\&.humidity@ +This UPS only knows ambient humidity\&. +@ELSE@ +@IFSUPP ambient\&.temperature@ +This UPS only knows ambient temperature\&. +@ELSE@ +This UPS knows nothing, how annoying\&. +@ENDIF@ +.fi +.if n \{\ +.RE +.\} +.SH "OTHER COMMANDS" +.PP +\fB@AMBTEMP@\fR +.RS 4 +Insert the ambient temperature in the current temperature scale\&. +.RE +.PP +\fB@DATE\fR \fIformat\fR\fB@\fR +.RS 4 +Insert the current date and time\&. The format string is passed to strftime, so almost anything is possible\&. See +\fBstrftime\fR(3) for possible values\&. +.RE +.PP +\fB@DEGREES@\fR +.RS 4 +Insert the entity for degrees (\(de) and either C or F depending on the current temperature scale\&. +.RE +.PP +\fB@HOST@\fR +.RS 4 +Insert the designation of the host being monitored, like +myups@localhost\&. +.RE +.PP +\fB@HOSTDESC@\fR +.RS 4 +Insert the hout\(cqs description from +\fBhosts.conf\fR(5)\&. +.RE +.PP +\fB@HOSTLINK@\fR +.RS 4 +Insert a link to upsstats\&.cgi with the "host" variable set to the current UPS\&. This is only useful within a FOREACHUPS block\&. +.RE +.PP +\fB@IMG\fR \fIvarname\fR \fB@\fR +.RS 4 +Insert an IMG SRC to +\fBupsimage.cgi\fR(8) +for one of these status variables: +.PP +battery\&.charge +.RS 4 +Battery charge \- a percentage +.RE +.PP +battery\&.voltage +.RS 4 +The charge on the battery in volts +.RE +.PP +input\&.frequency +.RS 4 +Incoming utility frequency (Hz) +.RE +.PP +input\&.voltage +.RS 4 +Incoming utility voltage +.RE +.PP +input\&.L1\-L2\&.voltage +.RS 4 +Incoming voltage, L1\-L2 (3phase) +.RE +.PP +input\&.L2\-L3\&.voltage +.RS 4 +Incoming voltage, L2\-L3 (3phase) +.RE +.PP +input\&.L3\-L1\&.voltage +.RS 4 +Incoming voltage, L3\-L1 (3phase) +.RE +.PP +output\&.frequency +.RS 4 +Outgoing utility frequency (Hz) +.RE +.PP +output\&.voltage +.RS 4 +Outgoing voltage (from the UPS) +.RE +.PP +output\&.L1\-L2\&.voltage +.RS 4 +Outgoing voltage, L1\-L2 (3phase) +.RE +.PP +output\&.L2\-L3\&.voltage +.RS 4 +Outgoing voltage, L2\-L3 (3phase) +.RE +.PP +output\&.L3\-L1\&.voltage +.RS 4 +Outgoing voltage, L3\-L1 (3phase) +.RE +.PP +output\&.L1\&.power\&.percent +.RS 4 +UPS load, L1 (3phase) +.RE +.PP +output\&.L2\&.power\&.percent +.RS 4 +UPS load, L2 (3phase) +.RE +.PP +output\&.L3\&.power\&.percent +.RS 4 +UPS load, L3 (3phase) +.RE +.PP +ups\&.load +.RS 4 +UPS load \- percentage +.RE +.PP +ups\&.temperature +.RS 4 +UPS temperature +.RE +.RE +.sp +\fIextra\fR is where you can put additional definitions\&. Right now the valid definitions are colors for various parts of the bars drawn by upsimage\&.cgi\&. Possible color names are: +.PP +back_col +.RS 4 +background color +.RE +.PP +scale_num_col +.RS 4 +scale number color +.RE +.PP +summary_col +.RS 4 +summary color (number at the bottom) +.RE +.PP +ok_zone_maj_col +.RS 4 +major scale color for the normal ("ok") zone +.RE +.PP +ok_zone_min_col +.RS 4 +minor scale color for the normal ("ok") zone +.RE +.PP +neutral_zone_maj_col +.RS 4 +major scale color for the neutral zone +.RE +.PP +neutral_zone_min_col +.RS 4 +minor scale color for the neutral zone +.RE +.PP +warn_zone_maj_col +.RS 4 +major scale color for the warning zone +.RE +.PP +warn_zone_min_col +.RS 4 +minor scale color for the warning zone +.RE +.PP +bar_col +.RS 4 +the color of the bar in the middle +.RE +.sp +All colors are hex triplets \- 0xff0000 is red, 0x00ff00 is green, and 0x0000ff is blue\&. +.sp +Examples: +.sp +.if n \{\ +.RS 4 +.\} +.nf +@IMG battery\&.charge@ +@IMG battery\&.charge back_col=0xff00ff bar_col=0xaabbcc@ +@IMG input\&.voltage ok_zone_maj_col=0x123456@ +.fi +.if n \{\ +.RE +.\} +.PP +\fB@REFRESH@\fR +.RS 4 +Insert the META header magic for refreshing the page if that variable has been set by the browser\&. This needs to be in the HEAD section of the page\&. +.RE +.PP +\fB@STATUS@\fR +.RS 4 +Expand the abbreviations in the ups\&.status variable \- OL becomes "On line", OB becomes "On battery", and so on\&. +.RE +.PP +\fB@STATUSCOLOR@\fR +.RS 4 +Insert red, green, or yellow color triplets depending on the severity of the current UPS status\&. Normal operations are green, warnings like voltage trim/boost or "off" are yellow, and other events like being on battery or having a low battery are red\&. +.RE +.PP +\fB@VAR\fR \fIvarname\fR\fB@\fR +.RS 4 +Insert the current value of the status variable varname on the host being monitored, or "Not supported"\&. +.RE +.PP +\fB@RUNTIME@\fR +.RS 4 +Inserts the current runtime, in +hh:mm:ss +format\&. +.RE +.PP +\fB@TEMPC@\fR +.RS 4 +Use the Celsius scale for temperature data (default)\&. +.RE +.PP +\fB@TEMPF@\fR +.RS 4 +Use the Fahrenheit scale for temperature data\&. +.RE +.PP +\fB@UPSTEMP@\fR +.RS 4 +Insert the UPS temperature in the current scale\&. +.RE +.PP +\fB@BATTTEMP@\fR +.RS 4 +Insert the battery temperature in the current scale\&. +.RE +.PP +\fB@UTILITYCOLOR@\fR +.RS 4 +Obsoleted\&. Use IFBETWEEN instead (see example in upsstats\&.html)\&. +.RE +.PP +\fB@VERSION@\fR +.RS 4 +Insert the version number of the software\&. +.RE +.SH "OTHER TEMPLATES" +.sp +\fBupsstats.cgi\fR(8) will also open a file called upsstats\-single\&.html if you call it with "host=" set in the URL\&. That file uses the same rules and techniques documented here\&. +.SH "SEE ALSO" +.sp +\fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) +.SS "Internet resources:" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsstats.html.txt b/docs/man/upsstats.html.txt new file mode 100644 index 0000000..d08c5d0 --- /dev/null +++ b/docs/man/upsstats.html.txt @@ -0,0 +1,235 @@ +UPSSTATS.HTML(5) +================ + +NAME +---- + +upsstats.html - HTML template for Network UPS Tools upsstats + +DESCRIPTION +----------- + +This file is used by linkman:upsstats.cgi[8] to generate status pages. +Certain commands are recognized, and will be replaced with various +status elements on the fly. + +FORMATTING +---------- + +Commands can be placed anywhere on a line, but must start and end with `@`. +Any extra characters before or after the commands will be passed through +unchanged. It is allowed to use more than one command on a single line, +as long as each command has its own start and end character. If you need +to use the `@` sign, use @ to prevent it from being treated as a start +character. + +BLOCK CONTROL +------------- + +Some commands begin blocks - sections of the template that will be +included, excluded, or repeated depending on certain parameters. + +BLOCK CONTROL - ITERATION +~~~~~~~~~~~~~~~~~~~~~~~~~ + +*@FOREACHUPS@*:: +Starts a block that will be repeated for each MONITOR directive in the +linkman:hosts.conf[5]. This is how you can generate pages that monitor +all of your systems simultaneously. + +*@ENDFOR@*:: +Ends a FOREACHUPS block. + +BLOCK CONTROL - MATCHING SPECIFIC CASES +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*@IFSUPP 'var'*@*:: +Starts a block that will only be printed if the variable var is +supported by the current UPS. This is generally used to suppress "not +supported" messages by avoiding the label and variable call entirely. + +*@IFEQ* 'var' 'value'*@*:: +Starts a block if the value returned from the variable 'var' matches +'value'. + +*@IFBETWEEN* 'varlow' 'varhigh' 'varvalue'*@*:: +Starts a block if the value returned by the variable 'varvalue' is between +the values returned by the variables 'varlow' and 'varhigh'. + +*@ELSE@*:: +If the previous IF-command did not match, perform this instead. + +*@ENDIF@*:: +Ends an IF/ELSE-block. + +BLOCK CONTROL - ADVANCED EXPRESSIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Even though the parser is pretty limited, it's still possible to create +rather advanced expressions. The key to this is the fact that +multiple block control commands are AND:ed. This is illustrated with an +example (more examples are available in upsstats.html). + + @IFSUPP ambient.humidity@ + @IFSUPP ambient.temperature@ + This UPS knows both ambient temperature and humidity. + @ELSE@ + @IFSUPP ambient.humidity@ + This UPS only knows ambient humidity. + @ELSE@ + @IFSUPP ambient.temperature@ + This UPS only knows ambient temperature. + @ELSE@ + This UPS knows nothing, how annoying. + @ENDIF@ + +OTHER COMMANDS +-------------- + +*@AMBTEMP@*:: +Insert the ambient temperature in the current temperature scale. + +*@DATE* 'format'*@*:: +Insert the current date and time. The format string is passed to strftime, +so almost anything is possible. See *strftime*(3) for possible values. + +*@DEGREES@*:: +Insert the entity for degrees (°) and either C or F depending on +the current temperature scale. + +*@HOST@*:: +Insert the designation of the host being monitored, like `myups@localhost`. + +*@HOSTDESC@*:: +Insert the hout's description from linkman:hosts.conf[5]. + +*@HOSTLINK@*:: +Insert a link to upsstats.cgi with the "host" variable set to the +current UPS. This is only useful within a FOREACHUPS block. + +*@IMG* 'varname' ['extra']*@*:: +Insert an IMG SRC to linkman:upsimage.cgi[8] for one of these +status variables: + + battery.charge;; Battery charge - a percentage + + battery.voltage;; The charge on the battery in volts + + input.frequency;; Incoming utility frequency (Hz) + + input.voltage;; Incoming utility voltage + + input.L1-L2.voltage;; Incoming voltage, L1-L2 (3phase) + + input.L2-L3.voltage;; Incoming voltage, L2-L3 (3phase) + + input.L3-L1.voltage;; Incoming voltage, L3-L1 (3phase) + + output.frequency;; Outgoing utility frequency (Hz) + + output.voltage;; Outgoing voltage (from the UPS) + + output.L1-L2.voltage;; Outgoing voltage, L1-L2 (3phase) + + output.L2-L3.voltage;; Outgoing voltage, L2-L3 (3phase) + + output.L3-L1.voltage;; Outgoing voltage, L3-L1 (3phase) + + output.L1.power.percent;; UPS load, L1 (3phase) + + output.L2.power.percent;; UPS load, L2 (3phase) + + output.L3.power.percent;; UPS load, L3 (3phase) + + ups.load;; UPS load - percentage + + ups.temperature;; UPS temperature + +'extra' is where you can put additional definitions. Right now +the valid definitions are colors for various parts of the bars drawn +by upsimage.cgi. Possible color names are: + + back_col;; background color + + scale_num_col;; scale number color + + summary_col;; summary color (number at the bottom) + + ok_zone_maj_col;; major scale color for the normal ("ok") zone + + ok_zone_min_col;; minor scale color for the normal ("ok") zone + + neutral_zone_maj_col;; major scale color for the neutral zone + + neutral_zone_min_col;; minor scale color for the neutral zone + + warn_zone_maj_col;; major scale color for the warning zone + + warn_zone_min_col;; minor scale color for the warning zone + + bar_col;; the color of the bar in the middle + +All colors are hex triplets - 0xff0000 is red, 0x00ff00 is green, and +0x0000ff is blue. + +Examples: + + @IMG battery.charge@ + @IMG battery.charge back_col=0xff00ff bar_col=0xaabbcc@ + @IMG input.voltage ok_zone_maj_col=0x123456@ + +*@REFRESH@*:: +Insert the META header magic for refreshing the page if that variable +has been set by the browser. This needs to be in the HEAD section of +the page. + +*@STATUS@*:: +Expand the abbreviations in the ups.status variable - OL becomes +"On line", OB becomes "On battery", and so on. + +*@STATUSCOLOR@*:: +Insert red, green, or yellow color triplets depending on the severity of +the current UPS status. Normal operations are green, warnings like +voltage trim/boost or "off" are yellow, and other events like being on +battery or having a low battery are red. + +*@VAR* 'varname'*@*:: +Insert the current value of the status variable varname on the host being +monitored, or "Not supported". + +*@RUNTIME@*:: +Inserts the current runtime, in `hh:mm:ss` format. + +*@TEMPC@*:: +Use the Celsius scale for temperature data (default). + +*@TEMPF@*:: +Use the Fahrenheit scale for temperature data. + +*@UPSTEMP@*:: +Insert the UPS temperature in the current scale. + +*@BATTTEMP@*:: +Insert the battery temperature in the current scale. + +*@UTILITYCOLOR@*:: +Obsoleted. Use IFBETWEEN instead (see example in upsstats.html). + +*@VERSION@*:: +Insert the version number of the software. + +OTHER TEMPLATES +--------------- + +linkman:upsstats.cgi[8] will also open a file called `upsstats-single.html` +if you call it with "host=" set in the URL. That file uses the same +rules and techniques documented here. + +SEE ALSO +-------- + +linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/usbhid-ups.8 b/docs/man/usbhid-ups.8 new file mode 100644 index 0000000..37c149d --- /dev/null +++ b/docs/man/usbhid-ups.8 @@ -0,0 +1,327 @@ +'\" t +.\" Title: usbhid-ups +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "USBHID\-UPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +usbhid-ups \- Driver for USB/HID UPS equipment +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the usbhid\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp +This driver, formerly called \fInewhidups\fR, replaces the legacy \fIhidups\fR driver, which only supported Linux systems\&. +.SH "SUPPORTED HARDWARE" +.sp +\fBusbhid\-ups\fR brings USB/HID UPS monitoring to NUT on all platform supporting USB through libusb\&. It should detect any UPS that uses the HID power device class, but the amount of data will vary depending on the manufacturer and model\&. +.sp +At the present time, usbhid\-ups supports: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +the newer Eaton USB models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +all MGE USB models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +all Dell USB models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some APC models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some Belkin models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some Cyber Power Systems models\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some TrippLite models +.RE +.sp +For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/drivers\&.list, or on the NUT website\&. You may use the "explore" driver option to gather information from HID UPSes which are not yet supported; see below for details\&. +.sp +This driver is known to work on: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +most Linux systems, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +FreeBSD (beta stage) and maybe other *BSD, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Darwin / Mac OS X, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Solaris 10\&. +.RE +.SH "EXTRA ARGUMENTS" +.sp +This driver also supports the following optional settings: +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Set the timer before the UPS is turned off after the kill power command is sent (via the +\fB\-k\fR +switch)\&. +.sp +The default value is 20 (in seconds)\&. Usually this +\fBmust be lower\fR +than +\fIondelay\fR, but the driver will +\fBnot\fR +warn you upon startup if it isn\(cqt\&. +.RE +.PP +\fBondelay\fR=\fInum\fR +.RS 4 +Set the timer for the UPS to switch on in case the power returns after the kill power command had been sent but before the actual switch off\&. This ensures the machines connected to the UPS are, in all cases, rebooted after a power failure\&. +.sp +The default value is 30 (in seconds)\&. Usually this +\fBmust be greater\fR +than offdelay, but the driver will +\fBnot\fR +warn you upon startup if it isn\(cqt\&. Some UPS\(cqes will restart no matter what, even if the power is (still) out at the moment this timer elapses\&. In that case, you could try if setting +\fIondelay = \-1\fR +in +\fBups\&.conf\fR +helps\&. +.RE +.PP +\fBpollfreq\fR=\fInum\fR +.RS 4 +Set polling frequency, in seconds, to reduce the USB data flow\&. Between two polling requests, the driver will wait for interrupts (aka UPS notifications), which are data changes returned by the UPS by itself\&. This mechanism allow to avoid or reduce staleness message, due to the UPS being temporarily overloaded with too much polling requests\&. The default value is 30 (in seconds)\&. +.RE +.PP +\fBpollonly\fR +.RS 4 +If this flag is set, the driver will ignore interrupts it receives from the UPS (not recommended, but needed if these reports are broken on your UPS)\&. +.RE +.PP +\fBvendor\fR=\fIregex\fR, \fBproduct\fR=\fIregex\fR, \fBserial\fR=\fIregex\fR, \fBvendorid\fR=\fIregex\fR, \fBproductid\fR=\fIregex\fR +.RS 4 +Select a specific UPS, in case there is more than one connected via USB Each option specifies an extended regular expression (see regex(7)) 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\&. +.sp +Examples: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\-x vendor="Foo\&.Corporation\&.*" +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\-x vendorid=051d* +(APC) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\-x product="\&.*(Smart|Back)\-?UPS\&.*" +.RE +.RE +.PP +\fBbus\fR=\fIregex\fR +.RS 4 +Select a UPS on a specific USB bus or group of busses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. bus="002", bus="00[2\-3]")\&. +.RE +.PP +\fBexplore\fR +.RS 4 +With this option, the driver will connect to any device, including ones that are not yet supported\&. This must always be combined with the "vendorid" option\&. In this mode, the driver will not do anything useful except for printing debugging information (typically used with \-DD)\&. +.RE +.SH "INSTALLATION" +.sp +This driver is not built by default\&. You can build it by using "configure \-\-with\-usb=yes"\&. Note that it will also install other USB drivers\&. +.sp +You also need to install manually the legacy hotplug files (libhidups and libhid\&.usermap, generally in /etc/hotplug/usb/), or the udev file (nut\-usbups\&.rules, generally in /etc/udev/rules\&.d/) to address the permission settings problem\&. For more information, refer to the README file in nut/scripts/hotplug or nut/scripts/udev\&. +.sp +On Linux with MGE equipment, you will need at least a 2\&.4\&.25 or 2\&.6\&.2 kernel as well as libusb\-0\&.1\&.8 or later to disable hiddev support and avoid conflict\&. +.SH "IMPLEMENTATION" +.sp +The driver ignores the "port" value in \fBups\&.conf\fR\&. Unlike previous versions of this driver, it is now possible to control multiple UPS units simultaneously with this driver, provided they can be distinguished by setting some combination of the "vendor", "product", "serial", "vendorid", and "productid" options\&. For instance: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mge] + driver = usbhid\-ups + port = auto + vendorid = 0463 +[tripplite] + driver = usbhid\-ups + port = auto + vendorid = 09ae +.fi +.if n \{\ +.RE +.\} +.SH "KNOWN ISSUES AND BUGS" +.SS "Repetitive timeout and staleness" +.sp +Some models tends to be unresponsive with the default polling frequency\&. The result is that your system log will have lots of messages like: +.sp +.if n \{\ +.RS 4 +.\} +.nf +usb 2\-1: control timeout on ep0in +usb 2\-1: usbfs: USBDEVFS_CONTROL failed cmd usbhid\-ups rqt 128 rq 6 len 256 +ret \-110 +.fi +.if n \{\ +.RE +.\} +.sp +In this case, simply modify the general parameter "pollinterval" to a higher value (like 10 for 10 seconds)\&. This should solve the issue\&. +.SS "Got EPERM: Operation not permitted upon driver startup" +.sp +You have forgotten to install the hotplug files, as explained in the INSTALLATION section above\&. Don\(cqt forget to restart hotplug so that it applies these changes\&. +.SS "Unattended shutdowns" +.sp +The hardware which was used for development of this driver is almost certainly different from what you have, and not all manufacturers follow the USB HID Power Device Class specifications to the letter\&. You don\(cqt want to find out that yours has issues here when a power failure hits your server room and you\(cqre not around to manually restart your servers\&. +.sp +If you rely on the UPS to shutdown your systems in case of mains failure and to restart them when the power returns, you \fBmust\fR test this\&. You can do so by running \fIupsmon \-c fsd\fR\&. With the mains present, this should bring your systems down and then cycle the power to restart them again\&. If you do the same without mains present, it should do the same, but in this case, the outputs shall remain off until mains power is applied again\&. +.SH "AUTHORS" +.sp +Originally sponsored by MGE UPS SYSTEMS\&. Now sponsored by Eaton http://opensource\&.eaton\&.com Arnaud Quette, Peter Selinger, Arjen de Korte +.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/ diff --git a/man/usbhid-ups.8 b/docs/man/usbhid-ups.txt similarity index 61% rename from man/usbhid-ups.8 rename to docs/man/usbhid-ups.txt index b8ae970..6443dc0 100644 --- a/man/usbhid-ups.8 +++ b/docs/man/usbhid-ups.txt @@ -1,30 +1,38 @@ -.TH USBHID-UPS 8 "Tue Nov 10 2009" "" "Network UPS Tools (NUT)" -.SH NAME -usbhid-ups \- Driver for USB/HID UPS equipment -.SH NOTE -This man page only documents the hardware\(hyspecific features of the +USBHID-UPS(8) +============= + +NAME +---- + +usbhid-ups - Driver for USB/HID UPS equipment + +NOTE +---- + +This man page only documents the hardware-specific features of the usbhid-ups driver. For information about the core driver, see -\fBnutupsdrv\fR(8). +linkman:nutupsdrv[8]. -This driver replaces the legacy hidups driver, which only supported -Linux systems, and was formerly called newhidups. +This driver, formerly called 'newhidups', replaces the legacy 'hidups' driver, +which only supported Linux systems. -.SH SUPPORTED HARDWARE -.B usbhid-ups -brings USB/HID UPS monitoring to NUT on all platform supporting USB -through libusb.It should detect any UPS that uses the HID power device -class, but the amount of data will vary depending on the manufacturer -and model. +SUPPORTED HARDWARE +------------------ + +*usbhid-ups* brings USB/HID UPS monitoring to NUT on all platform supporting +USB through libusb. It should detect any UPS that uses the HID power device +class, but the amount of data will vary depending on the manufacturer and +model. At the present time, usbhid-ups supports: - the newer Eaton USB models, - all MGE USB models, - all the Dell USB models, - some APC models, - some Belkin models, - some Cyber Power Systems models. - some TrippLite models + - the newer Eaton USB models, + - all MGE USB models, + - all Dell USB models, + - some APC models, + - some Belkin models, + - some Cyber Power Systems models. + - some TrippLite models For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/drivers.list, or on the @@ -34,34 +42,36 @@ details. This driver is known to work on: - most Linux systems, - FreeBSD (beta stage) and maybe other *BSD, - Darwin / Mac OS X, - Solaris 10. + - most Linux systems, + - FreeBSD (beta stage) and maybe other *BSD, + - Darwin / Mac OS X, + - Solaris 10. + +EXTRA ARGUMENTS +--------------- -.SH EXTRA ARGUMENTS This driver also supports the following optional settings: -.IP "offdelay=\fInum\fR" +*offdelay*='num':: Set the timer before the UPS is turned off after the kill power command is -sent (via the \fB\-k\fR switch). - -The default value is 20 (in seconds). Usually this \fBmust be lower\fR than -ondelay, but the driver will \fBnot\fR warn you upon startup if it isn't. +sent (via the *-k* switch). ++ +The default value is 20 (in seconds). Usually this *must be lower* than +'ondelay', but the driver will *not* warn you upon startup if it isn't. -.IP "ondelay=\fInum\fR" +*ondelay*='num':: Set the timer for the UPS to switch on in case the power returns after the kill power command had been sent but before the actual switch off. This ensures the machines connected to the UPS are, in all cases, rebooted after a power failure. - -The default value is 30 (in seconds). Usually this \fBmust be greater\fR -than offdelay, but the driver will \fBnot\fR warn you upon startup if it ++ +The default value is 30 (in seconds). Usually this *must be greater* +than offdelay, but the driver will *not* warn you upon startup if it isn't. Some UPS'es will restart no matter what, even if the power is (still) out at the moment this timer elapses. In that case, you could try -if setting 'ondelay = -1' in \fBups.conf\fR helps. +if setting 'ondelay = -1' in *ups.conf* helps. -.IP "pollfreq=\fInum\fR" +*pollfreq*='num':: Set polling frequency, in seconds, to reduce the USB data flow. Between two polling requests, the driver will wait for interrupts (aka UPS notifications), which are data changes returned by the UPS by itself. @@ -69,67 +79,66 @@ This mechanism allow to avoid or reduce staleness message, due to the UPS being temporarily overloaded with too much polling requests. The default value is 30 (in seconds). -.IP "pollonly" +*pollonly*:: If this flag is set, the driver will ignore interrupts it receives from the UPS (not recommended, but needed if these reports are broken on your UPS). -.IP "vendor=\fIregex\fR" -.IP "product=\fIregex\fR" -.IP "serial=\fIregex\fR" -.IP "vendorid=\fIregex\fR" -.IP "productid=\fIregex\fR" +*vendor*='regex':: +*product*='regex':: +*serial*='regex':: +*vendorid*='regex':: +*productid*='regex':: Select a specific UPS, in case there is more than one connected via -USB. Each option specifies an extended regular expression (see -\fBregex(7)\fR) that must match the UPS's entire vendor/product/serial +USB Each option specifies an extended regular expression (see +regex(7)) that must match the UPS's 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 +hexadecimal code for vendorid and productid. Try *-DD* for finding out the strings to match. - ++ Examples: - \fB-x vendor="Foo.Corporation.*"\fR + - `-x vendor="Foo.Corporation.*"` + - `-x vendorid=051d*` (APC) + - `-x product=".*(Smart|Back)-?UPS.*"` - \fB-x vendorid=051d\fR (APC) - - \fB-x product=".*(Smart|Back)-?UPS.*"\fR - -.IP "bus=\fIregex\fR" +*bus*='regex':: Select a UPS on a specific USB bus or group of busses. The argument is a regular expression that must match the bus name where the UPS is connected (e.g. bus="002", bus="00[2-3]"). -.IP "explore" +*explore*:: With this option, the driver will connect to any device, including ones that are not yet supported. This must always be combined with the "vendorid" option. In this mode, the driver will not do anything useful except for printing debugging information (typically used with -\fB-DD\fR). +-DD). + +INSTALLATION +------------ -.SH INSTALLATION This driver is not built by default. You can build it by using -"configure \-\-with\-usb=yes". Note that it will also install other USB +"configure --with-usb=yes". Note that it will also install other USB drivers. You also need to install manually the legacy hotplug files (libhidups and libhid.usermap, generally in /etc/hotplug/usb/), or the udev file -(nut-usbups.rules, generally in /etc/udev/rules.d/)to address the +(nut-usbups.rules, generally in /etc/udev/rules.d/) to address the permission settings problem. For more information, refer to the README file in nut/scripts/hotplug or nut/scripts/udev. On Linux with MGE equipment, you will need at least a 2.4.25 or 2.6.2 kernel as well as libusb-0.1.8 or later to disable hiddev support and avoid conflict. - -.SH IMPLEMENTATION -The driver ignores the "port" value in \fBups.conf\fR. Unlike previous +IMPLEMENTATION +-------------- +The driver ignores the "port" value in *ups.conf*. Unlike previous versions of this driver, it is now possible to control multiple UPS units simultaneously with this driver, provided they can be distinguished by setting some combination of the "vendor", "product", "serial", "vendorid", and "productid" options. For instance: -.nf [mge] driver = usbhid-ups port = auto @@ -138,52 +147,61 @@ by setting some combination of the "vendor", "product", "serial", driver = usbhid-ups port = auto vendorid = 09ae -.fi -.SH KNOWN ISSUES AND BUGS -.SS "Repetitive timeout and staleness" +KNOWN ISSUES AND BUGS +--------------------- + +Repetitive timeout and staleness +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Some models tends to be unresponsive with the default polling frequency. The result is that your system log will have lots of messages like: -.nf - usb 2-1: control timeout on ep0in - usb 2-1: usbfs: USBDEVFS_CONTROL failed cmd usbhid-ups rqt 128 rq 6 len 256 - ret -110 -.fi + + usb 2-1: control timeout on ep0in + usb 2-1: usbfs: USBDEVFS_CONTROL failed cmd usbhid-ups rqt 128 rq 6 len 256 + ret -110 In this case, simply modify the general parameter "pollinterval" to a higher value (like 10 for 10 seconds). This should solve the issue. -.SS "Got EPERM: Operation not permitted upon driver startup" +Got EPERM: Operation not permitted upon driver startup +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You have forgotten to install the hotplug files, as explained in the INSTALLATION section above. Don't forget to restart hotplug so that it applies these changes. -.SS "Unattended shutdowns" +Unattended shutdowns +~~~~~~~~~~~~~~~~~~~~ The hardware which was used for development of this driver is almost -certainly different from what you have and not all manufacturers follow +certainly different from what you have, and not all manufacturers follow the USB HID Power Device Class specifications to the letter. You don't want to find out that yours has issues here when a power failure hits your server room and you're not around to manually restart your servers. If you rely on the UPS to shutdown your systems in case of mains failure -and to restart them when the power returns, you \fBmust\fR test this. You +and to restart them when the power returns, you *must* test this. You can do so by running 'upsmon -c fsd'. With the mains present, this should bring your systems down and then cycle the power to restart them again. If you do the same without mains present, it should do the same, but in this case, the outputs shall remain off until mains power is applied again. -.SH AUTHORS -.SS Sponsored by MGE UPS SYSTEMS +AUTHORS +------- + +Originally sponsored by MGE UPS SYSTEMS. +Now sponsored by Eaton Arnaud Quette, Peter Selinger, Arjen de Korte -.SH SEE ALSO +SEE ALSO +-------- -.SS The core driver: -\fBnutupsdrv\fR(8) +The core driver +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] -.SS Internet resources: +Internet resources +~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/victronups.8 b/docs/man/victronups.8 new file mode 100644 index 0000000..ae9fdae --- /dev/null +++ b/docs/man/victronups.8 @@ -0,0 +1,70 @@ +'\" t +.\" Title: victronups +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 12/24/2010 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "VICTRONUPS" "8" "12/24/2010" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +victronups \- Driver for IMV/Victron UPS unit Match, Match Lite, NetUps +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the the victronups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The victronups driver should recognize all Victron models that use a serial protocol at 1200 bps\&. These include Match Lite, Match and the NetUps line\&. +.sp +The Match Lite line may only report a handful of variables\&. This is usually not a bug \- they just don\(cqt support anything else\&. +.SH "CABLING" +.sp +If your Victron cable is broken or missing, use this diagram to build a clone: +.sp +docs/cables/victron\&.txt +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional setting in the \fBups.conf\fR(5): +.PP +\fBmodelname\fR=\fIname\fR +.RS 4 +Set model name +.RE +.PP +\fBusd\fR=\fIdelay\fR +.RS 4 +Set delay before shutdown on UPS +.RE +.SH "BUGS" +.sp +The protocol for this UPS is not officially documented\&. +.SH "AUTHOR" +.sp +Radek Benedikt , Daniel Prynych +.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/ diff --git a/docs/man/victronups.txt b/docs/man/victronups.txt new file mode 100644 index 0000000..7c8e98a --- /dev/null +++ b/docs/man/victronups.txt @@ -0,0 +1,60 @@ +VICTRONUPS(8) +============= + +NAME +---- +victronups - Driver for IMV/Victron UPS unit Match, Match Lite, NetUps + +NOTE +---- +This man page only documents the hardware-specific features of the the +victronups driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The victronups driver should recognize all Victron models that use a serial +protocol at 1200 bps. These include Match Lite, Match and the NetUps line. + +The Match Lite line may only report a handful of variables. This is +usually not a bug - they just don't support anything else. + +CABLING +------- + +If your Victron cable is broken or missing, use this diagram to build +a clone: + +docs/cables/victron.txt + +EXTRA ARGUMENTS +--------------- +This driver supports the following optional setting in the +linkman:ups.conf[5]: + +*modelname*='name':: +Set model name + +*usd*='delay':: +Set delay before shutdown on UPS + + +BUGS +---- +The protocol for this UPS is not officially documented. + +AUTHOR +------ +Radek Benedikt , +Daniel Prynych + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/megatec.txt b/docs/megatec.txt deleted file mode 100644 index b0d10b8..0000000 --- a/docs/megatec.txt +++ /dev/null @@ -1,69 +0,0 @@ -Desc: Issues and direction for the megatec driver -File: megatec.txt -Date: 29 March 2006 -Auth: Carlos Rodrigues - -Overall concept -=============== - -The "powermust" driver was originally developed to support the Mustek Powermust -series of UPSes, but since there are some other drivers implementing (mostly) -the same protocol, an idea came up to unify all these other drivers under a -renamed version of "powermust": "megatec". - -The idea is to support all the hardware previously supported by the other -drivers with a minimum number of special cases. Most of the time this isn't -difficult, as the protocol states that all unknown/unimplemented commands -should be ignored (the commands are simply echoed back). - -Target drivers -============== - -The following drivers are targeted for "assimilation": - - * blazer (1) - * fentonups (1) - * mustek (1) - * esupssmart (1) - * ippon (1) - * sms (1) - * masterguard (3) - -(1) megatec already supercedes this driver in functionality. -(2) megatec partially supercedes this driver in functionality, but some - small features are missing (non-critical for normal operation). -(3) megatec partially supercedes this driver in functionality, but some - important features are missing, which means some hardware may not be - supported. - -The above status is infered from some testing and from looking at the code -of the drivers. Although I have a high degree of certainty about it, more -testing is needed/welcome. - -Notes -===== - -The "masterguard" driver seems to be the most problematic: it implements a -"Q3" command (similar to "Q1" but with extra information), and the command -to get information from the UPS is "WH" instead of "I" (with a different -response also). - -All drivers cancel the battery tests with "CT". The protocol seems to imply -that the 10 second battery test can't be cancelled (which makes sense). - -The beeper can be toggled with "Q", but there doesn't seem to exist a way to -check if it is on or off, which may confuse users when a "beeper.on" command -actually turns it off and vice-versa (maybe some models default to "on", and -others to "off", this may make this command fit better as a blind -"beeper.toggle"). - -The "sms" driver implements a simple watchdog (send and "SxxRxxx" command to -power cycle the UPS every time the "reset.watchdog" command is called). -There are two battery tests: failure ("T" - 10sec?) and until LOWBATT ("TL"). -Moreover, there are some "S.3" or "S.3R0003" commands which fly in the face -of "S05R0003" which the driver also issues (this last one matches all the -other drivers, the first two seem to imply that the UPS also accepts those -format variations to the standard "SxxRxxxx" shutdown+return commands). - --- -Carlos Rodrigues diff --git a/docs/net-protocol.txt b/docs/net-protocol.txt new file mode 100644 index 0000000..1c52d62 --- /dev/null +++ b/docs/net-protocol.txt @@ -0,0 +1,600 @@ +Network protocol information +============================ + +Since May 2002, this protocol has an official port number from IANA, +which is *3493*. The old number (3305) was a relic of the original code's +ancestry, and conflicted with other services. Version 0.50.0 and up +use 3493 by default. + +This protocol runs over TCP. UDP support was dropped in July 2003. It +had been deprecated for some time and was only capable of the simplest +query commands as authentication is impossible over a UDP socket. + +A library, named libupsclient, that implement this protocol is provided +in both static and shared version to help the client application development. + +Old command removal notice +-------------------------- + +Before version 1.5.0, a number of old commands were supported. These +have been removed from the specification. For more information, consult +an older version of the software. + +Command reference +----------------- + +Multi-word elements are contained within "quotes" for easier parsing. +Embedded quotes are escaped with backslashes. Embedded backslashes are +also escaped by representing them as \\. This protocol is intended to +be interpreted with parseconf (NUT parser) or something similar. + +GET +--- + +Retrieve a single response from the server. + +Possible sub-commands: + +NUMLOGINS +~~~~~~~~~ + +Form: + + GET NUMLOGINS + GET NUMLOGINS su700 + +Response: + + NUMLOGINS + NUMLOGINS su700 1 + +'' is the number of clients which have done LOGIN for this UPS. +This is used by the master upsmon to determine how many clients are +still connected when starting the shutdown process. + +This replaces the old "REQ NUMLOGINS" command. + +UPSDESC +~~~~~~~ + +Form: + + GET UPSDESC + GET UPSDESC su700 + +Response: + + UPSDESC "" + UPSDESC su700 "Development box" + +'' is the value of "desc=" from ups.conf for this UPS. If it +is not set, upsd will return "Unavailable". + +This can be used to provide human-readable descriptions instead of a +cryptic "upsname@hostname" string. + +VAR +~~~ + +Form: + + GET VAR + GET VAR su700 ups.status + +Response: + + VAR "" + VAR su700 ups.status "OL" + +This replaces the old "REQ" command. + +TYPE +~~~~ + +Form: + + GET TYPE + GET TYPE su700 input.transfer.low + +Response: + + TYPE ... + TYPE su700 input.transfer.low ENUM + +'' can be several values, and multiple words may be returned: + +- 'RW': this variable may be set to another value with SET +- 'ENUM': an enumerated type, which supports a few specific values +- 'STRING:n': this is a string of maximum length n + +ENUM and STRING are usually associated with RW, but not always. + +This replaces the old "VARTYPE" command. + +DESC +~~~~ + +Form: + + GET DESC + GET DESC su700 ups.status + +Response: + + DESC "" + DESC su700 ups.status "UPS status" + +'' is a string that gives a brief explanation of the named +variable. upsd may return "Unavailable" if the file which provides this +description is not installed. + +Different versions of this file may be used in some situations to +provide for localization and internationalization. + +This replaces the old "VARDESC" command. + +CMDDESC +~~~~~~~ + +Form: + + GET CMDDESC + GET CMDDESC su700 load.on + +Response: + + CMDDESC "" + CMDDESC su700 load.on "Turn on the load immediately" + +This is like DESC above, but it applies to the instant commands. + +This replaces the old "INSTCMDDESC" command. + +LIST +---- + +The LIST functions all share a common container format. They will +return "BEGIN LIST" and then repeat the initial query. The list then +follows, with as many lines are necessary to convey it. "END LIST" with +the initial query attached then follows. + +The formatting may seem a bit redundant, but it makes a different form +of client possible. You can send a LIST query and then go off and wait +for it to get back to you. When it arrives, you don't need complicated +state machines to remember which list is which. + +UPS +~~~ + +Form: + + LIST UPS + +Response: + + BEGIN LIST UPS + UPS "" + ... + END LIST UPS + + BEGIN LIST UPS + UPS su700 "Development box" + END LIST UPS + +'' is a name from ups.conf, and is the value of +desc= from ups.conf, if available. It will be set to "Unavailable" +otherwise. + +This can be used to determine what values of are valid before +calling other functions on the server. This is also a good way to +handle situations where a single upsd supports multiple drivers. + +Clients which perform a UPS discovery process may find this useful. + +VAR +~~~ + +Form: + + LIST VAR + LIST VAR su700 + +Response: + + BEGIN LIST VAR + VAR "" + ... + END LIST VAR + + BEGIN LIST VAR su700 + VAR su700 ups.mfr "APC" + VAR su700 ups.mfr.date "10/17/96" + ... + END LIST VAR su700 + +This replaces the old "LISTVARS" command. + +RW +~~ + +Form: + + LIST RW + LIST RW su700 + +Response: + + BEGIN LIST RW + RW "" + ... + END LIST RW + + BEGIN LIST RW su700 + RW su700 output.voltage.nominal "115" + RW su700 ups.delay.shutdown "020" + ... + END LIST RW su700 + +This replaces the old "LISTRW" command. + +CMD +~~~ + +Form: + + LIST CMD + LIST CMD su700 + +Response: + + BEGIN LIST CMD + CMD + ... + END LIST CMD + + BEGIN LIST CMD su700 + CMD su700 load.on + CMD su700 test.panel.start + ... + END LIST CMD su700 + +This replaces the old "LISTINSTCMD" command. + +ENUM +~~~~ + +Form: + + LIST ENUM + LIST ENUM su700 input.transfer.low + +Response: + + BEGIN LIST ENUM + ENUM "" + ... + END LIST ENUM + + BEGIN LIST ENUM su700 input.transfer.low + ENUM su700 input.transfer.low "103" + ENUM su700 input.transfer.low "100" + ... + END LIST ENUM su700 input.transfer.low + +This replaces the old "ENUM" command. + +NOTE: this does not support the old "SELECTED" notation. You must +request the current value separately. + +SET +--- + +Form: + + SET VAR "" + SET VAR su700 ups.id "My UPS" + +INSTCMD +------- + +Form: + + INSTCMD + INSTCMD su700 test.panel.start + +LOGOUT +------ + +Form: + + LOGOUT + +Response: + + OK Goodbye (recent versions) + Goodbye... (older versions) + +Used to disconnect gracefully from the server. + +LOGIN +----- + +Form: + + LOGIN + +Response: + + OK (upon success) + or <> + +NOTE: This requires "upsmon slave" or "upsmon master" in upsd.users + +Use this to log the fact that a system is drawing power from this UPS. +The upsmon master will wait until the count of attached systems reaches +1 - itself. This allows the slaves to shut down first. + +NOTE: You probably shouldn't send this command unless you are upsmon, +or a upsmon replacement. + +MASTER +------ + +Form: + + MASTER + +Response: + + OK (upon success) + or <> + +NOTE: This requires "upsmon master" in upsd.users + +This function doesn't do much by itself. It is used by upsmon to make +sure that master-level functions like FSD are available if necessary. + +FSD +--- + +Form: + + FSD + +Response: + + OK FSD-SET (success) + or <> + +NOTE: This requires "upsmon master" in upsd.users, or "FSD" action +granted in upsd.users + +upsmon in master mode is the primary user of this function. It sets this +"forced shutdown" flag on any UPS when it plans to power it off. This is +done so that slave systems will know about it and shut down before the +power disappears. + +Setting this flag makes "FSD" appear in a STATUS request for this UPS. +Finding "FSD" in a status request should be treated just like a "OB LB". + +It should be noted that FSD is currently a latch - once set, there is +no way to clear it short of restarting upsd or dropping then re-adding +it in the ups.conf. This may cause issues when upsd is running on a +system that is not shut down due to the UPS event. + +PASSWORD +-------- + +Form: + + PASSWORD + +Response: + + OK (upon success) + or <> + +Sets the password associated with a connection. Used for later +authentication for commands that require it. + +USERNAME +-------- + +Form: + + USERNAME + +Response: + + OK (upon success) + or <> + +Sets the username associated with a connection. This is also used for +authentication, specifically in conjunction with the upsd.users file. + +STARTTLS +-------- + +Form: + + STARTTLS + +Response: + + OK STARTTLS + or <> + +This tells upsd to switch to TLS mode internally, so all future +communications will be encrypted. You must also change to TLS mode in +the client after receiving the OK, or the connection will be useless. + +Other commands +-------------- + +- HELP: lists the commands supported by this server +- VER: shows the version of the server currently in use + +These two are not intended to be used directly by programs. Humans can +make use of this program by using telnet or netcat. If you use +telnet, make sure you don't have it set to negotiate extra options. +upsd doesn't speak telnet and will probably misunderstand your first +request due to the extra junk in the buffer. + +Error responses +--------------- + +An error response has the following format: + + ERR [...] + + is always one element; it never contains spaces. This may +be used to allow additional information () in the future. + + can have the following values: + +- 'ACCESS-DENIED' ++ +The client's host and/or authentication details (username, password) +are not sufficient to execute the requested command. + +- 'UNKNOWN-UPS' ++ +The UPS specified in the request is not known to upsd. This usually +means that it didn't match anything in ups.conf. + +- 'VAR-NOT-SUPPORTED' ++ +The specified UPS doesn't support the variable in the request. ++ +This is also sent for unrecognized variables which are in a space +which is handled by upsd, such as server.*. + +- 'CMD-NOT-SUPPORTED' ++ +The specified UPS doesn't support the instant command in the request. + +- 'INVALID-ARGUMENT' ++ +The client sent an argument to a command which is not recognized or +is otherwise invalid in this context. This is typically caused by +sending a valid command like GET with an invalid subcommand. + +- 'INSTCMD-FAILED' ++ +upsd failed to deliver the instant command request to the driver. +No further information is available to the client. This typically +indicates a dead or broken driver. + +- 'SET-FAILED' ++ +upsd failed to deliver the set request to the driver. This is + just like INSTCMD-FAILED above. + +- 'READONLY' ++ +The requested variable in a SET command is not writable. + +- 'TOO-LONG' ++ +The requested value in a SET command is too long. + +- 'FEATURE-NOT-SUPPORTED' ++ +This instance of upsd does not support the requested feature. This +is only used for TLS/SSL mode (STARTTLS) at the moment. + +- 'FEATURE-NOT-CONFIGURED' ++ +This instance of upsd hasn't been configured properly to allow the +requested feature to operate. This is also limited to STARTTLS for now. + +- 'ALREADY-SSL-MODE' ++ +TLS/SSL mode is already enabled on this connection, so upsd can't +start it again. + +- 'DRIVER-NOT-CONNECTED' ++ +upsd can't perform the requested command, since the driver for that +UPS is not connected. This usually means that the driver is not +running, or if it is, the ups.conf is misconfigured. + +- 'DATA-STALE' ++ +upsd is connected to the driver for the UPS, but that driver isn't +providing regular updates or has specifically marked the data +as stale. upsd refuses to provide variables on stale units to avoid +false readings. ++ +This generally means that the driver is running, but it has lost +communications with the hardware. Check the physical connection +to the equipment. + +- 'ALREADY-LOGGED-IN' ++ +The client already sent LOGIN for a UPS and can't do it again. +There is presently a limit of one LOGIN record per connection. + +- 'INVALID-PASSWORD' ++ +The client sent an invalid PASSWORD - perhaps an empty one. + +- 'ALREADY-SET-PASSWORD' ++ +The client already set a PASSWORD and can't set another. This also +should never happen with normal NUT clients. + +- 'INVALID-USERNAME' ++ +The client sent an invalid USERNAME. + +- 'ALREADY-SET-USERNAME' ++ +The client has already set a USERNAME, and can't set another. This +should never happen with normal NUT clients. + +- 'USERNAME-REQUIRED' ++ +The requested command requires a username for authentication, +but the client hasn't set one. + +- 'PASSWORD-REQUIRED' ++ +The requested command requires a passname for authentication, +but the client hasn't set one. + +- 'UNKNOWN-COMMAND' ++ +upsd doesn't recognize the requested command. ++ +This can be useful for backwards compatibility with older versions +of upsd. Some NUT clients will try GET and fall back on REQ after +receiving this response. + +- 'INVALID-VALUE' ++ +The value specified in the request is not valid. This usually +applies to a SET of an ENUM type which is using a value which is +not in the list of allowed values. + +Future ideas +------------ + +Dense lists +~~~~~~~~~~~ + +The LIST commands may be given the ability to handle options some day. +For example, "LIST VARS +DESC" would return the current value +like now, but it would also append the description of that variable. + +Command status +~~~~~~~~~~~~~~ + +After sending an INSTCMD or SET, a client will eventually be able to +poll to see whether it was completed successfully by the driver. + +Get collection +~~~~~~~~~~~~~~ + +Allow to request only a subtree, which can be a collection, or a sub +collection. diff --git a/docs/new-clients.txt b/docs/new-clients.txt new file mode 100644 index 0000000..da2e3ac --- /dev/null +++ b/docs/new-clients.txt @@ -0,0 +1,125 @@ +Creating new client +=================== + +NUT provides bindings for several common languages that are +presented below. All these are released under the same license as +NUT (the GNU General Public License). + +If none of these suits you for technical or legal reasons, you can +implement one easily using the <>. + +The latter approach has been used to create the Python 'PyNUT' module, the +Nagios 'check_ups' plugin (and probably others), which can serve as a +reference. + +C / C++ +------- + +Client access library +~~~~~~~~~~~~~~~~~~~~~ + +The upsclient library can be linked into other programs to give access +to upsd and UPS status information. Both static and shared versions are provided. + +Clients like upsc are provided as examples of how to retrieve data using the +upsclient functions. +link:http://www.networkupstools.org/projects.html[Other programs] not included +in this package may also use this library, such as wmnut. + +This library file and the associated header files are not installed by +default. You must `./configure --with-lib` to enable building and +installing these files. The libraries can then be built and installed +with `make` and `make install` as usual. This must be done before +building other (non-NUT) programs which depend on them. + +For more information, refer to the linkman:upsclient[3], +manual page and the various +link:man/index.html#Developer_man[upscli_*(3)] functions documentation +referenced in the same file. + +Configuration helpers +~~~~~~~~~~~~~~~~~~~~~ + +NUT provides helper scripts to ease the configuration step of your program, by +detecting the right compilation and link flags: + +- one for platforms providing pkg-config, +- and the other (libupsclient-config) for platforms not providing pkg-config. + +If you have pkg-config installed, and you need to find the location of the NUT +client include files, add the output of the following command to your build +system (which can be combined with other pkg-config invocations): + + pkg-config libupsclient --cflags + +If you don't have pkg-config, use this: + + libupsclient-config --cflags + +Reference: linkman:libupsclient-config[1] + +Python +------ + +The PyNUT module, contributed by David Goncalves, can be used for connecting a +Python script to `upsd`. Note that this code (and the accompanying NUT-Monitor +application) is licensed under the GPL v3. + +The `PyNUTClient` class abstracts the connection to the server. In order to +list the status variables for `ups1` on the local `upsd`, the following +commands could be used: + + $ cd scripts/python/module + $ python + ... + >>> import PyNUT + >>> from pprint import pprint + >>> client = PyNUT.PyNUTClient() + >>> vars = client.GetUPSVars('ups1') + >>> pprint(vars) + {'battery.charge': '90', + 'battery.charge.low': '30', + 'battery.runtime': '3690', + 'battery.voltage': '230.0', + ... + +Further examples are given in the `test_nutclient.py` file. To see the entire +API, you can run `pydoc` from the `module` directory. + +If you wish to make the module available to everyone on the system, you will +probably want to install it in the `site-packages` directory for your Python +interpreter. (This is usually one of the last items in `sys.path`.) + +Perl +---- + +The old Perl bindings from CPAN have recently been updated and merged into the +NUT source code. These operate in a similar fashion to the Python bindings, +with the addition of access to single variables, and additional interpretation +of the results. The Perl class instance encapsulates a single UPS, where the +Python class instance represents a connection to the server (which may service +multiple UPS units). + + use UPS::Nut; + + $ups = new UPS::Nut( NAME => "myups", + HOST => "somemachine.somewhere.com", + PORT => "3493", + USERNAME => "upsuser", + PASSWORD => "upspasswd", + TIMEOUT => 30, + DEBUG => 1, + DEBUGOUT => "/some/file/somewhere", + ); + if ($ups->Status() =~ /OB/) { + print "Oh, no! Power failure!\n"; + } + + tie %other_ups, 'UPS::Nut', + NAME => "myups", + HOST => "somemachine.somewhere.com", + ... # same options as new(); + ; + + print $other_ups{MFR}, " ", $other_ups{MODEL}, "\n"; + diff --git a/docs/new-drivers.txt b/docs/new-drivers.txt index 091583d..2ebc5de 100644 --- a/docs/new-drivers.txt +++ b/docs/new-drivers.txt @@ -1,32 +1,38 @@ -Desc: How to make a new driver to support another UPS -File: new-drivers.txt -Date: 14 March 2004 -Auth: Russell Kroll - Arnaud Quette +Creating a new driver to support another device +=============================================== + +This chapter will present the process to create a new driver to support +another device. + +Since NUT already supports all major power devices protocols, through +several generic drivers (genericups, usbhid-ups, snmp-ups, blazer_*, ...), +creation of new drivers has become rare. + +So most of the time, it will be limited to completing one of these +generic driver. Smart vs. Contact-closure -========================= +------------------------- If your UPS only does contact closure readings, then go straight to the -contact-closure.txt document for information on adding support. It's a -lot easier to add a few lines to a header file than it is to create a -whole new driver. +<> chapter for information on +adding support. It's a lot easier to add a few lines to a header file +than it is to create a whole new driver. Serial vs. USB vs. SNMP and more -================================ +-------------------------------- If your UPS connects to your computer via a USB port, then go straight -to the document hid-subdrivers.txt. You can probably add support for -your device by writing a new subdriver to the existing usbhid-ups -driver, which is easier than writing an entire new driver. +to the <> chapter. You can probably add +support for your device by writing a new subdriver to the existing +usbhid-ups driver, which is easier than writing an entire new driver. Similarly, if your UPS connects to your computer via an SNMP network card, you can probably add support for your device by writing a new -subdriver to the existing snmp-ups driver, which is easier than writing -an entire new driver. +subdriver to the existing snmp-ups driver. Overall concept -=============== +--------------- The basic design of drivers is simple. main.c handles most of the work for you. You don't have to worry about arguments, config files, or @@ -34,51 +40,51 @@ anything else like that. Your only concern is talking to the hardware and providing data to the outside world. Skeleton driver -=============== +--------------- Familiarize yourself with the design of skel.c in the drivers directory. It shows a few examples of the functions that main will call to obtain updated information from the hardware. Essential structure -=================== +------------------- upsdrv_info_t -------------- +~~~~~~~~~~~~~ This structure tracks several description information about the driver: - * name: the driver full name, for banner printing. - * version: the driver's own version. For sub driver information, refer below - to sub_upsdrv_info. This value has the form "X.YZ", and is - published by main as "driver.version.internal". - * authors: the driver's author(s) name. If multiple authors are listed, separate - them with '\n' so that it can be broken up by author if needed. - * status: the driver development status. The following values are allowed: - - DRV_BROKEN: setting this value will cause main to print an error - and exit. This is only used during conversions of the driver core - to keep users from using drivers which have not been converted. - Drivers in this state will be removed from the tree after some - period if they are not fixed. - - DRV_EXPERIMENTAL: set this value if your driver is potentially - broken. This will trigger a warning when it starts so the user - doesn't take it for granted. - - DRV_BETA: this value means that the driver is more stable and - complete. But it is still not recommended for production systems. - - DRV_STABLE: the driver is suitable for production systems, but not - 100 % feature complete. - - DRV_COMPLETE: this is the gold level! It implies that 100 % of the - protocol is implemented, and a full QA pass. - * subdrv_info: array of upsdrv_info_t for sub driver(s) information. This - is used for example by usbhid-ups and megatec. + * *name*: the driver full name, for banner printing. + * *version*: the driver's own version. For sub driver information, refer below + to sub_upsdrv_info. This value has the form "X.YZ", and is + published by main as "driver.version.internal". + * *authors*: the driver's author(s) name. If multiple authors are listed, separate + them with a newline character so that it can be broken up by author if needed. + * *status*: the driver development status. The following values are allowed: + - DRV_BROKEN: setting this value will cause main to print an error + and exit. This is only used during conversions of the driver core + to keep users from using drivers which have not been converted. + Drivers in this state will be removed from the tree after some + period if they are not fixed. + - DRV_EXPERIMENTAL: set this value if your driver is potentially + broken. This will trigger a warning when it starts so the user + doesn't take it for granted. + - DRV_BETA: this value means that the driver is more stable and + complete. But it is still not recommended for production systems. + - DRV_STABLE: the driver is suitable for production systems, but not + 100 % feature complete. + - DRV_COMPLETE: this is the gold level! It implies that 100 % of the + protocol is implemented, and a full QA pass. + * *subdrv_info*: array of upsdrv_info_t for sub driver(s) information. For + example, this is used by usbhid-ups. -These information are currently used for the startup banner printing and tests. +This information is currently used for the startup banner printing and tests. Essential functions -=================== +------------------- upsdrv_initups --------------- +~~~~~~~~~~~~~~ Open the port (device_path) and do any low-level things that it may need to start using that port. If you have to set DTR or RTS on a serial @@ -88,7 +94,7 @@ Don't do any sort of hardware detection here, since you may be going into upsdrv_shutdown next. upsdrv_initinfo ---------------- +~~~~~~~~~~~~~~~ Try to detect what kind of UPS is out there, if any, assuming that's possible for your hardware. If there is a way to detect that hardware @@ -99,7 +105,7 @@ This is usually a good place to create variables like ups.mfr, ups.model, ups.serial, and other "one time only" items. upsdrv_updateinfo ------------------ +~~~~~~~~~~~~~~~~~ Poll the hardware, and update any variables that you care about monitoring. Use dstate_setinfo() to store the new values. @@ -122,7 +128,7 @@ running. Calling exit() or any of the fatal*() functions is specifically not allowed anymore. upsdrv_shutdown ---------------- +~~~~~~~~~~~~~~~ Do whatever you can to make the UPS power off the load but also return after the power comes back on. You may use a different command that @@ -135,7 +141,7 @@ vulnerable to a race if the power comes back on during the shutdown process. Data types -========== +---------- To be of any use, you must supply data in ups.status. That is the minimum needed to let upsmon do its job. Whenever possible, you should @@ -149,7 +155,7 @@ needs to support many similar hardware models but can't probe to see what is actually attached. Manipulating the data -===================== +--------------------- All status data lives in structures that are managed by the dstate functions. All access and modifications must happen through those @@ -157,7 +163,7 @@ functions. Any other changes are forbidden, as they will not pushed out as updates to things like upsd. Adding variables ----------------- +~~~~~~~~~~~~~~~~ dstate_setinfo("ups.model", "Mega-Zapper 1500"); @@ -167,7 +173,7 @@ values right there: dstate_setinfo("ups.model", "Mega-Zapper %d", rating); Setting flags -------------- +~~~~~~~~~~~~~ Some variables have special properties. They can be writable, and some are strings. The ST_FLAG_* values can be used to tell upsd more about @@ -176,44 +182,44 @@ what it can do. dstate_setflags("input.transfer.high", ST_FLAG_RW); Status data -=========== +~~~~~~~~~~~ UPS status flags like on line (OL) and on battery (OB) live in ups.status. Don't manipulate this by hand. There are functions which will do this for you. - status_init() - before doing anything else + status_init() - before doing anything else - status_set(val) - add a status word (OB, OL, etc) + status_set(val) - add a status word (OB, OL, etc) - status_commit() - push out the update + status_commit() - push out the update Possible values for status_set: - OL - On line (mains is present) - OB - On battery (mains is not present) - LB - Low battery - RB - The battery needs to be replaced - CHRG - The battery is charging - DISCHRG - The battery is discharging (inverter is providing load power) - BYPASS - UPS bypass circuit is active - no battery protection is available - CAL - UPS is currently performing runtime calibration (on battery) - OFF - UPS is offline and is not supplying power to the load - OVER - UPS is overloaded - TRIM - UPS is trimming incoming voltage (called "buck" in some hardware) - BOOST - UPS is boosting incoming voltage + OL - On line (mains is present) + OB - On battery (mains is not present) + LB - Low battery + RB - The battery needs to be replaced + CHRG - The battery is charging + DISCHRG - The battery is discharging (inverter is providing load power) + BYPASS - UPS bypass circuit is active - no battery protection is available + CAL - UPS is currently performing runtime calibration (on battery) + OFF - UPS is offline and is not supplying power to the load + OVER - UPS is overloaded + TRIM - UPS is trimming incoming voltage (called "buck" in some hardware) + BOOST - UPS is boosting incoming voltage Anything else will not be recognized by the usual clients. Coordinate -with me before creating something new, since there will be duplication -and ugliness otherwise. +with the nut-upsdev list before creating something new, since there will be +duplication and ugliness otherwise. -Note: upsd injects "FSD" by itself following that command by a master +NOTE: upsd injects "FSD" by itself following that command by a master upsmon process. Drivers must not set that value. -Note: the OL and OB flags are an indication of the input line status only. +NOTE: the OL and OB flags are an indication of the input line status only. UPS alarms -========== +---------- These work like ups.status, and have three special functions which you must use to manage them. @@ -224,7 +230,7 @@ must use to manage them. alarm_commit() - push the value into ups.alarm -Note: the ALARM flag in ups.status is automatically set whenever you use +NOTE: the ALARM flag in ups.status is automatically set whenever you use alarm_set. To remove that flag from ups.status, call alarm_init and alarm_commit without calling alarm_set in the middle. @@ -238,7 +244,7 @@ There is no official list of alarm words as of this writing, so don't use these functions until you check with the upsdev list. Staleness control -================= +----------------- If you're not talking to a polled UPS, then you must ensure that it is still out there and is alive before calling dstate_dataok(). Even @@ -247,15 +253,15 @@ else to ensure that it is really available. If the attempts to contact the UPS fail, you must call dstate_datastale() to inform the server and clients. - - dstate_dataok() +- dstate_dataok() ++ +You must call this if polls are succeeding. A good place to call this +is the bottom of upsdrv_updateinfo(). - You must call this if polls are succeeding. A good place to call this - is the bottom of upsdrv_updateinfo(). - - - dstate_datastale() - - You must call this if your status is unusable. A good technique is - to call this before exiting prematurely from upsdrv_updateinfo(). +- dstate_datastale() ++ +You must call this if your status is unusable. A good technique is +to call this before exiting prematurely from upsdrv_updateinfo(). Don't hide calls to these functions deep inside helper functions. It is very hard to find the origin of staleness warnings, if you call these from @@ -265,21 +271,19 @@ either of these regularly as was stated in previous versions of this document (that requirement has long gone). Serial port handling -==================== +-------------------- Drivers which use serial port functions should include serial.h and use these functions whenever possible: - - - int ser_open(const char *port) +- int ser_open(const char *port) This opens the port and locks it if possible, using one of fcntl, lockf, or uu_lock depending on what may be available. If something fails, it calls fatal for you. If it succeeds, it always returns the fd that was opened. - - - int ser_set_speed(int fd, const char *port, speed_t speed) +- int ser_set_speed(int fd, const char *port, speed_t speed) This sets the speed of the port and also does some basic configuring with tcgetattr and tcsetattr. If you have a special serial @@ -290,39 +294,33 @@ a useful error message. This is the only place that will generate a message if someone passes a non-serial port /dev entry to your driver, so it needs the extra detail. - - - int ser_set_dtr(int fd, int state) - - int ser_set_rts(int fd, int state) + - int ser_set_dtr(int fd, int state) + - int ser_set_rts(int fd, int state) These functions can be used to set the modem control lines to provide cable power on the RS232 interface. Use state = 0 to set the line to 0 and any other value to set it to 1. - - - int set_get_dsr(int fd) - - int ser_get_cts(int fd) - - int set_get_dcd(int fd) + - int ser_get_dsr(int fd) + - int ser_get_cts(int fd) + - int ser_get_dcd(int fd) These functions read the state of the modem control lines. They will return 0 if the line is logic 0 and a non-zero value if the line is logic 1. - - - int ser_close(int fd, const char *port) + - int ser_close(int fd, const char *port) This function unlocks the port if possible and closes the fd. You should call this in your upsdrv_cleanup handler. - - - int ser_send_char(int fd, char ch) + - int ser_send_char(int fd, char ch) This attempts to write one character and returns the return value from write. You could call write directly, but using this function allows for future error handling in one place. - - - int ser_send_pace(int fd, unsigned long d_usec, - const char *fmt, ...) + - int ser_send_pace(int fd, unsigned long d_usec, const char *fmt, ...) If you need to send a formatted buffer with an intercharacter delay, use this function. There are a number of UPS controllers which can't take @@ -333,39 +331,32 @@ one. The return value is the number of characters that was sent to the port, or -1 if something failed. - - - int ser_send(int fd, const char *fmt, ...) + - int ser_send(int fd, const char *fmt, ...) Like ser_send_pace, but without a delay. Only use this if you're sure that your UPS can handle characters at the full line rate. - - - int ser_send_buf(int fd, const char *buf, size_t buflen) + - int ser_send_buf(int fd, const char *buf, size_t buflen) This sends a raw buffer to the fd. It is typically used for binary transmissions. It returns the results of the call to write. - - - int ser_send_buf_pace(int fd, unsigned long d_usec, const char *buf, - size_t buflen) + - int ser_send_buf_pace(int fd, unsigned long d_usec, const char *buf, size_t buflen) This is just ser_send_buf with an intercharacter delay. - - - int ser_get_char(int fd, char *ch, long d_sec, long d_usec) + - int ser_get_char(int fd, char *ch, long d_sec, long d_usec) This will wait up to d_sec seconds + d_usec microseconds for one character to arrive, storing it at ch. It returns 1 on success, -1 if something fails and 0 on a timeout. -Note: the delay value must not be too large, or your driver will not get +NOTE: the delay value must not be too large, or your driver will not get back to the usual idle loop in main in time to answer the PINGs from upsd. That will cause an oscillation between staleness and normal behavior. - - - int ser_get_buf(int fd, char *buf, size_t buflen, long d_sec, - long d_usec) + - int ser_get_buf(int fd, char *buf, size_t buflen, long d_sec, long d_usec) Like ser_get_char, but this one reads up to buflen bytes storing all of them in buf. The buffer is zeroed regardless of success or failure. It @@ -373,9 +364,7 @@ returns the number of bytes read, -1 on failure and 0 on a timeout. This is essentially a single read() function with a timeout. - - - int ser_get_buf_len(int fd, char *buf, size_t buflen, long d_sec, - long d_usec) + - int ser_get_buf_len(int fd, char *buf, size_t buflen, long d_sec, long d_usec) Like ser_get_buf, but this one waits for buflen bytes to arrive, storing all of them in buf. The buffer is zeroed regardless of success @@ -385,9 +374,8 @@ and 0 on a timeout. This should only be used for binary reads. See ser_get_line for protocols that are terminated by characters like CR or LF. - - - int ser_get_line(int fd, char *buf, size_t buflen, char endchar, - const char *ignset, long d_sec, long d_usec) + - int ser_get_line(int fd, char *buf, size_t buflen, char endchar, + const char *ignset, long d_sec, long d_usec) This is the reading function you should use if your UPS tends to send responses like "OK\r" or "1234\n". It reads up to buflen bytes and @@ -404,7 +392,7 @@ an empty string - "". The buffer is always cleared and is always null-terminated. It does this by reading at most (buflen - 1) bytes. -Note: any other data which is read after the endchar in the serial +NOTE: any other data which is read after the endchar in the serial buffer will be lost forever. As a result, you should not use this unless your UPS uses a polled protocol. @@ -416,9 +404,9 @@ This also means that you should not "pipeline" commands to the UPS. Send a query, then read the response, then send the next query. - - int ser_get_line_alert(int fd, char *buf, size_t buflen, - char endchar, const char *ignset, const char *alertset, - void handler(char ch), long d_sec, long d_usec) + - int ser_get_line_alert(int fd, char *buf, size_t buflen, + char endchar, const char *ignset, const char *alertset, + void handler(char ch), long d_sec, long d_usec) This is just like ser_get_line, but it allows you to specify a set of alert characters which may be received at any time. They are not added @@ -429,8 +417,7 @@ Implementation note: this function actually does all of the work, and ser_get_line is just a wrapper that sets an empty alertset and a NULL handler. - - - int ser_flush_in(int fd, const char *ignset, int verbose) + - int ser_flush_in(int fd, const char *ignset, int verbose) This function will drain the input buffer. If verbose is set to a positive number, then it will announce the characters which have been @@ -441,14 +428,12 @@ This function returns the number of characters which were read, so you can check for extra bytes by looking for a nonzero return value. Zero will also be returned if the read fails for some reason. - - - int set_flush_io(int fd) + - int set_flush_io(int fd) This function drains both the in- and output buffers. Return zero on success. - - - void ser_comm_fail(const char *fmt, ...) + - void ser_comm_fail(const char *fmt, ...) Call this whenever your serial communications fail for some reason. It takes a format string, so you can use variables and other things to @@ -468,10 +453,9 @@ If your UPS frequently fails to acknowledge polls and this is a known situation, you should make a couple of attempts before calling this function. -Note: this does not call dstate_datastale. You still need to do that. +NOTE: this does not call dstate_datastale. You still need to do that. - - - void ser_comm_good(void) + - void ser_comm_good(void) This will clear the error counter and write a "re-established" message to the syslog after communications have been lost. Your driver should @@ -479,32 +463,38 @@ call this whenever it has successfully contacted the UPS. A good place for most drivers is where it calls dstate_dataok. USB port handling -================= +----------------- Drivers which use USB functions should include usb-common.h and use these: - * structure and macro: +Structure and macro +~~~~~~~~~~~~~~~~~~~ - You should us the usb_device_id structure, and the USB_DEVICE macro to - declare the supported devices. This allows the automatic extraction of - USB information, to generate the HAL, Hotplug and udev support files. +You should us the usb_device_id structure, and the USB_DEVICE macro to +declare the supported devices. This allows the automatic extraction of +USB information, to generate the HAL, Hotplug, udev and DeviceKit-power +support files. - For example: - /* SomeVendor name */ - #define SOMEVENDOR_VENDORID 0xXXXX +For example: - /* USB IDs device table */ - static usb_device_id sv_usb_device_table [] = { - /* some models 1 */ - { USB_DEVICE(SOMEVENDOR_VENDORID, 0xYYYY), NULL }, - /* various models */ - { USB_DEVICE(SOMEVENDOR_VENDORID, 0xZZZZ), NULL }, - { USB_DEVICE(SOMEVENDOR_VENDORID, 0xAAAA), NULL }, - /* Terminating entry */ - { -1, -1, NULL } - }; +-------------------------------------------------------------------------------- +/* SomeVendor name */ +#define SOMEVENDOR_VENDORID 0xXXXX - * function: +/* USB IDs device table */ +static usb_device_id sv_usb_device_table [] = { + /* some models 1 */ + { USB_DEVICE(SOMEVENDOR_VENDORID, 0xYYYY), NULL }, + /* various models */ + { USB_DEVICE(SOMEVENDOR_VENDORID, 0xZZZZ), NULL }, + { USB_DEVICE(SOMEVENDOR_VENDORID, 0xAAAA), NULL }, + /* Terminating entry */ + { -1, -1, NULL } +}; +-------------------------------------------------------------------------------- + +Function +~~~~~~~~ - is_usb_device_supported(usb_device_id **usb_device_id_list, int dev_VendorID, int dev_ProductID) @@ -513,18 +503,18 @@ Call this in your device opening / matching function. Pass your usb_device_id structure, and a set of VendorID / DeviceID. This function returns one of the following value: -NOT_SUPPORTED (0), POSSIBLY_SUPPORTED (1) or SUPPORTED (2) -POSSIBLY_SUPPORTED is returned when the VendorID is matched, but the DeviceID -is unknown. + +- NOT_SUPPORTED (0), +- POSSIBLY_SUPPORTED (1, returned when the VendorID is matched, but the DeviceID is unknown), +- or SUPPORTED (2). For implementation examples, refer to the various USB drivers, and search for the above patterns. - -This set of USB helpers is due to expand is the near future... +NOTE: This set of USB helpers is due to expand is the near future... Variable names -============== +-------------- PLEASE don't make up new variables and commands just because you can. The new dstate functions give us the power to create just about @@ -532,18 +522,77 @@ anything, but that is a privilege and not a right. Imagine the mess that would happen if every developer decided on their own way to represent a common status element. -Check new-names.txt first to find the closest fit. If nothing matches, -contact the upsdev list or mail me directly, and we'll figure it out. +Check the <> section first to +find the closest fit. If nothing matches, contact the upsdev list, and we'll +figure it out. Patches which introduce unlisted names may be modified or dropped. +[[commands]] Message passing support -======================= +----------------------- + +upsd can call drivers to store values in read/write variables and to kick +off instant commands. This is how you register handlers for those events. + +The driver core (drivers/main.c) has a structure called upsh. You +should populate it with function pointers in your upsdrv_initinfo() +function. Right now, there are only two possibilities: + +- setvar = setting UPS variables (SET VAR protocol command) +- instcmd = instant UPS commands (INSTCMD protocol command) + +SET +~~~ + +If your driver's function for handling variable set events is called +my_ups_set(), then you'd do this to add the pointer: + + upsh.setvar = my_ups_set; + +my_ups_set() will receive two parameters: + + const char * - the variable being changed + const char * - the new value + +You should return either STAT_SET_HANDLED if your driver recognizes the +command, or STAT_SET_UNKNOWN if it doesn't. Other possibilities will be +added at some point in the future. + +INSTCMD +~~~~~~~ + +This works just like the set process, with slightly different values +arriving from the server. + + upsh.instcmd = my_ups_cmd; + +Your function will receive two args: + + const char * - the command name + const char * - (reserved) + +You should return either STAT_INSTCMD_HANDLED or STAT_INSTCMD_UNKNOWN +depending on whether your driver can handle the requested command. + +Notes +~~~~~ + +Use strcasecmp. The command names arriving from upsd should be treated +without regards to case. + +Responses +~~~~~~~~~ + +Drivers will eventually be expected to send responses to commands. +Right now, there is no channel to get these back through upsd to +the client, so this is not implemented. + +This will probably be implemented with a polling scheme in the clients. -See commands.txt. Enumerated types -================ +---------------- If you have a variable that can have several specific values, it is enumerated. You should add each one to make it available to the client: @@ -554,10 +603,10 @@ enumerated. You should add each one to make it available to the client: dstate_addenum("input.transfer.low", "105"); Writable strings -================ +---------------- Strings that may be changed by the client should have the ST_FLAG_STRING -flag set, and a maximum length byte set in the auxdata. +flag set, and a maximum length (in bytes) set in the auxdata. dstate_setinfo("ups.id", "Big UPS"); dstate_setflags("ups.id", ST_FLAG_STRING | ST_FLAG_RW); @@ -567,21 +616,21 @@ If the variable is not writable, don't bother with the flags or the auxiliary data. It won't be used. Instant commands -================ +---------------- If your hardware and driver can support a command, register it. dstate_addcmd("load.on"); Delays and ser_* functions -========================== +-------------------------- The new ser_* functions may perform reads faster than the UPS is able to respond in some cases. This means that your driver will call select() and read() numerous times if your UPS responds in bursts. This also depends on how fast your system is. -You should check your driver with strace or its equivalent on your +You should check your driver with `strace` or its equivalent on your system. If the driver is calling read() multiple times, consider adding a call to usleep before going into the ser_read_* call. That will give it a chance to accumulate so you get the whole thing with one call to @@ -600,9 +649,9 @@ The select returns almost instantly, and read gets a tiny chunk of the data. Add the delay and you get a nice four-line status poll. Canonical input mode processing -=============================== +------------------------------- -If your UPS uses '\n' and/or '\r' as endchar, consider the use of +If your UPS uses "\n" and/or "\r" as endchar, consider the use of Canonical Input Mode Processing instead of the ser_get_line* functions. Using a serial port in this mode means that select() will wait until @@ -613,8 +662,18 @@ that you no longer have to worry about the case that your UPS sends and "abcd\n" on consecutive reads, without risk of losing data (which is an often forgotten side effect of the ser_get_line* functions). -Currently an example how this works can be found in the safenet and -upscode2 drivers. The first uses a single '\r' as endchar, while the -latter accepts either '\n', "\n\r" or "\r\n" as line termination. You +Currently, an example how this works can be found in the safenet and +upscode2 drivers. The first uses a single "\r" as endchar, while the +latter accepts either "\n", "\n\r" or "\r\n" as line termination. You can define other termination characters as well, but can't undefine -'\r' and '\n' (so if you need these as data, this is not for you). +"\r" and "\n" (so if you need these as data, this is not for you). + + +[[contact-closure]] + +include::contact-closure.txt[] + + +[[hid-subdrivers]] + +include::hid-subdrivers.txt[] diff --git a/docs/new-names.txt b/docs/new-names.txt deleted file mode 100644 index 69a508e..0000000 --- a/docs/new-names.txt +++ /dev/null @@ -1,574 +0,0 @@ -Desc: New command and variable naming scheme -File: new-names.txt -Date: 09 September 2005 -Auth: Russell Kroll - Arnaud Quette - -*** NOTE *** : When updating this file, also update data/cmdvartab. - -This is a dump of the standard variables and command names used in NUT. -Don't use a name with any of the dstate functions unless it exists here. - -If you need a new variable or command name, contact the Development Team -first. - -Put another way: if you make up a name that's not in this list and it -gets into the tree, and then we come up with a better name later, clients -that use the undocumented variable will break when it is changed. - - Note: "opaque" means programs should not attempt to parse the value for - that variable as it may vary greatly from one UPS to the next. These - strings are best handled directly by the user. - - Variables - -device: General unit information - Note: these data will be redundant with some ups.* information - during a transition period. The ups.* data will then be removed. - - +-------------------------------------------------------------------------+ - | Name | Description | Typical value | - |-----------------------+---------------------------+---------------------| - | device.model | Device model | BladeUPS | - |-----------------------+---------------------------+---------------------| - | device.mfr | Device manufacturer | Eaton | - |-----------------------+---------------------------+---------------------| - | device.serial | Device serial number | WS9643050926 | - | | (opaque string) | | - |-----------------------+---------------------------+---------------------| - | device.type | Device type (ups, pdu) | ups | - +-------------------------------------------------------------------------+ - -ups: General unit information - - +-------------------------------------------------------------------------+ - | Name | Description | Typical value | - |-----------------------+------------------------------+------------------| - | ups.status | UPS status | OL (see | - | | | new-drivers.txt) | - |-----------------------+------------------------------+------------------| - | ups.alarm | UPS alarms | OVERHEAT | - |-----------------------+------------------------------+------------------| - | ups.time | Internal UPS clock time | 12:34 | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | ups.date | Internal UPS clock date | 01-02-03 | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | ups.model | UPS model | SMART-UPS 700 | - |-----------------------+------------------------------+------------------| - | ups.mfr | UPS manufacturer | APC | - |-----------------------+------------------------------+------------------| - | ups.mfr.date | UPS manufacturing date | 10/17/96 | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | ups.serial | UPS serial number (opaque | WS9643050926 | - | | string) | | - |-----------------------+------------------------------+------------------| - | ups.vendorid | Vendor ID for USB devices | 0463 | - |-----------------------+------------------------------+------------------| - | ups.productid | Product ID for USB devices | 0001 | - |-----------------------+------------------------------+------------------| - | ups.firmware | UPS firmware (opaque string) | 50.9.D | - |-----------------------+------------------------------+------------------| - | ups.firmware.aux | Auxiliary device firmware | 4Kx | - |-----------------------+------------------------------+------------------| - | ups.temperature | UPS temperature (degrees C) | 042.7 | - |-----------------------+------------------------------+------------------| - | ups.load | Load on UPS (percent) | 023.4 | - |-----------------------+------------------------------+------------------| - | ups.load.high | Load when UPS | 100 | - | | switches to overload | | - | | condition ("OVER") (percent) | | - |-----------------------+------------------------------+------------------| - | ups.id | UPS system identifier | Sierra | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | | Interval to wait before | | - | ups.delay.start | restarting the load | 0 | - | | (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.delay.reboot | Interval to wait before | 60 | - | | rebooting the UPS (seconds) | | - |-----------------------+------------------------------+------------------| - | | Interval to wait after | | - | ups.delay.shutdown | shutdown with delay command | 20 | - | | (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.timer.start | Time before the load will be | 30 | - | | started (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.timer.reboot | Time before the load will be | 10 | - | | rebooted (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.timer.shutdown | Time before the load will be | 20 | - | | shutdown (seconds) | | - |-----------------------+------------------------------+------------------| - | ups.test.interval | Interval between self tests | 1209600 (two | - | | (seconds) | weeks) | - |-----------------------+------------------------------+------------------| - | ups.test.result | Results of last self test | Bad battery pack | - | | (opaque string) | | - |-----------------------+------------------------------+------------------| - | ups.display.language | Language to use on front | E | - | | panel (*** opaque) | | - |-----------------------+------------------------------+------------------| - | ups.contacts | UPS external contact sensors | F0 | - | | (*** opaque) | | - |-----------------------+------------------------------+------------------| - | ups.power | Current value of apparent | 500 | - | | power (Volt-Amps) | | - |-----------------------+------------------------------+------------------| - | ups.power.nominal | Nominal value of apparent | 500 | - | | power (Volt-Amps) | | - |-----------------------+------------------------------+------------------| - | ups.realpower | Current value of real | 300 | - | | power (Watts) | | - |-----------------------+------------------------------+------------------| - | ups.realpower.nominal | Nominal value of real | 300 | - | | power (Watts) | | - |-----------------------+------------------------------+------------------| - | ups.beeper.status | UPS beeper status | enabled | - | | (enabled, disabled or muted) | | - |-----------------------+------------------------------+------------------| - | ups.type | UPS type (*** opaque) | offline | - |-----------------------+------------------------------+------------------| - | ups.watchdog.status | UPS watchdog status | disabled | - | | (enabled or disabled) | | - |-----------------------+------------------------------+------------------| - | ups.start.auto | UPS starts when mains is | yes | - | | (re)applied | | - +-----------------------+------------------------------+------------------+ - | ups.start.battery | Allow to start UPS from | yes | - | | battery | | - +-----------------------+------------------------------+------------------+ - | ups.start.reboot | UPS coldstarts from battery | yes | - | | (enabled or disabled) | | - +-------------------------------------------------------------------------+ - -input: Incoming line/power information - - +------------------------------------------------------------------------+ - | Name | Description | Typical value | - |---------------------------+----------------------------+---------------| - | input.voltage | Input voltage | 121.5 | - |---------------------------+----------------------------+---------------| - | input.voltage.maximum | Maximum incoming voltage | 130 | - | | seen | | - |---------------------------+----------------------------+---------------| - | input.voltage.minimum | Minimum incoming voltage | 100 | - | | seen | | - |---------------------------+----------------------------+---------------| - | input.voltage.nominal | Nominal input voltage | 120 | - |---------------------------+----------------------------+---------------| - | input.voltage.extended | Extended input voltage | no | - | | range | | - |---------------------------+----------------------------+---------------| - | input.transfer.reason | Reason for last transfer | T | - | | to battery (*** opaque) | | - |---------------------------+----------------------------+---------------| - | input.transfer.low | Low voltage transfer point | 91 | - |---------------------------+----------------------------+---------------| - | input.transfer.high | High voltage transfer | 132 | - | | point | | - |---------------------------+----------------------------+---------------| - | input.transfer.low.min | smallest settable low | 85 | - | | voltage transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.low.max | greatest settable low | 95 | - | | voltage transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.high.min | smallest settable high | 131 | - | | voltage transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.high.max | greatest settable high | 136 | - | | voltage transfer point | | - |---------------------------+----------------------------+---------------| - | input.sensitivity | Input power sensitivity | H (high) | - |---------------------------+----------------------------+---------------| - | input.quality | Input power quality (*** | FF | - | | opaque) | | - |---------------------------+----------------------------+---------------| - | input.current | Input current (A) | 4.25 | - |---------------------------+----------------------------+---------------| - | input.current.nominal | Nominal input current (A) | 5.0 | - |---------------------------+----------------------------+---------------| - | input.frequency | Input line frequency (Hz) | 60.00 | - |---------------------------+----------------------------+---------------| - | input.frequency.nominal | Nominal input line | 60 | - | | frequency (Hz) | | - |---------------------------+----------------------------+---------------| - | input.frequency.low | Input line frequency low | 47 | - | | (Hz) | | - |---------------------------+----------------------------+---------------| - | input.frequency.high | Input line frequency high | 63 | - | | (Hz) | | - |---------------------------+----------------------------+---------------| - | input.frequency.extended | Extended input frequency | no | - | | range | | - |---------------------------+----------------------------+---------------| - | input.transfer.boost.low | Low voltage boosting | 190 | - | | transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.boost.high | High voltage boosting | 210 | - | | transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.trim.low | Low voltage trimming | 230 | - | | transfer point | | - |---------------------------+----------------------------+---------------| - | input.transfer.trim.high | High voltage trimming | 240 | - | | transfer point | | - +------------------------------------------------------------------------+ - -output: Outgoing power/inverter information - - +------------------------------------------------------------------------+ - | output.voltage | Output voltage (V) | 120.9 | - |-------------------------------+--------------------------------+-------| - | output.voltage.nominal | Nominal output voltage (V) | 120 | - |-------------------------------+--------------------------------+-------| - | output.frequency | Output frequency (Hz) | 59.9 | - |-------------------------------+--------------------------------+-------| - | output.frequency.nominal | Nominal output frequency (Hz) | 60 | - |-------------------------------+--------------------------------+-------| - | output.current | Output current (A) | 4.25 | - |-------------------------------+--------------------------------+-------| - | output.current.nominal | Nominal output current (A) | 5.0 | - +------------------------------------------------------------------------+ - -Three-phase additions: ----------------------- - -The additions for three-phase measurements would produce a very long table -due to all the combinations that are possible, so these additions are -broken down to their base components. - -PHASE COUNT DETERMINATION: --------------------------- -input.phases (3 for 3phase, absent or 1 for 1phase) -output.phases (as for input.phases) - -DOMAINs: --------- -Any input or output is considered a valid DOMAIN. - -input (should really be called input.mains, but keep this for compat) -input.bypass -input.servicebypass - -output (should really be called output.load, but keep this for compat) -output.bypass -output.inverter -output.servicebypass - -SPECIFICATION (SPEC): -------------------------- -Voltage, current, frequency, etc are considered to be a specification of -the measurement. - -With this notation, the old 1phase naming scheme becomes DOMAIN.SPEC -Example: input.current - -CONTEXT: --------- -When in 3phase mode we need some way to specify the target for most -measurements in more detail, we call this the CONTEXT. - -With this notation, the naming scheme becomes DOMAIN.CONTEXT.SPEC when -in 3phase mode. -Example: input.L1.current - -Valid CONTEXTs: ---------------- -L1-L2 \ -L2-L3 \ -L3-L1 for voltage measurements -L1-N / -L2-N / -L3-N / - -L1 \ -L2 for currrent and power measurements -L3 / -N - for current measurement - -Valid SPECs: ------------ -Valid with/without context (ie. per phase or aggregated/averaged) -current Current (A) -current.maximum Maximum seen current (A) -current.minimum Minimum seen current (A) -peakcurrent Peak current -voltage Voltage (V) -voltage.nominal Nominal voltage (V) -voltage.maximum Maximum seen voltage (V) -voltage.minimum Minimum seen voltage (V) -power Apparent power (VA) -power.maximum Maximum seen apparent power (VA) -power.minimum Maximum seen apparent power (VA) -power.percent Percentage of apparent power related to maximum load -power.maximum.percent Max seen percentage of apparent power -power.minimum.percent Min seen percentage of apparent power -realpower Real power (W) -powerfactor Power Factor (dimensionless value between 0.00 and 1.00) - -Valid without context (ie. aggregation of all phases): -frequency Frequency (Hz) -frequency.nominal Nominal frequency (Hz) - -EXAMPLES: ---------- -Partial Three phase - Three phase example: -input.phases: 3 -input.frequency: 50.0 -input.L1.current: 133.0 -input.bypass.L1-L2.voltage: 398.3 -output.phases: 3 -output.L1.power: 35700 -output.powerfactor: 0.82 - -Partial Three phase - One phase example: -input.phases: 3 -input.L2.current: 48.2 -input.N.current: 3.4 -input.L3-L1.voltage: 405.4 -input.frequency: 50.1 -output.phases: 1 -output.current: 244.2 -output.voltage: 120 -output.frequency.nominal: 60.0 - - -battery: Any battery details - - +------------------------------------------------------------------------+ - | battery.charge | Battery charge (percent) | 100.0 | - |-------------------------+------------------------------+---------------| - | battery.charge.low | Remaining battery level when | 20 | - | | UPS switches to LB (percent) | | - |-------------------------+------------------------------+---------------| - | battery.charge.restart | Minimum battery level for | 20 | - | | UPS restart after power-off | | - |-------------------------+------------------------------+---------------| - | battery.charge.warning | Battery level when UPS | | - | | switches to "Warning" state | 50 | - | | (percent) | | - |-------------------------+------------------------------+---------------| - | battery.voltage | Battery voltage (V) | 24.84 | - |-------------------------+------------------------------+---------------| - | battery.capacity | Battery capacity (Ah) | 7.2 | - |-------------------------+------------------------------+---------------| - | battery.current | Battery current (A) | 1.19 | - |-------------------------+------------------------------+---------------| - | battery.temperature | Battery temperature (degrees | 050.7 | - | | C) | | - |-------------------------+------------------------------+---------------| - | battery.voltage.nominal | Nominal battery voltage (V) | 024 | - |-------------------------+------------------------------+---------------| - | battery.runtime | Battery runtime (seconds) | 1080 | - |-------------------------+------------------------------+---------------| - | battery.runtime.elapsed | Elapsed battery runtime | 60 | - | | (seconds) | | - |-------------------------+------------------------------+---------------| - | | Remaining battery runtime | | - | battery.runtime.low | when UPS switches to LB | 180 | - | | (seconds) | | - |-------------------------+------------------------------+---------------| - | battery.alarm.threshold | Battery alarm threshold | 0 (immediate) | - |-------------------------+------------------------------+---------------| - | battery.date | Battery change date (opaque | 11/14/00 | - | | string) | | - |-------------------------+------------------------------+---------------| - | battery.mfr.date | Battery manufacturing date | 2005/04/02 | - | | (opaque string) | | - |-------------------------+------------------------------+---------------| - | battery.packs | Number of battery packs | 001 | - |-------------------------+------------------------------+---------------| - | battery.packs.bad | Number of bad battery packs | 000 | - +-------------------------+------------------------------+---------------+ - | battery.type | Battery chemistry | PbAc | - | | (opaque string) | | - +-------------------------+------------------------------+---------------+ - | battery.protection | Prevent deep discharge of | yes | - | | battery | | - +-------------------------+------------------------------+---------------+ - | battery.energysave | Switch off when running on | no | - | | battery and no/low load | | - +------------------------------------------------------------------------+ - -ambient: Conditions from external probe equipment - - +--------------------------------------------------------------------------+ - | ambient.temperature | Ambient temperature | 25.40 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.alarm | Temperature alarm | enabled | - | | (enabled/disabled) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.high | Temperature threshold high | 40 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.low | Temperature threshold low | 5 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.maximum | Maximum temperature seen | 37.6 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.temperature.minimum | Minimum temperature seen | 18.1 | - | | (degrees C) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity | Ambient relative humidity | 038.8 | - | | (percent) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.alarm | Relative humidity alarm | enabled | - | | (enabled/disabled) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.high | Relative humidity | 80 | - | | threshold high (percent) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.low | Relative humidity | 10 | - | | threshold high (percent) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.maximum | Maximum relative humidity | 60 | - | | seen (percent) | | - |-----------------------------------+----------------------------+---------| - | ambient.humidity.minimum | Minimum relative humidity | 13 | - | | seen (percent) | | - +--------------------------------------------------------------------------+ - -outlet: Smart outlet management (smart on/off switch, ...) - - +------------------------------------------------------------------------+ - | | Outlet system | | - | outlet.n.id | identifier (opaque | 1 | - | | string) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.desc | Outlet description | Main outlet | - | | (opaque string) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.switch | Outlet switch control | on | - | | (on/off) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.status | Outlet switch status | on | - | | (on/off) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.switchable | Outlet switch ability | yes | - | | (yes/no) | | - |--------------------------------+-------------------------+-------------| - | | Remaining battery level | | - | outlet.n.autoswitch.charge.low | to power off this | 90 | - | | outlet (percent) | | - |--------------------------------+-------------------------+-------------| - | | Interval to wait before | | - | outlet.n.delay.shutdown | shutting down this | 180 | - | | outlet (seconds) | | - |--------------------------------+-------------------------+-------------| - | | Interval to wait before | | - | outlet.n.delay.start | restarting this outlet | 120 | - | | (seconds) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.current | Current (A) | 0.19 | - |--------------------------------+-------------------------+-------------| - | outlet.n.current.maximum | Maximum seen current | 0.56 | - | | (A) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.realpower | Current value of real | 28 | - | | power (W) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.voltage | Voltage (V) | 247.0 | - |--------------------------------+-------------------------+-------------| - | | Power Factor | | - | outlet.n.powerfactor | (dimensionless value | 0.85 | - | | between 0 and 1) | | - |--------------------------------+-------------------------+-------------| - | outlet.n.power | Apparent power (VA) | 46 | - +------------------------------------------------------------------------+ - -driver: Internal driver information - - +------------------------------------------------------------------------+ - | driver.name | Driver name | apcsmart | - |-------------------------+----------------------------+-----------------| - | driver.version | Driver version (NUT | X.Y.Z | - | | release) | | - |-------------------------+----------------------------+-----------------| - | driver.version.internal | Internal driver version | 1.23.45 | - | | (if tracked separately) | | - |-------------------------+----------------------------+-----------------| - | driver.parameter.xxx | Parameter xxx (ups.conf or | (varies) | - | | cmdline -x) setting | | - |-------------------------+----------------------------+-----------------| - | driver.flag.xxx | Flag xxx (ups.conf or | enabled (or not | - | | cmdline -x) status | present) | - +------------------------------------------------------------------------+ - -server: Internal server information - - +------------------------------------------------------------------------+ - | server.info | Server | Network UPS Tools upsd vX.Y.Z - | - | | information | http://www.networkupstools.org/ | - |----------------+----------------+--------------------------------------| - | server.version | Server version | X.Y.Z | - +------------------------------------------------------------------------+ - - Instant commands - - +------------------------------------------------------------------------+ - | Name | Description | - |--------------------------+---------------------------------------------| - | load.off | Turn off the load immediately | - |--------------------------+---------------------------------------------| - | load.on | Turn on the load immediately | - |--------------------------+---------------------------------------------| - | shutdown.return | Turn off the load possibly after a delay | - | | and return when power is back | - |--------------------------+---------------------------------------------| - | shutdown.stayoff | Turn off the load possibly after a delay | - | | and remain off even if power returns | - |--------------------------+---------------------------------------------| - | shutdown.stop | Stop a shutdown in progress | - |--------------------------+---------------------------------------------| - | shutdown.reboot | Shut down the load briefly while rebooting | - | | the UPS | - |--------------------------+---------------------------------------------| - | shutdown.reboot.graceful | After a delay, shut down the load briefly | - | | while rebooting the UPS | - |--------------------------+---------------------------------------------| - | test.panel.start | Start testing the UPS panel | - |--------------------------+---------------------------------------------| - | test.panel.stop | Stop a UPS panel test | - |--------------------------+---------------------------------------------| - | test.failure.start | Start a simulated power failure | - |--------------------------+---------------------------------------------| - | test.failure.stop | Stop simulating a power failure | - |--------------------------+---------------------------------------------| - | test.battery.start | Start a battery test | - |--------------------------+---------------------------------------------| - | test.battery.start.quick | Start a "quick" battery test | - |--------------------------+---------------------------------------------| - | test.battery.start.deep | Start a "deep" battery test | - |--------------------------+---------------------------------------------| - | test.battery.stop | Stop the battery test | - |--------------------------+---------------------------------------------| - | calibrate.start | Start runtime calibration | - |--------------------------+---------------------------------------------| - | calibrate.stop | Stop runtime calibration | - |--------------------------+---------------------------------------------| - | bypass.start | Put the UPS in bypass mode | - |--------------------------+---------------------------------------------| - | bypass.stop | Take the UPS out of bypass mode | - |--------------------------+---------------------------------------------| - | reset.input.minmax | Reset minimum and maximum input voltage | - | | status | - |--------------------------+---------------------------------------------| - | reset.watchdog | Reset watchdog timer (forced reboot of | - | | load) | - |--------------------------+---------------------------------------------| - | beeper.enable | Enable UPS beeper/buzzer | - |--------------------------+---------------------------------------------| - | beeper.disable | Disable UPS beeper/buzzer | - |--------------------------+---------------------------------------------| - | beeper.mute | Temporarily mute UPS beeper/buzzer | - |--------------------------+---------------------------------------------| - | beeper.toggle | Toggle UPS beeper/buzzer | - +------------------------------------------------------------------------+ diff --git a/docs/nut-names.txt b/docs/nut-names.txt new file mode 100644 index 0000000..80d173e --- /dev/null +++ b/docs/nut-names.txt @@ -0,0 +1,466 @@ +ifndef::external_title[] +NUT command and variable naming scheme +====================================== +endif::external_title[] + +This is a dump of the standard variables and command names used in NUT. +Don't use a name with any of the dstate functions unless it exists here. + +If you need a new variable or command name, contact the Development Team +first. + +Put another way: if you make up a name that's not in this list and it +gets into the tree, and then we come up with a better name later, clients +that use the undocumented variable will break when it is changed. + +NOTE: "opaque" means programs should not attempt to parse the value for +that variable as it may vary greatly from one UPS to the next. These +strings are best handled directly by the user. + +Variables +--------- + +device: General unit information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NOTE: these data will be redundant with some ups.* information +during a transition period. The ups.* data will then be removed. + +[options="header"] +|======================================================================== +| Name | Description | Example value +| device.model | Device model | BladeUPS +| device.mfr | Device manufacturer | Eaton +| device.serial | Device serial number (opaque string) | WS9643050926 +| device.type | Device type (ups, pdu, scd) | ups +|======================================================================== + +ups: General unit information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| ups.status | UPS status | linkdoc:developer-guide[OL,_status_data] +| ups.alarm | UPS alarms | OVERHEAT +| ups.time | Internal UPS clock time + (opaque string) | 12:34 +| ups.date | Internal UPS clock date + (opaque string) | 01-02-03 +| ups.model | UPS model | SMART-UPS 700 +| ups.mfr | UPS manufacturer | APC +| ups.mfr.date | UPS manufacturing date + (opaque string) | 10/17/96 +| ups.serial | UPS serial number (opaque + string) | WS9643050926 +| ups.vendorid | Vendor ID for USB devices | 0463 +| ups.productid | Product ID for USB devices | 0001 +| ups.firmware | UPS firmware (opaque string) | 50.9.D +| ups.firmware.aux | Auxiliary device firmware | 4Kx +| ups.temperature | UPS temperature (degrees C) | 042.7 +| ups.load | Load on UPS (percent) | 023.4 +| ups.load.high | Load when UPS + switches to overload + condition ("OVER") (percent) | 100 +| ups.id | UPS system identifier + (opaque string) | Sierra +| ups.delay.start | Interval to wait before + restarting the load + (seconds) | 0 +| ups.delay.reboot | Interval to wait before + rebooting the UPS (seconds) | 60 +| ups.delay.shutdown | Interval to wait after + shutdown with delay command + (seconds) | 20 +| ups.timer.start | Time before the load will be + started (seconds) | 30 +| ups.timer.reboot | Time before the load will be + rebooted (seconds) | 10 +| ups.timer.shutdown | Time before the load will be + shutdown (seconds) | 20 +| ups.test.interval | Interval between self tests + (seconds) | 1209600 (two weeks) +| ups.test.result | Results of last self test + (opaque string) | Bad battery pack +| ups.display.language | Language to use on front + panel (*** opaque) | E +| ups.contacts | UPS external contact sensors + (*** opaque) | F0 +| ups.power | Current value of apparent + power (Volt-Amps) | 500 +| ups.power.nominal | Nominal value of apparent + power (Volt-Amps) | 500 +| ups.realpower | Current value of real + power (Watts) | 300 +| ups.realpower.nominal | Nominal value of real + power (Watts) | 300 +| ups.beeper.status | UPS beeper status + (enabled, disabled or muted) | enabled +| ups.type | UPS type (*** opaque) | offline +| ups.watchdog.status | UPS watchdog status + (enabled or disabled) | disabled +| ups.start.auto | UPS starts when mains is + (re)applied | yes +| ups.start.battery | Allow to start UPS from + battery | yes +| ups.start.reboot | UPS coldstarts from battery + (enabled or disabled) | yes +|=============================================================================== + + +input: Incoming line/power information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| input.voltage | Input voltage | 121.5 +| input.voltage.maximum | Maximum incoming voltage seen | 130 +| input.voltage.minimum | Minimum incoming voltage seen | 100 +| input.voltage.nominal | Nominal input voltage | 120 +| input.voltage.extended | Extended input voltage range | no +| input.transfer.reason | Reason for last transfer + to battery (*** opaque) | T +| input.transfer.low | Low voltage transfer point | 91 +| input.transfer.high | High voltage transfer point | 132 +| input.transfer.low.min | smallest settable low + voltage transfer point | 85 +| input.transfer.low.max | greatest settable low + voltage transfer point | 95 +| input.transfer.high.min | smallest settable high + voltage transfer point | 131 +| input.transfer.high.max | greatest settable high + voltage transfer point | 136 +| input.sensitivity | Input power sensitivity | H (high) +| input.quality | Input power quality (*** + opaque) | FF +| input.current | Input current (A) | 4.25 +| input.current.nominal | Nominal input current (A) | 5.0 +| input.frequency | Input line frequency (Hz) | 60.00 +| input.frequency.nominal | Nominal input line + frequency (Hz) | 60 +| input.frequency.low | Input line frequency low (Hz) | 47 +| input.frequency.high | Input line frequency high (Hz) | 63 +| input.frequency.extended | Extended input frequency range | no +| input.transfer.boost.low | Low voltage boosting + transfer point | 190 +| input.transfer.boost.high | High voltage boosting + transfer point | 210 +| input.transfer.trim.low | Low voltage trimming + transfer point | 230 +| input.transfer.trim.high | High voltage trimming + transfer point | 240 +|=============================================================================== + + +output: Outgoing power/inverter information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| output.voltage | Output voltage (V) | 120.9 +| output.voltage.nominal | Nominal output voltage (V) | 120 +| output.frequency | Output frequency (Hz) | 59.9 +| output.frequency.nominal | Nominal output frequency (Hz) | 60 +| output.current | Output current (A) | 4.25 +| output.current.nominal | Nominal output current (A) | 5.0 +|=============================================================================== + +Three-phase additions +~~~~~~~~~~~~~~~~~~~~~ + +The additions for three-phase measurements would produce a very long table +due to all the combinations that are possible, so these additions are +broken down to their base components. + +Phase Count Determination +^^^^^^^^^^^^^^^^^^^^^^^^^ +input.phases (3 for three-phase, absent or 1 for 1phase) +output.phases (as for input.phases) + +DOMAINs +^^^^^^^ +Any input or output is considered a valid DOMAIN. + +input (should really be called input.mains, but keep this for compat) +input.bypass +input.servicebypass + +output (should really be called output.load, but keep this for compat) +output.bypass +output.inverter +output.servicebypass + +Specification (SPEC) +^^^^^^^^^^^^^^^^^^^^ + +Voltage, current, frequency, etc are considered to be a specification of +the measurement. + +With this notation, the old 1phase naming scheme becomes DOMAIN.SPEC +Example: `input.current` + +CONTEXT +^^^^^^^ + +When in three-phase mode, we need some way to specify the target for most +measurements in more detail. We call this the CONTEXT. + +With this notation, the naming scheme becomes DOMAIN.CONTEXT.SPEC when +in three-phase mode. +Example: `input.L1.current` + +Valid CONTEXTs +^^^^^^^^^^^^^^ + + L1-L2 \ + L2-L3 \ + L3-L1 for voltage measurements + L1-N / + L2-N / + L3-N / + + L1 \ + L2 for currrent and power measurements + L3 / + N - for current measurement + +Valid SPECs +^^^^^^^^^^^ + +Valid with/without context (ie. per phase or aggregated/averaged) + +[options="header"] +|=============================================================================== +| Name | Description +| current | Current (A) +| current.maximum | Maximum seen current (A) +| current.minimum | Minimum seen current (A) +| peakcurrent | Peak current +| voltage | Voltage (V) +| voltage.nominal | Nominal voltage (V) +| voltage.maximum | Maximum seen voltage (V) +| voltage.minimum | Minimum seen voltage (V) +| power | Apparent power (VA) +| power.maximum | Maximum seen apparent power (VA) +| power.minimum | Maximum seen apparent power (VA) +| power.percent | Percentage of apparent power related to maximum load +| power.maximum.percent | Max seen percentage of apparent power +| power.minimum.percent | Min seen percentage of apparent power +| realpower | Real power (W) +| powerfactor | Power Factor (dimensionless value between 0.00 and 1.00) +| crestfactor | Crest Factor (dimensionless value greater or equal to 1) +|=============================================================================== + +Valid without context (ie. aggregation of all phases): + +[options="header"] +|=============================================================================== +| Name | Description +| frequency | Frequency (Hz) +| frequency.nominal | Nominal frequency (Hz) +|=============================================================================== + +EXAMPLES +~~~~~~~~ + +Partial Three phase - Three phase example: + + input.phases: 3 + input.frequency: 50.0 + input.L1.current: 133.0 + input.bypass.L1-L2.voltage: 398.3 + output.phases: 3 + output.L1.power: 35700 + output.powerfactor: 0.82 + +Partial Three phase - One phase example: + + input.phases: 3 + input.L2.current: 48.2 + input.N.current: 3.4 + input.L3-L1.voltage: 405.4 + input.frequency: 50.1 + output.phases: 1 + output.current: 244.2 + output.voltage: 120 + output.frequency.nominal: 60.0 + +battery: Any battery details +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| battery.charge | Battery charge (percent) | 100.0 +| battery.charge.low | Remaining battery level when + UPS switches to LB (percent) | 20 +| battery.charge.restart | Minimum battery level for + UPS restart after power-off | 20 +| battery.charge.warning | Battery level when UPS switches + to "Warning" state (percent) | 50 +| battery.voltage | Battery voltage (V) | 24.84 +| battery.capacity | Battery capacity (Ah) | 7.2 +| battery.current | Battery current (A) | 1.19 +| battery.temperature | Battery temperature (degrees C) | 050.7 +| battery.voltage.nominal | Nominal battery voltage (V) | 024 +| battery.runtime | Battery runtime (seconds) + Remaining battery runtime | 1080 +| battery.runtime.low | when UPS switches to LB + (seconds) | 180 +| battery.alarm.threshold | Battery alarm threshold | 0 (immediate) +| battery.date | Battery change date (opaque + string) | 11/14/00 +| battery.mfr.date | Battery manufacturing date + (opaque string) | 2005/04/02 +| battery.packs | Number of battery packs | 001 +| battery.packs.bad | Number of bad battery packs | 000 +| battery.type | Battery chemistry (opaque + (opaque string) | PbAc +| battery.protection | Prevent deep discharge of + battery | yes +| battery.energysave | Switch off when running on + battery and no/low load | no +|=============================================================================== + + +ambient: Conditions from external probe equipment +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| ambient.temperature | Ambient temperature + (degrees C) | 25.40 +| ambient.temperature.alarm | Temperature alarm + (enabled/disabled) | enabled +| ambient.temperature.high | Temperature threshold high + (degrees C) | 40 +| ambient.temperature.low | Temperature threshold low + (degrees C) | 5 +| ambient.temperature.maximum | Maximum temperature seen + (degrees C) | 37.6 +| ambient.temperature.minimum | Minimum temperature seen + (degrees C) | 18.1 +| ambient.humidity | Ambient relative humidity + (percent) | 038.8 +| ambient.humidity.alarm | Relative humidity alarm + (enabled/disabled) | enabled +| ambient.humidity.high | Relative humidity + threshold high (percent) | 80 +| ambient.humidity.low | Relative humidity + threshold high (percent) | 10 +| ambient.humidity.maximum | Maximum relative humidity + seen (percent) | 60 +| ambient.humidity.minimum | Minimum relative humidity + seen (percent) | 13 +|=============================================================================== + + +outlet: Smart outlet management +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NOTE: *n* stands for the outlet index. For more information, refer to the +NUT outlets management and PDU notes chapter of the user manual. + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| outlet.n.id | Outlet system identifier + (opaque string) | 1 +| outlet.n.desc | Outlet description + (opaque string) | Main outlet +| outlet.n.switch | Outlet switch control + (on/off) | on +| outlet.n.status | Outlet switch status + (on/off) | on +| outlet.n.switchable | Outlet switch ability + (yes/no) | yes +| outlet.n.autoswitch.charge.low | Remaining battery level to + power off this outlet + (percent) | 80 +| outlet.n.delay.shutdown | Interval to wait before + shutting down this outlet + (seconds) | 180 + +| outlet.n.delay.start | Interval to wait before + restarting this outlet + (seconds) | 120 +| outlet.n.current | Current (A) | 0.19 +| outlet.n.current.maximum | Maximum seen current (A) | 0.56 +| outlet.n.realpower | Current value of real + power (W) | 28 +| outlet.n.voltage | Voltage (V) | 247.0 +| outlet.n.powerfactor | Power Factor + (dimensionless value + between 0 and 1) | 0.85 +| outlet.n.crestfactor | Crest Factor + (dimensionless, equal + to or greater than 1) | 1.41 +| outlet.n.power | Apparent power (VA) | 46 +|=============================================================================== + + +driver: Internal driver information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| driver.name | Driver name | usbhid-ups +| driver.version | Driver version (NUT release) | X.Y.Z +| driver.version.internal | Internal driver version + (if tracked separately) | 1.23.45 +| driver.parameter.xxx | Parameter xxx (ups.conf or + cmdline -x) setting | (varies) +| driver.flag.xxx | Flag xxx (ups.conf or + cmdline -x) status | enabled (or absent) +|=============================================================================== + +server: Internal server information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[options="header"] +|=============================================================================== +| Name | Description | Example value +| server.info | Server information | Network UPS Tools upsd vX.Y.Z - + http://www.networkupstools.org/ +| server.version | Server version | X.Y.Z +|=============================================================================== + +Instant commands +---------------- + +[options="header"] +|======================================================================== +| Name | Description +| load.off | Turn off the load immediately +| load.on | Turn on the load immediately +| shutdown.return | Turn off the load possibly after a delay + and return when power is back +| shutdown.stayoff | Turn off the load possibly after a delay + and remain off even if power returns +| shutdown.stop | Stop a shutdown in progress +| shutdown.reboot | Shut down the load briefly while rebooting the UPS +| shutdown.reboot.graceful | After a delay, shut down the load briefly + while rebooting the UPS +| test.panel.start | Start testing the UPS panel +| test.panel.stop | Stop a UPS panel test +| test.failure.start | Start a simulated power failure +| test.failure.stop | Stop simulating a power failure +| test.battery.start | Start a battery test +| test.battery.start.quick | Start a "quick" battery test +| test.battery.start.deep | Start a "deep" battery test +| test.battery.stop | Stop the battery test +| calibrate.start | Start runtime calibration +| calibrate.stop | Stop runtime calibration +| bypass.start | Put the UPS in bypass mode +| bypass.stop | Take the UPS out of bypass mode +| reset.input.minmax | Reset minimum and maximum input voltage status +| reset.watchdog | Reset watchdog timer (forced reboot of load) +| beeper.enable | Enable UPS beeper/buzzer +| beeper.disable | Disable UPS beeper/buzzer +| beeper.mute | Temporarily mute UPS beeper/buzzer +| beeper.toggle | Toggle UPS beeper/buzzer +|======================================================================== diff --git a/docs/nut-qa.txt b/docs/nut-qa.txt new file mode 100644 index 0000000..f27e698 --- /dev/null +++ b/docs/nut-qa.txt @@ -0,0 +1,112 @@ +NUT Quality Assurance +===================== + +Recognizing the critical nature of NUT, the NUT Quality Assurance (NQA) effort +has been established to improve NUT where necessary, and to maintain software +quality as high as it should be. + +NQA is present in many aspects and areas of NUT. + +Documentation +------------- + +The documentation toolchain now use link:http://www.methods.co.nz/asciidoc/[AsciiDoc] +to output both HTML pages and manual pages (troff). + +- the NUT website and HTML documentation are tested for W3C XHTML 1.1 and CSS +compliance + +- the manual pages conformance is tested with link:http://catb.org/~esr/doclifter/index.html[doclifter] + + +Source code +----------- + +Use of standards +~~~~~~~~~~~~~~~~ + +NUT promotes and uses many standards, like: + +- the variable names standard used in NUT, +- the coding rules and best practices for developers, +- the use of a software architecture limiting developments to the very minimum, +- the use of standard Free and OpenSource Software components, like: + * the USB library, + * the Net SNMP project, + * the Neon library, + * the OpenSSL library (to be replaced by NSS, which is more license compliant + with NUT and is FIPS 140 certified), + * the TCP Wrappers library. + +QA tools and metrics +~~~~~~~~~~~~~~~~~~~~ + +NUT's quality is constently monitored using many tools, like: + +- a Revision Control System (link:http://svn.debian.org/wsvn/nut[Subversion]) to +track development and ease regression fixes. Any modification on the NUT source +trees are reported on the link:http://lists.alioth.debian.org/mailman/listinfo/nut-commits[NUT Commits] +mailing list. +- link:http://buildbot.networkupstools.org/public/nut/[Buildbot] to automate the compile/test +cycle. Any build failure is caught early, reported through the +link:http://lists.alioth.debian.org/mailman/listinfo/nut-commits[NUT Commits] +mailing list, and fixed quickly. +- a project portal with trackers for bugs, feature request, patchs +and tasks + +NUT QA also relies on external tools, like: + +//////////////////////////////////////////////////////////////////////////////// +FIXME (POST): +- integrate static code analysis + - consider splint, Frama-C, BLAST and Clang, and choose one. + - integrate link:http://scan.coverity.com[Coverity Scan] program. + Note: request made by Arnaud to scan-admin@coverity.com on Sep 24 2009 +- point other distro BTS (use Launchpad as an aggregator?!) + +//////////////////////////////////////////////////////////////////////////////// + + +- the Debian QA tools, available through the link:http://packages.qa.debian.org/n/nut.html[NUT Package Tracking System]: + + * Lintian general QA checks, + * link:http://piuparts.debian.org/sid/source/n/nut.html[piuparts] automates + the installation, upgrade and removal testing processes. + +- a runtime testing suite, which automates the inter layer communication testing +(driver - upsd - upsmon / clients), that is part of Ubuntu. +link:http://bazaar.launchpad.net/~ubuntu-bugcontrol/qa-regression-testing/master/annotate/257?file_id=testnut.py-20080227144343-m47lrqbrwv3xm20b-1[The NUT testing script] +is available in the link:https://code.edge.launchpad.net/qa-regression-testing[Ubuntu QA Regression Testing suite]. +It installs nut, configure with for the dummy-ups driver, changes a few data and +check that these are well propagated with upsc. + + +Runtime quality +~~~~~~~~~~~~~~~ + +- NUT provides many link:user-manual.html#NUT_Security[security features] to +ensure a maximum runtime security level. + +- Packages use several link:http://wiki.debian.org/Hardening[Hardening methods] +to protect NUT binaries. + +//////////////////////////////////////////////////////////////////////////////// +FIXME (POST): + +- write a code conformance checker (nut-lint) +- write a § on driver maintainance status +- consider using [http://forge.novell.com/modules/xfmod/project/?opensuse OpenSUSE Build Service tools] +- provide software metrics and evolution over the time + + * [http://www.flossmetrics.org/ FlossMetrics] + * [http://en.wikipedia.org/wiki/Software_metric Wikipedia] + * [http://cccc.sourceforge.net/ CCCC - C and C++ Code Counter] + * [http://open.ncsu.edu/se/tutorials/metrics/ Metrics with Eclipse] + +- Code documentation, for the core architecture (client and drivers are already +documented) + + * [http://doxygen.org/ Doxygen] + * [http://naturaldocs.org/ NaturalDocs] + +//////////////////////////////////////////////////////////////////////////////// diff --git a/docs/osd-notify.txt b/docs/osd-notify.txt deleted file mode 100644 index ee4d82f..0000000 --- a/docs/osd-notify.txt +++ /dev/null @@ -1,86 +0,0 @@ -Desc: Using upsmon to make On Screen Display (OSD) notification -File: osd-notify.txt -Date: 12 April 2003 -Auth: Arnaud Quette - -This document presents how to display NUT notification using -an On Screen Display (OSD) system. - -It is a complement to Russell Kroll's pager.txt, which -can be found on NUT website, or in NUT source tree. Have -a look at this document before reading more. - -Pre requisites --------------- - -You must have a running NUT installation (driver, upsd and upsmon). -Refer, if necessary, to NUT documentation for installing -and configuring those. - -You also need X OSD to be installed. You can either: -- get it on: http://www.ignavus.net/software.html -- Debian: apt-get install xosd-bin -- Mandrake: urpmi xosd -- Others RPM based: get and install xosd (for example, from -http://rpmfind.net/linux/rpm2html/search.php) - -Creating osd-notify shell script --------------------------------- - -X OSD provides a really nice program, called osd_cat. -For more information on osd_cat, look at its manpage. - -For convenience, I've written a small script called -osd-notify which should be available with the present -file. - -You can adjust osd-notify settings to match your needs. -In particular, you must put a valid font in "FONT". -Use xfontsel to find one. - - -Configuring upsmon to use osd-notify ------------------------------------- - -1) You need to set EXEC flags on the event you want to -be osd-displayed in upsmon.conf. For example - - NOTIFYFLAG ONBATT EXEC - NOTIFYFLAG ONLINE EXEC - -You can of course set other actions, like WALL or SYSLOG, -and other events. Look at upsmon.conf manual page. - -2) Copy osd-notify somewhere on your system (/usr/local/bin -or whatever). - -3) Test osd-notify script by calling: -$> osd-notify NUT - -4) Tell upsmon where your script is - - NOTIFYCMD /path/to/osd-notify - -Show time ---------- - -You need to adjust X11 access right to allow upsmon's -user to display OSD notification on your screen. This -is done with, from within a xterm, by using: - -$> xhost +local:nutmon - -Don't forget to adjust upsmon's user name according to -your system settings. This must match the value of the -"RUN_AS_USER" field in upsmon.conf - -Now, restart upsmon, pull the plug, and see what happens... - -For screenshots, have a look at X OSD website: - http://www.ignavus.net/software.html - -Conclusion ----------- - -What great things we can do with a small nut ;-) -Feel free to send me your comments and enhancements. diff --git a/docs/outlets.txt b/docs/outlets.txt new file mode 100644 index 0000000..c722314 --- /dev/null +++ b/docs/outlets.txt @@ -0,0 +1,99 @@ +NUT outlets management and PDU notes +==================================== + +NUT supports advanced outlets management for any kind of device that proposes +it. This chapter introduces how to manage outlets in general, and how to take +advantage of the provided features. + +Introduction +------------ + +Outlets are the core of Power Distribution Units. They allow you to turn on, +turn off or cycle the load on each outlet. + +Some UPS models also provide manageable outlets (Eaton, MGE, Powerware, +Tripplite, ...) that help save power in various ways, and manage loads more +intelligently. + +Finally, some devices can be managed in a PDU-like way. Consider blade systems: +the blade chassis can be controlled remotely to turn on, turn off or +cycle the power on individual blade servers. + +NUT allows you to control all these devices! + + +NUT outlet data collection +-------------------------- + +NUT provides a complete and uniform integration of outlets related data, +through the 'outlet' collection. + +First, there is a special outlet, called 'main outlet'. +You can access it through 'outlet.{id, desc, ...}' without any index. + +Any modification through the 'main outlet' will affect *all* outlets. +For example, calling the command 'outlet.load.cycle' will cycle all outlets. + +Next, outlets index starts from *1*. Index '0' is implicitly reserved to +the 'main outlet'. So the first outlet is 'outlet.1.*'. + +For a complete list of outlet data and commands, refer to the +<>. + +An example upsc output (data/epdu-managed.dev) is available in the source +archive. + +NOTE: The variables supported depend on the exact device type. + + +Outlets on PDU +-------------- + +Smart Power Distribution Units provide at least various meters, related to +current, power and voltage. + +Some more advanced devices also provide control through the 'load.off', +'load.on' and 'load.cycle' commands. + +Outlets on UPS +-------------- + +Some advanced Uninterruptible Power Supplies provide smart outlet management. + +This allows to program a limited backup time to non-critical loads in order +to keep the maximum of the battery reserve for critical equipment. + +This also allows the same remote electrical management of devices provided +by PDUs, which can be very interesting in Data Centers. + +For example, on small setup, you can plug printers, USB devices, hubs, (...) +into managed outlets. Depending on your UPS's capabilities, you will be able to +turn off those loads: + +- after some minutes of back-up time using 'outlet.n.delay.start', +- when reaching a percentage battery charge using +'outlet.n.autoswitch.charge.low'. + +This will ensure a maximum runtime for the computer. + +On bigger systems, with bigger UPSs, this is the same thing with servers +instead of small devices. + +NOTE: If you need the scheduling function and your device doesn't support +it, you can still use +<>. + +WARNING: don't plug the UPS's communication cable (USB or network) on a managed outlet. +Otherwise, all computers will be stopped as soon as the communication is lost. + +Other type of devices +--------------------- + +As mentioned in the introduction, some other devices can be considered and managed like +PDUs. This is the case in most blade systems, where the blade chassis offers +power management services. + +This way, you can control remotely each blade server as if it were a PDU +outlet. + +This category of devices is generally called Remote Power Controls - RPC in NUT. diff --git a/docs/packager-guide.txt b/docs/packager-guide.txt new file mode 100644 index 0000000..e11a6f6 --- /dev/null +++ b/docs/packager-guide.txt @@ -0,0 +1,378 @@ +NUT Packager and Integrators Guide +================================== +Arnaud Quette + +WARNING: this is a Work In Progress document. + +Abstract +-------- + +The aim of this document is to describe the best way to package the +Network UPS Tools, and the best practices across the various packaging +implementation of NUT. + +So as to these can be spread on all supported platforms as a standard, +and as a foundation block to build upon. + +/////////////////////////////////////////////////////////////////////// +*sandbox* +that have been done to help those improving, and give advice on what's +the best way to package NUT for the remaining "not yet packaged" +platform (Sun, Aix, Mac, ...). The ultimate aim is to have NUT +well packaged (all NUT features available) on all supported +platforms. +/////////////////////////////////////////////////////////////////////// + +Introduction +------------ +Packaging is a final aim for software. It eases and completes the +software integration into an OS, and allows users to have an easy +software installation and support out of the box. + +NOTE: making NUT packaging more uniform should help its documentation, +support and maintenance accross the supported OSes. + +------------------------------------------------------------------------ +*sandbox* +This document assumes that you have read the other NUT document such +as INSTALL, FAQ, shutdown.txt, ... + +Facts about NUT packaging +========================= + +NUT has so much evolved those two last years (with USB and SNMP +support, the premices of libraries, ...) that the simple +"1, 2 or 3 package(s)" approach is no more suitable. + +This fact has reached a high level since NUT 1.4. Actually, +doing this would result in either being forced to install hosts +of unneeded dependencies (net-snmp, gd, ... as seen on SuSE), +to have a partially broken package [1] or not being able to +use all NUT features [2]. + +Let's now have an overview on how NUT is currently packaged: + + 1) Debian: + http://packages.qa.debian.org/n/nut.html + nut, nut-dev, nut-usb, nut-snmp, nut-xml, nut-cgi, nut-doc [, nut-hal-drivers] + + 2) Mandriva + http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/SPECS/nut/ + nut-server + nut + nut-cgi + + 3) SuSE / Novell + nut + + 4) RedHat + + 5) PLD + http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/nut.spec + + ... (FreeBSD, Gentoo Linux, IRIX, NetBSD, OpenBSD) + +This shows how much the packages name split is now scattered. +The result is: +- that a user of several systems will be lost, and will +waste time +- there is a big waste of energy +- this makes things hard to create standard configuration +wizards + +[1] NUT build on Debian GNU/Linux m68k and Hurd was once +broken due to hiddev dependencies, and usb support still +included in the core package. + +[2] +- snmp-ups driver is not available under Mandrake GNU/Linux, +but its man is present. See +http://rpms.mandrakeclub.com/rpms/mandrake/9.1/i586/Mandrake/RPMS/nut-server-1.2.1-4mdk.i586.html +- secured ssh network mode not available (due to deps and/or non free) +- some systems don't provide libupsclient lib/header/.pc so as to +client application (such as wmnut) can't be built +- the logger function is not (well) used, same goes for the syslog (triple +redundancy in Mandriva) +- the solution is partial in every system: lost of tests +case / feedback could be shared +... + +------------------------------------------------------------------------ + + +Packagers involved +------------------ + +The following packagers are working on this subject: + +- Debian (and derivatives): Arnaud Quette +- SuSE/Novell: Stanislav Brabec + +NOTE: the people below should be contacted to (re)launch discussions! + +The following packagers should be interested in working on this subject: + +- FreeBSD: Thierry Thomas? <> +- Mandriva: Oden Erikson? <> +- RedHat / Fedora Core: <> +- Gentoo: <> +- NetBSD: <> +- OpenBSD: <> +- PLD: Andrzej Zawadzki +- E-Smith: Charlie Brady +- openSolaris: <> + +- Windows: check with WinNUT author?! +- MacOS: <> => Charles Lepple? <> +- HP-UX: <> +- IBM AIX: <> + + + +Possible use cases +------------------ +- standalone (1 system + 1-n UPS) +- network server (same as standalone, but serving data to network clients) +- network monitoring client +- network supervision client + +TO BE COMPLETED... + +Optimised packaging proposal +---------------------------- + +NOTE: The below proposed packages split is subject to discussion. + +The aim of this is to: + +- rationalise split according to the above use cases, +- share ressources (descriptions, i18n, ...) +- find the best compromise between available features and dependencies, +- standardize nut packages name, +- create the foundation for the upcoming and underway improvements, +- improve nut integration +- ease and improve user experience. + + +This standard was created by: + +- capitalizing the experience of existing packages, +- using and improving the use of all nut features +- considering upcoming nut changes and improvements +- working closely with packagers. + +Overview of the package tree +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +FIXME: make a dependency graph + +- <> +- <> +- <> +- <> +- <> +- <> +- <> +- <> + +- <> +- <> +- <> (or nut-control-center or Ultimate NUT Tool...) +- <> + +Detailed view of the package tree +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[NOTE] +======================================================================== +- The *Desc* field represent the package's description, as exposed by +the packaging system. Each package's description is composed of a +paragraph common to all NUT packages, and a part that is specific to the +package. The common part (further referenced by *COMMON DESC*) is: +________________________________________________________________________ + Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share + uninterruptible power supply (UPS) and power distribution unit (PDU) + hardware. Clients access the hardware through the server, and are notified + whenever the power status changes. +________________________________________________________________________ +- The *Files* field lists the content of the package. +- The mentioned *Size* is a rough estimation of packaged and installed +size. This may varies across the systems and architecture, and is based +upon the Debian x86 packages. +- The *Deps* field lists the dependencies of the packages. The exact +name may vary across the various systems. +- The *Comment* field is used to place comment for points subject to +discussion. +======================================================================== + +[[pkg-nut]] +nut +^^^ +- Desc: +- Files: dummy/serial/USB drivers + upsd + upslog +- Size: +- Deps: + +[[pkg-libupsclient1]] +libupsclient1 +^^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-libupsclient1-dev]] +libupsclient1-dev +^^^^^^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +NOTE: the "-dev" suffix is to be replaced by "-devel" on RPM based platforms. + +[[pkg-nut-cgi]] +nut-cgi +^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-hal-drivers]] +nut-hal-drivers +^^^^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-powerman-pdu]] +nut-powerman-pdu +^^^^^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-snmp]] +nut-snmp +^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-xml]] +nut-xml +^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-clients]] +nut-clients +^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-python-pynut]] +python-pynut +^^^^^^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-python-nut-gui]] +python-nut-gui +^^^^^^^^^^^^^^ +(or nut-control-center or Ultimate NUT Tool...) + +- Desc: +- Files: +- Size: +- Deps: + +[[pkg-nut-doc]] +nut-doc +^^^^^^^ +- Desc: +- Files: +- Size: +- Deps: + + +------------------------------------------------------------------------ +*sandbox* +nut-server +^^^^^^^^^^ + Desc: + Files: dummy/serial/USB drivers + upsd + upslog + Size: + Deps: nut-client, libusb, libc/ld + + B) nut-snmp + + Desc: + Files: SNMP driver [/ manager ] + Deps: nut-server, net-snmp, libc/ld + + C) nut-client + + Desc: don't force to have the server part/deps if not needed + Files: upsmon, upsc, upscmd, upsrw + driver.list [+nut-dev (lib, .h, .pc, man] + Deps: libc/ld + + E) nut-cgi + + Deps: + Files: snmp-ups and powernet + manpages + + F) nut-doc: + + Deps: + Files: dummycons + manpage + + G) nut-dev: + + Deps: + Files: upsmon, upsc, upscmd, upsrw + + + +Note: "nut" can be a meta package + +This kind of tree obviously need modification on the conf/make +files of NUT to allow build/install in a separate way. + + +... +TO BE CONTINUED +... + +Configuration option +^^^^^^^^^^^^^^^^^^^^ +name= "ups" or "nut" +./configure \ + --prefix=/ \ + --sysconfdir=/etc/$name \ + --mandir=/usr/share/man \ + --libdir=/usr/lib \ + --includedir=/usr/include \ + --datadir=/usr/share/$name \ + --with-statepath=/var/run/nut \ + --with-altpidpath=/var/run/nut \ + --with-drvpath=/lib/nut \ + --with-cgipath=/usr/lib/cgi-bin/$name \ +html-path + --with-pidpath=/var/run/$name \ + --with-user=$name \ + --with-cgi \ + --without-ssl +... + +------------------------------------------------------------------------ + diff --git a/docs/pager.txt b/docs/pager.txt deleted file mode 100644 index bf11159..0000000 --- a/docs/pager.txt +++ /dev/null @@ -1,68 +0,0 @@ -Desc: Using upsmon and your pager together -File: pager.txt -Date: 28 May 2001 -Auth: Russell Kroll - -upsmon can call out to a helper script or program when the UPS changes -state. The example upsmon.conf has a full list of which state changes -are available - ONLINE, ONBATT, LOWBATT, and more. - -The simple approach -------------------- - - - Set EXEC flags on various things in upsmon.conf - - NOTIFYFLAG ONBATT EXEC - NOTIFYFLAG ONLINE EXEC - - If you want other things like WALL or SYSLOG to happen, just add them. - - NOTIFYFLAG ONBATT EXEC+WALL+SYSLOG - - You get the idea. - - - Tell upsmon where your script is - - NOTIFYCMD /path/to/my/script - - - Make a simple script like this at that location: - - #! /bin/bash - echo "$*" | sendmail -F"ups@mybox" bofh@pager.example.com - - - Restart upsmon, pull the plug, and see what happens. - -That approach is bare-bones, but you should get the text content of the -alert in the body of the message, since upsmon passes the alert text -(from NOTIFYMSG) as an argument. - -This will send mail every time something happens which may become annoying -rather quickly, especially for simple power fluctuations. To only send -messages after some interval, see the upssched.txt file for information -on offset events. - -Using more advanced features ----------------------------- - -Your helper script will be run with a few environment variables set. - - UPSNAME - the name of the system that generated the change. - This will be one of your identifiers from the MONITOR - lines in upsmon.conf. - - NOTIFYTYPE - this will be ONLINE, ONBATT, or whatever event took - place which made upsmon call your script. - -You can use these to do different things based on which system has -changed state. You could have it only send pages for an important -system while totally ignoring a known trouble spot, for example. - -Suppressing notify storms -------------------------- - -upsmon will call your script every time an event happens that has the -EXEC flag set. This means a quick power failure that lasts mere seconds -might generate several pages in a row. To suppress this sort of -annoyance, use upssched as your NOTIFYCMD program, and configure it to -send pages after a timer has elapsed. See upssched.txt for more -information. diff --git a/docs/powersaving.txt b/docs/powersaving.txt deleted file mode 100644 index c08485d..0000000 --- a/docs/powersaving.txt +++ /dev/null @@ -1,135 +0,0 @@ -Desc: NUT Powersaving features and using outlet collection -File: powersaving.txt -Date: 14 June 2003 -Auth: Arnaud Quette - -This document introduces NUT PowerSaving features, and Smart -Outlet Management using Network UPS Tools. - -This feature is sponsored by MGE UPS SYSTEMS. - -Introduction ------------- - -This feature, which is supported by various manufacturers, -under various names, allows to manage separately the outlets -of an UPS, or a Power Distrubition Unit (PDU). This allows to -program a limited backup time to non-critical loads in order -to keep the maximum of the battery reserve for critical -equipment. This also allows a remote electrical management of -devices, which is very useful in DataCenters for example. - -On small setup, you can plug printers, hubs, (...) on -PowerSave'd outlets. During a power outage, the UPS will -turn off those after X minutes of back-up time (or when -passing below X % of battery charge) depending on your -UPS model and settings. This will ensure that all -remaining battery power is available for the computer. - -On huger setup (with a huger UPS), this is about the -same with the ability to (power and) control servers in -a smart way (need to notify those to shutdown first !). - -Manufacturers Powersaving technologies presentation -=================================================== - -1) MGE UPS SYSTEMS and MGE Office Protection Systems ----------------------------------------------------- - -This feature is called "PowerShare" and is available -on lots of models, with different behaviours. - -Features will vary according to your exact model. -For example: - -- on Pulsar Ellipse Premium 650/800/1200, you can -only set a low battery level which triggers a power -off of the PowerShare outlet(s). -Check http://www.mgeups.com/products/pdt230/smallups/ellipsep/ellipsep1.htm - -- on Pulsar Evolution (all models), you can either -do the same as above, or set a timer to shutdown -the outlet when expired. This latter needs to be -used in conjonction with upsmon/upssched to act -upon a power outage, and cancel the timer when -the power is back... - -2) Eaton | Powerware ePDU - -Depending on the exact model, you can see various measurements -(like current, voltage, power, ...) of the various outlets. You may -also have the hability to start, stop and cycle these. - -For more information: http://www.epdu.com - -3) Other manufacturers (Belkin, ...) - -To be completed... - - -Integration into the new NUT naming scheme -========================================== - -Have a look at new-names.txt, "outlet" section. - - -Note on outlet collection usage -=============================== - -1) outlet.{id, desc, ...} represents the -whole outlets (includes all outlet.x.*), -also called Main Outlet. - -An interesting fact is that _ALL_ models -have at least that outlet, which is always -considered as the UPS itself. Some values -from the "ups" collection are linked to -the outlet.*, ie: - - outlet.load is mapped from ups.load - - outlet.delay.* is mapped from ups.delay.* - -2) Indexes for other outlets begin by 1. So -the first outlet is "outlet.1.*". - - -Examples of upsc tree -===================== - -1) Here is an MGE Evolution tree with the -main and 2 outlets. - -... -outlet.desc: Main Outlet -outlet.id: 0 -outlet.switchable: 0 -outlet.1.autoswitch.charge.low: 0 -outlet.1.delay.shutdown: -1 -outlet.1.delay.start: -1 -outlet.1.desc: PowerShare Outlet 1 -outlet.1.id: 1 -outlet.1.switch: 1 -outlet.1.switchable: 1 -outlet.2.autoswitch.charge.low: 0 -outlet.2.delay.shutdown: -1 -outlet.2.delay.start: -1 -outlet.2.desc: PowerShare Outlet 2 -outlet.2.id: 2 -outlet.2.switch: 1 -outlet.2.switchable: 1 -... - - -2) Here is another MGE Ellipse Premium -tree with the main and 1 PowerSaving -outlets. - -... -outlet.desc: Main Outlet -outlet.id: 0 -outlet.switchable: 0 -outlet.1.autoswitch.charge.low: 0 -outlet.1.desc: PowerShare Outlet 1 -outlet.1.id: 1 -outlet.1.switch: 1 -outlet.1.switchable: 1 -... diff --git a/docs/protocol.txt b/docs/protocol.txt deleted file mode 100644 index d741333..0000000 --- a/docs/protocol.txt +++ /dev/null @@ -1,518 +0,0 @@ -Desc: Network protocol info -File: protocol.txt -Date: 18 February 2004 -Auth: Russell Kroll - -As of May 2002, this protocol now has an official port number from IANA, -which is 3493. The old number (3305) was a relic of the original code's -ancestry, and conflicted with other services. Version 0.50.0 and up -use 3493 by default. - -This protocol runs over TCP. UDP support was dropped in July 2003. It -had been deprecated for some time and was only capable of the simplest -query commands as authentication is impossible over a UDP socket. - -A library, named libupsclient, that implement this protocol is provided -in both static and shared version to help the client application development. - -Old command removal notice -========================== - -Before version 1.5.0, a number of old commands were supported. These -have been removed from the specification. For more information, consult -an older version of the software. - -Command reference -================= - -Multi-word elements are contained within "quotes" for easier parsing. -Embedded quotes are escaped with backslashes. Embedded backslashes are -also escaped by representing them as \\. This protocol is intended to -be interpreted with parseconf or something similar. - -GET -=== - -Retrieve a single response from the server. - -Possible sub-commands: - -NUMLOGINS ---------- - - Form: GET NUMLOGINS - GET NUMLOGINS su700 - -Response: NUMLOGINS - NUMLOGINS su700 1 - - is the number of clients which have done LOGIN for this UPS. -This is used by the master upsmon to determine how many clients are -still connected when starting the shutdown process. - -This replaces the old "REQ NUMLOGINS" command. - -UPSDESC -------- - - Form: GET UPSDESC - GET UPSDESC su700 - -Response: UPSDESC "" - UPSDESC su700 "Development box" - - is the value of "desc=" from ups.conf for this UPS. If it -is not set, upsd will return "Unavailable". - -This can be used to provide human-readable descriptions instead of a -cryptic "upsname@hostname" string. - -VAR ---- - - Form: GET VAR - GET VAR su700 ups.status - -Response: VAR "" - VAR su700 ups.status "OL" - -This replaces the old "REQ" command. - -TYPE ----- - - Form: GET TYPE - GET TYPE su700 input.transfer.low - -Response: TYPE ... - TYPE su700 input.transfer.low ENUM - - can be several values, and multiple words may be returned: - - RW - this variable may be set to another value with SET - ENUM - an enumerated type, which supports a few specific values -STRING:n - this is a string of maximum length n - -ENUM and STRING are usually associated with RW, but not always. - -This replaces the old "VARTYPE" command. - -DESC ----- - - Form: GET DESC - GET DESC su700 ups.status - -Response: DESC "" - DESC su700 ups.status "UPS status" - - is a string that gives a brief explanation of the named -variable. upsd may return "Unavailable" if the file which provides this -description is not installed. - -Different versions of this file may be used in some situations to -provide for localization and internationalization. - -This replaces the old "VARDESC" command. - -CMDDESC -------- - - Form: GET CMDDESC - GET CMDDESC su700 load.on - -Response: CMDDESC "" - CMDDESC su700 load.on "Turn on the load immediately" - -This is like DESC above, but it applies to the instant commands. - -This replaces the old "INSTCMDDESC" command. - -LIST -==== - -The LIST functions all share a common container format. They will -return "BEGIN LIST" and then repeat the initial query. The list then -follows, with as many lines are necessary to convey it. "END LIST" with -the initial query attached then follows. - -The formatting may seem a bit redundant, but it makes a different form -of client possible. You can send a LIST query and then go off and wait -for it to get back to you. When it arrives, you don't need complicated -state machines to remember which list is which. - -UPS ---- - - Form: LIST UPS - -Response: BEGIN LIST UPS - UPS "" - ... - END LIST UPS - - BEGIN LIST UPS - UPS su700 "Development box" - END LIST UPS - - is a name from ups.conf, and is the value of -desc= from ups.conf, if available. It will be set to "Unavailable" -otherwise. - -This can be used to determine what values of are valid before -calling other functions on the server. This is also a good way to -handle situations where a single upsd supports multiple drivers. - -Clients which perform a UPS discovery process may find this useful. - -VAR ---- - - Form: LIST VAR - LIST VAR su700 - -Response: BEGIN LIST VAR - VAR "" - ... - END LIST VAR - - BEGIN LIST VAR su700 - VAR su700 ups.mfr "APC" - VAR su700 ups.mfr.date "10/17/96" - ... - END LIST VAR su700 - -This replaces the old "LISTVARS" command. - -RW --- - - Form: LIST RW - LIST RW su700 - -Response: BEGIN LIST RW - RW "" - ... - END LIST RW - - BEGIN LIST RW su700 - RW su700 output.voltage.nominal "115" - RW su700 ups.delay.shutdown "020" - ... - END LIST RW su700 - -This replaces the old "LISTRW" command. - -CMD ---- - - Form: LIST CMD - LIST CMD su700 - -Response: BEGIN LIST CMD - CMD - ... - END LIST CMD - - BEGIN LIST CMD su700 - CMD su700 load.on - CMD su700 test.panel.start - ... - END LIST CMD su700 - -This replaces the old "LISTINSTCMD" command. - -ENUM ----- - - Form: LIST ENUM - LIST ENUM su700 input.transfer.low - -Response: BEGIN LIST ENUM - ENUM "" - ... - END LIST ENUM - - BEGIN LIST ENUM su700 input.transfer.low - ENUM su700 input.transfer.low "103" - ENUM su700 input.transfer.low "100" - ... - END LIST ENUM su700 input.transfer.low - -This replaces the old "ENUM" command. - -Note: this does not support the old "SELECTED" notation. You must -request the current value separately. - -SET ---- - - Form: SET VAR "" - SET VAR su700 ups.id "My UPS" - -INSTCMD -------- - - Form: INSTCMD - INSTCMD su700 test.panel.start - -LOGOUT -====== - -Form: LOGOUT - -Returns: OK Goodbye (recent versions) - -Used to disconnect gracefully from the server. - -Older versions just said "Goodbye...". - -LOGIN -===== - -Form: LOGIN - -Returns: OK (upon success) - or various errors - -Requires: "upsmon slave" or "upsmon master" in upsd.users - -Use this to log the fact that a system is drawing power from this UPS. -The upsmon master will wait until the count of attached systems reaches -1 - itself. This allows the slaves to shut down first. - -NOTE: You probably shouldn't send this command unless you are upsmon, - or a upsmon replacement. - -MASTER -====== - -Form: MASTER - -Returns: OK (upon success) - or various errors - -Requires: "upsmon master" in upsd.users - -This function doesn't do much by itself. It is used by upsmon to make -sure that master-level functions like FSD are available if necessary. - -FSD -=== - -Form: FSD - -Returns: OK FSD-SET (success) - or various errors - -Requires: "upsmon master" in upsd.users - or "FSD" action granted in upsd.users - -upsmon in master mode is the primary user of this function. It sets this -"forced shutdown" flag on any UPS when it plans to power it off. This is -done so that slave systems will know about it and shut down before the -power disappears. - -Setting this flag makes "FSD" appear in a STATUS request for this UPS. -Finding "FSD" in a status request should be treated just like a "OB LB". - -It should be noted that FSD is currently a latch - once set, there is -no way to clear it short of restarting upsd or dropping then re-adding -it in the ups.conf. This may cause issues when upsd is running on a -system that is not shut down due to the UPS event. - -PASSWORD -======== - -Form: PASSWORD - -Returns: OK (upon success) - or various errors - -Sets the password associated with a connection. Used for later -authentication for commands that require it. - -USERNAME -======== - -Form: USERNAME - -Returns: OK (upon success) - or various errors - -Sets the username associated with a connection. This is also used for -authentication, specifically in conjunction with the upsd.users file. - -STARTTLS -======== - -Form: STARTTLS - -Returns: OK STARTTLS - or various errors - -This tells upsd to switch to TLS mode internally, so all future -communications will be encrypted. You must also change to TLS mode in -the client after receiving the OK, or the connection will be useless. - -Other commands -============== - -HELP - lists the commands supported by this server -VER - shows the version of the server currently in use - -These two are not intended to be used directly by programs. Humans can -make use of this program by using telnet or netcat. If you use -telnet, make sure you don't have it set to negotiate extra options. -upsd doesn't speak telnet and will probably misunderstand your first -request due to the extra junk in the buffer. - -Error responses -=============== - -ERR [...] - - is always one element; it never contains spaces. This may -be used to allow additional information () in the future. - -ACCESS-DENIED - - - The client's host and/or authentication details (username, password) - are not sufficient to execute the requested command. - -UNKNOWN-UPS - - - The UPS specified in the request is not known to upsd. This usually - means that it didn't match anything in ups.conf. - -VAR-NOT-SUPPORTED - - - The specified UPS doesn't support the variable in the request. - - This is also sent for unrecognized variables which are in a space - which is handled by upsd, such as server.*. - -CMD-NOT-SUPPORTED - - - The specified UPS doesn't support the instant command in the request. - -INVALID-ARGUMENT - - - The client sent an argument to a command which is not recognized or - is otherwise invalid in this context. This is typically caused by - sending a valid command like GET with an invalid subcommand. - -INSTCMD-FAILED - - - upsd failed to deliver the instant command request to the driver. - No further information is available to the client. This typically - indicates a dead or broken driver. - -SET-FAILED - - - upsd failed to deliver the set request to the driver. This is - just like INSTCMD-FAILED above. - -READONLY - - - The requested variable in a SET command is not writable. - -TOO-LONG - - - The requested value in a SET command is too long. - -FEATURE-NOT-SUPPORTED - - - This instance of upsd does not support the requested feature. This - is only used for TLS/SSL mode (STARTTLS) at the moment. - -FEATURE-NOT-CONFIGURED - - - This instance of upsd hasn't been configured properly to allow the - requested feature to operate. This is also limited to STARTTLS for - now. - -ALREADY-SSL-MODE - - - TLS/SSL mode is already enabled on this connection, so upsd can't - start it again. - -DRIVER-NOT-CONNECTED - - - upsd can't perform the requested command, since the driver for that - UPS is not connected. This usually means that the driver is not - running, or if it is, the ups.conf is misconfigured. - -DATA-STALE - - - upsd is connected to the driver for the UPS, but that driver isn't - providing regular updates or has specifically marked the data - as stale. upsd refuses to provide variables on stale units to avoid - false readings. - - This generally means that the driver is running, but it has lost - communications with the hardware. Check the physical connection - to the equipment. - -ALREADY-LOGGED-IN - - - The client already sent LOGIN for a UPS and can't do it again. - There is presently a limit of one LOGIN record per connection. - -INVALID-PASSWORD - - - The client sent an invalid PASSWORD - perhaps an empty one. - -ALREADY-SET-PASSWORD - - - The client already set a PASSWORD and can't set another. This also - should never happen with normal NUT clients. - -INVALID-USERNAME - - - The client sent an invalid USERNAME. - -ALREADY-SET-USERNAME - - - The client has already set a USERNAME, and can't set another. This - should never happen with normal NUT clients. - -USERNAME-REQUIRED - - - The requested command requires a username for authentication, - but the client hasn't set one. - -PASSWORD-REQUIRED - - - The requested command requires a passname for authentication, - but the client hasn't set one. - -UNKNOWN-COMMAND - - - upsd doesn't recognize the requested command. - - This can be useful for backwards compatibility with older versions - of upsd. Some NUT clients will try GET and fall back on REQ after - receiving this response. - -INVALID-VALUE - - - The value specified in the request is not valid. This usually - applies to a SET of an ENUM type which is using a value which is - not in the list of allowed values. - -Future ideas -============ - -Dense lists ------------ - -The LIST commands may be given the ability to handle options some day. -For example, "LIST VARS +DESC" would return the current value -like now, but it would also append the description of that variable. - -Command status --------------- - -After sending an INSTCMD or SET, a client will eventually be able to -poll to see whether it was completed successfully by the driver. diff --git a/docs/upssched.txt b/docs/scheduling.txt similarity index 65% rename from docs/upssched.txt rename to docs/scheduling.txt index 5374916..8bb2b91 100644 --- a/docs/upssched.txt +++ b/docs/scheduling.txt @@ -1,7 +1,96 @@ -Desc: How to use upssched -File: upssched.txt -Date: 01 October 2005 -Auth: Russell Kroll +Advanced usage and scheduling notes +=================================== + +upsmon can call out to a helper script or program when the device changes +state. The example upsmon.conf has a full list of which state changes +are available - ONLINE, ONBATT, LOWBATT, and more. + +There are two options, that will be presented in details: + +- the simple approach: create your own helper, and manage all events and actions +yourself, +- the advanced approach: use the NUT provided helper, called 'upssched'. + + +The simple approach, using your own script +------------------------------------------ + +How it works relative to upsmon +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Your command will be called with the full text of the message as one argument. + +For the default values, refer to the sample upsmon.conf file. + +The environment string NOTIFYTYPE will contain the type string of whatever +caused this event to happen - ONLINE, ONBATT, LOWBATT, ... + +Making this some sort of shell script might be a good idea, but the helper can +be in any programming or scripting language. + +NOTE: Remember that your helper must be *executable*. If you are using a script, +make sure the execution flags are set. + +For more information, refer to linkman:upsmon[8] and +linkman:upsmon.conf[5] manual pages. + +Setting up everything +~~~~~~~~~~~~~~~~~~~~~ + +- Set EXEC flags on various things in linkman:upsmon.conf[5]: ++ + NOTIFYFLAG ONBATT EXEC + NOTIFYFLAG ONLINE EXEC ++ +If you want other things like WALL or SYSLOG to happen, just add them: ++ + NOTIFYFLAG ONBATT EXEC+WALL+SYSLOG ++ +You get the idea. + +- Tell upsmon where your script is + + NOTIFYCMD /path/to/my/script + +- Make a simple script like this at that location: + + #! /bin/bash + echo "$*" | sendmail -F"ups@mybox" bofh@pager.example.com + +- Restart upsmon, pull the plug, and see what happens. + +That approach is bare-bones, but you should get the text content of the +alert in the body of the message, since upsmon passes the alert text +(from NOTIFYMSG) as an argument. + +Using more advanced features +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Your helper script will be run with a few environment variables set. + +- UPSNAME: the name of the system that generated the change. ++ +This will be one of your identifiers from the MONITOR lines in upsmon.conf. + +- NOTIFYTYPE: this will be ONLINE, ONBATT, or whatever event took place which +made upsmon call your script. + +You can use these to do different things based on which system has +changed state. You could have it only send pages for an important +system while totally ignoring a known trouble spot, for example. + +Suppressing notify storms +~~~~~~~~~~~~~~~~~~~~~~~~~ + +upsmon will call your script every time an event happens that has the EXEC flag +set. This means a quick power failure that lasts mere seconds might generate a +notification storm. To suppress this sort of annoyance, use upssched as your +NOTIFYCMD program, and configure it to call your command after a timer has +elapsed. + + +The advanced approach, using upssched +------------------------------------- upssched is a helper for upsmon that will invoke commands for you at some interval relative to a UPS event. It can be used to send pages, mail out @@ -10,11 +99,11 @@ notices about things, or even shut down the box early. There will be examples scattered throughout. Change them to suit your pathnames, UPS locations, and so forth. -How it works relative to upsmon -=============================== +How upssched works relative to upsmon +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When an event occurs, upsmon will call whatever you specify as a NOTIFYCMD -in your upsmon.conf, if you also enable the EXEC in your NOTIFYFLAGS. In +When an event occurs, upsmon will call whatever you specify as a 'NOTIFYCMD' +in your upsmon.conf, if you also enable the 'EXEC' in your 'NOTIFYFLAGS'. In this case, we want upsmon to call upssched as the notifier, since it will be doing all the work for us. So, in the upsmon.conf: @@ -26,12 +115,13 @@ in the upsmon.conf we set the flags: NOTIFYFLAG ONLINE SYSLOG+EXEC NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC + ... and so on. -... and so on. For the purposes of this document I will only use those -three, but you can set the flags for any of the valid notify types. +For the purposes of this document I will only use those three, but you can set +the flags for any of the valid notify types. Setting up your upssched.conf -============================= +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Once upsmon has been configured with the NOTIFYCMD and EXEC flags, you're ready to deal with the upssched.conf details. In this file, you specify @@ -54,7 +144,7 @@ for additional information and advice about these variables. Now you can tell your CMDSCRIPT what to do when it is called by upsmon. The big picture ---------------- +^^^^^^^^^^^^^^^ The design in a nutshell is: @@ -65,7 +155,7 @@ initiating an early shutdown with 'upsmon -c fsd', sending a page by calling sendmail, or opening a subspace channel to V'ger. Establishing timers -------------------- +^^^^^^^^^^^^^^^^^^^ Let's say that you want to receive a page when any UPS has been running on battery for 30 seconds. Create a handler that starts a 30 second timer @@ -83,7 +173,7 @@ So, let's tell upssched that. AT ONLINE * CANCEL-TIMER onbattwarn Executing commands immediately ------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ As an example, consider the scenario where a UPS goes onto battery power. However, the users are not informed until 60 seconds later - using a timer as @@ -104,7 +194,7 @@ will signal upssched. Upssched will see the above command and simply pass immediately, there are no timers involved. Writing the command script handler ----------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OK, now that upssched knows how the timers are supposed to work, let's give it something to do when one actually triggers. The name of the @@ -112,34 +202,38 @@ example timer is onbattwarn, so that's the argument that will be passed into your CMDSCRIPT when it triggers. This means we need to do some shell script writing to deal with that input. +-------------------------------------------------------------------------------- + #! /bin/sh case $1 in onbattwarn) echo "The UPS has been on battery for awhile" \ | mail -s"UPS monitor" bofh@pager.example.com + ;; ups-back-on-power) /bin/rm -f /some/path/ups-on-battery + ;; *) logger -t upssched-cmd "Unrecognized command: $1" ;; esac +-------------------------------------------------------------------------------- + This is a very simple script example, but it shows how you can test for the presence of a given trigger. With multiple ATs creating various timer names, you will need to test for each possibility and handle it according to your desires. -Other possibilities -=================== +NOTE: You can invoke just about anything from inside the CMDSCRIPT. It doesn't +need to be a shell script, either - that's just an example. If you want to +write a program that will parse argv[1] and deal with the possibilities, that +will work too. -You can invoke just about anything from inside the CMDSCRIPT. It doesn't -need to be a shell script, either - that's just an example. If you want -to write a program that will parse argv[1] and deal with the -possibilities, that will work too. Early Shutdowns -=============== +~~~~~~~~~~~~~~~ One thing that gets requested a lot is early shutdowns in upsmon. With upssched, you can now have this functionality. Just set a timer for some @@ -158,8 +252,9 @@ from the CMDSCRIPT, since there's no synchronization with the slave systems hooked to the same UPS. FSD is the master's way of saying "we're shutting down *now* like it or not, so you'd better get ready". + Background -========== +~~~~~~~~~~ This program was written primarily to fulfill the requests of users for the early shutdown scenario. The "outboard" design of the program diff --git a/docs/security.txt b/docs/security.txt new file mode 100644 index 0000000..1a83c09 --- /dev/null +++ b/docs/security.txt @@ -0,0 +1,521 @@ +Notes on securing NUT +===================== + +The NUT Team is very interested in providing the highest security level to its +users. + +Many internal and external mechanisms exist to secure NUT. And several steps are +needed to ensure that your NUT setup meets your security requirements. + +This chapter will present you these mechanisms, by increasing order of security +level. This means that the more security you need, the more mechanisms you will +have to apply. + +NOTE: you may want to have a look at NUT Quality Assurance, since some +topics are related to NUT security and reliability. + + +[[verifySourceSig]] +How to verify the NUT source code signature +------------------------------------------- + +In order to verify the NUT source code signature for releases, perform the following steps: + +- Retrieve the link:http://www.networkupstools.org/download.html[NUT source code] (nut-X.Y.Z.tar.gz) and the matching signature (nut-X.Y.Z.tar.gz.sig) +- Retrieve the link:http://www.networkupstools.org/source/nut-key.gpg[NUT maintainer's signature]: + + $ gpg --fetch-keys http://www.networkupstools.org/source/nut-key.gpg + +- Launch the GPG checking using the following command: + + $ gpg --verify nut-X.Y.Z.tar.gz.sig + +- You should see a message mentioning a "Good signature", like: + + gpg: Signature made Thu Jul 5 16:15:05 2007 CEST using DSA key ID 204DDF1B + gpg: Good signature from "Arnaud Quette ..." + ... + + +System level privileges and ownership +------------------------------------- + +All configuration files should be protected so that the world can't read them. +Use the following commands to accomplish this: + + chown root:nut /etc/nut/* + chmod 640 /etc/nut/* + + +Finally, the <> directory, which holds the +communication between the driver(s) and upsd, should also be secured. + + chown root:nut /var/state/ups + chmod 0770 /var/state/ups + + +NUT level user privileges +------------------------- + +Administrative commands such as setting variables and the instant commands +are powerful, and access to them needs to be restricted. + +NUT provides an internal mechanism to do so, through +linkman:upsd.users[5]. + +This file defines who may access instant commands and settings, and what +is available. + +During the initial +<>, we have created a +monitoring user for upsmon. + +You can also create an 'administrator' user with full power using: + + [administrator] + password = mypass + actions = set + instcmds = all + +For more information on how to restrict actions and instant commands, refer +to linkman:upsd.users[5] manual page. + +NOTE: NUT administrative user definitions should be used in conjunction with +<>. + + +Network access control +---------------------- + +If you are not using NUT on a standalone setup, you will need to enforce +network access to upsd. + +There are various ways to do so. + +NUT LISTEN directive +~~~~~~~~~~~~~~~~~~~~ + +linkman:upsd.conf[5]. + + LISTEN interface port + +Bind a listening port to the interface specified by its Internet address. This +may be useful on hosts with multiple interfaces. You should not rely +exclusively on this for security, as it can be subverted on many systems. + +Listen on TCP port `port` instead of the default value which was compiled into +the code. This overrides any value you may have set with `configure +--with-port`. If you don't change it with configure or this value, `upsd` will +listen on port 3493 for this interface. + +Multiple LISTEN addresses may be specified. The default is to bind to +127.0.0.1 if no LISTEN addresses are specified (and ::1 if IPv6 support is +compiled in). + + LISTEN 127.0.0.1 + LISTEN 192.168.50.1 + LISTEN ::1 + LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344 + +This parameter will only be read at startup. You'll need to restart (rather +than reload) `upsd` to apply any changes made here. + + +Firewall +~~~~~~~~ + +NUT has its own official IANA port: 3493/tcp. + +The `upsmon` process on slave systems (as well as `upsc`) connects to the +`upsd` process on the master system via this TCP port. The `upsd` process does +not connect out. + +You should use this to restrict network access. + + +[[TCP_Wrappers]] +TCP Wrappers +~~~~~~~~~~~~ + +If the server is build with tcp-wrappers support enabled, it will check if the +NUT username is allowed to connect from the client address through the +'/etc/hosts.allow' and '/etc/hosts.deny' files. + +NOTE: this will only be done for commands that require the user to be logged +into the server. + +`hosts.allow`: + + ups : admin@127.0.0.1/32 + ups : monslave@127.0.0.1/32 monslave@192.168.1.0/24 + +`hosts.deny`: + + upsd : ALL + +Further details are described in hosts_access(5). + + +Configuring SSL +--------------- + +SSL is available as a build option ('--with-ssl'). + +It encrypts sessions between upsd and clients, and can also be used to +authenticate servers. + +This means that stealing port 3493 from upsd will no longer net you interesting +passwords. + +Several things must happen before this will work, however. This chapter will +present these steps. + +Install OpenSSL +~~~~~~~~~~~~~~~ + +Install link:http://www.openssl.org[OpenSSL] as usual, either from source +or binary packages. + +Recompile and install NUT +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Recompile NUT from source, starting with 'configure --with-ssl'. + +Then install everything as usual. + +Create a certificate and key for upsd +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +openssl (the program) should be in your PATH, unless you installed it from +source yourself, in which case it may be in /usr/local/ssl/bin. + +Use the following command to create the certificate: + + openssl req -new -x509 -nodes -out upsd.crt -keyout upsd.key + +You can also put a '-days nnn' in there to set the expiration. If +you skip this, it may default to 30 days. This is probably not what +you want. + +It will ask several questions. What you put in there doesn't matter a whole +lot, since nobody is going to see it for now. Future versions of the +clients may present data from it, so you might use this opportunity to +identify each server somehow. + +Figure out the hash for the key +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the following command to determine the hash of the certificate: + + openssl x509 -hash -noout -in upsd.crt + +You'll get back a single line with 8 hex characters. This is the +hash of the certificate, which is used for naming the client-side +certificate. For the purposes of this example the hash is *0123abcd*. + +Install the client-side certificate +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the following commands to install the client-side certificate: + + mkdir + chmod 0755 + cp upsd.crt /.0 + +Example: + + mkdir /usr/local/ups/etc/certs + chmod 0755 /usr/local/ups/etc/certs + cp upsd.crt /usr/local/ups/etc/certs/0123abcd.0 + +If you already have a file with that name in there, increment the +0 until you get a unique filename that works. + +If you have multiple client systems (like upsmon slaves), be sure +to install this file on them as well. + +We recommend making a directory under your existing confpath to +keep everything in the same place. Remember the path you created, +since you will need to put it in upsmon.conf later. + +It must not be writable by unprivileged users, since someone could +insert a new client certificate and fool upsmon into trusting a +fake upsd. + +Create the combined file for upsd +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To do so, use the below commands: + + cat upsd.crt upsd.key > upsd.pem + chown root:nut upsd.pem + chmod 0640 upsd.pem + +This file must be kept secure, since anyone possessing it could +pretend to be upsd and harvest authentication data if they get a +hold of port 3493. + +Having it be owned by 'root' and readable by group 'nut' allows upsd +to read the file without being able to change the contents. This +is done to minimize the impact if someone should break into upsd. + +Note on certification authorities (CAs) and signed keys +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are probably other ways to handle this, involving keys which have +been signed by a CA you recognize. Contact your local SSL guru. + +Install the server-side certificate +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Install the certificate with the following command: + + mv upsd.pem + +Example: + + mv upsd.pem /usr/local/ups/etc/upsd.pem + +After that, edit your upsd.conf and tell it where to find it: + + CERTFILE /usr/local/ups/etc/upsd.pem + +Clean up the temporary files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + rm -f upsd.crt upsd.key + +Restart upsd +~~~~~~~~~~~~ + +It should come back up without any complaints. If it says something +about keys or certificates, then you probably missed a step. + +If you run upsd as a separate user id (like nutsrv), make sure that +user can read the upsd.pem file. + +Point upsmon at the certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit your upsmon.conf, and tell it where the CERTPATH is: + + CERTPATH + +Example: + + CERTPATH /usr/local/ups/etc/certs + +Recommended: make upsmon verify all connections with certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Put this in upsmon.conf: + + CERTVERIFY 1 + +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. + +Recommended: force upsmon to use SSL +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Again in upsmon.conf: + + FORCESSL 1 + +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. + +Restart upsmon +~~~~~~~~~~~~~~ + +You should see something like this in the syslog from upsd: + + foo upsd[1234]: Client mon@localhost logged in to UPS [myups] (SSL) + +If upsd or upsmon give any error messages, or the (SSL) is missing, +then something isn't right. + +If in doubt about upsmon, start it with -D so it will stay in +the foreground and print debug messages. It should print something +like this every couple of seconds: + + polling ups: myups@localhost [SSL] + +Obviously, if the '[SSL]' isn't there, something's broken. + +Recommended: sniff the connection to see it for yourself +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Using tcpdump, Wireshark (Ethereal), or another network sniffer tool, +tell it to monitor port 3493/tcp and see what happens. You should only +see 'STARTTLS' go out, 'OK STARTTLS' come back, and the rest will be +certificate data and then seemingly random characters. + +If you see any plaintext besides that (USERNAME, PASSWORD, etc.) +then something is not working. + +Potential problems +~~~~~~~~~~~~~~~~~~ + +If you specify a certificate expiration date, you will eventually +see things like this in your syslog: + + Oct 29 07:27:25 rktoy upsmon[3789]: Poll UPS [for750@rktoy] failed - + SSL error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE: certificate verify failed + +You can verify that it is expired by using openssl to display the date: + + openssl x509 -enddate -noout -in + +It'll display a date like this: + + notAfter=Oct 28 20:05:32 2002 GMT + +If that's after the current date, you need to generate another cert/key +pair using the procedure above. + +Conclusion +~~~~~~~~~~ + +SSL support should be considered stable but purposely underdocumented +since various bits of the implementation or configuration may change in +the future. In other words, if you use this and it stops working after +an upgrade, come back to this file to find out what changed. + +This is why the other documentation doesn't mention any of these +directives yet. SSL support is a treat for those of you that RTFM. + +There are also potential licensing issues for people who ship binary +packages since NUT is GPL and OpenSSL is not compatible with it. You +can still build and use it yourself, but you can't distribute the +results of it. Or maybe you can. It depends on what you consider +"essential system software", and some other legal junk that we're not +going to touch. + +Other packages have solved this by explicitly stating that an exception +has been granted. That is (purposely) impossible here, since NUT is the +combined effort of many people, and all of them would have to agree to a +license change. This is actually a feature, since it means nobody can +unilaterally run off with the source - not even the NUT team. + +Note that the replacement of OpenSSL by Mozilla Network Security Services +(NSS) is scheduled in the future, to avoid the above licensing issues. + + +chrooting and other forms of paranoia +------------------------------------- + +It has been possible to run the drivers and upsd in a chrooted jail for +some time, but it involved a number of evil hacks. From the 1.3 series, +a much saner chroot behavior exists, using BIND 9 as an inspiration. + +The old way involved creating an entire tree, complete with libraries, a +shell (!), and many auxiliary files. This was hard to maintain and +could have become an interesting playground for an intruder. The new +way is minimal, and leaves little in the way of usable materials within +the jail. + +This document assumes that you already have created at least one user +account for the software to use. If you're still letting it fall back +on "nobody", stop right here and go figure that out first. It also +assumes that you have everything else configured and running happily all +by itself. + +Generalities +~~~~~~~~~~~~ + +Essentially, you need to create your configuration directory and state +path in their own little world, plus a special device or two. + +For the purposes of this example, the chroot jail is /chroot/nut. The +programs have been built with the default prefix, so they are using +/usr/local/ups. First, create the confpath and bring over a few files. + + mkdir -p /chroot/nut/usr/local/ups/etc + cd /chroot/nut/usr/local/ups/etc + cp -a /usr/local/ups/etc/upsd.users . + cp -a /usr/local/ups/etc/upsd.conf . + cp -a /usr/local/ups/etc/ups.conf . + +We're using 'cp -a' to maintain the permissions on those files. + +Now bring over your state path, maintaining the same permissions as +before. + + mkdir -p /chroot/nut/var/state + cp -a /var/state/ups /chroot/nut/var/state + +Next we must put /etc/localtime inside the jail, or you may get very +strange readings in your syslog. You'll know you have this problem if +upsd shows up as UTC in the syslog while the rest of the system doesn't. + + mkdir -p /chroot/nut/etc + cp /etc/localtime /chroot/nut/etc + +Note that this is not "cp -a", since we want to copy the *content*, not +the symlink that it may be on some systems. + +Finally, create a tiny bit of /dev so the programs can enter the +background properly - they redirect fds into the bit bucket to make sure +nothing else grabs 0-2. + + mkdir -p /chroot/nut/dev + cp -a /dev/null /chroot/nut/dev + +Try to start your driver(s) and make sure everything fires up as before. + + upsdrvctl -r /chroot/nut -u nutdev start + +Once your drivers are running properly, try starting upsd. + + upsd -r /chroot/nut -u nutsrv + +Check your syslog. If nothing is complaining, try running clients like +upsc and upsmon. If they seem happy, then you're done. + +symlinks +~~~~~~~~ + +After you do this, you will have two copies of many things, like the +confpath and the state path. I recommend deleting the 'real' +/var/state/ups, replacing it with a symlink to +/chroot/nut/var/state/ups. That will let other programs reference the +.pid files without a lot of hassle. + +You can also do this with your confpath and point /usr/local/ups/etc at +/chroot/nut/usr/local/ups/etc unless you're worried about something +hurting the files inside that directory. In that case, you should +maintain a 'master' copy and push it into the chroot path after +making changes. + +upsdrvctl itself does not chroot, so the ups.conf still needs to be in +the usual confpath. + +upsmon +~~~~~~ + +This has not yet been applied to upsmon, since it can be quite +complicated when there are notifiers that need to be run. One +possibility would be for upsmon to have three instances: + + - privileged root parent that listens for a shutdown command + + - unprivileged child that listens for notify events + + - unprivileged chrooted child that does network I/O + +This one is messy, and may not happen for some time, if ever. + +Config files +~~~~~~~~~~~~ + +You may now set chroot= and user= in the global section of ups.conf. + +upsd chroots before opening any config files, so there is no way to +add support for that in upsd.conf at the present time. diff --git a/docs/shutdown.txt b/docs/shutdown.txt deleted file mode 100644 index f00eefb..0000000 --- a/docs/shutdown.txt +++ /dev/null @@ -1,230 +0,0 @@ -Desc: Configuring automatic UPS shutdowns -File: shutdown.txt -Date: 24 August 2003 -Auth: Russell Kroll - -Shutdown design -=============== - -When your UPS batteries get low, the operating system needs to be brought -down cleanly. Also, the UPS load should be turned off so that all devices -that are attached to it are forcibly rebooted. - -Here are the steps that occur when a critical power event happens: - -1. The UPS goes on battery - -2. The UPS reaches low battery (a "critical" UPS) - -3. The upsmon master notices and sets "FSD" - the "forced shutdown" - flag to tell all slave systems that it will soon power down the load. - - (If you have no slaves, skip to step 6) - -4. upsmon slave systems see "FSD" and: - - - generate a NOTIFY_SHUTDOWN event - - wait FINALDELAY seconds - typically 5 - - call their SHUTDOWNCMD - - disconnect from upsd - -5. The upsmon master system waits up to HOSTSYNC seconds (typically 15) - for the slaves to disconnect from upsd. If any are connected after - this time, upsmon stops waiting and proceeds with the shutdown - process. - -6. The upsmon master: - - - generates a NOTIFY_SHUTDOWN event - - waits FINALDELAY seconds - typically 5 - - creates the POWERDOWNFLAG file - usually /etc/killpower - - calls the SHUTDOWNCMD - -7. On most systems, init takes over, kills your processes, syncs and - unmounts some filesystems, and remounts some read-only. - -8. init then runs your shutdown script. This checks for the - POWERDOWNFLAG, finds it, and tells the UPS driver(s) to power off - the load. - -9. The system loses power. - -10. Time passes. The power returns, and the UPS switches back on. - -11. All systems reboot and go back to work. - -How you set it up -================= - -1. Make sure your POWERDOWNFLAG setting in upsmon.conf points somewhere - reasonable. Specifically, that filesystem must be mounted when your - shutdown script runs. - -2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they know - when to power off the UPS. You must check for this file, as you don't - want this to happen during normal shutdowns! - - You can use upsdrvctl to start the shutdown process in your UPS - hardware. Use this script as an example, but change the paths to - suit your system: - - if (test -f /etc/killpower) - then - echo "Killing the power, bye!" - /usr/local/ups/bin/upsdrvctl shutdown - - sleep 120 - - # uh oh... the UPS poweroff failed! - # you probably should reboot here to avoid getting stuck - # *** see the section on power races below *** - fi - - Make sure the filesystem containing upsdrvctl, ups.conf and your UPS - driver(s) is mounted when the system gets to this point. Otherwise - it won't be able to figure out what to do. - -RAID warning -============ - - NOTE: If you run any sort of RAID equipment, make sure your arrays - are either halted (if possible) or switched to "read-only" mode. - Otherwise you may suffer a long resync once the system comes back up. - - The kernel may not ever run its final shutdown procedure, so you - must take care of all array shutdowns in userspace before upsdrvctl - runs. - - If you use software RAID (md) on Linux, get mdadm and try using - 'mdadm --readonly' to put your arrays in a safe state. This has to - happen after your shutdown scripts have remounted the filesystems. - - On hardware RAID or other kernels, you have to do some detective work. - It may be necessary to contact the vendor or the author of your - driver to find out how to put the array in a state where a power loss - won't leave it "dirty". - - My understanding is that 3ware devices on Linux will be fine unless - there are pending writes. Make sure your filesystems are remounted - read-only and you should be covered. - -Multiple UPS shutdowns -====================== - -If you have multiple UPSes connected to your system, chances are that you -need to shut them down in a specific order. The goal is to shut down -everything but the one keeping upsmon alive at first, then you do that one -last. - -To set the order in which your UPSes receive the shutdown commands, define -the "sdorder" value in your ups.conf. - - [bigone] - driver = apcsmart - port = /dev/ttyS0 - sdorder = 2 - - [littleguy] - driver = bestups - port = /dev/ttyS1 - sdorder = 1 - - [misc] - driver = megatec - port = /dev/ttyS2 - sdorder = 0 - -The order runs from 0 to the highest number available. So, for this -configuration, the order of shutdowns would be misc, littleguy, and then -bigone. - -If you have a UPS that shouldn't be shutdown when running "upsdrvctl -shutdown", set the sdorder to -1. - -Testing shutdowns -================= - -To see how upsdrvctl will behave without actually turning off power, use -the -t argument. It will display the sequence without actually calling -the drivers. - -Other issues -============ - -You may delete the POWERDOWNFLAG in the startup scripts, but it is not -necessary. upsmon will clear that file for you when it starts. - -Remember that some operating systems unmount a good number of filesystems -when going into read-only mode. If the UPS software is installed to /usr -and it's not mounted, your shutdowns will fail. If this happens, either -make sure it stays mounted at shutdown, or install to another partition. - -Power races -=========== - -There is a situation where the power may return during the shutdown -process. This is known as a race. Here's how we handle it. - -"Smart" UPSes typically handle this by using a command that forces the UPS -to power the load off and back on. This way, you are assured that the -systems will restart even if the power returns at the worst possible -moment. - -Contact closure units (ala genericups), on the other hand, have the -potential for a race when feeding multiple systems. This is due to the -design of most contact closure UPSes. Typically, the "kill power" line -only functions when running on battery. As a result, if the line power -returns during the shutdown process, there is no way to power down the -load. - -The workaround is to force your systems to reboot after some -interval. This way, they won't be stuck in the halted state with the UPS -running on line power. - -Testing power races -=================== - -The easiest way to see if your configuration will handle a power race -successfully is to do 'upsmon -c fsd'. This will force the UPS software -to shut down as if it had a OB+LB situation, and your shutdown script -should call the UPS driver(s) in shutdown mode. - -If everything works correctly, the computer will be forcibly powered off, -may remain off for a few seconds to a few minutes (depending on the -driver and UPS type), then will power on again. - -If your UPS just sits there and never resets the load, you are vulnerable -to the above power race and should add the "reboot after timeout" hack -at the very least. - -Know your hardware -================== - -UPS equipment varies from manufacturer to manufacturer and even within -model lines. You should test the shutdown sequence on your systems before -leaving them unattended. A successful sequence is one where the OS halts -before the battery runs out, and the system restarts when power returns. - -One more tip -============ - -If your UPS powers up immediately after a power failure instead of -waiting for the batteries to recharge, you can rig up a little hack to -handle it in software. - -Essentially, you need to test for the POWERDOWNFLAG in your *startup* -scripts while the filesystems are still read-only. If it's there, you -know your last shutdown was caused by a power failure and the UPS -battery is probably still quite weak. - -In this situation, your best bet is to sleep it off. Pausing in your -startup script to let the batteries recharge with the filesystems in a -safe state is recommended. This way, if the power goes out again, you -won't face a situation where there's not enough battery capacity left -for upsmon to do its thing. - -Exactly how long to wait is a function of your UPS hardware, and will -require careful testing. - -If this is too evil for you, buy another kind of UPS that will either -wait for a minimum amount of charge, a minimum amount of time, or both. diff --git a/docs/sock-protocol.txt b/docs/sock-protocol.txt index 9fb336c..7f25d9d 100644 --- a/docs/sock-protocol.txt +++ b/docs/sock-protocol.txt @@ -1,9 +1,7 @@ -Desc: Driver/server socket protocol -File: sock-protocol.txt -Date: 1 May 2003 -Auth: Russell Kroll +Driver/server socket protocol +============================= -Here's a brief explanation of the text-based protocol which is now used +Here's a brief explanation of the text-based protocol which is used between the drivers and server. The drivers may send things on the socket at any time. They will send @@ -12,7 +10,7 @@ prompting from the server. As a result, the server must always check on any driver sockets for activity. Formatting -========== +---------- All parsing on either side of the socket is done by parseconf, so the same rules about escaping characters and "quoting multi-word elements" @@ -23,55 +21,55 @@ The "" construct is used throughout to force a multi-word value to stay together on its way to the other end. Commands used by the drivers -============================ +---------------------------- SETINFO -------- +~~~~~~~ - SETINFO "" + SETINFO "" - SETINFO ups.status "OB LB" + SETINFO ups.status "OB LB" There is no "ADDINFO" - if a given variable does not exist, it is created upon receiving the first SETINFO command. DELINFO -------- +~~~~~~~ - DELINFO + DELINFO - DELINFO ups.temperature + DELINFO ups.temperature ADDENUM -------- +~~~~~~~ - ADDENUM "" + ADDENUM "" - ADDENUM input.transfer.low "95" + ADDENUM input.transfer.low "95" DELENUM -------- +~~~~~~~ - DELENUM "" + DELENUM "" - DELENUM input.transfer.low "98" + DELENUM input.transfer.low "98" SETAUX ------- +~~~~~~ - SETAUX + SETAUX - SETAUX ups.id 8 + SETAUX ups.id 8 This overrides any previous value. The auxiliary value is presently used as a length byte for read-write variables that are strings. SETFLAGS --------- +~~~~~~~~ - SETFLAGS ... + SETFLAGS ... - SETFLAGS ups.id RW STRING + SETFLAGS ups.id RW STRING Note that this command takes a variable number of arguments, as multiple flags are supported. Also note that they are not crammed together in @@ -80,23 +78,23 @@ flags are supported. Also note that they are not crammed together in This also replaces any previous flags for a given variable. ADDCMD ------- +~~~~~~ - ADDCMD + ADDCMD - ADDCMD load.off + ADDCMD load.off DELCMD ------- +~~~~~~ - DELCMD + DELCMD - DELCMD load.on + DELCMD load.on DUMPDONE --------- +~~~~~~~~ - DUMPDONE + DUMPDONE This is only used to tell the server that every possible item has been transmitted in response to its DUMPALL request. Once this has been @@ -104,27 +102,27 @@ received by the server, it can be sure that it knows everything that the driver does. PONG ----- +~~~~ - PONG + PONG This is sent in response to a PING from the server. It is only used as a sanity check to make sure that the driver has not gotten stuck somewhere. DATAOK ------- +~~~~~~ - DATAOK + DATAOK This means that the driver is able to communicate with the UPS, and the data should be treated as usable. It is always sent at the end of the dump if the data is not stale. It may also be sent at other times. DATASTALE ---------- +~~~~~~~~~ - DATASTALE + DATASTALE This is sent by the driver to inform any listeners that the data is no longer usable. This usually means that the driver is unable to get any @@ -135,12 +133,12 @@ This will be sent in the beginning of a dump if the data is stale, and may be repeated. It is cleared by DATAOK. Commands sent by the server -=========================== +--------------------------- PING ----- +~~~~ - PING + PING This is sent to check on the health of a driver. The server should only send this when it hasn't heard anything valid from a driver recently. @@ -152,23 +150,23 @@ most, it should be treated as dead/unavailable. Data stored in the server must not be passed on to the clients when this happens. INSTCMD -------- +~~~~~~~ - INSTCMD + INSTCMD - INSTCMD panel.test.start + INSTCMD panel.test.start SET ---- +~~~ - SET "" + SET "" - SET ups.id "Data room" + SET ups.id "Data room" DUMPALL -------- +~~~~~~~ - DUMPALL + DUMPALL The server uses this to request a complete copy of everything the driver knows. This is returned in the form of the same commands (SETINFO, @@ -180,10 +178,10 @@ DUMPDONE. That special response from the driver is sent once the entire set has been transmitted. Design notes -============ +------------ Requests --------- +~~~~~~~~ There is no way to request just one variable. This was done on purpose to limit the complexity of the drivers. Their job is to send out @@ -195,7 +193,7 @@ then only have handlers that remember values for the variables that matter. Anything else should be ignored. Access/Security ---------------- +~~~~~~~~~~~~~~~ There are no access controls in the drivers. Anything that can connect to their sockets can make requests, including SET and INSTCMD if @@ -205,7 +203,7 @@ sockets, then you must store them in a directory with suitable permissions to limit access. Command limitations -------------------- +~~~~~~~~~~~~~~~~~~~ As parseconf is used to handle decoding and chunking of the data, there are some limits on what may be used. These default to 32 arguments of @@ -217,7 +215,7 @@ necessary. parseconf itself can handle vast numbers of arguments and characters, with some speed penalty as things get really big. Re-establishing communications ------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the server loses its connection to the driver and later reconnects, it must flush any local storage and start again with DUMPALL. The diff --git a/docs/ssl.txt b/docs/ssl.txt deleted file mode 100644 index 38c6549..0000000 --- a/docs/ssl.txt +++ /dev/null @@ -1,251 +0,0 @@ -Desc: Configuring SSL -File: ssl.txt -Date: 19 February 2004 -Auth: Russell Kroll - -SSL is now available as a development option. It encrypts sessions with -upsd and can also be used to authenticate servers. This means that -stealing port 3493 from upsd will no longer net you interesting -passwords. - -Several things must happen before this will work, however: - ------------------------------------------------------------------------------- - - 1. Install OpenSSL. - ------------------------------------------------------------------------------- - - 2. Recompile NUT from source, starting with 'configure --with-ssl'. - ------------------------------------------------------------------------------- - - 3. Install everything as usual. - ------------------------------------------------------------------------------- - - 4. Create a certificate and key for upsd. - - openssl (the program) should be in your PATH, unless you installed - it from source yourself, in which case it may be in - /usr/local/ssl/bin. - - openssl req -new -x509 -nodes -out upsd.crt -keyout upsd.key - - You can also put a "-days nnn" in there to set the expiration. If - you skip this, it may default to 30 days. This is probably not what - you want. - - It will ask several questions. What you put in there doesn't matter - a whole lot, since nobody is going to see it for now. Future - versions of the clients may present data from it, so you might use - this opportunity to identify each server somehow. - ------------------------------------------------------------------------------- - - 5. Figure out the hash for the key. - - openssl x509 -hash -noout -in upsd.crt - - You'll get back a single line with 8 hex characters. This is the - hash of the certificate, which is used for naming the client-side - certificate. For the purposes of this example the hash is - 0123abcd. - ------------------------------------------------------------------------------- - - 6. Install the client-side certificate. - - mkdir - chmod 0755 - cp upsd.crt /.0 - - Example: - - mkdir /usr/local/ups/etc/certs - chmod 0755 /usr/local/ups/etc/certs - cp upsd.crt /usr/local/ups/etc/certs/0123abcd.0 - - If you already have a file with that name in there, increment the - 0 until you get a unique filename that works. - - If you have multiple client systems (like upsmon slaves), be sure - to install this file on them as well. - - I recommend making a directory under your existing confpath to - keep everything in the same place. Remember the path you created, - since you will need to put it in upsmon.conf later. - - It must not be writable by unprivileged users, since someone could - insert a new client certificate and fool upsmon into trusting a - fake upsd. - ------------------------------------------------------------------------------- - - 7. Create the combined file for upsd. - - cat upsd.crt upsd.key > upsd.pem - - chown root:nut upsd.pem - chmod 0640 upsd.pem - - This file must be kept secure, since anyone possessing it could - pretend to be upsd and harvest authentication data if they get a - hold of port 3493. - - Having it be owned by root and readable by group nut allows upsd - to read the file without being able to change the contents. This - is done to minimize the impact if someone should break into upsd. - ------------------------------------------------------------------------------- - - 8. Install the server-side certificate. - - mv upsd.pem - - Example: - - mv upsd.pem /usr/local/ups/etc/upsd.pem - - After that, edit your upsd.conf and tell it where to find it: - - CERTFILE /usr/local/ups/etc/upsd.pem - ------------------------------------------------------------------------------- - - 9. Clean up the temporary files. - - rm -f upsd.crt upsd.key - ------------------------------------------------------------------------------- - -10. Restart upsd. - - It should come back up without any complaints. If it says something - about keys or certificates, then you probably missed a step. - - If you run upsd as a separate user id (like nutsrv), make sure that - user can read the upsd.pem file. - ------------------------------------------------------------------------------- - -11. Point upsmon at the certificates. - - Edit your upsmon.conf, and tell it where the CERTPATH is: - - CERTPATH - - CERTPATH /usr/local/ups/etc/certs - ------------------------------------------------------------------------------- - -12. Recommended: make upsmon verify all connections with certificates. - - Put this in upsmon.conf: - - CERTVERIFY 1 - - 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. - ------------------------------------------------------------------------------- - -13. Recommended: force upsmon to use SSL. - - Again in upsmon.conf: - - FORCESSL 1 - - 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. - ------------------------------------------------------------------------------- - -14. Restart upsmon. - - You should see something like this in the syslog from upsd: - - foo upsd[1234]: Client mon@localhost logged in to UPS [myups] (SSL) - - If upsd or upsmon give any error messages, or the (SSL) is missing, - then something isn't right. - - If in doubt about upsmon, start it with -D so it will stay in - the foreground and print debug messages. It should print something - like this every couple of seconds: - - polling ups: myups@localhost [SSL] - - Obviously, if the [SSL] isn't there, something's broken. - ------------------------------------------------------------------------------- - -15. Recommended: sniff the connection to see it for yourself. - - Using tcpdump, Ethereal, or another network sniffer tool, tell it - to monitor port 3493/tcp and see what happens. You should only see - "STARTTLS" go out, "OK STARTTLS" come back, and the rest will be - certificate data and then seemingly random characters. - - If you see any plaintext besides that (USERNAME, PASSWORD, etc.) - then something is not working. - ------------------------------------------------------------------------------- - -SSL support should be considered stable but purposely underdocumented -since various bits of the implementation or configuration may change in -the future. In other words, if you use this and it stops working after -an upgrade, come back to this file to find out what changed. - -This is why the other documentation doesn't mention any of these -directives yet. SSL support is a treat for those of you that RTFM. - -There are also potential licensing issues for people who ship binary -packages since NUT is GPL and OpenSSL is not compatible with it. You -can still build and use it yourself, but you can't distribute the -results of it. Or maybe you can. It depends on what you consider -"essential system software", and some other legal junk that I'm not -going to touch. - -Other packages have solved this by explicitly stating that an exception -has been granted. That is (purposely) impossible here, since NUT is the -combined effort of many people, and all of them would have to agree to a -license change. This is actually a feature, since it means nobody can -unilaterally run off with the source - not even me. - -It would be nice if we could also link against gnutls to avoid the -licensing issues. - -Potential problems -================== - -If you specify a certificate expiration date, you will eventually -see things like this in your syslog: - -Oct 29 07:27:25 rktoy upsmon[3789]: Poll UPS [for750@rktoy] failed - -SSL error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE: -certificate verify failed - -You can verify that it is expired by using openssl to display the date: - - openssl x509 -enddate -noout -in - -It'll display a date like this: - - notAfter=Oct 28 20:05:32 2002 GMT - -If that's after the current date, you need to generate another cert/key -pair using the procedure above. - -CAs / signed keys -================= - -There are probably other ways to handle this, involving keys which have -been signed by a CA you recognize. Contact your local SSL guru. - diff --git a/docs/stable-hcl.txt b/docs/stable-hcl.txt new file mode 100644 index 0000000..49c799a --- /dev/null +++ b/docs/stable-hcl.txt @@ -0,0 +1,161 @@ +ifdef::website[] +Hardware compatibility list +=========================== +endif::website[] + +NOTE: Before you buy, take a look at the link:acknowledgements.html[Acknowledgements] +for information about which drivers are developed with the support of the manufacturer. + +ifdef::website[] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +
    + Filters +
    + Support level legend +
    +
    *
    protocol based on reverse engineering
    +
    **
    based on fragments of publicly available protocol
    +
    ***
    based on publicly available protocol
    +
    ****
    vendor provided protocol
    +
    *****
    vendor provided protocol and hardware
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    +
    + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +include::ups-html.txt[] + +endif::website[] + +[NOTE] +================================================================================ + + +*If your device isn't listed* + +First, if there are other models by the same manufacturer, try their drivers. +You may find that it "just works" or mostly works. + +In either case, send in a report so this list and the driver can be improved. + +Next, if you don't find any match, there are a few drivers that have a good +chance of working on random hardware. These are indicated in the *Various* +entries above. + +After doing that, if those aren't working, you might try running other ones +from the set to see if anything works. Sometimes you get lucky. Finally, if +absolutely nothing works and your cabling is OK, try contacting the list and +we will see what we can do for you. + +In general, if a driver does not exist, that's due to the lack of overlap +between the set of developers and the set of owners of that hardware. + +The way to fix it is to turn a developer into an owner or an owner into a +developer. + +*Omissions or errors* + +There is a lot of UPS hardware for sale, and it's possible that we have missed +listing some that are supported. + +Please report any omissions so that this list can be as accurate as possible. + +*Pointing the present HCL* + +You can create direct link to the present HCL, speficying some filters within +the URL. This allows to select devices that matches some specific criteria, +like a connexion type, a manufacturer, ... All filters available on the page +itself are also available for use in the URL. + +The form of the URL is the following: + + http://www.networkupstools.org/stable-hcl.html?= + +.Possible values for and +[cols="^,^",options="header"] +|========================================================================== +| | +| support-level | a number from '1' to '5' +.3+^.^| device-type | 'ups' for uninterruptible power supply + | 'pdu' for power distribution unit + | 'scd' for solar controller device +| manufacturer | a manufacturer name from the selection list +| model | a model name from the selection list +.3+^.^| connection | 'USB' + | 'Serial' + | 'Network' +|========================================================================== + +You can finally combine multiple filters, using ampersand (*&*). + +For example, if you only want to select USB units from Eaton, use: + + http://www.networkupstools.org/stable-hcl.html?manufacturer=Eaton&connection=USB + + + +================================================================================ + +//////////////////////////////////////////////////////////////////////////////// +FIXME: +- point and complete the "user manual -> support" section for success report +link:user-manual.html#Support_Request[Support instructions] in the user manual. +//////////////////////////////////////////////////////////////////////////////// diff --git a/docs/support.txt b/docs/support.txt new file mode 100644 index 0000000..abe2898 --- /dev/null +++ b/docs/support.txt @@ -0,0 +1,111 @@ +ifdef::website[] +Support instructions +==================== +endif::website[] + + +There are various ways to obtain support for NUT. + +Documentation +------------- + +- First, be sure to read the link:docs/FAQ.html[FAQ]. The most common problems are already +addressed there. + +ifdef::website[] +- Else, you can read the link:docs/user-manual.chunked/index.html[NUT User Manual]. +endif::website[] +ifndef::website[] +- Else, you can read the linkdoc:user-manual[NUT user manual]. +endif::website[] +It also covers many areas about installing, configuring and using NUT. +The specific steps on system integration are also discussed. + +- Finally, link:docs/man/index.html#User_man[User manual pages] will also +complete the User Manual provided information. At least, read the manual +page related to your driver(s). + +Mailing lists +------------- + +If you have still not found a solution, you should search the lists before +posting a question. + +Someone may have already solved the problem: + +ifdef::backend-xhtml11[] + +++++++++++++++++++++++++++++++++++++++ +
    + + + + + +
    +++++++++++++++++++++++++++++++++++++++ + +endif::backend-xhtml11[] + +ifndef::backend-xhtml11[] + +link:http://www.google.com/search?as_q=&as_oq=nut-upsuser+nut-upsdev&domains=lists.alioth.debian.org&sitesearch=lists.alioth.debian.org&btnG=Search+NUT+lists[search on the NUT lists using Google] + +endif::backend-xhtml11[] + +Finally, you can *subscribe* to a NUT mailing list to: + +Request help +~~~~~~~~~~~~ + +Use the link:http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser[NUT Users] +mailing list. + +In this case, be sure to include the following information: + +- OS name and version, +- exact NUT version, +- NUT installation method: from source tarball, package or subversion, +- exact device name and related information (manufacturing date, web pointers, ...), +- complete problem description, with any relevant trace, like system log excerpt, +and driver debug output. You can obtain this last using the following command, +as root and after having stopped NUT: + + /path/to/driver -DDDDD -a + +If you don't include the above information in your help request, we will not be +able to help you! + +Post a patch, ask a development question, ... +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the link:http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev[NUT Developers] +mailing list. + +Refer to the +ifdef::website[] +link:docs/developer-guide.chunked/index.html[NUT Developer Guide] +for more information, and the chapter on how to +link:docs/developer-guide.chunked/ar01s03.html#_submitting_patches[submit patches]. +endif::website[] +ifndef::website[] +linkdoc:developer-guide[NUT Developer Guide] +for more information, and the chapter on how to +link:../developer-guide.chunked/ar01s03.html#_submitting_patches[submit patches]. +endif::website[] + + +Discuss packaging and related topics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the link:http://lists.alioth.debian.org/mailman/listinfo/nut-packaging[NUT Packagers] +mailing list. + +Refer to the +ifdef::website[] +link:docs/packager-guide.chunked/index.html[NUT Packager Guide] +endif::website[] +ifndef::website[] +linkdoc:packager-guide[NUT Packager Guide] +endif::website[] + for more information. diff --git a/docs/user-manual.txt b/docs/user-manual.txt new file mode 100644 index 0000000..4728454 --- /dev/null +++ b/docs/user-manual.txt @@ -0,0 +1,189 @@ +:titles.underlines: "__","==","--","~~","^^" + +Network UPS Tools User Manual +_____________________________ +:Author: Russell_Kroll,_Arnaud_Quette_and_Arjen_de_Korte +:Author Initials: RK, AQ & ADK + +Introduction +============ + +The primary goal of the Network UPS Tools (NUT) project is to provide support +for Power Devices, such as Uninterruptible Power Supplies, Power Distribution +Units and Solar Controllers. + +NUT provides many control and monitoring <>, with a uniform +control and management interface. + +More than 100 different manufacturers, and several thousands models are +<>. + +This software is the combined effort of many +<>. + +This document intend to describe how to install software support for your +<> (UPS, PDU, ...), and how to use the +NUT project. It is not intended to explain what are, nor distinguish the +different technologies that exist. For such information, have a look at the +<>. + +If you wish to discover how everything came together, have a look at the +<>. + + +[[Overview]] + +include::../README[] + + +[[Features]] + +include::features.txt[] + + +Compatibility information +------------------------- + +Hardware +~~~~~~~~ + +The current list of hardware supported by NUT can be viewed <>. + +Operating systems +~~~~~~~~~~~~~~~~~ + +This software has been reported to run on: + +- Linux distributions, +- the BSDs, +- Apple's OS X, +- Sun Solaris, +- SGI IRIX, +- HP/UX, +- Tru64 Unix, +- AIX. + +There is also a port of the client-side monitoring to Windows called WinNUT. +Windows users may be able to build it directly with Cygwin. + +Your system will probably run it too. You just need a good C compiler and +possibly some more packages to gain access to the serial ports. +Other features, such as USB / SNMP / whatever, will also need extra software +installed. + +Success reports are welcomed to keep this list accurate. + + +[[Download_instructions]] + +include::download.txt[] + + +[[_installation_instructions]] + +include::../INSTALL[] + + +[[Configuration_notes]] + +include::config-notes.txt[] + + +[[Advanced_usage_scheduling_notes]] + +include::scheduling.txt[] + + +[[Outlets_PDU_notes]] + +include::outlets.txt[] + + +[[NUT_Security]] + +include::security.txt[] + + +Appendix A: Glossary +==================== + +This section document the various acronyms used throughout the present +documentation. + +[template="glossary",id="terms"] +NUT:: + Network UPS Tools. +PDU:: + Power Distribution Unit. +SCD:: + Solar Controller Device. +UPS:: + Uninterruptible Power Supply. + + +[[Acknowledgements]] +Appendix B: Acknowledgements / Contributions +============================================ + +include::acknowledgements.txt[Acknowledgements / Contributions] + + +[[nut-names]] +Appendix C: NUT command and variable naming scheme +================================================== + +include::nut-names.txt[] + + +[[HCL]] +Appendix D: Hardware Compatibility List +======================================= + +ifdef::website[] +include::stable-hcl.txt[] +endif::website[] + +ifndef::website[] +Refer to the link:http://www.networkupstools.org/stable-hcl.html[online HCL]. +endif::website[] + + +Appendix E: Documentation +========================= + +include::documentation.txt[] + + +[[Support_Request]] +Appendix F: Support instructions +================================ + +include::support.txt[] + + +[[Cables_information]] +Appendix G: Cables information +============================== + +include::cables.txt[] + + +[[Configure_options]] +Appendix H: Configure options +============================= + +include::configure.txt[] + + +[[Upgrading_notes]] +Appendix I: Upgrading notes +=========================== + +include::../UPGRADING[] + + +[[Project_History]] +Appendix J: Project history +=========================== + +include::history.txt[] diff --git a/docs/website/Makefile.am b/docs/website/Makefile.am new file mode 100644 index 0000000..5be8085 --- /dev/null +++ b/docs/website/Makefile.am @@ -0,0 +1,126 @@ +# FIXME: do we really have to distribute these many Kb too? +# RCS should be enough, and website generation should use +# source from subversion tags! +EXTRA_DIST = news.txt projects.txt website.txt \ + ups-protocols.txt $(LAYOUT).conf $(SCRIPT_FILES) $(LAYOUT_FILES) \ + $(FAVICON_FILES) + +IMAGE_FILES = images/asciidoc.png \ + images/eaton-logo.png \ + images/blue-arrow.png \ + images/simple.png \ + images/advanced.png \ + images/bigbox.png \ + images/bizarre.png \ + images/note.png \ + images/warning.png + +FAVICON_FILES = faviconut.ico faviconut.png + +LAYOUT_FILES = css/ie-overrides.css \ + css/web-layout.css \ + css/xhtml11-quirks.css \ + css/xhtml11.css + +SCRIPT_FILES = scripts/filter_png.js \ + scripts/jquery.js \ + scripts/nut_jquery.js \ + scripts/toc.js + +WEBSITE_FILES = index.html projects.html stable-hcl.html \ + documentation.html acknowledgements.html features.html \ + ups-protocols.html \ + cables.html nut-qa.html download.html support.html + +WEBSITE_DEPS = ../user-manual.chunked ../packager-guide.chunked \ + ../FAQ.html ../developer-guide.chunked \ + ../user-manual.pdf \ + ../developer-guide.pdf \ + ../packager-guide.pdf \ + ../FAQ.pdf ../man/man-index.html + +# CSS based simulated frames layout. +LAYOUT = web-layout + +# Add --unsafe to allow includes on older versions of asciidoc ( < 8.5.3 ): +ASCIIDOC_PARAMS = --unsafe --backend=xhtml11 \ + --conf-file=$(srcdir)/$(LAYOUT).conf \ + --attribute icons \ + --attribute iconsdir=$(srcdir)/images \ + --attribute scriptsdir=$(srcdir)/scripts \ + --attribute=badges \ + --attribute=website \ + --attribute=revision=$(PACKAGE_VERSION) \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute=date="`TZ=UTC date`" + +all: + +OUTDIR = output +$(WEBSITE_FILES): $(LAYOUT).conf + +images/: + $(MKDIR_P) images + +$(IMAGE_FILES): images/ + cp -f ../$@ images/ + + +if HAVE_ASCIIDOC +website: $(WEBSITE_FILES) $(WEBSITE_DEPS) $(IMAGE_FILES) $(SCRIPT_FILES) \ + $(LAYOUT_FILES) scripts/ups_data.js ../stable-hcl.txt ../ups-html.txt \ + $(OUTDIR) $(FAVICON_FILES) + +else !HAVE_ASCIIDOC +website: + @echo "Not building website since 'asciidoc' was not found." +endif !HAVE_ASCIIDOC + +.PHONY: website $(OUTDIR) + +$(OUTDIR): + $(RM) -r $(OUTDIR) + $(MKDIR_P) $(OUTDIR)/docs/man + cp -fR $(WEBSITE_FILES) css images scripts $(OUTDIR) + cp -fR $(WEBSITE_DEPS) $(OUTDIR)/docs/ + cp -f ../man/man-index.html $(OUTDIR)/docs/man/ + cp -f ../man/*.html $(OUTDIR)/docs/man/ + +clean-local: + rm -rf $(WEBSITE_FILES) $(OUTDIR) images/ + +SUFFIXES = .txt .html + +index.html: website.txt news.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a index-only $< + +acknowledgements.html: ../acknowledgements.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +features.html: ../features.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +cables.html: ../cables.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +download.html: ../download.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +documentation.html: ../documentation.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +projects.html: projects.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +support.html: ../support.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +nut-qa.html: ../nut-qa.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +stable-hcl.html: ../stable-hcl.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a hcl $< + +.txt.html: + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< diff --git a/docs/website/Makefile.in b/docs/website/Makefile.in new file mode 100644 index 0000000..ad40ad9 --- /dev/null +++ b/docs/website/Makefile.in @@ -0,0 +1,538 @@ +# Makefile.in generated by automake 1.11.1 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. +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = docs/website +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nut_arg_with.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libgd.m4 \ + $(top_srcdir)/m4/nut_check_libhal.m4 \ + $(top_srcdir)/m4/nut_check_libneon.m4 \ + $(top_srcdir)/m4/nut_check_libnetsnmp.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 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ + $(top_srcdir)/m4/nut_report_feature.m4 \ + $(top_srcdir)/m4/nut_type_socklen_t.m4 \ + $(top_srcdir)/configure.in +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 = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +ASCIIDOC = @ASCIIDOC@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFPATH = @CONFPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ +DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ +DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ +DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ +HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ +HAL_FDI_PATH = @HAL_FDI_PATH@ +HAL_USER = @HAL_USER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBGD_CFLAGS = @LIBGD_CFLAGS@ +LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ +LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ +LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ +LIBS = @LIBS@ +LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NETLIBS = @NETLIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OS_NAME = @OS_NAME@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +RUN_AS_GROUP = @RUN_AS_GROUP@ +RUN_AS_USER = @RUN_AS_USER@ +SED = @SED@ +SERLIBS = @SERLIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STATEPATH = @STATEPATH@ +STRIP = @STRIP@ +SUN_LIBUSB = @SUN_LIBUSB@ +VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cgiexecdir = @cgiexecdir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverexecdir = @driverexecdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +hotplugdir = @hotplugdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +udevdir = @udevdir@ + +# FIXME: do we really have to distribute these many Kb too? +# RCS should be enough, and website generation should use +# source from subversion tags! +EXTRA_DIST = news.txt projects.txt website.txt \ + ups-protocols.txt $(LAYOUT).conf $(SCRIPT_FILES) $(LAYOUT_FILES) \ + $(FAVICON_FILES) + +IMAGE_FILES = images/asciidoc.png \ + images/eaton-logo.png \ + images/blue-arrow.png \ + images/simple.png \ + images/advanced.png \ + images/bigbox.png \ + images/bizarre.png \ + images/note.png \ + images/warning.png + +FAVICON_FILES = faviconut.ico faviconut.png +LAYOUT_FILES = css/ie-overrides.css \ + css/web-layout.css \ + css/xhtml11-quirks.css \ + css/xhtml11.css + +SCRIPT_FILES = scripts/filter_png.js \ + scripts/jquery.js \ + scripts/nut_jquery.js \ + scripts/toc.js + +WEBSITE_FILES = index.html projects.html stable-hcl.html \ + documentation.html acknowledgements.html features.html \ + ups-protocols.html \ + cables.html nut-qa.html download.html support.html + +WEBSITE_DEPS = ../user-manual.chunked ../packager-guide.chunked \ + ../FAQ.html ../developer-guide.chunked \ + ../user-manual.pdf \ + ../developer-guide.pdf \ + ../packager-guide.pdf \ + ../FAQ.pdf ../man/man-index.html + + +# CSS based simulated frames layout. +LAYOUT = web-layout + +# Add --unsafe to allow includes on older versions of asciidoc ( < 8.5.3 ): +ASCIIDOC_PARAMS = --unsafe --backend=xhtml11 \ + --conf-file=$(srcdir)/$(LAYOUT).conf \ + --attribute icons \ + --attribute iconsdir=$(srcdir)/images \ + --attribute scriptsdir=$(srcdir)/scripts \ + --attribute=badges \ + --attribute=website \ + --attribute=revision=$(PACKAGE_VERSION) \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute=date="`TZ=UTC date`" + +OUTDIR = output +SUFFIXES = .txt .html +all: all-am + +.SUFFIXES: +.SUFFIXES: .txt .html +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/website/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/website/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-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 +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir 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 \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am + + +all: +$(WEBSITE_FILES): $(LAYOUT).conf + +images/: + $(MKDIR_P) images + +$(IMAGE_FILES): images/ + cp -f ../$@ images/ + +@HAVE_ASCIIDOC_TRUE@website: $(WEBSITE_FILES) $(WEBSITE_DEPS) $(IMAGE_FILES) $(SCRIPT_FILES) \ +@HAVE_ASCIIDOC_TRUE@ $(LAYOUT_FILES) scripts/ups_data.js ../stable-hcl.txt ../ups-html.txt \ +@HAVE_ASCIIDOC_TRUE@ $(OUTDIR) $(FAVICON_FILES) + +@HAVE_ASCIIDOC_FALSE@website: +@HAVE_ASCIIDOC_FALSE@ @echo "Not building website since 'asciidoc' was not found." + +.PHONY: website $(OUTDIR) + +$(OUTDIR): + $(RM) -r $(OUTDIR) + $(MKDIR_P) $(OUTDIR)/docs/man + cp -fR $(WEBSITE_FILES) css images scripts $(OUTDIR) + cp -fR $(WEBSITE_DEPS) $(OUTDIR)/docs/ + cp -f ../man/man-index.html $(OUTDIR)/docs/man/ + cp -f ../man/*.html $(OUTDIR)/docs/man/ + +clean-local: + rm -rf $(WEBSITE_FILES) $(OUTDIR) images/ + +index.html: website.txt news.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a index-only $< + +acknowledgements.html: ../acknowledgements.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +features.html: ../features.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +cables.html: ../cables.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +download.html: ../download.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +documentation.html: ../documentation.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +projects.html: projects.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a toc $< + +support.html: ../support.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +nut-qa.html: ../nut-qa.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +stable-hcl.html: ../stable-hcl.txt + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ -a hcl $< + +.txt.html: + $(ASCIIDOC) $(ASCIIDOC_PARAMS) -o $@ $< + +# 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. +.NOEXPORT: diff --git a/docs/website/css/ie-overrides.css b/docs/website/css/ie-overrides.css new file mode 100644 index 0000000..f21c9c5 --- /dev/null +++ b/docs/website/css/ie-overrides.css @@ -0,0 +1,7 @@ +#layout-content-box { + margin-left: 207px; +} + +#support-level-legend { width: 400px; } +#support-level-legend ul { margin: 0; } +.support-level-descr { float: none; } \ No newline at end of file diff --git a/docs/website/css/web-layout.css b/docs/website/css/web-layout.css new file mode 100644 index 0000000..9ebd1db --- /dev/null +++ b/docs/website/css/web-layout.css @@ -0,0 +1,136 @@ +body { + margin: 0; + font-size: 0.9em; + background-color: #f4f4f4; +} + +#layout-banner-box { + width: 100%; + height: 110px; + z-index: 2; + background-color: #0067cd; +} + +#layout-menu-box { + float: left; + height: 100%; + z-index: 1; +} + +#layout-content-box { + border-left: 3px solid #eeeeee; + background-color: white; + overflow-y: auto; +} + +h1 { + margin-top: 0.5em; +} + +#layout-banner { + color: white; + font-family: sans-serif; + text-align: left; + padding: 0.8em 20px; +} + +#layout-title { + font-family: monospace; + font-size: 3.5em; + font-weight: bold; + letter-spacing: 0.2em; + margin: 0; +} + +#layout-description { + font-size: 1.2em; + letter-spacing: 0.1em; +} + +#sponsor { + clear: both; + font-size: small; + margin-top: 50px; + margin-bottom: 10px; + color:#0067CD; + font-weight:bold; +} + +#sponsor span { margin-left: 10px; } +#sponsor img { border: 0; } + +#layout-menu { + padding-top: 0.8em; + padding-left: 20px; + margin-left: 0; + font-size: 1.0em; + font-family: sans-serif; + font-weight: bold; + list-style: none; + list-style-image: url(../images/blue-arrow.png) +} +#layout-menu li { margin-left: 10px; } +#layout-menu a { + line-height: 2em; + margin-left: 0.5em; +} +#layout-menu a:link, #layout-menu a:visited, #layout-menu a:hover { + color: #0067cd; + text-decoration: none; +} +#layout-menu a:hover { + color: navy; + text-decoration: none; +} +#layout-menu #page-source { + border-top: 2px solid silver; + margin-top: 0.2em; +} + +#layout-content { + padding-top: 0.2em; + padding-left: 1.0em; + padding-right: 0.4em; +} + +@media print { + #layout-banner-box { display: none; } + #layout-menu-box { display: none; } + #layout-content-box { margin-top: 0; margin-left: 0; } +} + + +#ups_list +{ + margin: 20px 0 0 0; width: 100%; + border-collapse: collapse; +} +#ups_list td { border: 1px solid silver; } +#ups_list thead { font-weight: bold; background: #bbb; } +#ups_list .odd { background: #eee; } +#ups_list .even { background: #ddd; } +.filter { min-width: 100px; } + +td#manufacturer-col { width: 20%; } +td#model-col { width: 50%; } +td#driver-col { width: 30%; } + +.blue { background-color: #cfd9fe; } +.green { background-color: #b1fea7; } +.yellow { background-color: #fdf88e; } +.orange { background-color: #fccb81; } +.red { background-color: #ffa4a4; } + +.hidden { display: none; } + +#filters-set, #filters-set fieldset { display: none; border: 1px solid silver; padding: 10px; } +#filters-set legend { font-weight: bold; } +#filters-set td { border: 0; } +#filters-set fieldset { display: block; } +#filters-set select { max-width: 200px } + +#support-level-legend { width: 31.25em; float: right; margin-right: 10px; padding: 10px; } +#support-level-legend dt { margin: 0; padding: 0; width: 15%; float: left; } +#support-level-legend dd { margin: 0; padding: 0; width: 85%; float: left; } + +/*.support-level-descr { margin-left: 20px; float: right; }*/ diff --git a/docs/website/css/xhtml11-quirks.css b/docs/website/css/xhtml11-quirks.css new file mode 100644 index 0000000..16e4015 --- /dev/null +++ b/docs/website/css/xhtml11-quirks.css @@ -0,0 +1,41 @@ +/* Workarounds for IE6's broken and incomplete CSS2. */ + +div.sidebar-content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} +div.sidebar-title, div.image-title { + color: #527bbd; + font-family: sans-serif; + font-weight: bold; + margin-top: 0.0em; + margin-bottom: 0.5em; +} + +div.listingblock div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock-content { + white-space: pre; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; +} + +div.exampleblock-content { + border-left: 2px solid silver; + padding-left: 0.5em; +} + +/* IE6 sets dynamically generated links as visited. */ +div#toc a:visited { color: blue; } diff --git a/docs/website/css/xhtml11.css b/docs/website/css/xhtml11.css new file mode 100644 index 0000000..1e6bf5a --- /dev/null +++ b/docs/website/css/xhtml11.css @@ -0,0 +1,333 @@ +/* Debug borders */ +p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { +/* + border: 1px solid red; +*/ +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; + color: navy; +} + +strong { + font-weight: bold; + color: #083194; +} + +tt { + color: navy; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + font-family: sans-serif; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1, h2, h3 { + border-bottom: 2px solid silver; +} +h2 { + padding-top: 0.5em; +} +h3 { + float: left; +} +h3 + * { + clear: left; +} + +div.sectionbody { + font-family: serif; + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +ul, ol, li > p { + margin-top: 0; +} + +pre { + padding: 0; + margin: 0; +} + +span#author { + color: #527bbd; + font-family: sans-serif; + font-weight: bold; + font-size: 1.1em; +} +span#email { +} +span#revnumber, span#revdate, span#revremark { + font-family: sans-serif; +} + +div#footer { + font-family: sans-serif; + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +div#footer-text { + float: left; + padding-bottom: 0.5em; +} +div#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +div#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.tableblock, div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.5em; + margin-bottom: 2.5em; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + color: #527bbd; + font-family: sans-serif; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > div.content { + white-space: pre; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 2px solid silver; +} + +div.exampleblock > div.content { + border-left: 2px solid silver; + padding: 0.5em; +} + +div.imageblock div.content { padding-left: 0; } +span.image img { border-style: none; } +a.image:visited { color: white; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: navy; +} +dd > *:first-child { + margin-top: 0.1em; +} + +ul, ol { + list-style-position: outside; +} +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { + list-style-type: lower-alpha; +} +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +div.tableblock > table { + border: 3px solid #527bbd; +} +thead { + font-family: sans-serif; + font-weight: bold; +} +tfoot { + font-weight: bold; +} +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hdlist tr { + padding-bottom: 15px; +} +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: navy; +} +td.hdlist2 { + vertical-align: top; +} +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} + +@media print { + div#footer-badges { display: none; } +} + +div#toctitle { + color: #527bbd; + font-family: sans-serif; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} +div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} +div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} +div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} diff --git a/docs/website/faviconut.ico b/docs/website/faviconut.ico new file mode 100644 index 0000000000000000000000000000000000000000..26cf6cb015fa73307a39ae107c2fc622d8e444af GIT binary patch literal 1150 zcmZ{iYe-XJ7{^~JiXv0!f>dS^rlyHv&P{Wrq|OWFQk1#Wvb33(&9*aST1skOBPA`g z&`i=?p-CZ5ZJ1_dHl>SQ$PX4+5M~$p;0N>Hdya06rSIW?9^UtPe*for4~Gyd`q>NkI{KBJm*2uQ&Qw@@x;`QQ0K(^f}Z+ z2B;rD1EYTkM%Tl6C|b4HAA96Gty{}_7?;t{SCaHd^!~&alV4|88M)nR5Iin5myg z)DIxz!vyCOqCNwKzMs2?@_r|>w6`I@-Uw$;L7q7un9ls>#TrV+wXKV^6a@`w_#mVQ-MMTIe6Jg7V8OdCbjP<>ux&D)X;S*WZ1Ks+JLx)WzCAvW%Px zTC;|&v;2S9JtvyW&em)=DAjycmv!Q7N#n1AlA88zoz9DLtBmZD{DKdi&xU?uF^ya= nlfSVKjqG9rt62v^W^4%gv67Gpdb9sT&)FPXGrNzFxdrYoQgJs0 literal 0 HcmV?d00001 diff --git a/docs/website/faviconut.png b/docs/website/faviconut.png new file mode 100644 index 0000000000000000000000000000000000000000..d4746ad3d58042bd5f0014d99a331a6fad0d8fd1 GIT binary patch literal 814 zcmV+}1JV46P) zK~y-)ebY~96lWO6@$WmE&CF)A`KK{iX%g*jHFhP5Rt;zl#gIS|YEBkWaw@cto6!bI#JFZ>cQZSa-I;fKX|^V6UwBXN^L*g< z@IC^-^E}p`_Hej9;P>sf%IheMq^2kOx;w*fq*hqMe>1wH z_gw$Lz%*d{1l|V$*F&5=bu#)%mG!WR{d^iQeFE=2VED+< z(5@DBu5V|oQIX3yX0`%YxkWOI1+I>#ucU3|SYqaHH#I-+R=t}^%{&|H-m$0AF;Xb5 zjbi@?2-_xzgW{MYOSxh-@GEdvSt;oLv}4b{j)p$RNaJK*;xk`UqbyOQEP<2bVPb(o zsYKo8W}=anVPFA3`FG+Qqs^h?O*KBAq!y@>HUWPLPdL;CB~yBi*XtWdWlg$vZz8g- zRSo!kvH}2|wkG<`Wrw*&n9UTqlQ6g(&!G7|lAfOfU&r_}FKJpABob|lmNUn%*4A9n3~I;|LakPVo?x{wxFs3%px2* z+>NGHDkoVKd#N(Tg*!G1;`h`vY=D~%l0UhJ){IF;lbUf zQ%PNquZjS0*m7Y~VQrC;^;qd1< zqjYuOmy!OhovpZ1P%cX*Cw1cYp52d+Cl4ldJzx1?|Feyu+K@Wf)D-;Aksj$(b||Uq s#kJeW3h=Sp)AQMZuI-W7hu#4G0eF~S)4}{QiU0rr07*qoM6N<$f?yqpLI3~& literal 0 HcmV?d00001 diff --git a/docs/website/news.txt b/docs/website/news.txt new file mode 100644 index 0000000..95da757 --- /dev/null +++ b/docs/website/news.txt @@ -0,0 +1,9 @@ +- January 14, 2011: 2.6.0 released +- December 24, 2010: 2.6.0-pre1 released +- December 16, 2010: link:http://www.lestat.st/en/informatique/projets/nut-monitor[NUT-Monitor] 1.3 released +- July 22, 2010: new client link:http://www.revpol.com/xymon_nut_scripts[Hobbit (Xymon) monitor plugin] +- July 2, 2010: link:http://knut.prynych.cz[KNutClient] 1.0.3 and link update +- May 12, 2010: link:http://www.lestat.st/informatique/projets/nut-monitor-en[NUT-Monitor] 1.2 released +- March 22, 2010: link:http://knut.prynych.cz[KNutClient] 1.0 +- February 23, 2010: 2.4.3 released +- February 19, 2010: 2.4.2 released diff --git a/docs/website/projects.txt b/docs/website/projects.txt new file mode 100644 index 0000000..afba115 --- /dev/null +++ b/docs/website/projects.txt @@ -0,0 +1,187 @@ +Related projects +================ + +There are many programs and devices that integrate NUT support. + +This page tries to track them. + +Graphical desktop clients +------------------------- + +link:http://sourceforge.net/projects/gknut/[GKrellM NUT] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Simple UPS monitoring plugin for GKrellM. Uses NUT (Network UPS Tools) for UPS connection. + +link:http://knut.prynych.cz[KNutClient] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +KNutClient is a visual client for NUT. + +link:http://www.lestat.st/en/informatique/projets/nut-monitor[NUT-Monitor] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NUT-Monitor is a graphical application to monitor and manage UPSes connected to +a NUT server. This application is written in Python and PyGTK, and uses the <> class. + +NOTE: NUT-Monitor is part of NUT since version NUT 2.4.1. +It will further evolve toward the NUT Control Center. + +link:http://download.mgeops.com/explore/eng/ptp/ptp_sol.htm?sol=PSP[Eaton - Personal Solution Pac] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +NUT configuration and monitoring software for Eaton (previously MGE Office Protection Systems) units. + +link:http://www.amautacorp.com/staff/Rudd-O/ups-monitor/[UPS Monitor] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Multi-threaded python/GTK2 graphical monitoring application. + +link:http://sourceforge.net/projects/winnutclient[Windows NUT client] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Windows NUT client is a partial port of KNutClient to Windows using +link:http://www.autoitscript.com[AUTOIT] scripting language. + +link:http://csociety.ecn.purdue.edu/~delpha/winnut/[WinNUT] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +WinNUT is a partial port of the client side of Network UPS Tools (NUT) to Windows. + +link:http://wmnut.mgeops.org/[WMNUT] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +WMNut is a program to monitor multiple UPSs statistics through the NUT (Network +UPS Tools) framework on Linux and other systems. + +Network Management Systems (NMS) integration +-------------------------------------------- + +link:http://bigsister.graeff.com/[Big Sister system and network monitor] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The "nut" module monitors uninterruptible power supplies under control of the +NUT (Network UPS Tools) free software suite. +It sends alerts on power outages, overload and battery problems. The longterm +graphing may point you to battery aging problems. + +link:http://cacti.net[Cacti monitoring tool] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are three different scripts that add NUT support to Cacti: + +- link:http://forums.cacti.net/about19250.html[PHP script] +- link:http://forums.cacti.net/about14475.html[Ruby script] +- link:http://forums.cacti.net/about9729.html[shell script] + +link:http://collectd.org[collectd] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The `collectd` system statistics collection daemon features a +link:http://collectd.org/wiki/index.php/Plugin:NUT[NUT plugin] to +collect statistics from UPSes. + +link:http://xymon.sourceforge.net/[Xymon (Hobbit) monitor] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A link:http://www.revpol.com/xymon_nut_scripts[NUT plugin] is available. + +link:http://monami.sourceforge.net[MonAMI NUT plugin] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A plugin to return UPS status to the MonAMI universal sensor framework. + +link:http://munin.projects.linpro.no[Munin NUT plugin] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A link:http://muninexchange.projects.linpro.no/?search&cid=0&pid=136&phid=279[NUT plugin] is available. + +link:http://www.nagios.org/[Nagios plugin] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The link:http://sourceforge.net/projects/nagiosplug/[check_ups] plugin returns +UPS status to the Nagios monitoring system using NUT. + +Configuration GUIs +------------------ + +link:http://www.knut.noveradsl.cz/knutsetting/index.html[KNutSetting] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +KNutSetting is a visual KDE tool for configuring NUT - Network UPS Tools. + +Other software projects +----------------------- + +link:http://www.the-mcdonalds.org/Nut-Graph/[Nut-Graph] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +PHP4 / GD / MySQL / jpgraph package to visualize logged UPS status data. + +[[PyNUT]] +link:http://www.lestat.st/informatique/projets/pynut-en[PyNUT] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +PyNUT is an abstraction class written in Python to access NUT (Network UPS +Tools) server and execute commands without needing to know the communication protocol. + +link:http://bugs.debian.org/343530[RRDtool logging support] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This patch adds link:http://oss.oetiker.ch/rrdtool[RRDtool] logging support to NUT. + +link:http://home.tele2.fr/elrik/[ups_control] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A developing Python wrapper to upsc which can generate mails and shutdown the machine. + +link:http://search.cpan.org/search?dist=ups-nut[UPS::Nut] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A Perl module to talk to an UPS via NUT (Network UPS Tools) upsd. + + +Hardware projects involving NUT +------------------------------- + +link:http://www.opengear.com/UPS.html[OpenGear] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Opengear provides an advanced NUT integration into many models. +There is also a link:http://www.opengear.com/Videos/Network-UPS-Tools/Network-UPS-Tools.html[video presentation] of the NUT integration. + +For more information on Opengear's contributions to NUT, have a look at the +link:acknowledgements.html[acknowledgements information]. + +Synology +~~~~~~~~ + +link:http://www.synology.com[Synology] has worked closely with Arnaud to integrate +link:http://www.synology.com/enu/products/features/power.php[UPS support] on all +its devices. + +Alcatel Lucent IPBX +~~~~~~~~~~~~~~~~~~~ + +Alcatel has been working for years with us (Patrick Agrain and Arnaud) to improve +NUT integration into some of their IPBX. + +link:http://www.readynas.com/?page_id=92[Netgear ReadyNAS] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The RAIDiator firmware for the ReadyNAS product line includes NUT to either +monitor a local USB UPS, or to connect as a slave to a NUT server. + +link:http://www.webbastards.com/projects/[lcd-nut] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A Project to display the status of a UPS on computer through one of the many +cheap LCD matrix displays available on the market. + +Notes +------- + +- Client authors: send updates on your releases to the NUT users mailing list. +We will also put a link to you in the news section of the top page when things change. + +- If you know of a project which should be listed, please send in the URL. diff --git a/docs/website/scripts/filter_png.js b/docs/website/scripts/filter_png.js new file mode 100644 index 0000000..eb54390 --- /dev/null +++ b/docs/website/scripts/filter_png.js @@ -0,0 +1,14 @@ +$(function() +{ + var imgs = $("img"); + for(var i = 0; i < imgs.length; i++) + { + var img = $(imgs[i]); + if(img.attr("src").match(/\.png$/i)) + { + img.replaceWith( + "
    " + ); + } + } +}); \ No newline at end of file diff --git a/docs/website/scripts/jquery.js b/docs/website/scripts/jquery.js new file mode 100644 index 0000000..b1ae21d --- /dev/null +++ b/docs/website/scripts/jquery.js @@ -0,0 +1,19 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

    ";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
    ";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/docs/website/scripts/nut_jquery.js b/docs/website/scripts/nut_jquery.js new file mode 100644 index 0000000..fb4a66d --- /dev/null +++ b/docs/website/scripts/nut_jquery.js @@ -0,0 +1,422 @@ +var NUT = +{ + // UPS table DOM ids + listID: "#ups_list", + listBodyID: "#ups_list_body", + + // Field names + fields: + [ + "manufacturer", + "device-type", + "support-level", + "model", + "comment", + "driver" + ], + + // Actual HTML table columns + columns: + [ + ["manufacturer"], + ["model","comment"], + ["driver"], + ["support-level"], + ], + + // driver => connection type mappings + driverMap: function(driver) + { + if(driver.match(/bcmxcp_usb|blazer_usb|richcomm_usb|tripplite_usb|usbhid-ups/)) + return "USB"; + + if(driver.match(/snmp-ups|netxml-ups/)) + return "Network"; + + return "Serial"; + }, + + // Support level => CSS class mappings + supportLevelClasses: + { + 0: "", + 1: "red", + 2: "orange", + 3: "yellow", + 4: "blue", + 5: "green" + }, + + tableCache: false, + + // Parse GET parameters from window url and return them as a hash + // The call format is: + // stable-hcl.html?= + // Refer to docs/website/stable-hcl.txt for examples + parseGetParameters: function() + { + var url = window.location.href; + url = url.replace(/#$/, ""); + var fieldPos = url.indexOf("?"); + var get = {}; + if(fieldPos > -1) + { + var fileName = url.substring(0, fieldPos); + var getList = url.substring(fieldPos + 1).split("&"); + for(var i = 0; i
    + + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-9664272-1']); + _gaq.push(['_trackPageview']); - - + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + + endif::analytics[] diff --git a/drivers/Makefile.in b/drivers/Makefile.in index 841c3e6..80e5e13 100644 --- a/drivers/Makefile.in +++ b/drivers/Makefile.in @@ -68,7 +68,6 @@ DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ diff --git a/drivers/apc-hid.c b/drivers/apc-hid.c index c902462..f76621f 100644 --- a/drivers/apc-hid.c +++ b/drivers/apc-hid.c @@ -146,16 +146,38 @@ static usage_lkp_t apc_usage_lkp[] = { { "APCProbe1", 0xff860007 }, { "APCProbe2", 0xff860008 }, { "APCBattReplaceDate", 0xff860016 }, + /* usage seen in dumps but unknown: + * - ff860018 + * Path: UPS.Battery.ff860018, Type: Feature, ReportID: 0x48, Offset: 0, Size: 32, Value: 0 + */ { "APCBattCapBeforeStartup", 0xff860019 }, /* FIXME: exploit */ + /* usage seen in dumps but unknown: + * - ff86001a + * Path: UPS.Battery.ff86001a, Type: Input, ReportID: 0x1b, Offset: 0, Size: 8, Value: 3 + * Path: UPS.Battery.ff86001a, Type: Feature, ReportID: 0x1b, Offset: 0, Size: 8, Value: 3 + * - ff86001b + * Path: UPS.Battery.ff86001b, Type: Input, ReportID: 0x1c, Offset: 0, Size: 8, Value: 0 + * Path: UPS.Battery.ff86001b, Type: Feature, ReportID: 0x1c, Offset: 0, Size: 8, Value: 0 + * - ff860023 + * Path: UPS.ff860001.ff860023, Type: Feature, ReportID: 0x60, Offset: 0, Size: 16, Value: 0 + * - ff860024 + * Path: UPS.Battery.ff860024, Type: Feature, ReportID: 0x47, Offset: 0, Size: 8, Value: 245 + * Path: UPS.PowerConverter.ff860024, Type: Feature, ReportID: 0x51, Offset: 0, Size: 8, Value: 145 + * - ff860025 + * Path: UPS.ff860001.ff860025, Type: Feature, ReportID: 0x62, Offset: 0, Size: 32, Value: 0 + * - ff860026 + * Path: UPS.ff860001.ff860026, Type: Feature, ReportID: 0x61, Offset: 0, Size: 8, Value: 10 + * - ff860027 + * Path: UPS.ff860027, Type: Feature, ReportID: 0x3e, Offset: 0, Size: 32, Value: 0 + * - ff860028 + * Path: UPS.ff860028, Type: Feature, ReportID: 0x3f, Offset: 0, Size: 32, Value: 0 + * - ff860030 + * Path: UPS.Output.ff860030, Type: Feature, ReportID: 0x42, Offset: 0, Size: 16, Value: 5.8 + */ { "APC_UPS_FirmwareRevision", 0xff860042 }, { "APCLineFailCause", 0xff860052 }, { "APCStatusFlag", 0xff860060 }, { "APCSensitivity", 0xff860061 }, - /* usage seen in dumps but unknown: - * - ff860027, ff860028 - * Path: UPS.ff860027, Type: Feature, ReportID: 0x3e, Offset: 0, - * Size: 32, Value:0.000000 - */ { "APCPanelTest", 0xff860072 }, /* FIXME: exploit */ { "APCShutdownAfterDelay", 0xff860076 }, /* FIXME: exploit */ { "APC_USB_FirmwareRevision", 0xff860079 }, /* FIXME: exploit */ @@ -164,14 +186,24 @@ static usage_lkp_t apc_usage_lkp[] = { { "APCDelayBeforeStartup", 0xff86007e }, /* FIXME: exploit */ /* usage seen in dumps but unknown: * - ff860080 - * Path: UPS.PresentStatus.ff860080, Type: Input, ReportID: 0x33, - * Offset: 12, Size: 1, Value: 0.000000 - * - ff86001a - * Path: UPS.Battery.ff86001a, Type: Input, ReportID: 0x1b, - * Offset: 0, Size: 8, Value: 3.000000 - * - ff86001b - * Path: UPS.Battery.ff86001b, Type: Input, ReportID: 0x1c, - * Offset: 0, Size: 8, Value: 0.000000 + * Path: UPS.PresentStatus.ff860080, Type: Input, ReportID: 0x33, Offset: 12, Size: 1, Value: 0 + * Path: UPS.PresentStatus.ff860080, Type: Feature, ReportID: 0x33, Offset: 12, Size: 1, Value: 0 + * Path: UPS.PowerSummary.PresentStatus.ff860080, Type: Input, ReportID: 0x07, Offset: 12, Size: 1, Value: 0 + * Path: UPS.PowerSummary.PresentStatus.ff860080, Type: Feature, ReportID: 0x07, Offset: 12, Size: 1, Value: 0 + * - ff860090, ff860091 + * Path: UPS.ff860090.ff860091, Type: Feature, ReportID: 0x8c, Offset: 0, Size: 8, Value: 1.000000 + * - ff860092 + * Path: UPS.ff860090.ff860092, Type: Feature, ReportID: 0x8d, Offset: 0, Size: 8, Value: 25.000000 + * - ff860093 + * Path: UPS.ff860090.ff860093, Type: Feature, ReportID: 0x8e, Offset: 0, Size: 8, Value: 83.000000 + * - ff860094 + * Path: UPS.ff860090.ff860094, Type: Feature, ReportID: 0x8f, Offset: 0, Size: 8, Value: 0.000000 + * - ff860095 + * Path: UPS.ff860090.ff860095, Type: Feature, ReportID: 0x90, Offset: 0, Size: 8, Value: 1.000000 + * - ff860096 + * Path: UPS.ff860090.ff860096, Type: Feature, ReportID: 0x91, Offset: 0, Size: 16, Value: 4.000000 + * - ff860097 + * Path: UPS.ff860090.ff860097, Type: Feature, ReportID: 0x92, Offset: 0, Size: 16, Value: 4.000000 */ /* Note (Arnaud): BUP stands for BackUPS Pro @@ -269,12 +301,12 @@ static hid_info_t apc_hid2nut[] = { { "ups.timer.start", 0, 0, "UPS.APCGeneralCollection.APCDelayBeforeStartup", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL}, { "ups.timer.shutdown", 0, 0, "UPS.APCGeneralCollection.APCDelayBeforeShutdown", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL}, { "ups.timer.reboot", 0, 0, "UPS.APCGeneralCollection.APCDelayBeforeReboot", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL}, - { "ups.test.result", 0, 0, "UPS.Battery.Test", NULL, "%s", 0, test_read_info }, { "ups.beeper.status", 0, 0, "UPS.PowerSummary.AudibleAlarmControl", NULL, "%s", 0, beeper_info }, { "ups.mfr.date", 0, 0, "UPS.ManufacturerDate", NULL, "%s", 0, date_conversion }, { "ups.mfr.date", 0, 0, "UPS.PowerSummary.ManufacturerDate", NULL, "%s", 0, date_conversion }, /* Back-UPS 500 */ - { "ups.realpower.nominal", 0, 0, "UPS.PowerConverter.ConfigActivePower", NULL, "%.0f", 0, NULL }, + { "ups.realpower.nominal", 0, 0, "UPS.PowerConverter.ConfigActivePower", NULL, "%.0f", 0, NULL }, + { "ups.realpower.nominal", 0, 0, "UPS.Output.ConfigActivePower", NULL, "%.0f", 0, NULL }, /* the below one need to be discussed as we might need to complete * the ups.test sub collection @@ -306,13 +338,18 @@ static hid_info_t apc_hid2nut[] = { /* Input page */ { "input.voltage", 0, 0, "UPS.Input.Voltage", NULL, "%.1f", 0, NULL }, { "input.voltage.nominal", 0, 0, "UPS.Input.ConfigVoltage", NULL, "%.0f", 0, NULL }, + { "input.transfer.low", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.Output.LowVoltageTransfer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + { "input.transfer.high", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.Output.HighVoltageTransfer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + /* used by APC BackUPS RS */ { "input.transfer.low", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.Input.LowVoltageTransfer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "input.transfer.high", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.Input.HighVoltageTransfer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "input.sensitivity", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.Input.APCSensitivity", NULL, "%s", HU_FLAG_SEMI_STATIC, apc_sensitivity_info }, - + /* Output page */ { "output.voltage", 0, 0, "UPS.Output.Voltage", NULL, "%.1f", 0, NULL }, { "output.voltage.nominal", 0, 0, "UPS.Output.ConfigVoltage", NULL, "%.1f", 0, NULL }, + { "output.current", 0, 0, "UPS.Output.Current", NULL, "%.2f", 0, NULL }, + { "output.frequency", 0, 0, "UPS.Output.Frequency", NULL, "%.1f", 0, NULL }, /* Environmental page */ { "ambient.temperature", 0, 0, "UPS.APCEnvironment.APCProbe1.Temperature", NULL, "%s", 0, kelvin_celsius_conversion }, @@ -352,7 +389,9 @@ static hid_info_t apc_hid2nut[] = { { "load.on.delay", 0, 0, "UPS.APCGeneralCollection.APCDelayBeforeStartup", NULL, DEFAULT_ONDELAY, HU_TYPE_CMD, NULL }, { "shutdown.stop", 0, 0, "UPS.APCGeneralCollection.APCDelayBeforeShutdown", NULL, "-1", HU_TYPE_CMD, NULL }, { "shutdown.reboot", 0, 0, "UPS.APCGeneralCollection.APCDelayBeforeReboot", NULL, "10", HU_TYPE_CMD, NULL }, - + /* used by APC BackUPS CS */ + { "shutdown.return", 0, 0, "UPS.Output.APCDelayBeforeReboot", NULL, "1", HU_TYPE_CMD, NULL }, + { "beeper.on", 0, 0, "UPS.PowerSummary.AudibleAlarmControl", NULL, "2", HU_TYPE_CMD, NULL }, { "beeper.off", 0, 0, "UPS.PowerSummary.AudibleAlarmControl", NULL, "3", HU_TYPE_CMD, NULL }, { "beeper.enable", 0, 0, "UPS.PowerSummary.AudibleAlarmControl", NULL, "2", HU_TYPE_CMD, NULL }, diff --git a/drivers/apcsmart.c b/drivers/apcsmart.c index aad21f8..f30f625 100644 --- a/drivers/apcsmart.c +++ b/drivers/apcsmart.c @@ -24,7 +24,7 @@ #include "apcsmart.h" #define DRIVER_NAME "APC Smart protocol driver" -#define DRIVER_VERSION "2.03" +#define DRIVER_VERSION "2.1" static upsdrv_info_t table_info = { "APC command table", @@ -38,8 +38,9 @@ static upsdrv_info_t table_info = { upsdrv_info_t upsdrv_info = { DRIVER_NAME, DRIVER_VERSION, - "Russell Kroll \n" \ - "Nigel Metheringham ", + "Russell Kroll \n" + "Nigel Metheringham \n" + "Michal Soltys ", DRV_STABLE, { &table_info, NULL } }; @@ -73,7 +74,7 @@ static apc_vartab_t *vartab_lookup_name(const char *var) /* FUTURE: change to use function pointers */ /* convert APC formatting to NUT formatting */ -static const char *convert_data(apc_vartab_t *cmd_entry, char *upsval) +static const char *convert_data(apc_vartab_t *cmd_entry, const char *upsval) { static char tmp[128]; int tval; @@ -178,6 +179,16 @@ static void alert_handler(char ch) ups_status |= APC_STAT_RB; break; + case '?': /* set OVER */ + upsdebugx(4, "alert_handler: OVER"); + ups_status |= APC_STAT_OVER; + break; + + case '=': /* clear OVER */ + upsdebugx(4, "alert_handler: not OVER"); + ups_status &= ~APC_STAT_OVER; + break; + default: upsdebugx(4, "alert_handler got 0x%02x (unhandled)", ch); break; @@ -252,8 +263,10 @@ static int query_ups(const char *var, int first) return 0; } - /* already known to not be supported? */ - if (vt->flags & APC_IGNORE) + /* + * not first run and already known to not be supported ? + */ + if (!first && !(vt->flags & APC_PRESENT)) return 0; /* empty the input buffer (while allowing the alert handler to run) */ @@ -278,11 +291,10 @@ static int query_ups(const char *var, int first) ser_comm_good(); - if ((ret < 1) || (!strcmp(temp, "NA"))) { /* not supported */ - vt->flags |= APC_IGNORE; + if ((ret < 1) || (!strcmp(temp, "NA"))) /* not supported */ return 0; - } + vt->flags |= APC_PRESENT; ptr = convert_data(vt, temp); dstate_setinfo(vt->name, "%s", ptr); @@ -293,7 +305,7 @@ static void do_capabilities(void) { const char *ptr, *entptr; char upsloc, temp[512], cmd, loc, etmp[16], *endtemp; - int nument, entlen, i, matrix, ret; + int nument, entlen, i, matrix, ret, valid; apc_vartab_t *vt; upsdebugx(1, "APC - About to get capabilities string"); @@ -324,7 +336,7 @@ static void do_capabilities(void) /* This should never happen since we only call this if the REQ_CAPABILITIES command is supported */ - upslogx(LOG_ERR, "ERROR: APC cannot do capabilites but said it could!"); + upslogx(LOG_ERR, "ERROR: APC cannot do capabilities but said it could!"); return; } @@ -333,8 +345,8 @@ static void do_capabilities(void) endtemp = &temp[0] + strlen(temp); if (temp[0] != '#') { - printf("Unrecognized capability start char %c\n", temp[0]); - printf("Please report this error [%s]\n", temp); + upsdebugx(1, "Unrecognized capability start char %c", temp[0]); + upsdebugx(1, "Please report this error [%s]", temp); upslogx(LOG_ERR, "ERROR: unknown capability start char %c!", temp[0]); @@ -377,9 +389,10 @@ static void do_capabilities(void) entptr = &ptr[4]; vt = vartab_lookup_char(cmd); + valid = vt && ((loc == upsloc) || (loc == '4')); /* mark this as writable */ - if (vt && ((loc == upsloc) || (loc == '4'))) { + if (valid) { upsdebugx(1, "Supported capability: %02x (%c) - %s", cmd, loc, vt->name); @@ -390,11 +403,10 @@ static void do_capabilities(void) } for (i = 0; i < nument; i++) { - snprintf(etmp, entlen + 1, "%s", entptr); - - if (vt && ((loc == upsloc) || (loc == '4'))) - dstate_addenum(vt->name, "%s", - convert_data(vt, etmp)); + if (valid) { + snprintf(etmp, entlen + 1, "%s", entptr); + dstate_addenum(vt->name, "%s", convert_data(vt, etmp)); + } entptr += entlen; } @@ -430,7 +442,6 @@ static int update_status(void) ups_status = strtol(buf, 0, 16) & 0xff; ups_status_set(); - status_commit(); dstate_dataok(); return 1; @@ -466,10 +477,6 @@ static void protocol_verify(unsigned char cmd) { int i, found; - /* we might not care about this one */ - if (strchr(CMD_IGN_CHARS, cmd)) - return; - /* see if it's a variable */ for (i = 0; apc_vartab[i].name != NULL; i++) { @@ -531,27 +538,28 @@ static int firmware_table_lookup(void) unsigned int i, j; char buf[SMALLBUF]; - upsdebugx(1, "Attempting firmware lookup"); + upsdebugx(1, "Attempting firmware lookup using command 'V'"); - ret = ser_send_char(upsfd, 'b'); + ret = ser_send_char(upsfd, 'V'); if (ret != 1) { - upslog_with_errno(LOG_ERR, "getbaseinfo: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "firmware_table_lookup: ser_send_char failed"); return 0; } ret = ser_get_line(upsfd, buf, sizeof(buf), ENDCHAR, IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); - /* see if this is an older version like an APC600 which doesn't - * response to 'a' or 'b' queries + /* + * Some UPSes support both 'V' and 'b'. As 'b' doesn't always return + * firmware version, we attempt that only if 'V' doesn't work. */ if ((ret < 1) || (!strcmp(buf, "NA"))) { - upsdebugx(1, "Attempting to contact older Smart-UPS version"); - ret = ser_send_char(upsfd, 'V'); + upsdebugx(1, "Attempting firmware lookup using command 'b'"); + ret = ser_send_char(upsfd, 'b'); if (ret != 1) { - upslog_with_errno(LOG_ERR, "getbaseinfo: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "firmware_table_lookup: ser_send_char failed"); return 0; } @@ -562,10 +570,10 @@ static int firmware_table_lookup(void) upslog_with_errno(LOG_ERR, "firmware_table_lookup: ser_get_line failed"); return 0; } - - upsdebugx(2, "Firmware: [%s]", buf); } + upsdebugx(2, "Firmware: [%s]", buf); + /* this will be reworked if we get a lot of these things */ if (!strcmp(buf, "451.2.I")) { quirk_capability_overflow = 1; @@ -602,6 +610,10 @@ static void getbaseinfo(void) int ret = 0; char *alrts, *cmds, temp[512]; + /* + * try firmware lookup first; we could start with 'a', but older models + * sometimes return other things than a command set + */ if (firmware_table_lookup() == 1) return; @@ -622,7 +634,6 @@ static void getbaseinfo(void) SER_WAIT_SEC, SER_WAIT_USEC); if ((ret < 1) || (!strcmp(temp, "NA"))) { - /* We have an old dumb UPS - go to specific code for old stuff */ oldapcsetup(); return; @@ -774,101 +785,276 @@ static int smartmode(void) return 0; /* failure */ } +/* + * all shutdown commands should respond with 'OK' or '*' + */ +static int sdok(void) +{ + char temp[16]; + + ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); + upsdebugx(4, "sdok: got \"%s\"", temp); + + if (!strcmp(temp, "*") || !strcmp(temp, "OK")) { + upsdebugx(4, "Last issued shutdown command succeeded"); + return 1; + } + + upsdebugx(1, "Last issued shutdown command failed"); + return 0; +} + +/* soft hibernate: S - working only when OB, otherwise ignored */ +static int sdcmd_S(int dummy) +{ + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + + upsdebugx(1, "Issuing soft hibernate"); + ser_send_char(upsfd, APC_CMD_SOFTDOWN); + + return sdok(); +} + +/* soft hibernate, hack version for CS 350 */ +static int sdcmd_CS(int tval) +{ + upsdebugx(1, "Using CS 350 'force OB' shutdown method"); + if (tval & APC_STAT_OL) { + upsdebugx(1, "On-line - forcing OB temporarily"); + ser_send_char(upsfd, 'U'); + usleep(UPSDELAY); + } + return sdcmd_S(tval); +} + +/* + * hard hibernate: @nnn / @nn + * note: works differently for older and new models, see help function for + * detailed info + */ +static int sdcmd_ATn(int cnt) +{ + int n = 0, mmax, ret; + const char *strval; + char timer[4]; + + mmax = cnt == 2 ? 99 : 999; + + if ((strval = getval("wugrace"))) { + errno = 0; + n = strtol(strval, NULL, 10); + if (errno || n < 0 || n > mmax) + n = 0; + } + + snprintf(timer, sizeof(timer), "%.*d", cnt, n); + + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + upsdebugx(1, "Issuing hard hibernate with %d minutes additional wakeup delay", n*6); + + ser_send_char(upsfd, APC_CMD_GRACEDOWN); + usleep(CMDLONGDELAY); + ser_send_pace(upsfd, UPSDELAY, "%s", timer); + + ret = sdok(); + if (ret || cnt == 3) + return ret; + + /* + * "tricky" part - we tried @nn variation and it (unsurprisingly) + * failed; we have to abort the sequence with something bogus to have + * the clean state; newer upses will respond with 'NO', older will be + * silent (YMMV); + */ + ser_send_char(upsfd, APC_CMD_GRACEDOWN); + usleep(UPSDELAY); + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + + return 0; +} + +/* shutdown: K - delayed poweroff */ +static int sdcmd_K(int dummy) +{ + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + upsdebugx(1, "Issuing delayed poweroff"); + + ser_send_char(upsfd, APC_CMD_SHUTDOWN); + usleep(CMDLONGDELAY); + ser_send_char(upsfd, APC_CMD_SHUTDOWN); + + return sdok(); +} + +/* shutdown: Z - immediate poweroff */ +static int sdcmd_Z(int dummy) +{ + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + upsdebugx(1, "Issuing immediate poweroff"); + + ser_send_char(upsfd, APC_CMD_OFF); + usleep(CMDLONGDELAY); + ser_send_char(upsfd, APC_CMD_OFF); + + return sdok(); +} + +static int (*sdlist[])(int) = { + sdcmd_S, + sdcmd_ATn, /* for @nnn version */ + sdcmd_K, + sdcmd_Z, + sdcmd_CS, + sdcmd_ATn, /* for @nn version */ +}; + +#define SDIDX_S 0 +#define SDIDX_AT3N 1 +#define SDIDX_K 2 +#define SDIDX_Z 3 +#define SDIDX_CS 4 +#define SDIDX_AT2N 5 + +#define SDCNT 6 + +static void upsdrv_shutdown_simple(int status) +{ + unsigned int sdtype = 0; + char *strval; + + if ((strval = getval("sdtype"))) { + errno = 0; + sdtype = strtol(strval, NULL, 10); + if (errno || sdtype < 0 || sdtype > 6) + sdtype = 0; + } + + switch (sdtype) { + + case 6: /* hard hibernate */ + sdcmd_ATn(3); + break; + case 5: /* "hack nn" hard hibernate */ + sdcmd_ATn(2); + break; + case 4: /* special hack for CS 350 and similar models */ + sdcmd_CS(status); + break; + + case 3: /* delayed poweroff */ + sdcmd_K(0); + break; + + case 2: /* instant poweroff */ + sdcmd_Z(0); + break; + case 1: + /* + * Send a combined set of shutdown commands which can work + * better if the UPS gets power during shutdown process + * Specifically it sends both the soft shutdown 'S' and the + * hard hibernate '@nnn' commands + */ + upsdebugx(1, "UPS - currently %s - sending soft/hard hibernate commands", + (status & APC_STAT_OL) ? "on-line" : "on battery"); + + /* S works only when OB */ + if ((status & APC_STAT_OB) && sdcmd_S(0)) + break; + sdcmd_ATn(3); + break; + + default: + /* + * Send @nnn or S, depending on OB / OL status + */ + if (status & APC_STAT_OL) /* on line */ + sdcmd_ATn(3); + else + sdcmd_S(0); + } +} + +static void upsdrv_shutdown_advanced(int status) +{ + const char *strval; + const char deforder[] = {48 + SDIDX_S, + 48 + SDIDX_AT3N, + 48 + SDIDX_K, + 48 + SDIDX_Z, + 0}; + size_t i; + int n; + + strval = getval("advorder"); + + /* sanitize advorder */ + + if (!strval || !strlen(strval) || strlen(strval) > SDCNT) + strval = deforder; + for (i = 0; i < strlen(strval); i++) { + if (strval[i] - 48 < 0 || strval[i] - 48 >= SDCNT) { + strval = deforder; + break; + } + } + + /* + * try each method in the list with a little bit of handling in certain + * cases + */ + + for (i = 0; i < strlen(strval); i++) { + switch (strval[i] - 48) { + case SDIDX_CS: + n = status; + break; + case SDIDX_AT3N: + n = 3; + break; + case SDIDX_AT2N: + default: + n = 2; + } + + if (sdlist[strval[i] - 48](n)) + break; /* finish if command succeeded */ + } +} + /* power down the attached load immediately */ void upsdrv_shutdown(void) { char temp[32]; - int ret, tval, sdtype = 0; + int ret, status; if (!smartmode()) - printf("Detection failed. Trying a shutdown command anyway.\n"); + upsdebugx(1, "SM detection failed. Trying a shutdown command anyway"); /* check the line status */ ret = ser_send_char(upsfd, APC_STATUS); if (ret == 1) { - ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, + ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); if (ret < 1) { - printf("Status read failed! Assuming on battery state\n"); - tval = APC_STAT_LB | APC_STAT_OB; + upsdebugx(1, "Status read failed ! Assuming on battery state"); + status = APC_STAT_LB | APC_STAT_OB; } else { - tval = strtol(temp, 0, 16); + status = strtol(temp, 0, 16); } } else { - printf("Status request failed; assuming on battery state\n"); - tval = APC_STAT_LB | APC_STAT_OB; + upsdebugx(1, "Status request failed; assuming on battery state"); + status = APC_STAT_LB | APC_STAT_OB; } - if (testvar("sdtype")) - sdtype = atoi(getval("sdtype")); - - switch (sdtype) { - - case 4: /* special hack for CS 350 and similar models */ - printf("Using CS 350 'force OB' shutdown method\n"); - - if (tval & APC_STAT_OL) { - printf("On line - forcing OB temporarily\n"); - ser_send_char(upsfd, 'U'); - } - - ser_send_char(upsfd, 'S'); - break; - - case 3: /* shutdown with grace period */ - printf("Sending delayed power off command to UPS\n"); - - ser_send_char(upsfd, APC_CMD_SHUTDOWN); - usleep(CMDLONGDELAY); - ser_send_char(upsfd, APC_CMD_SHUTDOWN); - - break; - - case 2: /* instant shutdown */ - printf("Sending power off command to UPS\n"); - - ser_send_char(upsfd, APC_CMD_OFF); - usleep(CMDLONGDELAY); - ser_send_char(upsfd, APC_CMD_OFF); - - break; - - case 1: - - /* Send a combined set of shutdown commands which can work better */ - /* if the UPS gets power during shutdown process */ - /* Specifically it sends both the soft shutdown 'S' */ - /* and the powerdown after grace period - '@000' commands */ - printf("UPS - currently %s - sending shutdown/powerdown\n", - (tval & APC_STAT_OL) ? "on-line" : "on battery"); - - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - ser_send_pace(upsfd, UPSDELAY, "S@000"); - break; - - default: - - /* @000 - shutdown after 'p' grace period */ - /* - returns after 000 minutes (i.e. right away) */ - - /* S - shutdown after 'p' grace period, only on battery */ - /* returns after 'e' charge % plus 'r' seconds */ - - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - - if (tval & APC_STAT_OL) { /* on line */ - printf("On line, sending shutdown+return command...\n"); - ser_send_pace(upsfd, UPSDELAY, "@000"); - } - else { - printf("On battery, sending normal shutdown command...\n"); - ser_send_char(upsfd, APC_CMD_SOFTDOWN); - } - } + if (testvar("advorder") && strcasecmp(getval("advorder"), "no")) + upsdrv_shutdown_advanced(status); + else + upsdrv_shutdown_simple(status); } /* 940-0095B support: set DTR, lower RTS */ @@ -921,6 +1107,7 @@ static int setvar_enum(apc_vartab_t *vt, const char *val) char orig[256], temp[256]; const char *ptr; + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); ret = ser_send_char(upsfd, vt->cmd); if (ret != 1) { @@ -1015,7 +1202,6 @@ static int setvar_string(apc_vartab_t *vt, const char *val) char temp[256]; ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - ret = ser_send_char(upsfd, vt->cmd); if (ret != 1) { @@ -1118,6 +1304,7 @@ static int do_cmd(apc_cmdtab_t *ct) int ret; char buf[SMALLBUF]; + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); ret = ser_send_char(upsfd, ct->cmd); if (ret != 1) { @@ -1222,7 +1409,9 @@ static void setuphandlers(void) void upsdrv_makevartable(void) { addvar(VAR_VALUE, "cable", "Specify alternate cable (940-0095B)"); - addvar(VAR_VALUE, "sdtype", "Specify shutdown type (1-3)"); + addvar(VAR_VALUE, "wugrace", "Hard hibernate's wakeup grace"); + addvar(VAR_VALUE, "sdtype", "Specify simple shutdown method (0-6)"); + addvar(VAR_VALUE, "advorder", "Enable advanced shutdown control"); } void upsdrv_initups(void) @@ -1234,9 +1423,8 @@ void upsdrv_initups(void) cable = getval("cable"); - if (cable) - if (!strcasecmp(cable, ALT_CABLE_1)) - init_serial_0095B(); + if (cable && !strcasecmp(cable, ALT_CABLE_1)) + init_serial_0095B(); /* make sure we wake up if the UPS sends alert chars to us */ extrafd = upsfd; @@ -1244,18 +1432,12 @@ void upsdrv_initups(void) void upsdrv_help(void) { - printf("\nShutdown types:\n"); - printf(" 0: soft shutdown or powerdown, depending on battery status\n"); - printf(" 1: soft shutdown followed by powerdown\n"); - printf(" 2: instant power off\n"); - printf(" 3: power off with grace period\n"); - printf(" 4: 'force OB' hack method for CS 350\n"); - printf("Modes 0-1 will make the UPS come back when power returns\n"); - printf("Modes 2-3 will make the UPS stay turned off when power returns\n"); } void upsdrv_initinfo(void) { + const char *pmod, *pser; + if (!smartmode()) { fatalx(EXIT_FAILURE, "Unable to detect an APC Smart protocol UPS on port %s\n" @@ -1268,8 +1450,12 @@ void upsdrv_initinfo(void) getbaseinfo(); - printf("Detected %s [%s] on %s\n", dstate_getinfo("ups.model"), - dstate_getinfo("ups.serial"), device_path); + if (!(pmod = dstate_getinfo("ups.model"))) + pmod = "\"unknown model\""; + if (!(pser = dstate_getinfo("ups.serial"))) + pser = "unknown serial"; + + upsdebugx(1, "Detected %s [%s] on %s", pmod, pser, device_path); setuphandlers(); } diff --git a/drivers/apcsmart.h b/drivers/apcsmart.h index 41ebbe1..f143cfa 100644 --- a/drivers/apcsmart.h +++ b/drivers/apcsmart.h @@ -23,20 +23,22 @@ #include "serial.h" #include "timehead.h" -#define APC_TABLE_VERSION "version 2.1" +#define APC_TABLE_VERSION "version 2.2" /* Basic UPS reply line structure */ #define ENDCHAR 10 /* APC ends responses with LF */ -/* these two are only used during startup */ -#define IGNCHARS "\015+$|!~%?=*#&" /* special characters to ignore */ +/* characters ignored by default */ +#define IGNCHARS "\015+$|!~%?=#&" /* special characters to ignore */ + +/* these one is used only during startup, due to ^Z sending certain characters such as # */ #define MINIGNCHARS "\015+$|!" /* minimum set of special characters to ignore */ /* normal polls: characters we don't want to parse (including a few alerts) */ -#define POLL_IGNORE "\015?=*&|" +#define POLL_IGNORE "\015&|" -/* alert characters we care about - OL, OB, LB, not LB, RB */ -#define POLL_ALERT "$!%+#" +/* alert characters we care about - OL, OB, LB, not LB, RB, OVER, not OVER */ +#define POLL_ALERT "$!%+#?=" #define UPSDELAY 50000 /* slow down multicharacter commands */ #define CMDLONGDELAY 1500000 /* some commands need a 1.5s gap for safety */ @@ -77,7 +79,6 @@ /* Driver command table flag values */ #define APC_POLL 0x0001 /* Poll this variable regularly */ -#define APC_IGNORE 0x0002 /* Never poll this */ #define APC_PRESENT 0x0004 /* Capability seen on this UPS */ #define APC_RW 0x0010 /* read-write variable */ @@ -109,15 +110,11 @@ typedef struct { apc_vartab_t apc_vartab[] = { + { "ups.firmware.old", 0, 'V' }, { "ups.firmware", 0, 'b' }, { "ups.firmware.aux", 0, 'v' }, { "ups.model", 0, 0x01 }, -/* FUTURE: depends on variable naming scheme */ -#if 0 - { "ups.model.code", 0, 'V' }, -#endif - { "ups.serial", 0, 'n' }, { "ups.mfr.date", 0, 'm' }, @@ -207,6 +204,7 @@ apc_vartab_t apc_vartab[] = { #define APC_CMD_CALTOGGLE 'D' #define APC_CMD_SHUTDOWN 'K' #define APC_CMD_SOFTDOWN 'S' +#define APC_CMD_GRACEDOWN '@' #define APC_CMD_SIMPWF 'U' #define APC_CMD_BTESTTOGGLE 'W' #define APC_CMD_OFF 'Z' @@ -232,6 +230,8 @@ apc_cmdtab_t apc_cmdtab[] = { "test.battery.start", 0, APC_CMD_BTESTTOGGLE }, { "test.battery.stop", 0, APC_CMD_BTESTTOGGLE }, + { "shutdown.return.grace", + APC_NASTY, APC_CMD_GRACEDOWN }, { "shutdown.return", APC_NASTY, APC_CMD_SOFTDOWN }, { "shutdown.stayoff", APC_NASTY|APC_REPEAT, APC_CMD_SHUTDOWN }, @@ -244,9 +244,6 @@ apc_cmdtab_t apc_cmdtab[] = { NULL, 0, 0 } }; -/* things to ignore in protocol_verify - useless variables, etc. */ -#define CMD_IGN_CHARS "\032-78@.,~\047\177QHRTYayz)1IJ" - /* compatibility with hardware that doesn't do APC_CMDSET ('a') */ struct { @@ -255,33 +252,40 @@ struct { int flags; } compat_tab[] = { /* APC Matrix */ + { "0XI", "789ABCDEFGKLMNOPQRSTUVWXYZcefgjklmnopqrsuwxz/<>\\^\014\026", 0 }, + { "0XM", "789ABCDEFGKLMNOPQRSTUVWXYZcefgjklmnopqrsuwxz/<>\\^\014\026", 0 }, { "0ZI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, { "5UI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, { "5ZM", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, /* APC600 */ { "6QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "6QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "6QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, { "6TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, { "6TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, /* SmartUPS 900 */ - { "7QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "7QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "7TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "7TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - /* SmartUPS 1250. */ + { "7QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "7QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "7TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "7TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + /* SmartUPS 900I */ + { "7II", "79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, + /* SmartUPS 2000I */ + { "9II", "79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, + { "9GI", "79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, + /* SmartUPS 1250 */ { "8QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, { "8QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "8TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "8TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "8TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "8TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, /* CS 350 */ { "5.4.D", "\1ABPQRSUYbdfgjmnx9", 0 }, /* Smart-UPS 600 */ - { "D9", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D8", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D7", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D6", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D5", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D4", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D9", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D8", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D7", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D6", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D5", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D4", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, { NULL, NULL, 0 }, }; diff --git a/drivers/bcmxcp.c b/drivers/bcmxcp.c index 13b43bd..d2e0f5c 100644 --- a/drivers/bcmxcp.c +++ b/drivers/bcmxcp.c @@ -120,7 +120,7 @@ TODO List: #include "bcmxcp.h" #define DRIVER_NAME "BCMXCP UPS driver" -#define DRIVER_VERSION "0.23" +#define DRIVER_VERSION "0.24" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -1176,17 +1176,20 @@ void upsdrv_initinfo(void) iIndex += 1; /* Size of command list block */ - cmd_list_len = get_word(answer+iIndex); + if (iIndex < res) + cmd_list_len = get_word(answer+iIndex); upsdebugx(2, "Length of command list: %d\n", cmd_list_len); iIndex += 2; /* Size of outlet monitoring block */ - outlet_block_len = get_word(answer+iIndex); + if (iIndex < res) + outlet_block_len = get_word(answer+iIndex); upsdebugx(2, "Length of outlet_block: %d\n", outlet_block_len); iIndex += 2; /* Size of the alarm block */ - alarm_block_len = get_word(answer+iIndex); + if (iIndex < res) + alarm_block_len = get_word(answer+iIndex); upsdebugx(2, "Length of alarm_block: %d\n", alarm_block_len); /* End of UPS ID block request */ @@ -1209,7 +1212,8 @@ void upsdrv_initinfo(void) init_limit(); /* Get information on UPS commands */ - init_command_map(); + if (cmd_list_len) + init_command_map(); /* FIXME: leave up to init_command_map() to add instant commands? */ dstate_addcmd("shutdown.return"); diff --git a/drivers/bcmxcp_ser.c b/drivers/bcmxcp_ser.c index b6f98f0..b03e0c1 100644 --- a/drivers/bcmxcp_ser.c +++ b/drivers/bcmxcp_ser.c @@ -6,7 +6,7 @@ #define PW_MAX_BAUD 5 #define SUBDRIVER_NAME "RS-232 communication subdriver" -#define SUBDRIVER_VERSION "0.17" +#define SUBDRIVER_VERSION "0.18" /* communication driver description structure */ upsdrv_info_t comm_upsdrv_info = { @@ -47,8 +47,10 @@ static void send_command(unsigned char *command, int command_length) while (retry++ < PW_MAX_TRY) { - if (retry == PW_MAX_TRY) + if (retry == PW_MAX_TRY) { ser_send_char(upsfd, 0x1d); /* last retry is preceded by a ESC.*/ + usleep(250000); + } sent = ser_send_buf(upsfd, sbuf, command_length); @@ -82,7 +84,7 @@ int get_answer(unsigned char *data, unsigned char command) res = ser_get_char(upsfd, my_buf, 1, 0); if (res != 1) { - upsdebugx(1,"Receive error (PW_COMMAND_START_BYTE): %d!!!\n", res); + upsdebugx(1,"Receive error (PW_COMMAND_START_BYTE): %d, cmd=%x!!!\n", res, command); return -1; } @@ -250,6 +252,7 @@ void upsdrv_comm_good() void pw_comm_setup(const char *port) { unsigned char command = PW_SET_REQ_ONLY_MODE; + unsigned char id_command = PW_ID_BLOCK_REQ; unsigned char answer[256]; int i = 0, baud, mybaud = 0, ret = -1; @@ -274,6 +277,10 @@ void pw_comm_setup(const char *port) send_write_command(AUT, 4); usleep(500000); ret = command_sequence(&command, 1, answer); + if (ret <= 0) { + usleep(500000); + ret = command_sequence(&id_command, 1, answer); + } if (ret > 0) { upslogx(LOG_INFO, "Connected to UPS on %s with baudrate %d", port, baud); @@ -293,6 +300,10 @@ void pw_comm_setup(const char *port) send_write_command(AUT, 4); usleep(500000); ret = command_sequence(&command, 1, answer); + if (ret <= 0) { + usleep(500000); + ret = command_sequence(&id_command, 1, answer); + } if (ret > 0) { upslogx(LOG_INFO, "Connected to UPS on %s with baudrate %d", port, pw_baud_rates[i].name); diff --git a/drivers/bcmxcp_usb.c b/drivers/bcmxcp_usb.c index ce44abb..95feea7 100644 --- a/drivers/bcmxcp_usb.c +++ b/drivers/bcmxcp_usb.c @@ -160,7 +160,7 @@ int get_answer(unsigned char *data, unsigned char command) { /* Clear any possible endpoint stalls */ usb_clear_halt(upsdev, 0x81); - //continue; // FIXME: seems a break would be better! + /* continue; */ /* FIXME: seems a break would be better! */ break; } diff --git a/drivers/blazer.c b/drivers/blazer.c index 4dbbcbd..5179be5 100644 --- a/drivers/blazer.c +++ b/drivers/blazer.c @@ -186,7 +186,7 @@ static int blazer_status(const char *cmd) * 01234567890123456789012345678901234567890123456 * 0 1 2 3 4 */ - if (blazer_command(cmd, buf, sizeof(buf)) < 47) { + if (blazer_command(cmd, buf, sizeof(buf)) < 46) { upsdebugx(2, "%s: short reply", __func__); return -1; } @@ -691,6 +691,9 @@ void upsdrv_updateinfo(void) if (blazer_status(command[proto].status)) { if (retry < MAXTRIES) { + upsdebugx(1, "Communications with UPS lost: status read failed!"); + retry++; + } else if (retry == MAXTRIES) { upslogx(LOG_WARNING, "Communications with UPS lost: status read failed!"); retry++; } else { @@ -723,7 +726,7 @@ void upsdrv_updateinfo(void) lastpoll = now; } - if (retry) { + if (retry > MAXTRIES) { upslogx(LOG_NOTICE, "Communications with UPS re-established"); } diff --git a/drivers/blazer_usb.c b/drivers/blazer_usb.c index 7a07107..317093e 100644 --- a/drivers/blazer_usb.c +++ b/drivers/blazer_usb.c @@ -255,16 +255,17 @@ static int krauler_command(const char *cmd, char *buf, size_t buflen) /* "UPS No Ack" has a special meaning */ if (!strcasecmp(buf, "UPS No Ack")) { + upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); continue; } /* Replace the first byte of what we received with the correct one */ buf[0] = command[i].prefix; + upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); return ret; } - upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); return 0; } @@ -295,13 +296,21 @@ static void *krauler_subdriver(void) } +static void *phoenix_subdriver(void) +{ + subdriver_command = &phoenix_command; + return NULL; +} + + static usb_device_id_t blazer_usb_id[] = { { USB_DEVICE(0x05b8, 0x0000), &cypress_subdriver }, /* Agiler UPS */ - { USB_DEVICE(0x0001, 0x0000), &krauler_subdriver }, /* Krauler UP-M500VA */ - { USB_DEVICE(0xffff, 0x0000), &krauler_subdriver }, /* Ablerex 625L USB */ + { 0x0001, 0x0000, &krauler_subdriver }, /* Krauler UP-M500VA */ + { 0xffff, 0x0000, &krauler_subdriver }, /* Ablerex 625L USB */ { USB_DEVICE(0x0665, 0x5161), &cypress_subdriver }, /* Belkin F6C1200-UNV */ { USB_DEVICE(0x06da, 0x0003), &ippon_subdriver }, /* Mustek Powermust */ { USB_DEVICE(0x0f03, 0x0001), &cypress_subdriver }, /* Unitek Alpha 1200Sx */ + { USB_DEVICE(0x14f0, 0x00c9), &phoenix_subdriver }, /* GE EP series */ /* end of list */ {-1, -1, NULL} }; diff --git a/drivers/cps-hid.c b/drivers/cps-hid.c index e594a59..b098df3 100644 --- a/drivers/cps-hid.c +++ b/drivers/cps-hid.c @@ -74,6 +74,22 @@ static info_lkp_t cps_battvolt[] = { { 0, NULL, &cps_battvolt_fun } }; +/* returns statically allocated string - must not use it again before + done with result! */ +static const char *cps_battcharge_fun(double value) +{ + static char buf[8]; + + /* clamp battery charge to 100% */ + snprintf(buf, sizeof(buf), "%.0f", value < 100.0 ? value : 100.0); + + return buf; +} + +static info_lkp_t cps_battcharge[] = { + { 0, NULL, &cps_battcharge_fun } +}; + /* --------------------------------------------------------------- */ /* Vendor-specific usage table */ /* --------------------------------------------------------------- */ @@ -106,7 +122,7 @@ static hid_info_t cps_hid2nut[] = { { "battery.mfr.date", 0, 0, "UPS.PowerSummary.iOEMInformation", NULL, "%s", 0, stringid_conversion }, { "battery.charge.warning", 0, 0, "UPS.PowerSummary.WarningCapacityLimit", NULL, "%.0f", 0, NULL }, { "battery.charge.low", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.PowerSummary.RemainingCapacityLimit", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, - { "battery.charge", 0, 0, "UPS.PowerSummary.RemainingCapacity", NULL, "%.0f", 0, NULL }, + { "battery.charge", 0, 0, "UPS.PowerSummary.RemainingCapacity", NULL, "%s", 0, cps_battcharge }, { "battery.runtime", 0, 0, "UPS.PowerSummary.RunTimeToEmpty", NULL, "%.0f", 0, NULL }, { "battery.runtime.low", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.PowerSummary.RemainingTimeLimit", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "battery.voltage.nominal", 0, 0, "UPS.PowerSummary.ConfigVoltage", NULL, "%.0f", 0, NULL }, diff --git a/drivers/dstate.c b/drivers/dstate.c index b95cec9..316c54f 100644 --- a/drivers/dstate.c +++ b/drivers/dstate.c @@ -32,7 +32,7 @@ #include "state.h" #include "parseconf.h" - static int sockfd = -1, stale = 1, alarm_active = 0; + static int sockfd = -1, stale = 1, alarm_active = 0, ignorelb = 0; static char *sockfn = NULL; static char status_buf[ST_MAX_VALUE_LEN], alarm_buf[ST_MAX_VALUE_LEN]; static st_tree_t *dtree_root = NULL; @@ -223,8 +223,11 @@ static void sock_connect(int sock) int fd, ret; conn_t *conn; struct sockaddr_un sa; +#if defined(__hpux) && !defined(_XOPEN_SOURCE_EXTENDED) + int salen; +#else socklen_t salen; - +#endif salen = sizeof(sa); fd = accept(sock, (struct sockaddr *) &sa, &salen); @@ -639,7 +642,12 @@ void dstate_setflags(const char *var, int flags) sttmp = state_tree_find(dtree_root, var); if (!sttmp) { - upslogx(LOG_ERR, "dstate_setflags: base variable (%s) does not exist", var); + upslogx(LOG_ERR, "%s: base variable (%s) does not exist", __func__, var); + return; + } + + if (sttmp->flags & ST_FLAG_IMMUTABLE) { + upslogx(LOG_WARNING, "%s: base variable (%s) is immutable", __func__, var); return; } @@ -792,12 +800,21 @@ int dstate_is_stale(void) /* clean out the temp space for a new pass */ void status_init(void) { + if (dstate_getinfo("driver.flag.ignorelb")) { + ignorelb = 1; + } + memset(status_buf, 0, sizeof(status_buf)); } /* add a status element */ void status_set(const char *buf) { + if (ignorelb && !strcasecmp(buf, "LB")) { + upsdebugx(2, "%s: ignoring LB flag from device", __func__); + return; + } + /* separate with a space if multiple elements are present */ if (strlen(status_buf) > 0) { snprintfcat(status_buf, sizeof(status_buf), " %s", buf); @@ -809,6 +826,31 @@ void status_set(const char *buf) /* write the status_buf into the externally visible dstate storage */ void status_commit(void) { + while (ignorelb) { + const char *val, *low; + + val = dstate_getinfo("battery.charge"); + low = dstate_getinfo("battery.charge.low"); + + if (val && low && (strtol(val, NULL, 10) < strtol(low, NULL, 10))) { + snprintfcat(status_buf, sizeof(status_buf), " LB"); + upsdebugx(2, "%s: appending LB flag [charge '%s' below '%s']", __func__, val, low); + break; + } + + val = dstate_getinfo("battery.runtime"); + low = dstate_getinfo("battery.runtime.low"); + + if (val && low && (strtol(val, NULL, 10) < strtol(low, NULL, 10))) { + snprintfcat(status_buf, sizeof(status_buf), " LB"); + upsdebugx(2, "%s: appending LB flag [runtime '%s' below '%s']", __func__, val, low); + break; + } + + /* LB condition not detected */ + break; + } + if (alarm_active) { dstate_setinfo("ups.status", "ALARM %s", status_buf); } else { diff --git a/drivers/dummy-ups.c b/drivers/dummy-ups.c index 468e660..72bef62 100644 --- a/drivers/dummy-ups.c +++ b/drivers/dummy-ups.c @@ -375,7 +375,7 @@ static int is_valid_data(const char* varname) * enforcing controls! We also need a way to automate * the update / sync process (with cmdvartab?!) */ - upsdebugx(1, "Unknown data. Commiting anyway..."); + upsdebugx(1, "Unknown data. Committing anyway..."); return 1; /* return 0;*/ } @@ -395,7 +395,7 @@ static int is_valid_value(const char* varname, const char *value) * enforcing controls! We also need a way to automate * the update / sync process (with cmdvartab?) */ - upsdebugx(1, "Unknown data. Commiting value anyway..."); + upsdebugx(1, "Unknown data. Committing value anyway..."); return 1; /* return 0;*/ } @@ -412,7 +412,7 @@ static void upsconf_err(const char *errmsg) static int parse_data_file(int upsfd) { char fn[SMALLBUF]; - char *ptr, *var_value = (char*) xmalloc(MAX_STRING_SIZE); + char *ptr, var_value[MAX_STRING_SIZE]; int value_args = 0, counter; time_t now; @@ -501,13 +501,13 @@ static int parse_data_file(int upsfd) } else { - memset(var_value, 0, MAX_STRING_SIZE); for (counter = 1, value_args = ctx->numargs ; counter < value_args ; counter++) { - if (counter != 1) /* don't append the first space separator */ - strncat(var_value, " ", 1); - strncat(var_value, ctx->arglist[counter], MAX_STRING_SIZE); + if (counter == 1) /* don't append the first space separator */ + snprintf(var_value, sizeof(var_value), "%s", ctx->arglist[counter]); + else + snprintfcat(var_value, sizeof(var_value), " %s", ctx->arglist[counter]); } if (setvar(ctx->arglist[0], var_value) == STAT_SET_UNKNOWN) @@ -529,7 +529,6 @@ static int parse_data_file(int upsfd) pconf_finish(ctx); free(ctx); ctx=NULL; - free(var_value); } return 1; } diff --git a/drivers/eaton-mib.c b/drivers/eaton-mib.c index 1bd2dd2..18fcf55 100644 --- a/drivers/eaton-mib.c +++ b/drivers/eaton-mib.c @@ -1,6 +1,6 @@ /* eaton-mib.c - data to monitor Eaton Aphel PDUs (Basic and Complex) * - * Copyright (C) 2008 + * Copyright (C) 2008 - 2010 * Arnaud Quette * * Sponsored by Eaton @@ -25,7 +25,7 @@ #include "eaton-mib.h" -#define EATON_APHEL_MIB_VERSION "0.4" +#define EATON_APHEL_MIB_VERSION "0.45" /* APHEL-GENESIS-II-MIB (monitored ePDU) * ************************************* @@ -87,8 +87,6 @@ static snmp_info_t eaton_aphel_genesisII_mib[] = { #define APHEL2_OID_MODEL_NAME AR_OID_MODEL_NAME -/* Common Aphel / Raritan declaration */ - #define AR_OID_MODEL_NAME AR_BASE_OID ".1.1.12.0" #define AR_OID_DEVICE_NAME AR_BASE_OID ".1.1.13.0" #define AR_OID_FIRMREV AR_BASE_OID ".1.1.1.0" @@ -180,12 +178,21 @@ static snmp_info_t eaton_aphel_revelation_mib[] = { /* FIXME: * - delay for startup/shutdown sequence - * - support for Ambient page - temperatureSensorCount" src="snmp:$sysoid.2.1.0 - ambient.temperature src="snmp:$sysoid.2.2.1.3.$indiceSensor => seems dumb! - ambient.humidity src="snmp:$sysoid.2.4.1.3.$indiceSensor + * - support for multiple Ambient sensors ( max. 8), starting at index '0' + * ambient.%i.temperature => .1.3.6.1.4.1.534.6.6.6.2.2.1.3.%i + * ambient.%i.humidity => .1.3.6.1.4.1.534.6.6.6.2.4.1.3.%i */ + /* Ambient page */ + /* We use critical levels, for both temperature and humidity, + * since warning levels are also available! */ + { "ambient.temperature", 0, 1.0, ".1.3.6.1.4.1.534.6.6.6.2.2.1.3.0", NULL, SU_FLAG_OK, NULL, NULL }, + { "ambient.temperature.low", 0, 1.0, "1.3.6.1.4.1.534.6.6.6.2.2.1.6.0", NULL, SU_FLAG_OK, NULL, NULL }, + { "ambient.temperature.high", 0, 1.0, "1.3.6.1.4.1.534.6.6.6.2.2.1.7.0", NULL, SU_FLAG_OK, NULL, NULL }, + { "ambient.humidity", 0, 1.0, ".1.3.6.1.4.1.534.6.6.6.2.4.1.3.0", NULL, SU_FLAG_OK, NULL, NULL }, + { "ambient.humidity.low", 0, 1.0, ".1.3.6.1.4.1.534.6.6.6.2.4.1.6.0", NULL, SU_FLAG_OK, NULL, NULL }, + { "ambient.humidity.high", 0, 1.0, ".1.3.6.1.4.1.534.6.6.6.2.4.1.7.0", NULL, SU_FLAG_OK, NULL, NULL }, + /* instant commands. */ /* Note that load.cycle might be replaced by / mapped on shutdown.reboot */ /* no counterpart found! diff --git a/drivers/genericups.c b/drivers/genericups.c index 868f792..bc8ddc4 100644 --- a/drivers/genericups.c +++ b/drivers/genericups.c @@ -142,12 +142,12 @@ void upsdrv_initinfo(void) */ if ((v = getval("OL")) != NULL) { parse_input_signals(v, &upstab[upstype].line_ol, &upstab[upstype].val_ol); - upsdebugx(2, "parse_input_signals: OL overriden with %s\n", v); + upsdebugx(2, "parse_input_signals: OL overridden with %s\n", v); } if ((v = getval("LB")) != NULL) { parse_input_signals(v, &upstab[upstype].line_bl, &upstab[upstype].val_bl); - upsdebugx(2, "parse_input_signals: LB overriden with %s\n", v); + upsdebugx(2, "parse_input_signals: LB overridden with %s\n", v); } } @@ -318,12 +318,12 @@ void upsdrv_initups(void) */ if ((v = getval("CP")) != NULL) { parse_output_signals(v, &upstab[upstype].line_norm); - upsdebugx(2, "parse_output_signals: CP overriden with %s\n", v); + upsdebugx(2, "parse_output_signals: CP overridden with %s\n", v); } if ((v = getval("SD")) != NULL) { parse_output_signals(v, &upstab[upstype].line_sd); - upsdebugx(2, "parse_output_signals: SD overriden with %s\n", v); + upsdebugx(2, "parse_output_signals: SD overridden with %s\n", v); } if (ioctl(upsfd, TIOCMSET, &upstab[upstype].line_norm)) { diff --git a/drivers/libhid.c b/drivers/libhid.c index 78b1236..6fce6a9 100644 --- a/drivers/libhid.c +++ b/drivers/libhid.c @@ -141,7 +141,6 @@ static int refresh_report_buffer(reportbuf_t *rbuf, hid_dev_handle_t udev, HIDDa { int id = pData->ReportID; int r; - unsigned char buf[SMALLBUF]; if (rbuf->ts[id] + age > time(NULL)) { /* buffered report is still good; nothing to do */ @@ -149,17 +148,14 @@ static int refresh_report_buffer(reportbuf_t *rbuf, hid_dev_handle_t udev, HIDDa return 0; } - r = comm_driver->get_report(udev, id, buf, sizeof(buf)); + r = comm_driver->get_report(udev, id, rbuf->data[id], rbuf->len[id]); if (r <= 0) { return -1; } - /* broken report descriptors are common, so store whatever we can */ - memcpy(rbuf->data[id], buf, (r < rbuf->len[id]) ? r : rbuf->len[id]); - if (rbuf->len[id] != r) { upsdebugx(2, "%s: expected %d bytes, but got %d instead", __func__, rbuf->len[id], r); - upsdebug_hex(3, "Report[err]", buf, r); + upsdebug_hex(3, "Report[err]", rbuf->data[id], r); } else { upsdebug_hex(3, "Report[get]", rbuf->data[id], rbuf->len[id]); } @@ -399,7 +395,7 @@ char *HIDGetIndexString(hid_dev_handle_t udev, const int Index, char *buf, size_ if (comm_driver->get_string(udev, Index, buf, buflen) < 1) buf[0] = '\0'; - return buf; + return rtrim(buf, '\n'); } /* Return pointer to indexed string from HID path (empty if not found) diff --git a/drivers/liebert-esp2.c b/drivers/liebert-esp2.c index 06d486a..fca7c5e 100644 --- a/drivers/liebert-esp2.c +++ b/drivers/liebert-esp2.c @@ -23,8 +23,58 @@ #include "timehead.h" #include "nut_stdint.h" +#define sivann +#define IsBitSet(val, bit) ((val) & (1 << (bit))) + #define DRIVER_NAME "Liebert ESP-II serial UPS driver" -#define DRIVER_VERSION "0.02" +#define DRIVER_VERSION "0.03" +#define UPS_SHUTDOWN_DELAY 12 /* it means UPS will be shutdown 120 sec */ +#define SHUTDOWN_CMD_LEN 8 + +/* values for sending to UPS */ +enum mult_enum { + M_10, + M_0_1, + M_VOLTAGE_I, + M_VOLTAGE_O, + M_VOLTAGE_B, + M_CURRENT_I, + M_CURRENT_O, + M_CURRENT_B, + M_LOAD_VA, + M_LOAD_WATT, + M_FREQUENCY, + M_VOLT_DC, + M_TEMPERATURE, + M_CURRENT_DC , + M_BAT_RUNTIME, + M_NOMPOWER, + M_POWER, + M_REALPOWER, + M_LOADPERC +}; + +static float multi[19]={ + 10.0, + 0.1, + 0.1, /* volt */ + 0.1, + 0.1, + 0.1, /* curr */ + 0.1, + 0.1, + 100.0, /* va */ + 100.0, /* W */ + 0.01, /* FREQ */ + 0.1, /* V DC*/ + 0.1, /* TEMP*/ + 0.01, /* CUR DC*/ + 60.0, /* BAT RUNTIME*/ + 100.0, /* NOMPOWER*/ + 100.0, /* POWER*/ + 100.0, /* REAL POWER*/ + 1.0 /* LOADPERC*/ +}; static int instcmd(const char *cmdname, const char *extra); static int setvar(const char *varname, const char *val); @@ -33,7 +83,8 @@ static int setvar(const char *varname, const char *val); upsdrv_info_t upsdrv_info = { DRIVER_NAME, DRIVER_VERSION, - "Richard Gregory ", + "Richard Gregory \n" \ + "Robert Jobbagy 1){ + cmdin_p=vartab3i; + } + else { + cmdin_p=vartab1i; + } + + if (num_outphases>1){ + cmdout_p=vartab3o; + } + else { + cmdout_p=vartab1o; + } + + for (i = 0; cmdin_p[i].var; i++) { + int16_t val; + ret = do_command(cmdin_p[i].cmd, reply, 6); + if (ret < 8) { + continue; + } + val = (unsigned char)reply[5]; + val <<= 8; + val += (unsigned char)reply[6]; + dstate_setinfo(cmdin_p[i].var, cmdin_p[i].fmt, val * multi[cmdin_p[i].multindex]); + } + + for (i = 0; cmdout_p[i].var; i++) { + int16_t val; + ret = do_command(cmdout_p[i].cmd, reply, 6); + if (ret < 8) { + continue; + } + val = (unsigned char)reply[5]; + val <<= 8; + val += (unsigned char)reply[6]; + dstate_setinfo(cmdout_p[i].var, cmdout_p[i].fmt, val * multi[cmdout_p[i].multindex]); } status_init(); - ret = do_command(cmd_bitfield1, reply); + ret = do_command(cmd_bitfield1, reply, 6); if (ret < 8) { upslogx(LOG_ERR, "Failed reading bitfield #1"); dstate_datastale(); @@ -217,7 +430,7 @@ void upsdrv_updateinfo(void) } } - ret = do_command(cmd_bitfield2, reply); + ret = do_command(cmd_bitfield2, reply, 6); if (ret < 8) { upslogx(LOG_ERR, "Failed reading bitfield #2"); dstate_datastale(); @@ -240,7 +453,7 @@ void upsdrv_updateinfo(void) status_set("TRIM"); } - ret = do_command(cmd_bitfield3, reply); + ret = do_command(cmd_bitfield3, reply, 6); if (ret < 8) { upslogx(LOG_ERR, "Failed reading bitfield #3"); dstate_datastale(); @@ -262,8 +475,13 @@ void upsdrv_updateinfo(void) void upsdrv_shutdown(void) { - /* replace with a proper shutdown function */ - fatalx(EXIT_FAILURE, "shutdown not supported"); + char reply[8]; + + if(!(do_command(cmd_setOutOffMode, reply, 8) != -1) && + (do_command(cmd_setOutOffDelay, reply, 8) != -1) && + (do_command(cmd_sysLoadKey, reply, 6) != -1) && + (do_command(cmd_shutdown, reply, 8) != -1)) + upslogx(LOG_ERR, "Failed to shutdown UPS"); } static int instcmd(const char *cmdname, const char *extra) diff --git a/drivers/liebert-hid.c b/drivers/liebert-hid.c index 89ab03a..2cce0ee 100644 --- a/drivers/liebert-hid.c +++ b/drivers/liebert-hid.c @@ -29,8 +29,8 @@ #define LIEBERT_HID_VERSION "Liebert HID 0.3" /* FIXME: experimental flag to be put in upsdrv_info */ -/* Liebert */ -#define LIEBERT_VENDORID 0x06da +/* Phoenixtec */ +#define LIEBERT_VENDORID 0x06da /* USB IDs device table */ static usb_device_id_t liebert_usb_device_table[] = { diff --git a/drivers/main.c b/drivers/main.c index d14f990..aafee68 100644 --- a/drivers/main.c +++ b/drivers/main.c @@ -258,6 +258,11 @@ static int main_arg(char *var, char *val) return 1; /* handled */ } + if (!strcmp(var, "ignorelb")) { + dstate_setinfo("driver.flag.ignorelb", "enabled"); + return 1; /* handled */ + } + /* any other flags are for the driver code */ if (!val) return 0; @@ -600,6 +605,28 @@ int main(int argc, char **argv) upsdrv_initinfo(); upsdrv_updateinfo(); + if (dstate_getinfo("driver.flag.ignorelb")) { + int have_lb_method = 0; + + if (dstate_getinfo("battery.charge") && dstate_getinfo("battery.charge.low")) { + upslogx(LOG_INFO, "using 'battery.charge' to set battery low state"); + have_lb_method++; + } + + if (dstate_getinfo("battery.runtime") && dstate_getinfo("battery.runtime.low")) { + upslogx(LOG_INFO, "using 'battery.runtime' to set battery low state"); + have_lb_method++; + } + + if (!have_lb_method) { + fatalx(EXIT_FAILURE, + "The 'ignorelb' flag is set, but there is no way to determine the\n" + "battery state of charge.\n\n" + "Only set this flag if both 'battery.charge' and 'battery.charge.low'\n" + "and/or 'battery.runtime' and 'battery.runtime.low' are available.\n"); + } + } + /* now we can start servicing requests */ dstate_init(progname, upsname); diff --git a/drivers/metasys.c b/drivers/metasys.c index 6a0b2d2..aa3a677 100644 --- a/drivers/metasys.c +++ b/drivers/metasys.c @@ -62,12 +62,12 @@ static int instcmd(const char *cmdname, const char *extra); /* Metasystem UPS data transfer are made with packet of the format: - STX DATA_LENGHT DATA CHECKSUM + STX DATA_LENGTH DATA CHECKSUM where: STX is 0x02 and is the start of transmission byte - DATA_LENGHT is number of data bytes + the checksum byte + DATA_LENGTH is number of data bytes + the checksum byte DATA ...... - CHECKSUM is the sum modulus 256 of all DATA bytes + DATA_LENGHT + CHECKSUM is the sum modulus 256 of all DATA bytes + DATA_LENGTH The answer from the UPS have the same packet format and the first data byte is equal to the command that the ups is answering to @@ -114,7 +114,7 @@ void dump_buffer(unsigned char *buffer, int buf_len) { } /* send a read command to the UPS, it retries 5 times before give up - it's a 4 byte request (STX, LENGHT, COMMAND and CHECKSUM) */ + it's a 4 byte request (STX, LENGTH, COMMAND and CHECKSUM) */ void send_read_command(char command) { int retry, sent; unsigned char buf[4]; @@ -122,9 +122,9 @@ void send_read_command(char command) { sent = 0; while ((sent != 4) && (retry < 5)) { buf[0]=0x02; /* STX Start of Transmission */ - buf[1]=0x02; /* data lenght(data + checksum byte) */ + buf[1]=0x02; /* data length(data + checksum byte) */ buf[2]=command; /* command to send */ - buf[3]=buf[1] + buf[2]; /* checksum (sum modulus 256 of data bytes + lenght) */ + buf[3]=buf[1] + buf[2]; /* checksum (sum modulus 256 of data bytes + length) */ if (retry == 4) send_zeros(); /* last retry is preceded by a serial reset...*/ sent = ser_send_buf(upsfd, buf, 4); retry += 1; @@ -134,29 +134,29 @@ void send_read_command(char command) { /* send a write command to the UPS, the write command and the value to be written are passed with a char* buffer it retries 5 times before give up */ -void send_write_command(unsigned char *command, int command_lenght) { +void send_write_command(unsigned char *command, int command_length) { int i, retry, sent, checksum; unsigned char raw_buf[255]; /* prepares the raw data */ raw_buf[0] = 0x02; /* STX byte */ - raw_buf[1] = (unsigned char)(command_lenght + 1); /* data lenght + checksum */ - memcpy(raw_buf+2, command, command_lenght); - command_lenght += 2; + raw_buf[1] = (unsigned char)(command_length + 1); /* data length + checksum */ + memcpy(raw_buf+2, command, command_length); + command_length += 2; /* calculate checksum */ checksum = 0; - for (i = 1; i < command_lenght; i++) checksum += raw_buf[i]; + for (i = 1; i < command_length; i++) checksum += raw_buf[i]; checksum = checksum % 256; - raw_buf[command_lenght] = (unsigned char)checksum; - command_lenght +=1; + raw_buf[command_length] = (unsigned char)checksum; + command_length +=1; retry = 0; sent = 0; - while ((sent != (command_lenght)) && (retry < 5)) { + while ((sent != (command_length)) && (retry < 5)) { if (retry == 4) send_zeros(); /* last retry is preceded by a serial reset... */ - sent = ser_send_buf(upsfd, raw_buf, (command_lenght)); - if (sent != (command_lenght)) printf("Error sending command %d\n", raw_buf[2]); + sent = ser_send_buf(upsfd, raw_buf, (command_length)); + if (sent != (command_length)) printf("Error sending command %d\n", raw_buf[2]); retry += 1; } } @@ -164,8 +164,8 @@ void send_write_command(unsigned char *command, int command_lenght) { /* get the answer of a command from the ups */ int get_answer(unsigned char *data) { - unsigned char my_buf[255]; /* packet has a maximum lenght of 256 bytes */ - int packet_lenght, checksum, i, res; + unsigned char my_buf[255]; /* packet has a maximum length of 256 bytes */ + int packet_length, checksum, i, res; /* Read STX byte */ res = ser_get_char(upsfd, my_buf, 1, 0); if (res < 1) { @@ -176,43 +176,43 @@ int get_answer(unsigned char *data) { ser_comm_fail("Receive error (STX): packet not on start!!\n"); return -1; } - /* Read data lenght byte */ + /* Read data length byte */ res = ser_get_char(upsfd, my_buf, 1, 0); if (res < 1) { - ser_comm_fail("Receive error (lenght): %d!!!\n", res); + ser_comm_fail("Receive error (length): %d!!!\n", res); return -1; } - packet_lenght = my_buf[0]; - if (packet_lenght < 2) { - ser_comm_fail("Receive error (lenght): packet lenght %d!!!\n", packet_lenght); + packet_length = my_buf[0]; + if (packet_length < 2) { + ser_comm_fail("Receive error (length): packet length %d!!!\n", packet_length); return -1; } - /* Try to read all the remainig bytes (packet_lenght) */ - res = ser_get_buf_len(upsfd, my_buf, packet_lenght, 1, 0); - if (res != packet_lenght) { - ser_comm_fail("Receive error (data): got %d bytes instead of %d!!!\n", res, packet_lenght); + /* Try to read all the remainig bytes (packet_length) */ + res = ser_get_buf_len(upsfd, my_buf, packet_length, 1, 0); + if (res != packet_length) { + ser_comm_fail("Receive error (data): got %d bytes instead of %d!!!\n", res, packet_length); return -1; } /* now we have the whole answer from the ups, we can checksum it - checksum byte is equal to the sum modulus 256 of all the data bytes + packet_lenght + checksum byte is equal to the sum modulus 256 of all the data bytes + packet_length (no STX no checksum byte itself) */ - checksum = packet_lenght; - for (i = 0; i < (packet_lenght - 1); i++) checksum += my_buf[i]; + checksum = packet_length; + for (i = 0; i < (packet_length - 1); i++) checksum += my_buf[i]; checksum = checksum % 256; - if (my_buf[packet_lenght-1] != checksum) { - ser_comm_fail("checksum error! got %x instad of %x, received %d bytes \n", my_buf[packet_lenght - 1], checksum, packet_lenght); - dump_buffer(my_buf, packet_lenght); + if (my_buf[packet_length-1] != checksum) { + ser_comm_fail("checksum error! got %x instad of %x, received %d bytes \n", my_buf[packet_length - 1], checksum, packet_length); + dump_buffer(my_buf, packet_length); return -1; } - packet_lenght-=1; /* get rid of the checksum byte */ - memcpy(data, my_buf, packet_lenght); - return packet_lenght; + packet_length-=1; /* get rid of the checksum byte */ + memcpy(data, my_buf, packet_length); + return packet_length; } /* send a read command and try get the answer, if something fails, it retries (5 times max) if it is on the 4th or 5th retry, it will flush the serial before sending commands - it returns the lenght of the received answer or -1 in case of failure */ + it returns the length of the received answer or -1 in case of failure */ int command_read_sequence(unsigned char command, unsigned char *data) { int bytes_read = 0; int retry = 0; @@ -234,13 +234,13 @@ int command_read_sequence(unsigned char command, unsigned char *data) { /* send a write command and try get the answer, if something fails, it retries (5 times max) if it is on the 4th or 5th retry, it will flush the serial before sending commands - it returns the lenght of the received answer or -1 in case of failure */ -int command_write_sequence(unsigned char *command, int command_lenght, unsigned char *answer) { + it returns the length of the received answer or -1 in case of failure */ +int command_write_sequence(unsigned char *command, int command_length, unsigned char *answer) { int bytes_read = 0; int retry = 0; while ((bytes_read < 1) && (retry < 5)) { - send_write_command(command, command_lenght); + send_write_command(command, command_length); bytes_read = get_answer(answer); if (retry > 2) ser_flush_in(upsfd, "", 0); retry += 1; diff --git a/drivers/mge-hid.c b/drivers/mge-hid.c index 7b3d59e..ccf1c9a 100644 --- a/drivers/mge-hid.c +++ b/drivers/mge-hid.c @@ -26,7 +26,7 @@ #include "usbhid-ups.h" #include "mge-hid.h" -#define MGE_HID_VERSION "MGE HID 1.19" +#define MGE_HID_VERSION "MGE HID 1.21" /* (prev. MGE Office Protection Systems, prev. MGE UPS SYSTEMS) */ /* Eaton */ @@ -35,6 +35,9 @@ /* Dell */ #define DELL_VENDORID 0x047c +/* Powerware */ +#define POWERWARE_VENDORID 0x0592 + #ifndef SHUT_MODE #include "usb-common.h" @@ -47,6 +50,9 @@ static usb_device_id_t mge_usb_device_table[] = { /* various models */ { USB_DEVICE(DELL_VENDORID, 0xffff), NULL }, + /* PW 9140 */ + { USB_DEVICE(POWERWARE_VENDORID, 0x0004), NULL }, + /* Terminating entry */ { -1, -1, NULL } }; @@ -492,7 +498,8 @@ static usage_lkp_t mge_usage_lkp[] = { { "HighHumidity", 0xffff0082 }, { "LowTemperature", 0xffff0083 }, { "HighTemperature", 0xffff0084 }, - /* 0xffff0085-0xffff008f => Reserved */ + /* 0xffff0085-0xffff008f (minus 0xffff0086) => Reserved */ + { "Efficiency", 0xffff0086 }, { "Count", 0xffff0090 }, { "Timer", 0xffff0091 }, { "Interval", 0xffff0092 }, @@ -582,11 +589,17 @@ static models_name_t mge_model_names [] = { "PROTECTIONCENTER", "500", MGE_DEFAULT, "Protection Center 500" }, { "PROTECTIONCENTER", "675", MGE_DEFAULT, "Protection Center 675" }, - /* Protection Station */ + /* Protection Station, supports Eco control */ { "Protection Station", "500", MGE_PEGASUS, NULL }, { "Protection Station", "650", MGE_PEGASUS, NULL }, { "Protection Station", "800", MGE_PEGASUS, NULL }, + /* Ellipse ECO, also supports Eco control */ + { "Ellipse ECO", "650", MGE_PEGASUS, NULL }, + { "Ellipse ECO", "800", MGE_PEGASUS, NULL }, + { "Ellipse ECO", "1200", MGE_PEGASUS, NULL }, + { "Ellipse ECO", "1600", MGE_PEGASUS, NULL }, + /* Evolution models */ { "Evolution", "500", MGE_DEFAULT, "Pulsar Evolution 500" }, { "Evolution", "800", MGE_DEFAULT, "Pulsar Evolution 800" }, @@ -689,6 +702,7 @@ static hid_info_t mge_hid2nut[] = { "battery.charge.restart", ST_FLAG_RW | ST_FLAG_STRING, 3, "UPS.PowerSummary.RestartLevel", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "battery.capacity", 0, 0, "UPS.BatterySystem.Battery.DesignCapacity", NULL, "%s", HU_FLAG_STATIC, mge_battery_capacity }, /* conversion needed from As to Ah */ { "battery.runtime", 0, 0, "UPS.PowerSummary.RunTimeToEmpty", NULL, "%.0f", 0, NULL }, + { "battery.runtime.low", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.PowerSummary.RemainingTimeLimit", NULL, "%.0f", 0, NULL }, { "battery.runtime.elapsed", 0, 0, "UPS.StatisticSystem.Input.[1].Statistic.[1].Time", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL }, { "battery.temperature", 0, 0, "UPS.BatterySystem.Battery.Temperature", NULL, "%s", 0, kelvin_celsius_conversion }, { "battery.type", 0, 0, "UPS.PowerSummary.iDeviceChemistry", NULL, "%s", HU_FLAG_STATIC, stringid_conversion }, @@ -700,6 +714,7 @@ static hid_info_t mge_hid2nut[] = { "battery.energysave", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].EnergySaving", NULL, "%s", HU_FLAG_SEMI_STATIC, yes_no_info }, /* UPS page */ + { "ups.efficiency", 0, 0, "UPS.PowerConverter.Output.Efficiency", NULL, "%.0f", 0, NULL }, { "ups.firmware", 0, 0, "UPS.PowerSummary.iVersion", NULL, "%s", HU_FLAG_STATIC, stringid_conversion }, { "ups.load", 0, 0, "UPS.PowerSummary.PercentLoad", NULL, "%.0f", 0, NULL }, { "ups.load.high", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.Flow.[4].ConfigPercentLoad", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, @@ -767,7 +782,7 @@ static hid_info_t mge_hid2nut[] = /* Battery DC voltage too high! */ { "BOOL", 0, 0, "UPS.BatterySystem.Battery.PresentStatus.VoltageTooHigh", NULL, NULL, 0, battvolthi_info }, { "BOOL", 0, 0, "UPS.BatterySystem.Charger.PresentStatus.VoltageTooLow", NULL, NULL, 0, battvoltlo_info }, - { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.VoltageTooLow", NULL, NULL, 0, battvoltlo_info }, + { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.VoltageTooLow", NULL, NULL, 0, mge_onbatt_info }, { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.InternalFailure", NULL, NULL, 0, commfault_info }, { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.OverTemperature", NULL, NULL, 0, overheat_info }, { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.ShutdownImminent", NULL, NULL, 0, shutdownimm_info }, diff --git a/drivers/microdowell.c b/drivers/microdowell.c index 319edf1..33acc8e 100644 --- a/drivers/microdowell.c +++ b/drivers/microdowell.c @@ -221,13 +221,13 @@ unsigned char * CmdSerial(unsigned char *OutBuffer, int Len, unsigned char *RetB unsigned char *p ; int BuffLen ; - // The default error code (no received character) + /* The default error code (no received character) */ ErrCode = ERR_COM_NO_CHARS ; SendCmdToSerial(OutBuffer, Len) ; - usleep(10000) ; // small delay (1/100 s)) + usleep(10000) ; /* small delay (1/100 s) */ - // get chars until timeout + /* get chars until timeout */ BuffLen = 0 ; while (ser_get_char(upsfd, TmpBuff, 0, 10000) == 1) { diff --git a/drivers/powercom.c b/drivers/powercom.c index 9c75680..28ce962 100644 --- a/drivers/powercom.c +++ b/drivers/powercom.c @@ -7,7 +7,7 @@ * This model is based on PowerCom (www.powercom.com) models. * -Socomec Sicon Egys 420 * - * $Id: powercom.c 2336 2010-02-11 20:16:43Z adkorte-guest $ + * $Id: powercom.c 2990 2011-05-19 18:34:09Z aquette $ * * Copyrights: * (C) 2002 Simon Rozman @@ -51,6 +51,15 @@ * - strange battery level on BNT1200AP in online mode( & may be on other models) * - i don't know how connect to IMP|IMD USB * - i havn't specs for BNT 100-120V models. Add BNT-other type for it + * + * rev 0.13: Keven Ates + * - Modified functions to work for BNT-other 100-120V models. + * - Modified BNT-other type defaults to work for the BNT 1500A 120VA model. + * - Documented the type[] values purpose in a condensed format. + * - BNT-other can be used to perform a complete user override of values for all PowerCom models, detected or not. + * + * Tested on: BNT-1500A + * */ #include "main.h" @@ -59,7 +68,7 @@ #include "math.h" #define DRIVER_NAME "PowerCom protocol UPS driver" -#define DRIVER_VERSION "0.12" +#define DRIVER_VERSION "0.13" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -92,7 +101,28 @@ static unsigned int type = 0; static void dtr0rts1 (void); static void no_flow_control (void); -/* struct defining types */ +/* struct defining types + * --------------------- + * See powercom.h for detailed information and functions. + * + * The following type defaults use this definition: + * + * "TypeID", + * ByteCount, + * { "FlowControlString", FlowControlFuncPtr }, + * { { ValidationIndex, ValidationValue }, + * { ValidationIndex, ValidationValue }, + * { ValidationIndex, ValidationValue } }, + * { { DelayShutdownMinutes, DelayShutdownSeconds }, + * UseMinutesChar'y''n' }, + * { FrequencyFactor, FrequencyConstant }, + * { OfflineLoadFactor, OfflineLoadConstant, + * OnlineLoadFactor, OnlineLoadConstant }, + * { OfflineBatteryFactor, OfflineLoad%Factor, OfflineBatteryConstant, + * OnlineBatteryFactor, OnlineBatteryConstant }, + * { 240VoltageFactor, 240VoltageConstant, + * 120VoltageFactor, 120VoltageConstant }, + */ static struct type types[] = { { "Trust", @@ -166,10 +196,10 @@ static struct type types[] = { { "no_flow_control", no_flow_control }, { { 8U, 0U }, { 8U, 0U }, { 8U, 0U } }, { { 1U, 30U }, 'y' }, - { 0.00020803, 0.0 }, - { 1.4474, 0.0, 0.8594, 0.0 }, - { 5.0000, 0.3268, -825.00, 0.46511, 0 }, - { 1.9216, -0.0977, 0.82857, 0.0000 }, + { 0.00027778, 0.0000 }, + { 1.0000, 0.0000, 1.0000, 0.0000 }, + { 1.0000, 0.0000, 0.0000, 1.0000, 0.0000 }, + { 2.0000, 0.0000, 2.0000, 0.0000 }, }, }; @@ -217,10 +247,10 @@ enum status { OFF = 128U }; -unsigned int voltages[]={100,110,115,120,0,0,0,200,220,230,240}; -unsigned int BNTmodels[]={0,400,500,600,800,801,1000,1200,1500,2000}; -unsigned int KINmodels[]={0,425,500,525,625,800,1000,1200,1500,1600,2200,2200,2500,3000,5000}; -unsigned int IMPmodels[]={0,425,525,625,825,1025,1200,1500,2000}; +unsigned int voltages[]={100,110,115,120,0,0,0,200,220,230,240,0,0,0,0,0}; +unsigned int BNTmodels[]={0,400,500,600,800,801,1000,1200,1500,2000,0,0,0,0,0,0}; +unsigned int KINmodels[]={0,425,500,525,625,800,1000,1200,1500,1600,2200,2200,2500,3000,5000,0}; +unsigned int IMPmodels[]={0,425,525,625,825,1025,1200,1500,2000,0,0,0,0,0,0,0}; /* * local used functions @@ -338,6 +368,7 @@ static int ups_getinfo(void) /* optional dump of raw data */ if (nut_debug_level > 4) { + /* FIXME: use upsdebug_hex() ? */ printf("Raw data from UPS:\n"); for (i = 0; i < types[type].num_of_bytes_from_ups; i++) { printf("%2d 0x%02x (%c)\n", i, raw_data[i], raw_data[i]>=0x20 ? raw_data[i] : ' '); @@ -475,7 +506,7 @@ static float output_voltage(void) static float input_freq(void) { - if ( !strncmp(types[type].name, "BNT",3) || !strcmp(types[type].name, "KIN")) + if ( !strcmp(types[type].name, "BNT") || !strcmp(types[type].name, "KIN")) return 4807.0/raw_data[INPUT_FREQUENCY]; else if ( !strcmp(types[type].name, "IMP")) return raw_data[INPUT_FREQUENCY]; @@ -487,7 +518,7 @@ static float input_freq(void) static float output_freq(void) { - if ( !strncmp(types[type].name, "BNT",3) || !strcmp(types[type].name, "KIN")) + if ( !strcmp(types[type].name, "BNT") || !strcmp(types[type].name, "KIN")) return 4807.0/raw_data[OUTPUT_FREQUENCY]; else if ( !strcmp(types[type].name, "IMP")) return raw_data[OUTPUT_FREQUENCY]; @@ -574,7 +605,7 @@ static float batt_level(void) int bat0,bat29,bat100,model; float battval; - if ( !strncmp(types[type].name, "BNT",3) ) { + if ( !strcmp(types[type].name, "BNT") ) { bat0=157; bat29=165; bat100=193; @@ -617,11 +648,13 @@ static float batt_level(void) } if ( !strcmp(types[type].name, "IMP")) return raw_data[BATTERY_CHARGE]; - return raw_data[STATUS_A] & ONLINE ? + return raw_data[STATUS_A] & ONLINE ? /* Are we on battery power? */ + /* Yes */ types[type].battpct[0] * raw_data[BATTERY_CHARGE] + types[type].battpct[1] * load_level() + types[type].battpct[2] : + /* No */ types[type].battpct[3] * raw_data[BATTERY_CHARGE] + - types[type].battpct[4]; + types[type].battpct[4]; } /* @@ -852,27 +885,31 @@ void upsdrv_initups(void) /* setup flow control */ types[type].flowControl.setup_flow_control(); + + /* Setup Model and LineVoltage */ if (!strncmp(types[type].name, "BNT",3) || !strcmp(types[type].name, "KIN") || !strcmp(types[type].name, "IMP")){ if (!ups_getinfo()) return; - if (raw_data[UPSVERSION]==0xFF){ + /* Give "BNT-other" a chance! */ + if (raw_data[MODELNAME]==0x42 || raw_data[MODELNAME]==0x4B){ + model=BNTmodels[raw_data[MODELNUMBER]/16]; + if (!strcmp(types[type].name, "BNT-other")) + types[type].name="BNT-other"; + else if (raw_data[MODELNAME]==0x42) + types[type].name="BNT"; + else if (raw_data[MODELNAME]==0x4B){ + types[type].name="KIN"; + model=KINmodels[raw_data[MODELNUMBER]/16]; + } + } + else if (raw_data[UPSVERSION]==0xFF){ types[type].name="IMP"; model=IMPmodels[raw_data[MODELNUMBER]/16]; } - if (raw_data[MODELNAME]==0x42){ - if (!strcmp(types[type].name, "BNT-other")) - types[type].name="BNT-other"; - else - types[type].name="BNT"; - model=BNTmodels[raw_data[MODELNUMBER]/16]; - } - if (raw_data[MODELNAME]==0x4B){ - types[type].name="KIN"; - model=KINmodels[raw_data[MODELNUMBER]/16]; - } linevoltage=voltages[raw_data[MODELNUMBER]%16]; snprintf(buf,sizeof(buf),"%s-%dAP",types[type].name,model); - modelname=buf; - upsdebugx(1,"Detected: %s , %dV",modelname,linevoltage); + if (!strcmp(modelname, "Unknown")) + modelname=buf; + upsdebugx(1,"Detected: %s , %dV",buf,linevoltage); if (ser_send_char (upsfd, BATTERY_TEST) != 1) { upslogx(LOG_NOTICE, "writing error"); dstate_datastale(); @@ -922,23 +959,65 @@ void upsdrv_initups(void) /* display help */ void upsdrv_help(void) { - printf("You must specify type in ups.conf\n"); - printf("Type of UPS like 'Trust', 'Egys', 'KP625AP', 'IMP', 'KIN' or 'BNT' or 'BNT-other' (default: 'Trust')\n"); - printf("BNT-other - it's a special type for BNT 100-120V models \n"); - printf("You can additional cpecify next variables:\n"); - printf(" shutdownArguments: The number of delay arguments and their values for the shutdown operation\n"); - printf("Also, you can specify next variables (not work for 'IMP', 'KIN' or 'BNT', because detected automatically or known\n"); - printf(" manufacturer: Specify manufacturer name (default: 'PowerCom')\n"); - printf(" modelname: Specify model name, because it cannot detect automagically (default: Unknown)\n"); - printf(" serialnumber: Specify serial number, because it cannot detect automatically (default: Unknown)\n"); - printf(" linevoltage: Specify line voltage (110-120 or 220-240 V), if it cannot detect automatically (default: 230 V)\n"); - printf(" numOfBytesFromUPS: The number of bytes in a UPS frame\n"); - printf(" methodOfFlowControl: The flow control method engaged by the UPS\n"); - printf(" validationSequence: 3 pairs to be used for validating the UPS\n"); - printf(" voltage: A quad to convert the raw data to human readable voltage\n"); - printf(" frequency: A pair to convert the raw data to human readable freqency\n"); - printf(" batteryPercentage: A 5 tuple to convert the raw data to human readable battery percentage\n"); - printf(" loadPercentage: A quad to convert the raw data to human readable load percentage\n"); + // 1 2 3 4 5 6 7 8 + // 12345678901234567890123456789012345678901234567890123456789012345678901234567890 MAX + printf("\n"); + printf("Specify UPS information in the ups.conf file.\n"); + printf(" type: Type of UPS: 'Trust','Egys','KP625AP','IMP','KIN','BNT',\n"); + printf(" 'BNT-other' (default: 'Trust')\n"); + printf(" 'BNT-other' is a special type intended for BNT 100-120V models,\n"); + printf(" but can be used to override ALL models.\n"); + printf("You can additional specify these variables:\n"); + printf(" manufacturer: Manufacturer name (default: 'PowerCom')\n"); + printf(" modelname: Model name (default: 'Unknown' or autodetected)\n"); + printf(" serialnumber: Serial number (default: Unknown)\n"); + printf(" shutdownArguments: 3 delay arguments for the shutdown operation:\n"); + printf(" {{Minutes,Seconds},UseMinutes?}\n"); + printf(" where Minutes and Seconds are integer, UseMinutes? is either\n"); + printf(" 'y' or 'n'.\n"); + printf("You can specify these variables if not automagically detected for types\n"); + printf(" 'IMP','KIN','BNT'\n"); + printf(" linevoltage: Line voltage: 110-120 or 220-240 (default: 230)\n"); + printf(" numOfBytesFromUPS: Number of bytes in a UPS frame: 16 is common, 11 for 'Trust'\n"); + printf(" methodOfFlowControl: Flow control method for UPS:\n"); + printf(" 'dtr0rts1', 'dtr1' or 'no_flow_control'\n"); + printf(" validationSequence: 3 pairs of validation values: {{I,V},{I,V},{I,V}}\n"); + printf(" where I is the index into BytesFromUPS (see numOfBytesFromUPS)\n"); + printf(" and V is the value for the ByteIndex to match.\n"); + printf(" frequency: Input & Output Frequency conversion values: {A, B}\n"); + printf(" used in function: 1/(A*x+B)\n"); + printf(" If the raw value x IS the frequency, then A=1/(x^2), B=0\n"); + printf(" loadPercentage: Load conversion values for Battery and Line load: {BA,BB,LA,LB}\n"); + printf(" used in function: A*x+B\n"); + printf(" If the raw value x IS the Load Percent, then A=1, B=0\n"); + printf(" batteryPercentage: Battery conversion values for Battery and Line power:\n"); + printf(" {A,B,C,D,E}\n"); + printf(" used in functions: (Battery) A*x+B*y+C, (Line) D*x+E\n"); + printf(" If the raw value x IS the Battery Percent, then\n"); + printf(" A=1, B=0, C=0, D=1, E=0\n"); + printf(" voltage: Voltage conversion values for 240 and 120 voltage:\n"); + printf(" {240A,240B,120A,120B}\n"); + printf(" used in function: A*x+B\n"); + printf(" If the raw value x IS HALF the Voltage, then A=2, B=0\n\n"); + + printf("Example for BNT1500AP in ups.conf:\n"); + printf("[BNT1500AP]\n"); + printf(" driver = powercom\n"); + printf(" port = /dev/ttyS0\n"); + printf(" desc = \"PowerCom BNT 1500 AP\"\n"); + printf(" manufacturer = PowerCom\n"); + printf(" modelname = BNT1500AP\n"); + printf(" serialnumber = 13245678900\n"); + printf(" type = BNT-other\n"); + printf("# linevoltage = 120\n"); + printf("# numOfBytesFromUPS = 16\n"); + printf("# methodOfFlowControl = no_flow_control\n"); + printf("# validationSequence = {{8,0},{8,0},{8,0}}\n"); + printf("# shutdownArguments = {{1,30},y}\n"); + printf("# frequency = {0.00027778,0.0000}\n"); + printf("# loadPercentage = {1.0000,0.0,1.0000,0.0}\n"); + printf("# batteryPercentage = {1.0000,0.0000,0.0000,1.0000,0.0000}\n"); + printf("# voltage = {2.0000,0.0000,2.0000,0.0000}\n"); return; } @@ -962,20 +1041,36 @@ void upsdrv_initinfo(void) /* define possible arguments */ void upsdrv_makevartable(void) { - addvar(VAR_VALUE, "manufacturer", "Specify manufacturer name (default: 'PowerCom')"); - addvar(VAR_VALUE, "linevoltage", "Specify line voltage (110-120 or 220-240 V), if it cannot detect automatically (default: 230 V)"); - addvar(VAR_VALUE, "modelname", "Specify model name, because it cannot detect automagically (default: Unknown)"); - addvar(VAR_VALUE, "serialnumber", "Specify serial number, because it cannot detect automatically (default: Unknown)"); - addvar(VAR_VALUE, "type", "Type of UPS like 'Trust', 'Egys', 'KP625AP', 'IMP', 'KIN' or 'BNT' or 'BNT-other' (default: 'Trust')"); - addvar(VAR_VALUE, "numOfBytesFromUPS", "The number of bytes in a UPS frame"); - addvar(VAR_VALUE, "methodOfFlowControl", "The flow control method engaged by the UPS"); - addvar(VAR_VALUE, "shutdownArguments", "The number of delay arguments and their values for the shutdown operation"); - addvar(VAR_VALUE, "validationSequence", "3 pairs to be used for validating the UPS"); + // 1 2 3 4 5 6 7 8 + //2345678901234567890123456789012345678901234567890123456789012345678901234567890 MAX + addvar(VAR_VALUE, "type", + "Type of UPS: 'Trust','Egys','KP625AP','IMP','KIN','BNT','BNT-other'\n" + " (default: 'Trust')"); + addvar(VAR_VALUE, "manufacturer", + "Manufacturer name (default: 'PowerCom')"); + addvar(VAR_VALUE, "modelname", + "Model name [cannot be detected] (default: Unknown)"); + addvar(VAR_VALUE, "serialnumber", + "Serial number [cannot be detected] (default: Unknown)"); + addvar(VAR_VALUE, "shutdownArguments", + "Delay values for shutdown: Minutes, Seconds, UseMinutes?'y'or'n'"); + addvar(VAR_VALUE, "linevoltage", + "Line voltage 110-120 or 220-240 V (default: 230)"); + addvar(VAR_VALUE, "numOfBytesFromUPS", + "The number of bytes in a UPS frame"); + addvar(VAR_VALUE, "methodOfFlowControl", + "Flow control method for UPS: 'dtr0rts1' or 'no_flow_control'"); + addvar(VAR_VALUE, "validationSequence", + "Validation values: ByteIndex, ByteValue x 3"); if ( strcmp(types[type].name, "KIN") && strcmp(types[type].name, "BNT") && strcmp(types[type].name, "IMP")) { - addvar(VAR_VALUE, "voltage", "A quad to convert the raw data to human readable voltage"); - addvar(VAR_VALUE, "frequency", "A pair to convert the raw data to human readable freqency"); - addvar(VAR_VALUE, "batteryPercentage", "A 5 tuple to convert the raw data to human readable battery percentage"); - addvar(VAR_VALUE, "loadPercentage", "A quad to convert the raw data to human readable load percentage"); + addvar(VAR_VALUE, "frequency", + "Frequency conversion values: FreqFactor, FreqConst"); + addvar(VAR_VALUE, "loadPercentage", + "Load conversion values: OffFactor, OffConst, OnFactor, OnConst"); + addvar(VAR_VALUE, "batteryPercentage", + "Battery conversion values: OffFactor, LoadFactor, OffConst, OnFactor, OnConst"); + addvar(VAR_VALUE, "voltage", + "Voltage conversion values: 240VFactor, 240VConst, 120VFactor, 120VConst"); } } diff --git a/drivers/powercom.h b/drivers/powercom.h index 8209099..3286860 100644 --- a/drivers/powercom.h +++ b/drivers/powercom.h @@ -1,7 +1,7 @@ /* * powercom.h - defines for the newpowercom.c driver * - * $Id: powercom.h 2627 2010-10-26 21:09:34Z adkorte-guest $ + * $Id: powercom.h 2984 2011-05-13 13:18:34Z aquette $ * * Copyrights: * (C) 2002 Simon Rozman @@ -62,39 +62,39 @@ struct type { * the COUNTER commands while others are known to work with the * seconds argument alone. */ - struct deley_for_power_kill { + struct delay_for_power_kill { unsigned int delay[2]; /* { minutes, seconds } */ unsigned char minutesShouldBeUsed; - /* 'n' in case the minutes value, which is deley[0], should + /* 'n' in case the minutes value, which is delay[0], should * be skipped and not sent to the UPS. */ } shutdown_arguments; - /* parameters to calculate input and output freq., one pair for - * each type: - * Each pair defines parameters for 1/(A*x+B) to calculate freq. - * from raw data + /* parameters to calculate input and output freq., one pair used for + * both input and output functions: + * The pair [0],[1] defines parameters for 1/(A*x+B) to calculate freq. + * from raw data 'x'. */ float freq[2]; /* parameters to calculate load %, two pairs for each type: - * First pair defines the parameters for A*x+B to calculate load - * from raw data when offline and the second pair is used when + * First pair [0],[1] defines the parameters for A*x+B to calculate load + * from raw data when offline and the second pair [2],[3] is used when * online */ float loadpct[4]; /* parameters to calculate battery %, five parameters for each type: - * First three params defines the parameters for A*x+B*y+C to calculate + * First three params [0],[1],[2] defines the parameters for A*x+B*y+C to calculate * battery % (x is raw data, y is load %) when offline. - * Fourth and fifth parameters are used to calculate D*y+E when online. + * Fourth and fifth parameters [3],[4] are used to calculate D*x+E when online. */ float battpct[5]; /* parameters to calculate utility and output voltage, two pairs for * each type: - * First pair defines the parameters for A*x+B to calculate utility - * from raw data when line voltage is >=220 and the second pair + * First pair [0],[1] defines the parameters for A*x+B to calculate utility + * from raw data when line voltage is >=220 and the second pair [2],[3] * is used otherwise. */ float voltage[4]; diff --git a/drivers/rhino.c b/drivers/rhino.c index 6839fde..ca66169 100644 --- a/drivers/rhino.c +++ b/drivers/rhino.c @@ -22,7 +22,7 @@ 2005/10/26 - Version 0.40 - Operational-2 release 2005/11/29 - Version 0.50 - rhino commands release - + http://www.microsol.com.br */ @@ -63,28 +63,27 @@ typedef int bool_t; #define CMD_PASSOFF 0x0006 #define CMD_UPSCONT 0x0053 -/* xoff - xon protocol -#define _SOH = 0x01; // start of header -#define _EOT = 0x04; // end of transmission -#define _ACK = 0x06; // acknoledge (positive) -#define _DLE = 0x10; // data link escape -#define _XOn = 0x11; // transmit on -#define _XOff = 0x13; // transmit off -#define _NAK = 0x15; // negative acknoledge -#define _SYN = 0x16; // synchronous idle -#define _CAN = 0x18; // cancel -*/ +/* xoff - xon protocol */ +#define _SOH = 0x01; /* start of header */ +#define _EOT = 0x04; /* end of transmission */ +#define _ACK = 0x06; /* acknoledge (positive) */ +#define _DLE = 0x10; /* data link escape */ +#define _XOn = 0x11; /* transmit on */ +#define _XOff = 0x13; /* transmit off */ +#define _NAK = 0x15; /* negative acknoledge */ +#define _SYN = 0x16; /* synchronous idle */ +#define _CAN = 0x18; /* cancel */ static int const pacsize = 37; /* size of receive data package */ /* autonomy calcule */ -static double const AmpH = 40; // Amperes-hora da bateria -static double const VbatMin = 126; // Tensão mínina das baterias -static double const VbatNom = 144; // Tensão nominal das baterias -static double const FM = 0.32; // Fator multiplicativo de correção da autonomia -static double const FA = -2; // Fator aditivo de correção da autonomia -static double const ConstInt = 250; // Consumo interno sem o carregador -static double const Vin = 220; // Tensão de entrada +static double const AmpH = 40; /* Amperes-hora da bateria */ +static double const VbatMin = 126; /* Tensão mínina das baterias */ +static double const VbatNom = 144; /* Tensão nominal das baterias */ +static double const FM = 0.32; /* Fator multiplicativo de correção da autonomia */ +static double const FA = -2; /* Fator aditivo de correção da autonomia */ +static double const ConstInt = 250; /* Consumo interno sem o carregador */ +static double const Vin = 220; /* Tensão de entrada */ static int Day, Month, Year; static int dian=0, mesn=0, anon=0, weekn=0; @@ -93,8 +92,8 @@ static int ihour,imin, isec; /* char seman[4]; */ /* int FExpansaoBateria; */ -// internal variables -// package handshake ariables +/* internal variables */ +/* package handshake variables */ /* int ContadorEstouro; */ static bool_t detected; static bool_t SourceFail, Out110, RedeAnterior, OcorrenciaDeFalha; @@ -125,7 +124,7 @@ static int BoostVolt, Rendimento; static unsigned char StatusEntrada, StatusSaida, StatusBateria; /* events group */ static unsigned char EventosRede, EventosSaida, EventosBateria; -// Grupo de Programação +/* Grupo de Programação */ /* Methods */ static void ScanReceivePack(void); @@ -261,16 +260,16 @@ ScanReceivePack( void ) if( RecPack[0] ==0xC2 ) { LimInfBattSrc = 174; - LimSupBattSrc = 192;//180????? carregador eh 180 (SCOPOS) + LimSupBattSrc = 192;/* 180????? carregador eh 180 (SCOPOS) */ LimInfBattInv = 174; - LimSupBattInv = 192;//170????? (SCOPOS) + LimSupBattInv = 192;/* 170????? (SCOPOS) */ } else { LimInfBattSrc = 138; - LimSupBattSrc = 162;//180????? carregador eh 180 (SCOPOS) + LimSupBattSrc = 162;/* 180????? carregador eh 180 (SCOPOS) */ LimInfBattInv = 126; - LimSupBattInv = 156;//170????? (SCOPOS) + LimSupBattInv = 156;/* 170????? (SCOPOS) */ } BattNonValue = 144; @@ -300,10 +299,10 @@ ScanReceivePack( void ) if( BypassOn ) OutVoltage = ( InVoltage * 1.0 / 2 ) + 5; - if( SourceFail && RedeAnterior ) // falha pela primeira vez + if( SourceFail && RedeAnterior ) /* falha pela primeira vez */ OcorrenciaDeFalha = true; - if( !( SourceFail ) && !( RedeAnterior ) ) // retorno da rede + if( !( SourceFail ) && !( RedeAnterior ) ) /* retorno da rede */ RetornoDaRede = true; if( !( SourceFail ) == RedeAnterior ) @@ -333,7 +332,7 @@ ScanReceivePack( void ) RecPack[8] = 99; /* ??????????????????????????????????? */ } - if( OutputOn ) // Output Status + if( OutputOn ) /* Output Status */ StatusSaida = 2; else StatusSaida = 1; @@ -341,7 +340,7 @@ ScanReceivePack( void ) if( OverCharge ) StatusSaida = 3; - if( CriticBatt ) // Battery Status + if( CriticBatt ) /* Battery Status */ StatusBateria = 4; else StatusBateria = 1; @@ -494,7 +493,7 @@ send_command( int cmd ) if( i == 1) chk = cmd; else - chk = 0x00; // 0x20; + chk = 0x00; /* 0x20; */ } ch = chk; @@ -511,7 +510,7 @@ send_command( int cmd ) kount = 0; while ( kount < 5 ) { - /* ret = ser_send_buf_pace(upsfd, UPSDELAY, psend, sizes );// optional delay */ + /* ret = ser_send_buf_pace(upsfd, UPSDELAY, psend, sizes ); */ /* optional delay */ for(i=0; i < 19; i++) { @@ -564,7 +563,7 @@ static void getbaseinfo(void) while ( ( !detected ) && ( j < 10 ) ) { - temp[0] = 0; // flush temp buffer + temp[0] = 0; /* flush temp buffer */ tam = ser_get_buf_len(upsfd, temp, pacsize, 3, 0); if( tam == 37 ) { @@ -628,10 +627,10 @@ static void getbaseinfo(void) dstate_setinfo("input.transfer.high", "%03.1f", InUpLim); LimSupBattInv ? */ - dstate_addcmd("shutdown.stayoff"); // CMD_SHUT + dstate_addcmd("shutdown.stayoff"); /* CMD_SHUT */ /* there is no reserved words for CMD_INON and CMD_INOFF yet */ - /* dstate_addcmd("input.on"); // CMD_INON = 1 */ - /* dstate_addcmd("input.off"); // CMD_INOFF = 2 */ + /* dstate_addcmd("input.on"); */ /* CMD_INON = 1 */ + /* dstate_addcmd("input.off"); */ /* CMD_INOFF = 2 */ dstate_addcmd("load.on"); /* CMD_OUTON = 3 */ dstate_addcmd("load.off"); /* CMD_OUTOFF = 4 */ dstate_addcmd("bypass.start"); /* CMD_PASSON = 5 */ @@ -671,7 +670,7 @@ static int instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "shutdown.stayoff")) { - // shutdown now (one way) + /* shutdown now (one way) */ /* send_command( CMD_SHUT ); */ sendshut(); return STAT_INSTCMD_HANDLED; @@ -679,7 +678,7 @@ static int instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "load.on")) { - // liga Saida + /* liga Saida */ ret = send_command( 3 ); if ( ret < 1 ) upslogx(LOG_ERR, "send_command 3 failed"); @@ -688,7 +687,7 @@ static int instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "load.off")) { - // desliga Saida + /* desliga Saida */ ret = send_command( 4 ); if ( ret < 1 ) upslogx(LOG_ERR, "send_command 4 failed"); @@ -697,7 +696,7 @@ static int instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "bypass.start")) { - // liga Bypass + /* liga Bypass */ ret = send_command( 5 ); if ( ret < 1 ) upslogx(LOG_ERR, "send_command 5 failed"); @@ -706,7 +705,7 @@ static int instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "bypass.stop")) { - // desliga Bypass + /* desliga Bypass */ ret = send_command( 6 ); if ( ret < 1 ) upslogx(LOG_ERR, "send_command 6 failed"); @@ -771,7 +770,7 @@ void upsdrv_shutdown(void) /* on line: send normal shutdown, ups will return by itself on utility */ /* on battery: send shutdown+return, ups will cycle and return soon */ - if (!SourceFail) // on line + if (!SourceFail) /* on line */ { printf("On line, forcing shutdown command...\n"); send_command( CMD_SHUT ); diff --git a/drivers/snmp-ups.c b/drivers/snmp-ups.c index d852dc5..344f514 100644 --- a/drivers/snmp-ups.c +++ b/drivers/snmp-ups.c @@ -484,7 +484,7 @@ bool_t nut_snmp_get_str(const char *OID, char *buf, size_t buf_len, info_lkp_t * len = snprintf(buf, buf_len, "%ld", *pdu->variables->val.integer / 100); break; default: - upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s", + upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s", upsname?upsname:device_name, pdu->variables->type, OID); return FALSE; break; @@ -524,7 +524,7 @@ bool_t nut_snmp_get_int(const char *OID, long *pval) value = *pdu->variables->val.integer / 100; break; default: - upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s", + upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s", upsname?upsname:device_name, pdu->variables->type, OID); return FALSE; break; @@ -1459,7 +1459,7 @@ static int parse_mibconf_args(int numargs, char **arg) if (ret == FALSE) upslogx(LOG_ERR, "su_setvar: cannot set value %s for %s", arg[4], arg[3]); else - upsdebugx(1, "su_setvar: sucessfully set %s to \"%s\"", arg[0], arg[4]); + upsdebugx(1, "su_setvar: successfully set %s to \"%s\"", arg[0], arg[4]); return 1; } diff --git a/drivers/solis.c b/drivers/solis.c index 0ff49a7..f2e47f7 100644 --- a/drivers/solis.c +++ b/drivers/solis.c @@ -282,23 +282,12 @@ static unsigned char revertdays( unsigned char dweek ) static int IsHour( char *strx, int qual ) { - char shora[3], smin[3], sep[2]; - int hora=0, min = 0, len = 0; + int hora=0, min = 0; - len = strlen( strx ); - if ( len != 5 ) - return -1; - sscanf( strx, "%2s%1s%2s", shora, sep, smin); - if( sep[0] != ':' ) - return -1; - if( (!isdigit( shora[0] )) || (!isdigit( shora[1] )) ) - return -1; - if( (!isdigit( smin[0] )) || (!isdigit( smin[1] )) ) + if ((strlen(strx) != 5) || (sscanf(strx, "%d:%d", &hora, &min) != 2)) { return -1; + } - hora = atoi( shora ); - min = atoi( smin ); - if( qual ) { dhour = hora; dmin = min; @@ -408,7 +397,7 @@ static int IsToday( unsigned char dweek, int nweek) switch ( nweek ) { - case 0: // sunday + case 0: /* sunday */ return ( ( ( dweek & 0x40 ) == 0x40 ) ); case 1: return ( ( ( dweek & 0x20 ) == 0x20 ) ); @@ -420,7 +409,7 @@ static int IsToday( unsigned char dweek, int nweek) return ( ( ( dweek & 0x04 ) == 0x04 ) ); case 5: return ( ( ( dweek & 0x02 ) == 0x02 ) ); - case 6: // saturday + case 6: /* saturday */ return ( ( ( dweek & 0x01 ) == 0x01 ) ); } @@ -802,7 +791,7 @@ static void getbaseinfo(void) #else char DaysOfWeek[7][4]={"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; #endif - char mycmd[8]; // , ch; + char mycmd[8]; char *str1, *str2, *str3, *str4, *strx; unsigned char Pacote[25]; int i, i1=0, i2=0, j=0, tam, tpac=25; @@ -871,7 +860,7 @@ static void getbaseinfo(void) } } - } // end prgups 1 - 2 + } /* end prgups 1 - 2 */ /* dummy read attempt to sync - throw it out */ snprintf(mycmd, sizeof(mycmd), "%c%c",CMD_UPSCONT, ENDCHAR); @@ -879,7 +868,7 @@ static void getbaseinfo(void) /* trying detect solis model */ while ( ( !detected ) && ( j < 20 ) ) { - temp[0] = 0; // flush temp buffer + temp[0] = 0; /* flush temp buffer */ tam = ser_get_buf_len(upsfd, temp, tpac, 3, 0); if( tam == 25 ) { for( i = 0 ; i < tam ; i++ ) { @@ -1011,17 +1000,17 @@ static int instcmd(const char *cmdname, const char *extra) { if (!strcasecmp(cmdname, "shutdown.return")) { - // shutdown and restart - ser_send_char(upsfd, CMD_SHUTRET); // 0xDE - // ser_send_char(upsfd, ENDCHAR); + /* shutdown and restart */ + ser_send_char(upsfd, CMD_SHUTRET); /* 0xDE */ + /* ser_send_char(upsfd, ENDCHAR); */ return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "shutdown.stayoff")) { - // shutdown now (one way) - ser_send_char(upsfd, CMD_SHUT); // 0xDD - // ser_send_char(upsfd, ENDCHAR); + /* shutdown now (one way) */ + ser_send_char(upsfd, CMD_SHUT); /* 0xDD */ + /* ser_send_char(upsfd, ENDCHAR); */ return STAT_INSTCMD_HANDLED; } @@ -1082,7 +1071,7 @@ void upsdrv_shutdown(void) /* on battery: send normal shutdown, ups will return by itself on utility */ /* on line: send shutdown+return, ups will cycle and return soon */ - if (!SourceFail) { // on line + if (!SourceFail) { /* on line */ printf("On line, sending shutdown+return command...\n"); ser_send_char(upsfd, CMD_SHUTRET ); diff --git a/drivers/usb-common.h b/drivers/usb-common.h index 8df0b5a..9ab1fce 100644 --- a/drivers/usb-common.h +++ b/drivers/usb-common.h @@ -71,7 +71,10 @@ void USBFreeExactMatcher(USBDeviceMatcher_t *matcher); void USBFreeRegexMatcher(USBDeviceMatcher_t *matcher); /* dummy USB function and macro, inspired from the Linux kernel - * this allows USB information extraction */ + * this allows USB information extraction + * CAUTION: only use with *valid* device identifiers, Ie the following is not + * valid (from blazer_usb, krauler subdriver): 0x0001:0x0000 + */ #define USB_DEVICE(vendorID, productID) vendorID, productID typedef struct { diff --git a/include/Makefile.am b/include/Makefile.am index bd2ee4b..51894b6 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,9 +1,8 @@ EXTRA_DIST = attribute.h common.h extstate.h parseconf.h proto.h \ - state.h timehead.h upsconf.h + state.h timehead.h upsconf.h nut_stdint.h # http://www.gnu.org/software/automake/manual/automake.html#Clean -BUILT_SOURCES = nut_version.h nut_stdint.h -DISTCLEANFILES = nut_stdint.h +BUILT_SOURCES = nut_version.h CLEANFILES = nut_version.h # magic to include SVN revision number in NUT version string diff --git a/include/Makefile.in b/include/Makefile.in index 81a05c6..6767600 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -39,7 +39,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ @@ -226,12 +225,11 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ EXTRA_DIST = attribute.h common.h extstate.h parseconf.h proto.h \ - state.h timehead.h upsconf.h + state.h timehead.h upsconf.h nut_stdint.h # http://www.gnu.org/software/automake/manual/automake.html#Clean -BUILT_SOURCES = nut_version.h nut_stdint.h -DISTCLEANFILES = nut_stdint.h +BUILT_SOURCES = nut_version.h CLEANFILES = nut_version.h all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -355,7 +353,6 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" diff --git a/include/config.h.in b/include/config.h.in index e2df661..ae5bb0a 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -288,21 +288,6 @@ /* User to switch to if started as root */ #undef RUN_AS_USER -/* The size of `char', as computed by sizeof. */ -#undef SIZEOF_CHAR - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `short', as computed by sizeof. */ -#undef SIZEOF_SHORT - -/* The size of `void*', as computed by sizeof. */ -#undef SIZEOF_VOIDP - /* Path for UPS driver state files */ #undef STATEPATH diff --git a/include/nut_stdint.h b/include/nut_stdint.h new file mode 100644 index 0000000..35292ee --- /dev/null +++ b/include/nut_stdint.h @@ -0,0 +1,34 @@ +/* + * nut_stdint.h - Network UPS Tools sets of integer types having specified widths + * + * Copyright (C) 2011 Arjen de Korte + * + * 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 NUT_STDINT_H_SEEN +#define NUT_STDINT_H_SEEN + +#include "config.h" + +#if defined HAVE_INTTYPES_H +# include +#endif + +#if defined HAVE_STDINT_H +# include +#endif + +#endif /* NUT_STDINT_H_SEEN */ diff --git a/include/nut_version.h b/include/nut_version.h index b830a50..42cfb0c 100644 --- a/include/nut_version.h +++ b/include/nut_version.h @@ -1,3 +1,3 @@ /* Autogenerated file. Do not change. */ /* This file was generated by "make". */ -#define NUT_VERSION_MACRO "2.6.0-2831:2832" +#define NUT_VERSION_MACRO "2.6.1-3015:3023" diff --git a/lib/Makefile.in b/lib/Makefile.in index e3e5b8a..73e3a58 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -43,7 +43,6 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/libupsclient-config.in $(srcdir)/libupsclient.pc.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ diff --git a/lib/libupsclient-config.in b/lib/libupsclient-config.in index a7de7d5..2a59f70 100644 --- a/lib/libupsclient-config.in +++ b/lib/libupsclient-config.in @@ -10,7 +10,7 @@ Version="@PACKAGE_VERSION@" prefix=@prefix@ exec_prefix=@exec_prefix@ -Libs="-L@libdir@ -lupsclient @LIBSSL_LDFLAGS@" +Libs="-L@libdir@ -lupsclient @LIBSSL_LIBS@" Cflags="-I@includedir@ @LIBSSL_CFLAGS@" case "$1" in diff --git a/lib/libupsclient.pc.in b/lib/libupsclient.pc.in index eb6826c..4ad31fb 100644 --- a/lib/libupsclient.pc.in +++ b/lib/libupsclient.pc.in @@ -9,5 +9,5 @@ nutuser=@RUN_AS_USER@ Name: libupsclient Description: UPS monitoring with Network UPS Tools Version: @PACKAGE_VERSION@ -Libs: -L${libdir} -lupsclient @LIBSSL_LDFLAGS@ +Libs: -L${libdir} -lupsclient @LIBSSL_LIBS@ Cflags: -I${includedir} @LIBSSL_CFLAGS@ diff --git a/ltmain.sh b/ltmain.sh index 7ed280b..fa4b1e1 100755 --- a/ltmain.sh +++ b/ltmain.sh @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" TIMESTAMP="" package_revision=1.3017 diff --git a/m4/ax_create_stdint_h.m4 b/m4/ax_create_stdint_h.m4 deleted file mode 100644 index f2a94e1..0000000 --- a/m4/ax_create_stdint_h.m4 +++ /dev/null @@ -1,725 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_create_stdint_h.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] -# -# DESCRIPTION -# -# the "ISO C9X: 7.18 Integer types " section requires the -# existence of an include file that defines a set of typedefs, -# especially uint8_t,int32_t,uintptr_t. Many older installations will not -# provide this file, but some will have the very same definitions in -# . In other enviroments we can use the inet-types in -# which would define the typedefs int8_t and u_int8_t -# respectivly. -# -# This macros will create a local "_stdint.h" or the headerfile given as -# an argument. In many cases that file will just "#include " or -# "#include ", while in other environments it will provide the -# set of basic 'stdint's definitions/typedefs: -# -# int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t -# int_least32_t.. int_fast32_t.. intmax_t -# -# which may or may not rely on the definitions of other files, or using -# the AC_CHECK_SIZEOF macro to determine the actual sizeof each type. -# -# if your header files require the stdint-types you will want to create an -# installable file mylib-int.h that all your other installable header may -# include. So if you have a library package named "mylib", just use -# -# AX_CREATE_STDINT_H(mylib-int.h) -# -# in configure.ac and go to install that very header file in Makefile.am -# along with the other headers (mylib.h) - and the mylib-specific headers -# can simply use "#include " to obtain the stdint-types. -# -# Remember, if the system already had a valid , the generated -# file will include it directly. No need for fuzzy HAVE_STDINT_H things... -# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99 -# compilation and the c99-mode is not the default. Therefore this macro -# will not use the compiler's stdint.h - please complain to the GCC -# developers). -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# -# 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -AC_DEFUN([AX_CHECK_DATA_MODEL],[ - AC_CHECK_SIZEOF(char) - AC_CHECK_SIZEOF(short) - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(void*) - ac_cv_char_data_model="" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" - AC_MSG_CHECKING([data model]) - case "$ac_cv_char_data_model/$ac_cv_long_data_model" in - 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; - 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; - 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; - 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; - 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; - 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; - 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; - 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; - 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; - 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; - 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; - 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; - 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; - 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; - 222/*|333/*|444/*|666/*|888/*) : - ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; - *) ac_cv_data_model="none" ; n="very unusual model" ;; - esac - AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)]) -]) - -dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF]) -AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[ -AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ - ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h]) - do - unset ac_cv_type_uintptr_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$2],[$2]) break - done - AC_MSG_CHECKING([for stdint uintptr_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ -AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ - ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h]) - do - unset ac_cv_type_uint32_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$2],[$2]) break - break; - done - AC_MSG_CHECKING([for stdint uint32_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ -AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ - ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do - unset ac_cv_type_u_int32_t - unset ac_cv_type_u_int64_t - AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$2],[$2]) break - break; - done - AC_MSG_CHECKING([for stdint u_int32_t]) - ]) -]) - -AC_DEFUN([AX_CREATE_STDINT_H], -[# ------ AX CREATE STDINT H ------------------------------------- -AC_MSG_CHECKING([for stdint types]) -ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` -# try to shortcircuit - if the default include path of the compiler -# can find a "stdint.h" header then we assume that all compilers can. -AC_CACHE_VAL([ac_cv_header_stdint_t],[ -old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" -old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" -old_CFLAGS="$CFLAGS" ; CFLAGS="" -AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], -[ac_cv_stdint_result="(assuming C99 compatible system)" - ac_cv_header_stdint_t="stdint.h"; ], -[ac_cv_header_stdint_t=""]) -if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then -CFLAGS="-std=c99" -AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], -[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)]) -fi -CXXFLAGS="$old_CXXFLAGS" -CPPFLAGS="$old_CPPFLAGS" -CFLAGS="$old_CFLAGS" ]) - -v="... $ac_cv_header_stdint_h" -if test "$ac_stdint_h" = "stdint.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) -elif test "$ac_stdint_h" = "inttypes.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) -elif test "_$ac_cv_header_stdint_t" = "_" ; then - AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) -else - ac_cv_header_stdint="$ac_cv_header_stdint_t" - AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) -fi - -if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. - -dnl .....intro message done, now do a few system checks..... -dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, -dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW -dnl instead that is triggered with 3 or more arguments (see types.m4) - -inttype_headers=`echo $2 | sed -e 's/,/ /g'` - -ac_cv_stdint_result="(no helpful system typedefs seen)" -AX_CHECK_HEADER_STDINT_X(dnl - stdint.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") - -if test "_$ac_cv_header_stdint_x" = "_" ; then -AX_CHECK_HEADER_STDINT_O(dnl, - inttypes.h sys/inttypes.h stdint.h $inttype_headers, - ac_cv_stdint_result="(seen uint32_t$and64 in $i)") -fi - -if test "_$ac_cv_header_stdint_x" = "_" ; then -if test "_$ac_cv_header_stdint_o" = "_" ; then -AX_CHECK_HEADER_STDINT_U(dnl, - sys/types.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") -fi fi - -dnl if there was no good C99 header file, do some typedef checks... -if test "_$ac_cv_header_stdint_x" = "_" ; then - AC_MSG_CHECKING([for stdint datatype model]) - AC_MSG_RESULT([(..)]) - AX_CHECK_DATA_MODEL -fi - -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_x" -elif test "_$ac_cv_header_stdint_o" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_o" -elif test "_$ac_cv_header_stdint_u" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_u" -else - ac_cv_header_stdint="stddef.h" -fi - -AC_MSG_CHECKING([for extra inttypes in chosen header]) -AC_MSG_RESULT([($ac_cv_header_stdint)]) -dnl see if int_least and int_fast types are present in _this_ header. -unset ac_cv_type_int_least32_t -unset ac_cv_type_int_fast32_t -AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) -AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) -AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) - -fi # shortcircut to system "stdint.h" -# ------------------ PREPARE VARIABLES ------------------------------ -if test "$GCC" = "yes" ; then -ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` -else -ac_cv_stdint_message="using $CC" -fi - -AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl -$ac_cv_stdint_result]) - -dnl ----------------------------------------------------------------- -# ----------------- DONE inttypes.h checks START header ------------- -AC_CONFIG_COMMANDS([$ac_stdint_h],[ -AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) -ac_stdint=$tmp/_stdint.h - -echo "#ifndef" $_ac_stdint_h >$ac_stdint -echo "#define" $_ac_stdint_h "1" >>$ac_stdint -echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint -echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint -echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint -if test "_$ac_cv_header_stdint_t" != "_" ; then -echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint -echo "#include " >>$ac_stdint -echo "#endif" >>$ac_stdint -echo "#endif" >>$ac_stdint -else - -cat >>$ac_stdint < -#else -#include - -/* .................... configured part ............................ */ - -STDINT_EOF - -echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_header="$ac_cv_header_stdint_x" - echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint -fi - -echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_o" != "_" ; then - ac_header="$ac_cv_header_stdint_o" - echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint -fi - -echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint -if test "_$ac_cv_header_stdint_u" != "_" ; then - ac_header="$ac_cv_header_stdint_u" - echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint -fi - -echo "" >>$ac_stdint - -if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then - echo "#include <$ac_header>" >>$ac_stdint - echo "" >>$ac_stdint -fi fi - -echo "/* which 64bit typedef has been found */" >>$ac_stdint -if test "$ac_cv_type_uint64_t" = "yes" ; then -echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint -fi -if test "$ac_cv_type_u_int64_t" = "yes" ; then -echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* which type model has been detected */" >>$ac_stdint -if test "_$ac_cv_char_data_model" != "_" ; then -echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint -echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint -else -echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint -echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* whether int_least types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_least32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint -fi -echo "/* whether int_fast types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_fast32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint -fi -echo "/* whether intmax_t type was detected */" >>$ac_stdint -if test "$ac_cv_type_intmax_t" = "yes"; then -echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - - cat >>$ac_stdint <= 199901L -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; - -#elif !defined __STRICT_ANSI__ -#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ -#define _HAVE_UINT64_T -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ -/* note: all ELF-systems seem to have loff-support which needs 64-bit */ -#if !defined _NO_LONGLONG -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; -#endif - -#elif defined __alpha || (defined __mips && defined _ABIN32) -#if !defined _NO_LONGLONG -typedef long int64_t; -typedef unsigned long uint64_t; -#endif - /* compiler/cpu type to define int64_t */ -#endif -#endif -#endif - -#if defined _STDINT_HAVE_U_INT_TYPES -/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ -typedef u_int8_t uint8_t; -typedef u_int16_t uint16_t; -typedef u_int32_t uint32_t; - -/* glibc compatibility */ -#ifndef __int8_t_defined -#define __int8_t_defined -#endif -#endif - -#ifdef _STDINT_NEED_INT_MODEL_T -/* we must guess all the basic types. Apart from byte-adressable system, */ -/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ -/* (btw, those nibble-addressable systems are way off, or so we assume) */ - -dnl /* have a look at "64bit and data size neutrality" at */ -dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ -dnl /* (the shorthand "ILP" types always have a "P" part) */ - -#if defined _STDINT_BYTE_MODEL -#if _STDINT_LONG_MODEL+0 == 242 -/* 2:4:2 = IP16 = a normal 16-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef long int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 -/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ -/* 4:4:4 = ILP32 = a normal 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 -/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ -/* 4:8:8 = LP64 = a normal 64-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* this system has a "long" of 64bit */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -typedef unsigned long uint64_t; -typedef long int64_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 448 -/* LLP64 a 64-bit system derived from a 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* assuming the system has a "long long" */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef unsigned long long uint64_t; -typedef long long int64_t; -#endif -#else -#define _STDINT_NO_INT32_T -#endif -#else -#define _STDINT_NO_INT8_T -#define _STDINT_NO_INT32_T -#endif -#endif - -/* - * quote from SunOS-5.8 sys/inttypes.h: - * Use at your own risk. As of February 1996, the committee is squarely - * behind the fixed sized types; the "least" and "fast" types are still being - * discussed. The probability that the "fast" types may be removed before - * the standard is finalized is high enough that they are not currently - * implemented. - */ - -#if defined _STDINT_NEED_INT_LEAST_T -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_least64_t; -#endif - -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_least64_t; -#endif - /* least types */ -#endif - -#if defined _STDINT_NEED_INT_FAST_T -typedef int8_t int_fast8_t; -typedef int int_fast16_t; -typedef int32_t int_fast32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_fast64_t; -#endif - -typedef uint8_t uint_fast8_t; -typedef unsigned uint_fast16_t; -typedef uint32_t uint_fast32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_fast64_t; -#endif - /* fast types */ -#endif - -#ifdef _STDINT_NEED_INTMAX_T -#ifdef _HAVE_UINT64_T -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; -#else -typedef long intmax_t; -typedef unsigned long uintmax_t; -#endif -#endif - -#ifdef _STDINT_NEED_INTPTR_T -#ifndef __intptr_t_defined -#define __intptr_t_defined -/* we encourage using "long" to store pointer values, never use "int" ! */ -#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 -typedef unsigned int uintptr_t; -typedef int intptr_t; -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 -typedef unsigned long uintptr_t; -typedef long intptr_t; -#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T -typedef uint64_t uintptr_t; -typedef int64_t intptr_t; -#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ -typedef unsigned long uintptr_t; -typedef long intptr_t; -#endif -#endif -#endif - -/* The ISO C99 standard specifies that in C++ implementations these - should only be defined if explicitly requested. */ -#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS -#ifndef UINT32_C - -/* Signed. */ -# define INT8_C(c) c -# define INT16_C(c) c -# define INT32_C(c) c -# ifdef _HAVE_LONGLONG_UINT64_T -# define INT64_C(c) c ## L -# else -# define INT64_C(c) c ## LL -# endif - -/* Unsigned. */ -# define UINT8_C(c) c ## U -# define UINT16_C(c) c ## U -# define UINT32_C(c) c ## U -# ifdef _HAVE_LONGLONG_UINT64_T -# define UINT64_C(c) c ## UL -# else -# define UINT64_C(c) c ## ULL -# endif - -/* Maximal type. */ -# ifdef _HAVE_LONGLONG_UINT64_T -# define INTMAX_C(c) c ## L -# define UINTMAX_C(c) c ## UL -# else -# define INTMAX_C(c) c ## LL -# define UINTMAX_C(c) c ## ULL -# endif - - /* literalnumbers */ -#endif -#endif - -/* These limits are merily those of a two complement byte-oriented system */ - -/* Minimum of signed integral types. */ -# define INT8_MIN (-128) -# define INT16_MIN (-32767-1) -# define INT32_MIN (-2147483647-1) -# define INT64_MIN (-__INT64_C(9223372036854775807)-1) -/* Maximum of signed integral types. */ -# define INT8_MAX (127) -# define INT16_MAX (32767) -# define INT32_MAX (2147483647) -# define INT64_MAX (__INT64_C(9223372036854775807)) - -/* Maximum of unsigned integral types. */ -# define UINT8_MAX (255) -# define UINT16_MAX (65535) -# define UINT32_MAX (4294967295U) -# define UINT64_MAX (__UINT64_C(18446744073709551615)) - -/* Minimum of signed integral types having a minimum size. */ -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST64_MIN INT64_MIN -/* Maximum of signed integral types having a minimum size. */ -# define INT_LEAST8_MAX INT8_MAX -# define INT_LEAST16_MAX INT16_MAX -# define INT_LEAST32_MAX INT32_MAX -# define INT_LEAST64_MAX INT64_MAX - -/* Maximum of unsigned integral types having a minimum size. */ -# define UINT_LEAST8_MAX UINT8_MAX -# define UINT_LEAST16_MAX UINT16_MAX -# define UINT_LEAST32_MAX UINT32_MAX -# define UINT_LEAST64_MAX UINT64_MAX - - /* shortcircuit*/ -#endif - /* once */ -#endif -#endif -STDINT_EOF -fi - if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then - AC_MSG_NOTICE([$ac_stdint_h is unchanged]) - else - ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` - AS_MKDIR_P(["$ac_dir"]) - rm -f $ac_stdint_h - mv $ac_stdint $ac_stdint_h - fi -],[# variables for create stdint.h replacement -PACKAGE="$PACKAGE" -VERSION="$VERSION" -ac_stdint_h="$ac_stdint_h" -_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) -ac_cv_stdint_message="$ac_cv_stdint_message" -ac_cv_header_stdint_t="$ac_cv_header_stdint_t" -ac_cv_header_stdint_x="$ac_cv_header_stdint_x" -ac_cv_header_stdint_o="$ac_cv_header_stdint_o" -ac_cv_header_stdint_u="$ac_cv_header_stdint_u" -ac_cv_type_uint64_t="$ac_cv_type_uint64_t" -ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" -ac_cv_char_data_model="$ac_cv_char_data_model" -ac_cv_long_data_model="$ac_cv_long_data_model" -ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" -ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" -ac_cv_type_intmax_t="$ac_cv_type_intmax_t" -]) -]) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 6c318fb..4a3f064 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -8,6 +8,7 @@ HP-UX/nut-upsmon \ HP-UX/nut-upsmon.sh \ misc/nut.bash_completion \ misc/osd-notify \ +perl/Nut.pm \ RedHat/halt.patch \ RedHat/README \ RedHat/ups \ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index ce6a171..895ca91 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -38,7 +38,6 @@ subdir = scripts DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ @@ -274,6 +273,7 @@ HP-UX/nut-upsmon \ HP-UX/nut-upsmon.sh \ misc/nut.bash_completion \ misc/osd-notify \ +perl/Nut.pm \ RedHat/halt.patch \ RedHat/README \ RedHat/ups \ diff --git a/scripts/augeas/Makefile.in b/scripts/augeas/Makefile.in index d1724f9..f35554d 100644 --- a/scripts/augeas/Makefile.in +++ b/scripts/augeas/Makefile.in @@ -43,7 +43,6 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/nutupssetconf.aug.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ diff --git a/scripts/augeas/nutupsconf.aug.in b/scripts/augeas/nutupsconf.aug.in index 86afa99..1c5918e 100644 --- a/scripts/augeas/nutupsconf.aug.in +++ b/scripts/augeas/nutupsconf.aug.in @@ -51,6 +51,7 @@ let ups_fields = "driver" | "OffDelay" | "OnDelay" | "SD" + | "advorder" | "authPassword" | "authProtocol" | "batteryPercentage" @@ -143,6 +144,7 @@ let ups_fields = "driver" | "vendorid" | "voltage" | "wait" + | "wugrace" let ups_entry = IniFile.indented_entry (ups_global|ups_fields) ups_sep ups_comment diff --git a/scripts/hal/Makefile.in b/scripts/hal/Makefile.in index f362c11..ed3dc02 100644 --- a/scripts/hal/Makefile.in +++ b/scripts/hal/Makefile.in @@ -40,7 +40,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/ups-nut-device.fdi.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ diff --git a/scripts/hal/ups-nut-device.fdi.in b/scripts/hal/ups-nut-device.fdi.in index 147edf1..609c17d 100644 --- a/scripts/hal/ups-nut-device.fdi.in +++ b/scripts/hal/ups-nut-device.fdi.in @@ -2,15 +2,6 @@ - - - - battery - battery - hald-addon-blazer_usb - ups - - @@ -195,27 +186,16 @@ hald-addon-bcmxcp_usb ups - - - - + + battery battery - hald-addon-blazer_usb - ups - - - - - - battery - battery - hald-addon-blazer_usb + hald-addon-usbhid-ups ups - + @@ -275,15 +255,6 @@ ups - - - - battery - battery - hald-addon-richcomm_usb - ups - - @@ -544,15 +515,6 @@ ups - - - - battery - battery - hald-addon-blazer_usb - ups - - @@ -564,15 +526,6 @@ ups - - - - battery - battery - hald-addon-blazer_usb - ups - - diff --git a/scripts/hotplug/Makefile.in b/scripts/hotplug/Makefile.in index 0630762..ae6a80f 100644 --- a/scripts/hotplug/Makefile.in +++ b/scripts/hotplug/Makefile.in @@ -42,7 +42,6 @@ DIST_COMMON = README $(am__dist_hotplugusb_DATA_DIST) \ $(srcdir)/libhidups.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ diff --git a/scripts/hotplug/libhid.usermap b/scripts/hotplug/libhid.usermap index facf548..9b301a6 100644 --- a/scripts/hotplug/libhid.usermap +++ b/scripts/hotplug/libhid.usermap @@ -4,8 +4,6 @@ # libhidups 0x0003 0xVVVV 0xPPPP 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # # usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info -# Krauler UP-M500VA -libhidups 0x0003 0x0001 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Hewlett Packard # T500 @@ -64,12 +62,10 @@ libhidups 0x0003 0x051d 0x0003 0x0000 0x0000 0x00 # Powerware # various models libhidups 0x0003 0x0592 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# Agiler UPS -libhidups 0x0003 0x05b8 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# Belkin F6C1200-UNV -libhidups 0x0003 0x0665 0x5161 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# PW 9140 +libhidups 0x0003 0x0592 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# Liebert +# Phoenixtec # various models libhidups 0x0003 0x06da 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Mustek Powermust @@ -88,8 +84,6 @@ libhidups 0x0003 0x0764 0x0005 0x0000 0x0000 0x00 libhidups 0x0003 0x0764 0x0501 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # OR2200LCDRM2U libhidups 0x0003 0x0764 0x0601 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# Sweex 1000VA -libhidups 0x0003 0x0925 0x1234 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # TrippLite # e.g. OMNIVS1000, SMART550USB, ... @@ -166,11 +160,7 @@ libhidups 0x0003 0x0d9f 0x00a4 0x0000 0x0000 0x00 libhidups 0x0003 0x0d9f 0x00a5 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PowerCOM BNT - Black Knight Pro libhidups 0x0003 0x0d9f 0x00a6 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# Unitek Alpha 1200Sx -libhidups 0x0003 0x0f03 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Liebert # Liebert PowerSure PSA UPS libhidups 0x0003 0x10af 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# Ablerex 625L USB -libhidups 0x0003 0xffff 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 diff --git a/scripts/perl/Nut.pm b/scripts/perl/Nut.pm new file mode 100644 index 0000000..8263c0d --- /dev/null +++ b/scripts/perl/Nut.pm @@ -0,0 +1,959 @@ +# UPS::Nut - a class to talk to a UPS via the Network Utility Tools upsd. +# Original author Kit Peters +# Rewritten by Gabor Kiss +# Idea to implement TLS:http://www.logix.cz/michal/devel/smtp-cli/smtp-client.pl + +# ### changelog: made debug messages slightly more descriptive, improved +# ### changelog: comments in code +# ### changelog: Removed timeleft() function. + +package UPS::Nut; +use strict; +use Carp; +use FileHandle; +use IO::Socket; +use IO::Select; +use Dumpvalue; my $dumper = Dumpvalue->new; + +# The following globals dictate whether the accessors and instant-command +# functions are created. +# ### changelog: tie hash interface and AUTOLOAD contributed by +# ### changelog: Wayne Wylupski + +my $_eol = "\n"; + +BEGIN { + use Exporter (); + use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); + $VERSION = 1.51; + @ISA = qw(Exporter IO::Socket::INET); + @EXPORT = qw(); + @EXPORT_OK = qw(); + %EXPORT_TAGS = (); +} + +sub new { +# Author: Kit Peters + my $proto = shift; + my $class = ref($proto) || $proto; + my %arg = @_; # hash of arguments + my $self = {}; # _initialize will fill it later + bless $self, $class; + unless ($self->_initialize(%arg)) { # can't initialize + carp "Can't initialize: $self->{err}"; + return undef; + } + return $self; +} + +# accessor functions. Return a value if successful, return undef +# otherwise. + +sub BattPercent { # get battery percentage + return shift->GetVar('battery.charge'); +} + +sub LoadPercent { # get load percentage + my $self = shift; + my $context = shift; + $context = "L$context" if $context =~ /^[123]$/; + $context = ".$context" if $context; + return $self->GetVar("output$context.power.percent"); +} + +sub LineVoltage { # get line voltage + my $self = shift; + my $context = shift; + $context = "L$context-N" if $context =~ /^[123]$/; + $context = ".$context" if $context; + return $self->GetVar("input$context.voltage"); +} + +sub Status { # get status of UPS + return shift->GetVar('ups.status'); +} + +sub Temperature { # get the internal temperature of UPS + return shift->GetVar('battery.temperature'); +} + +# control functions: they control our relationship to upsd, and send +# commands to upsd. + +sub Login { # login to upsd, so that it won't shutdown unless we say we're + # ok. This should only be used if you're actually connected + # to the ups that upsd is monitoring. + +# Author: Kit Peters +# ### changelog: modified login logic a bit. Now it doesn't check to see +# ### changelog: if we got OK, ERR, or something else from upsd. It +# ### changelog: simply checks for a response beginning with OK from upsd. +# ### changelog: Anything else is an error. +# +# ### changelog: uses the new _send command +# + my $self = shift; # myself + my $user = shift; # username + my $pass = shift; # password + my $errmsg; # error message, sent to _debug and $self->{err} + my $ans; # scalar to hold responses from upsd + + $self->Authenticate($user, $pass) or return; + $ans = $self->_send( "LOGIN $self->{name}" ); + if (defined $ans && $ans =~ /^OK/) { # Login successful. + $self->_debug("LOGIN successful."); + return 1; + } + if (defined $ans) { + $errmsg = "LOGIN failed. Last message from upsd: $ans"; + } + else { + $errmsg = "Network error: $!"; + } + $self->_debug($self->{err} = $errmsg); + return undef; +} + +sub Authenticate { # Announce to the UPS who we are to set up the proper + # management level. See upsd.conf man page for details. + +# Contributor: Wayne Wylupski + my $self = shift; # myself + my $user = shift; # username + my $pass = shift; # password + + my $errmsg; # error message, sent to _debug and $self->{err} + my $ans; # scalar to hold responses from upsd + + # only attempt authentication if username and password given + if (defined $user and defined $pass) { + $ans = $self->_send("USERNAME $user"); + if (defined $ans && $ans =~ /^OK/) { # username OK, send password + + $ans = $self->_send("PASSWORD $pass"); + return 1 if (defined $ans && $ans =~ /^OK/); + } + } + if (defined $ans) { + $errmsg = "Authentication failed. Last message from upsd: $ans"; + } + else { + $errmsg = "Network error: $!"; + } + $self->_debug($self->{err} = $errmsg); + return undef; +} + +sub Logout { # logout of upsd +# Author: Kit Peters +# ### changelog: uses the new _send command +# + my $self = shift; + if ($self->{srvsock}) { # are we still connected to upsd? + my $ans = $self->_send( "LOGOUT" ); + close ($self->{srvsock}); + delete ($self->{srvsock}); + } +} + +# internal functions. These are only used by UPS::Nut internally, so +# please don't use them otherwise. If you really think an internal +# function should be externalized, let me know. + +sub _initialize { +# Author: Kit Peters + my $self = shift; + my %arg = @_; + my $host = $arg{HOST} || 'localhost'; # Host running master upsd + my $port = $arg{PORT} || '3493'; # 3493 is IANA assigned port for NUT + my $proto = $arg{PROTO} || 'tcp'; # use tcp unless user tells us to + my $user = $arg{USERNAME} || undef; # username passed to upsd + my $pass = $arg{PASSWORD} || undef; # password passed to upsd + my $login = $arg{LOGIN} || 0; # login to upsd on init? + + + $self->{name} = $arg{NAME} || 'default'; # UPS name in etc/ups.conf on $host + $self->{timeout} = $arg{TIMEOUT} || 30; # timeout + $self->{debug} = $arg{DEBUG} || 0; # debugging? + $self->{debugout} = $arg{DEBUGOUT} || undef; # where to send debug messages + + my $srvsock = $self->{srvsock} = # establish connection to upsd + IO::Socket::INET->new( + PeerAddr => $host, + PeerPort => $port, + Proto => $proto + ); + + unless ( defined $srvsock) { # can't connect + $self->{err} = "Unable to connect via $proto to $host:$port: $!"; + return undef; + } + + $self->{select} = IO::Select->new( $srvsock ); + + if ($user and $pass) { # attempt login to upsd if that option is specified + if ($login) { # attempt login to upsd if that option is specified + $self->Login($user, $pass) or carp $self->{err}; + } + else { + $self->Authenticate($user, $pass) or carp $self->{err}; + } + } + + # get a hash of vars for both the TIE functions as well as for + # expanding vars. + $self->{vars} = $self->ListVar; + + unless ( defined $self->{vars} ) { + $self->{err} = "Network error: $!"; + return undef; + } + + return $self; +} + +# +# _send +# +# Sends a command to the server and retrieves the results. +# If there was a network error, return undef; $! will contain the +# error. +sub _send +{ +# Contributor: Wayne Wylupski + my $self = shift; + my $cmd = shift; + my @handles; + my $result; # undef by default + + my $socket = $self->{srvsock}; + my $select = $self->{select}; + + @handles = IO::Select->select( undef, $select, $select, $self->{timeout} ); + return undef if ( !scalar $handles[1] ); + + $socket->print( $cmd . $_eol ); + + @handles = IO::Select->select( $select, undef, $select, $self->{timeout} ); + return undef if ( !scalar $handles[0]); + + $result = $socket->getline; + return undef if ( !defined ( $result ) ); + chomp $result; + + return $result; +} + +sub _getline +{ +# Contributor: Wayne Wylupski + my $self = shift; + my $result; # undef by default + + my $socket = $self->{srvsock}; + my $select = $self->{select}; + + # Different versions of IO::Socket has different error detection routines. + return undef if ( $IO::Socket::{has_error} && $select->has_error(0) ); + return undef if ( $IO::Socket::{has_exception} && $select->has_exception(0) ); + + chomp ( $result = $socket->getline ); + return $result; +} + +# Compatibility layer +sub Request { goto &GetVar; } + +sub GetVar { # request a variable from the UPS +# Author: Kit Peters + my $self = shift; +# ### changelog: 8/3/2002 - KP - Request() now returns undef if not +# ### changelog: connected to upsd via $srvsock +# ### changelog: uses the new _send command +# +# Modified by Gabor Kiss according to protocol version 1.5+ + my $var = shift; + my $req = "GET VAR $self->{name} $var"; # build request + my $ans = $self->_send( $req ); + + unless (defined $ans) { + $self->{err} = "Network error: $!"; + return undef; + }; + + if ($ans =~ /^ERR/) { + $self->{err} = "Error: $ans. Requested $var."; + return undef; + } + elsif ($ans =~ /^VAR/) { + my $checkvar; # to make sure the var we asked for is the var we got. + my $retval; # returned value for requested VAR + (undef, undef, $checkvar, $retval) = split(' ', $ans, 4); + # get checkvar and retval from the answer + if ($checkvar ne $var) { # did not get expected var + $self->{err} = "requested $var, received $checkvar"; + return undef; + } + $retval =~ s/^"(.*)"$/$1/; + return $retval; # return the requested value + } + else { # unrecognized response + $self->{err} = "Unrecognized response from upsd: $ans"; + return undef; + } +} + +sub Set { +# Contributor: Wayne Wylupski +# ### changelog: uses the new _send command +# + my $self = shift; + my $var = shift; + (my $value = shift) =~ s/^"?(.*)"?$/"$1"/; # add quotes if missing + + my $req = "SET VAR $self->{name} $var $value"; # build request + my $ans = $self->_send( $req ); + + unless (defined $ans) { + $self->{err} = "Network error: $!"; + return undef; + }; + + if ($ans =~ /^ERR/) { + $self->{err} = "Error: $ans"; + return undef; + } + elsif ($ans =~ /^OK/) { + return $value; + } + else { # unrecognized response + $self->{err} = "Unrecognized response from upsd: $ans"; + return undef; + } +} + +sub FSD { # set forced shutdown flag +# Author: Kit Peters +# ### changelog: uses the new _send command +# + my $self = shift; + + my $req = "FSD $self->{name}"; # build request + my $ans = $self->_send( $req ); + + unless (defined $ans) { + $self->{err} = "Network error: $!"; + return undef; + }; + + if ($ans =~ /^ERR/) { # can't set forced shutdown flag + $self->{err} = "Can't set FSD flag. Upsd reports: $ans"; + return undef; + } + elsif ($ans =~ /^OK FSD-SET/) { # forced shutdown flag set + $self->_debug("FSD flag set successfully."); + return 1; + } + else { + $self->{err} = "Unrecognized response from upsd: $ans"; + return undef; + } +} + +sub InstCmd { # send instant command to ups +# Contributor: Wayne Wylupski + my $self = shift; + + chomp (my $cmd = shift); + + my $req = "INSTCMD $self->{name} $cmd"; + my $ans = $self->_send( $req ); + + unless (defined $ans) { + $self->{err} = "Network error: $!"; + return undef; + }; + + if ($ans =~ /^ERR/) { # error reported from upsd + $self->{err} = "Can't send instant command $cmd. Reason: $ans"; + return undef; + } + elsif ($ans =~ /^OK/) { # command successful + $self->_debug("Instant command $cmd sent successfully."); + return 1; + } + else { # unrecognized response + $self->{err} = "Can't send instant command $cmd. Unrecognized response from upsd: $ans"; + return undef; + } +} + +sub ListUPS { + my $self = shift; + return $self->_get_list("LIST UPS", 2, 1); +} + +sub ListVar { + my $self = shift; + my $vars = $self->_get_list("LIST VAR $self->{name}", 3, 2); + return $vars unless @_; # return all variables + return {map { $_ => $vars->{$_} } @_}; # return selected ones +} + +sub ListRW { + my $self = shift; + return $self->_get_list("LIST RW $self->{name}", 3, 2); +} + +sub ListCmd { + my $self = shift; + return $self->_get_list("LIST CMD $self->{name}", 2); +} + +sub ListEnum { + my $self = shift; + my $var = shift; + return $self->_get_list("LIST ENUM $self->{name} $var", 3); +} + +sub _get_list { + my $self = shift; + my ($req, $valueidx, $keyidx) = @_; + my $ans = $self->_send($req); + + unless (defined $ans) { + $self->{err} = "Network error: $!"; + return undef; + }; + + if ($ans =~ /^ERR/) { + $self->{err} = "Error: $ans"; + return undef; + } + elsif ($ans =~ /^BEGIN LIST/) { # command successful + my $retval = $keyidx ? {} : []; + my $line; + while ($line = $self->_getline) { + last if $line =~ /^END LIST/; + my @fields = split(' ', $line, $valueidx+1); + (my $value = $fields[$valueidx]) =~ s/^"(.*)"$/$1/; + if ($keyidx) { + $retval->{$fields[$keyidx]} = $value; + } + else { + push(@$retval, $value); + } + } + unless ($line) { + $self->{err} = "Network error: $!"; + return undef; + }; + $self->_debug("$req command sent successfully."); + return $retval; + } + else { # unrecognized response + $self->{err} = "Can't send $req. Unrecognized response from upsd: $ans"; + return undef; + } +} + +# Compatibility layer +sub VarDesc { goto &GetDesc; } + +sub GetDesc { +# Contributor: Wayne Wylupski +# Modified by Gabor Kiss according to protocol version 1.5+ + my $self = shift; + my $var = shift; + + my $req = "GET DESC $self->{name} $var"; + my $ans = $self->_send( $req ); + unless (defined $ans) { + $self->{err} = "Network error: $!"; + return undef; + }; + + if ($ans =~ /^ERR/) { + $self->{err} = "Error: $ans"; + return undef; + } + elsif ($ans =~ /^DESC/) { # command successful + $self->_debug("$req command sent successfully."); + (undef, undef, undef, $ans) = split(' ', $ans, 4); + $ans =~ s/^"(.*)"$/$1/; + return $ans; + } + else { # unrecognized response + $self->{err} = "Can't send $req. Unrecognized response from upsd: $ans"; + return undef; + } +} + +# Compatibility layer +sub VarType { goto &GetType; } + +sub GetType { +# Contributor: Wayne Wylupski +# Modified by Gabor Kiss according to protocol version 1.5+ + my $self = shift; + my $var = shift; + + my $req = "GET TYPE $self->{name} $var"; + my $ans = $self->_send( $req ); + unless (defined $ans) { + $self->{err} = "Network error: $!"; + return undef; + }; + + if ($ans =~ /^ERR/) { + $self->{err} = "Error: $ans"; + return undef; + } + elsif ($ans =~ /^TYPE/) { # command successful + $self->_debug("$req command sent successfully."); + (undef, undef, undef, $ans) = split(' ', $ans, 4); + return $ans; + } + else { # unrecognized response + $self->{err} = "Can't send $req. Unrecognized response from upsd: $ans"; + return undef; + } +} + +# Compatibility layer +sub InstCmdDesc { goto &GetCmdDesc; } + +sub GetCmdDesc { +# Contributor: Wayne Wylupski +# Modified by Gabor Kiss according to protocol version 1.5+ + my $self = shift; + my $cmd = shift; + + my $req = "GET CMDDESC $self->{name} $cmd"; + my $ans = $self->_send( $req ); + unless (defined $ans) { + $self->{err} = "Network error: $!"; + return undef; + }; + + if ($ans =~ /^ERR/) { + $self->{err} = "Error: $ans"; + return undef; + } + elsif ($ans =~ /^DESC/) { # command successful + $self->_debug("$req command sent successfully."); + (undef, undef, undef, $ans) = split(' ', $ans, 4); + $ans =~ s/^"(.*)"$/$1/; + return $ans; + } + else { # unrecognized response + $self->{err} = "Can't send $req. Unrecognized response from upsd: $ans"; + return undef; + } +} + +sub DESTROY { # destructor, all it does is call Logout +# Author: Kit Peters + my $self = shift; + $self->_debug("Object destroyed."); + $self->Logout(); +} + +sub _debug { # print debug messages to stdout or file +# Author: Kit Peters + my $self = shift; + if ($self->{debug}) { + chomp (my $msg = shift); + my $out; # filehandle for output + if ($self->{debugout}) { # if filename is given, use that + $out = new FileHandle ($self->{debugout}, ">>") or warn "Error: $!"; + } + if ($out) { # if out was set to a filehandle, create nifty timestamp + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); + $year = sprintf("%02d", $year % 100); # Y2.1K compliant, even! + my $timestamp = join '/', ($mon + 1), $mday, $year; # today + $timestamp .= " "; + $timestamp .= join ':', $hour, $min, $sec; + print $out "$timestamp $msg\n"; + } + else { print "DEBUG: $msg\n"; } # otherwise, print to stdout + } +} + +sub Error { # what was the last thing that went bang? +# Author: Kit Peters + my $self = shift; + if ($self->{err}) { return $self->{err}; } + else { return "No error explanation available."; } +} + +sub Master { # check for MASTER level access +# Author: Kit Peters +# ### changelog: uses the new _send command +# + my $self = shift; + + my $req = "MASTER $self->{name}"; # build request + my $ans = $self->_send( $req ); + + unless (defined $ans) { + $self->{err} = "Network error: $!"; + return undef; + }; + + if ($ans =~ /^OK/) { # access granted + $self->_debug("MASTER level access granted. Upsd reports: $ans"); + return 1; + } + else { # access denied, or unrecognized reponse + $self->{err} = "MASTER level access denied. Upsd responded: $ans"; +# ### changelog: 8/3/2002 - KP - Master() returns undef rather than 0 on +# ### failure. this makes it consistent with other methods + return undef; + } +} + +sub AUTOLOAD { +# Contributor: Wayne Wylupski + my $self = shift; + my $name = $UPS::Nut::AUTOLOAD; + $name =~ s/^.*:://; + + # for a change we will only load cmds if needed. + if (!defined $self->{cmds} ) { + %{$self->{cmds}} = map{ $_ =>1 } @{$self->ListCmd}; + } + + croak "No such InstCmd: $name" if (! $self->{cmds}{$name} ); + + return $self->InstCmd( $name ); +} + +#------------------------------------------------------------------------- +# tie hash interface +# +# The variables of the array, including the hidden 'numlogins' can +# be accessed as a hash array through this method. +# +# Example: +# tie %ups, 'UPS::Nut', +# NAME => "myups", +# HOST => "somemachine.somewhere.com", +# ... # same options as new(); +# ; +# +# $ups{UPSIDENT} = "MyUPS"; +# print $ups{MFR}, " " $ups{MODEL}, "\n"; +# +#------------------------------------------------------------------------- +sub TIEHASH { + my $class = shift || 'UPS::Nut'; + return $class->new( @_ ); +} + +sub FETCH { + my $self = shift; + my $key = shift; + + return $self->Request( $key ); +} + +sub STORE { + my $self = shift; + my $key = shift; + my $value = shift; + + return $self->Set( $key, $value ); +} + +sub DELETE { + croak "DELETE operation not supported"; +} + +sub CLEAR { + croak "CLEAR operation not supported"; +} + +sub EXISTS { + exists shift->{vars}{shift}; +} + +sub FIRSTKEY { + my $self = shift; + my $a = keys %{$self->{vars}}; + return scalar each %{$self->{vars}}; +} + +sub NEXTKEY { + my $self = shift; + return scalar each %{$self->{vars}}; +} + +sub UNTIE { + $_[0]->Logout; +} + +=head1 NAME + +Nut - a module to talk to a UPS via NUT (Network UPS Tools) upsd + +=head1 SYNOPSIS + + use UPS::Nut; + + $ups = new UPS::Nut( NAME => "myups", + HOST => "somemachine.somewhere.com", + PORT => "3493", + USERNAME => "upsuser", + PASSWORD => "upspasswd", + TIMEOUT => 30, + DEBUG => 1, + DEBUGOUT => "/some/file/somewhere", + ); + if ($ups->Status() =~ /OB/) { + print "Oh, no! Power failure!\n"; + } + + tie %other_ups, 'UPS::Nut', + NAME => "myups", + HOST => "somemachine.somewhere.com", + ... # same options as new(); + ; + + print $other_ups{MFR}, " ", $other_ups{MODEL}, "\n"; + +=head1 DESCRIPTION + +This is an object-oriented (whoo!) interface between Perl and upsd from +the Network UPS Tools package version 1.5 and above +(http://www.networkupstools.org/). +Note that it only talks to upsd for you in a Perl-ish way. +It doesn't monitor the UPS continously. + +=head1 CONSTRUCTOR + +Shown with defaults: new UPS::Nut( NAME => "default", + HOST => "localhost", + PORT => "3493", + USERNAME => "", + PASSWORD => "", + DEBUG => 0, + DEBUGOUT => "", + ); +* NAME is the name of the UPS to monitor, as specified in ups.conf +* HOST is the host running upsd +* PORT is the port that upsd is running on +* USERNAME and PASSWORD are those that you use to login to upsd. This + gives you the right to do certain things, as specified in upsd.conf. +* DEBUG turns on debugging output, set to 1 or 0 +* DEBUGOUT is de thing you do when de s*** hits the fan. Actually, it's + the filename where you want debugging output to go. If it's not + specified, debugging output comes to standard output. + +=head1 Important notice + +This version of UPS::Nut is not compatible with version 0.04. It is totally +rewritten in order to talk the new protocol of NUT 1.5+. You should not use +this module as a drop-in replacement of previous version from 2002. +Allmost all method has changed slightly. + +=head1 Methods + +Unlike in version 0.04 no methods return list values but a +single reference or undef. + +=head2 Methods for querying UPS status + +=over 4 + +=item Getvar($varname) + +returns value of the specified variable. Returns undef if variable +unsupported. +Old method named Request() is also supported for compatibility. + +=item Set($varname, $value) + +sets the value of the specified variable. Returns undef if variable +unsupported, or if variable cannot be set for some other reason. See +Authenticate() if you wish to use this function. + +=item BattPercent() + +returns percentage of battery left. Returns undef if we can't get +battery percentage for some reason. Same as GetVar('battery.charge'). + +=item LoadPercent($context) + +returns percentage of the load on the UPS. Returns undef if load +percentage is unavailable. $context is a selector of 3 phase systems. +Possibled values are 1, 2, 3, 'L1', 'L2', 'L3'. It should be omitted +in case of single phase UPS. + +=item LineVoltage($context) + +returns input line (e.g. the outlet) voltage. Returns undef if line +voltage is unavailable. $context is a selector of 3 phase systems. +Possibled values are 1, 2, 3, 'L1', 'L2', 'L3'. It should be omitted +in case of single phase UPS. + +=item Status() + +returns UPS status, one of OL or OB. OL or OB may be followed by LB, +which signifies low battery state. OL or OB may also be followed by +FSD, which denotes that the forced shutdown state +( see UPS::Nut->FSD() ) has been set on upsd. Returns undef if status +unavailable. Same as GetVar('ups.status'). + +=item Temperature() + +returns UPS internal temperature. Returns undef if internal +temperature unavailable. Same as GetVar('battery.temperature'). + +=back + +=head2 Other methods + +These all operate on the UPS specified in the NAME argument to the +constructor. + +=over 4 + +=item Authenticate($username, $password) + +With NUT certain operations are only available if the user has the +privilege. The program has to authenticate with one of the accounts +defined in upsd.conf. + +=item Login($username, $password) + +Notify upsd that client is drawing power from the given UPS. +It is automatically done if new() is called with USERNAME, PASSWORD +and LOGIN parameters. + +=item Logout() + +Notify upsd that client is released UPS. (E.g. it is shutting down.) +It is automatically done if connection closed. + +=item Master() + +Use this to find out whether or not we have MASTER privileges for +this UPS. Returns 1 if we have MASTER privileges, returns 0 otherwise. + +=item ListVar($variable, ...) + +This is an implementation of "LIST VAR" command. +Returns a hash reference to selected variable names and values supported +by the UPS. If no variables given it returns all. +Returns undef if "LIST VAR" failed. +(Note: This method significally differs from the old ListVars() +and ListRequest().) + +=item ListRW() + +Similar to ListVar() but cares only with read/writeable variables. + +=item ListEnum($variable) + +Returns a reference to the list of all possible values of $variable. +List is empty if $variable is not an ENUM type. (See GetType().) +Returns undef if error occurred. + +=item ListCmd() + +Returns a reference to the list of all instant commands supported +by the UPS. Returns undef if these are unavailable. +This method replaces the old ListInstCmds(). + +=item InstCmd($command) + +Send an instant command to the UPS. Returns 1 on success. Returns +undef if the command can't be completed. + +=item FSD() + +Set the FSD (forced shutdown) flag for the UPS. This means that we're +planning on shutting down the UPS very soon, so the attached load should +be shut down as well. Returns 1 on success, returns undef on failure. +This cannot be unset, so don't set it unless you mean it. + +=item Error() + +why did the previous operation fail? The answer is here. It will +return a concise, well-written, and brilliantly insightful few words as +to why whatever you just did went bang. + +=item GetDesc($variable) + +Returns textual description of $variable or undef in case of error. +Old method named VarDesc() is also supported for compatibility. + +=item GetCmdDesc($command) + +This is like GetDesc() above but applies to the instant commands. +Old method named InstCmdDesc() is also supported for compatibility. + +=item GetType($variable) + +Returns a string UNKNOWN or constructed one or more words of RW, +ENUM and STRING:n (where n is a number). (Seems to be not working +perfectly at upsd 2.2.) +Old method named VarType() is also supported for compatibility. + +=item ListUPS() + +Returns a reference to hash of all available UPS names and descriptions. + +=back + +=head1 AUTOLOAD + +The "instant commands" are available as methods of the UPS object. They +are AUTOLOADed when called. For example, if the instant command is FPTEST, +then it can be called by $ups->FPTEST. + +=head1 TIE Interface + +If you wish to simply query or set values, you can tie a hash value to +UPS::Nut and pass as extra options what you need to connect to the host. +If you need to exercise an occasional command, you may find the return +value of 'tie' useful, as in: + + my %ups; + my $ups_obj = tie %ups, 'UPS::Nut', HOSTNAME=>"firewall"; + + print $ups{UPSIDENT}, "\n"; + + $ups_obj->Authenticate( "user", "pass" ); + + $ups{UPSIDENT} = "MyUPS"; + +=head1 AUTHOR + + Original version made by Kit Peters + perl@clownswilleatyou.com + http://www.awod.com/staff/kpeters/perl/ + + Rewritten by Gabor Kiss . + +=head1 CREDITS + +Developed with the kind support of A World Of Difference, Inc. + + +Many thanks to Ryan Jessen at CyberPower +Systems for much-needed assistance. + +Thanks to Wayne Wylupski for the code to make +accessor methods for all supported vars. + +=head1 LICENSE + +This module is distributed under the same license as Perl itself. + +=cut + +1; +__END__ + diff --git a/scripts/python/Makefile.in b/scripts/python/Makefile.in index d3b1f4e..dc8d7ba 100644 --- a/scripts/python/Makefile.in +++ b/scripts/python/Makefile.in @@ -40,7 +40,6 @@ subdir = scripts/python DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ diff --git a/scripts/udev/Makefile.in b/scripts/udev/Makefile.in index 9594e8d..678ff5c 100644 --- a/scripts/udev/Makefile.in +++ b/scripts/udev/Makefile.in @@ -40,7 +40,6 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/nut-usbups.rules.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ diff --git a/scripts/udev/nut-usbups.rules.in b/scripts/udev/nut-usbups.rules.in index 2be5a41..9331e60 100644 --- a/scripts/udev/nut-usbups.rules.in +++ b/scripts/udev/nut-usbups.rules.in @@ -6,8 +6,6 @@ SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real" SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end" LABEL="nut-usbups_rules_real" -# Krauler UP-M500VA - blazer_usb -ATTR{idVendor}=="0001", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" # Hewlett Packard # T500 - bcmxcp_usb @@ -66,12 +64,10 @@ ATTR{idVendor}=="051d", ATTR{idProduct}=="0003", MODE="664", GROUP="@RUN_AS_GROU # Powerware # various models - bcmxcp_usb ATTR{idVendor}=="0592", ATTR{idProduct}=="0002", MODE="664", GROUP="@RUN_AS_GROUP@" -# Agiler UPS - blazer_usb -ATTR{idVendor}=="05b8", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" -# Belkin F6C1200-UNV - blazer_usb -ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="@RUN_AS_GROUP@" +# PW 9140 - usbhid-ups +ATTR{idVendor}=="0592", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" -# Liebert +# Phoenixtec # various models - bcmxcp_usb ATTR{idVendor}=="06da", ATTR{idProduct}=="0002", MODE="664", GROUP="@RUN_AS_GROUP@" # Mustek Powermust - blazer_usb @@ -90,8 +86,6 @@ ATTR{idVendor}=="0764", ATTR{idProduct}=="0005", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664", GROUP="@RUN_AS_GROUP@" # OR2200LCDRM2U - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0601", MODE="664", GROUP="@RUN_AS_GROUP@" -# Sweex 1000VA - richcomm_usb -ATTR{idVendor}=="0925", ATTR{idProduct}=="1234", MODE="664", GROUP="@RUN_AS_GROUP@" # TrippLite # e.g. OMNIVS1000, SMART550USB, ... - tripplite_usb @@ -168,13 +162,9 @@ ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a4", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a5", MODE="664", GROUP="@RUN_AS_GROUP@" # PowerCOM BNT - Black Knight Pro - usbhid-ups ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a6", MODE="664", GROUP="@RUN_AS_GROUP@" -# Unitek Alpha 1200Sx - blazer_usb -ATTR{idVendor}=="0f03", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" # Liebert # Liebert PowerSure PSA UPS - usbhid-ups ATTR{idVendor}=="10af", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" -# Ablerex 625L USB - blazer_usb -ATTR{idVendor}=="ffff", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" LABEL="nut-usbups_rules_end" diff --git a/scripts/upower/95-upower-hid.rules b/scripts/upower/95-upower-hid.rules index ac1138c..25c267d 100644 --- a/scripts/upower/95-upower-hid.rules +++ b/scripts/upower/95-upower-hid.rules @@ -17,7 +17,8 @@ ATTRS{idVendor}=="0463", ENV{UPOWER_VENDOR}="Eaton" ATTRS{idVendor}=="047c", ENV{UPOWER_VENDOR}="Dell" ATTRS{idVendor}=="050d", ENV{UPOWER_VENDOR}="Belkin" ATTRS{idVendor}=="051d", ENV{UPOWER_VENDOR}="APC" -ATTRS{idVendor}=="06da", ENV{UPOWER_VENDOR}="Liebert" +ATTRS{idVendor}=="0592", ENV{UPOWER_VENDOR}="Powerware" +ATTRS{idVendor}=="06da", ENV{UPOWER_VENDOR}="Phoenixtec" ATTRS{idVendor}=="075d", ENV{UPOWER_VENDOR}="iDowell" ATTRS{idVendor}=="0764", ENV{UPOWER_VENDOR}="Cyber Power Systems" ATTRS{idVendor}=="09ae", ENV{UPOWER_VENDOR}="TrippLite" @@ -54,7 +55,10 @@ ATTRS{idVendor}=="050d", ATTRS{idProduct}=="1100", ENV{UPOWER_BATTERY_TYPE}="ups ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0002", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0003", ENV{UPOWER_BATTERY_TYPE}="ups" -# Liebert +# Powerware +ATTRS{idVendor}=="0592", ATTRS{idProduct}=="0004", ENV{UPOWER_BATTERY_TYPE}="ups" + +# Phoenixtec ATTRS{idVendor}=="06da", ATTRS{idProduct}=="ffff", ENV{UPOWER_BATTERY_TYPE}="ups" # iDowell diff --git a/server/Makefile.in b/server/Makefile.in index ed50361..6decd15 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -47,7 +47,6 @@ subdir = server DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ diff --git a/server/netinstcmd.c b/server/netinstcmd.c index 90275ca..7411e2b 100644 --- a/server/netinstcmd.c +++ b/server/netinstcmd.c @@ -29,12 +29,12 @@ #include "netinstcmd.h" static void send_instcmd(ctype_t *client, const char *upsname, - const char *cmdname) + const char *cmdname, const char *value) { int found; upstype_t *ups; const cmdlist_t *ctmp; - char sockcmd[SMALLBUF]; + char sockcmd[SMALLBUF], esc[SMALLBUF]; ups = get_ups_ptr(upsname); @@ -70,11 +70,20 @@ static void send_instcmd(ctype_t *client, const char *upsname, return; } - upslogx(LOG_INFO, "Instant command: %s@%s did %s on %s", - client->username, client->addr, cmdname, - ups->name); + /* see if the user has also passed a value for this command */ + if (value != NULL) { + upslogx(LOG_INFO, "Instant command: %s@%s did %s with value \"%s\" on %s", + client->username, client->addr, cmdname, value, ups->name); - snprintf(sockcmd, sizeof(sockcmd), "INSTCMD %s\n", cmdname); + snprintf(sockcmd, sizeof(sockcmd), "INSTCMD %s %s\n", + cmdname, pconf_encode(value, esc, sizeof(esc))); + } + else { + upslogx(LOG_INFO, "Instant command: %s@%s did %s on %s", + client->username, client->addr, cmdname, ups->name); + + snprintf(sockcmd, sizeof(sockcmd), "INSTCMD %s\n", cmdname); + } if (!sstate_sendline(ups, sockcmd)) { upslogx(LOG_INFO, "Set command send failed"); @@ -82,6 +91,7 @@ static void send_instcmd(ctype_t *client, const char *upsname, return; } + /* FIXME: need to retrieve the cookie number */ sendback(client, "OK\n"); } @@ -92,7 +102,7 @@ void net_instcmd(ctype_t *client, int numarg, const char **arg) return; } - /* INSTCMD */ - send_instcmd(client, arg[0], arg[1]); + /* INSTCMD []*/ + send_instcmd(client, arg[0], arg[1], (numarg == 3)?arg[2]:NULL); return; } diff --git a/server/netlist.c b/server/netlist.c index 39ff826..104026c 100644 --- a/server/netlist.c +++ b/server/netlist.c @@ -204,7 +204,7 @@ static void list_ups(ctype_t *client) utmp->name, esc); } else { - ret = sendback(client, "UPS %s \"Unavailable\"\n", + ret = sendback(client, "UPS %s \"Description unavailable\"\n", utmp->name); } diff --git a/server/upsd.c b/server/upsd.c index a5a0c42..662284e 100644 --- a/server/upsd.c +++ b/server/upsd.c @@ -452,7 +452,11 @@ static void parse_net(ctype_t *client) static void client_connect(stype_t *server) { struct sockaddr_storage csock; +#if defined(__hpux) && !defined(_XOPEN_SOURCE_EXTENDED) + int clen; +#else socklen_t clen; +#endif int fd; ctype_t *client; diff --git a/tools/Makefile.in b/tools/Makefile.in index 9eba5b4..103b72d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -38,7 +38,6 @@ subdir = tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ diff --git a/tools/nut-usbinfo.pl b/tools/nut-usbinfo.pl index 1bbf3aa..606d89d 100755 --- a/tools/nut-usbinfo.pl +++ b/tools/nut-usbinfo.pl @@ -196,7 +196,9 @@ sub find_usbdevs my $VendorName=""; # special thing for backward declaration using #DEFINE - # Format: #define VENDORID 0x???? /* vendor name */ + # Format: + # /* vendor name */ + # #define VENDORID 0x???? if(!($VendorID=~/\dx(\d|\w)+/)) { open my $fh,$nameFile or die "error open file $nameFile"; @@ -228,9 +230,12 @@ sub find_usbdevs die "In file $nameFile, for product $ProductID, can't find the declaration of the constant"; } } - - # store date (to be optimized) - $vendorName{$VendorID}=trim($VendorName); + + # store data (to be optimized) + if (($vendorName{$VendorID} eq "") && ($VendorName)) + { + $vendorName{$VendorID}=trim($VendorName); + } $vendor{$VendorID}{$ProductID}{"comment"}=$lastComment; # process the driver name my $driver=$nameFile; From 1b2269cf22d563d6bb93283589ce889217d282a2 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 3 Jun 2011 09:53:43 +0200 Subject: [PATCH 047/300] New upstream release (Closes: #614842, #595773, #616104) * New upstream release (Closes: #614842, #595773, #616104) - Refresh debian/patches/0001-fix_spelling_and_typo.patch - Drop debian/patches/0002-fix_libupsclient_pc.patch, applied upstream --- debian/changelog | 7 +- .../patches/0001-fix_spelling_and_typo.patch | 325 ++---------------- debian/patches/0002-fix_libupsclient_pc.patch | 11 - debian/patches/series | 1 - 4 files changed, 32 insertions(+), 312 deletions(-) delete mode 100644 debian/patches/0002-fix_libupsclient_pc.patch diff --git a/debian/changelog b/debian/changelog index f1c16c3..2e033b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ -nut (2.6.0-3) UNRELEASED; urgency=low +nut (2.6.1-1) UNRELEASED; urgency=low + * New upstream release (Closes: #614842, #595773, #616104) + - Refresh debian/patches/0001-fix_spelling_and_typo.patch + - Drop debian/patches/0002-fix_libupsclient_pc.patch, applied upstream * Drop HAL package and build-dependencies (Closes: #613197) * debian/control: - Bump Standards-Version to 3.9.2 (no further changes) @@ -8,7 +11,7 @@ nut (2.6.0-3) UNRELEASED; urgency=low * debian/rules: - Correctly pass flags to configure - -- Laurent Bigonville Mon, 09 May 2011 18:46:55 +0200 + -- Laurent Bigonville Fri, 03 Jun 2011 10:33:00 +0200 nut (2.6.0-2) unstable; urgency=low diff --git a/debian/patches/0001-fix_spelling_and_typo.patch b/debian/patches/0001-fix_spelling_and_typo.patch index 44cc905..8d9bc86 100644 --- a/debian/patches/0001-fix_spelling_and_typo.patch +++ b/debian/patches/0001-fix_spelling_and_typo.patch @@ -1,3 +1,7 @@ +Description: Fix several spelling errors +Author: Laurent Bigonville +Last-Update: 2011-06-03 + --- a/docs/man/bcmxcp.8 +++ b/docs/man/bcmxcp.8 @@ -103,7 +103,7 @@ @@ -9,309 +13,34 @@ .RS 4 BCM/XCP supports reporting of UPS statistics data\&. .RE ---- a/docs/man/dummy-ups.8 -+++ b/docs/man/dummy-ups.8 -@@ -63,7 +63,7 @@ +--- a/docs/man/blazer.8 ++++ b/docs/man/blazer.8 +@@ -264,7 +264,7 @@ .RE .\} .sp --This file is generally named "something\&.dev"\&. It contains a list of all valid data and associated values, and has the same format as an \fBupsc\fR(8) dump (: )\&. So you can easilly create definition files from an existing UPS using "upsc > file\&.dev"\&. It can also be empty, in which case only a basic set of data is available: device\&.\fB, driver\&.\fR, ups\&.mfr, ups\&.model, ups\&.status -+This file is generally named "something\&.dev"\&. It contains a list of all valid data and associated values, and has the same format as an \fBupsc\fR(8) dump (: )\&. So you can easily create definition files from an existing UPS using "upsc > file\&.dev"\&. It can also be empty, in which case only a basic set of data is available: device\&.\fB, driver\&.\fR, ups\&.mfr, ups\&.model, ups\&.status +-There is a way to get better readings without disconnecting the load but this requires 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\&. ++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 - Samples definition files are available in the "data" directory of the nut source tree, and generally in the sysconfig directory of your system distribution\&. + 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 ---- a/docs/man/dummy-ups.txt -+++ b/docs/man/dummy-ups.txt -@@ -55,7 +55,7 @@ - - This file is generally named "something.dev". It contains a list of all - valid data and associated values, and has the same format as an linkman:upsc[8] --dump (: ). So you can easilly create definition -+dump (: ). So you can easily create definition - files from an existing UPS using "upsc > file.dev". - It can also be empty, in which case only a basic set of data is available: - device.*, driver.*, ups.mfr, ups.model, ups.status ---- a/docs/man/metasys.8 -+++ b/docs/man/metasys.8 -@@ -124,7 +124,7 @@ +--- a/docs/man/dummy-ups.8 ++++ b/docs/man/dummy-ups.8 +@@ -37,7 +37,7 @@ + This program is a multi\-purpose UPS emulation tool\&. Its behavior depends on the running mode: + .SS "Dummy Mode" .sp - This driver has been tested on Meta System HF Millennium 820 and ally HF 1000 only\&. +-\fBdummy\-ups\fR looks like a standard device driver to \fBupsd\fR(8) and allows to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other real driver\&. This mode is mostly useful for development and testing purposes\&. ++\fBdummy\-ups\fR looks like a standard device driver to \fBupsd\fR(8) and allows one to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other real driver\&. This mode is mostly useful for development and testing purposes\&. + .SS "Repeater Mode" .sp --Any informations about the use of the driver with the other listed UPS are really welcome\&. -+Any information about the use of the driver with the other listed UPS are really welcome\&. - .SH "AUTHOR" + \fBdummy\-ups\fR acts as a NUT client, simply forwarding data\&. This can be useful for supervision purposes\&. This can also allow some load sharing between several UPS instances, using a point\-to\-point communication with the UPS\&. +@@ -130,7 +130,7 @@ .sp - Fabio Di Niro ---- a/docs/man/metasys.txt -+++ b/docs/man/metasys.txt -@@ -44,7 +44,7 @@ - This driver has been tested on Meta System HF Millennium 820 and - ally HF 1000 only. - --Any informations about the use of the driver with the other listed -+Any information about the use of the driver with the other listed - UPS are really welcome. - - AUTHOR ---- a/drivers/apcsmart.c -+++ b/drivers/apcsmart.c -@@ -324,7 +324,7 @@ - /* This should never happen since we only call - this if the REQ_CAPABILITIES command is supported - */ -- upslogx(LOG_ERR, "ERROR: APC cannot do capabilites but said it could!"); -+ upslogx(LOG_ERR, "ERROR: APC cannot do capabilities but said it could!"); - return; - } - ---- a/drivers/dummy-ups.c -+++ b/drivers/dummy-ups.c -@@ -375,7 +375,7 @@ - * enforcing controls! We also need a way to automate - * the update / sync process (with cmdvartab?!) */ - -- upsdebugx(1, "Unknown data. Commiting anyway..."); -+ upsdebugx(1, "Unknown data. Committing anyway..."); - return 1; - /* return 0;*/ - } -@@ -395,7 +395,7 @@ - * enforcing controls! We also need a way to automate - * the update / sync process (with cmdvartab?) */ - -- upsdebugx(1, "Unknown data. Commiting value anyway..."); -+ upsdebugx(1, "Unknown data. Committing value anyway..."); - return 1; - /* return 0;*/ - } ---- a/drivers/genericups.c -+++ b/drivers/genericups.c -@@ -142,12 +142,12 @@ - */ - if ((v = getval("OL")) != NULL) { - parse_input_signals(v, &upstab[upstype].line_ol, &upstab[upstype].val_ol); -- upsdebugx(2, "parse_input_signals: OL overriden with %s\n", v); -+ upsdebugx(2, "parse_input_signals: OL overridden with %s\n", v); - } - - if ((v = getval("LB")) != NULL) { - parse_input_signals(v, &upstab[upstype].line_bl, &upstab[upstype].val_bl); -- upsdebugx(2, "parse_input_signals: LB overriden with %s\n", v); -+ upsdebugx(2, "parse_input_signals: LB overridden with %s\n", v); - } - } - -@@ -318,12 +318,12 @@ - */ - if ((v = getval("CP")) != NULL) { - parse_output_signals(v, &upstab[upstype].line_norm); -- upsdebugx(2, "parse_output_signals: CP overriden with %s\n", v); -+ upsdebugx(2, "parse_output_signals: CP overridden with %s\n", v); - } - - if ((v = getval("SD")) != NULL) { - parse_output_signals(v, &upstab[upstype].line_sd); -- upsdebugx(2, "parse_output_signals: SD overriden with %s\n", v); -+ upsdebugx(2, "parse_output_signals: SD overridden with %s\n", v); - } - - if (ioctl(upsfd, TIOCMSET, &upstab[upstype].line_norm)) { ---- a/drivers/metasys.c -+++ b/drivers/metasys.c -@@ -62,12 +62,12 @@ - - /* - Metasystem UPS data transfer are made with packet of the format: -- STX DATA_LENGHT DATA CHECKSUM -+ STX DATA_LENGTH DATA CHECKSUM - where: - STX is 0x02 and is the start of transmission byte -- DATA_LENGHT is number of data bytes + the checksum byte -+ DATA_LENGTH is number of data bytes + the checksum byte - DATA ...... -- CHECKSUM is the sum modulus 256 of all DATA bytes + DATA_LENGHT -+ CHECKSUM is the sum modulus 256 of all DATA bytes + DATA_LENGTH - - The answer from the UPS have the same packet format and the first - data byte is equal to the command that the ups is answering to -@@ -114,7 +114,7 @@ - } - - /* send a read command to the UPS, it retries 5 times before give up -- it's a 4 byte request (STX, LENGHT, COMMAND and CHECKSUM) */ -+ it's a 4 byte request (STX, LENGTH, COMMAND and CHECKSUM) */ - void send_read_command(char command) { - int retry, sent; - unsigned char buf[4]; -@@ -122,9 +122,9 @@ - sent = 0; - while ((sent != 4) && (retry < 5)) { - buf[0]=0x02; /* STX Start of Transmission */ -- buf[1]=0x02; /* data lenght(data + checksum byte) */ -+ buf[1]=0x02; /* data length(data + checksum byte) */ - buf[2]=command; /* command to send */ -- buf[3]=buf[1] + buf[2]; /* checksum (sum modulus 256 of data bytes + lenght) */ -+ buf[3]=buf[1] + buf[2]; /* checksum (sum modulus 256 of data bytes + length) */ - if (retry == 4) send_zeros(); /* last retry is preceded by a serial reset...*/ - sent = ser_send_buf(upsfd, buf, 4); - retry += 1; -@@ -134,29 +134,29 @@ - /* send a write command to the UPS, the write command and the value to be written are passed - with a char* buffer - it retries 5 times before give up */ --void send_write_command(unsigned char *command, int command_lenght) { -+void send_write_command(unsigned char *command, int command_length) { - int i, retry, sent, checksum; - unsigned char raw_buf[255]; - - /* prepares the raw data */ - raw_buf[0] = 0x02; /* STX byte */ -- raw_buf[1] = (unsigned char)(command_lenght + 1); /* data lenght + checksum */ -- memcpy(raw_buf+2, command, command_lenght); -- command_lenght += 2; -+ raw_buf[1] = (unsigned char)(command_length + 1); /* data length + checksum */ -+ memcpy(raw_buf+2, command, command_length); -+ command_length += 2; - - /* calculate checksum */ - checksum = 0; -- for (i = 1; i < command_lenght; i++) checksum += raw_buf[i]; -+ for (i = 1; i < command_length; i++) checksum += raw_buf[i]; - checksum = checksum % 256; -- raw_buf[command_lenght] = (unsigned char)checksum; -- command_lenght +=1; -+ raw_buf[command_length] = (unsigned char)checksum; -+ command_length +=1; - - retry = 0; - sent = 0; -- while ((sent != (command_lenght)) && (retry < 5)) { -+ while ((sent != (command_length)) && (retry < 5)) { - if (retry == 4) send_zeros(); /* last retry is preceded by a serial reset... */ -- sent = ser_send_buf(upsfd, raw_buf, (command_lenght)); -- if (sent != (command_lenght)) printf("Error sending command %d\n", raw_buf[2]); -+ sent = ser_send_buf(upsfd, raw_buf, (command_length)); -+ if (sent != (command_length)) printf("Error sending command %d\n", raw_buf[2]); - retry += 1; - } - } -@@ -164,8 +164,8 @@ - - /* get the answer of a command from the ups */ - int get_answer(unsigned char *data) { -- unsigned char my_buf[255]; /* packet has a maximum lenght of 256 bytes */ -- int packet_lenght, checksum, i, res; -+ unsigned char my_buf[255]; /* packet has a maximum length of 256 bytes */ -+ int packet_length, checksum, i, res; - /* Read STX byte */ - res = ser_get_char(upsfd, my_buf, 1, 0); - if (res < 1) { -@@ -176,43 +176,43 @@ - ser_comm_fail("Receive error (STX): packet not on start!!\n"); - return -1; - } -- /* Read data lenght byte */ -+ /* Read data length byte */ - res = ser_get_char(upsfd, my_buf, 1, 0); - if (res < 1) { -- ser_comm_fail("Receive error (lenght): %d!!!\n", res); -+ ser_comm_fail("Receive error (length): %d!!!\n", res); - return -1; - } -- packet_lenght = my_buf[0]; -- if (packet_lenght < 2) { -- ser_comm_fail("Receive error (lenght): packet lenght %d!!!\n", packet_lenght); -+ packet_length = my_buf[0]; -+ if (packet_length < 2) { -+ ser_comm_fail("Receive error (length): packet length %d!!!\n", packet_length); - return -1; - } -- /* Try to read all the remainig bytes (packet_lenght) */ -- res = ser_get_buf_len(upsfd, my_buf, packet_lenght, 1, 0); -- if (res != packet_lenght) { -- ser_comm_fail("Receive error (data): got %d bytes instead of %d!!!\n", res, packet_lenght); -+ /* Try to read all the remainig bytes (packet_length) */ -+ res = ser_get_buf_len(upsfd, my_buf, packet_length, 1, 0); -+ if (res != packet_length) { -+ ser_comm_fail("Receive error (data): got %d bytes instead of %d!!!\n", res, packet_length); - return -1; - } - - /* now we have the whole answer from the ups, we can checksum it -- checksum byte is equal to the sum modulus 256 of all the data bytes + packet_lenght -+ checksum byte is equal to the sum modulus 256 of all the data bytes + packet_length - (no STX no checksum byte itself) */ -- checksum = packet_lenght; -- for (i = 0; i < (packet_lenght - 1); i++) checksum += my_buf[i]; -+ checksum = packet_length; -+ for (i = 0; i < (packet_length - 1); i++) checksum += my_buf[i]; - checksum = checksum % 256; -- if (my_buf[packet_lenght-1] != checksum) { -- ser_comm_fail("checksum error! got %x instad of %x, received %d bytes \n", my_buf[packet_lenght - 1], checksum, packet_lenght); -- dump_buffer(my_buf, packet_lenght); -+ if (my_buf[packet_length-1] != checksum) { -+ ser_comm_fail("checksum error! got %x instad of %x, received %d bytes \n", my_buf[packet_length - 1], checksum, packet_length); -+ dump_buffer(my_buf, packet_length); - return -1; - } -- packet_lenght-=1; /* get rid of the checksum byte */ -- memcpy(data, my_buf, packet_lenght); -- return packet_lenght; -+ packet_length-=1; /* get rid of the checksum byte */ -+ memcpy(data, my_buf, packet_length); -+ return packet_length; - } - - /* send a read command and try get the answer, if something fails, it retries (5 times max) - if it is on the 4th or 5th retry, it will flush the serial before sending commands -- it returns the lenght of the received answer or -1 in case of failure */ -+ it returns the length of the received answer or -1 in case of failure */ - int command_read_sequence(unsigned char command, unsigned char *data) { - int bytes_read = 0; - int retry = 0; -@@ -234,13 +234,13 @@ - - /* send a write command and try get the answer, if something fails, it retries (5 times max) - if it is on the 4th or 5th retry, it will flush the serial before sending commands -- it returns the lenght of the received answer or -1 in case of failure */ --int command_write_sequence(unsigned char *command, int command_lenght, unsigned char *answer) { -+ it returns the length of the received answer or -1 in case of failure */ -+int command_write_sequence(unsigned char *command, int command_length, unsigned char *answer) { - int bytes_read = 0; - int retry = 0; - - while ((bytes_read < 1) && (retry < 5)) { -- send_write_command(command, command_lenght); -+ send_write_command(command, command_length); - bytes_read = get_answer(answer); - if (retry > 2) ser_flush_in(upsfd, "", 0); - retry += 1; ---- a/drivers/snmp-ups.c -+++ b/drivers/snmp-ups.c -@@ -484,7 +484,7 @@ - len = snprintf(buf, buf_len, "%ld", *pdu->variables->val.integer / 100); - break; - default: -- upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s", -+ upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s", - upsname?upsname:device_name, pdu->variables->type, OID); - return FALSE; - break; -@@ -524,7 +524,7 @@ - value = *pdu->variables->val.integer / 100; - break; - default: -- upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x recieved from %s", -+ upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s", - upsname?upsname:device_name, pdu->variables->type, OID); - return FALSE; - break; -@@ -1459,7 +1459,7 @@ - if (ret == FALSE) - upslogx(LOG_ERR, "su_setvar: cannot set value %s for %s", arg[4], arg[3]); - else -- upsdebugx(1, "su_setvar: sucessfully set %s to \"%s\"", arg[0], arg[4]); -+ upsdebugx(1, "su_setvar: successfully set %s to \"%s\"", arg[0], arg[4]); - - return 1; - } + It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework\&. + .sp +-It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows to build a virtual device, composed of several other devices (either UPS, PDUs)\&. ++It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows one to build a virtual device, composed of several other devices (either UPS, PDUs)\&. + .SH "BUGS" + .sp + Instant commands are not yet supported in Dummy Mode, and data need name/value checking enforcement, as well as boundaries or enumeration definition\&. diff --git a/debian/patches/0002-fix_libupsclient_pc.patch b/debian/patches/0002-fix_libupsclient_pc.patch deleted file mode 100644 index 0c50a0e..0000000 --- a/debian/patches/0002-fix_libupsclient_pc.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/lib/libupsclient.pc.in b/lib/libupsclient.pc.in -index eb6826c..4ad31fb 100644 ---- a/lib/libupsclient.pc.in -+++ b/lib/libupsclient.pc.in -@@ -9,5 +9,5 @@ nutuser=@RUN_AS_USER@ - Name: libupsclient - Description: UPS monitoring with Network UPS Tools - Version: @PACKAGE_VERSION@ --Libs: -L${libdir} -lupsclient @LIBSSL_LDFLAGS@ -+Libs: -L${libdir} -lupsclient @LIBSSL_LIBS@ - Cflags: -I${includedir} @LIBSSL_CFLAGS@ diff --git a/debian/patches/series b/debian/patches/series index 4dd5e93..52e301b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ 0001-fix_spelling_and_typo.patch -0002-fix_libupsclient_pc.patch From 85d2d1a10ae84670eddad0b7882ce642758e6b1f Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 3 Jun 2011 10:59:23 +0200 Subject: [PATCH 048/300] debian/nut.README.Debian: Adjust udev rules naming for permissions override (Closes: #529664) --- debian/changelog | 4 +++- debian/nut.README.Debian | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2e033b5..6cb6e4c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,10 @@ nut (2.6.1-1) UNRELEASED; urgency=low - Drop non-existing build-dependencies * debian/rules: - Correctly pass flags to configure + * debian/nut.README.Debian: Adjust udev rules naming for permissions override + (Closes: #529664) - -- Laurent Bigonville Fri, 03 Jun 2011 10:33:00 +0200 + -- Laurent Bigonville Fri, 03 Jun 2011 10:56:08 +0200 nut (2.6.0-2) unstable; urgency=low diff --git a/debian/nut.README.Debian b/debian/nut.README.Debian index 7ca7e60..975b389 100644 --- a/debian/nut.README.Debian +++ b/debian/nut.README.Debian @@ -71,8 +71,8 @@ MODE. If you are running in "netclient" MODE, jump directly to section 6. on Ubuntu. b) Another solution, for system supporting udev, is to create a file - (for example /etc/udev/rules.d/52_nut-serialups.rules), placed - after 020_permissions.rules and to add something like: + (for example /etc/udev/rules.d/92-nut-serialups.rules), placed + after 91-permissions.rules and to add something like: KERNEL=="ttyS1", GROUP="nut" where 'ttyS1' has to be replaced by the exact name of your serial port. From 1106c880a1f9238d8ee10cca74885e17edae8099 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 27 Jun 2011 17:28:00 +0200 Subject: [PATCH 049/300] Manually merge Arnaud release --- debian/changelog | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6cb6e4c..201f836 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,17 @@ -nut (2.6.1-1) UNRELEASED; urgency=low +nut (2.6.1-2) UNRELEASED; urgency=low - * New upstream release (Closes: #614842, #595773, #616104) - - Refresh debian/patches/0001-fix_spelling_and_typo.patch - - Drop debian/patches/0002-fix_libupsclient_pc.patch, applied upstream + * debian/nut.README.Debian: Adjust udev rules naming for permissions override + (Closes: #529664) + * Re-add and refresh debian/patches/0001-fix_spelling_and_typo.patch: + Some typos and spelling errors remain. + + -- Laurent Bigonville Mon, 27 Jun 2011 17:26:59 +0200 + +nut (2.6.1-1) unstable; urgency=low + + * New upstream release (Closes: #595953, #614842, #595773) + * debian/patches/*.patch: removed since these are now fixed upstream + [Laurent Bigonville] * Drop HAL package and build-dependencies (Closes: #613197) * debian/control: - Bump Standards-Version to 3.9.2 (no further changes) @@ -10,10 +19,8 @@ nut (2.6.1-1) UNRELEASED; urgency=low - Drop non-existing build-dependencies * debian/rules: - Correctly pass flags to configure - * debian/nut.README.Debian: Adjust udev rules naming for permissions override - (Closes: #529664) - -- Laurent Bigonville Fri, 03 Jun 2011 10:56:08 +0200 + -- Arnaud Quette Wed, 01 Jun 2011 22:34:28 +0200 nut (2.6.0-2) unstable; urgency=low From 910934027d22ee8c94b5440959311fa39493534d Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 16 May 2011 13:58:32 +0200 Subject: [PATCH 050/300] Split nut package into nut-client and nut-server, keep nut package as metapackage --- debian/changelog | 2 ++ debian/control | 34 +++++++++++++++++-- debian/nut-client.install | 10 ++++++ debian/nut-client.manpages | 9 +++++ ...README.Debian => nut-server.README.Debian} | 0 debian/nut-server.dirs | 1 + debian/{nut.init => nut-server.init} | 0 debian/{nut.install => nut-server.install} | 10 +----- debian/{nut.links => nut-server.links} | 0 debian/nut-server.lintian-overrides | 2 ++ debian/{nut.manpages => nut-server.manpages} | 9 ----- debian/{nut.postinst => nut-server.postinst} | 0 debian/{nut.postrm => nut-server.postrm} | 0 debian/{nut.preinst => nut-server.preinst} | 0 debian/{nut.prerm => nut-server.prerm} | 0 debian/nut.dirs | 4 --- debian/nut.lintian-overrides | 2 -- debian/rules | 2 +- 18 files changed, 57 insertions(+), 28 deletions(-) create mode 100644 debian/nut-client.install create mode 100644 debian/nut-client.manpages rename debian/{nut.README.Debian => nut-server.README.Debian} (100%) create mode 100644 debian/nut-server.dirs rename debian/{nut.init => nut-server.init} (100%) rename debian/{nut.install => nut-server.install} (84%) rename debian/{nut.links => nut-server.links} (100%) create mode 100644 debian/nut-server.lintian-overrides rename debian/{nut.manpages => nut-server.manpages} (82%) rename debian/{nut.postinst => nut-server.postinst} (100%) rename debian/{nut.postrm => nut-server.postrm} (100%) rename debian/{nut.preinst => nut-server.preinst} (100%) rename debian/{nut.prerm => nut-server.prerm} (100%) delete mode 100644 debian/nut.dirs delete mode 100644 debian/nut.lintian-overrides diff --git a/debian/changelog b/debian/changelog index 201f836..8a87d81 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ nut (2.6.1-2) UNRELEASED; urgency=low (Closes: #529664) * Re-add and refresh debian/patches/0001-fix_spelling_and_typo.patch: Some typos and spelling errors remain. + * Split nut package into nut-client and nut-server, keep nut package as + metapackage -- Laurent Bigonville Mon, 27 Jun 2011 17:26:59 +0200 diff --git a/debian/control b/debian/control index b863db2..614634b 100644 --- a/debian/control +++ b/debian/control @@ -20,13 +20,25 @@ Vcs-Browser: http://git.debian.org/?p=collab-maint/nut.git;a=summary Vcs-Git: git://git.debian.org/git/collab-maint/nut.git Package: nut +Architecture: all +Depends: ${misc:Depends}, nut-server, nut-client +Description: network UPS tools - metapackage + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package is a metapackage that install both nut-server and nut-client + +Package: nut-server Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev} -Recommends: bash-completion +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev}, nut-client (= ${binary:Version}) Suggests: nut-cgi, nut-snmp, nut-dev, nut-xml Provides: ups-monitor, nut-doc, nut-usb Conflicts: ups-monitor, nut-doc, nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) -Replaces: nut-doc +Replaces: nut-doc, nut (<< 2.6.1) +Breaks: nut (<< 2.6.1) Description: network UPS tools - core system Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and @@ -38,6 +50,22 @@ Description: network UPS tools - core system drivers. In most cases it is sufficient for a basic UPS monitoring system. +Package: nut-client +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: bash-completion +Replaces: nut (<< 2.6.1) +Breaks: nut (<< 2.6.1) +Description: network UPS tools - clients + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides NUT's clients that allows the user to control + and monitor the UPS. + Package: nut-cgi Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser diff --git a/debian/nut-client.install b/debian/nut-client.install new file mode 100644 index 0000000..d15acda --- /dev/null +++ b/debian/nut-client.install @@ -0,0 +1,10 @@ +debian/tmp/bin/upslog +debian/tmp/bin/upsc +debian/tmp/bin/upsrw +debian/tmp/bin/upscmd +debian/tmp/sbin/upsmon +debian/tmp/sbin/upssched +debian/tmp/etc/bash_completion.d/nut +debian/tmp/etc/nut/nut.conf +debian/tmp/etc/nut/upsmon.conf +debian/tmp/etc/nut/upssched.conf diff --git a/debian/nut-client.manpages b/debian/nut-client.manpages new file mode 100644 index 0000000..115e821 --- /dev/null +++ b/debian/nut-client.manpages @@ -0,0 +1,9 @@ +debian/tmp/usr/share/man/man8/upsc.8 +debian/tmp/usr/share/man/man8/upscmd.8 +debian/tmp/usr/share/man/man8/upsmon.8 +debian/tmp/usr/share/man/man8/upsrw.8 +debian/tmp/usr/share/man/man8/upssched.8 +debian/tmp/usr/share/man/man5/nut.conf.5 +debian/tmp/usr/share/man/man5/upsmon.conf.5 +debian/tmp/usr/share/man/man5/upssched.conf.5 +debian/tmp/usr/share/man/man8/upslog.8 diff --git a/debian/nut.README.Debian b/debian/nut-server.README.Debian similarity index 100% rename from debian/nut.README.Debian rename to debian/nut-server.README.Debian diff --git a/debian/nut-server.dirs b/debian/nut-server.dirs new file mode 100644 index 0000000..a805311 --- /dev/null +++ b/debian/nut-server.dirs @@ -0,0 +1 @@ +/var/lib/nut diff --git a/debian/nut.init b/debian/nut-server.init similarity index 100% rename from debian/nut.init rename to debian/nut-server.init diff --git a/debian/nut.install b/debian/nut-server.install similarity index 84% rename from debian/nut.install rename to debian/nut-server.install index b535cd0..034e307 100644 --- a/debian/nut.install +++ b/debian/nut-server.install @@ -1,18 +1,10 @@ -debian/tmp/bin/upslog -debian/tmp/bin/upsc -debian/tmp/bin/upsrw -debian/tmp/bin/upscmd -debian/tmp/sbin/ +debian/tmp/sbin/upsd debian/tmp/usr/share/nut/cmdvartab debian/tmp/usr/share/nut/driver.list debian/tmp/*/udev/ -debian/tmp/etc/nut/nut.conf debian/tmp/etc/nut/ups.conf debian/tmp/etc/nut/upsd.conf debian/tmp/etc/nut/upsd.users -debian/tmp/etc/nut/upsmon.conf -debian/tmp/etc/nut/upssched.conf -debian/tmp/etc/bash_completion.d/nut debian/tmp/lib/nut/genericups debian/tmp/lib/nut/mge-shut debian/tmp/lib/nut/rhino diff --git a/debian/nut.links b/debian/nut-server.links similarity index 100% rename from debian/nut.links rename to debian/nut-server.links diff --git a/debian/nut-server.lintian-overrides b/debian/nut-server.lintian-overrides new file mode 100644 index 0000000..9618794 --- /dev/null +++ b/debian/nut-server.lintian-overrides @@ -0,0 +1,2 @@ +nut-server: script-in-etc-init.d-not-registered-via-update-rc.d +nut-server: init.d-script-does-not-provide-itself etc/init.d/ups-monitor diff --git a/debian/nut.manpages b/debian/nut-server.manpages similarity index 82% rename from debian/nut.manpages rename to debian/nut-server.manpages index ff02b6e..b23eea8 100644 --- a/debian/nut.manpages +++ b/debian/nut-server.manpages @@ -1,9 +1,6 @@ -debian/tmp/usr/share/man/man5/nut.conf.5 debian/tmp/usr/share/man/man5/ups.conf.5 debian/tmp/usr/share/man/man5/upsd.conf.5 debian/tmp/usr/share/man/man5/upsd.users.5 -debian/tmp/usr/share/man/man5/upsmon.conf.5 -debian/tmp/usr/share/man/man5/upssched.conf.5 debian/tmp/usr/share/man/man8/apcsmart.8 debian/tmp/usr/share/man/man8/bcmxcp.8 debian/tmp/usr/share/man/man8/bcmxcp_usb.8 @@ -37,14 +34,8 @@ debian/tmp/usr/share/man/man8/solis.8 debian/tmp/usr/share/man/man8/tripplite.8 debian/tmp/usr/share/man/man8/tripplitesu.8 debian/tmp/usr/share/man/man8/tripplite_usb.8 -debian/tmp/usr/share/man/man8/upsc.8 -debian/tmp/usr/share/man/man8/upscmd.8 debian/tmp/usr/share/man/man8/upscode2.8 debian/tmp/usr/share/man/man8/upsd.8 debian/tmp/usr/share/man/man8/upsdrvctl.8 -debian/tmp/usr/share/man/man8/upslog.8 -debian/tmp/usr/share/man/man8/upsmon.8 -debian/tmp/usr/share/man/man8/upsrw.8 -debian/tmp/usr/share/man/man8/upssched.8 debian/tmp/usr/share/man/man8/usbhid-ups.8 debian/tmp/usr/share/man/man8/victronups.8 diff --git a/debian/nut.postinst b/debian/nut-server.postinst similarity index 100% rename from debian/nut.postinst rename to debian/nut-server.postinst diff --git a/debian/nut.postrm b/debian/nut-server.postrm similarity index 100% rename from debian/nut.postrm rename to debian/nut-server.postrm diff --git a/debian/nut.preinst b/debian/nut-server.preinst similarity index 100% rename from debian/nut.preinst rename to debian/nut-server.preinst diff --git a/debian/nut.prerm b/debian/nut-server.prerm similarity index 100% rename from debian/nut.prerm rename to debian/nut-server.prerm diff --git a/debian/nut.dirs b/debian/nut.dirs deleted file mode 100644 index 0082856..0000000 --- a/debian/nut.dirs +++ /dev/null @@ -1,4 +0,0 @@ -/etc/nut -/bin -/sbin -/var/lib/nut diff --git a/debian/nut.lintian-overrides b/debian/nut.lintian-overrides deleted file mode 100644 index b30037b..0000000 --- a/debian/nut.lintian-overrides +++ /dev/null @@ -1,2 +0,0 @@ -nut: script-in-etc-init.d-not-registered-via-update-rc.d -nut: init.d-script-does-not-provide-itself etc/init.d/ups-monitor diff --git a/debian/rules b/debian/rules index 3820f30..4dd3f67 100755 --- a/debian/rules +++ b/debian/rules @@ -40,7 +40,7 @@ common-install-arch:: mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \ done -DEB_DH_INSTALLINIT_ARGS_nut := -- start 50 2 3 4 5 . stop 50 0 1 6 . +DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut -- start 50 2 3 4 5 . stop 50 0 1 6 . ifeq (linux,$(DEB_HOST_ARCH_OS)) # for Debian From ad6a04226d5f7d3f7677157a8f0ac56753a5fc16 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 3 Jun 2011 11:54:05 +0200 Subject: [PATCH 051/300] List non-installed files --- debian/changelog | 2 ++ debian/rules | 3 +++ 2 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8a87d81..d14f7d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ nut (2.6.1-2) UNRELEASED; urgency=low Some typos and spelling errors remain. * Split nut package into nut-client and nut-server, keep nut package as metapackage + * debian/rules: + - List non-installed files -- Laurent Bigonville Mon, 27 Jun 2011 17:26:59 +0200 diff --git a/debian/rules b/debian/rules index 4dd3f67..b7f180b 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,9 @@ include /usr/share/cdbs/1/class/autotools.mk DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) +# List any files which are not installed +include /usr/share/cdbs/1/rules/utils.mk +common-binary-post-install-arch:: list-missing DEB_CONFIGURE_PREFIX := DEB_CONFIGURE_SYSCONFDIR := /etc/nut From 46c56a3a13d8b89ee8d8c9d0a194e6a342d7508d Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 3 Jun 2011 13:54:46 +0200 Subject: [PATCH 052/300] Add python-nut package --- debian/changelog | 3 +++ debian/control | 21 ++++++++++++++++++--- debian/python-nut.install | 1 + debian/rules | 1 + 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 debian/python-nut.install diff --git a/debian/changelog b/debian/changelog index d14f7d3..a6b0403 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ nut (2.6.1-2) UNRELEASED; urgency=low metapackage * debian/rules: - List non-installed files + - Includes python-module.mk + * debian/control: + - Add python-nut package and add python build-dependency -- Laurent Bigonville Mon, 27 Jun 2011 17:26:59 +0200 diff --git a/debian/control b/debian/control index 614634b..730a984 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Arnaud Quette Uploaders: Laurent Bigonville Build-Depends: debhelper (>= 8), - cdbs, + cdbs (>= 0.4.90~), libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), @@ -13,11 +13,13 @@ Build-Depends: debhelper (>= 8), libglib2.0-dev, libneon27-gnutls-dev | libneon27-dev, libpowerman0-dev (>= 2.3.3), - libwrap0-dev (>= 7.6) + libwrap0-dev (>= 7.6), + python (>= 2.6.6-3~) Standards-Version: 3.9.2 -Homepage: http://www.networkupstools.org +Homepage: http://www.networkupstools.org/ Vcs-Browser: http://git.debian.org/?p=collab-maint/nut.git;a=summary Vcs-Git: git://git.debian.org/git/collab-maint/nut.git +X-Python-Version: >= 2.5 Package: nut Architecture: all @@ -150,3 +152,16 @@ Description: network UPS tools - development files changes. . This package provides the development files. + +Package: python-nut +Section: python +Architecture: all +Depends: ${python:Depends}, ${misc:Depends} +Description: network UPS tools - Python bindings for NUT server + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides Python bindings to connect to NUT server. diff --git a/debian/python-nut.install b/debian/python-nut.install new file mode 100644 index 0000000..fa24bc5 --- /dev/null +++ b/debian/python-nut.install @@ -0,0 +1 @@ +scripts/python/module/PyNUT.py usr/share/pyshared/ diff --git a/debian/rules b/debian/rules index b7f180b..88d6ea4 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,7 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/class/python-module.mk DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) From 14ffb4d76b27e0435bb7956164f7b9b5f2ca7a67 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 3 Jun 2011 16:02:02 +0200 Subject: [PATCH 053/300] Set nut-powerman-pdu priority to extras --- debian/changelog | 1 + debian/control | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index a6b0403..a43845b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ nut (2.6.1-2) UNRELEASED; urgency=low - Includes python-module.mk * debian/control: - Add python-nut package and add python build-dependency + - Set nut-powerman-pdu priority to extras -- Laurent Bigonville Mon, 27 Jun 2011 17:26:59 +0200 diff --git a/debian/control b/debian/control index 730a984..9f62c0a 100644 --- a/debian/control +++ b/debian/control @@ -115,6 +115,7 @@ Description: network UPS tools - XML/HTTP driver Package: nut-powerman-pdu Architecture: any +Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 2.4.0), powerman (>= 2.3.3) Description: network UPS tools - PowerMan PDU driver Network UPS Tools (NUT) is a client/server monitoring system that From 63f12aa09fe591948620db1d7c6858458704ff2a Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 3 Jun 2011 16:22:58 +0200 Subject: [PATCH 054/300] Add nut-monitor package --- debian/changelog | 1 + debian/control | 17 ++++++++ debian/nut-monitor.install | 6 +++ debian/patches/0002-nut-monitor-paths.patch | 48 +++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 3 ++ 6 files changed, 76 insertions(+) create mode 100644 debian/nut-monitor.install create mode 100644 debian/patches/0002-nut-monitor-paths.patch diff --git a/debian/changelog b/debian/changelog index a43845b..5783c14 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ nut (2.6.1-2) UNRELEASED; urgency=low * debian/control: - Add python-nut package and add python build-dependency - Set nut-powerman-pdu priority to extras + - Add nut-monitor package -- Laurent Bigonville Mon, 27 Jun 2011 17:26:59 +0200 diff --git a/debian/control b/debian/control index 9f62c0a..81bcef2 100644 --- a/debian/control +++ b/debian/control @@ -166,3 +166,20 @@ Description: network UPS tools - Python bindings for NUT server changes. . This package provides Python bindings to connect to NUT server. + +Package: nut-monitor +Architecture: all +Depends: ${python:Depends}, + ${misc:Depends}, + python-gobject, + python-gtk2, + python-glade2, + python-nut +Description: network UPS tools - GUI application to monitor UPS status + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides nut-monitor, a GUI application to monitor UPS status. diff --git a/debian/nut-monitor.install b/debian/nut-monitor.install new file mode 100644 index 0000000..612e8f3 --- /dev/null +++ b/debian/nut-monitor.install @@ -0,0 +1,6 @@ +scripts/python/app/NUT-Monitor usr/bin/ +scripts/python/app/nut-monitor.desktop usr/share/applications/ +scripts/python/app/gui-*.glade usr/share/nut-monitor/ +scripts/python/app/locale/ usr/share/ +scripts/python/app/nut-monitor.png usr/share/pixmaps/ +scripts/python/app/pixmaps usr/share/nut-monitor/ diff --git a/debian/patches/0002-nut-monitor-paths.patch b/debian/patches/0002-nut-monitor-paths.patch new file mode 100644 index 0000000..00fd0de --- /dev/null +++ b/debian/patches/0002-nut-monitor-paths.patch @@ -0,0 +1,48 @@ +--- a/scripts/python/app/NUT-Monitor ++++ b/scripts/python/app/NUT-Monitor +@@ -70,7 +70,7 @@ + ( cmd_opts, args ) = opt_parser.parse_args() + + +- self.__glade_file = os.path.join( os.path.dirname( sys.argv[0] ), "gui-1.3.glade" ) ++ self.__glade_file = '/usr/share/nut-monitor/gui-1.3.glade' + + self.__widgets["interface"] = gtk.glade.XML( self.__glade_file, "window1", APP ) + self.__widgets["main_window"] = self.__widgets["interface"].get_widget("window1") +@@ -103,11 +103,11 @@ + + # Create the tray icon and connect it to the show/hide method... + self.__widgets["status_icon"] = gtk.StatusIcon() +- self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) ) ++ self.__widgets["status_icon"].set_from_file( "/usr/share/nut-monitor/pixmaps/on_line.png" ) + self.__widgets["status_icon"].set_visible( True ) + self.__widgets["status_icon"].connect( "activate", self.tray_activated ) + +- self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) ) ++ self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut-monitor/pixmaps/on_line.png" ) + + # Define interface callbacks actions + self.__callbacks = { "on_window1_destroy" : self.quit, +@@ -265,8 +265,8 @@ + #------------------------------------------------------------------- + # Change the status icon and tray icon + def change_status_icon( self, icon="on_line", blink=False ) : +- self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) ) +- self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) ) ++ self.__widgets["status_icon"].set_from_file( "/usr/share/nut-monitor/pixmaps/%s.png" % icon ) ++ self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut-monitor/pixmaps/%s.png" % icon ) + self.__widgets["status_icon"].set_blinking( blink ) + + #------------------------------------------------------------------- +@@ -719,9 +719,9 @@ + + for k,v in vars.iteritems() : + if ( rwvars.has_key( k ) ) : +- icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-rw.png" ) ++ icon_file = "/usr/share/nut-monitor/pixmaps/var-rw.png" + else : +- icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-ro.png" ) ++ icon_file = "/usr/share/nut-monitor/pixmaps/var-ro.png" + + icon = gtk.gdk.pixbuf_new_from_file( icon_file ) + self.__widgets["ups_vars_tree_store"].append( [ icon, k, v ] ) diff --git a/debian/patches/series b/debian/patches/series index 52e301b..9e8eaf1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-fix_spelling_and_typo.patch +0002-nut-monitor-paths.patch diff --git a/debian/rules b/debian/rules index 88d6ea4..3219e60 100755 --- a/debian/rules +++ b/debian/rules @@ -44,6 +44,9 @@ common-install-arch:: mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \ done +binary-install/nut-monitor:: + dh_python2 -pnut-monitor + DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut -- start 50 2 3 4 5 . stop 50 0 1 6 . ifeq (linux,$(DEB_HOST_ARCH_OS)) From dfa7599f3342ba3bb5d21832b233d0cd05e73f08 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 3 Jun 2011 11:54:24 +0200 Subject: [PATCH 055/300] Generate PDF and html doc and install it in nut-doc package --- debian/changelog | 5 ++++- debian/control | 23 ++++++++++++++++++--- debian/nut-doc.doc-base.nut-developer-guide | 13 ++++++++++++ debian/nut-doc.doc-base.nut-faq | 12 +++++++++++ debian/nut-doc.doc-base.nut-packager-guide | 15 ++++++++++++++ debian/nut-doc.doc-base.nut-user-manual | 15 ++++++++++++++ debian/nut-doc.install | 1 + debian/rules | 18 ++++++++++++++++ 8 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 debian/nut-doc.doc-base.nut-developer-guide create mode 100644 debian/nut-doc.doc-base.nut-faq create mode 100644 debian/nut-doc.doc-base.nut-packager-guide create mode 100644 debian/nut-doc.doc-base.nut-user-manual create mode 100644 debian/nut-doc.install diff --git a/debian/changelog b/debian/changelog index 5783c14..c23369c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,16 +5,19 @@ nut (2.6.1-2) UNRELEASED; urgency=low * Re-add and refresh debian/patches/0001-fix_spelling_and_typo.patch: Some typos and spelling errors remain. * Split nut package into nut-client and nut-server, keep nut package as + * Generate PDF and html doc and install it in nut-doc package metapackage * debian/rules: - List non-installed files - Includes python-module.mk + - Add flags to build documentation and install it * debian/control: - Add python-nut package and add python build-dependency - Set nut-powerman-pdu priority to extras - Add nut-monitor package + - Add nut-doc package and add required C/R/P - -- Laurent Bigonville Mon, 27 Jun 2011 17:26:59 +0200 + -- Laurent Bigonville Fri, 15 Jul 2011 14:59:36 +0200 nut (2.6.1-1) unstable; urgency=low diff --git a/debian/control b/debian/control index 81bcef2..53f2c66 100644 --- a/debian/control +++ b/debian/control @@ -15,6 +15,9 @@ Build-Depends: debhelper (>= 8), libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6), python (>= 2.6.6-3~) +Build-Depends-Indep: asciidoc (>= 8.6.3), + dblatex (>= 0.2.5), + libxml2-utils Standards-Version: 3.9.2 Homepage: http://www.networkupstools.org/ Vcs-Browser: http://git.debian.org/?p=collab-maint/nut.git;a=summary @@ -37,9 +40,9 @@ Package: nut-server Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev}, nut-client (= ${binary:Version}) Suggests: nut-cgi, nut-snmp, nut-dev, nut-xml -Provides: ups-monitor, nut-doc, nut-usb -Conflicts: ups-monitor, nut-doc, nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) -Replaces: nut-doc, nut (<< 2.6.1) +Provides: ups-monitor, nut-usb +Conflicts: ups-monitor, nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) +Replaces: nut (<< 2.6.1) Breaks: nut (<< 2.6.1) Description: network UPS tools - core system Network UPS Tools (NUT) is a client/server monitoring system that @@ -127,6 +130,20 @@ Description: network UPS tools - PowerMan PDU driver This package provides powerman-pdu, which allows NUT clients to communicate with the PowerMan daemon to support PDUs. +Package: nut-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Suggests: doc-base +Description: network UPS tools - documentation + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package contains FAQ, user, developer and packager documentation. + Package: libupsclient1 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} diff --git a/debian/nut-doc.doc-base.nut-developer-guide b/debian/nut-doc.doc-base.nut-developer-guide new file mode 100644 index 0000000..ed3ad0d --- /dev/null +++ b/debian/nut-doc.doc-base.nut-developer-guide @@ -0,0 +1,13 @@ +Document: nut-developer-guide +Title: Network UPS Tools Developer Guide +Author: Russell Kroll, Arnaud Quette, Charles Lepple and Peter Selinger +Abstract: This document intend to describe how NUT is designed, + and the way to develop new device drivers and client applications. +Section: Programming + +Format: PDF +Files: /usr/share/doc/nut-doc/pdf/developer-guide.pdf + +Format: HTML +Index: /usr/share/doc/nut-doc/html/developer-guide/index.html +Files: /usr/share/doc/nut-doc/html/developer-guide/*.html diff --git a/debian/nut-doc.doc-base.nut-faq b/debian/nut-doc.doc-base.nut-faq new file mode 100644 index 0000000..098042f --- /dev/null +++ b/debian/nut-doc.doc-base.nut-faq @@ -0,0 +1,12 @@ +Document: nut-faq +Title: NUT Frequently asked questions +Author: Arnaud Quette +Abstract: Frequently asked questions for Network UPS Tools (NUT) +Section: Help/FAQ + +Format: PDF +Files: /usr/share/doc/nut-doc/pdf/FAQ.pdf + +Format: HTML +Index: /usr/share/doc/nut-doc/html/FAQ.html +Files: /usr/share/doc/nut-doc/html/FAQ.html diff --git a/debian/nut-doc.doc-base.nut-packager-guide b/debian/nut-doc.doc-base.nut-packager-guide new file mode 100644 index 0000000..61d6b46 --- /dev/null +++ b/debian/nut-doc.doc-base.nut-packager-guide @@ -0,0 +1,15 @@ +Document: nut-packager-guide +Title: NUT Packager and Integrators Guide +Author: Arnaud Quette +Abstract: Packaging is a final aim for software. + It eases and completes the software integration into an OS, + and allows users to have an easy software installation and support out of the box. + This document describes best practice for packaging NUT. +Section: Debian + +Format: PDF +Files: /usr/share/doc/nut-doc/pdf/packager-guide.pdf + +Format: HTML +Index: /usr/share/doc/nut-doc/html/packager-guide/index.html +Files: /usr/share/doc/nut-doc/html/packager-guide/*.html diff --git a/debian/nut-doc.doc-base.nut-user-manual b/debian/nut-doc.doc-base.nut-user-manual new file mode 100644 index 0000000..76db720 --- /dev/null +++ b/debian/nut-doc.doc-base.nut-user-manual @@ -0,0 +1,15 @@ +Document: nut-user-manual +Title: Network UPS Tools User Manual +Author: Russell Kroll, Arnaud Quette and Arjen de Korte +Abstract: This document intend to describe how to install software support + for your Power Devices (UPS, PDU, …), and how to use the NUT project. + It is not intended to explain what are, nor distinguish the different technologies that exist. + For such information, have a look at the General Power Devices Information. +Section: System/Administration + +Format: PDF +Files: /usr/share/doc/nut-doc/pdf/user-manual.pdf + +Format: HTML +Index: /usr/share/doc/nut-doc/html/user-manual/index.html +Files: /usr/share/doc/nut-doc/html/user-manual/*.html diff --git a/debian/nut-doc.install b/debian/nut-doc.install new file mode 100644 index 0000000..e3f78fa --- /dev/null +++ b/debian/nut-doc.install @@ -0,0 +1 @@ +debian/tmp/usr/share/doc/nut-doc/ diff --git a/debian/rules b/debian/rules index 3219e60..871ffb1 100755 --- a/debian/rules +++ b/debian/rules @@ -32,6 +32,11 @@ ifeq (linux,$(DEB_HOST_ARCH_OS)) DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev endif +# only build documentation if asciidoc is installed +ifneq ($(shell which asciidoc),) + DEB_CONFIGURE_EXTRA_FLAGS+=--with-doc=html-chunked,pdf +endif + common-install-arch:: # install the bash completion script mkdir -p $(CURDIR)/debian/tmp/etc/bash_completion.d @@ -44,10 +49,23 @@ common-install-arch:: mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \ done +common-install-indep:: + #install documentation + mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf + mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html + cp $(CURDIR)/docs/*.pdf $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf + cp $(CURDIR)/docs/FAQ.html $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html + + for f in $(CURDIR)/docs/*.chunked/; do \ + nf=`basename $${f} | sed 's/\(.*\)\.chunked/\1/'`; \ + cp -a $${f} $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html/$${nf}/; \ + done + binary-install/nut-monitor:: dh_python2 -pnut-monitor DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut -- start 50 2 3 4 5 . stop 50 0 1 6 . +DEB_DH_COMPRESS_ARGS_nut-doc := -X.pdf ifeq (linux,$(DEB_HOST_ARCH_OS)) # for Debian From 1e45c0d27020645088c711246fc7121016d1cc4f Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 15 Jul 2011 15:32:31 +0200 Subject: [PATCH 056/300] debian/nut-server.prerm: Remove /var/run/nut during removal --- debian/changelog | 3 ++- debian/nut-server.prerm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c23369c..7927218 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,9 @@ nut (2.6.1-2) UNRELEASED; urgency=low - Set nut-powerman-pdu priority to extras - Add nut-monitor package - Add nut-doc package and add required C/R/P + * debian/nut-server.prerm: Remove /var/run/nut during removal - -- Laurent Bigonville Fri, 15 Jul 2011 14:59:36 +0200 + -- Laurent Bigonville Fri, 15 Jul 2011 15:31:30 +0200 nut (2.6.1-1) unstable; urgency=low diff --git a/debian/nut-server.prerm b/debian/nut-server.prerm index 2c9c2e1..6292ef8 100644 --- a/debian/nut-server.prerm +++ b/debian/nut-server.prerm @@ -14,7 +14,7 @@ case "$1" in [ -L /usr/doc/nut ] && rm -f /usr/doc/nut # do stop the daemon on remove invoke-rc.d nut stop && sleep 1 - [ -d /var/run/nut ] && rm -f /var/run/nut/*.pid + [ -d /var/run/nut ] && rm -rf /var/run/nut/ ;; upgrade) From 2ffa6bd47947f26daa65b9e722d5c55d52e1ee31 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 15 Jul 2011 15:41:05 +0200 Subject: [PATCH 057/300] Add libups-nut-perl package --- debian/changelog | 3 ++- debian/control | 13 +++++++++++++ debian/libups-nut-perl.install | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 debian/libups-nut-perl.install diff --git a/debian/changelog b/debian/changelog index 7927218..ca960be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,9 +16,10 @@ nut (2.6.1-2) UNRELEASED; urgency=low - Set nut-powerman-pdu priority to extras - Add nut-monitor package - Add nut-doc package and add required C/R/P + - Add libups-nut-perl package * debian/nut-server.prerm: Remove /var/run/nut during removal - -- Laurent Bigonville Fri, 15 Jul 2011 15:31:30 +0200 + -- Laurent Bigonville Fri, 15 Jul 2011 15:40:40 +0200 nut (2.6.1-1) unstable; urgency=low diff --git a/debian/control b/debian/control index 53f2c66..1153e72 100644 --- a/debian/control +++ b/debian/control @@ -200,3 +200,16 @@ Description: network UPS tools - GUI application to monitor UPS status changes. . This package provides nut-monitor, a GUI application to monitor UPS status. + +Package: libups-nut-perl +Section: perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends} +Description: network UPS tools - Perl bindings for NUT server + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides Perl bindings to connect to NUT server. diff --git a/debian/libups-nut-perl.install b/debian/libups-nut-perl.install new file mode 100644 index 0000000..355c6fe --- /dev/null +++ b/debian/libups-nut-perl.install @@ -0,0 +1 @@ +scripts/perl/Nut.pm /usr/share/perl5/UPS/ From 9d7ae928f5aa33b6234d73f8c1bf56557d1e86ff Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 17 Jul 2011 17:48:57 +0200 Subject: [PATCH 058/300] debian/control: Adjust Breaks/Replaces --- debian/control | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 1153e72..2696b7c 100644 --- a/debian/control +++ b/debian/control @@ -42,8 +42,8 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${ude Suggests: nut-cgi, nut-snmp, nut-dev, nut-xml Provides: ups-monitor, nut-usb Conflicts: ups-monitor, nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) -Replaces: nut (<< 2.6.1) -Breaks: nut (<< 2.6.1) +Replaces: nut (<< 2.6.1-2~) +Breaks: nut (<< 2.6.1-2~) Description: network UPS tools - core system Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and @@ -59,8 +59,8 @@ Package: nut-client Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: bash-completion -Replaces: nut (<< 2.6.1) -Breaks: nut (<< 2.6.1) +Replaces: nut (<< 2.6.1-2~) +Breaks: nut (<< 2.6.1-2~) Description: network UPS tools - clients Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and From 6be08da846d2a64a27714f572436af518e53387c Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 17 Jul 2011 19:12:26 +0200 Subject: [PATCH 059/300] Fix changelog entry --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ca960be..7c59db3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,8 @@ nut (2.6.1-2) UNRELEASED; urgency=low * Re-add and refresh debian/patches/0001-fix_spelling_and_typo.patch: Some typos and spelling errors remain. * Split nut package into nut-client and nut-server, keep nut package as - * Generate PDF and html doc and install it in nut-doc package metapackage + * Generate PDF and html doc and install it in nut-doc package * debian/rules: - List non-installed files - Includes python-module.mk From eb01d7e338beb4d47af1bc36aed0427729a1b498 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 17 Jul 2011 19:03:33 +0200 Subject: [PATCH 060/300] Release to unstable --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7c59db3..71dc1ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.6.1-2) UNRELEASED; urgency=low +nut (2.6.1-2) unstable; urgency=low * debian/nut.README.Debian: Adjust udev rules naming for permissions override (Closes: #529664) @@ -19,7 +19,7 @@ nut (2.6.1-2) UNRELEASED; urgency=low - Add libups-nut-perl package * debian/nut-server.prerm: Remove /var/run/nut during removal - -- Laurent Bigonville Fri, 15 Jul 2011 15:40:40 +0200 + -- Laurent Bigonville Sun, 17 Jul 2011 19:03:18 +0200 nut (2.6.1-1) unstable; urgency=low From 45043b58d08e1e6422d4d05c6480da74b407875f Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 29 Sep 2011 20:14:46 +0200 Subject: [PATCH 061/300] Imported Upstream version 2.6.2 --- ChangeLog | 443 ++++- MAINTAINERS | 10 +- Makefile.in | 19 +- NEWS | 73 + UPGRADING | 6 + aclocal.m4 | 160 ++ clients/Makefile.in | 12 + clients/upsclient.c | 50 +- clients/upsclient.h | 2 + common/Makefile.in | 12 + common/common.c | 5 + conf/Makefile.in | 12 + configure | 1356 ++++++++++++- configure.in | 151 +- data/Makefile.in | 12 + data/driver.list.in | 9 + data/html/Makefile.in | 12 + docs/FAQ.txt | 6 +- docs/Makefile.in | 12 + docs/acknowledgements.txt | 4 +- docs/config-notes.txt | 17 +- docs/configure.txt | 42 +- docs/download.txt | 16 +- docs/man/Makefile.am | 76 +- docs/man/Makefile.in | 87 +- docs/man/apcsmart-old.8 | 124 ++ docs/man/apcsmart-old.txt | 103 + docs/man/apcsmart.8 | 432 +++- docs/man/apcsmart.txt | 314 ++- docs/man/bcmxcp.8 | 4 +- docs/man/bcmxcp_usb.8 | 4 +- docs/man/belkin.8 | 4 +- docs/man/belkinunv.8 | 4 +- docs/man/bestfcom.8 | 4 +- docs/man/bestfortress.8 | 4 +- docs/man/bestuferrups.8 | 4 +- docs/man/bestups.8 | 4 +- docs/man/blazer.8 | 14 +- docs/man/blazer.txt | 9 +- docs/man/clone.8 | 4 +- docs/man/dummy-ups.8 | 4 +- docs/man/etapro.8 | 4 +- docs/man/everups.8 | 4 +- docs/man/gamatronic.8 | 4 +- docs/man/genericups.8 | 4 +- docs/man/hosts.conf.5 | 4 +- docs/man/isbmex.8 | 4 +- docs/man/ivtscd.8 | 4 +- docs/man/libupsclient-config.1 | 4 +- docs/man/liebert-esp2.8 | 4 +- docs/man/liebert.8 | 4 +- docs/man/masterguard.8 | 4 +- docs/man/metasys.8 | 4 +- docs/man/mge-shut.8 | 4 +- docs/man/mge-utalk.8 | 4 +- docs/man/microdowell.8 | 4 +- docs/man/netxml-ups.8 | 4 +- docs/man/nut-ipmipsu.8 | 231 +++ docs/man/nut-ipmipsu.txt | 115 ++ docs/man/nut-scanner.8 | 186 ++ docs/man/nut-scanner.txt | 131 ++ docs/man/nut.conf.5 | 4 +- docs/man/nutscan_add_device_to_device.3 | 68 + docs/man/nutscan_add_device_to_device.txt | 45 + docs/man/nutscan_add_option_to_device.3 | 65 + docs/man/nutscan_add_option_to_device.txt | 40 + docs/man/nutscan_cidr_to_ip.3 | 49 + docs/man/nutscan_cidr_to_ip.txt | 31 + docs/man/nutscan_display_parsable.3 | 50 + docs/man/nutscan_display_parsable.txt | 34 + docs/man/nutscan_display_ups_conf.3 | 46 + docs/man/nutscan_display_ups_conf.txt | 28 + docs/man/nutscan_free_device.3 | 46 + docs/man/nutscan_free_device.txt | 28 + docs/man/nutscan_new_device.3 | 49 + docs/man/nutscan_new_device.txt | 33 + docs/man/nutscan_scan_avahi.3 | 51 + docs/man/nutscan_scan_avahi.txt | 35 + docs/man/nutscan_scan_ipmi.3 | 49 + docs/man/nutscan_scan_ipmi.txt | 33 + docs/man/nutscan_scan_nut.3 | 53 + docs/man/nutscan_scan_nut.txt | 37 + docs/man/nutscan_scan_snmp.3 | 87 + docs/man/nutscan_scan_snmp.txt | 63 + docs/man/nutscan_scan_usb.3 | 49 + docs/man/nutscan_scan_usb.txt | 33 + docs/man/nutscan_scan_xml_http.3 | 49 + docs/man/nutscan_scan_xml_http.txt | 33 + docs/man/nutupsdrv.8 | 4 +- docs/man/oneac.8 | 4 +- docs/man/optiups.8 | 4 +- docs/man/powercom.8 | 4 +- docs/man/powerman-pdu.8 | 4 +- docs/man/powerpanel.8 | 4 +- docs/man/rhino.8 | 4 +- docs/man/richcomm_usb.8 | 4 +- docs/man/safenet.8 | 4 +- docs/man/snmp-ups.8 | 4 +- docs/man/solis.8 | 4 +- docs/man/tripplite.8 | 4 +- docs/man/tripplite_usb.8 | 4 +- docs/man/tripplitesu.8 | 4 +- docs/man/ups.conf.5 | 4 +- docs/man/upsc.8 | 4 +- docs/man/upscli_connect.3 | 4 +- docs/man/upscli_disconnect.3 | 4 +- docs/man/upscli_fd.3 | 4 +- docs/man/upscli_get.3 | 4 +- docs/man/upscli_list_next.3 | 4 +- docs/man/upscli_list_start.3 | 4 +- docs/man/upscli_readline.3 | 4 +- docs/man/upscli_sendline.3 | 4 +- docs/man/upscli_splitaddr.3 | 4 +- docs/man/upscli_splitname.3 | 4 +- docs/man/upscli_ssl.3 | 4 +- docs/man/upscli_strerror.3 | 4 +- docs/man/upscli_upserror.3 | 4 +- docs/man/upsclient.3 | 4 +- docs/man/upscmd.8 | 4 +- docs/man/upscode2.8 | 4 +- docs/man/upsd.8 | 4 +- docs/man/upsd.conf.5 | 4 +- docs/man/upsd.users.5 | 4 +- docs/man/upsdrvctl.8 | 4 +- docs/man/upsimage.cgi.8 | 4 +- docs/man/upslog.8 | 4 +- docs/man/upsmon.8 | 4 +- docs/man/upsmon.conf.5 | 4 +- docs/man/upsrw.8 | 4 +- docs/man/upssched.8 | 4 +- docs/man/upssched.conf.5 | 4 +- docs/man/upsset.cgi.8 | 4 +- docs/man/upsset.conf.5 | 4 +- docs/man/upsstats.cgi.8 | 4 +- docs/man/upsstats.html.5 | 4 +- docs/man/usbhid-ups.8 | 4 +- docs/man/victronups.8 | 4 +- docs/new-clients.txt | 10 + docs/nut-names.txt | 2 +- docs/stable-hcl.txt | 22 +- docs/website/Makefile.in | 12 + docs/website/news.txt | 6 +- docs/website/projects.txt | 37 +- docs/website/web-layout.conf | 8 +- drivers/Makefile.am | 27 +- drivers/Makefile.in | 149 +- drivers/apc-mib.c | 11 + drivers/apcsmart-old.c | 1501 ++++++++++++++ drivers/apcsmart-old.h | 291 +++ drivers/apcsmart.c | 1743 +++++++++++------ drivers/apcsmart.h | 374 ++-- drivers/apcsmart_tabs.c | 155 ++ drivers/apcsmart_tabs.h | 100 + drivers/bcmxcp.c | 135 +- drivers/bcmxcp.h | 18 + drivers/bcmxcp_ser.c | 2 +- drivers/bestfcom.c | 5 +- drivers/bestpower-mib.c | 4 + drivers/blazer.c | 9 + drivers/eaton-mib.c | 144 +- drivers/eaton-mib.h | 1 + drivers/ietf-mib.c | 3 +- drivers/main.c | 41 +- drivers/mge-hid.c | 144 +- drivers/mge-mib.c | 6 +- drivers/mge-utalk.c | 3 +- drivers/netvision-mib.c | 4 +- drivers/nut-ipmi.h | 57 + drivers/nut-ipmipsu.c | 240 +++ drivers/nut-libfreeipmi.c | 935 +++++++++ drivers/powerware-mib.c | 13 +- drivers/raritan-pdu-mib.c | 6 +- drivers/snmp-ups.c | 204 +- drivers/snmp-ups.h | 16 +- drivers/usb-common.c | 2 +- include/Makefile.in | 12 + include/config.h.in | 36 + include/nut_version.h | 2 +- include/parseconf.h | 2 + lib/Makefile.in | 12 + m4/nut_check_libavahi.m4 | 78 + m4/nut_check_libfreeipmi.m4 | 85 + m4/nut_check_os.m4 | 1 + m4/nut_report_feature.m4 | 3 +- scripts/Makefile.am | 3 +- scripts/Makefile.in | 15 +- scripts/README | 4 +- scripts/augeas/Makefile.in | 12 + scripts/augeas/README | 56 + scripts/augeas/nutupsconf.aug.in | 5 + scripts/avahi/nut.service.in | 34 + scripts/hal/Makefile.in | 12 + scripts/hal/ups-nut-device.fdi.in | 45 + scripts/hotplug/Makefile.in | 12 + scripts/hotplug/libhid.usermap | 10 + scripts/java/Makefile.am | 15 + scripts/java/Makefile.in | 441 +++++ scripts/java/README | 14 + scripts/java/jNut/README | 71 + scripts/java/jNut/pom.xml | 40 + .../java/org/networkupstools/jnut/Client.java | 619 ++++++ .../org/networkupstools/jnut/Command.java | 100 + .../java/org/networkupstools/jnut/Device.java | 279 +++ .../networkupstools/jnut/NutException.java | 107 + .../jnut/StringLineSocket.java | 137 ++ .../org/networkupstools/jnut/Variable.java | 120 ++ .../org/networkupstools/jnut/ClientTest.java | 95 + scripts/java/jNutList/README | 30 + scripts/java/jNutList/pom.xml | 62 + .../org/networkupstools/jnutlist/AppList.java | 112 ++ scripts/python/Makefile.in | 12 + scripts/systemd/Makefile.am | 21 + scripts/systemd/Makefile.in | 531 +++++ scripts/systemd/README | 8 + scripts/systemd/nut-driver.service.in | 10 + scripts/systemd/nut-monitor.service.in | 11 + scripts/systemd/nut-server.service.in | 12 + scripts/systemd/nutshutdown.in | 2 + scripts/udev/Makefile.am | 15 +- scripts/udev/Makefile.in | 29 +- scripts/udev/README | 23 +- scripts/udev/nut-ipmipsu.rules.in | 4 + scripts/udev/nut-usbups.rules.in | 10 + server/Makefile.in | 12 + tools/Makefile.am | 47 +- tools/Makefile.in | 332 +++- tools/nut-scanner/Makefile.am | 46 + tools/nut-scanner/Makefile.in | 797 ++++++++ tools/nut-scanner/nut-scan.h | 65 + tools/nut-scanner/nut-scanner.c | 415 ++++ tools/nut-scanner/nutscan-device.c | 183 ++ tools/nut-scanner/nutscan-device.h | 52 + tools/nut-scanner/nutscan-display.c | 112 ++ tools/nut-scanner/nutscan-ip.c | 219 +++ tools/nut-scanner/nutscan-ip.h | 42 + tools/nut-scanner/nutscan-snmp.h | 45 + tools/nut-scanner/nutscan-usb.h | 111 ++ tools/nut-scanner/scan_avahi.c | 338 ++++ tools/nut-scanner/scan_ipmi.c | 29 + tools/nut-scanner/scan_nut.c | 194 ++ tools/nut-scanner/scan_snmp.c | 520 +++++ tools/nut-scanner/scan_usb.c | 168 ++ tools/nut-scanner/scan_xml_http.c | 160 ++ tools/nut-snmpinfo.py | 137 ++ tools/nut-usbinfo.pl | 45 +- tools/svn2cl.authors | 14 +- 246 files changed, 18228 insertions(+), 1415 deletions(-) create mode 100644 docs/man/apcsmart-old.8 create mode 100644 docs/man/apcsmart-old.txt create mode 100644 docs/man/nut-ipmipsu.8 create mode 100644 docs/man/nut-ipmipsu.txt create mode 100644 docs/man/nut-scanner.8 create mode 100644 docs/man/nut-scanner.txt create mode 100644 docs/man/nutscan_add_device_to_device.3 create mode 100644 docs/man/nutscan_add_device_to_device.txt create mode 100644 docs/man/nutscan_add_option_to_device.3 create mode 100644 docs/man/nutscan_add_option_to_device.txt create mode 100644 docs/man/nutscan_cidr_to_ip.3 create mode 100644 docs/man/nutscan_cidr_to_ip.txt create mode 100644 docs/man/nutscan_display_parsable.3 create mode 100644 docs/man/nutscan_display_parsable.txt create mode 100644 docs/man/nutscan_display_ups_conf.3 create mode 100644 docs/man/nutscan_display_ups_conf.txt create mode 100644 docs/man/nutscan_free_device.3 create mode 100644 docs/man/nutscan_free_device.txt create mode 100644 docs/man/nutscan_new_device.3 create mode 100644 docs/man/nutscan_new_device.txt create mode 100644 docs/man/nutscan_scan_avahi.3 create mode 100644 docs/man/nutscan_scan_avahi.txt create mode 100644 docs/man/nutscan_scan_ipmi.3 create mode 100644 docs/man/nutscan_scan_ipmi.txt create mode 100644 docs/man/nutscan_scan_nut.3 create mode 100644 docs/man/nutscan_scan_nut.txt create mode 100644 docs/man/nutscan_scan_snmp.3 create mode 100644 docs/man/nutscan_scan_snmp.txt create mode 100644 docs/man/nutscan_scan_usb.3 create mode 100644 docs/man/nutscan_scan_usb.txt create mode 100644 docs/man/nutscan_scan_xml_http.3 create mode 100644 docs/man/nutscan_scan_xml_http.txt create mode 100644 drivers/apcsmart-old.c create mode 100644 drivers/apcsmart-old.h create mode 100644 drivers/apcsmart_tabs.c create mode 100644 drivers/apcsmart_tabs.h create mode 100644 drivers/nut-ipmi.h create mode 100644 drivers/nut-ipmipsu.c create mode 100644 drivers/nut-libfreeipmi.c create mode 100644 m4/nut_check_libavahi.m4 create mode 100644 m4/nut_check_libfreeipmi.m4 create mode 100644 scripts/avahi/nut.service.in create mode 100644 scripts/java/Makefile.am create mode 100644 scripts/java/Makefile.in create mode 100644 scripts/java/README create mode 100644 scripts/java/jNut/README create mode 100644 scripts/java/jNut/pom.xml create mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/Client.java create mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/Command.java create mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/Device.java create mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/NutException.java create mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/StringLineSocket.java create mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java create mode 100644 scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java create mode 100644 scripts/java/jNutList/README create mode 100644 scripts/java/jNutList/pom.xml create mode 100644 scripts/java/jNutList/src/main/java/org/networkupstools/jnutlist/AppList.java create mode 100644 scripts/systemd/Makefile.am create mode 100644 scripts/systemd/Makefile.in create mode 100644 scripts/systemd/README create mode 100644 scripts/systemd/nut-driver.service.in create mode 100644 scripts/systemd/nut-monitor.service.in create mode 100644 scripts/systemd/nut-server.service.in create mode 100644 scripts/systemd/nutshutdown.in create mode 100644 scripts/udev/nut-ipmipsu.rules.in create mode 100644 tools/nut-scanner/Makefile.am create mode 100644 tools/nut-scanner/Makefile.in create mode 100644 tools/nut-scanner/nut-scan.h create mode 100644 tools/nut-scanner/nut-scanner.c create mode 100644 tools/nut-scanner/nutscan-device.c create mode 100644 tools/nut-scanner/nutscan-device.h create mode 100644 tools/nut-scanner/nutscan-display.c create mode 100644 tools/nut-scanner/nutscan-ip.c create mode 100644 tools/nut-scanner/nutscan-ip.h create mode 100644 tools/nut-scanner/nutscan-snmp.h create mode 100644 tools/nut-scanner/nutscan-usb.h create mode 100644 tools/nut-scanner/scan_avahi.c create mode 100644 tools/nut-scanner/scan_ipmi.c create mode 100644 tools/nut-scanner/scan_nut.c create mode 100644 tools/nut-scanner/scan_snmp.c create mode 100644 tools/nut-scanner/scan_usb.c create mode 100644 tools/nut-scanner/scan_xml_http.c create mode 100755 tools/nut-snmpinfo.py diff --git a/ChangeLog b/ChangeLog index 12e3085..0e1be23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,438 @@ +2011-09-15 Arnaud Quette + + * [r3238] drivers/nut-ipmipsu.c, drivers/nut-libfreeipmi.c: Don't + override PSU absence with the power failure flag + * [r3237] NEWS, UPGRADING, configure.in, docs/download.txt, + docs/website/news.txt: Final update for 2.6.2 release + * [r3236] docs/configure.txt: Complete the minimum FreeIPMI version + required + * [r3235] tools/nut-scanner: Mark remaining generated files as a + Subversion ignored files (no functional changes) + +2011-09-15 Frederic Bohe + + * [r3234] tools/nut-scanner/scan_nut.c: Conditional inclusion of + pthread.h + * [r3233] tools/nut-scanner/nut-scanner.c, + tools/nut-scanner/nutscan-display.c, + tools/nut-scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, + tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_usb.c, + tools/nut-scanner/scan_xml_http.c: config.h is included in + common.h, so only include common.h + * [r3232] include/parseconf.h: We need stdio.h because we use FILE + type. + +2011-09-15 Arnaud Quette + + * [r3231] docs/man: Mark remaining generated manual pages as a + Subversion ignored files (no functional changes) + * [r3230] docs/man/nut-ipmipsu.txt, drivers/nut-ipmi.h, + drivers/nut-ipmipsu.c, drivers/nut-libfreeipmi.c, + m4/nut_check_libfreeipmi.m4: Complete nut-ipmipsu, by adding + sensors discovery and monitoring + +2011-09-14 Frederic Bohe + + * [r3229] tools/nut-scanner/scan_snmp.c: Remove use of strndup. + This is not supported on Solaris. + +2011-09-14 Charles Lepple + + * [r3228] tools/nut-scanner/scan_snmp.c: Remove unbalanced #endif + * [r3227] tools/nut-scanner/scan_snmp.c: nut-scanner: use + "common.h", which includes "config.h" + * [r3226] tools/nut-scanner/scan_snmp.c, + tools/nut-scanner/scan_usb.c: Include for nut-scanner + * [r3225] tools/nut-scanner/scan_snmp.c: Silence redefined PACKAGE_ + macro warnings + + This should be fixed properly upstream, but in the mean time, the + SNMP-based + tools can't use these macros properly (since they will have the + values for + Net-SNMP, not NUT). + +2011-09-14 Frederic Bohe + + * [r3224] tools/nut-scanner/nutscan-ip.c: Get rid of s6_addr32 in + IPv6 code since it is implementation specific. Replaced by + s6_addr. ( thanks to Charles Lepple) + +2011-09-14 Arnaud Quette + + * [r3223] drivers: Mark apcsmart-old binary as a Subversion ignored + file (no functional changes) + +2011-09-14 Emilien Kia + + * [r3222] + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Client.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Command.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Device.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/NutException.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/StringLineSocket.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java: + Fix mail address typo for javadoc. + +2011-09-13 Frederic Bohe + + * [r3221] tools/nut-scanner/Makefile.am: Fix make distcheck-light + +2011-09-13 Arnaud Quette + + * [r3220] drivers/bcmxcp.c: Fix compilation warning on values + comparison being always false + * [r3219] configure.in, tools/nut-scanner/nut-scanner.c: Complete + commit r3218, to address getopt_long too + * [r3218] configure.in: Do a second check to ensure inclusion of + getopt.h, in case optind is known + * [r3217] drivers/bcmxcp.c, drivers/bcmxcp.h, drivers/bcmxcp_ser.c: + Add support for outlet.n.delay.{start,shutdown}, and use + outlet.n.delay.shutdown for outlet.n.shutdown.return instead of + the default 3 seconds (patch from Rich Wrenn) + +2011-09-13 Frederic Bohe + + * [r3216] tools/nut-scanner/nutscan-ip.c: Do not use long long + variable anymore + * [r3215] tools/nut-scanner/scan_avahi.c, + tools/nut-scanner/scan_nut.c: Remove all calls to asprintf + +2011-09-12 Frederic Bohe + + * [r3214] clients/upsclient.c, clients/upsclient.h, configure.in, + docs/man/Makefile.am, docs/man/nut-scanner.txt, + docs/man/nutscan_add_device_to_device.txt, + docs/man/nutscan_add_option_to_device.txt, + docs/man/nutscan_cidr_to_ip.txt, + docs/man/nutscan_display_parsable.txt, + docs/man/nutscan_display_ups_conf.txt, + docs/man/nutscan_free_device.txt, + docs/man/nutscan_new_device.txt, docs/man/nutscan_scan_avahi.txt, + docs/man/nutscan_scan_ipmi.txt, docs/man/nutscan_scan_nut.txt, + docs/man/nutscan_scan_snmp.txt, docs/man/nutscan_scan_usb.txt, + docs/man/nutscan_scan_xml_http.txt, m4/nut_check_libavahi.m4, + tools/Makefile.am, tools/nut-scanner, + tools/nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, + tools/nut-scanner/nut-scanner.c, + tools/nut-scanner/nutscan-device.c, + tools/nut-scanner/nutscan-device.h, + tools/nut-scanner/nutscan-display.c, + tools/nut-scanner/nutscan-ip.c, tools/nut-scanner/nutscan-ip.h, + tools/nut-scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, + tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, + tools/nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c, + tools/nut-snmpinfo.py, tools/nut-usbinfo.pl: Add nut-scanner tool + +2011-09-12 Michal Soltys + + * [r3211] docs/man/Makefile.am, docs/man/apcsmart-old.txt, + docs/man/apcsmart.txt, drivers/Makefile.am, + drivers/apcsmart-old.c, drivers/apcsmart-old.h, + drivers/apcsmart.c, drivers/apcsmart.h, drivers/apcsmart_tabs.c, + drivers/apcsmart_tabs.h: merge updated apcsmart driver from + apcsmart-dev branch + + This commit clones trunk apcsmart to apcsmart-old, and merges + updated driver from apcsmart-dev. + + Both drivers are built and available for the users, should there + be any issues with the new version. + + The driver/table version is also incremented (3.0). + +2011-09-12 Charles Lepple + + * [r3206] docs/FAQ.txt: Reword rewording in FAQ + +2011-09-09 Arnaud Quette + + * [r3205] docs/FAQ.txt: Fix wording, that is not appropriate + anymore + * [r3204] docs/config-notes.txt: Complete shutdown information on + the "critical UPS" notion + * [r3203] docs/download.txt: Add missing comma for OpenWrt + * [r3202] docs/stable-hcl.txt: Complete information for reporting + new device + * [r3201] drivers/eaton-mib.c, drivers/eaton-mib.h, + drivers/snmp-ups.c: Add a missing Eaton MIB for PDU + +2011-09-08 Arnaud Quette + + * [r3199] docs/download.txt: Forgotten commit for the new updated + Windows package + * [r3198] docs/website/web-layout.conf: Fix XHTML 1.1 compliance + (reported by W3C validators) + * [r3196] ., configure.in, m4/nut_check_os.m4, scripts/Makefile.am, + scripts/README, scripts/systemd, scripts/systemd/Makefile.am, + scripts/systemd/README, scripts/systemd/nut-driver.service.in, + scripts/systemd/nut-monitor.service.in, + scripts/systemd/nut-server.service.in, + scripts/systemd/nutshutdown.in: Add initial support for systemd + (patch from Michal Hlavinka) + +2011-09-06 Arnaud Quette + + * [r3194] drivers/apc-mib.c, drivers/bestpower-mib.c, + drivers/eaton-mib.c, drivers/ietf-mib.c, drivers/mge-mib.c, + drivers/netvision-mib.c, drivers/powerware-mib.c, + drivers/raritan-pdu-mib.c, drivers/snmp-ups.c, + drivers/snmp-ups.h: Add a new initialization method, that uses + sysObjectID (indirection to the main MIB of the device) to detect + supported devices. This speeds up even more init stage and should + render void the use of 'mib' option + * [r3193] drivers/snmp-ups.c: Force numeric OIDs resolution, ie do + not resolve to textual names. This is mostly for the convenience + of debug output + +2011-09-05 Arnaud Quette + + * [r3186] scripts/java/Makefile.am, scripts/java/jNutList/src/test: + Remove test code, since it is bound to jNut and not jNutList + (reported by Emilien Kia) + * [r3185] drivers/mge-hid.c: Add support for battery.runtime.low, + and end of battery life (life cycle monitoring) ; along with + measurements (outlet power factor, power, real power and current) + for 5 PX + * [r3184] configure.in, scripts/Makefile.am, scripts/java, + scripts/java/Makefile.am: Complete jNut automake integration + (distribution rules) + +2011-09-03 Arnaud Quette + + * [r3183] docs/man: Mark nut-ipmipsu.html as a Subversion ignored + files (no functional changes) + +2011-09-02 Arnaud Quette + + * [r3182] docs/new-clients.txt: Fix jNut Asciidoc integration + * [r3181] docs/download.txt, docs/new-clients.txt, + docs/website/news.txt, scripts/README, scripts/java/README, + scripts/java/jNut/README, scripts/java/jNutList/README: Integrate + jNUT information in the developer guide, along with news and + download section + * [r3180] docs/website/news.txt: Add the Beta NUT 2.6.1-1 package + for Windows, and some news history (just intended for VCS + history) + * [r3179] docs/website/projects.txt: Formatting fixes + +2011-09-02 Emilien Kia + + * [r3178] scripts/java, scripts/java/README, scripts/java/jNut, + scripts/java/jNut/README, scripts/java/jNut/pom.xml, + scripts/java/jNut/src, scripts/java/jNut/src/main, + scripts/java/jNut/src/main/java, + scripts/java/jNut/src/main/java/org, + scripts/java/jNut/src/main/java/org/networkupstools, + scripts/java/jNut/src/main/java/org/networkupstools/jnut, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Client.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Command.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Device.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/NutException.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/StringLineSocket.java, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java, + scripts/java/jNut/src/main/resources, scripts/java/jNut/src/test, + scripts/java/jNut/src/test/java, + scripts/java/jNut/src/test/java/org, + scripts/java/jNut/src/test/java/org/networkupstools, + scripts/java/jNut/src/test/java/org/networkupstools/jnut, + scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java, + scripts/java/jNutList, scripts/java/jNutList/README, + scripts/java/jNutList/pom.xml, scripts/java/jNutList/src, + scripts/java/jNutList/src/main, + scripts/java/jNutList/src/main/java, + scripts/java/jNutList/src/main/java/org, + scripts/java/jNutList/src/main/java/org/networkupstools, + scripts/java/jNutList/src/main/java/org/networkupstools/jnutlist, + scripts/java/jNutList/src/main/java/org/networkupstools/jnutlist/AppList.java, + scripts/java/jNutList/src/main/resources, + scripts/java/jNutList/src/test, + scripts/java/jNutList/src/test/java, + scripts/java/jNutList/src/test/java/org, + scripts/java/jNutList/src/test/java/org/networkupstools, + scripts/java/jNutList/src/test/java/org/networkupstools/jnuttest, + scripts/java/jNutList/src/test/java/org/networkupstools/jnuttest/AppTest.java: + Add jNut (NUT client in Java) to trunk. + +2011-09-02 Arnaud Quette + + * [r3174] drivers/main.c: Remove extraneous empty line + +2011-08-31 Emilien Kia + + * [r3173] drivers/usb-common.c: Fix pointer check on wrong variable + (Patch from Thomas Jarosch) + * [r3172] drivers/mge-utalk.c: Fix use of uninitialized variable + (Patch from Thomas Jarosch) + * [r3171] common/common.c: Fix file descriptor leak (Patch from + Thomas Jarosch) + +2011-08-29 Arnaud Quette + + * [r3164] drivers/mge-hid.c: Add region/country management, to + improve features provided such as 'output.voltage.nominal' and 3S + Eco control + * [r3163] data/driver.list.in, drivers/mge-hid.c: Add Eaton 3S to + the list of usbhid-ups supported models + +2011-08-25 Arnaud Quette + + * [r3160] docs/nut-names.txt: Fix duplication + +2011-08-20 Charles Lepple + + * [r3158] m4/nut_report_feature.m4: Avoid implementation-specific + use of "echo" in autoconf + + http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html + +2011-08-05 Charles Lepple + + * [r3150] configure.in: configure.in: minor changes to output + + * Capitalized "UPS" + * --with-drivers= : Only *build* specific drivers + +2011-07-30 Arnaud Quette + + * [r3149] data/driver.list.in: Add Cyber Power Systems CP1000AVRLCD + to the list of usbhid-ups supported models (reported by David C. + Rankin) + +2011-07-28 Arnaud Quette + + * [r3148] tools/nut-usbinfo.pl: Proper fix to r3012, which + satisfies both udev and upower + +2011-07-27 Arnaud Quette + + * [r3147] tools/nut-usbinfo.pl: Partially revert r3012. It caused a + udev regression, with several missing USB IDs (thanks to Pawel + Sikora for uncovering it) + * [r3146] scripts/augeas/README: Add a complete Python Augeas + example code + +2011-07-26 Arnaud Quette + + * [r3145] configure.in, docs/man/nut-ipmipsu.txt, scripts/udev, + scripts/udev/Makefile.am, scripts/udev/README, + scripts/udev/nut-ipmipsu.rules.in: Add udev rules file and + documentation for nut-ipmipsu + * [r3144] m4/nut_check_libfreeipmi.m4: Improve detection of the + needed functions + * [r3143] data/driver.list.in: Add Orvaldi 750 / 900SP to the list + of blazer_usb supported models (reported by Pawel Sikora) + * [r3142] drivers/nut-ipmipsu.c: Fix missing comment closure, add a + TODO list and remove unused variables + +2011-07-21 Charles Lepple + + * [r3141] tools/git-svn.authors: Added authors file for git-svn + synchronization + +2011-07-19 Arnaud Quette + + * [r3140] data/driver.list.in: Add POWEREX VI 1000 LED to the list + of blazer_usb supported models (reported by Sergey Talchuk) + +2011-07-17 Arnaud Quette + + * [r3139] data/driver.list.in: Add SVEN Power Pro+ series (USB ID + ffff:0000) to the list of blazer_usb supported models (reported + by Vlad) + +2011-07-16 Arnaud Quette + + * [r3138] configure.in: Fix --with-[free]ipmi configure option so + that it actually behave correctly in automatic detection mode + +2011-07-14 Arnaud Quette + + * [r3137] configure.in: Fix the typo that made its way into commit + r3136, and broke configure + * [r3136] configure.in, docs/configure.txt, docs/man, + docs/man/Makefile.am, docs/man/nut-ipmipsu.txt, drivers, + drivers/Makefile.am, drivers/nut-ipmi.h, drivers/nut-ipmipsu.c, + drivers/nut-libfreeipmi.c, m4/nut_check_libfreeipmi.m4: First + attempt to create a driver to monitor power supply units using + IPMI. This preliminary version only reads FRU (Field Replace + Unit) information, but not yet the sensor information (describing + if the PSU is present and online), and includes base + documentation (manpage and configure options). It currently + supports GNU FreeIPMI, but uses an abstract IPMI implementation + that will allow to use other IPMI toolkits + +2011-07-13 Arnaud Quette + + * [r3135] docs/configure.txt: Move several misplaced options to the + right sections + * [r3132] drivers/bestfcom.c: Remove unused variables (patch from + Regid Ichira, Debian bug #633756) + +2011-07-12 Arnaud Quette + + * [r3131] MAINTAINERS: Update the corporate mail address and some + details + +2011-07-08 Charles Lepple + + * [r3129] docs/acknowledgements.txt: Fix typo in link on + Acknowledgements page + +2011-07-07 Arnaud Quette + + * [r3127] docs/acknowledgements.txt: Move Arjen de Korte, NUT + Senior lieutenant, to the Retired members section. Thanks for all + his years of dedication to make NUT better + +2011-07-01 Arjen de Korte + + * [r3115] MAINTAINERS: It's been fun, but I feel the time has come + to say farewell. All the best... + +2011-06-29 Arnaud Quette + + * [r3109] configure.in, scripts/Makefile.am, scripts/avahi, + scripts/avahi/nut.service.in: Add Avahi support for NUT mDNS + publication, using a static service file + * [r3106] tools/svn2cl.authors: Add missing committers, and reorder + using the Project Member List: + https://alioth.debian.org/project/memberlist.php?group_id=30602 + +2011-06-28 Arnaud Quette + + * [r3105] data/driver.list.in: Add various models equiped with APC + AP9618 management card, including APC Smart-UPS RT XL, to the + list of snmp-ups supported models (reported by Angela Williams) + +2011-06-23 Arjen de Korte + + * [r3057] drivers/main.c: Try to prevent that drivers are started + multiple times for the same UPS. + +2011-06-17 Arjen de Korte + + * [r3047] docs/man/blazer.txt, drivers/blazer.c: Add preselection + of communication protocol used + +2011-06-16 Frederic Bohe + + * [r3045] drivers/snmp-ups.c: Fix SNMP v3 session initialisation + +2011-06-08 Arnaud Quette + + * [r3037] docs/website/web-layout.conf: Update the Firefox download + button, since the previous one has disappeared + * [r3036] docs/website/news.txt, docs/website/projects.txt: Add a + news entry, and a reference in the Related projects, on Dell + PowerVault NX3500, which uses NUT for power protection (approved + by Dell) + +2011-06-04 Arnaud Quette + + * [r3026] data/driver.list.in: Add PowerWalker VI 850 LCD to the + list of blazer_usb supported models (reported by Wayne Thomas) + 2011-06-01 Arnaud Quette * [r3023] docs/download.txt: Add the missing SHA-256 sum on the @@ -51,7 +486,7 @@ * [r3002] server/netinstcmd.c: Fix the missing 'extra value' handling for instant commands -2011-05-24 msoltyspl-guest +2011-05-24 Michal Soltys * [r2997] drivers/apcsmart.c: apcmsart.c: fix upsdrv_shutdown_advanced() - with 'continue' statement, sdcmd_*s @@ -136,7 +571,7 @@ [http://lists.alioth.debian.org/pipermail/nut-upsuser/2011-March/006770.html] -2011-03-31 fbohe-guest +2011-03-31 Frederic Bohe * [r2962] data/driver.list.in, drivers/mge-hid.c: Add Eaton Powerware 9140 to the list of usbhid-ups supported models @@ -153,7 +588,7 @@ which cause unresolved symbol on libupsclient users (reported by Fabrice Coutadeur on Ubuntu) -2011-03-23 fbohe-guest +2011-03-23 Frederic Bohe * [r2957] INSTALL: Reverting previous commit (should not be in the trunk) @@ -341,7 +776,7 @@ * [r2891] drivers/dummy-ups.c: Prefer 'snprintf' and 'snprintfcat' over 'strncat' (the latter can overflow the destination buffer) -2011-02-09 fbohe-guest +2011-02-09 Frederic Bohe * [r2888] drivers/dummy-ups.c: Fix a memory leak in dummy-ups driver diff --git a/MAINTAINERS b/MAINTAINERS index 7d403cc..c52d095 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -25,7 +25,7 @@ S: Status: (add others as necessary) In the case of drivers, "maintained" should only be used if you have -access to the hardware in question for testing. +access to the hardware in question for testing. Drivers ======= @@ -37,13 +37,9 @@ S: Maintained: apcsmart, belkin, bestups, cyberpower, dummycons, P: Arnaud Quette M: aquette.dev@gmail.com -M: arnaud.quette@mgeups.com +M: ArnaudQuette@eaton.com S: Maintained or Supported: dummy-ups, usbhid-ups, mge-shut, newmge-shut - mge-utalk, snmp-ups, HAL support - -P: Arjen de Korte -M: arjen@de-korte.org -S: Maintained: safenet, genericups, powerpanel, netxml-ups, usbhid-ups + mge-utalk, snmp-ups, ... P: Fabio Di Niro M: blaxwan@users.sourceforge.net diff --git a/Makefile.in b/Makefile.in index 2f6c7aa..2cd8916 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,7 +38,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ + $(srcdir)/Makefile.in $(top_srcdir)/configure \ + $(top_srcdir)/scripts/avahi/nut.service.in AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO compile config.guess config.sub \ depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -48,6 +49,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -67,7 +70,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = scripts/avahi/nut.service CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = @@ -166,10 +169,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -207,6 +214,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -271,6 +282,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -349,6 +362,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): +scripts/avahi/nut.service: $(top_builddir)/config.status $(top_srcdir)/scripts/avahi/nut.service.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo diff --git a/NEWS b/NEWS index e381249..4552f1f 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,79 @@ If you're upgrading from an earlier version, see the UPGRADING file. For a complete list of changes, please refer to the ChangeLog file. +--------------------------------------------------------------------------- +Release notes for NUT 2.6.2 - what's new since 2.6.1: + + - NUT can now monitor power supply units (PSU) in servers, through IPMI, using + the new experimental 'nut-ipmipsu' driver. Users are encouraged to test it, + and send feedback and debug output to the development mailing list. + This requires GNU FreeIPMI (0.8.5 or higher) development package or files. + Thanks goes to Al Chu, FreeIPMI project leader, for his help during this + development. + + - NUT now provides a tool, called 'nut-scanner', to discover supported devices, + both local and remote. nut-scanner will help to ease the configuration step, + and power infrastructure discovery. + This development, sponsored by Eaton, supports the following methods: + * USB, + * SNMP, + * XML/HTTP (from Eaton), + * NUT servers, using the classic connect or Avahi / mDNS methods. + + IPMI support will be added in the next release. + A separate library, called 'libnutscan', is also available to provide these + feature. Future NUT releases will provides binding for the supported + languages (Perl, Python and Java). + + - NUT now provides a Java interface called 'jNut'. + This development, sponsored by Eaton, is currently limited to the client + interface. But it will be broaden to device discovery and configuration in + the future. + For more info, refer to nut/scripts/java/README, or the developer guide + (chapter 'Creating new client'). Javadoc documentation is also provided, + along with Java archives (.jar) in the Download section. + + - support for new devices: Eaton 3S ; Cyber Power Systems CP1000AVRLCD ; + various APC models equiped with APC AP9618 management card, including APC + Smart-UPS RT XL ; Orvaldi 750 / 900SP ; POWEREX VI 1000 LED ; PowerWalker + VI 850 LCD ; SVEN Power Pro+ series (USB ID ffff:0000). + + - A regression has been fixed in udev rules file. This previously caused + permission issues to owners of some USB devices. + + - Avahi support has been added, for NUT mDNS publication, through a static + service file (nut/scripts/avahi/nut.service). + + - usbhid-ups has had Eaton completion: some features have been improved, such + as 'output.voltage.nominal' ; 3S Eco control support has been added, along + with battery.runtime.low and end of battery life (life cycle monitoring) + support ; new measurements for 5 PX are also supported now (outlet power + factor, power, real power and current). + + - apcsmart has been updated to support more variables and features ; the + previous driver is however still available as 'apcsmart-old', in case of + issues. + + - bcmxcp now supports per outlet startup and shutdown delays setting ; shutdown + delay is also used, when available, for outlet.n.shutdown.return instead of + the default 3 seconds. + + - snmp-ups.c has a new initialization method, that uses sysObjectID, which is + a pointer to the prefered MIB of the device, to detect supported devices. + This speeds up even more init stage and should render void the use of 'mib' + option. SNMP v3 session initialisation has also been fixed, and Eaton PDU + support has been completed. + + - Initial support has been added for systemd, the System and Service Manager + from RedHat. + + - The chapter 'NUT configuration management with Augeas' of the developer guide + has received some completion: a complete Python Augeas example code is now + provided. + + - Finally, after years of dedication to NUT, Arjen de Korte is now retired. + Sincere thanks to you Arjen from us all. + --------------------------------------------------------------------------- Release notes for NUT 2.6.1 - what's new since 2.6.0: diff --git a/UPGRADING b/UPGRADING index 12680d9..ef7d59c 100644 --- a/UPGRADING +++ b/UPGRADING @@ -7,6 +7,12 @@ 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.1 to 2.6.2 +--------------------------- + +- apcsmart driver has been replaced by a new implementation. In case of issue +with this new version, users can revert to apcsmart-old. + Changes from 2.6.0 to 2.6.1 --------------------------- diff --git a/aclocal.m4 b/aclocal.m4 index 99662b0..d5e9925 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -126,6 +126,164 @@ AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], | (ullmax / ull) | (ullmax % ull));]]) ]) +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# 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. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -1139,6 +1297,8 @@ m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/nut_arg_with.m4]) m4_include([m4/nut_check_asciidoc.m4]) +m4_include([m4/nut_check_libavahi.m4]) +m4_include([m4/nut_check_libfreeipmi.m4]) m4_include([m4/nut_check_libgd.m4]) m4_include([m4/nut_check_libhal.m4]) m4_include([m4/nut_check_libneon.m4]) diff --git a/clients/Makefile.in b/clients/Makefile.in index 71f8770..29abfac 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -59,6 +59,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -229,10 +231,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -270,6 +276,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -334,6 +344,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/clients/upsclient.c b/clients/upsclient.c index 50177d1..a2fe4f5 100644 --- a/clients/upsclient.c +++ b/clients/upsclient.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "upsclient.h" #include "timehead.h" @@ -393,12 +394,17 @@ int upscli_sslcert(UPSCONN_t *ups, const char *file, const char *path, int verif #endif /* HAVE_SSL */ -int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) +int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags,struct timeval * timeout) { int sock_fd; struct addrinfo hints, *res, *ai; char sport[NI_MAXSERV]; int v; + fd_set wfds; + int ret; + int error; + socklen_t error_size; + long fd_flags; if (!ups) { return -1; @@ -466,7 +472,37 @@ int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) continue; } + /* non blocking connect */ + if(timeout != NULL) { + fd_flags = fcntl(sock_fd, F_GETFL); + fd_flags |= O_NONBLOCK; + fcntl(sock_fd, F_SETFL, fd_flags); + } + while ((v = connect(sock_fd, ai->ai_addr, ai->ai_addrlen)) < 0) { + if(errno == EINPROGRESS) { + FD_ZERO(&wfds); + FD_SET(sock_fd, &wfds); + ret = select(sock_fd+1,NULL,&wfds,NULL, + timeout); + if (FD_ISSET(sock_fd, &wfds)) { + error_size = sizeof(error); + getsockopt(sock_fd,SOL_SOCKET,SO_ERROR, + &error,&error_size); + if( error == 0) { + /* connect successful */ + v = 0; + break; + } + errno = error; + } + else { + /* Timeout */ + v = -1; + break; + } + } + switch (errno) { case EAFNOSUPPORT: @@ -486,6 +522,13 @@ int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) continue; } + /* switch back to blocking operation */ + if(timeout != NULL) { + fd_flags = fcntl(sock_fd, F_GETFL); + fd_flags &= ~O_NONBLOCK; + fcntl(sock_fd, F_SETFL, fd_flags); + } + ups->fd = sock_fd; ups->upserror = 0; ups->syserrno = 0; @@ -529,6 +572,11 @@ int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) return 0; } +int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) +{ + return upscli_tryconnect(ups,host,port,flags,NULL); +} + /* map upsd error strings back to upsclient internal numbers */ static struct { int errnum; diff --git a/clients/upsclient.h b/clients/upsclient.h index 55ffd29..0188ab4 100644 --- a/clients/upsclient.h +++ b/clients/upsclient.h @@ -65,6 +65,8 @@ 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_connect(UPSCONN_t *ups, const char *host, int port, int flags); /* --- functions that only use the new names --- */ diff --git a/common/Makefile.in b/common/Makefile.in index c0e19e2..298bc93 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -47,6 +47,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -135,10 +137,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -176,6 +182,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -240,6 +250,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/common/common.c b/common/common.c index f443cb7..e8004d7 100644 --- a/common/common.c +++ b/common/common.c @@ -244,6 +244,7 @@ int sendsignalfn(const char *pidfn, int sig) if (fgets(buf, sizeof(buf), pidf) == NULL) { upslogx(LOG_NOTICE, "Failed to read pid from %s", pidfn); + fclose(pidf); return -1; } @@ -251,6 +252,7 @@ int sendsignalfn(const char *pidfn, int sig) if (pid < 2) { upslogx(LOG_NOTICE, "Ignoring invalid pid number %d", pid); + fclose(pidf); return -1; } @@ -259,6 +261,7 @@ int sendsignalfn(const char *pidfn, int sig) if (ret < 0) { perror("kill"); + fclose(pidf); return -1; } @@ -267,9 +270,11 @@ int sendsignalfn(const char *pidfn, int sig) if (ret < 0) { perror("kill"); + fclose(pidf); return -1; } + fclose(pidf); return 0; } diff --git a/conf/Makefile.in b/conf/Makefile.in index 18708a5..f0101e9 100644 --- a/conf/Makefile.in +++ b/conf/Makefile.in @@ -47,6 +47,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -140,10 +142,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -181,6 +187,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -245,6 +255,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/configure b/configure index 071b034..4054e72 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for nut 2.6.1. +# Generated by GNU Autoconf 2.67 for nut 2.6.2. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -698,8 +698,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nut' PACKAGE_TARNAME='nut' -PACKAGE_VERSION='2.6.1' -PACKAGE_STRING='nut 2.6.1' +PACKAGE_VERSION='2.6.2' +PACKAGE_STRING='nut 2.6.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -747,6 +747,8 @@ am__EXEEXT_TRUE LTLIBOBJS udevdir hotplugdir +systemdsystemshutdowndir +systemdsystemunitdir pkgconfigdir driverexecdir cgiexecdir @@ -754,6 +756,7 @@ WORDS_BIGENDIAN SUN_LIBUSB RUN_AS_GROUP RUN_AS_USER +PORT BINDIR CONFPATH STATEPATH @@ -771,8 +774,12 @@ HAL_USER LIBWRAP_LIBS LIBWRAP_CFLAGS DOC_BUILD_LIST +LIBIPMI_LIBS +LIBIPMI_CFLAGS LIBPOWERMAN_LIBS LIBPOWERMAN_CFLAGS +LIBAVAHI_LIBS +LIBAVAHI_CFLAGS LIBNEON_LIBS LIBNEON_CFLAGS LIBUSB_LIBS @@ -790,6 +797,11 @@ WITH_UDEV_FALSE WITH_UDEV_TRUE WITH_HOTPLUG_FALSE WITH_HOTPLUG_TRUE +HAVE_SYSTEMD_FALSE +HAVE_SYSTEMD_TRUE +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG WITH_PKG_CONFIG_FALSE WITH_PKG_CONFIG_TRUE SOME_DRIVERS_FALSE @@ -824,8 +836,14 @@ WITH_WRAP_FALSE WITH_WRAP_TRUE WITH_SSL_FALSE WITH_SSL_TRUE +WITH_FREEIPMI_FALSE +WITH_FREEIPMI_TRUE +WITH_IPMI_FALSE +WITH_IPMI_TRUE WITH_LIBPOWERMAN_FALSE WITH_LIBPOWERMAN_TRUE +WITH_AVAHI_FALSE +WITH_AVAHI_TRUE WITH_NEONXML_FALSE WITH_NEONXML_TRUE WITH_SNMP_FALSE @@ -960,6 +978,12 @@ with_neon_libs with_powerman with_powerman_includes with_powerman_libs +with_avahi_includes +with_avahi_libs +with_ipmi +with_freeipmi +with_freeipmi_includes +with_freeipmi_libs with_ssl with_ssl_includes with_ssl_libs @@ -986,6 +1010,7 @@ with_logfacility with_drivers enable_strip with_pkgconfig_dir +with_systemdsystemunitdir with_hotplug_dir with_udev_dir ' @@ -997,7 +1022,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR' # Initialize some variables set by options. @@ -1540,7 +1568,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nut 2.6.1 to adapt to many kinds of systems. +\`configure' configures nut 2.6.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1611,7 +1639,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nut 2.6.1:";; + short | recursive ) echo "Configuration of nut 2.6.2:";; esac cat <<\_ACEOF @@ -1633,7 +1661,8 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-all enable serial, usb, snmp, neon, powerman, cgi, dev + --with-all enable serial, usb, snmp, neon, ipmi, powerman, cgi, + dev, avahi --with-dev build and install the development files (no) --with-serial build and install serial drivers (yes) --with-usb build and install USB drivers (auto) @@ -1665,6 +1694,16 @@ Optional Packages: include flags for the libpowerman library [--with-powerman-libs=LIBS] linker flags for the libpowerman library + [--with-avahi-includes=CFLAGS] + include flags for the avahi library + [--with-avahi-libs=LIBS] + linker flags for the avahi library + --with-ipmi build and install IPMI PSU driver (auto) + --with-freeipmi enable IPMI support using FreeIPMI (auto) + [--with-freeipmi-includes=CFLAGS] + include flags for the FreeIPMI library + [--with-freeipmi-libs=LIBS] + linker flags for the FreeIPMI library --with-ssl enable SSL development code (auto) [--with-ssl-includes=CFLAGS] include flags for the OpenSSL library @@ -1680,7 +1719,7 @@ Optional Packages: --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-statepath=PATH path for ups state files (/var/state/ups) --with-altpidpath=PATH path for driver/upsd .pid files () - --with-drvpath=PATH where to install ups drivers (EPREFIX/bin) + --with-drvpath=PATH where to install UPS drivers (EPREFIX/bin) --with-cgipath=PATH where to install CGI programs (EPREFIX/cgi-bin) --with-htmlpath=PATH where to install HTML files (PREFIX/html) --with-pidpath=PATH path for .pid files (/var/run) @@ -1691,10 +1730,12 @@ Optional Packages: --with-logfacility=FACILITY facility for log messages (LOG_DAEMON) [--with-drivers=driver[,driver]] - Only use specific drivers (all) + Only build specific drivers (all) --with-pkgconfig-dir=PATH where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig) + --with-systemdsystemunitdir=DIR + Directory for systemd service files (auto) --with-hotplug-dir=PATH where to install hotplug rules (/etc/hotplug) --with-udev-dir=PATH where to install udev rules (/lib/udev or /etc/udev) @@ -1707,6 +1748,11 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1774,7 +1820,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nut configure 2.6.1 +nut configure 2.6.2 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2239,7 +2285,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nut $as_me 2.6.1, which was +It was created by nut $as_me 2.6.2, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2767,6 +2813,7 @@ test -n "$target_alias" && } + # Look for all possible source of OS name resolution # 1) we look for a LSB release info file eval "dist_search_path=\" @@ -3308,7 +3355,7 @@ fi # Define the identity of the package. PACKAGE='nut' - VERSION='2.6.1' + VERSION='2.6.2' cat >>confdefs.h <<_ACEOF @@ -4819,6 +4866,7 @@ fi + test "${prefix}" = "NONE" && prefix="${ac_default_prefix}" test "${exec_prefix}" = "NONE" && exec_prefix='${prefix}' @@ -6630,6 +6678,42 @@ done fi +for ac_header in getopt.h +do : + ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default +" +if test "x$ac_cv_header_getopt_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_H 1 +_ACEOF + + +$as_echo "#define NEED_GETOPT_H 1" >>confdefs.h + + +else + + +$as_echo "#define NEED_GETOPT_DECLS 1" >>confdefs.h + + +fi + +done + + +for ac_func in getopt_long +do : + ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" +if test "x$ac_cv_func_getopt_long" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_LONG 1 +_ACEOF + +fi +done + + ac_fn_c_check_decl "$LINENO" "uu_lock" "ac_cv_have_decl_uu_lock" " #include #include @@ -6866,6 +6950,66 @@ fi done +# pthread related checks +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 +$as_echo_n "checking for library containing pthread_create... " >&6; } +if test "${ac_cv_search_pthread_create+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (); +int +main () +{ +return pthread_create (); + ; + return 0; +} +_ACEOF +for ac_lib in '' pthread; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_pthread_create=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_pthread_create+set}" = set; then : + break +fi +done +if test "${ac_cv_search_pthread_create+set}" = set; then : + +else + ac_cv_search_pthread_create=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5 +$as_echo "$ac_cv_search_pthread_create" >&6; } +ac_res=$ac_cv_search_pthread_create +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h + +fi + + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include #include @@ -6946,6 +7090,8 @@ if test "${with_all+set}" = set; then : if test -z "${with_powerman}"; then with_powerman="${withval}"; fi if test -z "${with_cgi}"; then with_cgi="${withval}"; fi if test -z "${with_dev}"; then with_dev="${withval}"; fi + if test -z "${with_avahi}"; then with_avahi="${withval}"; fi + if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${withval}\"" >&5 $as_echo "\"${withval}\"" >&6; } else @@ -7821,6 +7967,143 @@ done fi +if test -z "${nut_have_avahi_seen}"; then + nut_have_avahi_seen=yes + + CFLAGS_ORIG="${CFLAGS}" + LIBS_ORIG="${LIBS}" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi-core version via pkg-config (0.6.30 minimum required)" >&5 +$as_echo_n "checking for avahi-core version via pkg-config (0.6.30 minimum required)... " >&6; } + AVAHI_CORE_VERSION="`pkg-config --silence-errors --modversion avahi-core 2>/dev/null`" + if test "$?" != "0" -o -z "${AVAHI_CORE_VERSION}"; then + AVAHI_CORE_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${AVAHI_CORE_VERSION} found" >&5 +$as_echo "${AVAHI_CORE_VERSION} found" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi-client version via pkg-config (0.6.30 minimum required)" >&5 +$as_echo_n "checking for avahi-client version via pkg-config (0.6.30 minimum required)... " >&6; } + AVAHI_CLIENT_VERSION="`pkg-config --silence-errors --modversion avahi-client 2>/dev/null`" + if test "$?" != "0" -o -z "${AVAHI_CLIENT_VERSION}"; then + AVAHI_CLIENT_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${AVAHI_CLIENT_VERSION} found" >&5 +$as_echo "${AVAHI_CLIENT_VERSION} found" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi cflags" >&5 +$as_echo_n "checking for avahi cflags... " >&6; } + +# Check whether --with-avahi-includes was given. +if test "${with_avahi_includes+set}" = set; then : + withval=$with_avahi_includes; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-avahi-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +else + CFLAGS="`pkg-config --silence-errors --cflags avahi-core avahi-client 2>/dev/null`" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi ldflags" >&5 +$as_echo_n "checking for avahi ldflags... " >&6; } + +# Check whether --with-avahi-libs was given. +if test "${with_avahi_libs+set}" = set; then : + withval=$with_avahi_libs; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-avahi-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +else + LIBS="`pkg-config --silence-errors --libs avahi-core avahi-client 2>/dev/null`" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } + + for ac_header in avahi-common/malloc.h +do : + ac_fn_c_check_header_compile "$LINENO" "avahi-common/malloc.h" "ac_cv_header_avahi_common_malloc_h" "$ac_includes_default +" +if test "x$ac_cv_header_avahi_common_malloc_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_AVAHI_COMMON_MALLOC_H 1 +_ACEOF + nut_have_avahi=yes +else + nut_have_avahi=no +fi + +done + + for ac_func in avahi_free +do : + ac_fn_c_check_func "$LINENO" "avahi_free" "ac_cv_func_avahi_free" +if test "x$ac_cv_func_avahi_free" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_AVAHI_FREE 1 +_ACEOF + +else + nut_have_avahi=no +fi +done + + + if test "${nut_have_avahi}" = "yes"; then + for ac_header in avahi-client/client.h +do : + ac_fn_c_check_header_compile "$LINENO" "avahi-client/client.h" "ac_cv_header_avahi_client_client_h" "$ac_includes_default +" +if test "x$ac_cv_header_avahi_client_client_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_AVAHI_CLIENT_CLIENT_H 1 +_ACEOF + nut_have_avahi=yes +else + nut_have_avahi=no +fi + +done + + for ac_func in avahi_client_new +do : + ac_fn_c_check_func "$LINENO" "avahi_client_new" "ac_cv_func_avahi_client_new" +if test "x$ac_cv_func_avahi_client_new" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_AVAHI_CLIENT_NEW 1 +_ACEOF + +else + nut_have_avahi=no +fi +done + + if test "${nut_have_avahi}" = "yes"; then + LIBAVAHI_CFLAGS="${CFLAGS}" + LIBAVAHI_LIBS="${LIBS}" + fi + fi + + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi + + case ${target_os} in solaris2.1* ) @@ -7911,7 +8194,8 @@ $as_echo "${nut_with_serial}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "build serial drivers: ${nut_with_serial}" >> conf_nut_report_feature @@ -7943,7 +8227,8 @@ $as_echo "${nut_with_usb}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "build USB drivers: ${nut_with_usb}" >> conf_nut_report_feature @@ -7975,7 +8260,8 @@ $as_echo "${nut_with_snmp}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "build SNMP drivers: ${nut_with_snmp}" >> conf_nut_report_feature @@ -8007,11 +8293,44 @@ $as_echo "${nut_with_neon}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "build neon based XML driver: ${nut_with_neon}" >> conf_nut_report_feature +if test "${nut_with_neon}" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define WITH_NEON 1 +_ACEOF + +fi + + +if test "${nut_with_avahi}" = "yes" -a "${nut_have_avahi}" != "yes"; then + as_fn_error $? "\"avahi libraries not found\"" "$LINENO" 5 +fi + +if test "${nut_with_avahi}" != "no"; then + nut_with_avahi="${nut_have_avahi}" +fi + + if test "${nut_with_avahi}" = "yes"; then + WITH_AVAHI_TRUE= + WITH_AVAHI_FALSE='#' +else + WITH_AVAHI_TRUE='#' + WITH_AVAHI_FALSE= +fi + +if test "${nut_with_avahi}" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define WITH_AVAHI 1 +_ACEOF + +fi @@ -8040,13 +8359,774 @@ $as_echo "${nut_with_powerman}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "build Powerman PDU client driver: ${nut_with_powerman}" >> conf_nut_report_feature +nut_ipmi_lib="" + + +# Check whether --with-ipmi was given. +if test "${with_ipmi+set}" = set; then : + withval=$with_ipmi; nut_with_ipmi="${withval}" +else + nut_with_ipmi="auto" + +fi + + + +# Check whether --with-freeipmi was given. +if test "${with_freeipmi+set}" = set; then : + withval=$with_freeipmi; nut_with_freeipmi="${withval}" +else + nut_with_freeipmi="auto" + +fi + + + +if test "${nut_with_ipmi}" != "no"; then + if test "${nut_with_freeipmi}" = "yes"; then + +if test -z "${nut_have_libfreeipmi_seen}"; then + nut_have_libfreeipmi_seen=yes + + CFLAGS_ORIG="${CFLAGS}" + LIBS_ORIG="${LIBS}" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI version via pkg-config" >&5 +$as_echo_n "checking for FreeIPMI version via pkg-config... " >&6; } + FREEIPMI_VERSION="`pkg-config --silence-errors --modversion libfreeipmi 2>/dev/null`" + if test "$?" = "0" -a -n "${FREEIPMI_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags libfreeipmi libipmimonitoring 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs libfreeipmi libipmimonitoring 2>/dev/null`" + else + FREEIPMI_VERSION="none" + CFLAGS="" + LIBS="-lfreeipmi -lipmimonitoring" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FREEIPMI_VERSION} found" >&5 +$as_echo "${FREEIPMI_VERSION} found" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI cflags" >&5 +$as_echo_n "checking for FreeIPMI cflags... " >&6; } + +# Check whether --with-freeipmi-includes was given. +if test "${with_freeipmi_includes+set}" = set; then : + withval=$with_freeipmi_includes; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-freeipmi-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI ldflags" >&5 +$as_echo_n "checking for FreeIPMI ldflags... " >&6; } + +# Check whether --with-freeipmi-libs was given. +if test "${with_freeipmi_libs+set}" = set; then : + withval=$with_freeipmi_libs; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-freeipmi-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } + + for ac_header in freeipmi/freeipmi.h +do : + ac_fn_c_check_header_compile "$LINENO" "freeipmi/freeipmi.h" "ac_cv_header_freeipmi_freeipmi_h" "$ac_includes_default +" +if test "x$ac_cv_header_freeipmi_freeipmi_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FREEIPMI_FREEIPMI_H 1 +_ACEOF + nut_have_freeipmi=yes +else + nut_have_freeipmi=no +fi + +done + + for ac_header in ipmi_monitoring.h +do : + ac_fn_c_check_header_compile "$LINENO" "ipmi_monitoring.h" "ac_cv_header_ipmi_monitoring_h" "$ac_includes_default +" +if test "x$ac_cv_header_ipmi_monitoring_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IPMI_MONITORING_H 1 +_ACEOF + +else + nut_have_freeipmi=no +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_ctx_create" >&5 +$as_echo_n "checking for library containing ipmi_ctx_create... " >&6; } +if test "${ac_cv_search_ipmi_ctx_create+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_ctx_create (); +int +main () +{ +return ipmi_ctx_create (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_ctx_create=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ipmi_ctx_create+set}" = set; then : + break +fi +done +if test "${ac_cv_search_ipmi_ctx_create+set}" = set; then : + +else + ac_cv_search_ipmi_ctx_create=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_ctx_create" >&5 +$as_echo "$ac_cv_search_ipmi_ctx_create" >&6; } +ac_res=$ac_cv_search_ipmi_ctx_create +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + nut_have_freeipmi=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_ctx_find_inband" >&5 +$as_echo_n "checking for library containing ipmi_ctx_find_inband... " >&6; } +if test "${ac_cv_search_ipmi_ctx_find_inband+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_ctx_find_inband (); +int +main () +{ +return ipmi_ctx_find_inband (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_ctx_find_inband=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ipmi_ctx_find_inband+set}" = set; then : + break +fi +done +if test "${ac_cv_search_ipmi_ctx_find_inband+set}" = set; then : + +else + ac_cv_search_ipmi_ctx_find_inband=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_ctx_find_inband" >&5 +$as_echo "$ac_cv_search_ipmi_ctx_find_inband" >&6; } +ac_res=$ac_cv_search_ipmi_ctx_find_inband +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + nut_have_freeipmi=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_fru_parse_ctx_create" >&5 +$as_echo_n "checking for library containing ipmi_fru_parse_ctx_create... " >&6; } +if test "${ac_cv_search_ipmi_fru_parse_ctx_create+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_fru_parse_ctx_create (); +int +main () +{ +return ipmi_fru_parse_ctx_create (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_fru_parse_ctx_create=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ipmi_fru_parse_ctx_create+set}" = set; then : + break +fi +done +if test "${ac_cv_search_ipmi_fru_parse_ctx_create+set}" = set; then : + +else + ac_cv_search_ipmi_fru_parse_ctx_create=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_fru_parse_ctx_create" >&5 +$as_echo "$ac_cv_search_ipmi_fru_parse_ctx_create" >&6; } +ac_res=$ac_cv_search_ipmi_fru_parse_ctx_create +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + nut_have_freeipmi=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_monitoring_init" >&5 +$as_echo_n "checking for library containing ipmi_monitoring_init... " >&6; } +if test "${ac_cv_search_ipmi_monitoring_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_monitoring_init (); +int +main () +{ +return ipmi_monitoring_init (); + ; + return 0; +} +_ACEOF +for ac_lib in '' ipmimonitoring; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_monitoring_init=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ipmi_monitoring_init+set}" = set; then : + break +fi +done +if test "${ac_cv_search_ipmi_monitoring_init+set}" = set; then : + +else + ac_cv_search_ipmi_monitoring_init=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_monitoring_init" >&5 +$as_echo "$ac_cv_search_ipmi_monitoring_init" >&6; } +ac_res=$ac_cv_search_ipmi_monitoring_init +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + nut_have_freeipmi=no +fi + + + if test "${nut_have_freeipmi}" = "yes"; then + nut_with_ipmi="yes" + nut_ipmi_lib="(FreeIPMI)" + nut_have_libipmi="yes" + +$as_echo "#define WITH_IPMI 1" >>confdefs.h + + +$as_echo "#define WITH_FREEIPMI 1" >>confdefs.h + + LIBIPMI_CFLAGS="${CFLAGS}" + LIBIPMI_LIBS="${LIBS}" + fi + + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi + + if test "${nut_have_freeipmi}" != "yes"; then + as_fn_error $? "\"GNU FreeIPMI not found, required for IPMI support\"" "$LINENO" 5 + fi + nut_with_ipmi="yes" + else + +if test -z "${nut_have_libfreeipmi_seen}"; then + nut_have_libfreeipmi_seen=yes + + CFLAGS_ORIG="${CFLAGS}" + LIBS_ORIG="${LIBS}" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI version via pkg-config" >&5 +$as_echo_n "checking for FreeIPMI version via pkg-config... " >&6; } + FREEIPMI_VERSION="`pkg-config --silence-errors --modversion libfreeipmi 2>/dev/null`" + if test "$?" = "0" -a -n "${FREEIPMI_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags libfreeipmi libipmimonitoring 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs libfreeipmi libipmimonitoring 2>/dev/null`" + else + FREEIPMI_VERSION="none" + CFLAGS="" + LIBS="-lfreeipmi -lipmimonitoring" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FREEIPMI_VERSION} found" >&5 +$as_echo "${FREEIPMI_VERSION} found" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI cflags" >&5 +$as_echo_n "checking for FreeIPMI cflags... " >&6; } + +# Check whether --with-freeipmi-includes was given. +if test "${with_freeipmi_includes+set}" = set; then : + withval=$with_freeipmi_includes; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-freeipmi-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI ldflags" >&5 +$as_echo_n "checking for FreeIPMI ldflags... " >&6; } + +# Check whether --with-freeipmi-libs was given. +if test "${with_freeipmi_libs+set}" = set; then : + withval=$with_freeipmi_libs; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-freeipmi-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } + + for ac_header in freeipmi/freeipmi.h +do : + ac_fn_c_check_header_compile "$LINENO" "freeipmi/freeipmi.h" "ac_cv_header_freeipmi_freeipmi_h" "$ac_includes_default +" +if test "x$ac_cv_header_freeipmi_freeipmi_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FREEIPMI_FREEIPMI_H 1 +_ACEOF + nut_have_freeipmi=yes +else + nut_have_freeipmi=no +fi + +done + + for ac_header in ipmi_monitoring.h +do : + ac_fn_c_check_header_compile "$LINENO" "ipmi_monitoring.h" "ac_cv_header_ipmi_monitoring_h" "$ac_includes_default +" +if test "x$ac_cv_header_ipmi_monitoring_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IPMI_MONITORING_H 1 +_ACEOF + +else + nut_have_freeipmi=no +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_ctx_create" >&5 +$as_echo_n "checking for library containing ipmi_ctx_create... " >&6; } +if test "${ac_cv_search_ipmi_ctx_create+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_ctx_create (); +int +main () +{ +return ipmi_ctx_create (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_ctx_create=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ipmi_ctx_create+set}" = set; then : + break +fi +done +if test "${ac_cv_search_ipmi_ctx_create+set}" = set; then : + +else + ac_cv_search_ipmi_ctx_create=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_ctx_create" >&5 +$as_echo "$ac_cv_search_ipmi_ctx_create" >&6; } +ac_res=$ac_cv_search_ipmi_ctx_create +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + nut_have_freeipmi=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_ctx_find_inband" >&5 +$as_echo_n "checking for library containing ipmi_ctx_find_inband... " >&6; } +if test "${ac_cv_search_ipmi_ctx_find_inband+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_ctx_find_inband (); +int +main () +{ +return ipmi_ctx_find_inband (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_ctx_find_inband=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ipmi_ctx_find_inband+set}" = set; then : + break +fi +done +if test "${ac_cv_search_ipmi_ctx_find_inband+set}" = set; then : + +else + ac_cv_search_ipmi_ctx_find_inband=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_ctx_find_inband" >&5 +$as_echo "$ac_cv_search_ipmi_ctx_find_inband" >&6; } +ac_res=$ac_cv_search_ipmi_ctx_find_inband +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + nut_have_freeipmi=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_fru_parse_ctx_create" >&5 +$as_echo_n "checking for library containing ipmi_fru_parse_ctx_create... " >&6; } +if test "${ac_cv_search_ipmi_fru_parse_ctx_create+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_fru_parse_ctx_create (); +int +main () +{ +return ipmi_fru_parse_ctx_create (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_fru_parse_ctx_create=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ipmi_fru_parse_ctx_create+set}" = set; then : + break +fi +done +if test "${ac_cv_search_ipmi_fru_parse_ctx_create+set}" = set; then : + +else + ac_cv_search_ipmi_fru_parse_ctx_create=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_fru_parse_ctx_create" >&5 +$as_echo "$ac_cv_search_ipmi_fru_parse_ctx_create" >&6; } +ac_res=$ac_cv_search_ipmi_fru_parse_ctx_create +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + nut_have_freeipmi=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_monitoring_init" >&5 +$as_echo_n "checking for library containing ipmi_monitoring_init... " >&6; } +if test "${ac_cv_search_ipmi_monitoring_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_monitoring_init (); +int +main () +{ +return ipmi_monitoring_init (); + ; + return 0; +} +_ACEOF +for ac_lib in '' ipmimonitoring; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_monitoring_init=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ipmi_monitoring_init+set}" = set; then : + break +fi +done +if test "${ac_cv_search_ipmi_monitoring_init+set}" = set; then : + +else + ac_cv_search_ipmi_monitoring_init=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_monitoring_init" >&5 +$as_echo "$ac_cv_search_ipmi_monitoring_init" >&6; } +ac_res=$ac_cv_search_ipmi_monitoring_init +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + nut_have_freeipmi=no +fi + + + if test "${nut_have_freeipmi}" = "yes"; then + nut_with_ipmi="yes" + nut_ipmi_lib="(FreeIPMI)" + nut_have_libipmi="yes" + +$as_echo "#define WITH_IPMI 1" >>confdefs.h + + +$as_echo "#define WITH_FREEIPMI 1" >>confdefs.h + + LIBIPMI_CFLAGS="${CFLAGS}" + LIBIPMI_LIBS="${LIBS}" + fi + + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi + + if test "${nut_have_freeipmi}" != "yes"; then + if test "${nut_with_ipmi}" = "yes"; then + as_fn_error $? "\"FreeIPMI not found, required for IPMI support\"" "$LINENO" 5 + fi + nut_with_ipmi="no" + else + nut_with_ipmi="yes" + nut_with_freeipmi="yes" + fi + fi +fi + + if test "${nut_with_ipmi}" = "yes"; then + WITH_IPMI_TRUE= + WITH_IPMI_FALSE='#' +else + WITH_IPMI_TRUE='#' + WITH_IPMI_FALSE= +fi + + if test "${nut_with_freeipmi}" = "yes"; then + WITH_FREEIPMI_TRUE= + WITH_FREEIPMI_FALSE='#' +else + WITH_FREEIPMI_TRUE='#' + WITH_FREEIPMI_FALSE= +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build IPMI driver" >&5 +$as_echo_n "checking whether to build IPMI driver... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_ipmi} ${nut_ipmi_lib}" >&5 +$as_echo "${nut_with_ipmi} ${nut_ipmi_lib}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature + fi + echo "build IPMI driver: ${nut_with_ipmi} ${nut_ipmi_lib}" >> conf_nut_report_feature + + + + # Check whether --with-ssl was given. if test "${with_ssl+set}" = set; then : @@ -8188,7 +9268,8 @@ $as_echo "${nut_with_ssl}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "enable SSL development code: ${nut_with_ssl}" >> conf_nut_report_feature @@ -8383,7 +9464,8 @@ $as_echo "${nut_with_wrap}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "enable libwrap (tcp-wrappers) support: ${nut_with_wrap}" >> conf_nut_report_feature @@ -8595,7 +9677,8 @@ $as_echo "${nut_with_cgi}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "build CGI programs: ${nut_with_cgi}" >> conf_nut_report_feature @@ -8635,7 +9718,8 @@ $as_echo "${nut_with_hal}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "enable HAL support: ${nut_with_hal}" >> conf_nut_report_feature @@ -9104,7 +10188,8 @@ $as_echo "${nut_with_doc}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "build and install documentation: ${nut_with_doc}" >> conf_nut_report_feature @@ -9115,7 +10200,8 @@ if test "${nut_with_doc}" = "yes"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "only build specific documentation format: ${DOC_BUILD_LIST}" >> conf_nut_report_feature @@ -9601,13 +10687,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:9604: $ac_compile\"" >&5) + (eval echo "\"\$as_me:10690: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:9607: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:10693: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:9610: output\"" >&5) + (eval echo "\"\$as_me:10696: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -10812,7 +11898,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 10815 "configure"' > conftest.$ac_ext + echo '#line 11901 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -12074,11 +13160,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12077: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13163: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12081: \$? = $ac_status" >&5 + echo "$as_me:13167: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12413,11 +13499,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12416: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13502: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12420: \$? = $ac_status" >&5 + echo "$as_me:13506: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12518,11 +13604,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12521: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13607: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12525: \$? = $ac_status" >&5 + echo "$as_me:13611: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12573,11 +13659,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12576: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13662: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12580: \$? = $ac_status" >&5 + echo "$as_me:13666: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14957,7 +16043,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 14960 "configure" +#line 16046 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15053,7 +16139,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 15056 "configure" +#line 16142 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15330,7 +16416,8 @@ $as_echo "${nut_with_dev}" >&6; } nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "build and install the development files: ${nut_with_dev}" >> conf_nut_report_feature @@ -15665,7 +16752,8 @@ if test "${DRIVER_BUILD_LIST}" != "all"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "only build specific drivers: ${DRIVER_BUILD_LIST}" >> conf_nut_report_feature @@ -15748,6 +16836,162 @@ else fi + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi +systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install systemd files" >&5 +$as_echo_n "checking whether to install systemd files... " >&6; } + +# Check whether --with-systemdsystemunitdir was given. +if test "${with_systemdsystemunitdir+set}" = set; then : + withval=$with_systemdsystemunitdir; + case "${withval}" in + yes|auto) + ;; + no) + systemdsystemunitdir="" + ;; + *) + systemdsystemunitdir="${withval}" + ;; + esac + +fi + +if test -n "${systemdsystemunitdir}"; then + systemdsystemshutdowndir="/lib/systemd/system-shutdown" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${systemdsystemunitdir}" >&5 +$as_echo "using ${systemdsystemunitdir}" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "$systemdsystemunitdir" != ""; then + HAVE_SYSTEMD_TRUE= + HAVE_SYSTEMD_FALSE='#' +else + HAVE_SYSTEMD_TRUE='#' + HAVE_SYSTEMD_FALSE= +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install hotplug rules" >&5 $as_echo_n "checking whether to install hotplug rules... " >&6; } @@ -16004,7 +17248,14 @@ _ACEOF -ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/python/Makefile scripts/udev/Makefile scripts/udev/nut-usbups.rules scripts/Makefile server/Makefile tools/Makefile Makefile" + + + + + + + +ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/java/Makefile scripts/python/Makefile scripts/systemd/Makefile scripts/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -16145,10 +17396,22 @@ if test -z "${WITH_NEONXML_TRUE}" && test -z "${WITH_NEONXML_FALSE}"; then as_fn_error $? "conditional \"WITH_NEONXML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WITH_AVAHI_TRUE}" && test -z "${WITH_AVAHI_FALSE}"; then + as_fn_error $? "conditional \"WITH_AVAHI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_LIBPOWERMAN_TRUE}" && test -z "${WITH_LIBPOWERMAN_FALSE}"; then as_fn_error $? "conditional \"WITH_LIBPOWERMAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WITH_IPMI_TRUE}" && test -z "${WITH_IPMI_FALSE}"; then + as_fn_error $? "conditional \"WITH_IPMI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_FREEIPMI_TRUE}" && test -z "${WITH_FREEIPMI_FALSE}"; then + as_fn_error $? "conditional \"WITH_FREEIPMI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_SSL_TRUE}" && test -z "${WITH_SSL_FALSE}"; then as_fn_error $? "conditional \"WITH_SSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -16181,6 +17444,10 @@ if test -z "${WITH_PKG_CONFIG_TRUE}" && test -z "${WITH_PKG_CONFIG_FALSE}"; then as_fn_error $? "conditional \"WITH_PKG_CONFIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_HOTPLUG_TRUE}" && test -z "${WITH_HOTPLUG_FALSE}"; then as_fn_error $? "conditional \"WITH_HOTPLUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -16601,7 +17868,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nut $as_me 2.6.1, which was +This file was extended by nut $as_me 2.6.2, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16667,7 +17934,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nut config.status 2.6.1 +nut config.status 2.6.2 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" @@ -17079,16 +18346,21 @@ do "scripts/augeas/nutupsschedconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsschedconf.aug" ;; "scripts/augeas/nuthostsconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nuthostsconf.aug" ;; "scripts/augeas/nutupssetconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupssetconf.aug" ;; + "scripts/avahi/nut.service") CONFIG_FILES="$CONFIG_FILES scripts/avahi/nut.service" ;; "scripts/hal/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/hal/Makefile" ;; "scripts/hal/ups-nut-device.fdi") CONFIG_FILES="$CONFIG_FILES scripts/hal/ups-nut-device.fdi" ;; "scripts/hotplug/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/hotplug/Makefile" ;; "scripts/hotplug/libhidups") CONFIG_FILES="$CONFIG_FILES scripts/hotplug/libhidups" ;; + "scripts/java/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/java/Makefile" ;; "scripts/python/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/python/Makefile" ;; + "scripts/systemd/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/systemd/Makefile" ;; "scripts/udev/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/udev/Makefile" ;; + "scripts/udev/nut-ipmipsu.rules") CONFIG_FILES="$CONFIG_FILES scripts/udev/nut-ipmipsu.rules" ;; "scripts/udev/nut-usbups.rules") CONFIG_FILES="$CONFIG_FILES scripts/udev/nut-usbups.rules" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "server/Makefile") CONFIG_FILES="$CONFIG_FILES server/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; + "tools/nut-scanner/Makefile") CONFIG_FILES="$CONFIG_FILES tools/nut-scanner/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; diff --git a/configure.in b/configure.in index bdbb136..f362eaf 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ 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.1) +AC_INIT(nut, 2.6.2) AC_CONFIG_SRCDIR(server/upsd.c) AC_CONFIG_MACRO_DIR([m4]) echo "Network UPS Tools version ${PACKAGE_VERSION}" @@ -26,6 +26,8 @@ dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile dnl in sync after SVN updates. AM_MAINTAINER_MODE +dnl PKG_PROG_PKG_CONFIG + dnl # the following is commented out, because the UPS_VERSION macro now dnl # resides in include/nut_version.h, which is generated by Makefile.am, dnl # rather than in include/config.h, which is generated by configure. The @@ -110,7 +112,7 @@ fi case ${target_os} in hpux11* ) - dnl It seems like the thread safe string functions won't be included + dnl It seems like the thread safe string functions will not be included dnl on 64 bit HP-UX unless we define _REENTRANT CFLAGS="${CFLAGS} -D_REENTRANT" ;; @@ -126,6 +128,16 @@ AC_CHECK_DECLS(optind, [], [ ], [AC_INCLUDES_DEFAULT]) ], [AC_INCLUDES_DEFAULT]) +dnl do a 2nd check to ensure inclusion of getopt.h, in case optind is known +AC_CHECK_HEADERS(getopt.h, [ + AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h is needed]) +], [ + AC_DEFINE(NEED_GETOPT_DECLS, 1, [Define to use explicit getopt declarations]) +], [AC_INCLUDES_DEFAULT]) + +dnl also check for getopt_long +AC_CHECK_FUNCS(getopt_long) + dnl FreeBSD serial locking compatibility - look for uu_lock in libutil.h AC_CHECK_DECLS(uu_lock, [ AC_DEFINE(HAVE_UU_LOCK, 1, [Use uu_lock for locking (FreeBSD)]) @@ -154,6 +166,11 @@ AC_SEARCH_LIBS(connect, socket) AC_HEADER_TIME AC_CHECK_HEADERS(sys/modem.h stdarg.h varargs.h sys/termios.h sys/time.h, [], [], [AC_INCLUDES_DEFAULT]) +# pthread related checks +AC_SEARCH_LIBS([pthread_create], [pthread], + [AC_DEFINE(HAVE_PTHREAD, 1, [Define to enable pthread support code])], + []) + dnl ---------------------------------------------------------------------- dnl Check for types and define possible replacements NUT_TYPE_SOCKLEN_T @@ -162,8 +179,8 @@ dnl ---------------------------------------------------------------------- dnl check for --with-all (or --without-all, or --with-all=auto) flag AC_MSG_CHECKING(for --with-all) -AC_ARG_WITH(all, - AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, powerman, cgi, dev]), +AC_ARG_WITH(all, + AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi]), [ if test -n "${withval}"; then dnl Note: we allow "no" as a positive value, because @@ -175,6 +192,8 @@ AC_ARG_WITH(all, if test -z "${with_powerman}"; then with_powerman="${withval}"; fi if test -z "${with_cgi}"; then with_cgi="${withval}"; fi if test -z "${with_dev}"; then with_dev="${withval}"; fi + if test -z "${with_avahi}"; then with_avahi="${withval}"; fi + if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi AC_MSG_RESULT("${withval}") else AC_MSG_RESULT(not given) @@ -210,6 +229,7 @@ NUT_ARG_WITH([neon], [build and install neon based XML/HTTP driver], [auto]) NUT_CHECK_LIBNEON NUT_ARG_WITH([powerman], [build and install Powerman PDU client driver], [auto]) NUT_CHECK_LIBPOWERMAN +NUT_CHECK_LIBAVAHI dnl ---------------------------------------------------------------------- dnl additional USB-related checks @@ -282,6 +302,26 @@ fi AM_CONDITIONAL(WITH_NEONXML, test "${nut_with_neon}" = "yes") NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}]) +if test "${nut_with_neon}" = "yes"; then + AC_DEFINE_UNQUOTED(WITH_NEON, 1, [Define to enable Neon XML/HTTP support]) +fi + +dnl ---------------------------------------------------------------------- +dnl checks related to --with-avahi + +dnl ${nut_with_avahi}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_avahi}" = "yes" -a "${nut_have_avahi}" != "yes"; then + AC_MSG_ERROR(["avahi libraries not found"]) +fi + +if test "${nut_with_avahi}" != "no"; then + nut_with_avahi="${nut_have_avahi}" +fi + +AM_CONDITIONAL(WITH_AVAHI, test "${nut_with_avahi}" = "yes") +if test "${nut_with_avahi}" = "yes"; then + AC_DEFINE_UNQUOTED(WITH_AVAHI, 1, [Define to enable avahi support]) +fi dnl ---------------------------------------------------------------------- @@ -299,6 +339,68 @@ fi AM_CONDITIONAL(WITH_LIBPOWERMAN, test "${nut_with_powerman}" = "yes") NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}]) +dnl ---------------------------------------------------------------------- +dnl Check for with-ipmi, and --with-freeipmi (or --with-openipmi) +dnl Only one can be enabled at a time, with a preference for FreeIPMI +dnl if both are available (since it is the only one supported ATM!!) + +nut_ipmi_lib="" + +NUT_ARG_WITH([ipmi], [build and install IPMI PSU driver], [auto]) +NUT_ARG_WITH([freeipmi], [enable IPMI support using FreeIPMI], [auto]) +dnl NUT_ARG_WITH([openipmi], [enable IPMI support using OpenIPMI], [auto]) + +dnl ${nut_with_ipmi}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_ipmi}" != "no"; then + dnl check if FreeIPMI (and maybe later OpenIPMI) was explicitly requested + if test "${nut_with_freeipmi}" = "yes"; then + NUT_CHECK_LIBFREEIPMI + if test "${nut_have_freeipmi}" != "yes"; then + AC_MSG_ERROR(["GNU FreeIPMI not found, required for IPMI support"]) + fi + dnl Implies --with-ipmi + nut_with_ipmi="yes" + dnl elif test "${nut_with_openipmi}" = "yes"; then + dnl AC_MSG_ERROR(["OpenIPMI is not yet supported"]) + dnl NUT_CHECK_LIBOPENIPMI + dnl if test "${nut_have_openipmi}" != "yes"; then + dnl AC_MSG_ERROR(["OpenIPMI not found, required for IPMI support"]) + dnl fi + dnl Implies --with-ipmi + dnl nut_with_ipmi="yes" + else + dnl Prefer FreeIPMI over OpenIPMI otherwise + NUT_CHECK_LIBFREEIPMI + if test "${nut_have_freeipmi}" != "yes"; then + if test "${nut_with_ipmi}" = "yes"; then + AC_MSG_ERROR(["FreeIPMI not found, required for IPMI support"]) + fi + nut_with_ipmi="no" + dnl NUT_CHECK_OPENIPMI + dnl if test "${nut_have_openipmi}" != "yes"; then + dnl if test "${nut_with_ipmi}" = "yes"; then + dnl AC_MSG_ERROR(["GNU FreeIPMI and OpenIPMI neither found, required for IPMI support"]) + dnl fi + dnl nut_with_ipmi="no" + dnl else + dnl Implies --with-ipmi + dnl nut_with_ipmi="yes" + dnl nut_with_openipmi="yes" + dnl fi + else + dnl Implies --with-ipmi + nut_with_ipmi="yes" + nut_with_freeipmi="yes" + fi + fi +fi + +AM_CONDITIONAL(WITH_IPMI, test "${nut_with_ipmi}" = "yes") +AM_CONDITIONAL(WITH_FREEIPMI, test "${nut_with_freeipmi}" = "yes") +dnl AM_CONDITIONAL(WITH_OPENIPMI, test "${nut_with_openipmi}" = "yes") + +NUT_REPORT_FEATURE([build IPMI driver], [${nut_with_ipmi} ${nut_ipmi_lib}]) + dnl ---------------------------------------------------------------------- dnl Check for --with-ssl @@ -550,7 +652,7 @@ AC_MSG_RESULT(${ALTPIDPATH}) AC_MSG_CHECKING(driver path) AC_ARG_WITH(drvpath, - AS_HELP_STRING([--with-drvpath=PATH], [where to install ups drivers (EPREFIX/bin)]), + AS_HELP_STRING([--with-drvpath=PATH], [where to install UPS drivers (EPREFIX/bin)]), [ case "${withval}" in yes|no) @@ -709,7 +811,7 @@ AC_ARG_WITH(drivers, AS_HELP_STRING([m4_version_prereq(2.62, [@<:@--with-drivers=driver@<:@,driver@:>@@:>@], [[[[--with-drivers=driver@<:@,driver@:>@]]]])], - [Only use specific drivers (all)]), + [Only build specific drivers (all)]), [ case "${withval}" in yes|no) @@ -783,6 +885,31 @@ else fi AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}") +PKG_PROG_PKG_CONFIG +systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` +AC_MSG_CHECKING(whether to install systemd files) +AC_ARG_WITH([systemdsystemunitdir], + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files (auto)]), +[ + case "${withval}" in + yes|auto) + ;; + no) + systemdsystemunitdir="" + ;; + *) + systemdsystemunitdir="${withval}" + ;; + esac +], []) +if test -n "${systemdsystemunitdir}"; then + systemdsystemshutdowndir="/lib/systemd/system-shutdown" + AC_MSG_RESULT(using ${systemdsystemunitdir}) +else + AC_MSG_RESULT(no) +fi +AM_CONDITIONAL(HAVE_SYSTEMD, test "$systemdsystemunitdir" != "") + AC_MSG_CHECKING(whether to install hotplug rules) AC_ARG_WITH(hotplug-dir, AS_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]), @@ -875,8 +1002,12 @@ AC_SUBST(LIBUSB_CFLAGS) AC_SUBST(LIBUSB_LIBS) AC_SUBST(LIBNEON_CFLAGS) AC_SUBST(LIBNEON_LIBS) +AC_SUBST(LIBAVAHI_CFLAGS) +AC_SUBST(LIBAVAHI_LIBS) AC_SUBST(LIBPOWERMAN_CFLAGS) AC_SUBST(LIBPOWERMAN_LIBS) +AC_SUBST(LIBIPMI_CFLAGS) +AC_SUBST(LIBIPMI_LIBS) AC_SUBST(DOC_BUILD_LIST) AC_SUBST(LIBWRAP_CFLAGS) AC_SUBST(LIBWRAP_LIBS) @@ -894,6 +1025,7 @@ AC_SUBST(SERLIBS) AC_SUBST(STATEPATH) AC_SUBST(CONFPATH) AC_SUBST(BINDIR) +AC_SUBST(PORT) AC_SUBST(RUN_AS_USER) AC_SUBST(RUN_AS_GROUP) AC_SUBST(SUN_LIBUSB) @@ -902,6 +1034,8 @@ AC_SUBST(cgiexecdir) AC_SUBST(driverexecdir) AC_SUBST(htmldir) AC_SUBST(pkgconfigdir) +AC_SUBST(systemdsystemunitdir) +AC_SUBST(systemdsystemshutdowndir) AC_SUBST(hotplugdir) AC_SUBST(udevdir) @@ -931,16 +1065,21 @@ AC_OUTPUT([ scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug + scripts/avahi/nut.service scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups + scripts/java/Makefile scripts/python/Makefile + scripts/systemd/Makefile scripts/udev/Makefile + scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules scripts/Makefile server/Makefile tools/Makefile + tools/nut-scanner/Makefile Makefile ]) diff --git a/data/Makefile.in b/data/Makefile.in index b70eda8..bb341f0 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -47,6 +47,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -176,10 +178,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -217,6 +223,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -281,6 +291,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/data/driver.list.in b/data/driver.list.in index d1b2d5e..642aebf 100644 --- a/data/driver.list.in +++ b/data/driver.list.in @@ -62,6 +62,8 @@ "APC" "ups" "1" "Back-UPS" "940-0023A cable" "genericups upstype=9" "APC" "ups" "1" "Back-UPS Office" "940-0119A cable" "genericups upstype=12" "APC" "ups" "1" "Back-UPS RS 500" "custom non-USB cable" "genericups upstype=20" +"APC" "ups" "3" "Smart-UPS RT XL" "AP9618 SNMP monitoring card" "snmp-ups" +"APC" "ups" "3" "(various)" "AP9618 SNMP monitoring card" "snmp-ups" "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)" @@ -154,6 +156,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" "CP1000AVRLCD" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups" @@ -196,6 +199,7 @@ "Dynex" "ups" "1" "975AVR" "" "genericups upstype=7" "Dynex" "ups" "2" "DX-800U" "USB" "usbhid-ups" +"Eaton" "ups" "5" "3S" "" "usbhid-ups" "Eaton" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" "Eaton" "ups" "5" "Ellipse ECO 650/800/1200/1600 VA" "USB" "usbhid-ups" "Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" @@ -603,6 +607,7 @@ "Opti-UPS" "ups" "1" "PowerES" "420E" "optiups" "Orvaldi Power Protection" "ups" "2" "various" "not 400 or 600" "blazer_ser" +"Orvaldi Power Protection" "ups" "2" "750 / 900SP" "" "blazer_usb" "Phasak" "ups" "2" "400VA / 600VA" "" "blazer_ser" @@ -627,6 +632,8 @@ "Powercom" "ups" "4" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" "Powercom" "ups" "5" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)" +"POWEREX" "ups" "2" "VI 1000 LED" "" "blazer_usb" + "PowerGuard" "ups" "2" "PG-600" "" "blazer_ser" "PowerKinetics" "ups" "1" "9001" "" "genericups upstype=17" @@ -643,6 +650,7 @@ "PowerWalker" "ups" "2" "Line-Interactive VI 400/800" "" "blazer_ser" "PowerWalker" "ups" "2" "Line-Interactive VI 600" "" "blazer_ser" "PowerWalker" "ups" "2" "Line-Interactive VI 1400" "" "blazer_usb" +"PowerWalker" "ups" "2" "Line-Interactive VI 850 LCD" "" "blazer_usb" "Powerware" "ups" "4" "3110" "" "genericups upstype=7" "Powerware" "ups" "4" "3115" "" "genericups upstype=11" @@ -707,6 +715,7 @@ "SuperPower" "ups" "2" "HP360, Hope-550" "" "blazer_ser" +"SVEN" "ups" "2" "Power Pro+ series" "USB" "blazer_usb (USB ID ffff:0000)" "SVEN" "ups" "2" "Power Pro+ series" "USB" "blazer_usb (USB ID 05b8:0000)" "SVEN" "ups" "1" "Power Pro+ series" "USB" "richcomm_usb (USB ID 0925:1234)" "SVEN" "ups" "2" "Power Smart RM 2000" "USB" "blazer_usb (USB ID 05b8:0000)" diff --git a/data/html/Makefile.in b/data/html/Makefile.in index 3e63f89..2900752 100644 --- a/data/html/Makefile.in +++ b/data/html/Makefile.in @@ -45,6 +45,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -135,10 +137,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -176,6 +182,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -240,6 +250,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/docs/FAQ.txt b/docs/FAQ.txt index 2e6126a..f9fb43e 100644 --- a/docs/FAQ.txt +++ b/docs/FAQ.txt @@ -518,9 +518,9 @@ usbhid-ups driver uses libusb (which is available for a wide range of operating systems) and libhid (currently, a modified internal version of it). -As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver -and provide support for various manufacturers. At that time, it will -be renamed to usbhid-ups. +As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver, +and provides support for various manufacturers. At that time, newhidups was +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. diff --git a/docs/Makefile.in b/docs/Makefile.in index 1030704..0a00378 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -43,6 +43,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -149,10 +151,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -190,6 +196,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -254,6 +264,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/docs/acknowledgements.txt b/docs/acknowledgements.txt index 01afa7f..e27f78e 100644 --- a/docs/acknowledgements.txt +++ b/docs/acknowledgements.txt @@ -20,7 +20,6 @@ Active members ~~~~~~~~~~~~~~ - Arnaud Quette: project leader (since 2005), Debian packager and jack of all trades -- Arjen de Korte: senior lieutenant - Charles Lepple: senior lieutenant - Kjell Claesson: senior developer - Alexander Gordeev: junior developer @@ -34,6 +33,7 @@ Retired members ~~~~~~~~~~~~~~~ - Russell Kroll: Founder, and project leader from 1996 to 2005 +- Arjen de Korte: senior lieutenant - Peter Selinger: senior lieutenant - Carlos Rodrigues: author of the "megatec" drivers, removing the numerous drivers for Megatec / Q1 protocol. These drivers have now been replaced by @@ -87,7 +87,7 @@ They also proposes NUT as an alternative to its software for link:http://www.microdowell.com/fra/download.html[Linux / Unix]. - link:http://pcmups.com.tw[Powercom], through Alexey Morozov, has provided -link:ups-protocol.html[extensive information] on its USB/HID devices, along +link:ups-protocols.html[extensive information] on its USB/HID devices, along with development units. Appliances manufacturers diff --git a/docs/config-notes.txt b/docs/config-notes.txt index e8a3299..42b6a54 100644 --- a/docs/config-notes.txt +++ b/docs/config-notes.txt @@ -339,7 +339,15 @@ Here are the steps that occur when a critical power event happens: 1. The UPS goes on battery -2. The UPS reaches low battery (a "critical" UPS) +2. The UPS reaches low battery (a "critical" UPS), that is to say + upsc displays: ++ + ups.status: OB LB ++ +The exact behavior depends on the specific device, and is related to: + + - battery.charge and battery.charge.low + - battery.runtime and battery.runtime.low 3. The upsmon master notices and sets "FSD" - the "forced shutdown" flag to tell all slave systems that it will soon power down the load. @@ -566,9 +574,10 @@ Testing shutdowns ^^^^^^^^^^^^^^^^^ UPS equipment varies from manufacturer to manufacturer and even within -model lines. You should test the shutdown sequence on your systems before -leaving them unattended. A successful sequence is one where the OS halts -before the battery runs out, and the system restarts when power returns. +model lines. You should test the <> +on your systems before leaving them unattended. A successful sequence +is one where the OS halts before the battery runs out, and the system +restarts when power returns. The first step is to see how upsdrvctl will behave without actually turning off power. To do so, use the '-t' argument: diff --git a/docs/configure.txt b/docs/configure.txt index 180ad7d..450f894 100644 --- a/docs/configure.txt +++ b/docs/configure.txt @@ -28,6 +28,22 @@ Note that you need to install libsnmp development package or files. Build and install the XML drivers (default: auto-detect) Note that you need to install neon development package or files. + --with-powerman + +Build and install Powerman PDU client driver (default: auto-detect) +This allows to interact with the Powerman daemon, and the numerous +Power Distribution Units (PDU) supported by the project. +Note that you need to install powerman development package or files. + + --with-ipmi + --with-freeipmi + +Build and install IPMI PSU driver (default: auto-detect) +This allows to monitor numerous Power Supply Units (PSU) found +on servers. +Note that you need to install freeipmi (0.8.5 or higher) development package or +files. + --with-drivers=,,... Specify exactly which driver or drivers to build and install (this @@ -48,16 +64,6 @@ If you need to build more drivers later on, you will need to rerun configure with a different list. To make it build all of the drivers from scratch again, run 'make clean' before starting. - --with-doc= (default: no) - -Build and install NUT documentation file(s). -The possible values are "html-single" for single page HTML, "html-chunked" -for multi pages HTML, "pdf" for a PDF file or "auto" to build all the -possible previous documentation formats. -Verbose output can be enabled using: ASCIIDOC_VERBOSE=-v make - -This feature requires AsciiDoc 8.6.3 (http://www.methods.co.nz/asciidoc). - Optional features ----------------- @@ -69,6 +75,16 @@ CGI configuration files. This is not enabled by default, as they are only useful on web servers. See data/html/README for additional information on how to set up CGI programs. + --with-doc= (default: no) + +Build and install NUT documentation file(s). +The possible values are "html-single" for single page HTML, "html-chunked" +for multi pages HTML, "pdf" for a PDF file or "auto" to build all the +possible previous documentation formats. +Verbose output can be enabled using: ASCIIDOC_VERBOSE=-v make + +This feature requires AsciiDoc 8.6.3 (http://www.methods.co.nz/asciidoc). + --with-lib (default: no) Build and install the upsclient library and header files. @@ -100,12 +116,6 @@ If you own a USB unit, only protect your local system and run the Gnome or KDE desktop, this will enable a full Plug & Play usage. See docs/nut-hal.txt for additional information on how to set up and use HAL support. - - --with-powerman (default: auto-detect) - -Build and install Powerman PDU client driver. -This allows to interact with the Powerman daemon, and the numerous -Power Distribution Units (PDU) supported by the project. Other configuration options diff --git a/docs/download.txt b/docs/download.txt index d4a25c2..feb8281 100644 --- a/docs/download.txt +++ b/docs/download.txt @@ -23,10 +23,10 @@ to do so. Stable tree: 2.6 ~~~~~~~~~~~~~~~~ -- link:http://www.networkupstools.org/source/2.6/nut-2.6.1.tar.gz[nut-2.6.1.tar.gz] -- link:http://www.networkupstools.org/source/2.6/nut-2.6.1.tar.gz.sig[PGP/GPG signature] +- link:http://www.networkupstools.org/source/2.6/nut-2.6.2.tar.gz[nut-2.6.2.tar.gz] +- link:http://www.networkupstools.org/source/2.6/nut-2.6.2.tar.gz.sig[PGP/GPG signature] - SHA-256 sum: 4ba1d297a98190db0ae86eb31136c780f35e6d3f47ae845316b44eaa9245a86e -- link:http://www.networkupstools.org/source/2.6/new-2.6.1.txt[Release notes] +- link:http://www.networkupstools.org/source/2.6/new-2.6.2.txt[Release notes] - link:http://www.networkupstools.org/source/2.6/ChangeLog[ChangeLog] You can also browse the link:http://www.networkupstools.org/source/2.6/[stable source directory]. @@ -101,7 +101,7 @@ link:http://packages.gentoo.org/package/sys-power/nut[Gentoo Linux], Mandriva, link:https://admin.fedoraproject.org/pkgdb/acls/name/nut[Red Hat / Fedora], link:http://software.opensuse.org/search[Novell Suse / openSUSE], -link:https://forum.openwrt.org/viewtopic.php?id=26269[OpenWrt] +link:https://forum.openwrt.org/viewtopic.php?id=26269[OpenWrt], link:http://packages.ubuntu.com/nut[Ubuntu]. - BSD systems: @@ -114,5 +114,11 @@ 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.0-1.msi[Windows MSI installer 2.6.0-1] +link:http://www.networkupstools.org/source/2.6/NUT-Installer-2.6.1-1.msi[Windows MSI installer 2.6.1-1] + +Java packages +------------- + +- NUT Java support (client side, Beta) +link:http://www.networkupstools.org/package/java/jNut-0.1-SNAPSHOT.tar.gz[jNUT 0.1-SNAPSHOT] diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index b82f7b5..3d2b15c 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -7,8 +7,9 @@ # during 'make dist' # - HTML files are built upon request, if AsciiDoc is available, # - groff update will only happen if AsciiDoc is available too, -# - all this can probably (and hopefully) by improved, but I've not -# found a way to do pattern replacement on the fly for target deps! +# - all this can probably (and hopefully) be improved, but I've not +# found a way to do pattern replacement on the fly for target deps! +# FIXME: investigate an autogen.sh hook # - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html # Base configuration and client manpages, always installed @@ -73,6 +74,13 @@ HTML_CLIENT_MANS = \ upsrw.html \ upssched.html +SRC_TOOL_PAGES = nut-scanner.txt + +MAN_TOOL_PAGES = nut-scanner.8 + +man8_MANS += $(MAN_TOOL_PAGES) + +HTML_TOOL_MANS = nut-scanner.html # CGI (--with-cgi) related manpages SRC_CGI_PAGES = \ @@ -124,6 +132,19 @@ SRC_DEV_PAGES = \ upscli_ssl.txt \ upscli_strerror.txt \ upscli_upserror.txt \ + nutscan_scan_snmp.txt \ + nutscan_scan_usb.txt \ + nutscan_scan_xml_http.txt \ + nutscan_scan_nut.txt \ + nutscan_scan_avahi.txt \ + nutscan_scan_ipmi.txt \ + nutscan_display_ups_conf.txt \ + nutscan_display_parsable.txt \ + nutscan_cidr_to_ip.txt \ + nutscan_new_device.txt \ + nutscan_free_device.txt \ + nutscan_add_option_to_device.txt \ + nutscan_add_device_to_device.txt \ libupsclient-config.txt \ skel.txt @@ -141,7 +162,20 @@ MAN3_DEV_PAGES = \ upscli_splitname.3 \ upscli_ssl.3 \ upscli_strerror.3 \ - upscli_upserror.3 + upscli_upserror.3 \ + nutscan_scan_snmp.3 \ + nutscan_scan_usb.3 \ + nutscan_scan_xml_http.3 \ + nutscan_scan_nut.3 \ + nutscan_scan_avahi.3 \ + nutscan_scan_ipmi.3 \ + nutscan_display_ups_conf.3 \ + nutscan_display_parsable.3 \ + nutscan_cidr_to_ip.3 \ + nutscan_new_device.3 \ + nutscan_free_device.3 \ + nutscan_add_option_to_device.3 \ + nutscan_add_device_to_device.3 MAN1_DEV_PAGES = \ libupsclient-config.1 @@ -170,6 +204,19 @@ HTML_DEV_MANS = \ upscli_ssl.html \ upscli_strerror.html \ upscli_upserror.html \ + nutscan_scan_snmp.html \ + nutscan_scan_usb.html \ + nutscan_scan_xml_http.html \ + nutscan_scan_nut.html \ + nutscan_scan_avahi.html \ + nutscan_scan_ipmi.html \ + nutscan_display_ups_conf.html \ + nutscan_display_parsable.html \ + nutscan_cidr_to_ip.html \ + nutscan_new_device.html \ + nutscan_free_device.html \ + nutscan_add_option_to_device.html \ + nutscan_add_device_to_device.html \ libupsclient-config.html \ skel.html @@ -185,6 +232,7 @@ else # (--with-serial) SRC_SERIAL_PAGES = \ apcsmart.txt \ + apcsmart-old.txt \ bcmxcp.txt \ belkin.txt \ belkinunv.txt \ @@ -222,6 +270,7 @@ SRC_SERIAL_PAGES = \ MAN_SERIAL_PAGES = \ apcsmart.8 \ + apcsmart-old.8 \ bcmxcp.8 \ belkin.8 \ belkinunv.8 \ @@ -263,6 +312,7 @@ endif HTML_SERIAL_MANS = \ apcsmart.html \ + apcsmart-old.html \ bcmxcp.html \ belkin.html \ belkinunv.html \ @@ -351,12 +401,23 @@ endif HTML_POWERMAN_MANS = powerman-pdu.html +# (--with-ipmi) +SRC_IPMIPSU_PAGES = nut-ipmipsu.txt +MAN_IPMIPSU_PAGES = nut-ipmipsu.8 + +if WITH_IPMI + man8_MANS += $(MAN_IPMIPSU_PAGES) +endif + +HTML_IPMIPSU_MANS = nut-ipmipsu.html + # SOME_DRIVERS endif MAN_MANS = \ $(MAN_CONF_PAGES) \ $(MAN_CLIENT_PAGES) \ + $(MAN_TOOL_PAGES) \ $(MAN5_CGI_PAGES) \ $(MAN8_CGI_PAGES) \ $(MAN1_DEV_PAGES) \ @@ -365,13 +426,15 @@ MAN_MANS = \ $(MAN_SNMP_PAGES) \ $(MAN_USB_LIBUSB_PAGES) \ $(MAN_NETXML_PAGES) \ - $(MAN_POWERMAN_PAGES) + $(MAN_POWERMAN_PAGES) \ + $(MAN_IPMIPSU_PAGES) # distribute everything, even those not installed by default # Note that 'dist' target requires AsciiDoc! EXTRA_DIST = \ $(SRC_CONF_PAGES) \ $(SRC_CLIENT_PAGES) \ + $(SRC_TOOL_PAGES) \ $(SRC_CGI_PAGES) \ $(SRC_DEV_PAGES) \ $(SRC_SERIAL_PAGES) \ @@ -379,19 +442,22 @@ EXTRA_DIST = \ $(SRC_USB_LIBUSB_PAGES) \ $(SRC_NETXML_PAGES) \ $(SRC_POWERMAN_PAGES) \ + $(SRC_IPMIPSU_PAGES) \ $(MAN_MANS) \ asciidoc.conf HTML_MANS = \ $(HTML_CONF_MANS) \ $(HTML_CLIENT_MANS) \ + $(HTML_TOOL_MANS) \ $(HTML_CGI_MANS) \ $(HTML_DEV_MANS) \ $(HTML_SERIAL_MANS) \ $(HTML_SNMP_MANS) \ $(HTML_USB_LIBUSB_MANS) \ $(HTML_NETXML_MANS) \ - $(HTML_POWERMAN_MANS) + $(HTML_POWERMAN_MANS) \ + $(HTML_IPMIPSU_MANS) all: diff --git a/docs/man/Makefile.in b/docs/man/Makefile.in index 81b7335..5dabc94 100644 --- a/docs/man/Makefile.in +++ b/docs/man/Makefile.in @@ -24,8 +24,9 @@ # during 'make dist' # - HTML files are built upon request, if AsciiDoc is available, # - groff update will only happen if AsciiDoc is available too, -# - all this can probably (and hopefully) by improved, but I've not -# found a way to do pattern replacement on the fly for target deps! +# - all this can probably (and hopefully) be improved, but I've not +# found a way to do pattern replacement on the fly for target deps! +# FIXME: investigate an autogen.sh hook # - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -59,6 +60,7 @@ target_triplet = @target@ @SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_6 = $(MAN_USB_LIBUSB_PAGES) @SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__append_7 = $(MAN_NETXML_PAGES) @SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_8 = $(MAN_POWERMAN_PAGES) +@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_9 = $(MAN_IPMIPSU_PAGES) subdir = docs/man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -68,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -163,10 +167,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -204,6 +212,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -268,6 +280,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -326,9 +340,10 @@ MAN_CLIENT_PAGES = \ upsrw.8 \ upssched.8 -man8_MANS = $(MAN_CLIENT_PAGES) $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) $(am__append_6) \ - $(am__append_7) $(am__append_8) +man8_MANS = $(MAN_CLIENT_PAGES) $(MAN_TOOL_PAGES) $(am__append_2) \ + $(am__append_3) $(am__append_4) $(am__append_5) \ + $(am__append_6) $(am__append_7) $(am__append_8) \ + $(am__append_9) HTML_CLIENT_MANS = \ nutupsdrv.html \ upsc.html \ @@ -340,6 +355,9 @@ HTML_CLIENT_MANS = \ upsrw.html \ upssched.html +SRC_TOOL_PAGES = nut-scanner.txt +MAN_TOOL_PAGES = nut-scanner.8 +HTML_TOOL_MANS = nut-scanner.html # CGI (--with-cgi) related manpages SRC_CGI_PAGES = \ @@ -385,6 +403,19 @@ SRC_DEV_PAGES = \ upscli_ssl.txt \ upscli_strerror.txt \ upscli_upserror.txt \ + nutscan_scan_snmp.txt \ + nutscan_scan_usb.txt \ + nutscan_scan_xml_http.txt \ + nutscan_scan_nut.txt \ + nutscan_scan_avahi.txt \ + nutscan_scan_ipmi.txt \ + nutscan_display_ups_conf.txt \ + nutscan_display_parsable.txt \ + nutscan_cidr_to_ip.txt \ + nutscan_new_device.txt \ + nutscan_free_device.txt \ + nutscan_add_option_to_device.txt \ + nutscan_add_device_to_device.txt \ libupsclient-config.txt \ skel.txt @@ -402,7 +433,20 @@ MAN3_DEV_PAGES = \ upscli_splitname.3 \ upscli_ssl.3 \ upscli_strerror.3 \ - upscli_upserror.3 + upscli_upserror.3 \ + nutscan_scan_snmp.3 \ + nutscan_scan_usb.3 \ + nutscan_scan_xml_http.3 \ + nutscan_scan_nut.3 \ + nutscan_scan_avahi.3 \ + nutscan_scan_ipmi.3 \ + nutscan_display_ups_conf.3 \ + nutscan_display_parsable.3 \ + nutscan_cidr_to_ip.3 \ + nutscan_new_device.3 \ + nutscan_free_device.3 \ + nutscan_add_option_to_device.3 \ + nutscan_add_device_to_device.3 MAN1_DEV_PAGES = \ libupsclient-config.1 @@ -425,6 +469,19 @@ HTML_DEV_MANS = \ upscli_ssl.html \ upscli_strerror.html \ upscli_upserror.html \ + nutscan_scan_snmp.html \ + nutscan_scan_usb.html \ + nutscan_scan_xml_http.html \ + nutscan_scan_nut.html \ + nutscan_scan_avahi.html \ + nutscan_scan_ipmi.html \ + nutscan_display_ups_conf.html \ + nutscan_display_parsable.html \ + nutscan_cidr_to_ip.html \ + nutscan_new_device.html \ + nutscan_free_device.html \ + nutscan_add_option_to_device.html \ + nutscan_add_device_to_device.html \ libupsclient-config.html \ skel.html @@ -432,6 +489,7 @@ HTML_DEV_MANS = \ # (--with-serial) @SOME_DRIVERS_FALSE@SRC_SERIAL_PAGES = \ @SOME_DRIVERS_FALSE@ apcsmart.txt \ +@SOME_DRIVERS_FALSE@ apcsmart-old.txt \ @SOME_DRIVERS_FALSE@ bcmxcp.txt \ @SOME_DRIVERS_FALSE@ belkin.txt \ @SOME_DRIVERS_FALSE@ belkinunv.txt \ @@ -469,6 +527,7 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@MAN_SERIAL_PAGES = \ @SOME_DRIVERS_FALSE@ apcsmart.8 \ +@SOME_DRIVERS_FALSE@ apcsmart-old.8 \ @SOME_DRIVERS_FALSE@ bcmxcp.8 \ @SOME_DRIVERS_FALSE@ belkin.8 \ @SOME_DRIVERS_FALSE@ belkinunv.8 \ @@ -506,6 +565,7 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@HTML_SERIAL_MANS = \ @SOME_DRIVERS_FALSE@ apcsmart.html \ +@SOME_DRIVERS_FALSE@ apcsmart-old.html \ @SOME_DRIVERS_FALSE@ bcmxcp.html \ @SOME_DRIVERS_FALSE@ belkin.html \ @SOME_DRIVERS_FALSE@ belkinunv.html \ @@ -577,10 +637,16 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@MAN_POWERMAN_PAGES = powerman-pdu.8 @SOME_DRIVERS_FALSE@HTML_POWERMAN_MANS = powerman-pdu.html +# (--with-ipmi) +@SOME_DRIVERS_FALSE@SRC_IPMIPSU_PAGES = nut-ipmipsu.txt +@SOME_DRIVERS_FALSE@MAN_IPMIPSU_PAGES = nut-ipmipsu.8 +@SOME_DRIVERS_FALSE@HTML_IPMIPSU_MANS = nut-ipmipsu.html + # SOME_DRIVERS MAN_MANS = \ $(MAN_CONF_PAGES) \ $(MAN_CLIENT_PAGES) \ + $(MAN_TOOL_PAGES) \ $(MAN5_CGI_PAGES) \ $(MAN8_CGI_PAGES) \ $(MAN1_DEV_PAGES) \ @@ -589,7 +655,8 @@ MAN_MANS = \ $(MAN_SNMP_PAGES) \ $(MAN_USB_LIBUSB_PAGES) \ $(MAN_NETXML_PAGES) \ - $(MAN_POWERMAN_PAGES) + $(MAN_POWERMAN_PAGES) \ + $(MAN_IPMIPSU_PAGES) # distribute everything, even those not installed by default @@ -597,6 +664,7 @@ MAN_MANS = \ EXTRA_DIST = \ $(SRC_CONF_PAGES) \ $(SRC_CLIENT_PAGES) \ + $(SRC_TOOL_PAGES) \ $(SRC_CGI_PAGES) \ $(SRC_DEV_PAGES) \ $(SRC_SERIAL_PAGES) \ @@ -604,19 +672,22 @@ EXTRA_DIST = \ $(SRC_USB_LIBUSB_PAGES) \ $(SRC_NETXML_PAGES) \ $(SRC_POWERMAN_PAGES) \ + $(SRC_IPMIPSU_PAGES) \ $(MAN_MANS) \ asciidoc.conf HTML_MANS = \ $(HTML_CONF_MANS) \ $(HTML_CLIENT_MANS) \ + $(HTML_TOOL_MANS) \ $(HTML_CGI_MANS) \ $(HTML_DEV_MANS) \ $(HTML_SERIAL_MANS) \ $(HTML_SNMP_MANS) \ $(HTML_USB_LIBUSB_MANS) \ $(HTML_NETXML_MANS) \ - $(HTML_POWERMAN_MANS) + $(HTML_POWERMAN_MANS) \ + $(HTML_IPMIPSU_MANS) CLEANFILES = *.xml *.html SUFFIXES = .txt .html .1 .3 .5 .8 diff --git a/docs/man/apcsmart-old.8 b/docs/man/apcsmart-old.8 new file mode 100644 index 0000000..3685c9b --- /dev/null +++ b/docs/man/apcsmart-old.8 @@ -0,0 +1,124 @@ +'\" t +.\" Title: apcsmart-old +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "APCSMART\-OLD" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +apcsmart-old \- Driver for American Power Conversion Smart Protocol UPS equipment +.SH "SYNOPSIS" +.sp +\fBapcsmart\-old\fR \-h +.sp +\fBapcsmart\-old\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the apcsmart\-old driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +apcsmart\-old should recognize all recent APC models that use a serial protocol at 2400 bps\&. This is primarily the Smart\-UPS, Matrix\-UPS and Back\-UPS Pro lines\&. +.sp +The driver attempts to support every bell and whistle of the APC reporting interface, whether or not this is strictly sensible\&. +.sp +Some older hardware may only report a handful of variables\&. This is usually not a bug\(emthey just don\(cqt support anything else\&. +.SH "CABLING" +.sp +This driver expects to see a 940\-0024C cable or a clone by default\&. You can switch to the 940\-0095B dual\-mode cable support with the cable= definition described below\&. +.sp +If your 940\-0024C cable is broken or missing, use this diagram to build a clone: +.sp +http://www\&.networkupstools\&.org/cables/940\-0024C\&.jpg +.SH "EXTRA ARGUMENTS" +.sp +This driver supports the following optional settings in the \fBups.conf\fR(5): +.PP +\fBcable=940\-0095B\fR +.RS 4 +Configure the serial port for the APC 940\-0095B dual\-mode cable\&. +.RE +.PP +\fBsdtype=\fR\fInum\fR +.RS 4 +Use shutdown type +\fInum\fR, according to this table: +.PP +0 +.RS 4 +soft shutdown or powerdown, depending on battery status +.RE +.PP +1 +.RS 4 +soft shutdown followed by powerdown +.RE +.PP +2 +.RS 4 +instant power off +.RE +.PP +3 +.RS 4 +power off with grace period +.RE +.PP +4 +.RS 4 +"force OB" hack method for CS 350 +.RE +.RE +.sp +Modes 0 and 1 will power up the load when power returns\&. Modes 2 and 3 will keep the load turned off when the power returns\&. +.sp +Mode 4 exploits an oddity in the CS 350 models since they only seem to support the S command, but then only when running on battery\&. As a result, the driver will force the UPS to go on battery if necessary before sending the shutdown command\&. This ensures that the load gets reset\&. +.SH "BUGS" +.sp +Some older APC UPS models return bogus data in the status register during a front panel test\&. This is usually detected and discarded, but some other unexpected values have occasionally slipped through\&. +.sp +APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa\&. +.SH "AUTHOR" +.sp +Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&. In 2\&.6\&.2 the driver was renamed to apcsmart\-old, being superseded by updated version with new features\&. +.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/ diff --git a/docs/man/apcsmart-old.txt b/docs/man/apcsmart-old.txt new file mode 100644 index 0000000..43ed048 --- /dev/null +++ b/docs/man/apcsmart-old.txt @@ -0,0 +1,103 @@ +APCSMART-OLD(8) +=============== + +NAME +---- + +apcsmart-old - Driver for American Power Conversion Smart Protocol UPS equipment + +SYNOPSIS +-------- + +*apcsmart-old* -h + +*apcsmart-old* -a 'UPS_NAME' ['OPTIONS'] + +NOTE: This man page only documents the hardware-specific features of the +apcsmart-old driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +apcsmart-old should recognize all recent APC models that use a serial +protocol at 2400 bps. This is primarily the Smart-UPS, Matrix-UPS and +Back-UPS Pro lines. + +The driver attempts to support every bell and whistle of the APC +reporting interface, whether or not this is strictly sensible. + +Some older hardware may only report a handful of variables. This is +usually not a bug--they just don't support anything else. + +CABLING +------- + +This driver expects to see a 940-0024C cable or a clone by default. You +can switch to the 940-0095B dual-mode cable support with the `cable=` +definition described below. + +If your 940-0024C cable is broken or missing, use this diagram to build +a clone: + +http://www.networkupstools.org/cables/940-0024C.jpg + +EXTRA ARGUMENTS +--------------- + +This driver supports the following optional settings in the +linkman:ups.conf[5]: + +*cable=940-0095B*:: +Configure the serial port for the APC 940-0095B dual-mode cable. + +*sdtype=*'num':: +Use shutdown type 'num', according to this table: + +0;; soft shutdown or powerdown, depending on battery status + +1;; soft shutdown followed by powerdown + +2;; instant power off + +3;; power off with grace period + +4;; "force OB" hack method for CS 350 + +Modes 0 and 1 will power up the load when power returns. Modes 2 and 3 +will keep the load turned off when the power returns. + +Mode 4 exploits an oddity in the CS 350 models since they only seem to +support the S command, but then only when running on battery. As a +result, the driver will force the UPS to go on battery if necessary +before sending the shutdown command. This ensures that the load gets +reset. + +BUGS +---- + +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. + +APC UPS models with both USB and serial ports require a power cycle when +switching from USB communication to serial, and perhaps vice versa. + +AUTHOR +------ +Nigel Metheringham (drawing +heavily on the original apcsmart driver by Russell Kroll). This driver +was called newapc for a time and was renamed in the 1.5 series. In 2.6.2 +the driver was renamed to apcsmart-old, being superseded by updated version +with new features. + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/apcsmart.8 b/docs/man/apcsmart.8 index 31efce5..f7a0c71 100644 --- a/docs/man/apcsmart.8 +++ b/docs/man/apcsmart.8 @@ -2,12 +2,12 @@ .\" Title: apcsmart .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "APCSMART" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "APCSMART" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,7 +33,7 @@ apcsmart \- Driver for American Power Conversion Smart Protocol UPS equipment .sp \fBapcsmart\fR \-h .sp -\fBapcsmart\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] +\fBapcsmart\fR \-a \*(AqUPS_NAME\*(Aq [\-x option=value \&...] .if n \{\ .sp .\} @@ -52,61 +52,446 @@ This man page only documents the hardware\-specific features of the apcsmart dri .RE .SH "SUPPORTED HARDWARE" .sp -apcsmart should recognize all recent APC models that use a serial protocol at 2400 bps\&. This is primarily the Smart\-UPS, Matrix\-UPS and Back\-UPS Pro lines\&. +The apcsmart driver should recognize (or at the very least work with) majority of Smart\-UPS models \- which includes Smart\-UPS, Matrix\-UPS and Back\-UPS lineups, among few other ones\&. .sp -The driver attempts to support every bell and whistle of the APC reporting interface, whether or not this is strictly sensible\&. +Currently we can roughly divide APC hardware into 3 groups (note that the division isn\*(Aqt strict by any means, and the borders between those are pretty fuzzy): +.PP +[very] "old" models +.RS 4 +These models usually have old APC logo, white color and +\fIno\fR +programmable eeprom; You won\*(Aqt find them listed anywhere on APC\(cqs site either\&. The support for those will be usually based on driver\*(Aqs compatibility tables, or if the model (firmware) is not listed in those \- the driver will try to follow the very basic subset of features, while still trying to remain useful\&. Despite "smart" tagname, they often tend to behave in pretty dumb way (see the section below about shutdown behaviour)\&. +.PP +\fBExample models:\fR .sp -Some older hardware may only report a handful of variables\&. This is usually not a bug\(emthey just don\(cqt support anything else\&. +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Smart\-UPS 2000I +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Smart\-UPS 900I +.RE +.RE +.PP +"new" models +.RS 4 +These models usually come from late 1990s / pre\-2009 times\&. They are often referred as "3rd\&. gen"\&. For the most part, they have programmable eeprom, report supported commands and capabilites, and should work just fine with the apcsmart driver\&. +.RE +.PP +"microlink" models +.RS 4 +WARNING: these are not +\fInatively\fR +supported by apcsmart (or apcupsd for that matter, if you\(cqre wondering)\&. Around 2007 APC (now APC Schneider) decided to go back to its proprietry roots and all the new models (SMT, SMX, SURTD) use completely different protocol and cables\&. If you purchased a new APC ups, that uses cable with rj45 on the one end, and db\-9 on the other \- then you have such model\&. Your only option to support it through +\fBNUT\fR +is to purchase "legacy communications card" \- part #AP9620 (google \*(AqAP9620\*(Aq for more details)\&. Or if that\*(Aqs not an option, rely on official software\&. +.RE +.sp +Another thing to remember is that Smart protocol is not USB protocol\&. If you have ups with both USB and serial ports, then depending on how you connect it, you will need either apcsmart or usbhid\-ups driver\&. .SH "CABLING" .sp -This driver expects to see a 940\-0024C cable or a clone by default\&. You can switch to the 940\-0095B dual\-mode cable support with the cable= definition described below\&. +This driver expects to see a 940\-0024C cable or a clone by default\&. You can switch to the 940\-0095B dual\-mode cable support with the \*(Aqcable=\*(Aq definition described below\&. .sp If your 940\-0024C cable is broken or missing, use this diagram to build a clone: .sp http://www\&.networkupstools\&.org/cables/940\-0024C\&.jpg -.SH "EXTRA ARGUMENTS" .sp -This driver supports the following optional settings in the \fBups.conf\fR(5): +You can specify alternate cable in \fBups.conf\fR(5): +.sp +\fBcable\fR=940\-0095B +.sp +Alternatively, you can also provide it on the command line using: +.sp +\-x \fBcable\fR=940\-0095B +.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\&. .PP -\fBcable=940\-0095B\fR +\fBS\fR (soft hibernate) .RS 4 -Configure the serial port for the APC 940\-0095B dual\-mode cable\&. +This is most basic command present in probably all APC models\&. It will hibernate the UPS, and subsequently wake it up when the mains supply returns\&. +\fBThe command doesn\*(Aqt work if UPS is running on mains\&.\fR +.PP +"old" models +.RS 4 +The behaviour here is unfortunately pretty primitive \- when the power returns, the ups just wakes up\&. No grace periods, no min\&. battery charge condition, etc\&. This is probably not what you want\&. .RE .PP -\fBsdtype=\fR\fInum\fR +"new" models .RS 4 -Use shutdown type -\fInum\fR, according to this table: +The behaviour here is as expected \- the power is cut off after the eeprom defined grace period\&. The ups will wake up when the power returns, after the eeprom defined delay AND if the eeprom defined min\&. battery charge level is met\&. The delay is counted from the power\*(Aqs return\&. +.RE +.RE +.PP +\fBCS\fR (aka "force OB hack") +.RS 4 +This is a trick to make UPS power down even if it\*(Aqs running on mains\&. Immediately before issuing +\fBS\fR, "simulate power failure" is issued\&. The remaining behaviour is as in +\fBS\fR +case\&. +.sp +The name came from APC CS models, where such trick was used to power down UPSes in consistent fashion using only +\fBS\fR\&. It\*(Aqs better to use +\fB@nnn\fR +command if your UPS supports it (and is not too old, see below)\&. +.RE +.PP +\fB@nnn\fR (hard hibernate) +.RS 4 +This is basic command used to hibernate UPS regardless if it\*(Aqs running on batteries or on mains\&. The option takes 3 digits argument which can be used to specify additional wakeup delay (in 6 minute units)\&. +.PP +"old" models +.RS 4 +The behaviour is \- unfortunately \- similary primitive to +\fBS\fR\&. The ups unconditionally wakes up after nnn*6 minutes \- +\fBit doesn\*(Aqt care if the power returned !\fR +If nnn = 000, then UPS will do precisely nothing\&. On those models you\*(Aqre better specifying nnn > 0, if you can estimate the kind of power problems that might be happening in your environment\&. Another thing to consider with "old" models \- you might lose the connection with the ups, until it wakes up (with +\fBS\fR, the serial connection is kept alive)\&. +.RE +.PP +"new" models +.RS 4 +All the usual variables defined in eeprom are respected (see +\fBS\fR)\&. Additionally, if nnn > 0, the nnn*6 minutes are added to eeprom defined delay\&. UPS will not power up if it\*(Aqs running on batteries, contrary to what "old" models used to do \- the combined delay is counted from the moment of power return\&. +.RE +.sp +Supposedly there exist models that take 2 digits instead of 3\&. Just in case, NUT also supports such variation\&. You have to provide exactly 2 digits to trigger it (\fBawd\fR +option, or argument to one of the supported instant commands)\&. +.RE +.PP +\fBK\fR (delayed poweroff) +.RS 4 +This is permanent poweroff \- the ups will not wake up automatically\&. On newer units, it will respect applicable eeprom variables\&. +.RE +.PP +\fBZ\fR (instant poweroff) +.RS 4 +This is also permanent poweroff \- the ups will not wake up automatically\&. The poweroff is executed immediately\&. +.RE +.SH "SHUTDOWN CONTROL BY NUT" +.sp +There\*(Aqre 3 options used to control shutdown behaviour\&. +.PP +\fBsdtype\fR=[0\-5] +.RS 4 +This option takes a single digit (0\-5) as an argument\&. See below for details\&. +.RE +.PP +\fBadvorder\fR=no|[0\-4]+ +.RS 4 +This option takes string of digits as an argument\&. Methods listed are tried in turn until one of them succeedes\&. Note that the meaning of digits is different from +\fBsdtype\fR\&. See below for details\&. +.RE +.PP +\fBawd\fR=[0\-9]{1,3} +.RS 4 +This option lets you specify additional wakeup delay used by +\fB@\fR\&. If you provide exactly 2 digits, the driver will try 2 digits variation (see previous section for more info)\&. Otherwise standard 3 digits variation is used\&. +\fBNote: the time unit is 6 minutes !\fR +.RE +.sp +Keep in mind that \fBsdtype\fR and \fBadvorder\fR are mutually exclusive\&. If \fBadvorder\fR is provided, \fBsdtype\fR is ignored\&. If \fBadvorder\fR is set to \*(Aqno\*(Aq, \fBsdtype\fR is used instead\&. +.sp +If nothing is provided, \fBNUT\fR will assume \fBsdtype\fR=0 \- which is generally fine for anything not too ancient or not too quirky\&. +.SS "SDTYPE" +.sp +The values permitted are from 0 to 5\&. Only one can be specified\&. Anything else will cause apcsmart to exit\&. .PP 0 .RS 4 -soft shutdown or powerdown, depending on battery status +issue soft hibernate (\fBS\fR) if the ups is running on batteries, otherwise issue hard hibernate (\fB@\fR) .RE .PP 1 .RS 4 -soft shutdown followed by powerdown +issue soft hibernate (\fBS\fR) (if on batteries), and if it fails (or on mains) \- try hard hibernate (\fB@\fR) .RE .PP 2 .RS 4 -instant power off +issue instant poweroff (\fBZ\fR) .RE .PP 3 .RS 4 -power off with grace period +issue delayed poweroff (\fBK\fR) .RE .PP 4 .RS 4 -"force OB" hack method for CS 350 +issue "force OB hack" (\fBCS\fR) .RE +.PP +5 +.RS 4 +issue hard hibernate (\fB@\fR) +.RE +.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 +Hard hibernate\*(Aqs additional wakeup delay can be provided by \fBawd\fR\&. +.sp .5v +.RE +.SS "ADVORDER" +.sp +The argument is either a word \*(Aqno\*(Aq, or a string of 1 \- 5 digits in [0 \- 4] range\&. Each digit maps to the one of shutdown methods supported by APC upses\&. Methods listed in this way are tried in order, until one of them succedes\&. +.sp +If \fBadvorder\fR is undefined or set to \*(Aqno\*(Aq, \fBsdtype\fR is used instead\&. +.sp +The mapping is as follows: +.TS +tab(:); +lt lt +lt lt +lt lt +lt lt +lt lt. +T{ +.sp +0 +T}:T{ +.sp +soft hibernate (\fBS\fR) +T} +T{ +.sp +1 +T}:T{ +.sp +hard hibernate (\fB@\fR) +T} +T{ +.sp +2 +T}:T{ +.sp +delayed poweroff (\fBK\fR) +T} +T{ +.sp +3 +T}:T{ +.sp +instant poweroff (\fBZ\fR) +T} +T{ +.sp +4 +T}:T{ +.sp +"force OB hack" (\fBCS\fR) +T} +.TE +.sp 1 +.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 +Hard hibernate\*(Aqs additional wakeup delay can be provided by \fBawd\fR\&. +.sp .5v +.RE +.SH "IGNORING LB STATE" +.sp +APC units \- even if they report LB mode \- will not go into shutdown automatically\&. This gives us even more control with reference to "when to actually shutdown psu"\&. Since version 2\&.6\&.2, NUT supports \fBignorelb\fR option in driver\*(Aqs section of \fBups.conf\fR(5)\&. When such option is in effect, the core driver will ignore LB state as reported by specific driver and start shutdown basing the decision \fIonly\fR on two conditions: +.sp +battery\&.charge < battery\&.charge\&.low +.sp +\fBOR\fR +.sp +battery\&.runtime < battery\&.runtime\&.low +.sp +Of course \- if any of the variables are not available, the appropriate condition is not checked\&. If you want to explicitly disable one of the conditions, simply override the right hand variable causing the condition to always evaluate to false (you can even provide negative numbers)\&. +.sp +APC upses don\*(Aqt have battery\&.charge\&.low \- you will have to define it if you want to use such condition (prefix the variable with override\&. or default\&.)\&. +.sp +"New" units have battery\&.runtime\&.low, but depending on battery quality, firmware version, calibration and ups load \- this variable can be underestimated quite a bit \- especially right after going into OB state\&. This in turn can cause LB to be asserted, which under normal conditions will cause \fBNUT\fR to initiate the shutdown\&. You might want to disable this condition entirely, when relying on \fBignorelb\fR option (this was actually the main motivation behind introduction of such feature)\&. +.sp +Simple example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[apc] + ignorelb + override\&.battery\&.charge\&.low = 15 + override\&.battery\&.runtime\&.low = \-1 +.fi +.if n \{\ +.RE +.\} +.sp +This would cause apcsmart to go into shutdown \fIonly\fR if detected battery charge < 15%\&. Runtime condition is always false in this example\&. +.sp +You could ask \- why bother ? Well, the reason is already hinted above\&. APC units can be very picky about the batteries, and their firmware can underestimate the remaining runtime (especially right after going into OB state)\&. \fBignorelb\fR option and \fBoverride\&.*\fR let you remain in control of the ups, not ups in control of you\&. +.sp +Furthermore, this allows to specify conditions similary to how it\(cqs done in apcupsd daemon, so it should be welcome by people used to that software\&. +.SH "SUPPORTED INSTANT COMMANDS" +.sp +The apcsmart driver exposes following instant commands: +.PP +shutdown\&.return +.RS 4 +executes soft hibernate +.RE +.PP +shutdown\&.return cs +.RS 4 +executes "force OB hack" +.RE +.PP +shutdown\&.return at: +.RS 4 +executes "hard hibernate" with *6 minutes additional wakeup delay ( format is the same as of +\fBawd\fR +option) +.RE +.PP +shutdown\&.stayoff +.RS 4 +executes "delayed poweroff" +.RE +.PP +load\&.off +.RS 4 +executes "instant poweroff" .RE .sp -Modes 0 and 1 will power up the load when power returns\&. Modes 2 and 3 will keep the load turned off when the power returns\&. +All the above commands must be issued 2nd time to have any effect (no less than 3 seconds, and no more than 15 seconds after the initial call)\&. Those commands are mostly useful for manual testing, when your machine is not powered by the ups you\*(Aqre testing\&. .sp -Mode 4 exploits an oddity in the CS 350 models since they only seem to support the S command, but then only when running on battery\&. As a result, the driver will force the UPS to go on battery if necessary before sending the shutdown command\&. This ensures that the load gets reset\&. +Other supported commands: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +load\&.on +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.panel\&.start +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.failure\&.start +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.battery\&.start +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +test\&.battery\&.stop +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +bypass\&.start +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +bypass\&.stop +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +calibrate\&.start +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +calibrate\&.stop +.RE .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\&. @@ -114,11 +499,10 @@ Some older APC UPS models return bogus data in the status register during a fron APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa\&. .SH "AUTHOR" .sp -Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&. +Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&. In 2\&.6\&.2 it was renamed to apcsmart\-old, being superseded by updated version with new features, which is maintained by Michal Soltys .SH "SEE ALSO" -.SS "The core driver:" .sp -\fBnutupsdrv\fR(8) +\fBnutupsdrv\fR(8), \fBups.conf\fR(5) .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/apcsmart.txt b/docs/man/apcsmart.txt index 33835c0..76db3f1 100644 --- a/docs/man/apcsmart.txt +++ b/docs/man/apcsmart.txt @@ -11,30 +11,63 @@ SYNOPSIS *apcsmart* -h -*apcsmart* -a 'UPS_NAME' ['OPTIONS'] +*apcsmart* -a \'UPS_NAME' [-x option=value ...] NOTE: This man page only documents the hardware-specific features of the -apcsmart driver. For information about the core driver, see +apcsmart driver. For information about the core driver, see linkman:nutupsdrv[8]. + SUPPORTED HARDWARE ------------------ -apcsmart should recognize all recent APC models that use a serial -protocol at 2400 bps. This is primarily the Smart-UPS, Matrix-UPS and -Back-UPS Pro lines. +The apcsmart driver should recognize (or at the very least work with) majority +of Smart-UPS models - which includes Smart-UPS, Matrix-UPS and Back-UPS lineups, +among few other ones. -The driver attempts to support every bell and whistle of the APC -reporting interface, whether or not this is strictly sensible. +Currently we can roughly divide APC hardware into 3 groups (note that the +division isn\'t strict by any means, and the borders between those are pretty fuzzy): -Some older hardware may only report a handful of variables. This is -usually not a bug--they just don't support anything else. +[very] "old" models:: + These models usually have old APC logo, white color and _no_ programmable + eeprom; You won\'t find them listed anywhere on APC's site either. The support + for those will be usually based on driver\'s compatibility tables, or if the + model (firmware) is not listed in those - the driver will try to follow the very + basic subset of features, while still trying to remain useful. Despite + "smart" tagname, they often tend to behave in pretty dumb way (see the + section below about shutdown behaviour). ++ +-- +.Example models: + * Smart-UPS 2000I + * Smart-UPS 900I +-- + +"new" models:: + These models usually come from late 1990s / pre-2009 times. They are often + referred as "3rd. gen". For the most part, they have programmable eeprom, + report supported commands and capabilites, and should work just fine with the + apcsmart driver. + +"microlink" models:: + WARNING: these are not _natively_ supported by apcsmart (or apcupsd for that + matter, if you\'re wondering). Around 2007 APC (now APC Schneider) decided to + go back to its proprietry roots and all the new models (SMT, SMX, SURTD) use + completely different protocol and cables. If you purchased a new APC ups, + that uses cable with rj45 on the one end, and db-9 on the other - then you + have such model. Your only option to support it through *NUT* is to + purchase "legacy communications card" - part #AP9620 (google \'AP9620' for + more details). Or if that\'s not an option, rely on official software. + +Another thing to remember is that Smart protocol is not USB protocol. If you +have ups with both USB and serial ports, then depending on how you connect it, +you will need either apcsmart or usbhid-ups driver. CABLING ------- -This driver expects to see a 940-0024C cable or a clone by default. You -can switch to the 940-0095B dual-mode cable support with the `cable=` +This driver expects to see a 940-0024C cable or a clone by default. You +can switch to the 940-0095B dual-mode cable support with the \'cable=' definition described below. If your 940-0024C cable is broken or missing, use this diagram to build @@ -42,42 +75,246 @@ a clone: http://www.networkupstools.org/cables/940-0024C.jpg -EXTRA ARGUMENTS ---------------- +You can specify alternate cable in linkman:ups.conf[5]: -This driver supports the following optional settings in the -linkman:ups.conf[5]: +*cable*=940-0095B -*cable=940-0095B*:: -Configure the serial port for the APC 940-0095B dual-mode cable. +Alternatively, you can also provide it on the command line using: -*sdtype=*'num':: -Use shutdown type 'num', according to this table: +-x *cable*=940-0095B -0;; soft shutdown or powerdown, depending on battery status +EXPLANATION OF SHUTDOWN METHODS SUPPORTED BY APC UPSES +------------------------------------------------------ -1;; soft shutdown followed by powerdown +APC hardware supports a lot of shutdown methods, that themselves can differ in +behaviour quite a bit, depending on the model. -2;; instant power off +*S* (soft hibernate):: + This is most basic command present in probably all APC models. It will + hibernate the UPS, and subsequently wake it up when the mains supply + returns. *The command doesn\'t work if UPS is running on mains.* -3;; power off with grace period + "old" models::: + The behaviour here is unfortunately pretty primitive - when the power + returns, the ups just wakes up. No grace periods, no min. battery + charge condition, etc. This is probably not what you want. -4;; "force OB" hack method for CS 350 + "new" models::: + The behaviour here is as expected - the power is cut off after the + eeprom defined grace period. The ups will wake up when the power + returns, after the eeprom defined delay AND if the eeprom defined min. + battery charge level is met. The delay is counted from the power\'s + return. -Modes 0 and 1 will power up the load when power returns. Modes 2 and 3 -will keep the load turned off when the power returns. +*CS* (aka "force OB hack"):: + This is a trick to make UPS power down even if it\'s running on mains. + Immediately before issuing *S*, "simulate power failure" is issued. The + remaining behaviour is as in *S* case. ++ +The name came from APC CS models, where such trick was used to power down +UPSes in consistent fashion using only *S*. It\'s better to use *@nnn* +command if your UPS supports it (and is not too old, see below). -Mode 4 exploits an oddity in the CS 350 models since they only seem to -support the S command, but then only when running on battery. As a -result, the driver will force the UPS to go on battery if necessary -before sending the shutdown command. This ensures that the load gets -reset. +*@nnn* (hard hibernate):: + This is basic command used to hibernate UPS regardless if it\'s + running on batteries or on mains. The option takes 3 digits argument which + can be used to specify additional wakeup delay (in 6 minute units). ++ +-- + "old" models::: + The behaviour is - unfortunately - similary primitive to *S*. The ups + unconditionally wakes up after $$nnn*6$$ minutes - *it doesn\'t care if the + power returned !* If nnn = 000, then UPS will do precisely nothing. On + those models you\'re better specifying nnn > 0, if you can estimate + the kind of power problems that might be happening in your environment. + Another thing to consider with "old" models - you might lose the + connection with the ups, until it wakes up (with *S*, the serial + connection is kept alive). + + "new" models::: + All the usual variables defined in eeprom are respected (see *S*). + Additionally, if nnn > 0, the $$nnn*6$$ minutes are added to eeprom + defined delay. UPS will not power up if it\'s running on batteries, + contrary to what "old" models used to do - the combined delay is counted + from the moment of power return. +-- ++ +Supposedly there exist models that take 2 digits instead of 3. Just in case, +NUT also supports such variation. You have to provide exactly 2 digits to +trigger it (*awd* option, or argument to one of the supported instant commands). + +*K* (delayed poweroff):: + This is permanent poweroff - the ups will not wake up automatically. On + newer units, it will respect applicable eeprom variables. + +*Z* (instant poweroff):: + This is also permanent poweroff - the ups will not wake up automatically. The + poweroff is executed immediately. + +SHUTDOWN CONTROL BY NUT +----------------------- + +There\'re 3 options used to control shutdown behaviour. + +*sdtype*=[0-5]:: + This option takes a single digit (0-5) as an argument. See below for + details. + +*advorder*=no|[0-4]+:: + This option takes string of digits as an argument. Methods listed are tried + in turn until one of them succeedes. Note that the meaning of digits is + different from *sdtype*. See below for details. + +*awd*=[0-9]{1,3}:: + This option lets you specify additional wakeup delay used by *@*. If you + provide exactly 2 digits, the driver will try 2 digits variation (see + previous section for more info). Otherwise standard 3 digits variation is + used. *Note: the time unit is 6 minutes !* + +Keep in mind that *sdtype* and *advorder* are mutually exclusive. If *advorder* +is provided, *sdtype* is ignored. If *advorder* is set to \'no', *sdtype* is +used instead. + +If nothing is provided, *NUT* will assume *sdtype*=0 - which is generally fine +for anything not too ancient or not too quirky. + +SDTYPE +~~~~~~ + +The values permitted are from 0 to 5. Only one can be specified. Anything else +will cause apcsmart to exit. + +0:: +issue soft hibernate (*S*) if the ups is running on batteries, otherwise issue +hard hibernate (*@*) +1:: +issue soft hibernate (*S*) (if on batteries), and if it fails (or on mains) - +try hard hibernate (*@*) +2:: +issue instant poweroff (*Z*) +3:: +issue delayed poweroff (*K*) +4:: +issue "force OB hack" (*CS*) +5:: +issue hard hibernate (*@*) + +NOTE: Hard hibernate\'s additional wakeup delay can be provided by *awd*. + +ADVORDER +~~~~~~~~ + +The argument is either a word \'no', or a string of 1 - 5 digits in [0 - 4] +range. Each digit maps to the one of shutdown methods supported by APC upses. +Methods listed in this way are tried in order, until one of them succedes. + +If *advorder* is undefined or set to \'no', *sdtype* is used instead. + +The mapping is as follows: + +[horizontal] +0:: soft hibernate (*S*) +1:: hard hibernate (*@*) +2:: delayed poweroff (*K*) +3:: instant poweroff (*Z*) +4:: "force OB hack" (*CS*) + +NOTE: Hard hibernate\'s additional wakeup delay can be provided by *awd*. + +IGNORING LB STATE +----------------- + +APC units - even if they report LB mode - will not go into shutdown +automatically. This gives us even more control with reference to "when to +actually shutdown psu". Since version 2.6.2, NUT supports *ignorelb* option in +driver\'s section of linkman:ups.conf[5]. When such option is in effect, +the core driver will ignore LB state as reported by specific driver and +start shutdown basing the decision _only_ on two conditions: + +battery.charge < battery.charge.low + +*OR* + +battery.runtime < battery.runtime.low + +Of course - if any of the variables are not available, the appropriate condition +is not checked. If you want to explicitly disable one of the conditions, simply +override the right hand variable causing the condition to always evaluate to +false (you can even provide negative numbers). + +APC upses don\'t have battery.charge.low - you will have to define it if you want +to use such condition (prefix the variable with override. or default.). + +"New" units have battery.runtime.low, but depending on battery quality, firmware +version, calibration and ups load - this variable can be underestimated quite a bit - +especially right after going into OB state. This in turn can cause LB to be +asserted, which under normal conditions will cause *NUT* to initiate the +shutdown. You might want to disable this condition entirely, when relying on +*ignorelb* option (this was actually the main motivation behind introduction of +such feature). + +Simple example: + +[source,conf] +---- +[apc] + ignorelb + override.battery.charge.low = 15 + override.battery.runtime.low = -1 +---- + +This would cause apcsmart to go into shutdown _only_ if detected battery charge +< 15%. Runtime condition is always false in this example. + +You could ask - why bother ? Well, the reason is already hinted above. APC units +can be very picky about the batteries, and their firmware can underestimate the +remaining runtime (especially right after going into OB state). *ignorelb* +option and *$$override.*$$* let you remain in control of the ups, not ups in control +of you. + +Furthermore, this allows to specify conditions similary to how it's done in +apcupsd daemon, so it should be welcome by people used to that software. + + +SUPPORTED INSTANT COMMANDS +-------------------------- + +The apcsmart driver exposes following instant commands: + +shutdown.return:: +executes soft hibernate +shutdown.return cs:: +executes "force OB hack" +shutdown.return at::: +executes "hard hibernate" with $$*6$$ minutes additional wakeup delay ( format +is the same as of *awd* option) +shutdown.stayoff:: +executes "delayed poweroff" +load.off:: +executes "instant poweroff" + +All the above commands must be issued 2nd time to have any effect (no less than 3 +seconds, and no more than 15 seconds after the initial call). Those commands are +mostly useful for manual testing, when your machine is not powered by the ups +you\'re testing. + +Other supported commands: + +- load.on +- test.panel.start +- test.failure.start +- test.battery.start +- test.battery.stop +- bypass.start +- bypass.stop +- calibrate.start +- calibrate.stop BUGS ---- Some older APC UPS models return bogus data in the status register during -a front panel test. This is usually detected and discarded, but some +a front panel test. This is usually detected and discarded, but some other unexpected values have occasionally slipped through. APC UPS models with both USB and serial ports require a power cycle when @@ -85,17 +322,20 @@ switching from USB communication to serial, and perhaps vice versa. AUTHOR ------ + Nigel Metheringham (drawing -heavily on the original apcsmart driver by Russell Kroll). This driver -was called newapc for a time and was renamed in the 1.5 series. +heavily on the original apcsmart driver by Russell Kroll). This driver +was called newapc for a time and was renamed in the 1.5 series. In 2.6.2 +it was renamed to apcsmart-old, being superseded by updated version with +new features, which is maintained by Michal Soltys SEE ALSO -------- -The core driver: -~~~~~~~~~~~~~~~~ -linkman:nutupsdrv[8] +linkman:nutupsdrv[8], linkman:ups.conf[5] Internet resources: ~~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + +// vim: tw=80 ai si ts=8 sts=4 sw=4 et : diff --git a/docs/man/bcmxcp.8 b/docs/man/bcmxcp.8 index 503db8a..9f9d26a 100644 --- a/docs/man/bcmxcp.8 +++ b/docs/man/bcmxcp.8 @@ -2,12 +2,12 @@ .\" Title: bcmxcp .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BCMXCP" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "BCMXCP" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.8 index 628435f..32154b7 100644 --- a/docs/man/bcmxcp_usb.8 +++ b/docs/man/bcmxcp_usb.8 @@ -2,12 +2,12 @@ .\" Title: bcmxcp_usb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BCMXCP_USB" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "BCMXCP_USB" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkin.8 b/docs/man/belkin.8 index 07b0e2c..3cdcb70 100644 --- a/docs/man/belkin.8 +++ b/docs/man/belkin.8 @@ -2,12 +2,12 @@ .\" Title: belkin .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BELKIN" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "BELKIN" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkinunv.8 b/docs/man/belkinunv.8 index 2e1ed16..e1b771f 100644 --- a/docs/man/belkinunv.8 +++ b/docs/man/belkinunv.8 @@ -2,12 +2,12 @@ .\" Title: belkinunv .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BELKINUNV" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "BELKINUNV" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestfcom.8 b/docs/man/bestfcom.8 index e57a232..5fc62ae 100644 --- a/docs/man/bestfcom.8 +++ b/docs/man/bestfcom.8 @@ -2,12 +2,12 @@ .\" Title: bestfcom .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTFCOM" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "BESTFCOM" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestfortress.8 b/docs/man/bestfortress.8 index d169d47..e4961a5 100644 --- a/docs/man/bestfortress.8 +++ b/docs/man/bestfortress.8 @@ -2,12 +2,12 @@ .\" Title: bestfortress .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTFORTRESS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "BESTFORTRESS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestuferrups.8 b/docs/man/bestuferrups.8 index 59f7bee..cc7e7a1 100644 --- a/docs/man/bestuferrups.8 +++ b/docs/man/bestuferrups.8 @@ -2,12 +2,12 @@ .\" Title: bestuferrups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTUFERRUPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "BESTUFERRUPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestups.8 b/docs/man/bestups.8 index 4849183..071ef89 100644 --- a/docs/man/bestups.8 +++ b/docs/man/bestups.8 @@ -2,12 +2,12 @@ .\" Title: bestups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTUPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "BESTUPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/blazer.8 b/docs/man/blazer.8 index daa7244..f45308d 100644 --- a/docs/man/blazer.8 +++ b/docs/man/blazer.8 @@ -2,12 +2,12 @@ .\" Title: blazer .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BLAZER" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "BLAZER" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -91,6 +91,16 @@ Some UPSes will lock up if you attempt to read rating information from them\&. S 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 diff --git a/docs/man/blazer.txt b/docs/man/blazer.txt index 4fcb055..187724a 100644 --- a/docs/man/blazer.txt +++ b/docs/man/blazer.txt @@ -78,6 +78,11 @@ Setting this flag will make the driver skip this step. Some UPSes will lock up if you attempt to read vendor information from them. Setting this flag will make the driver skip this step. +*protocol =* 'string':: + +Skip autodetection of the protocol to use and only use the one specified. +Supported values 'megatec', 'megatec/old', 'mustek' and 'zinto'. + *runtimecal =* 'value,value,value,value':: Parameter used in the (optional) runtime estimation. This takes two runtimes @@ -203,7 +208,7 @@ BATTERY CHARGE -------------- Due to popular demand, this driver will report a guesstimated *battery.charge* -and optionally *battery.runtime*, provided you specified a couple of the +and optionally *battery.runtime*, provided you specified a couple of the <<_extra_arguments,EXTRA ARGUMENTS>> listed above. If you specify both *battery.voltage.high* and *battery.voltage.low* in @@ -259,7 +264,7 @@ You need to use 'cablepower' This parameter can simply be discarded, since it was a wrong understanding of the specification. - + KNOWN PROBLEMS -------------- diff --git a/docs/man/clone.8 b/docs/man/clone.8 index 75ebf97..897f36c 100644 --- a/docs/man/clone.8 +++ b/docs/man/clone.8 @@ -2,12 +2,12 @@ .\" Title: clone .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "CLONE" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "CLONE" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/dummy-ups.8 b/docs/man/dummy-ups.8 index ba9b312..4a4482b 100644 --- a/docs/man/dummy-ups.8 +++ b/docs/man/dummy-ups.8 @@ -2,12 +2,12 @@ .\" Title: dummy-ups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "DUMMY\-UPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "DUMMY\-UPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/etapro.8 b/docs/man/etapro.8 index 7f91bbc..5ad5c47 100644 --- a/docs/man/etapro.8 +++ b/docs/man/etapro.8 @@ -2,12 +2,12 @@ .\" Title: etapro .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "ETAPRO" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "ETAPRO" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/everups.8 b/docs/man/everups.8 index 9d7538b..b0fde0f 100644 --- a/docs/man/everups.8 +++ b/docs/man/everups.8 @@ -2,12 +2,12 @@ .\" Title: everups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "EVERUPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "EVERUPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/gamatronic.8 b/docs/man/gamatronic.8 index 9503f1e..aba6c37 100644 --- a/docs/man/gamatronic.8 +++ b/docs/man/gamatronic.8 @@ -2,12 +2,12 @@ .\" Title: gamatronic .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "GAMATRONIC" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "GAMATRONIC" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/genericups.8 b/docs/man/genericups.8 index a0403e5..a5add29 100644 --- a/docs/man/genericups.8 +++ b/docs/man/genericups.8 @@ -2,12 +2,12 @@ .\" Title: genericups .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "GENERICUPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "GENERICUPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/hosts.conf.5 b/docs/man/hosts.conf.5 index 4b7245d..223cb90 100644 --- a/docs/man/hosts.conf.5 +++ b/docs/man/hosts.conf.5 @@ -2,12 +2,12 @@ .\" Title: hosts.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "HOSTS\&.CONF" "5" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "HOSTS\&.CONF" "5" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/isbmex.8 b/docs/man/isbmex.8 index b74b2de..8ef95ed 100644 --- a/docs/man/isbmex.8 +++ b/docs/man/isbmex.8 @@ -2,12 +2,12 @@ .\" Title: isbmex .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "ISBMEX" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "ISBMEX" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ivtscd.8 b/docs/man/ivtscd.8 index 9d25e5a..d993ae4 100644 --- a/docs/man/ivtscd.8 +++ b/docs/man/ivtscd.8 @@ -2,12 +2,12 @@ .\" Title: ivtscd .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "IVTSCD" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "IVTSCD" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libupsclient-config.1 b/docs/man/libupsclient-config.1 index 74f1382..5acecb2 100644 --- a/docs/man/libupsclient-config.1 +++ b/docs/man/libupsclient-config.1 @@ -2,12 +2,12 @@ .\" Title: libupsclient-config .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "LIBUPSCLIENT\-CONFIG" "1" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "LIBUPSCLIENT\-CONFIG" "1" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert-esp2.8 b/docs/man/liebert-esp2.8 index 779ee90..4e1b5da 100644 --- a/docs/man/liebert-esp2.8 +++ b/docs/man/liebert-esp2.8 @@ -2,12 +2,12 @@ .\" Title: liebert-esp2 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "LIEBERT\-ESP2" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "LIEBERT\-ESP2" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert.8 b/docs/man/liebert.8 index ab2530a..af88e94 100644 --- a/docs/man/liebert.8 +++ b/docs/man/liebert.8 @@ -2,12 +2,12 @@ .\" Title: liebert .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "LIEBERT" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "LIEBERT" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/masterguard.8 b/docs/man/masterguard.8 index 7ea77e7..bd5129d 100644 --- a/docs/man/masterguard.8 +++ b/docs/man/masterguard.8 @@ -2,12 +2,12 @@ .\" Title: masterguard .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MASTERGUARD" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "MASTERGUARD" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/metasys.8 b/docs/man/metasys.8 index 6edef80..5ccb9c5 100644 --- a/docs/man/metasys.8 +++ b/docs/man/metasys.8 @@ -2,12 +2,12 @@ .\" Title: metasys .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "METASYS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "METASYS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/mge-shut.8 b/docs/man/mge-shut.8 index bd602a1..1d0e430 100644 --- a/docs/man/mge-shut.8 +++ b/docs/man/mge-shut.8 @@ -2,12 +2,12 @@ .\" Title: mge-shut .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MGE\-SHUT" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "MGE\-SHUT" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/mge-utalk.8 b/docs/man/mge-utalk.8 index 32462ef..76543f2 100644 --- a/docs/man/mge-utalk.8 +++ b/docs/man/mge-utalk.8 @@ -2,12 +2,12 @@ .\" Title: mge-utalk .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MGE\-UTALK" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "MGE\-UTALK" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/microdowell.8 b/docs/man/microdowell.8 index 8a97ec4..c4eba5b 100644 --- a/docs/man/microdowell.8 +++ b/docs/man/microdowell.8 @@ -2,12 +2,12 @@ .\" Title: microdowell .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MICRODOWELL" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "MICRODOWELL" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/netxml-ups.8 b/docs/man/netxml-ups.8 index 49eec6a..9464983 100644 --- a/docs/man/netxml-ups.8 +++ b/docs/man/netxml-ups.8 @@ -2,12 +2,12 @@ .\" Title: netxml-ups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NETXML\-UPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "NETXML\-UPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nut-ipmipsu.8 b/docs/man/nut-ipmipsu.8 new file mode 100644 index 0000000..ac06a46 --- /dev/null +++ b/docs/man/nut-ipmipsu.8 @@ -0,0 +1,231 @@ +'\" t +.\" Title: nut-ipmipsu +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUT\-IPMIPSU" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nut-ipmipsu \- Driver for IPMI Power Supply Units (PSU) +.SH "SYNOPSIS" +.sp +\fBnut\-ipmipsu\fR \-h +.sp +\fBnut\-ipmipsu\fR \-a \fIPSU_NAME\fR [\fIOPTIONS\fR] +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This driver is experimental, and still a work\-in\-progress\&. Feedback is encouraged\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.sp +This man page only documents the hardware\-specific features of the nut\-ipmipsu driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp .5v +.RE +.SH "SUPPORTED HARDWARE" +.sp +This driver should support a wide range of PSUs through local IPMI interface\&. +.sp +nut\-ipmipsu currently use the GNU FreeIPMI project, for IPMI implementation\&. +.SH "EXTRA ARGUMENTS" +.sp +This driver doesn\(cqt support any optional settings\&. +.SH "INSTALLATION" +.sp +This driver is not built by default\&. You can build it by using "configure \-\-with\-ipmi=yes"\&. +.sp +You also need to give proper permissions on the local IPMI device file (/dev/ipmi0 for example) to allow the NUT user to access it\&. +.sp +An udev rules file (nut\-ipmipsu\&.rules) is provided and automatically installed on udev enabled system\&. This file is generally installed in /etc/udev/rules\&.d/ or /lib/udev/rules\&.d/ on newer systems, to address the permission settings problem\&. For more information, refer to nut/scripts/udev/README\&. +.SH "INSTANT COMMANDS" +.sp +This driver doesn\(cqt support any instant commands\&. +.SH "IMPLEMENTATION" +.sp +The "port" value is used to identify the PSU\&. For instance, to target FRU 0x2, use the following in \fBups\&.conf\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[pdu] + driver = nut\-ipmipsu + port = id2 +.fi +.if n \{\ +.RE +.\} +.sp +This driver will report various information related to a PSU, including: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +manufacturer, model, serial and part numbers, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +nominal voltage and frequency, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +actual current and voltage, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +status of the PSU: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fIOL\fR +means that the PSU is present and providing power, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fIOB\fR +means that the PSU is present but not providing power (power cable removed), +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} + +\fIstale\fR +means that the PSU is not present (ie physically removed)\&. +.RE +.RE +.sp +Here is an example output for a Dell r610 server: +.sp +.if n \{\ +.RS 4 +.\} +.nf +device\&.mfr: DELL +device\&.mfr\&.date: 01/05/11 \- 08:51:00 +device\&.model: PWR SPLY,717W,RDNT +device\&.part: 0RN442A01 +device\&.serial: CN179721130031 +device\&.type: psu +driver\&.name: nut\-ipmipsu +driver\&.parameter\&.pollinterval: 2 +driver\&.parameter\&.port: id2 +driver\&.version: 2\&.6\&.1\-3139M +driver\&.version\&.data: IPMI PSU driver +driver\&.version\&.internal: 0\&.01 +input\&.current: 0\&.20 +input\&.frequency\&.high: 63 +input\&.frequency\&.low: 47 +input\&.voltage: 232\&.00 +input\&.voltage\&.maximum: 264 +input\&.voltage\&.minimum: 90 +ups\&.id: 2 +ups\&.realpower\&.nominal: 717 +ups\&.status: OL +ups\&.voltage: 12 +.fi +.if n \{\ +.RE +.\} +.SH "AUTHOR" +.sp +Arnaud Quette +.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/ +.sp +GNU FreeIPMI home page: http://www\&.gnu\&.org/software/freeipmi/ diff --git a/docs/man/nut-ipmipsu.txt b/docs/man/nut-ipmipsu.txt new file mode 100644 index 0000000..cef3a14 --- /dev/null +++ b/docs/man/nut-ipmipsu.txt @@ -0,0 +1,115 @@ +NUT-IPMIPSU(8) +============== + +NAME +---- + +nut-ipmipsu - Driver for IPMI Power Supply Units (PSU) + +SYNOPSIS +-------- + +*nut-ipmipsu* -h + +*nut-ipmipsu* -a 'PSU_NAME' ['OPTIONS'] + +NOTE: This driver is experimental, and still a work-in-progress. Feedback is +encouraged. + +NOTE: This man page only documents the hardware-specific features of the +nut-ipmipsu driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ + +This driver should support a wide range of PSUs through local IPMI interface. + +nut-ipmipsu currently use the GNU FreeIPMI project, for IPMI implementation. + + +EXTRA ARGUMENTS +--------------- + +This driver doesn't support any optional settings. + +INSTALLATION +------------ + +This driver is not built by default. You can build it by using +"configure --with-ipmi=yes". + +You also need to give proper permissions on the local IPMI device file +(/dev/ipmi0 for example) to allow the NUT user to access it. + +An udev rules file (nut-ipmipsu.rules) is provided and automatically installed +on udev enabled system. This file is generally installed in /etc/udev/rules.d/ +or /lib/udev/rules.d/ on newer systems, to address the permission settings +problem. For more information, refer to nut/scripts/udev/README. + +INSTANT COMMANDS +---------------- + +This driver doesn't support any instant commands. + +IMPLEMENTATION +-------------- + +The "port" value is used to identify the PSU. For instance, to target +FRU 0x2, use the following in *ups.conf*: + + [pdu] + driver = nut-ipmipsu + port = id2 + +This driver will report various information related to a PSU, including: + + - manufacturer, model, serial and part numbers, + - nominal voltage and frequency, + - actual current and voltage, + - status of the PSU: + + * 'OL' means that the PSU is present and providing power, + * 'OB' means that the PSU is present but not providing power (power cable removed), + * 'stale' means that the PSU is not present (ie physically removed). + +Here is an example output for a Dell r610 server: + + device.mfr: DELL + device.mfr.date: 01/05/11 - 08:51:00 + device.model: PWR SPLY,717W,RDNT + device.part: 0RN442A01 + device.serial: CN179721130031 + device.type: psu + driver.name: nut-ipmipsu + driver.parameter.pollinterval: 2 + driver.parameter.port: id2 + driver.version: 2.6.1-3139M + driver.version.data: IPMI PSU driver + driver.version.internal: 0.01 + input.current: 0.20 + input.frequency.high: 63 + input.frequency.low: 47 + input.voltage: 232.00 + input.voltage.maximum: 264 + input.voltage.minimum: 90 + ups.id: 2 + ups.realpower.nominal: 717 + ups.status: OL + ups.voltage: 12 + +AUTHOR +------ +Arnaud Quette + +SEE ALSO +-------- +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + +GNU FreeIPMI home page: http://www.gnu.org/software/freeipmi/ diff --git a/docs/man/nut-scanner.8 b/docs/man/nut-scanner.8 new file mode 100644 index 0000000..bf8621b --- /dev/null +++ b/docs/man/nut-scanner.8 @@ -0,0 +1,186 @@ +'\" t +.\" Title: nut-scanner +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUT\-SCANNER" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nut-scanner \- scan communication buses for NUT devices +.SH "SYNOPSIS" +.sp +\fBnut\-scanner\fR \-h +.sp +\fBnut\-scanner\fR [\fIOPTIONS\fR] +.SH "DESCRIPTION" +.sp +\fBnut\-scanner\fR scans available communication buses and display any NUT compatible device it has found\&. +.SH "OPTIONS" +.PP +\fB\-h\fR +.RS 4 +Display the help text\&. +.RE +.SH "DISPLAY OPTIONS" +.PP +\fB\-N\fR | \fB\-\-disp_nut_conf\fR +.RS 4 +Display result in the +\fIups\&.conf\fR +format\&. +.RE +.PP +\fB\-P\fR | \fB\-\-disp_parsable\fR +.RS 4 +Display result in a parsable format\&. +.RE +.SH "BUS OPTIONS" +.PP +\fB\-C\fR | \fB\-\-complete_scan\fR +.RS 4 +Scan all available communication buses (default behavior) +.RE +.PP +\fB\-U\fR | \fB\-\-usb_scan\fR +.RS 4 +List all NUT compatible USB devices currently plugged in\&. +.RE +.PP +\fB\-S\fR | \fB\-\-snmp_scan\fR +.RS 4 +Scan SNMP devices\&. Require at least a +\fIstart IP\fR, and optionnaly an +\fIend IP\fR\&. See specific SNMP OPTIONS for community and security settings\&. +.RE +.PP +\fB\-M\fR | \fB\-\-xml_scan\fR +.RS 4 +Scan XML/HTTP devices\&. Broadcast a network message on the current network interfaces to retrieve XML/HTTP capable devices\&. No IP required\&. +.RE +.PP +\fB\-O\fR | \fB\-\-oldnut_scan\fR +.RS 4 +Scan NUT devices (i\&.e\&. upsd daemon) on IP ranging from +\fIstart IP\fR +to +\fIend IP\fR\&. +.RE +.PP +\fB\-A\fR | \fB\-\-avahi_scan\fR +.RS 4 +Scan NUT servers using avahi request on the current network interfaces\&. No IP required\&. +.RE +.PP +\fB\-I\fR | \fB\-\-ipmi_scan\fR +.RS 4 +Scan NUT compatible devices available via IPMI on the current host\&. +.RE +.SH "NETWORK OPTIONS" +.PP +\fB\-t\fR | \fB\-\-timeout\fR \fItimeout\fR +.RS 4 +Set the network timeout in seconds\&. Default timeout is 5 seconds\&. +.RE +.PP +\fB\-s\fR | \fB\-\-start_ip\fR \fIstart IP\fR +.RS 4 +Set the first IP (IPv4 or IPv6) when a range of IP is required (SNMP, old_nut)\&. +.RE +.PP +\fB\-e\fR | \fB\-\-end_ip\fR \fIend IP\fR +.RS 4 +Set the last IP (IPv4 or IPv6) when a range of IP is required (SNMP, old_nut)\&. If this parameter is omitted, only the +\fIstart IP\fR +is scanned\&. If +\fIend IP\fR +is lesser than +\fIstart IP\fR, both parameter are internally permuted\&. +.RE +.SH "NUT DEVICE OPTION" +.PP +\fB\-p\fR | \fB\-\-port -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUT\&.CONF" "5" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "NUT\&.CONF" "5" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_add_device_to_device.3 b/docs/man/nutscan_add_device_to_device.3 new file mode 100644 index 0000000..e8e7ab1 --- /dev/null +++ b/docs/man/nutscan_add_device_to_device.3 @@ -0,0 +1,68 @@ +'\" t +.\" Title: nutscan_add_device_to_device +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_ADD_DEVICE_T" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_add_device_to_device \- Concatenate two devices structure\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +nutscan_device_t * nutscan_add_device_to_device(nutscan_device_t * first, nutscan_device_t * second); +.fi +.SH "DESCRIPTION" +.sp +The nutscan_device_t contains the following variables: +.sp +.if n \{\ +.RS 4 +.\} +.nf +nutscan_device_type_t type; +char * driver; +char * port; +nutscan_options_t opt; +struct nutscan_device * prev; +struct nutscan_device * next; +.fi +.if n \{\ +.RE +.\} +.sp +This is a double linked list of device\&. Each device is described by its type, its driver name, its port and any number of optional data\&. +.sp +The \fBnutscan_add_device_to_device()\fR concatenates \fIfirst\fR and \fIsecond\fR devices to a unique device\&. No new device is created, the two linked list are simply linked to each other\&. So \fIfirst\fR and \fIsecond\fR devices are likely to be modified by this function\&. +.SH "RETURN VALUE" +.sp +The \fBnutscan_add_device_to_device()\fR functions returns a pointer to a device containg both passed devices\&. Note that it\(cqs not a new device, so it is either \fIfirst\fR or \fIsecond\fR which is returned\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3) diff --git a/docs/man/nutscan_add_device_to_device.txt b/docs/man/nutscan_add_device_to_device.txt new file mode 100644 index 0000000..7ccc3c8 --- /dev/null +++ b/docs/man/nutscan_add_device_to_device.txt @@ -0,0 +1,45 @@ +NUTSCAN_ADD_DEVICE_TO_DEVICE(3) +=============================== + +NAME +---- + +nutscan_add_device_to_device - Concatenate two devices structure. + +SYNOPSIS +-------- + + #include + + nutscan_device_t * nutscan_add_device_to_device(nutscan_device_t * first, nutscan_device_t * second); + + +DESCRIPTION +----------- + +The `nutscan_device_t` contains the following variables: + + nutscan_device_type_t type; + char * driver; + char * port; + nutscan_options_t opt; + struct nutscan_device * prev; + struct nutscan_device * next; + +This is a double linked list of device. Each device is described by its `type`, its `driver` name, its `port` and any number of optional data. + +The *nutscan_add_device_to_device()* concatenates 'first' and 'second' devices to a unique device. No new device is created, the two linked list are simply linked to each other. So 'first' and 'second' devices are likely to be modified by this function. + +RETURN VALUE +------------ + +The *nutscan_add_device_to_device()* functions returns a pointer to a device containg both passed devices. Note that it's not a new device, so it is either 'first' or 'second' which is returned. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], +linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], +linkman:nutscan_add_option_to_device[3] diff --git a/docs/man/nutscan_add_option_to_device.3 b/docs/man/nutscan_add_option_to_device.3 new file mode 100644 index 0000000..a1cb96c --- /dev/null +++ b/docs/man/nutscan_add_option_to_device.3 @@ -0,0 +1,65 @@ +'\" t +.\" Title: nutscan_add_option_to_device +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_ADD_OPTION_T" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_add_option_to_device \- Add option data to the specified device\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +void nutscan_add_option_to_device(nutscan_device_t * device,char * option_name, char * value); +.fi +.SH "DESCRIPTION" +.sp +The nutscan_device_t contains the following variables: +.sp +.if n \{\ +.RS 4 +.\} +.nf +nutscan_device_type_t type; +char * driver; +char * port; +nutscan_options_t opt; +struct nutscan_device * prev; +struct nutscan_device * next; +.fi +.if n \{\ +.RE +.\} +.sp +This is a double linked list of device\&. Each device is described by its type, its driver name, its port and any number of optional data\&. +.sp +The \fBnutscan_add_option_to_device()\fR adds an optional data in the given devcie\&. Optional data are made of an \fIoption_name\fR and an associated \fIvalue\fR\&. Copies of \fIoption_name\fR and \fIvalue\fR are stored in the device, so the caller can safely free both of them\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_device_to_device\fR(3) diff --git a/docs/man/nutscan_add_option_to_device.txt b/docs/man/nutscan_add_option_to_device.txt new file mode 100644 index 0000000..636f056 --- /dev/null +++ b/docs/man/nutscan_add_option_to_device.txt @@ -0,0 +1,40 @@ +NUTSCAN_ADD_OPTION_TO_DEVICE(3) +=============================== + +NAME +---- + +nutscan_add_option_to_device - Add option data to the specified device. + +SYNOPSIS +-------- + + #include + + void nutscan_add_option_to_device(nutscan_device_t * device,char * option_name, char * value); + + +DESCRIPTION +----------- + +The `nutscan_device_t` contains the following variables: + + nutscan_device_type_t type; + char * driver; + char * port; + nutscan_options_t opt; + struct nutscan_device * prev; + struct nutscan_device * next; + +This is a double linked list of device. Each device is described by its `type`, its `driver` name, its `port` and any number of optional data. + +The *nutscan_add_option_to_device()* adds an optional data in the given devcie. Optional data are made of an 'option_name' and an associated 'value'. Copies of 'option_name' and 'value' are stored in the device, so the caller can safely free both of them. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], +linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], +linkman:nutscan_add_device_to_device[3] diff --git a/docs/man/nutscan_cidr_to_ip.3 b/docs/man/nutscan_cidr_to_ip.3 new file mode 100644 index 0000000..a9fbdda --- /dev/null +++ b/docs/man/nutscan_cidr_to_ip.3 @@ -0,0 +1,49 @@ +'\" t +.\" Title: nutscan_cidr_to_ip +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_CIDR_TO_IP" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_cidr_to_ip \- Convert a CIDR IP to a range of IP address\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_cidr_to_ip()\fR function converts a range of IP address in the CIDR format given as a string in \fIcidr\fR, to two IPs in strings pointed by \fIstart_ip\fR and \fIstop_ip\fR which can be used as input paramters in the scanning functions of the libnutscan API\&. It is the caller\(cqs responsability to free \fIstart_ip\fR and \fIstop_ip\fR strings\&. +.SH "RETURN VALUE" +.sp +The \fBnutscan_cidr_to_ip()\fR function returns 0 if an error occured (invalid \fIcidr\fR address) or 1 if successful\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_display_ups_conf\fR(3) diff --git a/docs/man/nutscan_cidr_to_ip.txt b/docs/man/nutscan_cidr_to_ip.txt new file mode 100644 index 0000000..6ebe237 --- /dev/null +++ b/docs/man/nutscan_cidr_to_ip.txt @@ -0,0 +1,31 @@ +NUTSCAN_CIDR_TO_IP(3) +===================== + +NAME +---- + +nutscan_cidr_to_ip - Convert a CIDR IP to a range of IP address. + +SYNOPSIS +-------- + + #include + + int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip); + +DESCRIPTION +----------- + +The *nutscan_cidr_to_ip()* function converts a range of IP address in the CIDR format given as a string in 'cidr', to two IPs in strings pointed by 'start_ip' and 'stop_ip' which can be used as input paramters in the scanning functions of the libnutscan API. It is the caller's responsability to free 'start_ip' and 'stop_ip' strings. + +RETURN VALUE +------------ + +The *nutscan_cidr_to_ip()* function returns 0 if an error occured (invalid 'cidr' address) or 1 if successful. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_display_ups_conf[3] diff --git a/docs/man/nutscan_display_parsable.3 b/docs/man/nutscan_display_parsable.3 new file mode 100644 index 0000000..77222d1 --- /dev/null +++ b/docs/man/nutscan_display_parsable.3 @@ -0,0 +1,50 @@ +'\" t +.\" Title: nutscan_display_parsable +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_DISPLAY_PARS" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_display_parsable \- Display the specified `nutscan_device_t` structure on stdout\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +void nutscan_display_parsable(nutscan_device_t * device); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_display_parsable()\fR function displays all NUT devices in \fIdevice\fR to stdout\&. It displays them in a way that can be easily parsed which is: +.sp +:driver="",port=""[,="",="",\&...] +.sp + may be one of USB, SNMP, XML, NUT, IPMI or AVAHI\&. is the name of the driver\(cqs binary corresponding to this device\&. and depend on , see the corresponding driver\(cqs man page\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_display_parsable.txt b/docs/man/nutscan_display_parsable.txt new file mode 100644 index 0000000..7379d65 --- /dev/null +++ b/docs/man/nutscan_display_parsable.txt @@ -0,0 +1,34 @@ +NUTSCAN_DISPLAY_PARSABLE(3) +=========================== + +NAME +---- + +nutscan_display_parsable - Display the specified `nutscan_device_t` structure on stdout. + +SYNOPSIS +-------- + + #include + + void nutscan_display_parsable(nutscan_device_t * device); + +DESCRIPTION +----------- + +The *nutscan_display_parsable()* function displays all NUT devices in 'device' to stdout. It displays them in a way that can be easily parsed which is: + +:driver="",port=""[,="",="",...] + + may be one of USB, SNMP, XML, NUT, IPMI or AVAHI. + is the name of the driver's binary corresponding to this device. + and depend on , see the corresponding driver's man page. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_display_ups_conf[3], linkman:nutscan_new_device[3], +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] diff --git a/docs/man/nutscan_display_ups_conf.3 b/docs/man/nutscan_display_ups_conf.3 new file mode 100644 index 0000000..0bff07b --- /dev/null +++ b/docs/man/nutscan_display_ups_conf.3 @@ -0,0 +1,46 @@ +'\" t +.\" Title: nutscan_display_ups_conf +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_DISPLAY_UPS_" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_display_ups_conf \- Display the specified `nutscan_device_t` structure on stdout\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +void nutscan_display_ups_conf(nutscan_device_t * device); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_display_ups_conf()\fR function displays all NUT devices in \fIdevice\fR to stdout\&. It displays them in a way that it can be directly copied into the ups\&.conf file\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_display_ups_conf.txt b/docs/man/nutscan_display_ups_conf.txt new file mode 100644 index 0000000..8d95e07 --- /dev/null +++ b/docs/man/nutscan_display_ups_conf.txt @@ -0,0 +1,28 @@ +NUTSCAN_DISPLAY_UPS_CONF(3) +=========================== + +NAME +---- + +nutscan_display_ups_conf - Display the specified `nutscan_device_t` structure on stdout. + +SYNOPSIS +-------- + + #include + + void nutscan_display_ups_conf(nutscan_device_t * device); + +DESCRIPTION +----------- + +The *nutscan_display_ups_conf()* function displays all NUT devices in 'device' to stdout. It displays them in a way that it can be directly copied into the ups.conf file. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] diff --git a/docs/man/nutscan_free_device.3 b/docs/man/nutscan_free_device.3 new file mode 100644 index 0000000..07347d1 --- /dev/null +++ b/docs/man/nutscan_free_device.3 @@ -0,0 +1,46 @@ +'\" t +.\" Title: nutscan_free_device +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_FREE_DEVICE" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_free_device \- Free a nutscan_device_t structure created by nutscan_new_device\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +void nutscan_free_device(nutscan_device_t * device); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_free_device()\fR function free a nutscan_device_type_t structure\&. Doing so, it free the whole linked list, not only the given device\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3) diff --git a/docs/man/nutscan_free_device.txt b/docs/man/nutscan_free_device.txt new file mode 100644 index 0000000..062bb4b --- /dev/null +++ b/docs/man/nutscan_free_device.txt @@ -0,0 +1,28 @@ +NUTSCAN_FREE_DEVICE(3) +====================== + +NAME +---- + +nutscan_free_device - Free a nutscan_device_t structure created by nutscan_new_device. + +SYNOPSIS +-------- + + #include + + void nutscan_free_device(nutscan_device_t * device); + +DESCRIPTION +----------- + +The *nutscan_free_device()* function free a `nutscan_device_type_t` structure. Doing so, it free the whole linked list, not only the given device. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], +linkman:nutscan_new_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3] diff --git a/docs/man/nutscan_new_device.3 b/docs/man/nutscan_new_device.3 new file mode 100644 index 0000000..7677b57 --- /dev/null +++ b/docs/man/nutscan_new_device.3 @@ -0,0 +1,49 @@ +'\" t +.\" Title: nutscan_new_device +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_NEW_DEVICE" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_new_device \- Create a new nutscan_device_t structure\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +nutscan_device_t * nutscan_new_device(); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_new_device()\fR function allocates a new nutscan_device_type_t structure\&. +.SH "RETURN VALUE" +.sp +The \fBnutscan_new_device()\fR function returns the newly allocated nutscan_device_type_t structure +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3) \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3) \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3) \fBnutscan_add_device_to_device\fR(3) diff --git a/docs/man/nutscan_new_device.txt b/docs/man/nutscan_new_device.txt new file mode 100644 index 0000000..1b887cc --- /dev/null +++ b/docs/man/nutscan_new_device.txt @@ -0,0 +1,33 @@ +NUTSCAN_NEW_DEVICE(3) +====================== + +NAME +---- + +nutscan_new_device - Create a new nutscan_device_t structure. + +SYNOPSIS +-------- + + #include + + nutscan_device_t * nutscan_new_device(); + +DESCRIPTION +----------- + +The *nutscan_new_device()* function allocates a new `nutscan_device_type_t` structure. + +RETURN VALUE +------------ + +The *nutscan_new_device()* function returns the newly allocated `nutscan_device_type_t` structure + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3] +linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3] +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3] +linkman:nutscan_add_device_to_device[3] diff --git a/docs/man/nutscan_scan_avahi.3 b/docs/man/nutscan_scan_avahi.3 new file mode 100644 index 0000000..30be1e2 --- /dev/null +++ b/docs/man/nutscan_scan_avahi.3 @@ -0,0 +1,51 @@ +'\" t +.\" Title: nutscan_scan_avahi +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_SCAN_AVAHI" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_scan_avahi \- Scan network for NUT services via AVAHI\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +nutscan_device_t * nutscan_scan_avahi(long usec_timeout); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_scan_avahi()\fR function try to detect NUT service and its associated devcies\&. It uses the AVAHI library to do so\&. +.sp +This function waits up to \fIusec_timeout\fR microseconds before considering an IP address does not respond\&. +.SH "RETURN VALUE" +.sp +The \fBnutscan_scan_avahi()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_scan_avahi.txt b/docs/man/nutscan_scan_avahi.txt new file mode 100644 index 0000000..77141e3 --- /dev/null +++ b/docs/man/nutscan_scan_avahi.txt @@ -0,0 +1,35 @@ +NUTSCAN_SCAN_AVAHI(3) +===================== + +NAME +---- + +nutscan_scan_avahi - Scan network for NUT services via AVAHI. + +SYNOPSIS +-------- + + #include + + nutscan_device_t * nutscan_scan_avahi(long usec_timeout); + +DESCRIPTION +----------- + +The *nutscan_scan_avahi()* function try to detect NUT service and its associated devcies. It uses the AVAHI library to do so. + +This function waits up to 'usec_timeout' microseconds before considering an IP address does not respond. + +RETURN VALUE +------------ + +The *nutscan_scan_avahi()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] diff --git a/docs/man/nutscan_scan_ipmi.3 b/docs/man/nutscan_scan_ipmi.3 new file mode 100644 index 0000000..9776d80 --- /dev/null +++ b/docs/man/nutscan_scan_ipmi.3 @@ -0,0 +1,49 @@ +'\" t +.\" Title: nutscan_scan_ipmi +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_SCAN_IPMI" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_scan_ipmi \- Scan local IPMI devices\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +nutscan_device_t * nutscan_scan_ipmi(void); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_scan_ipmi()\fR function is not implemented yet\&. +.SH "RETURN VALUE" +.sp +The \fBnutscan_scan_ipmi()\fR function is not implemented yet\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_scan_ipmi.txt b/docs/man/nutscan_scan_ipmi.txt new file mode 100644 index 0000000..32e9e7f --- /dev/null +++ b/docs/man/nutscan_scan_ipmi.txt @@ -0,0 +1,33 @@ +NUTSCAN_SCAN_IPMI(3) +==================== + +NAME +---- + +nutscan_scan_ipmi - Scan local IPMI devices. + +SYNOPSIS +-------- + + #include + + nutscan_device_t * nutscan_scan_ipmi(void); + +DESCRIPTION +----------- + +The *nutscan_scan_ipmi()* function is not implemented yet. + +RETURN VALUE +------------ + +The *nutscan_scan_ipmi()* function is not implemented yet. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_snmp[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] diff --git a/docs/man/nutscan_scan_nut.3 b/docs/man/nutscan_scan_nut.3 new file mode 100644 index 0000000..62d7475 --- /dev/null +++ b/docs/man/nutscan_scan_nut.3 @@ -0,0 +1,53 @@ +'\" t +.\" Title: nutscan_scan_nut +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_SCAN_NUT" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_scan_nut \- Scan network for available NUT services\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +nutscan_device_t * nutscan_scan_nut(const char * startIP, const char * stopIP, const char * port, long usec_timeout); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_scan_nut()\fR function try to detect available NUT services and their associated devices\&. It issues a NUT request on every IP ranging from \fIstartIP\fR to \fIstopIP\fR\&. \fIstartIP\fR is mandatory, \fIstopIP\fR is optional\&. Those IP may be either IPv4 or IPv6 addresses or host names\&. +.sp +A specific \fIport\fR number may be passed, or NULL to use the default NUT port\&. +.sp +This function waits up to \fIusec_timeout\fR microseconds before considering an IP address does not respond to NUT queries\&. +.SH "RETURN VALUE" +.sp +The \fBnutscan_scan_nut()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_scan_nut.txt b/docs/man/nutscan_scan_nut.txt new file mode 100644 index 0000000..7f1941a --- /dev/null +++ b/docs/man/nutscan_scan_nut.txt @@ -0,0 +1,37 @@ +NUTSCAN_SCAN_NUT(3) +=================== + +NAME +---- + +nutscan_scan_nut - Scan network for available NUT services. + +SYNOPSIS +-------- + + #include + + nutscan_device_t * nutscan_scan_nut(const char * startIP, const char * stopIP, const char * port, long usec_timeout); + +DESCRIPTION +----------- + +The *nutscan_scan_nut()* function try to detect available NUT services and their associated devices. It issues a NUT request on every IP ranging from 'startIP' to 'stopIP'. 'startIP' is mandatory, 'stopIP' is optional. Those IP may be either IPv4 or IPv6 addresses or host names. + +A specific 'port' number may be passed, or NULL to use the default NUT port. + +This function waits up to 'usec_timeout' microseconds before considering an IP address does not respond to NUT queries. + +RETURN VALUE +------------ + +The *nutscan_scan_nut()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] diff --git a/docs/man/nutscan_scan_snmp.3 b/docs/man/nutscan_scan_snmp.3 new file mode 100644 index 0000000..c4df10b --- /dev/null +++ b/docs/man/nutscan_scan_snmp.3 @@ -0,0 +1,87 @@ +'\" t +.\" Title: nutscan_scan_snmp +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_SCAN_SNMP" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_scan_snmp \- Scan network for SNMP devices\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +nutscan_device_t * nutscan_scan_snmp(const char * start_ip,const char * stop_ip,long timeout, nutscan_snmp_t * sec); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_scan_snmp()\fR function try to detect NUT compatible SNMP devices\&. It tries SNMP queries on every IP ranging from \fIstart_ip\fR to \fIstop_ip\fR\&. Those IP may be either IPv4 or IPv6 addresses or host names\&. +.sp +This function waits up to \fItimeout\fR microseconds before considering an IP address does not respond to SNMP queries\&. +.sp +A valid nutscan_snmp_t structure must be passed to this function\&. +.sp +The nutscan_snmp_t structure contains the following members which must be filled as described below: +.sp +.if n \{\ +.RS 4 +.\} +.nf +char * \*(Aqcommunity\*(Aq; +char * \*(AqsecLevel\*(Aq; +char * \*(AqsecName\*(Aq; +char * \*(AqauthPassword\*(Aq; +char * \*(AqprivPassword\*(Aq; +char * \*(AqauthProtocol\*(Aq; +char * \*(AqprivProtocol\*(Aq; +.fi +.if n \{\ +.RE +.\} +.sp +If \fIcommunity\fR is not NULL, SNMP v1 request are sent using this \fIcommunity\fR\&. +.sp +If \fIcommunity\fR is NULL and \fIsecLevel\fR is NULL, SNMP v1 is selected and \fIcommunity\fR is set to "public"\&. +.sp +In the other cases, SNMP v3 is used\&. \fIsecLevel\fR may be one of SNMP_SEC_LEVEL_NOAUTH, SNMP_SEC_LEVEL_AUTHNOPRIV or SNMP_SEC_LEVEL_AUTHPRIV\&. \fIsecName\fR is the security name and must be non NULL\&. +.sp +If \fIsecLevel\fR is set to SNMP_SEC_LEVEL_AUTHNOPRIV, \fIauthPassword\fR must be non NULL\&. +.sp +If \fIsecLevel\fR is set to SNMP_SEC_LEVEL_AUTHPRIV, \fIauthPassword\fR and \fIprivPassword\fR must be non NULL\&. +.sp +If \fIauthProtocol\fR is NULL, MD5 protocol is used\&. Else you can set \fIauthProtocol\fR to either "MD5" or "SHA"\&. +.sp +If \fIprivProtocol\fR is NULL, DES protocol is used\&. Else you can set \fIprivProtocol\fR to either "AES" or "DES"\&. +.sp +\fIpeername\fR and \fIhandle\fR are used internally and do not need any initialization\&. +.SH "RETURN VALUE" +.sp +The \fBnutscan_scan_snmp()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_scan_snmp.txt b/docs/man/nutscan_scan_snmp.txt new file mode 100644 index 0000000..1ddf714 --- /dev/null +++ b/docs/man/nutscan_scan_snmp.txt @@ -0,0 +1,63 @@ +NUTSCAN_SCAN_SNMP(3) +==================== + +NAME +---- + +nutscan_scan_snmp - Scan network for SNMP devices. + +SYNOPSIS +-------- + + #include + + nutscan_device_t * nutscan_scan_snmp(const char * start_ip,const char * stop_ip,long timeout, nutscan_snmp_t * sec); + +DESCRIPTION +----------- + +The *nutscan_scan_snmp()* function try to detect NUT compatible SNMP devices. It tries SNMP queries on every IP ranging from 'start_ip' to 'stop_ip'. Those IP may be either IPv4 or IPv6 addresses or host names. + +This function waits up to 'timeout' microseconds before considering an IP address does not respond to SNMP queries. + +A valid `nutscan_snmp_t` structure must be passed to this function. + +The `nutscan_snmp_t` structure contains the following members which must be filled as described below: + + char * 'community'; + char * 'secLevel'; + char * 'secName'; + char * 'authPassword'; + char * 'privPassword'; + char * 'authProtocol'; + char * 'privProtocol'; + +If 'community' is not NULL, SNMP v1 request are sent using this 'community'. + +If 'community' is NULL and 'secLevel' is NULL, SNMP v1 is selected and 'community' is set to "public". + +In the other cases, SNMP v3 is used. 'secLevel' may be one of `SNMP_SEC_LEVEL_NOAUTH`, `SNMP_SEC_LEVEL_AUTHNOPRIV` or `SNMP_SEC_LEVEL_AUTHPRIV`. 'secName' is the security name and must be non NULL. + +If 'secLevel' is set to `SNMP_SEC_LEVEL_AUTHNOPRIV`, 'authPassword' must be non NULL. + +If 'secLevel' is set to `SNMP_SEC_LEVEL_AUTHPRIV`, 'authPassword' and 'privPassword' must be non NULL. + +If 'authProtocol' is NULL, MD5 protocol is used. Else you can set 'authProtocol' to either "MD5" or "SHA". + +If 'privProtocol' is NULL, DES protocol is used. Else you can set 'privProtocol' to either "AES" or "DES". + +'peername' and 'handle' are used internally and do not need any initialization. + +RETURN VALUE +------------ + +The *nutscan_scan_snmp()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] diff --git a/docs/man/nutscan_scan_usb.3 b/docs/man/nutscan_scan_usb.3 new file mode 100644 index 0000000..e41af68 --- /dev/null +++ b/docs/man/nutscan_scan_usb.3 @@ -0,0 +1,49 @@ +'\" t +.\" Title: nutscan_scan_usb +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_SCAN_USB" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_scan_usb \- Scan NUT compatible USB devices\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +nutscan_device_t * nutscan_scan_usb(); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_scan_usb()\fR function try to detect NUT compatible USB devices\&. +.SH "RETURN VALUE" +.sp +The \fBnutscan_scan_usb()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3) diff --git a/docs/man/nutscan_scan_usb.txt b/docs/man/nutscan_scan_usb.txt new file mode 100644 index 0000000..36ee616 --- /dev/null +++ b/docs/man/nutscan_scan_usb.txt @@ -0,0 +1,33 @@ +NUTSCAN_SCAN_USB(3) +==================== + +NAME +---- + +nutscan_scan_usb - Scan NUT compatible USB devices. + +SYNOPSIS +-------- + + #include + + nutscan_device_t * nutscan_scan_usb(); + +DESCRIPTION +----------- + +The *nutscan_scan_usb()* function try to detect NUT compatible USB devices. + +RETURN VALUE +------------ + +The *nutscan_scan_usb()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. + +SEE ALSO +-------- +linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3] diff --git a/docs/man/nutscan_scan_xml_http.3 b/docs/man/nutscan_scan_xml_http.3 new file mode 100644 index 0000000..8fa4c99 --- /dev/null +++ b/docs/man/nutscan_scan_xml_http.3 @@ -0,0 +1,49 @@ +'\" t +.\" Title: nutscan_scan_xml_http +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 09/15/2011 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUTSCAN_SCAN_XML_HTT" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nutscan_scan_xml_http \- Scan network for XML/HTTP devices\&. +.SH "SYNOPSIS" +.sp +.nf +#include +.fi +.sp +.nf +nutscan_device_t * nutscan_scan_xml_http(long usec_timeout); +.fi +.SH "DESCRIPTION" +.sp +The \fBnutscan_scan_xml_http()\fR function try to detect NUT compatible XML/HTTP devices\&. It does this by issuing a broadcast message on currently configured network interfaces\&. It waits up to \fIusec_timeout\fR microseconds for a response from potential devices\&. +.SH "RETURN VALUE" +.sp +The \fBnutscan_scan_xml_http()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. +.SH "SEE ALSO" +.sp +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3) diff --git a/docs/man/nutscan_scan_xml_http.txt b/docs/man/nutscan_scan_xml_http.txt new file mode 100644 index 0000000..792e01f --- /dev/null +++ b/docs/man/nutscan_scan_xml_http.txt @@ -0,0 +1,33 @@ +NUTSCAN_SCAN_XML_HTTP(3) +======================== + +NAME +---- + +nutscan_scan_xml_http - Scan network for XML/HTTP devices. + +SYNOPSIS +-------- + + #include + + nutscan_device_t * nutscan_scan_xml_http(long usec_timeout); + +DESCRIPTION +----------- + +The *nutscan_scan_xml_http()* function try to detect NUT compatible XML/HTTP devices. It does this by issuing a broadcast message on currently configured network interfaces. It waits up to 'usec_timeout' microseconds for a response from potential devices. + +RETURN VALUE +------------ + +The *nutscan_scan_xml_http()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. + +SEE ALSO +-------- +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3] diff --git a/docs/man/nutupsdrv.8 b/docs/man/nutupsdrv.8 index 1ddc49e..3b6ec7d 100644 --- a/docs/man/nutupsdrv.8 +++ b/docs/man/nutupsdrv.8 @@ -2,12 +2,12 @@ .\" Title: nutupsdrv .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTUPSDRV" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTUPSDRV" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/oneac.8 b/docs/man/oneac.8 index 1ff049f..40454ec 100644 --- a/docs/man/oneac.8 +++ b/docs/man/oneac.8 @@ -2,12 +2,12 @@ .\" Title: oneac .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "ONEAC" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "ONEAC" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/optiups.8 b/docs/man/optiups.8 index eda8030..d69ba6f 100644 --- a/docs/man/optiups.8 +++ b/docs/man/optiups.8 @@ -2,12 +2,12 @@ .\" Title: optiups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "OPTIUPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "OPTIUPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powercom.8 b/docs/man/powercom.8 index 7f48c2f..2c1268c 100644 --- a/docs/man/powercom.8 +++ b/docs/man/powercom.8 @@ -2,12 +2,12 @@ .\" Title: powercom .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "POWERCOM" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "POWERCOM" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powerman-pdu.8 b/docs/man/powerman-pdu.8 index 06cb22b..49b8cce 100644 --- a/docs/man/powerman-pdu.8 +++ b/docs/man/powerman-pdu.8 @@ -2,12 +2,12 @@ .\" Title: powerman-pdu .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "POWERMAN\-PDU" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "POWERMAN\-PDU" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powerpanel.8 b/docs/man/powerpanel.8 index 0352956..1f4a216 100644 --- a/docs/man/powerpanel.8 +++ b/docs/man/powerpanel.8 @@ -2,12 +2,12 @@ .\" Title: powerpanel .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "POWERPANEL" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "POWERPANEL" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/rhino.8 b/docs/man/rhino.8 index f14f3d4..e51f0c5 100644 --- a/docs/man/rhino.8 +++ b/docs/man/rhino.8 @@ -2,12 +2,12 @@ .\" Title: rhino .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "RHINO" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "RHINO" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/richcomm_usb.8 b/docs/man/richcomm_usb.8 index 084731c..4a8ffaf 100644 --- a/docs/man/richcomm_usb.8 +++ b/docs/man/richcomm_usb.8 @@ -2,12 +2,12 @@ .\" Title: richcomm_usb .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "RICHCOMM_USB" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "RICHCOMM_USB" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/safenet.8 b/docs/man/safenet.8 index 8568660..bcb29b7 100644 --- a/docs/man/safenet.8 +++ b/docs/man/safenet.8 @@ -2,12 +2,12 @@ .\" Title: safenet .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "SAFENET" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "SAFENET" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/snmp-ups.8 b/docs/man/snmp-ups.8 index 440087d..e05f3e2 100644 --- a/docs/man/snmp-ups.8 +++ b/docs/man/snmp-ups.8 @@ -2,12 +2,12 @@ .\" Title: snmp-ups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "SNMP\-UPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "SNMP\-UPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/solis.8 b/docs/man/solis.8 index 93c54b9..2a6be0a 100644 --- a/docs/man/solis.8 +++ b/docs/man/solis.8 @@ -2,12 +2,12 @@ .\" Title: solis .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "SOLIS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "SOLIS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplite.8 b/docs/man/tripplite.8 index a0c59d9..b7ce915 100644 --- a/docs/man/tripplite.8 +++ b/docs/man/tripplite.8 @@ -2,12 +2,12 @@ .\" Title: tripplite .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "TRIPPLITE" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "TRIPPLITE" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplite_usb.8 b/docs/man/tripplite_usb.8 index 783b67c..cc18074 100644 --- a/docs/man/tripplite_usb.8 +++ b/docs/man/tripplite_usb.8 @@ -2,12 +2,12 @@ .\" Title: tripplite_usb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "TRIPPLITE_USB" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "TRIPPLITE_USB" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplitesu.8 b/docs/man/tripplitesu.8 index bf65a94..6e58be0 100644 --- a/docs/man/tripplitesu.8 +++ b/docs/man/tripplitesu.8 @@ -2,12 +2,12 @@ .\" Title: tripplitesu .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "TRIPPLITESU" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "TRIPPLITESU" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ups.conf.5 b/docs/man/ups.conf.5 index 0a35a09..cf33682 100644 --- a/docs/man/ups.conf.5 +++ b/docs/man/ups.conf.5 @@ -2,12 +2,12 @@ .\" Title: ups.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPS\&.CONF" "5" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPS\&.CONF" "5" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsc.8 b/docs/man/upsc.8 index e6dc870..5ce07c6 100644 --- a/docs/man/upsc.8 +++ b/docs/man/upsc.8 @@ -2,12 +2,12 @@ .\" Title: upsc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSC" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSC" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_connect.3 b/docs/man/upscli_connect.3 index 0ab6637..82d900f 100644 --- a/docs/man/upscli_connect.3 +++ b/docs/man/upscli_connect.3 @@ -2,12 +2,12 @@ .\" Title: upscli_connect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_CONNECT" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_CONNECT" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_disconnect.3 b/docs/man/upscli_disconnect.3 index f8a5a4a..0a8bbd1 100644 --- a/docs/man/upscli_disconnect.3 +++ b/docs/man/upscli_disconnect.3 @@ -2,12 +2,12 @@ .\" Title: upscli_disconnect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_DISCONNECT" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_DISCONNECT" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_fd.3 b/docs/man/upscli_fd.3 index 96d807b..cfebf69 100644 --- a/docs/man/upscli_fd.3 +++ b/docs/man/upscli_fd.3 @@ -2,12 +2,12 @@ .\" Title: upscli_fd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_FD" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_FD" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_get.3 b/docs/man/upscli_get.3 index 3f6a545..8f046cc 100644 --- a/docs/man/upscli_get.3 +++ b/docs/man/upscli_get.3 @@ -2,12 +2,12 @@ .\" Title: upscli_get .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_GET" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_GET" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_list_next.3 b/docs/man/upscli_list_next.3 index 783d393..1091d3c 100644 --- a/docs/man/upscli_list_next.3 +++ b/docs/man/upscli_list_next.3 @@ -2,12 +2,12 @@ .\" Title: upscli_list_next .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_LIST_NEXT" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_LIST_NEXT" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_list_start.3 b/docs/man/upscli_list_start.3 index 941e868..626ae30 100644 --- a/docs/man/upscli_list_start.3 +++ b/docs/man/upscli_list_start.3 @@ -2,12 +2,12 @@ .\" Title: upscli_list_start .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_LIST_START" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_LIST_START" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_readline.3 b/docs/man/upscli_readline.3 index 8f2a741..16842e5 100644 --- a/docs/man/upscli_readline.3 +++ b/docs/man/upscli_readline.3 @@ -2,12 +2,12 @@ .\" Title: upscli_readline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_READLINE" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_READLINE" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_sendline.3 b/docs/man/upscli_sendline.3 index 13efe30..1a45cde 100644 --- a/docs/man/upscli_sendline.3 +++ b/docs/man/upscli_sendline.3 @@ -2,12 +2,12 @@ .\" Title: upscli_sendline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SENDLINE" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SENDLINE" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitaddr.3 b/docs/man/upscli_splitaddr.3 index cd38178..afbcaf4 100644 --- a/docs/man/upscli_splitaddr.3 +++ b/docs/man/upscli_splitaddr.3 @@ -2,12 +2,12 @@ .\" Title: upscli_splitaddr .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SPLITADDR" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SPLITADDR" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitname.3 b/docs/man/upscli_splitname.3 index 5180536..5cfdb4e 100644 --- a/docs/man/upscli_splitname.3 +++ b/docs/man/upscli_splitname.3 @@ -2,12 +2,12 @@ .\" Title: upscli_splitname .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SPLITNAME" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SPLITNAME" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_ssl.3 b/docs/man/upscli_ssl.3 index 2256b60..b93159b 100644 --- a/docs/man/upscli_ssl.3 +++ b/docs/man/upscli_ssl.3 @@ -2,12 +2,12 @@ .\" Title: upscli_ssl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SSL" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SSL" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_strerror.3 b/docs/man/upscli_strerror.3 index ffc4d1f..49408f4 100644 --- a/docs/man/upscli_strerror.3 +++ b/docs/man/upscli_strerror.3 @@ -2,12 +2,12 @@ .\" Title: upscli_strerror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_STRERROR" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_STRERROR" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_upserror.3 b/docs/man/upscli_upserror.3 index cd96ba4..9d284ab 100644 --- a/docs/man/upscli_upserror.3 +++ b/docs/man/upscli_upserror.3 @@ -2,12 +2,12 @@ .\" Title: upscli_upserror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_UPSERROR" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_UPSERROR" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsclient.3 b/docs/man/upsclient.3 index ece6715..0e09cee 100644 --- a/docs/man/upsclient.3 +++ b/docs/man/upsclient.3 @@ -2,12 +2,12 @@ .\" Title: upsclient .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLIENT" "3" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLIENT" "3" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscmd.8 b/docs/man/upscmd.8 index b26db9f..2523231 100644 --- a/docs/man/upscmd.8 +++ b/docs/man/upscmd.8 @@ -2,12 +2,12 @@ .\" Title: upscmd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCMD" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCMD" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscode2.8 b/docs/man/upscode2.8 index b2edf82..50e8fd1 100644 --- a/docs/man/upscode2.8 +++ b/docs/man/upscode2.8 @@ -2,12 +2,12 @@ .\" Title: upscode2 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCODE2" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCODE2" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.8 b/docs/man/upsd.8 index 6be6ba0..5e93141 100644 --- a/docs/man/upsd.8 +++ b/docs/man/upsd.8 @@ -2,12 +2,12 @@ .\" Title: upsd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSD" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSD" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.conf.5 b/docs/man/upsd.conf.5 index 9bd303f..d1ce79f 100644 --- a/docs/man/upsd.conf.5 +++ b/docs/man/upsd.conf.5 @@ -2,12 +2,12 @@ .\" Title: upsd.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSD\&.CONF" "5" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSD\&.CONF" "5" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.users.5 b/docs/man/upsd.users.5 index 11e41ee..008776e 100644 --- a/docs/man/upsd.users.5 +++ b/docs/man/upsd.users.5 @@ -2,12 +2,12 @@ .\" Title: upsd.users .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSD\&.USERS" "5" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSD\&.USERS" "5" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsdrvctl.8 b/docs/man/upsdrvctl.8 index 8223a68..35ced3a 100644 --- a/docs/man/upsdrvctl.8 +++ b/docs/man/upsdrvctl.8 @@ -2,12 +2,12 @@ .\" Title: upsdrvctl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSDRVCTL" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSDRVCTL" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsimage.cgi.8 b/docs/man/upsimage.cgi.8 index 1b42870..6165ca2 100644 --- a/docs/man/upsimage.cgi.8 +++ b/docs/man/upsimage.cgi.8 @@ -2,12 +2,12 @@ .\" Title: upsimage.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSIMAGE\&.CGI" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSIMAGE\&.CGI" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upslog.8 b/docs/man/upslog.8 index 869f16a..2e5df76 100644 --- a/docs/man/upslog.8 +++ b/docs/man/upslog.8 @@ -2,12 +2,12 @@ .\" Title: upslog .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSLOG" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSLOG" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsmon.8 b/docs/man/upsmon.8 index d508ccb..5322a56 100644 --- a/docs/man/upsmon.8 +++ b/docs/man/upsmon.8 @@ -2,12 +2,12 @@ .\" Title: upsmon .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSMON" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSMON" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsmon.conf.5 b/docs/man/upsmon.conf.5 index 3f70b14..558df48 100644 --- a/docs/man/upsmon.conf.5 +++ b/docs/man/upsmon.conf.5 @@ -2,12 +2,12 @@ .\" Title: upsmon.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSMON\&.CONF" "5" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSMON\&.CONF" "5" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsrw.8 b/docs/man/upsrw.8 index 85a37bb..2634aeb 100644 --- a/docs/man/upsrw.8 +++ b/docs/man/upsrw.8 @@ -2,12 +2,12 @@ .\" Title: upsrw .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSRW" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSRW" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.8 b/docs/man/upssched.8 index 069855c..6b2b056 100644 --- a/docs/man/upssched.8 +++ b/docs/man/upssched.8 @@ -2,12 +2,12 @@ .\" Title: upssched .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSCHED" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSCHED" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.conf.5 b/docs/man/upssched.conf.5 index 7953be4..58e4e91 100644 --- a/docs/man/upssched.conf.5 +++ b/docs/man/upssched.conf.5 @@ -2,12 +2,12 @@ .\" Title: upssched.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSCHED\&.CONF" "5" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSCHED\&.CONF" "5" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.cgi.8 b/docs/man/upsset.cgi.8 index f2f7230..b1f4249 100644 --- a/docs/man/upsset.cgi.8 +++ b/docs/man/upsset.cgi.8 @@ -2,12 +2,12 @@ .\" Title: upsset.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSET\&.CGI" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSET\&.CGI" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.conf.5 b/docs/man/upsset.conf.5 index 385f0e8..2a496f3 100644 --- a/docs/man/upsset.conf.5 +++ b/docs/man/upsset.conf.5 @@ -2,12 +2,12 @@ .\" Title: upsset.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSET\&.CONF" "5" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSET\&.CONF" "5" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.8 index e51e116..0214efc 100644 --- a/docs/man/upsstats.cgi.8 +++ b/docs/man/upsstats.cgi.8 @@ -2,12 +2,12 @@ .\" Title: upsstats.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSTATS\&.CGI" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSTATS\&.CGI" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.html.5 b/docs/man/upsstats.html.5 index 6159d5b..a60dc38 100644 --- a/docs/man/upsstats.html.5 +++ b/docs/man/upsstats.html.5 @@ -2,12 +2,12 @@ .\" Title: upsstats.html .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSTATS\&.HTML" "5" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSTATS\&.HTML" "5" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/usbhid-ups.8 b/docs/man/usbhid-ups.8 index 551ba96..4735057 100644 --- a/docs/man/usbhid-ups.8 +++ b/docs/man/usbhid-ups.8 @@ -2,12 +2,12 @@ .\" Title: usbhid-ups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "USBHID\-UPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "USBHID\-UPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/victronups.8 b/docs/man/victronups.8 index d635204..0982885 100644 --- a/docs/man/victronups.8 +++ b/docs/man/victronups.8 @@ -2,12 +2,12 @@ .\" Title: victronups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2011 +.\" Date: 09/15/2011 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "VICTRONUPS" "8" "05/31/2011" "Network UPS Tools" "NUT Manual" +.TH "VICTRONUPS" "8" "09/15/2011" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/new-clients.txt b/docs/new-clients.txt index da2e3ac..5a10e5c 100644 --- a/docs/new-clients.txt +++ b/docs/new-clients.txt @@ -123,3 +123,13 @@ multiple UPS units). print $other_ups{MFR}, " ", $other_ups{MODEL}, "\n"; +Java +---- + +This chapter presents the new Java support for NUT, called jNut. + +include::../scripts/java/README[] + +include::../scripts/java/jNut/README[] + +include::../scripts/java/jNutList/README[] diff --git a/docs/nut-names.txt b/docs/nut-names.txt index f99c13d..147e78c 100644 --- a/docs/nut-names.txt +++ b/docs/nut-names.txt @@ -320,7 +320,7 @@ battery: Any battery details | battery.packs | Number of battery packs | 001 | battery.packs.bad | Number of bad battery packs | 000 | battery.type | Battery chemistry (opaque - (opaque string) | PbAc + string) | PbAc | battery.protection | Prevent deep discharge of battery | yes | battery.energysave | Switch off when running on diff --git a/docs/stable-hcl.txt b/docs/stable-hcl.txt index b522d89..0599d3c 100644 --- a/docs/stable-hcl.txt +++ b/docs/stable-hcl.txt @@ -126,15 +126,17 @@ that we have missed listing some that are supported, or made an error. So that this list can be as accurate as possible, please report any omissions to the -link:http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser[NUT Users] -mailing list, with *[HCL]* in the subject and including the following -information: +link:http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev[NUT Developers] +mailing list, including the following information: -- Device manufacturer and name, -- upsc output (upsrw and upscmd outputs are also welcome), -- link:docs/user-manual.chunked/ar01s06.html#Shutdown_design[shutdown sequence] +- mail subject: [HCL] supported by +replacing Manufacturer, Device and driver by your specific values, +- mail body: + - Device manufacturer and name, + - upsc output (upsrw and upscmd outputs are also welcome), + - link:docs/user-manual.chunked/ar01s06.html#Shutdown_design[shutdown sequence] testing results, -- a link to an online description is also appreciated. + - a link to an online description is also appreciated. *Pointing the present HCL* @@ -153,9 +155,9 @@ The form of the URL is the following: |========================================================================== | | | support-level | a number from '1' to '5' -.3+^.^| device-type | 'ups' for uninterruptible power supply - | 'pdu' for power distribution unit - | 'scd' for solar controller device +.3+^.^| device-type | - 'ups' for uninterruptible power supply + | - 'pdu' for power distribution unit + | - 'scd' for solar controller device | manufacturer | a manufacturer name from the selection list | model | a model name from the selection list .3+^.^| connection | 'USB' diff --git a/docs/website/Makefile.in b/docs/website/Makefile.in index d6ed1f3..b0c7efa 100644 --- a/docs/website/Makefile.in +++ b/docs/website/Makefile.in @@ -43,6 +43,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -109,10 +111,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -150,6 +156,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -214,6 +224,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/docs/website/news.txt b/docs/website/news.txt index 46cbc6a..05ae5fc 100644 --- a/docs/website/news.txt +++ b/docs/website/news.txt @@ -1,3 +1,7 @@ +- September 15, 2011: 2.6.2 released +- September 2, 2011: link:download.html#_java_packages[jNUT (NUT Java support) 0.1-SNAPSHOT released] +- July 4, 2011: link:download.html#_binary_packages[Beta NUT 2.6.1-1 package for Windows released] +- June 8, 2011: link:http://www.dell.com/us/business/p/powervault-nx3500/pd[Dell PowerVault NX3500] use NUT for power protection - June 1, 2011: 2.6.1 released - May 19, 2011: link:download.html#_binary_packages[Beta NUT 2.6.0-1 package for Windows released] - January 14, 2011: 2.6.0 released @@ -8,4 +12,4 @@ - May 12, 2010: link:http://www.lestat.st/informatique/projets/nut-monitor-en[NUT-Monitor] 1.2 released - March 22, 2010: link:http://knut.prynych.cz[KNutClient] 1.0 - February 23, 2010: 2.4.3 released -- February 19, 2010: 2.4.2 released +- February 19, 2010: 2.4.2 released diff --git a/docs/website/projects.txt b/docs/website/projects.txt index afba115..53faad5 100644 --- a/docs/website/projects.txt +++ b/docs/website/projects.txt @@ -11,7 +11,8 @@ Graphical desktop clients link:http://sourceforge.net/projects/gknut/[GKrellM NUT] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Simple UPS monitoring plugin for GKrellM. Uses NUT (Network UPS Tools) for UPS connection. +Simple UPS monitoring plugin for GKrellM. Uses NUT (Network UPS Tools) for UPS +connection. link:http://knut.prynych.cz[KNutClient] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -22,7 +23,8 @@ link:http://www.lestat.st/en/informatique/projets/nut-monitor[NUT-Monitor] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NUT-Monitor is a graphical application to monitor and manage UPSes connected to -a NUT server. This application is written in Python and PyGTK, and uses the <> class. +a NUT server. This application is written in Python and PyGTK, and uses the +<> class. NOTE: NUT-Monitor is part of NUT since version NUT 2.4.1. It will further evolve toward the NUT Control Center. @@ -30,7 +32,8 @@ It will further evolve toward the NUT Control Center. link:http://download.mgeops.com/explore/eng/ptp/ptp_sol.htm?sol=PSP[Eaton - Personal Solution Pac] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -NUT configuration and monitoring software for Eaton (previously MGE Office Protection Systems) units. +NUT configuration and monitoring software for Eaton (previously MGE Office +Protection Systems) units. link:http://www.amautacorp.com/staff/Rudd-O/ups-monitor/[UPS Monitor] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -123,32 +126,45 @@ link:http://www.lestat.st/informatique/projets/pynut-en[PyNUT] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PyNUT is an abstraction class written in Python to access NUT (Network UPS -Tools) server and execute commands without needing to know the communication protocol. +Tools) server and execute commands without needing to know the communication +protocol. + +NOTE: PyNUT is part of NUT since version NUT 2.4.1. link:http://bugs.debian.org/343530[RRDtool logging support] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This patch adds link:http://oss.oetiker.ch/rrdtool[RRDtool] logging support to NUT. +This patch adds link:http://oss.oetiker.ch/rrdtool[RRDtool] logging support to +NUT. link:http://home.tele2.fr/elrik/[ups_control] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -A developing Python wrapper to upsc which can generate mails and shutdown the machine. +A developing Python wrapper to upsc which can generate mails and shutdown the +machine. link:http://search.cpan.org/search?dist=ups-nut[UPS::Nut] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A Perl module to talk to an UPS via NUT (Network UPS Tools) upsd. +NOTE: UPS::Nut is part of NUT since version NUT 2.6.1. Hardware projects involving NUT ------------------------------- +link:http://www.dell.com/us/business/p/powervault-nx3500/pd[Dell PowerVault NX3500] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Dell is using NUT to protect the new PowerVault NX3500 storage devices. + link:http://www.opengear.com/UPS.html[OpenGear] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Opengear provides an advanced NUT integration into many models. -There is also a link:http://www.opengear.com/Videos/Network-UPS-Tools/Network-UPS-Tools.html[video presentation] of the NUT integration. +There is also a +link:http://www.opengear.com/Videos/Network-UPS-Tools/Network-UPS-Tools.html[video presentation] +of the NUT integration. For more information on Opengear's contributions to NUT, have a look at the link:acknowledgements.html[acknowledgements information]. @@ -163,8 +179,8 @@ its devices. Alcatel Lucent IPBX ~~~~~~~~~~~~~~~~~~~ -Alcatel has been working for years with us (Patrick Agrain and Arnaud) to improve -NUT integration into some of their IPBX. +Alcatel has been working for years with us (Patrick Agrain and Arnaud) to +improve NUT integration into some of their IPBX. link:http://www.readynas.com/?page_id=92[Netgear ReadyNAS] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -182,6 +198,7 @@ Notes ------- - Client authors: send updates on your releases to the NUT users mailing list. -We will also put a link to you in the news section of the top page when things change. +We will also put a link to you in the news section of the top page when things +change. - If you know of a project which should be listed, please send in the URL. diff --git a/docs/website/web-layout.conf b/docs/website/web-layout.conf index 29a4406..4cab7b0 100644 --- a/docs/website/web-layout.conf +++ b/docs/website/web-layout.conf @@ -153,11 +153,11 @@ ifndef::textonly[] src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" /> - + Get Firefox! - + src='http://www.mozilla.org/contribute/buttons/110x32bubble_b.png' + alt='Firefox Download Button' /> + endif::textonly[] endif::badges[] diff --git a/drivers/Makefile.am b/drivers/Makefile.am index 2391963..9690da5 100644 --- a/drivers/Makefile.am +++ b/drivers/Makefile.am @@ -29,13 +29,16 @@ endif if WITH_LIBPOWERMAN AM_CFLAGS += $(LIBPOWERMAN_CFLAGS) endif +if WITH_IPMI + AM_CFLAGS += $(LIBIPMI_CFLAGS) +endif -SERIAL_DRIVERLIST = apcsmart bcmxcp belkin belkinunv bestfcom \ +SERIAL_DRIVERLIST = bcmxcp belkin belkinunv bestfcom \ bestfortress bestuferrups bestups dummy-ups etapro everups \ gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \ mge-shut mge-utalk microdowell newmge-shut oneac optiups powercom rhino \ safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel \ - blazer_ser clone clone-outlet ivtscd + blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old SNMP_DRIVERLIST = snmp-ups USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \ blazer_usb richcomm_usb @@ -71,6 +74,9 @@ endif if WITH_LIBPOWERMAN driverexec_PROGRAMS += powerman-pdu endif +if WITH_IPMI + driverexec_PROGRAMS += nut-ipmipsu +endif else driverexec_PROGRAMS += skel endif @@ -86,7 +92,8 @@ upsdrvctl_SOURCES = upsdrvctl.c upsdrvctl_LDADD = $(LDADD_COMMON) # serial drivers: all of them use standard LDADD and CFLAGS -apcsmart_SOURCES = apcsmart.c +apcsmart_SOURCES = apcsmart.c apcsmart_tabs.c +apcsmart_old_SOURCES = apcsmart-old.c bcmxcp_SOURCES = bcmxcp.c bcmxcp_ser.c bcmxcp_LDADD = $(LDADD) -lm belkin_SOURCES = belkin.c @@ -200,20 +207,28 @@ netxml_ups_LDADD = $(LDADD_DRIVERS) $(LIBNEON_LIBS) powerman_pdu_SOURCES = powerman-pdu.c powerman_pdu_LDADD = $(LDADD) $(LIBPOWERMAN_LIBS) +# IPMI PSU +nut_ipmipsu_SOURCES = nut-ipmipsu.c +if WITH_FREEIPMI + nut_ipmipsu_SOURCES += nut-libfreeipmi.c +endif +nut_ipmipsu_LDADD = $(LDADD) $(LIBIPMI_LIBS) + # ---------------------------------------------------------------------- # List of header files. The purpose of this list is not dependency # tracking (which is automatic), but to ensure these files are # distributed by "make dist". -dist_noinst_HEADERS = apc-mib.h apc-hid.h apcsmart.h baytech-mib.h bcmxcp.h \ +dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \ bcmxcp_io.h belkin.h belkin-hid.h bestpower-mib.h blazer.h cps-hid.h dstate.h \ dstate-hal.h dummy-ups.h eaton-mib.h explore-hid.h gamatronic.h genericups.h \ hidparser.h hidtypes.h ietf-mib.h libhid.h libshut.h libusb.h liebert-hid.h \ main.h main-hal.h mge-hid.h mge-mib.h mge-shut.h mge-utalk.h \ - mge-xml.h microdowell.h netvision-mib.h netxml-ups.h oneac.h \ + mge-xml.h microdowell.h netvision-mib.h netxml-ups.h nut-ipmi.h oneac.h \ powercom.h powerpanel.h powerp-bin.h powerp-txt.h powerware-mib.h raritan-pdu-mib.h \ safenet.h serial.h snmp-ups.h solis.h tripplite.h tripplite-hid.h \ - upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h + upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \ + apcsmart.h apcsmart_tabs.h apcsmart-old.h # Define a dummy library so that Automake builds rules for the # corresponding object files. This library is not actually built, diff --git a/drivers/Makefile.in b/drivers/Makefile.in index 80e5e13..08758d2 100644 --- a/drivers/Makefile.in +++ b/drivers/Makefile.in @@ -43,26 +43,29 @@ target_triplet = @target@ @WITH_SNMP_TRUE@am__append_3 = $(LIBNETSNMP_CFLAGS) @WITH_NEONXML_TRUE@am__append_4 = $(LIBNEON_CFLAGS) @WITH_LIBPOWERMAN_TRUE@am__append_5 = $(LIBPOWERMAN_CFLAGS) +@WITH_IPMI_TRUE@am__append_6 = $(LIBIPMI_CFLAGS) EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4) \ $(am__EXEEXT_5) @SOME_DRIVERS_FALSE@driverexec_PROGRAMS = $(am__EXEEXT_6) \ @SOME_DRIVERS_FALSE@ $(am__EXEEXT_7) $(am__EXEEXT_8) \ @SOME_DRIVERS_FALSE@ $(am__EXEEXT_9) $(am__EXEEXT_10) \ -@SOME_DRIVERS_FALSE@ upsdrvctl$(EXEEXT) +@SOME_DRIVERS_FALSE@ $(am__EXEEXT_11) upsdrvctl$(EXEEXT) @SOME_DRIVERS_TRUE@driverexec_PROGRAMS = $(DRIVER_BUILD_LIST) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_6) $(am__EXEEXT_7) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_8) $(am__EXEEXT_9) \ -@SOME_DRIVERS_TRUE@ $(am__EXEEXT_10) skel$(EXEEXT) \ -@SOME_DRIVERS_TRUE@ upsdrvctl$(EXEEXT) -@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_6 = $(SERIAL_DRIVERLIST) -@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_7 = $(SNMP_DRIVERLIST) -@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_8 = $(USB_LIBUSB_DRIVERLIST) +@SOME_DRIVERS_TRUE@ $(am__EXEEXT_10) $(am__EXEEXT_11) \ +@SOME_DRIVERS_TRUE@ skel$(EXEEXT) upsdrvctl$(EXEEXT) +@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_7 = $(SERIAL_DRIVERLIST) +@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_8 = $(SNMP_DRIVERLIST) +@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_9 = $(USB_LIBUSB_DRIVERLIST) @SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@halexec_PROGRAMS = \ -@SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@ $(am__EXEEXT_11) -@SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__append_9 = $(NEONXML_DRIVERLIST) -@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_10 = powerman-pdu -@WITH_SSL_TRUE@am__append_11 = $(LIBSSL_CFLAGS) -@WITH_SSL_TRUE@am__append_12 = $(LIBSSL_LIBS) +@SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@ $(am__EXEEXT_12) +@SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__append_10 = $(NEONXML_DRIVERLIST) +@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_11 = powerman-pdu +@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_12 = nut-ipmipsu +@WITH_SSL_TRUE@am__append_13 = $(LIBSSL_CFLAGS) +@WITH_SSL_TRUE@am__append_14 = $(LIBSSL_LIBS) +@WITH_FREEIPMI_TRUE@am__append_15 = nut-libfreeipmi.c subdir = drivers DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -73,6 +76,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -103,19 +108,19 @@ libnuthalmain_a_LIBADD = am_libnuthalmain_a_OBJECTS = main-hal.$(OBJEXT) dstate-hal.$(OBJEXT) \ usb-common.$(OBJEXT) libnuthalmain_a_OBJECTS = $(am_libnuthalmain_a_OBJECTS) -am__EXEEXT_1 = apcsmart$(EXEEXT) bcmxcp$(EXEEXT) belkin$(EXEEXT) \ - belkinunv$(EXEEXT) bestfcom$(EXEEXT) bestfortress$(EXEEXT) \ - bestuferrups$(EXEEXT) bestups$(EXEEXT) dummy-ups$(EXEEXT) \ - etapro$(EXEEXT) everups$(EXEEXT) gamatronic$(EXEEXT) \ - genericups$(EXEEXT) isbmex$(EXEEXT) liebert$(EXEEXT) \ - liebert-esp2$(EXEEXT) masterguard$(EXEEXT) metasys$(EXEEXT) \ - mge-shut$(EXEEXT) mge-utalk$(EXEEXT) microdowell$(EXEEXT) \ - newmge-shut$(EXEEXT) oneac$(EXEEXT) optiups$(EXEEXT) \ - powercom$(EXEEXT) rhino$(EXEEXT) safenet$(EXEEXT) \ - skel$(EXEEXT) solis$(EXEEXT) tripplite$(EXEEXT) \ - tripplitesu$(EXEEXT) upscode2$(EXEEXT) victronups$(EXEEXT) \ - powerpanel$(EXEEXT) blazer_ser$(EXEEXT) clone$(EXEEXT) \ - clone-outlet$(EXEEXT) ivtscd$(EXEEXT) +am__EXEEXT_1 = bcmxcp$(EXEEXT) belkin$(EXEEXT) belkinunv$(EXEEXT) \ + bestfcom$(EXEEXT) bestfortress$(EXEEXT) bestuferrups$(EXEEXT) \ + bestups$(EXEEXT) dummy-ups$(EXEEXT) etapro$(EXEEXT) \ + everups$(EXEEXT) gamatronic$(EXEEXT) genericups$(EXEEXT) \ + isbmex$(EXEEXT) liebert$(EXEEXT) liebert-esp2$(EXEEXT) \ + masterguard$(EXEEXT) metasys$(EXEEXT) mge-shut$(EXEEXT) \ + mge-utalk$(EXEEXT) microdowell$(EXEEXT) newmge-shut$(EXEEXT) \ + oneac$(EXEEXT) optiups$(EXEEXT) powercom$(EXEEXT) \ + rhino$(EXEEXT) safenet$(EXEEXT) skel$(EXEEXT) solis$(EXEEXT) \ + tripplite$(EXEEXT) tripplitesu$(EXEEXT) upscode2$(EXEEXT) \ + victronups$(EXEEXT) powerpanel$(EXEEXT) blazer_ser$(EXEEXT) \ + clone$(EXEEXT) clone-outlet$(EXEEXT) ivtscd$(EXEEXT) \ + apcsmart$(EXEEXT) apcsmart-old$(EXEEXT) am__EXEEXT_2 = snmp-ups$(EXEEXT) am__EXEEXT_3 = usbhid-ups$(EXEEXT) bcmxcp_usb$(EXEEXT) \ tripplite_usb$(EXEEXT) blazer_usb$(EXEEXT) \ @@ -127,19 +132,25 @@ am__EXEEXT_5 = netxml-ups$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__EXEEXT_8 = $(am__EXEEXT_3) @SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__EXEEXT_9 = $(am__EXEEXT_5) @SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__EXEEXT_10 = powerman-pdu$(EXEEXT) +@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__EXEEXT_11 = \ +@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@ nut-ipmipsu$(EXEEXT) am__installdirs = "$(DESTDIR)$(driverexecdir)" \ "$(DESTDIR)$(halexecdir)" -am__EXEEXT_11 = hald-addon-usbhid-ups$(EXEEXT) \ +am__EXEEXT_12 = hald-addon-usbhid-ups$(EXEEXT) \ hald-addon-bcmxcp_usb$(EXEEXT) \ hald-addon-tripplite_usb$(EXEEXT) \ hald-addon-blazer_usb$(EXEEXT) PROGRAMS = $(driverexec_PROGRAMS) $(halexec_PROGRAMS) -am_apcsmart_OBJECTS = apcsmart.$(OBJEXT) +am_apcsmart_OBJECTS = apcsmart.$(OBJEXT) apcsmart_tabs.$(OBJEXT) apcsmart_OBJECTS = $(am_apcsmart_OBJECTS) apcsmart_LDADD = $(LDADD) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) serial.o apcsmart_DEPENDENCIES = $(am__DEPENDENCIES_2) +am_apcsmart_old_OBJECTS = apcsmart-old.$(OBJEXT) +apcsmart_old_OBJECTS = $(am_apcsmart_old_OBJECTS) +apcsmart_old_LDADD = $(LDADD) +apcsmart_old_DEPENDENCIES = $(am__DEPENDENCIES_2) am_bcmxcp_OBJECTS = bcmxcp.$(OBJEXT) bcmxcp_ser.$(OBJEXT) bcmxcp_OBJECTS = $(am_bcmxcp_OBJECTS) am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) @@ -283,6 +294,11 @@ newmge_shut_DEPENDENCIES = $(am__DEPENDENCIES_3) newmge_shut_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(newmge_shut_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__nut_ipmipsu_SOURCES_DIST = nut-ipmipsu.c nut-libfreeipmi.c +@WITH_FREEIPMI_TRUE@am__objects_2 = nut-libfreeipmi.$(OBJEXT) +am_nut_ipmipsu_OBJECTS = nut-ipmipsu.$(OBJEXT) $(am__objects_2) +nut_ipmipsu_OBJECTS = $(am_nut_ipmipsu_OBJECTS) +nut_ipmipsu_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) am_oneac_OBJECTS = oneac.$(OBJEXT) oneac_OBJECTS = $(am_oneac_OBJECTS) oneac_LDADD = $(LDADD) @@ -366,21 +382,22 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libdummy_a_SOURCES) $(libnuthalmain_a_SOURCES) \ - $(apcsmart_SOURCES) $(bcmxcp_SOURCES) $(bcmxcp_usb_SOURCES) \ - $(belkin_SOURCES) $(belkinunv_SOURCES) $(bestfcom_SOURCES) \ - bestfortress.c $(bestuferrups_SOURCES) $(bestups_SOURCES) \ - $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) $(clone_SOURCES) \ - $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) $(etapro_SOURCES) \ - $(everups_SOURCES) $(gamatronic_SOURCES) $(genericups_SOURCES) \ - $(hald_addon_bcmxcp_usb_SOURCES) \ + $(apcsmart_SOURCES) $(apcsmart_old_SOURCES) $(bcmxcp_SOURCES) \ + $(bcmxcp_usb_SOURCES) $(belkin_SOURCES) $(belkinunv_SOURCES) \ + $(bestfcom_SOURCES) bestfortress.c $(bestuferrups_SOURCES) \ + $(bestups_SOURCES) $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) \ + $(clone_SOURCES) $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) \ + $(etapro_SOURCES) $(everups_SOURCES) $(gamatronic_SOURCES) \ + $(genericups_SOURCES) $(hald_addon_bcmxcp_usb_SOURCES) \ $(hald_addon_blazer_usb_SOURCES) \ $(hald_addon_tripplite_usb_SOURCES) \ $(hald_addon_usbhid_ups_SOURCES) $(isbmex_SOURCES) \ $(ivtscd_SOURCES) $(liebert_SOURCES) $(liebert_esp2_SOURCES) \ $(masterguard_SOURCES) $(metasys_SOURCES) $(mge_shut_SOURCES) \ $(mge_utalk_SOURCES) $(microdowell_SOURCES) \ - $(netxml_ups_SOURCES) $(newmge_shut_SOURCES) $(oneac_SOURCES) \ - $(optiups_SOURCES) $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ + $(netxml_ups_SOURCES) $(newmge_shut_SOURCES) \ + $(nut_ipmipsu_SOURCES) $(oneac_SOURCES) $(optiups_SOURCES) \ + $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ $(powerpanel_SOURCES) $(rhino_SOURCES) $(richcomm_usb_SOURCES) \ $(safenet_SOURCES) $(skel_SOURCES) $(snmp_ups_SOURCES) \ $(solis_SOURCES) $(tripplite_SOURCES) $(tripplite_usb_SOURCES) \ @@ -388,20 +405,21 @@ SOURCES = $(libdummy_a_SOURCES) $(libnuthalmain_a_SOURCES) \ $(upsdrvctl_SOURCES) $(usbhid_ups_SOURCES) \ $(victronups_SOURCES) DIST_SOURCES = $(libdummy_a_SOURCES) $(libnuthalmain_a_SOURCES) \ - $(apcsmart_SOURCES) $(bcmxcp_SOURCES) $(bcmxcp_usb_SOURCES) \ - $(belkin_SOURCES) $(belkinunv_SOURCES) $(bestfcom_SOURCES) \ - bestfortress.c $(bestuferrups_SOURCES) $(bestups_SOURCES) \ - $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) $(clone_SOURCES) \ - $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) $(etapro_SOURCES) \ - $(everups_SOURCES) $(gamatronic_SOURCES) $(genericups_SOURCES) \ - $(hald_addon_bcmxcp_usb_SOURCES) \ + $(apcsmart_SOURCES) $(apcsmart_old_SOURCES) $(bcmxcp_SOURCES) \ + $(bcmxcp_usb_SOURCES) $(belkin_SOURCES) $(belkinunv_SOURCES) \ + $(bestfcom_SOURCES) bestfortress.c $(bestuferrups_SOURCES) \ + $(bestups_SOURCES) $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) \ + $(clone_SOURCES) $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) \ + $(etapro_SOURCES) $(everups_SOURCES) $(gamatronic_SOURCES) \ + $(genericups_SOURCES) $(hald_addon_bcmxcp_usb_SOURCES) \ $(hald_addon_blazer_usb_SOURCES) \ $(hald_addon_tripplite_usb_SOURCES) \ $(hald_addon_usbhid_ups_SOURCES) $(isbmex_SOURCES) \ $(ivtscd_SOURCES) $(liebert_SOURCES) $(liebert_esp2_SOURCES) \ $(masterguard_SOURCES) $(metasys_SOURCES) $(mge_shut_SOURCES) \ $(mge_utalk_SOURCES) $(microdowell_SOURCES) \ - $(netxml_ups_SOURCES) $(newmge_shut_SOURCES) $(oneac_SOURCES) \ + $(netxml_ups_SOURCES) $(newmge_shut_SOURCES) \ + $(am__nut_ipmipsu_SOURCES_DIST) $(oneac_SOURCES) \ $(optiups_SOURCES) $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ $(powerpanel_SOURCES) $(rhino_SOURCES) $(richcomm_usb_SOURCES) \ $(safenet_SOURCES) $(skel_SOURCES) $(snmp_ups_SOURCES) \ @@ -457,10 +475,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -498,6 +520,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -562,6 +588,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -586,13 +614,14 @@ LDADD = $(LDADD_DRIVERS_SERIAL) # files. In any case, CFLAGS are only -I options, so there is no harm, # but only add them if we really use the target. AM_CFLAGS = -I$(top_srcdir)/include $(am__append_1) $(am__append_2) \ - $(am__append_3) $(am__append_4) $(am__append_5) -SERIAL_DRIVERLIST = apcsmart bcmxcp belkin belkinunv bestfcom \ + $(am__append_3) $(am__append_4) $(am__append_5) \ + $(am__append_6) +SERIAL_DRIVERLIST = bcmxcp belkin belkinunv bestfcom \ bestfortress bestuferrups bestups dummy-ups etapro everups \ gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \ mge-shut mge-utalk microdowell newmge-shut oneac optiups powercom rhino \ safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel \ - blazer_ser clone clone-outlet ivtscd + blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old SNMP_DRIVERLIST = snmp-ups USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \ @@ -613,7 +642,8 @@ upsdrvctl_SOURCES = upsdrvctl.c upsdrvctl_LDADD = $(LDADD_COMMON) # serial drivers: all of them use standard LDADD and CFLAGS -apcsmart_SOURCES = apcsmart.c +apcsmart_SOURCES = apcsmart.c apcsmart_tabs.c +apcsmart_old_SOURCES = apcsmart-old.c bcmxcp_SOURCES = bcmxcp.c bcmxcp_ser.c bcmxcp_LDADD = $(LDADD) -lm belkin_SOURCES = belkin.c @@ -659,9 +689,9 @@ victronups_SOURCES = victronups.c # dummy dummy_ups_SOURCES = dummy-ups.c dummy_ups_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/clients \ - $(am__append_11) + $(am__append_13) dummy_ups_LDADD = $(LDADD_DRIVERS) ../clients/libupsclient.la \ - $(am__append_12) + $(am__append_14) # Clone drivers clone_SOURCES = clone.c @@ -721,19 +751,24 @@ netxml_ups_LDADD = $(LDADD_DRIVERS) $(LIBNEON_LIBS) powerman_pdu_SOURCES = powerman-pdu.c powerman_pdu_LDADD = $(LDADD) $(LIBPOWERMAN_LIBS) +# IPMI PSU +nut_ipmipsu_SOURCES = nut-ipmipsu.c $(am__append_15) +nut_ipmipsu_LDADD = $(LDADD) $(LIBIPMI_LIBS) + # ---------------------------------------------------------------------- # List of header files. The purpose of this list is not dependency # tracking (which is automatic), but to ensure these files are # distributed by "make dist". -dist_noinst_HEADERS = apc-mib.h apc-hid.h apcsmart.h baytech-mib.h bcmxcp.h \ +dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \ bcmxcp_io.h belkin.h belkin-hid.h bestpower-mib.h blazer.h cps-hid.h dstate.h \ dstate-hal.h dummy-ups.h eaton-mib.h explore-hid.h gamatronic.h genericups.h \ hidparser.h hidtypes.h ietf-mib.h libhid.h libshut.h libusb.h liebert-hid.h \ main.h main-hal.h mge-hid.h mge-mib.h mge-shut.h mge-utalk.h \ - mge-xml.h microdowell.h netvision-mib.h netxml-ups.h oneac.h \ + mge-xml.h microdowell.h netvision-mib.h netxml-ups.h nut-ipmi.h oneac.h \ powercom.h powerpanel.h powerp-bin.h powerp-txt.h powerware-mib.h raritan-pdu-mib.h \ safenet.h serial.h snmp-ups.h solis.h tripplite.h tripplite-hid.h \ - upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h + upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \ + apcsmart.h apcsmart_tabs.h apcsmart-old.h # Define a dummy library so that Automake builds rules for the @@ -879,6 +914,9 @@ clean-halexecPROGRAMS: apcsmart$(EXEEXT): $(apcsmart_OBJECTS) $(apcsmart_DEPENDENCIES) @rm -f apcsmart$(EXEEXT) $(LINK) $(apcsmart_OBJECTS) $(apcsmart_LDADD) $(LIBS) +apcsmart-old$(EXEEXT): $(apcsmart_old_OBJECTS) $(apcsmart_old_DEPENDENCIES) + @rm -f apcsmart-old$(EXEEXT) + $(LINK) $(apcsmart_old_OBJECTS) $(apcsmart_old_LDADD) $(LIBS) bcmxcp$(EXEEXT): $(bcmxcp_OBJECTS) $(bcmxcp_DEPENDENCIES) @rm -f bcmxcp$(EXEEXT) $(LINK) $(bcmxcp_OBJECTS) $(bcmxcp_LDADD) $(LIBS) @@ -975,6 +1013,9 @@ netxml-ups$(EXEEXT): $(netxml_ups_OBJECTS) $(netxml_ups_DEPENDENCIES) newmge-shut$(EXEEXT): $(newmge_shut_OBJECTS) $(newmge_shut_DEPENDENCIES) @rm -f newmge-shut$(EXEEXT) $(newmge_shut_LINK) $(newmge_shut_OBJECTS) $(newmge_shut_LDADD) $(LIBS) +nut-ipmipsu$(EXEEXT): $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_DEPENDENCIES) + @rm -f nut-ipmipsu$(EXEEXT) + $(LINK) $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_LDADD) $(LIBS) oneac$(EXEEXT): $(oneac_OBJECTS) $(oneac_DEPENDENCIES) @rm -f oneac$(EXEEXT) $(LINK) $(oneac_OBJECTS) $(oneac_LDADD) $(LIBS) @@ -1038,7 +1079,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apc-hid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apc-mib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcsmart-old.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcsmart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcsmart_tabs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/baytech-mib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcmxcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcmxcp_ser.Po@am__quote@ @@ -1094,6 +1137,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newmge_shut-libshut.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newmge_shut-mge-hid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newmge_shut-usbhid-ups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nut-ipmipsu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nut-libfreeipmi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oneac.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optiups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/powercom-hid.Po@am__quote@ diff --git a/drivers/apc-mib.c b/drivers/apc-mib.c index c934685..6b44fd6 100644 --- a/drivers/apc-mib.c +++ b/drivers/apc-mib.c @@ -27,6 +27,17 @@ #define APCC_MIB_VERSION "1.1" +/* Other APC sysOID: + * + * examples found on the Net and other sources: + * 'enterprises.apc.products.system.smartUPS.smartUPS700' + * '.1.3.6.1.4.1.318.1.3.4.5': ApcRPDU, + * '.1.3.6.1.4.1.318.1.3.4.4': ApcMSP + */ + +/* TODO: find the right sysOID for this MIB + * Ie ".1.3.6.1.4.1.318.1.1.1" or ".1.3.6.1.4.1.318" or? */ + /* info elements */ #define APCC_OID_BATT_STATUS ".1.3.6.1.4.1.318.1.1.1.2.1.1.0" diff --git a/drivers/apcsmart-old.c b/drivers/apcsmart-old.c new file mode 100644 index 0000000..5c06372 --- /dev/null +++ b/drivers/apcsmart-old.c @@ -0,0 +1,1501 @@ +/* + apcsmart.c - driver for APC smart protocol units (originally "newapc") + + Copyright (C) 1999 Russell Kroll + (C) 2000 Nigel Metheringham + + 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 +*/ + +#include "main.h" +#include "serial.h" +#include "apcsmart-old.h" + +#define DRIVER_NAME "APC Smart protocol driver" +#define DRIVER_VERSION "2.1" + +static upsdrv_info_t table_info = { + "APC command table", + APC_TABLE_VERSION, + NULL, + 0, + { NULL } +}; + +/* driver description structure */ +upsdrv_info_t upsdrv_info = { + DRIVER_NAME, + DRIVER_VERSION, + "Russell Kroll \n" + "Nigel Metheringham \n" + "Michal Soltys ", + DRV_STABLE, + { &table_info, NULL } +}; + +#define ALT_CABLE_1 "940-0095B" + + static int ups_status = 0, quirk_capability_overflow = 0; + +static apc_vartab_t *vartab_lookup_char(char cmdchar) +{ + int i; + + for (i = 0; apc_vartab[i].name != NULL; i++) + if (apc_vartab[i].cmd == cmdchar) + return &apc_vartab[i]; + + return NULL; +} + +static apc_vartab_t *vartab_lookup_name(const char *var) +{ + int i; + + for (i = 0; apc_vartab[i].name != NULL; i++) + if (!strcasecmp(apc_vartab[i].name, var)) + return &apc_vartab[i]; + + return NULL; +} + +/* FUTURE: change to use function pointers */ + +/* convert APC formatting to NUT formatting */ +static const char *convert_data(apc_vartab_t *cmd_entry, const char *upsval) +{ + static char tmp[128]; + int tval; + + switch(cmd_entry->flags & APC_FORMATMASK) { + case APC_F_PERCENT: + case APC_F_VOLT: + case APC_F_AMP: + case APC_F_CELSIUS: + case APC_F_HEX: + case APC_F_DEC: + case APC_F_SECONDS: + case APC_F_LEAVE: + + /* no conversion for any of these */ + return upsval; + + case APC_F_HOURS: + /* convert to seconds */ + + tval = 60 * 60 * strtol(upsval, NULL, 10); + + snprintf(tmp, sizeof(tmp), "%d", tval); + return tmp; + + case APC_F_MINUTES: + /* Convert to seconds - NUT standard time measurement */ + tval = 60 * strtol(upsval, NULL, 10); + /* Ignore errors - Theres not much we can do */ + snprintf(tmp, sizeof(tmp), "%d", tval); + return tmp; + + case APC_F_REASON: + switch (upsval[0]) { + case 'R': return "unacceptable utility voltage rate of change"; + case 'H': return "high utility voltage"; + case 'L': return "low utility voltage"; + case 'T': return "line voltage notch or spike"; + case 'O': return "no transfers yet since turnon"; + case 'S': return "simulated power failure or UPS test"; + default: return upsval; + } + } + + upslogx(LOG_NOTICE, "Unable to handle conversion of %s", cmd_entry->name); + return upsval; +} + +static void ups_status_set(void) +{ + status_init(); + if (ups_status & APC_STAT_CAL) + status_set("CAL"); /* calibration */ + if (ups_status & APC_STAT_TRIM) + status_set("TRIM"); /* SmartTrim */ + if (ups_status & APC_STAT_BOOST) + status_set("BOOST"); /* SmartBoost */ + if (ups_status & APC_STAT_OL) + status_set("OL"); /* on line */ + if (ups_status & APC_STAT_OB) + status_set("OB"); /* on battery */ + if (ups_status & APC_STAT_OVER) + status_set("OVER"); /* overload */ + if (ups_status & APC_STAT_LB) + status_set("LB"); /* low battery */ + if (ups_status & APC_STAT_RB) + status_set("RB"); /* replace batt */ + + if (ups_status == 0) + status_set("OFF"); + + status_commit(); +} + +static void alert_handler(char ch) +{ + switch (ch) { + case '!': /* clear OL, set OB */ + upsdebugx(4, "alert_handler: OB"); + ups_status &= ~APC_STAT_OL; + ups_status |= APC_STAT_OB; + break; + + case '$': /* clear OB, set OL */ + upsdebugx(4, "alert_handler: OL"); + ups_status &= ~APC_STAT_OB; + ups_status |= APC_STAT_OL; + break; + + case '%': /* set LB */ + upsdebugx(4, "alert_handler: LB"); + ups_status |= APC_STAT_LB; + break; + + case '+': /* clear LB */ + upsdebugx(4, "alert_handler: not LB"); + ups_status &= ~APC_STAT_LB; + break; + + case '#': /* set RB */ + upsdebugx(4, "alert_handler: RB"); + ups_status |= APC_STAT_RB; + break; + + case '?': /* set OVER */ + upsdebugx(4, "alert_handler: OVER"); + ups_status |= APC_STAT_OVER; + break; + + case '=': /* clear OVER */ + upsdebugx(4, "alert_handler: not OVER"); + ups_status &= ~APC_STAT_OVER; + break; + + default: + upsdebugx(4, "alert_handler got 0x%02x (unhandled)", ch); + break; + } + + ups_status_set(); +} + +static int read_buf(char *buf, size_t buflen) +{ + int ret; + + ret = ser_get_line_alert(upsfd, buf, buflen, ENDCHAR, POLL_IGNORE, + POLL_ALERT, alert_handler, SER_WAIT_SEC, SER_WAIT_USEC); + + if (ret < 1) { + ser_comm_fail("%s", ret ? strerror(errno) : "timeout"); + return ret; + } + + ser_comm_good(); + return ret; +} + +static int poll_data(apc_vartab_t *vt) +{ + int ret; + char tmp[SMALLBUF]; + + if ((vt->flags & APC_PRESENT) == 0) + return 1; + + upsdebugx(4, "poll_data: %s", vt->name); + + ret = ser_send_char(upsfd, vt->cmd); + + if (ret != 1) { + upslogx(LOG_ERR, "poll_data: ser_send_char failed"); + dstate_datastale(); + return 0; + } + + if (read_buf(tmp, sizeof(tmp)) < 1) { + dstate_datastale(); + return 0; + } + + /* no longer supported by the hardware somehow */ + if (!strcmp(tmp, "NA")) { + dstate_delinfo(vt->name); + return 1; + } + + dstate_setinfo(vt->name, "%s", convert_data(vt, tmp)); + dstate_dataok(); + + return 1; +} + +/* check for support or just update a named variable */ +static int query_ups(const char *var, int first) +{ + int ret; + char temp[256]; + const char *ptr; + apc_vartab_t *vt; + + vt = vartab_lookup_name(var); + + if (!vt) { + upsdebugx(1, "query_ups: unknown variable %s", var); + return 0; + } + + /* + * not first run and already known to not be supported ? + */ + if (!first && !(vt->flags & APC_PRESENT)) + return 0; + + /* empty the input buffer (while allowing the alert handler to run) */ + ret = ser_get_line_alert(upsfd, temp, sizeof(temp), ENDCHAR, + POLL_IGNORE, POLL_ALERT, alert_handler, 0, 0); + + ret = ser_send_char(upsfd, vt->cmd); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "query_ups: ser_send_char failed"); + return 0; + } + + ret = ser_get_line_alert(upsfd, temp, sizeof(temp), ENDCHAR, + POLL_IGNORE, POLL_ALERT, alert_handler, SER_WAIT_SEC, + SER_WAIT_USEC); + + if ((ret < 1) && (first == 0)) { + ser_comm_fail("%s", ret ? strerror(errno) : "timeout"); + return 0; + } + + ser_comm_good(); + + if ((ret < 1) || (!strcmp(temp, "NA"))) /* not supported */ + return 0; + + vt->flags |= APC_PRESENT; + ptr = convert_data(vt, temp); + dstate_setinfo(vt->name, "%s", ptr); + + return 1; /* success */ +} + +static void do_capabilities(void) +{ + const char *ptr, *entptr; + char upsloc, temp[512], cmd, loc, etmp[16], *endtemp; + int nument, entlen, i, matrix, ret, valid; + apc_vartab_t *vt; + + upsdebugx(1, "APC - About to get capabilities string"); + /* If we can do caps, then we need the Firmware revision which has + the locale descriptor as the last character (ugh) + */ + ptr = dstate_getinfo("ups.firmware"); + if (ptr) + upsloc = ptr[strlen(ptr) - 1]; + else + upsloc = 0; + + /* get capability string */ + ret = ser_send_char(upsfd, APC_CAPABILITY); /* ^Z */ + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "do_capabilities: ser_send_char failed"); + return; + } + + /* note different IGN set since ^Z returns things like # */ + ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, + MINIGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); + + if ((ret < 1) || (!strcmp(temp, "NA"))) { + + /* Early Smart-UPS, not as smart as later ones */ + /* This should never happen since we only call + this if the REQ_CAPABILITIES command is supported + */ + upslogx(LOG_ERR, "ERROR: APC cannot do capabilities but said it could!"); + return; + } + + /* recv always puts a \0 at the end, so this is safe */ + /* however it assumes a zero byte cannot be embedded */ + endtemp = &temp[0] + strlen(temp); + + if (temp[0] != '#') { + upsdebugx(1, "Unrecognized capability start char %c", temp[0]); + upsdebugx(1, "Please report this error [%s]", temp); + upslogx(LOG_ERR, "ERROR: unknown capability start char %c!", + temp[0]); + + return; + } + + if (temp[1] == '#') { /* Matrix-UPS */ + matrix = 1; + ptr = &temp[0]; + } + else { + ptr = &temp[1]; + matrix = 0; + } + + /* command char, location, # of entries, entry length */ + + while (ptr[0] != '\0') { + if (matrix) + ptr += 2; /* jump over repeating ## */ + + /* check for idiocy */ + if (ptr >= endtemp) { + + /* if we expected this, just ignore it */ + if (quirk_capability_overflow) + return; + + fatalx(EXIT_FAILURE, + "Capability string has overflowed\n" + "Please report this error\n" + "ERROR: capability overflow!" + ); + } + + cmd = ptr[0]; + loc = ptr[1]; + nument = ptr[2] - 48; + entlen = ptr[3] - 48; + entptr = &ptr[4]; + + vt = vartab_lookup_char(cmd); + valid = vt && ((loc == upsloc) || (loc == '4')); + + /* mark this as writable */ + if (valid) { + upsdebugx(1, "Supported capability: %02x (%c) - %s", + cmd, loc, vt->name); + + dstate_setflags(vt->name, ST_FLAG_RW); + + /* make sure setvar knows what this is */ + vt->flags |= APC_RW | APC_ENUM; + } + + for (i = 0; i < nument; i++) { + if (valid) { + snprintf(etmp, entlen + 1, "%s", entptr); + dstate_addenum(vt->name, "%s", convert_data(vt, etmp)); + } + + entptr += entlen; + } + + ptr = entptr; + } +} + +static int update_status(void) +{ + int ret; + char buf[SMALLBUF]; + + upsdebugx(4, "update_status"); + + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + + ret = ser_send_char(upsfd, APC_STATUS); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "update_status: ser_send_char failed"); + dstate_datastale(); + return 0; + } + + ret = read_buf(buf, sizeof(buf)); + + if ((ret < 1) || (!strcmp(buf, "NA"))) { + dstate_datastale(); + return 0; + } + + ups_status = strtol(buf, 0, 16) & 0xff; + ups_status_set(); + + dstate_dataok(); + + return 1; +} + +static void oldapcsetup(void) +{ + int ret = 0; + + /* really old models ignore REQ_MODEL, so find them first */ + ret = query_ups("ups.model", 1); + + if (ret != 1) { + /* force the model name */ + dstate_setinfo("ups.model", "Smart-UPS"); + } + + /* see if this might be an old Matrix-UPS instead */ + if (query_ups("output.current", 1)) + dstate_setinfo("ups.model", "Matrix-UPS"); + + query_ups("ups.serial", 1); + query_ups("input.voltage", 1); /* This one may fail... no problem */ + + update_status(); + + /* If we have come down this path then we dont do capabilities and + other shiny features + */ +} + +static void protocol_verify(unsigned char cmd) +{ + int i, found; + + /* see if it's a variable */ + for (i = 0; apc_vartab[i].name != NULL; i++) { + + /* 1:1 here, so the first match is the only match */ + + if (apc_vartab[i].cmd == cmd) { + upsdebugx(3, "UPS supports variable [%s]", + apc_vartab[i].name); + + /* load initial data */ + apc_vartab[i].flags |= APC_PRESENT; + poll_data(&apc_vartab[i]); + + /* handle special data for our two strings */ + if (apc_vartab[i].flags & APC_STRING) { + dstate_setflags(apc_vartab[i].name, + ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux(apc_vartab[i].name, APC_STRLEN); + + apc_vartab[i].flags |= APC_RW; + } + + return; + } + } + + /* check the command list */ + + /* some cmdchars map onto multiple commands (start and stop) */ + + found = 0; + + for (i = 0; apc_cmdtab[i].name != NULL; i++) { + if (apc_cmdtab[i].cmd == cmd) { + upsdebugx(2, "UPS supports command [%s]", + apc_cmdtab[i].name); + + dstate_addcmd(apc_cmdtab[i].name); + + apc_cmdtab[i].flags |= APC_PRESENT; + found = 1; + } + } + + if (found) + return; + + if (isprint(cmd)) + upsdebugx(1, "protocol_verify: 0x%02x [%c] unrecognized", + cmd, cmd); + else + upsdebugx(1, "protocol_verify: 0x%02x unrecognized", cmd); +} + +/* some hardware is a special case - hotwire the list of cmdchars */ +static int firmware_table_lookup(void) +{ + int ret; + unsigned int i, j; + char buf[SMALLBUF]; + + upsdebugx(1, "Attempting firmware lookup using command 'V'"); + + ret = ser_send_char(upsfd, 'V'); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "firmware_table_lookup: ser_send_char failed"); + return 0; + } + + ret = ser_get_line(upsfd, buf, sizeof(buf), ENDCHAR, IGNCHARS, + SER_WAIT_SEC, SER_WAIT_USEC); + + /* + * Some UPSes support both 'V' and 'b'. As 'b' doesn't always return + * firmware version, we attempt that only if 'V' doesn't work. + */ + if ((ret < 1) || (!strcmp(buf, "NA"))) { + upsdebugx(1, "Attempting firmware lookup using command 'b'"); + ret = ser_send_char(upsfd, 'b'); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "firmware_table_lookup: ser_send_char failed"); + return 0; + } + + ret = ser_get_line(upsfd, buf, sizeof(buf), ENDCHAR, IGNCHARS, + SER_WAIT_SEC, SER_WAIT_USEC); + + if (ret < 1) { + upslog_with_errno(LOG_ERR, "firmware_table_lookup: ser_get_line failed"); + return 0; + } + } + + upsdebugx(2, "Firmware: [%s]", buf); + + /* this will be reworked if we get a lot of these things */ + if (!strcmp(buf, "451.2.I")) { + quirk_capability_overflow = 1; + return 0; + } + + for (i = 0; compat_tab[i].firmware != NULL; i++) { + if (!strcmp(compat_tab[i].firmware, buf)) { + + upsdebugx(2, "Matched - cmdchars: %s", + compat_tab[i].cmdchars); + + if (strspn(compat_tab[i].firmware, "05")) { + dstate_setinfo("ups.model", "Matrix-UPS"); + } else { + dstate_setinfo("ups.model", "Smart-UPS"); + } + + /* matched - run the cmdchars from the table */ + for (j = 0; j < strlen(compat_tab[i].cmdchars); j++) + protocol_verify(compat_tab[i].cmdchars[j]); + + return 1; /* matched */ + } + } + + upsdebugx(2, "Not found in table - trying normal method"); + return 0; +} + +static void getbaseinfo(void) +{ + unsigned int i; + int ret = 0; + char *alrts, *cmds, temp[512]; + + /* + * try firmware lookup first; we could start with 'a', but older models + * sometimes return other things than a command set + */ + if (firmware_table_lookup() == 1) + return; + + upsdebugx(1, "APC - Attempting to find command set"); + /* Initially we ask the UPS what commands it takes + If this fails we are going to need an alternate + strategy - we can deal with that if it happens + */ + + ret = ser_send_char(upsfd, APC_CMDSET); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "getbaseinfo: ser_send_char failed"); + return; + } + + ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, IGNCHARS, + SER_WAIT_SEC, SER_WAIT_USEC); + + if ((ret < 1) || (!strcmp(temp, "NA"))) { + /* We have an old dumb UPS - go to specific code for old stuff */ + oldapcsetup(); + return; + } + + upsdebugx(1, "APC - Parsing out command set"); + /* We have the version.alert.cmdchars string + NB the alert chars are normally in IGNCHARS + so will have been pretty much edited out. + You will need to change the ser_get_line above if + you want to check those out too.... + */ + alrts = strchr(temp, '.'); + if (alrts == NULL) { + fatalx(EXIT_FAILURE, "Unable to split APC version string"); + } + *alrts++ = 0; + + cmds = strchr(alrts, '.'); + if (cmds == NULL) { + fatalx(EXIT_FAILURE, "Unable to find APC command string"); + } + *cmds++ = 0; + + for (i = 0; i < strlen(cmds); i++) + protocol_verify(cmds[i]); + + /* if capabilities are supported, add them here */ + if (strchr(cmds, APC_CAPABILITY)) + do_capabilities(); + + upsdebugx(1, "APC - UPS capabilities determined"); +} + +/* check for calibration status and either start or stop */ +static int do_cal(int start) +{ + char temp[256]; + int tval, ret; + + ret = ser_send_char(upsfd, APC_STATUS); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "do_cal: ser_send_char failed"); + return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ + } + + ret = read_buf(temp, sizeof(temp)); + + /* if we can't check the current calibration status, bail out */ + if ((ret < 1) || (!strcmp(temp, "NA"))) + return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ + + tval = strtol(temp, 0, 16); + + if (tval & APC_STAT_CAL) { /* calibration currently happening */ + if (start == 1) { + /* requested start while calibration still running */ + upslogx(LOG_INFO, "Runtime calibration already in progress"); + return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ + } + + /* stop requested */ + + upslogx(LOG_INFO, "Stopping runtime calibration"); + + ret = ser_send_char(upsfd, APC_CMD_CALTOGGLE); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "do_cal: ser_send_char failed"); + return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ + } + + ret = read_buf(temp, sizeof(temp)); + + if ((ret < 1) || (!strcmp(temp, "NA")) || (!strcmp(temp, "NO"))) { + upslogx(LOG_WARNING, "Stop calibration failed: %s", + temp); + return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ + } + + return STAT_INSTCMD_HANDLED; /* FUTURE: success */ + } + + /* calibration not happening */ + + if (start == 0) { /* stop requested */ + upslogx(LOG_INFO, "Runtime calibration not occurring"); + return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ + } + + upslogx(LOG_INFO, "Starting runtime calibration"); + + ret = ser_send_char(upsfd, APC_CMD_CALTOGGLE); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "do_cal: ser_send_char failed"); + return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ + } + + ret = read_buf(temp, sizeof(temp)); + + if ((ret < 1) || (!strcmp(temp, "NA")) || (!strcmp(temp, "NO"))) { + upslogx(LOG_WARNING, "Start calibration failed: %s", temp); + return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ + } + + return STAT_INSTCMD_HANDLED; /* FUTURE: success */ +} + +/* get the UPS talking to us in smart mode */ +static int smartmode(void) +{ + int ret, tries; + char temp[256]; + + for (tries = 0; tries < 5; tries++) { + + ret = ser_send_char(upsfd, APC_GOSMART); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "smartmode: ser_send_char failed"); + return 0; + } + + ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, + IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); + + if (ret > 0) + if (!strcmp(temp, "SM")) + return 1; /* success */ + + sleep(1); /* wait before trying again */ + + /* it failed, so try to bail out of menus on newer units */ + + ret = ser_send_char(upsfd, 27); /* ESC */ + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "smartmode: ser_send_char failed"); + return 0; + } + + /* eat the response (might be NA, might be something else) */ + ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, + IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); + } + + return 0; /* failure */ +} + +/* + * all shutdown commands should respond with 'OK' or '*' + */ +static int sdok(void) +{ + char temp[16]; + + ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); + upsdebugx(4, "sdok: got \"%s\"", temp); + + if (!strcmp(temp, "*") || !strcmp(temp, "OK")) { + upsdebugx(4, "Last issued shutdown command succeeded"); + return 1; + } + + upsdebugx(1, "Last issued shutdown command failed"); + return 0; +} + +/* soft hibernate: S - working only when OB, otherwise ignored */ +static int sdcmd_S(int dummy) +{ + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + + upsdebugx(1, "Issuing soft hibernate"); + ser_send_char(upsfd, APC_CMD_SOFTDOWN); + + return sdok(); +} + +/* soft hibernate, hack version for CS 350 */ +static int sdcmd_CS(int tval) +{ + upsdebugx(1, "Using CS 350 'force OB' shutdown method"); + if (tval & APC_STAT_OL) { + upsdebugx(1, "On-line - forcing OB temporarily"); + ser_send_char(upsfd, 'U'); + usleep(UPSDELAY); + } + return sdcmd_S(tval); +} + +/* + * hard hibernate: @nnn / @nn + * note: works differently for older and new models, see help function for + * detailed info + */ +static int sdcmd_ATn(int cnt) +{ + int n = 0, mmax, ret; + const char *strval; + char timer[4]; + + mmax = cnt == 2 ? 99 : 999; + + if ((strval = getval("wugrace"))) { + errno = 0; + n = strtol(strval, NULL, 10); + if (errno || n < 0 || n > mmax) + n = 0; + } + + snprintf(timer, sizeof(timer), "%.*d", cnt, n); + + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + upsdebugx(1, "Issuing hard hibernate with %d minutes additional wakeup delay", n*6); + + ser_send_char(upsfd, APC_CMD_GRACEDOWN); + usleep(CMDLONGDELAY); + ser_send_pace(upsfd, UPSDELAY, "%s", timer); + + ret = sdok(); + if (ret || cnt == 3) + return ret; + + /* + * "tricky" part - we tried @nn variation and it (unsurprisingly) + * failed; we have to abort the sequence with something bogus to have + * the clean state; newer upses will respond with 'NO', older will be + * silent (YMMV); + */ + ser_send_char(upsfd, APC_CMD_GRACEDOWN); + usleep(UPSDELAY); + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + + return 0; +} + +/* shutdown: K - delayed poweroff */ +static int sdcmd_K(int dummy) +{ + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + upsdebugx(1, "Issuing delayed poweroff"); + + ser_send_char(upsfd, APC_CMD_SHUTDOWN); + usleep(CMDLONGDELAY); + ser_send_char(upsfd, APC_CMD_SHUTDOWN); + + return sdok(); +} + +/* shutdown: Z - immediate poweroff */ +static int sdcmd_Z(int dummy) +{ + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + upsdebugx(1, "Issuing immediate poweroff"); + + ser_send_char(upsfd, APC_CMD_OFF); + usleep(CMDLONGDELAY); + ser_send_char(upsfd, APC_CMD_OFF); + + return sdok(); +} + +static int (*sdlist[])(int) = { + sdcmd_S, + sdcmd_ATn, /* for @nnn version */ + sdcmd_K, + sdcmd_Z, + sdcmd_CS, + sdcmd_ATn, /* for @nn version */ +}; + +#define SDIDX_S 0 +#define SDIDX_AT3N 1 +#define SDIDX_K 2 +#define SDIDX_Z 3 +#define SDIDX_CS 4 +#define SDIDX_AT2N 5 + +#define SDCNT 6 + +static void upsdrv_shutdown_simple(int status) +{ + unsigned int sdtype = 0; + char *strval; + + if ((strval = getval("sdtype"))) { + errno = 0; + sdtype = strtol(strval, NULL, 10); + if (errno || sdtype < 0 || sdtype > 6) + sdtype = 0; + } + + switch (sdtype) { + + case 6: /* hard hibernate */ + sdcmd_ATn(3); + break; + case 5: /* "hack nn" hard hibernate */ + sdcmd_ATn(2); + break; + case 4: /* special hack for CS 350 and similar models */ + sdcmd_CS(status); + break; + + case 3: /* delayed poweroff */ + sdcmd_K(0); + break; + + case 2: /* instant poweroff */ + sdcmd_Z(0); + break; + case 1: + /* + * Send a combined set of shutdown commands which can work + * better if the UPS gets power during shutdown process + * Specifically it sends both the soft shutdown 'S' and the + * hard hibernate '@nnn' commands + */ + upsdebugx(1, "UPS - currently %s - sending soft/hard hibernate commands", + (status & APC_STAT_OL) ? "on-line" : "on battery"); + + /* S works only when OB */ + if ((status & APC_STAT_OB) && sdcmd_S(0)) + break; + sdcmd_ATn(3); + break; + + default: + /* + * Send @nnn or S, depending on OB / OL status + */ + if (status & APC_STAT_OL) /* on line */ + sdcmd_ATn(3); + else + sdcmd_S(0); + } +} + +static void upsdrv_shutdown_advanced(int status) +{ + const char *strval; + const char deforder[] = {48 + SDIDX_S, + 48 + SDIDX_AT3N, + 48 + SDIDX_K, + 48 + SDIDX_Z, + 0}; + size_t i; + int n; + + strval = getval("advorder"); + + /* sanitize advorder */ + + if (!strval || !strlen(strval) || strlen(strval) > SDCNT) + strval = deforder; + for (i = 0; i < strlen(strval); i++) { + if (strval[i] - 48 < 0 || strval[i] - 48 >= SDCNT) { + strval = deforder; + break; + } + } + + /* + * try each method in the list with a little bit of handling in certain + * cases + */ + + for (i = 0; i < strlen(strval); i++) { + switch (strval[i] - 48) { + case SDIDX_CS: + n = status; + break; + case SDIDX_AT3N: + n = 3; + break; + case SDIDX_AT2N: + default: + n = 2; + } + + if (sdlist[strval[i] - 48](n)) + break; /* finish if command succeeded */ + } +} + +/* power down the attached load immediately */ +void upsdrv_shutdown(void) +{ + char temp[32]; + int ret, status; + + if (!smartmode()) + upsdebugx(1, "SM detection failed. Trying a shutdown command anyway"); + + /* check the line status */ + + ret = ser_send_char(upsfd, APC_STATUS); + + if (ret == 1) { + ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, + IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); + + if (ret < 1) { + upsdebugx(1, "Status read failed ! Assuming on battery state"); + status = APC_STAT_LB | APC_STAT_OB; + } else { + status = strtol(temp, 0, 16); + } + + } else { + upsdebugx(1, "Status request failed; assuming on battery state"); + status = APC_STAT_LB | APC_STAT_OB; + } + + if (testvar("advorder") && strcasecmp(getval("advorder"), "no")) + upsdrv_shutdown_advanced(status); + else + upsdrv_shutdown_simple(status); +} + +/* 940-0095B support: set DTR, lower RTS */ +static void init_serial_0095B(void) +{ + ser_set_dtr(upsfd, 1); + ser_set_rts(upsfd, 0); +} + +static void update_info_normal(void) +{ + int i; + + upsdebugx(3, "update_info_normal: starting"); + + for (i = 0; apc_vartab[i].name != NULL; i++) { + if ((apc_vartab[i].flags & APC_POLL) == 0) + continue; + + if (!poll_data(&apc_vartab[i])) { + upsdebugx(3, "update_info_normal: poll_data (%s) failed - " + "aborting scan", apc_vartab[i].name); + return; + } + } + + upsdebugx(3, "update_info_normal: done"); +} + +static void update_info_all(void) +{ + int i; + + upsdebugx(3, "update_info_all: starting"); + + for (i = 0; apc_vartab[i].name != NULL; i++) { + if (!poll_data(&apc_vartab[i])) { + upsdebugx(3, "update_info_all: poll_data (%s) failed - " + "aborting scan", apc_vartab[i].name); + return; + } + } + + upsdebugx(3, "update_info_all: done"); +} + +static int setvar_enum(apc_vartab_t *vt, const char *val) +{ + int i, ret; + char orig[256], temp[256]; + const char *ptr; + + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + ret = ser_send_char(upsfd, vt->cmd); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "setvar_enum: ser_send_char failed"); + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + + ret = read_buf(orig, sizeof(orig)); + + if ((ret < 1) || (!strcmp(orig, "NA"))) + return STAT_SET_HANDLED; /* FUTURE: failed */ + + ptr = convert_data(vt, orig); + + /* suppress redundant changes - easier on the eeprom */ + if (!strcmp(ptr, val)) { + upslogx(LOG_INFO, "Ignoring enum SET %s='%s' (unchanged value)", + vt->name, val); + + return STAT_SET_HANDLED; /* FUTURE: no change */ + } + + for (i = 0; i < 6; i++) { + ret = ser_send_char(upsfd, APC_NEXTVAL); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "setvar_enum: ser_send_char failed"); + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + + /* this should return either OK (if rotated) or NO (if not) */ + ret = read_buf(temp, sizeof(temp)); + + if ((ret < 1) || (!strcmp(temp, "NA"))) + return STAT_SET_HANDLED; /* FUTURE: failed */ + + /* sanity checks */ + if (!strcmp(temp, "NO")) + return STAT_SET_HANDLED; /* FUTURE: failed */ + if (strcmp(temp, "OK") != 0) + return STAT_SET_HANDLED; /* FUTURE: failed */ + + /* see what it rotated onto */ + ret = ser_send_char(upsfd, vt->cmd); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "setvar_enum: ser_send_char failed"); + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + + ret = read_buf(temp, sizeof(temp)); + + if ((ret < 1) || (!strcmp(temp, "NA"))) + return STAT_SET_HANDLED; /* FUTURE: failed */ + + ptr = convert_data(vt, temp); + + upsdebugx(1, "Rotate value: got [%s], want [%s]", + ptr, val); + + if (!strcmp(ptr, val)) { /* got it */ + upslogx(LOG_INFO, "SET %s='%s'", vt->name, val); + + /* refresh data from the hardware */ + query_ups(vt->name, 0); + + return STAT_SET_HANDLED; /* FUTURE: success */ + } + + /* check for wraparound */ + if (!strcmp(ptr, orig)) { + upslogx(LOG_ERR, "setvar: variable %s wrapped", + vt->name); + + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + } + + upslogx(LOG_ERR, "setvar: gave up after 6 tries for %s", + vt->name); + + /* refresh data from the hardware */ + query_ups(vt->name, 0); + + return STAT_SET_HANDLED; +} + +static int setvar_string(apc_vartab_t *vt, const char *val) +{ + unsigned int i; + int ret; + char temp[256]; + + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + ret = ser_send_char(upsfd, vt->cmd); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "setvar_string: ser_send_char failed"); + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + + ret = read_buf(temp, sizeof(temp)); + + if ((ret < 1) || (!strcmp(temp, "NA"))) + return STAT_SET_HANDLED; /* FUTURE: failed */ + + /* suppress redundant changes - easier on the eeprom */ + if (!strcmp(temp, val)) { + upslogx(LOG_INFO, "Ignoring string SET %s='%s' (unchanged value)", + vt->name, val); + + return STAT_SET_HANDLED; /* FUTURE: no change */ + } + + ret = ser_send_char(upsfd, APC_NEXTVAL); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "setvar_string: ser_send_char failed"); + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + + usleep(UPSDELAY); + + for (i = 0; i < strlen(val); i++) { + ret = ser_send_char(upsfd, val[i]); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "setvar_string: ser_send_char failed"); + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + + usleep(UPSDELAY); + } + + /* pad to 8 chars with CRs */ + for (i = strlen(val); i < APC_STRLEN; i++) { + ret = ser_send_char(upsfd, 13); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "setvar_string: ser_send_char failed"); + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + + usleep(UPSDELAY); + } + + ret = read_buf(temp, sizeof(temp)); + + if (ret < 1) { + upslogx(LOG_ERR, "setvar_string: short final read"); + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + + if (!strcmp(temp, "NO")) { + upslogx(LOG_ERR, "setvar_string: got NO at final read"); + return STAT_SET_HANDLED; /* FUTURE: failed */ + } + + /* refresh data from the hardware */ + query_ups(vt->name, 0); + + upslogx(LOG_INFO, "SET %s='%s'", vt->name, val); + + return STAT_SET_HANDLED; /* FUTURE: failed */ +} + +static int setvar(const char *varname, const char *val) +{ + apc_vartab_t *vt; + + vt = vartab_lookup_name(varname); + + if (!vt) + return STAT_SET_UNKNOWN; + + if ((vt->flags & APC_RW) == 0) { + upslogx(LOG_WARNING, "setvar: [%s] is not writable", varname); + return STAT_SET_UNKNOWN; + } + + if (vt->flags & APC_ENUM) + return setvar_enum(vt, val); + + if (vt->flags & APC_STRING) + return setvar_string(vt, val); + + upslogx(LOG_WARNING, "setvar: Unknown type for [%s]", varname); + return STAT_SET_UNKNOWN; +} + +/* actually send the instcmd's char to the ups */ +static int do_cmd(apc_cmdtab_t *ct) +{ + int ret; + char buf[SMALLBUF]; + + ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + ret = ser_send_char(upsfd, ct->cmd); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "do_cmd: ser_send_char failed"); + return STAT_INSTCMD_HANDLED; /* FUTURE: failed */ + } + + /* some commands have to be sent twice with a 1.5s gap */ + if (ct->flags & APC_REPEAT) { + usleep(CMDLONGDELAY); + + ret = ser_send_char(upsfd, ct->cmd); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "do_cmd: ser_send_char failed"); + return STAT_INSTCMD_HANDLED; /* FUTURE: failed */ + } + } + + ret = read_buf(buf, sizeof(buf)); + + if (ret < 1) + return STAT_INSTCMD_HANDLED; /* FUTURE: failed */ + + if (strcmp(buf, "OK") != 0) { + upslogx(LOG_WARNING, "Got [%s] after command [%s]", + buf, ct->name); + + return STAT_INSTCMD_HANDLED; /* FUTURE: failed */ + } + + upslogx(LOG_INFO, "Command: %s", ct->name); + return STAT_INSTCMD_HANDLED; /* FUTURE: success */ +} + +/* some commands must be repeated in a window to execute */ +static int instcmd_chktime(apc_cmdtab_t *ct) +{ + double elapsed; + time_t now; + static time_t last = 0; + + time(&now); + + elapsed = difftime(now, last); + last = now; + + /* you have to hit this in a small window or it fails */ + if ((elapsed < MINCMDTIME) || (elapsed > MAXCMDTIME)) { + upsdebugx(1, "instcmd_chktime: outside window for %s (%2.0f)", + ct->name, elapsed); + return STAT_INSTCMD_HANDLED; /* FUTURE: again */ + } + + return do_cmd(ct); +} + +static int instcmd(const char *cmdname, const char *extra) +{ + int i; + apc_cmdtab_t *ct; + + ct = NULL; + + for (i = 0; apc_cmdtab[i].name != NULL; i++) + if (!strcasecmp(apc_cmdtab[i].name, cmdname)) + ct = &apc_cmdtab[i]; + + if (!ct) { + upslogx(LOG_WARNING, "instcmd: unknown command [%s]", cmdname); + return STAT_INSTCMD_UNKNOWN; + } + + if ((ct->flags & APC_PRESENT) == 0) { + upslogx(LOG_WARNING, "instcmd: command [%s] is not supported", + cmdname); + return STAT_INSTCMD_UNKNOWN; + } + + if (!strcasecmp(cmdname, "calibrate.start")) + return do_cal(1); + + if (!strcasecmp(cmdname, "calibrate.stop")) + return do_cal(0); + + if (ct->flags & APC_NASTY) + return instcmd_chktime(ct); + + /* nothing special here */ + return do_cmd(ct); +} + +/* install pointers to functions for msg handlers called from msgparse */ +static void setuphandlers(void) +{ + upsh.setvar = setvar; + upsh.instcmd = instcmd; +} + +/* functions that interface with main.c */ + +void upsdrv_makevartable(void) +{ + addvar(VAR_VALUE, "cable", "Specify alternate cable (940-0095B)"); + addvar(VAR_VALUE, "wugrace", "Hard hibernate's wakeup grace"); + addvar(VAR_VALUE, "sdtype", "Specify simple shutdown method (0-6)"); + addvar(VAR_VALUE, "advorder", "Enable advanced shutdown control"); +} + +void upsdrv_initups(void) +{ + char *cable; + + upsfd = ser_open(device_path); + ser_set_speed(upsfd, device_path, B2400); + + cable = getval("cable"); + + if (cable && !strcasecmp(cable, ALT_CABLE_1)) + init_serial_0095B(); + + /* make sure we wake up if the UPS sends alert chars to us */ + extrafd = upsfd; +} + +void upsdrv_help(void) +{ +} + +void upsdrv_initinfo(void) +{ + const char *pmod, *pser; + + if (!smartmode()) { + fatalx(EXIT_FAILURE, + "Unable to detect an APC Smart protocol UPS on port %s\n" + "Check the cabling, port name or model name and try again", device_path + ); + } + + /* manufacturer ID - hardcoded in this particular module */ + dstate_setinfo("ups.mfr", "APC"); + + getbaseinfo(); + + if (!(pmod = dstate_getinfo("ups.model"))) + pmod = "\"unknown model\""; + if (!(pser = dstate_getinfo("ups.serial"))) + pser = "unknown serial"; + + upsdebugx(1, "Detected %s [%s] on %s", pmod, pser, device_path); + + setuphandlers(); +} + +void upsdrv_updateinfo(void) +{ + static time_t last_full = 0; + time_t now; + + /* try to wake up a dead ups once in awhile */ + if ((dstate_is_stale()) && (!smartmode())) { + ser_comm_fail("Communications with UPS lost - check cabling"); + + /* reset this so a full update runs when the UPS returns */ + last_full = 0; + return; + } + + ser_comm_good(); + + if (!update_status()) + return; + + time(&now); + + /* refresh all variables hourly */ + /* does not catch measure-ups II insertion/removal */ + if (difftime(now, last_full) > 3600) { + last_full = now; + update_info_all(); + return; + } + + update_info_normal(); +} + +void upsdrv_cleanup(void) +{ + /* try to bring the UPS out of smart mode */ + ser_send_char(upsfd, APC_GODUMB); + + ser_close(upsfd, device_path); +} diff --git a/drivers/apcsmart-old.h b/drivers/apcsmart-old.h new file mode 100644 index 0000000..f143cfa --- /dev/null +++ b/drivers/apcsmart-old.h @@ -0,0 +1,291 @@ +/* apcsmart.h - command table for APC smart protocol units + + Copyright (C) 1999 Russell Kroll + (C) 2000 Nigel Metheringham + + 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 +*/ + +#include +#include +#include "serial.h" +#include "timehead.h" + +#define APC_TABLE_VERSION "version 2.2" + +/* Basic UPS reply line structure */ +#define ENDCHAR 10 /* APC ends responses with LF */ + +/* characters ignored by default */ +#define IGNCHARS "\015+$|!~%?=#&" /* special characters to ignore */ + +/* these one is used only during startup, due to ^Z sending certain characters such as # */ +#define MINIGNCHARS "\015+$|!" /* minimum set of special characters to ignore */ + +/* normal polls: characters we don't want to parse (including a few alerts) */ +#define POLL_IGNORE "\015&|" + +/* alert characters we care about - OL, OB, LB, not LB, RB, OVER, not OVER */ +#define POLL_ALERT "$!%+#?=" + +#define UPSDELAY 50000 /* slow down multicharacter commands */ +#define CMDLONGDELAY 1500000 /* some commands need a 1.5s gap for safety */ + +#define SER_WAIT_SEC 3 /* wait up to 3.0 sec for ser_get calls */ +#define SER_WAIT_USEC 0 + +/* dangerous instant commands must be reconfirmed within a 12 second window */ +#define MINCMDTIME 3 +#define MAXCMDTIME 15 + +/* it only does two strings, and they're both the same length */ +#define APC_STRLEN 8 + +/* --------------- */ + +/* status bits */ + +#define APC_STAT_CAL 1 /* calibration */ +#define APC_STAT_TRIM 2 /* SmartTrim */ +#define APC_STAT_BOOST 4 /* SmartBoost */ +#define APC_STAT_OL 8 /* on line */ +#define APC_STAT_OB 16 /* on battery */ +#define APC_STAT_OVER 32 /* overload */ +#define APC_STAT_LB 64 /* low battery */ +#define APC_STAT_RB 128 /* replace battery */ + +/* serial protocol: special commands - initialization and such */ +#define APC_STATUS 'Q' +#define APC_GOSMART 'Y' +#define APC_GODUMB 'R' +#define APC_CMDSET 'a' +#define APC_CAPABILITY 26 /* ^Z */ +#define APC_NEXTVAL '-' + +/* --------------- */ + +/* Driver command table flag values */ + +#define APC_POLL 0x0001 /* Poll this variable regularly */ +#define APC_PRESENT 0x0004 /* Capability seen on this UPS */ + +#define APC_RW 0x0010 /* read-write variable */ +#define APC_ENUM 0x0020 /* enumerated type */ +#define APC_STRING 0x0040 /* string */ + +#define APC_NASTY 0x0100 /* Nasty command - take care */ +#define APC_REPEAT 0x0200 /* Command needs sending twice */ + +#define APC_FORMATMASK 0xFF0000 /* Mask for apc data formats */ + +#define APC_F_PERCENT 0x020000 /* Data in a percent format */ +#define APC_F_VOLT 0x030000 /* Data in a voltage format */ +#define APC_F_AMP 0x040000 /* Data in a current/amp format */ +#define APC_F_CELSIUS 0x050000 /* Data in a temp/C format */ +#define APC_F_HEX 0x060000 /* Data in a hex number format */ +#define APC_F_DEC 0x070000 /* Data in a decimal format */ +#define APC_F_SECONDS 0x100000 /* Time in seconds */ +#define APC_F_MINUTES 0x110000 /* Time in minutes */ +#define APC_F_HOURS 0x120000 /* Time in hours */ +#define APC_F_REASON 0x130000 /* Reason of transfer */ +#define APC_F_LEAVE 0 /* Just pass this through */ + +typedef struct { + const char *name; /* the variable name */ + unsigned int flags; /* various flags */ + char cmd; /* command character */ +} apc_vartab_t; + +apc_vartab_t apc_vartab[] = { + + { "ups.firmware.old", 0, 'V' }, + { "ups.firmware", 0, 'b' }, + { "ups.firmware.aux", 0, 'v' }, + { "ups.model", 0, 0x01 }, + + { "ups.serial", 0, 'n' }, + { "ups.mfr.date", 0, 'm' }, + + { "ups.temperature", APC_POLL|APC_F_CELSIUS, 'C' }, + { "ups.load", APC_POLL|APC_F_PERCENT, 'P' }, + + { "ups.test.interval", APC_F_HOURS, 'E' }, + { "ups.test.result", APC_POLL, 'X' }, + + { "ups.delay.start", APC_F_SECONDS, 'r' }, + { "ups.delay.shutdown", APC_F_SECONDS, 'p' }, + + { "ups.id", APC_STRING, 'c' }, + + { "ups.contacts", APC_POLL|APC_F_HEX, 'i' }, + { "ups.display.language", + 0, 0x0C }, + + { "input.voltage", APC_POLL|APC_F_VOLT, 'L' }, + { "input.frequency", APC_POLL|APC_F_DEC, 'F' }, + { "input.sensitivity", 0, 's' }, + { "input.quality", APC_POLL|APC_F_HEX, '9' }, + + { "input.transfer.low", APC_F_VOLT, 'l' }, + { "input.transfer.high", + APC_F_VOLT, 'u' }, + { "input.transfer.reason", + APC_POLL|APC_F_REASON, 'G' }, + + { "input.voltage.maximum", + APC_POLL|APC_F_VOLT, 'M' }, + { "input.voltage.minimum", + APC_POLL|APC_F_VOLT, 'N' }, + + { "output.current", APC_POLL|APC_F_AMP, '/' }, + { "output.voltage", APC_POLL|APC_F_VOLT, 'O' }, + { "output.voltage.nominal", + APC_F_VOLT, 'o' }, + + { "ambient.humidity", APC_POLL|APC_F_PERCENT, 'h' }, + { "ambient.humidity.high", + APC_F_PERCENT, '{' }, + { "ambient.humidity.low", + APC_F_PERCENT, '}' }, + + { "ambient.temperature", + APC_POLL|APC_F_CELSIUS, 't' }, + { "ambient.temperature.high", + APC_F_CELSIUS, '[' }, + { "ambient.temperature.low", + APC_F_CELSIUS, ']' }, + + { "battery.date", APC_STRING, 'x' }, + + { "battery.charge", APC_POLL|APC_F_PERCENT, 'f' }, + { "battery.charge.restart", + APC_F_PERCENT, 'e' }, + + { "battery.voltage", APC_POLL|APC_F_VOLT, 'B' }, + { "battery.voltage.nominal", + 0, 'g' }, + + { "battery.runtime", APC_POLL|APC_F_MINUTES, 'j' }, + { "battery.runtime.low", + APC_F_MINUTES, 'q' }, + + { "battery.packs", APC_F_DEC, '>' }, + { "battery.packs.bad", APC_F_DEC, '<' }, + { "battery.alarm.threshold", + 0, 'k' }, + /* todo: + + I = alarm enable (hex field) - split into alarm.n.enable + J = alarm status (hex field) - split into alarm.n.status + + 0x15 = output voltage selection (APC_F_VOLT) + 0x5C = load power (APC_POLL|APC_F_PERCENT) + + */ + + {NULL, 0, 0}, +}; + +/* ------ instant commands ------ */ + +#define APC_CMD_FPTEST 'A' +#define APC_CMD_CALTOGGLE 'D' +#define APC_CMD_SHUTDOWN 'K' +#define APC_CMD_SOFTDOWN 'S' +#define APC_CMD_GRACEDOWN '@' +#define APC_CMD_SIMPWF 'U' +#define APC_CMD_BTESTTOGGLE 'W' +#define APC_CMD_OFF 'Z' + +#define APC_CMD_ON 0x0E /* ^N */ +#define APC_CMD_BYPTOGGLE '^' + +typedef struct { + const char *name; + int flags; + char cmd; +} apc_cmdtab_t; + +apc_cmdtab_t apc_cmdtab[] = +{ + { "load.off", APC_NASTY|APC_REPEAT, APC_CMD_OFF }, + { "load.on", APC_REPEAT, APC_CMD_ON }, + + { "test.panel.start", 0, APC_CMD_FPTEST }, + + { "test.failure.start", 0, APC_CMD_SIMPWF }, + + { "test.battery.start", 0, APC_CMD_BTESTTOGGLE }, + { "test.battery.stop", 0, APC_CMD_BTESTTOGGLE }, + + { "shutdown.return.grace", + APC_NASTY, APC_CMD_GRACEDOWN }, + { "shutdown.return", APC_NASTY, APC_CMD_SOFTDOWN }, + { "shutdown.stayoff", APC_NASTY|APC_REPEAT, APC_CMD_SHUTDOWN }, + + { "calibrate.start", 0, APC_CMD_CALTOGGLE }, + { "calibrate.stop", 0, APC_CMD_CALTOGGLE }, + + { "bypass.start", 0, APC_CMD_BYPTOGGLE }, + { "bypass.stop", 0, APC_CMD_BYPTOGGLE }, + + { NULL, 0, 0 } +}; + +/* compatibility with hardware that doesn't do APC_CMDSET ('a') */ + +struct { + const char *firmware; + const char *cmdchars; + int flags; +} compat_tab[] = { + /* APC Matrix */ + { "0XI", "789ABCDEFGKLMNOPQRSTUVWXYZcefgjklmnopqrsuwxz/<>\\^\014\026", 0 }, + { "0XM", "789ABCDEFGKLMNOPQRSTUVWXYZcefgjklmnopqrsuwxz/<>\\^\014\026", 0 }, + { "0ZI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, + { "5UI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, + { "5ZM", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, + /* APC600 */ + { "6QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "6QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "6TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "6TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + /* SmartUPS 900 */ + { "7QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "7QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "7TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "7TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + /* SmartUPS 900I */ + { "7II", "79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, + /* SmartUPS 2000I */ + { "9II", "79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, + { "9GI", "79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, + /* SmartUPS 1250 */ + { "8QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "8QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "8TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "8TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + /* CS 350 */ + { "5.4.D", "\1ABPQRSUYbdfgjmnx9", 0 }, + /* Smart-UPS 600 */ + { "D9", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D8", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D7", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D6", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D5", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D4", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + + { NULL, NULL, 0 }, +}; diff --git a/drivers/apcsmart.c b/drivers/apcsmart.c index f30f625..4094eea 100644 --- a/drivers/apcsmart.c +++ b/drivers/apcsmart.c @@ -1,38 +1,36 @@ /* - apcsmart.c - driver for APC smart protocol units (originally "newapc") + * apcsmart.c - driver for APC smart protocol units (originally "newapc") + * + * Copyright (C) 1999 Russell Kroll + * (C) 2000 Nigel Metheringham + * (C) 2011 Michal Soltys + * + * 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 + */ - Copyright (C) 1999 Russell Kroll - (C) 2000 Nigel Metheringham - - 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 -*/ +#include +#include +#include +#include #include "main.h" #include "serial.h" +#include "timehead.h" + #include "apcsmart.h" - -#define DRIVER_NAME "APC Smart protocol driver" -#define DRIVER_VERSION "2.1" - -static upsdrv_info_t table_info = { - "APC command table", - APC_TABLE_VERSION, - NULL, - 0, - { NULL } -}; +#include "apcsmart_tabs.h" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -42,12 +40,33 @@ upsdrv_info_t upsdrv_info = { "Nigel Metheringham \n" "Michal Soltys ", DRV_STABLE, - { &table_info, NULL } + { &apc_tab_info, NULL } }; -#define ALT_CABLE_1 "940-0095B" +static int ups_status = 0; - static int ups_status = 0, quirk_capability_overflow = 0; +/* some forwards */ + +static int sdcmd_S(const void *); +static int sdcmd_AT(const void *); +static int sdcmd_K(const void *); +static int sdcmd_Z(const void *); +static int sdcmd_CS(const void *); + +static int (*sdlist[])(const void *) = { + sdcmd_S, + sdcmd_AT, + sdcmd_K, + sdcmd_Z, + sdcmd_CS, +}; + +#define SDIDX_S 0 +#define SDIDX_AT 1 +#define SDIDX_K 2 +#define SDIDX_Z 3 +#define SDIDX_CS 4 +#define SDCNT ((int)(sizeof(sdlist)/sizeof(sdlist[0]))) static apc_vartab_t *vartab_lookup_char(char cmdchar) { @@ -65,7 +84,8 @@ static apc_vartab_t *vartab_lookup_name(const char *var) int i; for (i = 0; apc_vartab[i].name != NULL; i++) - if (!strcasecmp(apc_vartab[i].name, var)) + if (!(apc_vartab[i].flags & APC_DEPR) && + !strcasecmp(apc_vartab[i].name, var)) return &apc_vartab[i]; return NULL; @@ -73,13 +93,33 @@ static apc_vartab_t *vartab_lookup_name(const char *var) /* FUTURE: change to use function pointers */ +static int rexhlp(const char *rex, const char *val) +{ + int ret; + regex_t mbuf; + + regcomp(&mbuf, rex, REG_EXTENDED|REG_NOSUB); + ret = regexec(&mbuf, val, 0,0,0); + regfree(&mbuf); + return ret; +} + /* convert APC formatting to NUT formatting */ +/* TODO: handle errors better */ static const char *convert_data(apc_vartab_t *cmd_entry, const char *upsval) { - static char tmp[128]; - int tval; + static char temp[APC_LBUF]; + int tval; - switch(cmd_entry->flags & APC_FORMATMASK) { + /* this should never happen */ + if (strlen(upsval) >= sizeof(temp)) { + upslogx(LOG_CRIT, "length of [%s] too long", cmd_entry->name); + strncpy(temp, upsval, sizeof(temp) - 1); + temp[sizeof(temp) - 1] = '\0'; + return temp; + } + + switch(cmd_entry->flags & APC_F_MASK) { case APC_F_PERCENT: case APC_F_VOLT: case APC_F_AMP: @@ -88,24 +128,24 @@ static const char *convert_data(apc_vartab_t *cmd_entry, const char *upsval) case APC_F_DEC: case APC_F_SECONDS: case APC_F_LEAVE: - /* no conversion for any of these */ - return upsval; + strcpy(temp, upsval); + return temp; case APC_F_HOURS: /* convert to seconds */ tval = 60 * 60 * strtol(upsval, NULL, 10); - snprintf(tmp, sizeof(tmp), "%d", tval); - return tmp; + snprintf(temp, sizeof(temp), "%d", tval); + return temp; case APC_F_MINUTES: /* Convert to seconds - NUT standard time measurement */ tval = 60 * strtol(upsval, NULL, 10); - /* Ignore errors - Theres not much we can do */ - snprintf(tmp, sizeof(tmp), "%d", tval); - return tmp; + /* Ignore errors - there's not much we can do */ + snprintf(temp, sizeof(temp), "%d", tval); + return temp; case APC_F_REASON: switch (upsval[0]) { @@ -115,12 +155,86 @@ static const char *convert_data(apc_vartab_t *cmd_entry, const char *upsval) case 'T': return "line voltage notch or spike"; case 'O': return "no transfers yet since turnon"; case 'S': return "simulated power failure or UPS test"; - default: return upsval; + default: + strcpy(temp, upsval); + return temp; } } - upslogx(LOG_NOTICE, "Unable to handle conversion of %s", cmd_entry->name); - return upsval; + upslogx(LOG_NOTICE, "Unable to handle conversion of [%s]", cmd_entry->name); + strcpy(temp, upsval); + return temp; +} + +static void apc_ser_set(void) +{ + struct termios tio, tio_chk; + char *cable; + + /* + * this must be called before the rest, as ser_set_speed() performs + * early initialization of the port, apart from changing speed + */ + ser_set_speed(upsfd, device_path, B2400); + + memset(&tio, 0, sizeof(tio)); + errno = 0; + + if (tcgetattr(upsfd, &tio)) + fatal_with_errno(EXIT_FAILURE, "tcgetattr(%s)", device_path); + + /* set port mode: common stuff, canonical processing */ + + tio.c_cflag |= (CS8 | CLOCAL | CREAD); + + tio.c_lflag |= ICANON; + tio.c_lflag &= ~ISIG; + + tio.c_iflag |= (IGNCR | IGNPAR); + tio.c_iflag &= ~(IXON | IXOFF); + + tio.c_oflag = 0; + + tio.c_cc[VEOL] = '*'; /* specially handled in apc_read() */ + +#ifdef _POSIX_VDISABLE + tio.c_cc[VERASE] = _POSIX_VDISABLE; + tio.c_cc[VKILL] = _POSIX_VDISABLE; + tio.c_cc[VEOF] = _POSIX_VDISABLE; + tio.c_cc[VEOL2] = _POSIX_VDISABLE; +#endif + +#if 0 + /* unused in canonical mode: */ + tio.c_cc[VMIN] = 1; + tio.c_cc[VTIME] = 0; +#endif + + if (tcflush(upsfd, TCIOFLUSH)) + fatal_with_errno(EXIT_FAILURE, "tcflush(%s)", device_path); + + /* + * warn: + * Note, that tcsetattr() returns success if /any/ of the requested + * changes could be successfully carried out. Thus the more complicated + * test. + */ + if (tcsetattr(upsfd, TCSANOW, &tio)) + fatal_with_errno(EXIT_FAILURE, "tcsetattr(%s)", device_path); + + memset(&tio_chk, 0, sizeof(tio_chk)); + if (tcgetattr(upsfd, &tio_chk)) + fatal_with_errno(EXIT_FAILURE, "tcgetattr(%s)", device_path); + if (memcmp(&tio_chk, &tio, sizeof(tio))) + fatalx(EXIT_FAILURE, "unable to set the required attributes (%s)", device_path); + + cable = getval("cable"); + if (cable && !strcasecmp(cable, ALT_CABLE_1)) { + if (ser_set_dtr(upsfd, 1) == -1) + fatalx(EXIT_FAILURE, "ser_set_dtr() failed (%s)", device_path); + if (ser_set_rts(upsfd, 0) == -1) + fatalx(EXIT_FAILURE, "ser_set_rts() failed (%s)", device_path); + } } static void ups_status_set(void) @@ -197,114 +311,461 @@ static void alert_handler(char ch) ups_status_set(); } -static int read_buf(char *buf, size_t buflen) +/* + * we need a tiny bit different processing due to '*' and canonical mode; the + * function is subtly different from generic ser_get_line_alert() + */ +static int apc_read(char *buf, size_t buflen, int flags) { - int ret; + const char *iset = IGN_CHARS, *aset = ""; + size_t count = 0; + int i, ret, sec = 3, usec = 0; + char temp[APC_LBUF]; - ret = ser_get_line_alert(upsfd, buf, buflen, ENDCHAR, POLL_IGNORE, - POLL_ALERT, alert_handler, SER_WAIT_SEC, SER_WAIT_USEC); + if (upsfd == -1) + return 0; + if (flags & SER_D0) { + sec = 0; usec = 0; + } + if (flags & SER_DX) { + sec = 0; usec = 200000; + } + if (flags & SER_D1) { + sec = 1; usec = 500000; + } + if (flags & SER_D3) { + sec = 3; usec = 0; + } + if (flags & SER_AA) { + iset = IGN_AACHARS; + aset = ALERT_CHARS; + } + if (flags & SER_CC) { + iset = IGN_CCCHARS; + aset = ""; + sec = 6; usec = 0; + } + if (flags & SER_CS) { + iset = IGN_CSCHARS; + aset = ""; + sec = 6; usec = 0; + } - if (ret < 1) { - ser_comm_fail("%s", ret ? strerror(errno) : "timeout"); - return ret; + memset(buf, '\0', buflen); + + while (count < buflen - 1) { + errno = 0; + ret = select_read(upsfd, temp, sizeof(temp), sec, usec); + + /* error or no timeout allowed */ + if (ret < 0 || (ret == 0 && !(flags & SER_TO))) { + ser_comm_fail("%s", ret ? strerror(errno) : "timeout"); + return ret; + } + /* ok, timeout is acceptable */ + if (ret == 0 && (flags & SER_TO)) { + /* + * but it doesn't imply ser_comm_good + * + * to be more precise - we might be in comm_fail + * condition, trying to "nudge" the UPS with some + * command obviously expecting timeout if the comm is + * still lost. This would result with filling logs with + * confusing comm lost/comm re-established pairs. Thus + * - just return here. + */ + return count; + } + + /* parse input */ + for (i = 0; i < ret; i++) { + /* standard "line received" condition */ + if ((count == buflen - 1) || (temp[i] == ENDCHAR)) { + ser_comm_good(); + return count; + } + /* + * '*' is set as a secondary EOL; convert to 'OK' only as a + * reply to shutdown command in sdok(); otherwise next + * select_read() will continue normally + */ + if ((flags & SER_HA) && temp[i] == '*') { + /* + * a bit paranoid, but remember '*' is not real EOL; + * there could be some firmware in existence, that + * would send both string: 'OK\n' and alert: '*'. + * Just in case, try to flush the input with small 1 sec. + * timeout + */ + memset(buf, '\0', buflen); + errno = 0; + ret = select_read(upsfd, temp, sizeof(temp), 1, 0); + if (ret < 0) { + ser_comm_fail("%s", strerror(errno)); + return ret; + } + buf[0] = 'O'; + buf[1] = 'K'; + ser_comm_good(); + return 2; + } + /* ignore set */ + if (strchr(iset, temp[i]) || temp[i] == '*') { + continue; + } + /* alert set */ + if (strchr(aset, temp[i])) { + alert_handler(temp[i]); + continue; + } + + buf[count++] = temp[i]; + } } ser_comm_good(); - return ret; + return count; +} +static int apc_write(unsigned char code) +{ + errno = 0; + if (upsfd == -1) + return 0; + return ser_send_char(upsfd, code); +} + +/* + * We have to watch out for NA, here; + * This is generally safe, as otherwise we will just timeout. The reason we do + * it, is that under certain conditions an ups might respond with NA for + * something it would normally handle (e.g. calling @ while being in powered + * off or hibernated state. If we keep sending the "arguments" after getting + * NA, they will be interpreted as commands, which is quite a bug :) + * Furthermore later flushes might not work properly, if the reply to those + * commands are generated with some delay. + * + * We also set errno to something usable, so outside upslog calls don't output + * confusing "success". + */ +static int apc_write_long(const char *code) +{ + char temp[APC_LBUF]; + int ret; + errno = 0; + + if (upsfd == -1) + return 0; + + ret = ser_send_char(upsfd, *code); + if (ret != 1) + return ret; + /* peek for the answer - anything at this point is failure */ + ret = apc_read(temp, sizeof(temp), SER_DX|SER_TO); + if (ret) { + errno = ECANCELED; + return -1; + } + + return ser_send_pace(upsfd, 50000, "%s", code + 1); +} + +static int apc_write_rep(unsigned char code) +{ + char temp[APC_LBUF]; + int ret; + errno = 0; + + if (upsfd == -1) + return 0; + + ret = ser_send_char(upsfd, code); + if (ret != 1) + return ret; + /* peek for the answer - anything at this point is failure */ + ret = apc_read(temp, sizeof(temp), SER_DX|SER_TO); + if (ret) { + errno = ECANCELED; + return -1; + } + + usleep(1300000); + ret = ser_send_char(upsfd, code); + if (ret != 1) + return ret; + return 2; +} + +/* all flags other than SER_AA are ignored */ +static void apc_flush(int flags) +{ + char temp[APC_LBUF]; + + if (flags & SER_AA) { + tcflush(upsfd, TCOFLUSH); + while(apc_read(temp, sizeof(temp), SER_D0|SER_TO|SER_AA)); + } else { + tcflush(upsfd, TCIOFLUSH); + /* tcflush(upsfd, TCIFLUSH); */ + /* while(apc_read(temp, sizeof(temp), SER_D0|SER_TO)); */ + } +} + +static const char *preread_data(apc_vartab_t *vt) +{ + int ret; + char temp[APC_LBUF]; + + upsdebugx(4, "preread_data: %s", vt->name); + + apc_flush(0); + ret = apc_write(vt->cmd); + + if (ret != 1) { + upslogx(LOG_ERR, "preread_data: apc_write failed"); + return 0; + } + + ret = apc_read(temp, sizeof(temp), SER_TO); + + if (ret < 0) { + upslogx(LOG_ERR, "preread_data: apc_read failed"); + return 0; + } + + if (!ret || !strcmp(temp, "NA")) { + upslogx(LOG_ERR, "preread_data: %s timed out or not supported", vt->name); + return 0; + } + + return convert_data(vt, temp); +} + +static void remove_var(const char *cal, apc_vartab_t *vt) +{ + const char *fmt; + char info[256]; + + if (isprint(vt->cmd)) + fmt = "[%c]"; + else + fmt = "[0x%02x]"; + + snprintf(info, sizeof(info), "%s%s%s", + "%s: verified variable [%s] (APC: ", + fmt, + ") returned NA" + ); + upsdebugx(1, info, cal, vt->name, vt->cmd); + + snprintf(info, sizeof(info), "%s%s%s", + "%s: removing [%s] (APC: ", + fmt, + ")" + ); + upsdebugx(1, info, cal, vt->name, vt->cmd); + + vt->flags &= ~APC_PRESENT; + dstate_delinfo(vt->name); } static int poll_data(apc_vartab_t *vt) { int ret; - char tmp[SMALLBUF]; + char temp[APC_LBUF]; - if ((vt->flags & APC_PRESENT) == 0) + if (!(vt->flags & APC_PRESENT)) return 1; upsdebugx(4, "poll_data: %s", vt->name); - ret = ser_send_char(upsfd, vt->cmd); + apc_flush(SER_AA); + ret = apc_write(vt->cmd); if (ret != 1) { - upslogx(LOG_ERR, "poll_data: ser_send_char failed"); + upslogx(LOG_ERR, "poll_data: apc_write failed"); dstate_datastale(); return 0; } - if (read_buf(tmp, sizeof(tmp)) < 1) { + if (apc_read(temp, sizeof(temp), SER_AA) < 1) { dstate_datastale(); return 0; } - /* no longer supported by the hardware somehow */ - if (!strcmp(tmp, "NA")) { - dstate_delinfo(vt->name); - return 1; - } + /* automagically no longer supported by the hardware somehow */ + if (!strcmp(temp, "NA")) + remove_var("poll_data", vt); - dstate_setinfo(vt->name, "%s", convert_data(vt, tmp)); + dstate_setinfo(vt->name, "%s", convert_data(vt, temp)); dstate_dataok(); return 1; } -/* check for support or just update a named variable */ -static int query_ups(const char *var, int first) +static int dfa_fwnew(const char *val) { - int ret; - char temp[256]; - const char *ptr; - apc_vartab_t *vt; + int ret; + regex_t mbuf; + /* must be xx.yy.zz */ + const char rex[] = "^[[:alnum:]]+\\.[[:alnum:]]+\\.[[:alnum:]]+$"; - vt = vartab_lookup_name(var); - - if (!vt) { - upsdebugx(1, "query_ups: unknown variable %s", var); - return 0; - } - - /* - * not first run and already known to not be supported ? - */ - if (!first && !(vt->flags & APC_PRESENT)) - return 0; - - /* empty the input buffer (while allowing the alert handler to run) */ - ret = ser_get_line_alert(upsfd, temp, sizeof(temp), ENDCHAR, - POLL_IGNORE, POLL_ALERT, alert_handler, 0, 0); - - ret = ser_send_char(upsfd, vt->cmd); - - if (ret != 1) { - upslog_with_errno(LOG_ERR, "query_ups: ser_send_char failed"); - return 0; - } - - ret = ser_get_line_alert(upsfd, temp, sizeof(temp), ENDCHAR, - POLL_IGNORE, POLL_ALERT, alert_handler, SER_WAIT_SEC, - SER_WAIT_USEC); - - if ((ret < 1) && (first == 0)) { - ser_comm_fail("%s", ret ? strerror(errno) : "timeout"); - return 0; - } - - ser_comm_good(); - - if ((ret < 1) || (!strcmp(temp, "NA"))) /* not supported */ - return 0; - - vt->flags |= APC_PRESENT; - ptr = convert_data(vt, temp); - dstate_setinfo(vt->name, "%s", ptr); - - return 1; /* success */ + regcomp(&mbuf, rex, REG_EXTENDED|REG_NOSUB); + ret = regexec(&mbuf, val, 0,0,0); + regfree(&mbuf); + return ret; } -static void do_capabilities(void) +static int dfa_cmdset(const char *val) +{ + int ret; + regex_t mbuf; + /* + * must be #.alerts.commands ; we'll be a bit lax here + */ + const char rex[] = "^[0-9]\\.[^.]*\\.[^.]+$"; + + regcomp(&mbuf, rex, REG_EXTENDED|REG_NOSUB); + ret = regexec(&mbuf, val, 0,0,0); + regfree(&mbuf); + return ret; +} + +static int valid_cmd(char cmd, const char *val) +{ + char info[256], *fmt; + int ret; + + switch (cmd) { + case APC_FW_NEW: + ret = dfa_fwnew(val); + break; + case APC_CMDSET: + ret = dfa_cmdset(val); + break; + default: + return 1; + } + + if (ret) { + if (isprint(cmd)) + fmt = "[%c]"; + else + fmt = "[0x%02x]"; + + snprintf(info, sizeof(info), "%s%s%s", + "valid_cmd: cmd ", + fmt, + " failed regex match" + ); + upslogx(LOG_WARNING, info, cmd); + } + + return !ret; +} + +/* + * query_ups() is called before any APC_PRESENT flags are determined; + * only for the variable provided + */ +static int query_ups(const char *var) +{ + int i, j; + const char *temp; + apc_vartab_t *vt, *vtn; + + /* + * at first run we know nothing about variable; we have to handle + * APC_MULTI gracefully as well + */ + for (i = 0; apc_vartab[i].name != NULL; i++) { + vt = &apc_vartab[i]; + if (strcmp(vt->name, var) || vt->flags & APC_DEPR) + continue; + + /* found, [try to] get it */ + + temp = preread_data(vt); + if (!temp || !valid_cmd(vt->cmd, temp)) { + if (vt->flags & APC_MULTI) { + vt->flags |= APC_DEPR; + continue; + } + upsdebugx(1, "query_ups: unknown variable %s", var); + break; + } + + vt->flags |= APC_PRESENT; + dstate_setinfo(vt->name, "%s", temp); + dstate_dataok(); + + /* supported, deprecate all the remaining ones */ + if (vt->flags & APC_MULTI) + for (j = i + 1; apc_vartab[j].name != NULL; j++) { + vtn = &apc_vartab[j]; + if (strcmp(vtn->name, vt->name)) + continue; + vtn->flags |= APC_DEPR; + vtn->flags &= ~APC_PRESENT; + } + + return 1; /* success */ + } + + return 0; +} + +/* + * This function iterates over vartab, deprecating nut:apc 1:n variables. We + * prefer earliest present variable. All the other ones must be marked as + * deprecated and as not present. + * This is intended to call after verifying the presence of variables. + * Otherwise it would take a while to execute due to preread_data() + */ +static void deprecate_vars(void) +{ + int i, j; + const char *temp; + apc_vartab_t *vt, *vtn; + + for (i = 0; apc_vartab[i].name != NULL; i++) { + vt = &apc_vartab[i]; + if (vt->flags & APC_DEPR) + /* already handled */ + continue; + + if (!(vt->flags & APC_MULTI)) + continue; + if (!(vt->flags & APC_PRESENT)) { + vt->flags |= APC_DEPR; + continue; + } + /* pre-read data, we have to verify it */ + temp = preread_data(vt); + if (!temp || !valid_cmd(vt->cmd, temp)) { + upslogx(LOG_ERR, "deprecate_vars: [%s] is unreadable or invalid, deprecating", vt->name); + vt->flags |= APC_DEPR; + vt->flags &= ~APC_PRESENT; + continue; + } + + /* multi & present, deprecate all the remaining ones */ + for (j = i + 1; apc_vartab[j].name != NULL; j++) { + vtn = &apc_vartab[j]; + if (strcmp(vtn->name, vt->name)) + continue; + vtn->flags |= APC_DEPR; + vtn->flags &= ~APC_PRESENT; + } + + dstate_setinfo(vt->name, "%s", temp); + dstate_dataok(); + } +} + +static void do_capabilities(int qco) { const char *ptr, *entptr; - char upsloc, temp[512], cmd, loc, etmp[16], *endtemp; + char upsloc, temp[APC_LBUF], cmd, loc, etmp[APC_SBUF], *endtemp; int nument, entlen, i, matrix, ret, valid; apc_vartab_t *vt; @@ -319,16 +780,18 @@ static void do_capabilities(void) upsloc = 0; /* get capability string */ - ret = ser_send_char(upsfd, APC_CAPABILITY); /* ^Z */ + apc_flush(0); + ret = apc_write(APC_CAPS); if (ret != 1) { - upslog_with_errno(LOG_ERR, "do_capabilities: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "do_capabilities: apc_write failed"); return; } - - /* note different IGN set since ^Z returns things like # */ - ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, - MINIGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); + /* + * note - apc_read() needs larger timeout grace and different + * ignore set due to certain characters like '#' being received + */ + ret = apc_read(temp, sizeof(temp), SER_CC|SER_TO); if ((ret < 1) || (!strcmp(temp, "NA"))) { @@ -336,7 +799,7 @@ static void do_capabilities(void) /* This should never happen since we only call this if the REQ_CAPABILITIES command is supported */ - upslogx(LOG_ERR, "ERROR: APC cannot do capabilities but said it could!"); + upslogx(LOG_ERR, "ERROR: APC cannot do capabilities but said it could !"); return; } @@ -345,9 +808,9 @@ static void do_capabilities(void) endtemp = &temp[0] + strlen(temp); if (temp[0] != '#') { - upsdebugx(1, "Unrecognized capability start char %c", temp[0]); - upsdebugx(1, "Please report this error [%s]", temp); - upslogx(LOG_ERR, "ERROR: unknown capability start char %c!", + upsdebugx(1, "unrecognized capability start char %c", temp[0]); + upsdebugx(1, "please report this error [%s]", temp); + upslogx(LOG_ERR, "ERROR: unknown capability start char %c!", temp[0]); return; @@ -372,12 +835,12 @@ static void do_capabilities(void) if (ptr >= endtemp) { /* if we expected this, just ignore it */ - if (quirk_capability_overflow) + if (qco) return; - fatalx(EXIT_FAILURE, - "Capability string has overflowed\n" - "Please report this error\n" + fatalx(EXIT_FAILURE, + "capability string has overflowed\n" + "please report this error\n" "ERROR: capability overflow!" ); } @@ -393,7 +856,7 @@ static void do_capabilities(void) /* mark this as writable */ if (valid) { - upsdebugx(1, "Supported capability: %02x (%c) - %s", + upsdebugx(1, "supported capability: %02x (%c) - %s", cmd, loc, vt->name); dstate_setflags(vt->name, ST_FLAG_RW); @@ -418,21 +881,20 @@ static void do_capabilities(void) static int update_status(void) { int ret; - char buf[SMALLBUF]; + char buf[APC_LBUF]; upsdebugx(4, "update_status"); - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - - ret = ser_send_char(upsfd, APC_STATUS); + apc_flush(SER_AA); + ret = apc_write(APC_STATUS); if (ret != 1) { - upslog_with_errno(LOG_ERR, "update_status: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "update_status: apc_write failed"); dstate_datastale(); return 0; } - ret = read_buf(buf, sizeof(buf)); + ret = apc_read(buf, sizeof(buf), SER_AA); if ((ret < 1) || (!strcmp(buf, "NA"))) { dstate_datastale(); @@ -449,70 +911,108 @@ static int update_status(void) static void oldapcsetup(void) { - int ret = 0; - /* really old models ignore REQ_MODEL, so find them first */ - ret = query_ups("ups.model", 1); - - if (ret != 1) { + if (!query_ups("ups.model")) { /* force the model name */ dstate_setinfo("ups.model", "Smart-UPS"); } /* see if this might be an old Matrix-UPS instead */ - if (query_ups("output.current", 1)) + if (query_ups("output.current")) dstate_setinfo("ups.model", "Matrix-UPS"); - query_ups("ups.serial", 1); - query_ups("input.voltage", 1); /* This one may fail... no problem */ + query_ups("ups.firmware"); + query_ups("ups.serial"); + query_ups("input.voltage"); + query_ups("battery.charge"); + query_ups("battery.voltage"); + query_ups("input.voltage"); + query_ups("output.voltage"); + query_ups("ups.temperature"); + query_ups("ups.load"); update_status(); - /* If we have come down this path then we dont do capabilities and - other shiny features - */ + /* + * If we have come down this path then we dont do capabilities and + * other shiny features. + */ } static void protocol_verify(unsigned char cmd) { - int i, found; + int i, found; + const char *fmt, *temp; + char info[256]; - /* see if it's a variable */ + /* don't bother with cmd/var we don't care about */ + if (strchr(APC_UNR_CMDS, cmd)) + return; + + if (isprint(cmd)) + fmt = "[%c]"; + else + fmt = "[0x%02x]"; + + /* + * see if it's a variable + * note: some nut variables map onto multiple APC ones (firmware) + */ for (i = 0; apc_vartab[i].name != NULL; i++) { - - /* 1:1 here, so the first match is the only match */ - if (apc_vartab[i].cmd == cmd) { - upsdebugx(3, "UPS supports variable [%s]", - apc_vartab[i].name); + if (apc_vartab[i].flags & APC_MULTI) { + /* APC_MULTI are handled by deprecate_vars() */ + apc_vartab[i].flags |= APC_PRESENT; + return; + } + + temp = preread_data(&apc_vartab[i]); + if (!temp || !valid_cmd(cmd, temp)) { + snprintf(info, sizeof(info), "%s%s%s", + "UPS variable [%s] - APC: ", + fmt, + " invalid or unreadable" + ); + upsdebugx(3, info, apc_vartab[i].name, cmd); + return; + } - /* load initial data */ apc_vartab[i].flags |= APC_PRESENT; - poll_data(&apc_vartab[i]); + + snprintf(info, sizeof(info), "%s%s", + "UPS supports variable [%s] - APC: ", + fmt + ); + upsdebugx(3, info, apc_vartab[i].name, cmd); + + dstate_setinfo(apc_vartab[i].name, "%s", temp); + dstate_dataok(); /* handle special data for our two strings */ if (apc_vartab[i].flags & APC_STRING) { - dstate_setflags(apc_vartab[i].name, + dstate_setflags(apc_vartab[i].name, ST_FLAG_RW | ST_FLAG_STRING); dstate_setaux(apc_vartab[i].name, APC_STRLEN); apc_vartab[i].flags |= APC_RW; } - return; } } - /* check the command list */ - - /* some cmdchars map onto multiple commands (start and stop) */ - + /* + * check the command list + * some APC commands map onto multiple nut ones (start and stop) + */ found = 0; - for (i = 0; apc_cmdtab[i].name != NULL; i++) { if (apc_cmdtab[i].cmd == cmd) { - upsdebugx(2, "UPS supports command [%s]", - apc_cmdtab[i].name); + + snprintf(info, sizeof(info), "%s%s", + "UPS supports command [%s] - APC: ", + fmt + ); + upsdebugx(3, info, apc_cmdtab[i].name, cmd); dstate_addcmd(apc_cmdtab[i].name); @@ -524,11 +1024,12 @@ static void protocol_verify(unsigned char cmd) if (found) return; - if (isprint(cmd)) - upsdebugx(1, "protocol_verify: 0x%02x [%c] unrecognized", - cmd, cmd); - else - upsdebugx(1, "protocol_verify: 0x%02x unrecognized", cmd); + snprintf(info, sizeof(info), "%s%s%s", + "protocol_verify - APC: ", + fmt, + " unrecognized" + ); + upsdebugx(1, info, cmd); } /* some hardware is a special case - hotwire the list of cmdchars */ @@ -536,152 +1037,144 @@ static int firmware_table_lookup(void) { int ret; unsigned int i, j; - char buf[SMALLBUF]; + char buf[APC_LBUF]; - upsdebugx(1, "Attempting firmware lookup using command 'V'"); + upsdebugx(1, "attempting firmware lookup using command 'V'"); - ret = ser_send_char(upsfd, 'V'); + apc_flush(0); + ret = apc_write(APC_FW_OLD); if (ret != 1) { - upslog_with_errno(LOG_ERR, "firmware_table_lookup: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "firmware_table_lookup: apc_write failed"); return 0; } - ret = ser_get_line(upsfd, buf, sizeof(buf), ENDCHAR, IGNCHARS, - SER_WAIT_SEC, SER_WAIT_USEC); + ret = apc_read(buf, sizeof(buf), SER_TO); /* * Some UPSes support both 'V' and 'b'. As 'b' doesn't always return * firmware version, we attempt that only if 'V' doesn't work. */ if ((ret < 1) || (!strcmp(buf, "NA"))) { - upsdebugx(1, "Attempting firmware lookup using command 'b'"); - ret = ser_send_char(upsfd, 'b'); + upsdebugx(1, "attempting firmware lookup using command 'b'"); + ret = apc_write(APC_FW_NEW); if (ret != 1) { - upslog_with_errno(LOG_ERR, "firmware_table_lookup: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "firmware_table_lookup: apc_write failed"); return 0; } - ret = ser_get_line(upsfd, buf, sizeof(buf), ENDCHAR, IGNCHARS, - SER_WAIT_SEC, SER_WAIT_USEC); + ret = apc_read(buf, sizeof(buf), SER_TO); if (ret < 1) { - upslog_with_errno(LOG_ERR, "firmware_table_lookup: ser_get_line failed"); + upslog_with_errno(LOG_ERR, "firmware_table_lookup: apc_read failed"); return 0; } } - upsdebugx(2, "Firmware: [%s]", buf); + upsdebugx(2, "firmware: [%s]", buf); /* this will be reworked if we get a lot of these things */ - if (!strcmp(buf, "451.2.I")) { - quirk_capability_overflow = 1; - return 0; - } + if (!strcmp(buf, "451.2.I")) + /* quirk_capability_overflow */ + return 2; - for (i = 0; compat_tab[i].firmware != NULL; i++) { - if (!strcmp(compat_tab[i].firmware, buf)) { + for (i = 0; apc_compattab[i].firmware != NULL; i++) { + if (!strcmp(apc_compattab[i].firmware, buf)) { - upsdebugx(2, "Matched - cmdchars: %s", - compat_tab[i].cmdchars); + upsdebugx(2, "matched - cmdchars: %s", + apc_compattab[i].cmdchars); - if (strspn(compat_tab[i].firmware, "05")) { + if (strspn(apc_compattab[i].firmware, "05")) { dstate_setinfo("ups.model", "Matrix-UPS"); } else { dstate_setinfo("ups.model", "Smart-UPS"); } /* matched - run the cmdchars from the table */ - for (j = 0; j < strlen(compat_tab[i].cmdchars); j++) - protocol_verify(compat_tab[i].cmdchars[j]); + for (j = 0; j < strlen(apc_compattab[i].cmdchars); j++) + protocol_verify(apc_compattab[i].cmdchars[j]); + deprecate_vars(); return 1; /* matched */ } } - upsdebugx(2, "Not found in table - trying normal method"); - return 0; + return 0; } static void getbaseinfo(void) { unsigned int i; - int ret = 0; - char *alrts, *cmds, temp[512]; + int ret, qco; + char *cmds, temp[APC_LBUF]; /* * try firmware lookup first; we could start with 'a', but older models * sometimes return other things than a command set */ - if (firmware_table_lookup() == 1) + qco = firmware_table_lookup(); + if (qco == 1) + /* found compat */ return; - upsdebugx(1, "APC - Attempting to find command set"); - /* Initially we ask the UPS what commands it takes - If this fails we are going to need an alternate - strategy - we can deal with that if it happens - */ + upsdebugx(2, "firmware not found in compatibility table - trying normal method"); + upsdebugx(1, "APC - attempting to find command set"); + /* + * Initially we ask the UPS what commands it takes If this fails we are + * going to need an alternate strategy - we can deal with that if it + * happens + */ - ret = ser_send_char(upsfd, APC_CMDSET); + apc_flush(0); + ret = apc_write(APC_CMDSET); if (ret != 1) { - upslog_with_errno(LOG_ERR, "getbaseinfo: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "getbaseinfo: apc_write failed"); return; } - ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, IGNCHARS, - SER_WAIT_SEC, SER_WAIT_USEC); + ret = apc_read(temp, sizeof(temp), SER_CS|SER_TO); - if ((ret < 1) || (!strcmp(temp, "NA"))) { + if ((ret < 1) || (!strcmp(temp, "NA")) || !valid_cmd(APC_CMDSET, temp)) { /* We have an old dumb UPS - go to specific code for old stuff */ + upsdebugx(1, "APC - trying to handle unknown model"); oldapcsetup(); return; } - upsdebugx(1, "APC - Parsing out command set"); - /* We have the version.alert.cmdchars string - NB the alert chars are normally in IGNCHARS - so will have been pretty much edited out. - You will need to change the ser_get_line above if - you want to check those out too.... - */ - alrts = strchr(temp, '.'); - if (alrts == NULL) { - fatalx(EXIT_FAILURE, "Unable to split APC version string"); - } - *alrts++ = 0; - - cmds = strchr(alrts, '.'); - if (cmds == NULL) { - fatalx(EXIT_FAILURE, "Unable to find APC command string"); - } - *cmds++ = 0; - - for (i = 0; i < strlen(cmds); i++) + upsdebugx(1, "APC - Parsing out supported cmds and vars"); + /* + * returned set is verified for validity above, so just extract + * what's interesting for us + */ + cmds = strrchr(temp, '.'); + for (i = 1; i < strlen(cmds); i++) protocol_verify(cmds[i]); + deprecate_vars(); /* if capabilities are supported, add them here */ - if (strchr(cmds, APC_CAPABILITY)) - do_capabilities(); - - upsdebugx(1, "APC - UPS capabilities determined"); + if (strchr(cmds, APC_CAPS)) { + do_capabilities(qco); + upsdebugx(1, "APC - UPS capabilities determined"); + } } /* check for calibration status and either start or stop */ static int do_cal(int start) { - char temp[256]; + char temp[APC_LBUF]; int tval, ret; - ret = ser_send_char(upsfd, APC_STATUS); + apc_flush(SER_AA); + ret = apc_write(APC_STATUS); if (ret != 1) { - upslog_with_errno(LOG_ERR, "do_cal: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "do_cal: apc_write failed"); return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ } - ret = read_buf(temp, sizeof(temp)); + ret = apc_read(temp, sizeof(temp), SER_AA); /* if we can't check the current calibration status, bail out */ if ((ret < 1) || (!strcmp(temp, "NA"))) @@ -692,25 +1185,25 @@ static int do_cal(int start) if (tval & APC_STAT_CAL) { /* calibration currently happening */ if (start == 1) { /* requested start while calibration still running */ - upslogx(LOG_INFO, "Runtime calibration already in progress"); + upslogx(LOG_INFO, "runtime calibration already in progress"); return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ } /* stop requested */ - upslogx(LOG_INFO, "Stopping runtime calibration"); + upslogx(LOG_INFO, "stopping runtime calibration"); - ret = ser_send_char(upsfd, APC_CMD_CALTOGGLE); + ret = apc_write(APC_CMD_CALTOGGLE); if (ret != 1) { - upslog_with_errno(LOG_ERR, "do_cal: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "do_cal: apc_write failed"); return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ } - ret = read_buf(temp, sizeof(temp)); + ret = apc_read(temp, sizeof(temp), SER_AA); if ((ret < 1) || (!strcmp(temp, "NA")) || (!strcmp(temp, "NO"))) { - upslogx(LOG_WARNING, "Stop calibration failed: %s", + upslogx(LOG_WARNING, "stop calibration failed: %s", temp); return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ } @@ -721,65 +1214,91 @@ static int do_cal(int start) /* calibration not happening */ if (start == 0) { /* stop requested */ - upslogx(LOG_INFO, "Runtime calibration not occurring"); + upslogx(LOG_INFO, "runtime calibration not occurring"); return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ } - upslogx(LOG_INFO, "Starting runtime calibration"); + upslogx(LOG_INFO, "starting runtime calibration"); - ret = ser_send_char(upsfd, APC_CMD_CALTOGGLE); + ret = apc_write(APC_CMD_CALTOGGLE); if (ret != 1) { - upslog_with_errno(LOG_ERR, "do_cal: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "do_cal: apc_write failed"); return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ } - ret = read_buf(temp, sizeof(temp)); + ret = apc_read(temp, sizeof(temp), SER_AA); if ((ret < 1) || (!strcmp(temp, "NA")) || (!strcmp(temp, "NO"))) { - upslogx(LOG_WARNING, "Start calibration failed: %s", temp); + upslogx(LOG_WARNING, "start calibration failed: %s", temp); return STAT_INSTCMD_HANDLED; /* FUTURE: failure */ } return STAT_INSTCMD_HANDLED; /* FUTURE: success */ } +#if 0 /* get the UPS talking to us in smart mode */ static int smartmode(void) { - int ret, tries; - char temp[256]; + int ret; + char temp[APC_LBUF]; - for (tries = 0; tries < 5; tries++) { + apc_flush(0); + ret = apc_write(APC_GOSMART); + if (ret != 1) { + upslog_with_errno(LOG_ERR, "smartmode: apc_write failed"); + return 0; + } + ret = apc_read(temp, sizeof(temp), 0); - ret = ser_send_char(upsfd, APC_GOSMART); + if ((ret < 1) || (!strcmp(temp, "NA")) || (!strcmp(temp, "NO"))) { + upslogx(LOG_CRIT, "enabling smartmode failed !"); + return 0; + } + + return 1; +} +#endif + +/* + * get the UPS talking to us in smart mode + * note: this is weird overkill, but possibly excused due to some obscure + * hardware/firmware combinations; simpler version commmented out above, for + * now let's keep minimally adjusted old one + */ +static int smartmode(int cnt) +{ + int ret, tries; + char temp[APC_LBUF]; + + for (tries = 0; tries < cnt; tries++) { + + apc_flush(0); + ret = apc_write(APC_GOSMART); if (ret != 1) { - upslog_with_errno(LOG_ERR, "smartmode: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "smartmode: issuing 'Y' failed"); return 0; } + ret = apc_read(temp, sizeof(temp), SER_D1); + if (ret > 0 && !strcmp(temp, "SM")) + return 1; /* success */ + if (ret < 0) { + /* error, so we didn't timeout - wait a bit before retry */ + sleep(1); + } - ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, - IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); - - if (ret > 0) - if (!strcmp(temp, "SM")) - return 1; /* success */ - - sleep(1); /* wait before trying again */ - - /* it failed, so try to bail out of menus on newer units */ - - ret = ser_send_char(upsfd, 27); /* ESC */ + apc_flush(0); + ret = apc_write(27); /* ESC */ if (ret != 1) { - upslog_with_errno(LOG_ERR, "smartmode: ser_send_char failed"); + upslog_with_errno(LOG_ERR, "smartmode: issuing ESC failed"); return 0; } /* eat the response (might be NA, might be something else) */ - ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, - IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); + apc_read(temp, sizeof(temp), SER_TO|SER_D1); } return 0; /* failure */ @@ -787,158 +1306,178 @@ static int smartmode(void) /* * all shutdown commands should respond with 'OK' or '*' + * apc_read() handles conversion to 'OK' so we care only about that one + * ign allows for timeout without assuming an error */ -static int sdok(void) +static int sdok(int ign) { - char temp[16]; + int ret; + char temp[APC_SBUF]; - ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); - upsdebugx(4, "sdok: got \"%s\"", temp); - - if (!strcmp(temp, "*") || !strcmp(temp, "OK")) { - upsdebugx(4, "Last issued shutdown command succeeded"); - return 1; + /* + * older upses on failed commands might just timeout, we cut down + * timeout grace though + * furthermore, command 'Z' will not reply with anything + */ + ret = apc_read(temp, sizeof(temp), SER_HA|SER_D1|SER_TO); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "sdok: apc_read failed"); + return STAT_INSTCMD_FAILED; } - upsdebugx(1, "Last issued shutdown command failed"); - return 0; + upsdebugx(4, "sdok: got \"%s\"", temp); + + if ((!ret && ign) || !strcmp(temp, "OK")) { + upsdebugx(4, "sdok: last issued shutdown cmd succeeded"); + return STAT_INSTCMD_HANDLED; + } + + upsdebugx(1, "sdok: last issued shutdown cmd failed"); + return STAT_INSTCMD_FAILED; } /* soft hibernate: S - working only when OB, otherwise ignored */ -static int sdcmd_S(int dummy) +static int sdcmd_S(const void *foo) { - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + int ret; - upsdebugx(1, "Issuing soft hibernate"); - ser_send_char(upsfd, APC_CMD_SOFTDOWN); + apc_flush(0); + upsdebugx(1, "issuing soft hibernate"); + ret = apc_write(APC_CMD_SOFTDOWN); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "sdcmd_S: issuing 'S' failed"); + return STAT_INSTCMD_FAILED; + } - return sdok(); + return sdok(0); } -/* soft hibernate, hack version for CS 350 */ -static int sdcmd_CS(int tval) +/* soft hibernate, hack version for CS 350 & co. */ +static int sdcmd_CS(const void *foo) { - upsdebugx(1, "Using CS 350 'force OB' shutdown method"); - if (tval & APC_STAT_OL) { - upsdebugx(1, "On-line - forcing OB temporarily"); - ser_send_char(upsfd, 'U'); - usleep(UPSDELAY); + int ret; + char temp[APC_SBUF]; + + upsdebugx(1, "using CS 350 'force OB' shutdown method"); + if (ups_status & APC_STAT_OL) { + apc_flush(0); + upsdebugx(1, "status OL - forcing OB temporarily"); + ret = apc_write(APC_CMD_SIMPWF); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "sdcmd_CS: issuing 'U' failed"); + return STAT_INSTCMD_FAILED; + } + /* eat response */ + ret = apc_read(temp, sizeof(temp), SER_D1); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "sdcmd_CS: 'U' returned nothing ?"); + return STAT_INSTCMD_FAILED; + } } - return sdcmd_S(tval); + return sdcmd_S(0); } /* * hard hibernate: @nnn / @nn - * note: works differently for older and new models, see help function for - * detailed info + * note: works differently for older and new models, see manual page for + * thorough explanation */ -static int sdcmd_ATn(int cnt) +static int sdcmd_AT(const void *str) { - int n = 0, mmax, ret; - const char *strval; - char timer[4]; + int ret, cnt, padto, i; + const char *awd = str; + char temp[APC_SBUF], *ptr; - mmax = cnt == 2 ? 99 : 999; + if (!awd) + awd = "000"; - if ((strval = getval("wugrace"))) { - errno = 0; - n = strtol(strval, NULL, 10); - if (errno || n < 0 || n > mmax) - n = 0; + cnt = strlen(awd); + padto = cnt == 2 ? 2 : 3; + + temp[0] = APC_CMD_GRACEDOWN; + ptr = temp + 1; + for (i = cnt; i < padto ; i++) { + *ptr++ = '0'; + } + strcpy(ptr, awd); + + upsdebugx(1, "issuing '@' with %d minutes of additional wakeup delay", (int)strtol(awd, NULL, 10)*6); + + apc_flush(0); + ret = apc_write_long(temp); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "sdcmd_AT: issuing '@' with %d digits failed", padto); + return STAT_INSTCMD_FAILED; } - snprintf(timer, sizeof(timer), "%.*d", cnt, n); - - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - upsdebugx(1, "Issuing hard hibernate with %d minutes additional wakeup delay", n*6); - - ser_send_char(upsfd, APC_CMD_GRACEDOWN); - usleep(CMDLONGDELAY); - ser_send_pace(upsfd, UPSDELAY, "%s", timer); - - ret = sdok(); - if (ret || cnt == 3) + ret = sdok(0); + if (ret == STAT_INSTCMD_HANDLED || padto == 3) return ret; + upslog_with_errno(LOG_ERR, "sdcmd_AT: command '@' with 2 digits doesn't work - try 3 digits"); /* * "tricky" part - we tried @nn variation and it (unsurprisingly) * failed; we have to abort the sequence with something bogus to have * the clean state; newer upses will respond with 'NO', older will be * silent (YMMV); */ - ser_send_char(upsfd, APC_CMD_GRACEDOWN); - usleep(UPSDELAY); - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); + apc_write(APC_CMD_GRACEDOWN); + /* eat response, allow it to timeout */ + apc_read(temp, sizeof(temp), SER_D1|SER_TO); - return 0; + return STAT_INSTCMD_FAILED; } /* shutdown: K - delayed poweroff */ -static int sdcmd_K(int dummy) +static int sdcmd_K(const void *foo) { - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - upsdebugx(1, "Issuing delayed poweroff"); + int ret; - ser_send_char(upsfd, APC_CMD_SHUTDOWN); - usleep(CMDLONGDELAY); - ser_send_char(upsfd, APC_CMD_SHUTDOWN); + upsdebugx(1, "issuing 'K'"); - return sdok(); + apc_flush(0); + ret = apc_write_rep(APC_CMD_SHUTDOWN); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "sdcmd_K: issuing 'K' failed"); + return STAT_INSTCMD_FAILED; + } + + return sdok(0); } /* shutdown: Z - immediate poweroff */ -static int sdcmd_Z(int dummy) +static int sdcmd_Z(const void *foo) { - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - upsdebugx(1, "Issuing immediate poweroff"); + int ret; - ser_send_char(upsfd, APC_CMD_OFF); - usleep(CMDLONGDELAY); - ser_send_char(upsfd, APC_CMD_OFF); + upsdebugx(1, "issuing 'Z'"); - return sdok(); + apc_flush(0); + ret = apc_write_rep(APC_CMD_OFF); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "sdcmd_Z: issuing 'Z' failed"); + return STAT_INSTCMD_FAILED; + } + + /* note: ups will not reply anything after this command */ + return sdok(1); } -static int (*sdlist[])(int) = { - sdcmd_S, - sdcmd_ATn, /* for @nnn version */ - sdcmd_K, - sdcmd_Z, - sdcmd_CS, - sdcmd_ATn, /* for @nn version */ -}; - -#define SDIDX_S 0 -#define SDIDX_AT3N 1 -#define SDIDX_K 2 -#define SDIDX_Z 3 -#define SDIDX_CS 4 -#define SDIDX_AT2N 5 - -#define SDCNT 6 - -static void upsdrv_shutdown_simple(int status) +static void upsdrv_shutdown_simple(void) { unsigned int sdtype = 0; - char *strval; + const char *val; - if ((strval = getval("sdtype"))) { - errno = 0; - sdtype = strtol(strval, NULL, 10); - if (errno || sdtype < 0 || sdtype > 6) - sdtype = 0; - } + if ((val = getval("sdtype"))) + sdtype = strtol(val, NULL, 10); switch (sdtype) { - case 6: /* hard hibernate */ - sdcmd_ATn(3); - break; - case 5: /* "hack nn" hard hibernate */ - sdcmd_ATn(2); + case 5: /* hard hibernate */ + sdcmd_AT(getval("awd")); break; case 4: /* special hack for CS 350 and similar models */ - sdcmd_CS(status); + sdcmd_CS(0); break; case 3: /* delayed poweroff */ @@ -956,68 +1495,48 @@ static void upsdrv_shutdown_simple(int status) * hard hibernate '@nnn' commands */ upsdebugx(1, "UPS - currently %s - sending soft/hard hibernate commands", - (status & APC_STAT_OL) ? "on-line" : "on battery"); + (ups_status & APC_STAT_OL) ? "on-line" : "on battery"); /* S works only when OB */ - if ((status & APC_STAT_OB) && sdcmd_S(0)) + if ((ups_status & APC_STAT_OB) && sdcmd_S(0) == STAT_INSTCMD_HANDLED) break; - sdcmd_ATn(3); + sdcmd_AT(getval("awd")); break; default: /* * Send @nnn or S, depending on OB / OL status */ - if (status & APC_STAT_OL) /* on line */ - sdcmd_ATn(3); + if (ups_status & APC_STAT_OL) /* on line */ + sdcmd_AT(getval("awd")); else sdcmd_S(0); } } -static void upsdrv_shutdown_advanced(int status) +static void upsdrv_shutdown_advanced(void) { - const char *strval; - const char deforder[] = {48 + SDIDX_S, - 48 + SDIDX_AT3N, - 48 + SDIDX_K, - 48 + SDIDX_Z, - 0}; - size_t i; - int n; + const void *arg; + const char *val; + size_t i, len; - strval = getval("advorder"); - - /* sanitize advorder */ - - if (!strval || !strlen(strval) || strlen(strval) > SDCNT) - strval = deforder; - for (i = 0; i < strlen(strval); i++) { - if (strval[i] - 48 < 0 || strval[i] - 48 >= SDCNT) { - strval = deforder; - break; - } - } + val = getval("advorder"); + len = strlen(val); /* * try each method in the list with a little bit of handling in certain * cases */ - - for (i = 0; i < strlen(strval); i++) { - switch (strval[i] - 48) { - case SDIDX_CS: - n = status; + for (i = 0; i < len; i++) { + switch (val[i] - '0') { + case SDIDX_AT: + arg = getval("awd"); break; - case SDIDX_AT3N: - n = 3; - break; - case SDIDX_AT2N: default: - n = 2; + arg = NULL; } - if (sdlist[strval[i] - 48](n)) + if (sdlist[val[i] - '0'](arg) == STAT_INSTCMD_HANDLED) break; /* finish if command succeeded */ } } @@ -1025,43 +1544,35 @@ static void upsdrv_shutdown_advanced(int status) /* power down the attached load immediately */ void upsdrv_shutdown(void) { - char temp[32]; - int ret, status; + char temp[APC_LBUF]; + int ret; - if (!smartmode()) + if (!smartmode(1)) upsdebugx(1, "SM detection failed. Trying a shutdown command anyway"); /* check the line status */ - ret = ser_send_char(upsfd, APC_STATUS); + ret = apc_write(APC_STATUS); if (ret == 1) { - ret = ser_get_line(upsfd, temp, sizeof(temp), ENDCHAR, - IGNCHARS, SER_WAIT_SEC, SER_WAIT_USEC); + ret = apc_read(temp, sizeof(temp), SER_D1); if (ret < 1) { - upsdebugx(1, "Status read failed ! Assuming on battery state"); - status = APC_STAT_LB | APC_STAT_OB; + upsdebugx(1, "status read failed ! assuming on battery state"); + ups_status = APC_STAT_LB | APC_STAT_OB; } else { - status = strtol(temp, 0, 16); + ups_status = strtol(temp, 0, 16); } } else { - upsdebugx(1, "Status request failed; assuming on battery state"); - status = APC_STAT_LB | APC_STAT_OB; + upsdebugx(1, "status request failed; assuming on battery state"); + ups_status = APC_STAT_LB | APC_STAT_OB; } if (testvar("advorder") && strcasecmp(getval("advorder"), "no")) - upsdrv_shutdown_advanced(status); + upsdrv_shutdown_advanced(); else - upsdrv_shutdown_simple(status); -} - -/* 940-0095B support: set DTR, lower RTS */ -static void init_serial_0095B(void) -{ - ser_set_dtr(upsfd, 1); - ser_set_rts(upsfd, 0); + upsdrv_shutdown_simple(); } static void update_info_normal(void) @@ -1104,75 +1615,76 @@ static void update_info_all(void) static int setvar_enum(apc_vartab_t *vt, const char *val) { int i, ret; - char orig[256], temp[256]; + char orig[APC_LBUF], temp[APC_LBUF]; const char *ptr; - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - ret = ser_send_char(upsfd, vt->cmd); + apc_flush(SER_AA); + ret = apc_write(vt->cmd); if (ret != 1) { - upslog_with_errno(LOG_ERR, "setvar_enum: ser_send_char failed"); - return STAT_SET_HANDLED; /* FUTURE: failed */ + upslog_with_errno(LOG_ERR, "setvar_enum: apc_write failed"); + return STAT_SET_FAILED; } - ret = read_buf(orig, sizeof(orig)); + ret = apc_read(orig, sizeof(orig), SER_AA); if ((ret < 1) || (!strcmp(orig, "NA"))) - return STAT_SET_HANDLED; /* FUTURE: failed */ + return STAT_SET_FAILED; ptr = convert_data(vt, orig); /* suppress redundant changes - easier on the eeprom */ if (!strcmp(ptr, val)) { - upslogx(LOG_INFO, "Ignoring enum SET %s='%s' (unchanged value)", + upslogx(LOG_INFO, "ignoring enum SET %s='%s' (unchanged value)", vt->name, val); return STAT_SET_HANDLED; /* FUTURE: no change */ } for (i = 0; i < 6; i++) { - ret = ser_send_char(upsfd, APC_NEXTVAL); + ret = apc_write(APC_NEXTVAL); if (ret != 1) { - upslog_with_errno(LOG_ERR, "setvar_enum: ser_send_char failed"); - return STAT_SET_HANDLED; /* FUTURE: failed */ + upslog_with_errno(LOG_ERR, "setvar_enum: apc_write failed"); + return STAT_SET_FAILED; } /* this should return either OK (if rotated) or NO (if not) */ - ret = read_buf(temp, sizeof(temp)); + ret = apc_read(temp, sizeof(temp), SER_AA); if ((ret < 1) || (!strcmp(temp, "NA"))) - return STAT_SET_HANDLED; /* FUTURE: failed */ + return STAT_SET_FAILED; /* sanity checks */ if (!strcmp(temp, "NO")) - return STAT_SET_HANDLED; /* FUTURE: failed */ - if (strcmp(temp, "OK") != 0) - return STAT_SET_HANDLED; /* FUTURE: failed */ + return STAT_SET_FAILED; + if (strcmp(temp, "OK")) + return STAT_SET_FAILED; /* see what it rotated onto */ - ret = ser_send_char(upsfd, vt->cmd); + ret = apc_write(vt->cmd); if (ret != 1) { - upslog_with_errno(LOG_ERR, "setvar_enum: ser_send_char failed"); - return STAT_SET_HANDLED; /* FUTURE: failed */ + upslog_with_errno(LOG_ERR, "setvar_enum: apc_write failed"); + return STAT_SET_FAILED; } - ret = read_buf(temp, sizeof(temp)); + ret = apc_read(temp, sizeof(temp), SER_AA); if ((ret < 1) || (!strcmp(temp, "NA"))) - return STAT_SET_HANDLED; /* FUTURE: failed */ + return STAT_SET_FAILED; ptr = convert_data(vt, temp); - upsdebugx(1, "Rotate value: got [%s], want [%s]", + upsdebugx(1, "rotate value: got [%s], want [%s]", ptr, val); if (!strcmp(ptr, val)) { /* got it */ upslogx(LOG_INFO, "SET %s='%s'", vt->name, val); /* refresh data from the hardware */ - query_ups(vt->name, 0); + poll_data(vt); + /* query_ups(vt->name, 0); */ return STAT_SET_HANDLED; /* FUTURE: success */ } @@ -1182,15 +1694,16 @@ static int setvar_enum(apc_vartab_t *vt, const char *val) upslogx(LOG_ERR, "setvar: variable %s wrapped", vt->name); - return STAT_SET_HANDLED; /* FUTURE: failed */ - } + return STAT_SET_FAILED; + } } upslogx(LOG_ERR, "setvar: gave up after 6 tries for %s", vt->name); /* refresh data from the hardware */ - query_ups(vt->name, 0); + poll_data(vt); + /* query_ups(vt->name, 0); */ return STAT_SET_HANDLED; } @@ -1199,79 +1712,69 @@ static int setvar_string(apc_vartab_t *vt, const char *val) { unsigned int i; int ret; - char temp[256]; + char temp[APC_LBUF], *ptr; - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - ret = ser_send_char(upsfd, vt->cmd); - - if (ret != 1) { - upslog_with_errno(LOG_ERR, "setvar_string: ser_send_char failed"); - return STAT_SET_HANDLED; /* FUTURE: failed */ + /* sanitize length */ + if (strlen(val) > APC_STRLEN) { + upslogx(LOG_ERR, "setvar_string: value (%s) too long", val); + return STAT_SET_FAILED; } - ret = read_buf(temp, sizeof(temp)); + apc_flush(SER_AA); + ret = apc_write(vt->cmd); + + if (ret != 1) { + upslog_with_errno(LOG_ERR, "setvar_string: apc_write failed"); + return STAT_SET_FAILED; + } + + ret = apc_read(temp, sizeof(temp), SER_AA); if ((ret < 1) || (!strcmp(temp, "NA"))) - return STAT_SET_HANDLED; /* FUTURE: failed */ + return STAT_SET_FAILED; /* suppress redundant changes - easier on the eeprom */ if (!strcmp(temp, val)) { - upslogx(LOG_INFO, "Ignoring string SET %s='%s' (unchanged value)", + upslogx(LOG_INFO, "ignoring string SET %s='%s' (unchanged value)", vt->name, val); return STAT_SET_HANDLED; /* FUTURE: no change */ } - ret = ser_send_char(upsfd, APC_NEXTVAL); + /* length sanitized above */ + temp[0] = APC_NEXTVAL; + strcpy(temp + 1, val); + ptr = temp + strlen(temp); + for (i = strlen(val); i < APC_STRLEN; i++) + *ptr++ = '\015'; /* pad with CRs */ + *ptr = 0; - if (ret != 1) { - upslog_with_errno(LOG_ERR, "setvar_string: ser_send_char failed"); - return STAT_SET_HANDLED; /* FUTURE: failed */ + ret = apc_write_long(ptr); + + if ((size_t)ret != strlen(ptr)) { + upslog_with_errno(LOG_ERR, "setvar_string: apc_write_long failed"); + return STAT_SET_FAILED; } - usleep(UPSDELAY); - - for (i = 0; i < strlen(val); i++) { - ret = ser_send_char(upsfd, val[i]); - - if (ret != 1) { - upslog_with_errno(LOG_ERR, "setvar_string: ser_send_char failed"); - return STAT_SET_HANDLED; /* FUTURE: failed */ - } - - usleep(UPSDELAY); - } - - /* pad to 8 chars with CRs */ - for (i = strlen(val); i < APC_STRLEN; i++) { - ret = ser_send_char(upsfd, 13); - - if (ret != 1) { - upslog_with_errno(LOG_ERR, "setvar_string: ser_send_char failed"); - return STAT_SET_HANDLED; /* FUTURE: failed */ - } - - usleep(UPSDELAY); - } - - ret = read_buf(temp, sizeof(temp)); + ret = apc_read(temp, sizeof(temp), SER_AA); if (ret < 1) { upslogx(LOG_ERR, "setvar_string: short final read"); - return STAT_SET_HANDLED; /* FUTURE: failed */ + return STAT_SET_FAILED; } if (!strcmp(temp, "NO")) { upslogx(LOG_ERR, "setvar_string: got NO at final read"); - return STAT_SET_HANDLED; /* FUTURE: failed */ + return STAT_SET_FAILED; } /* refresh data from the hardware */ - query_ups(vt->name, 0); + poll_data(vt); + /* query_ups(vt->name, 0); */ upslogx(LOG_INFO, "SET %s='%s'", vt->name, val); - return STAT_SET_HANDLED; /* FUTURE: failed */ + return STAT_SET_HANDLED; /* FUTURE: success */ } static int setvar(const char *varname, const char *val) @@ -1298,50 +1801,69 @@ static int setvar(const char *varname, const char *val) return STAT_SET_UNKNOWN; } -/* actually send the instcmd's char to the ups */ -static int do_cmd(apc_cmdtab_t *ct) +/* load on */ +static int do_loadon(void) { - int ret; - char buf[SMALLBUF]; + int ret; + apc_flush(0); + upsdebugx(1, "issuing load-on command"); - ser_flush_in(upsfd, IGNCHARS, nut_debug_level); - ret = ser_send_char(upsfd, ct->cmd); - - if (ret != 1) { - upslog_with_errno(LOG_ERR, "do_cmd: ser_send_char failed"); - return STAT_INSTCMD_HANDLED; /* FUTURE: failed */ + ret = apc_write_rep(APC_CMD_ON); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "do_loadon: apc_write_rep failed"); + return STAT_INSTCMD_FAILED; } - /* some commands have to be sent twice with a 1.5s gap */ + /* + * ups will not reply anything after this command, but might + * generate brief OVER condition (which will be corrected on + * the next status update) + */ + + upsdebugx(1, "load-on command (apc:^N) executed"); + return STAT_INSTCMD_HANDLED; +} + +/* actually send the instcmd's char to the ups */ +static int do_cmd(const apc_cmdtab_t *ct) +{ + int ret; + char temp[APC_LBUF]; + const char *strerr; + + apc_flush(SER_AA); + if (ct->flags & APC_REPEAT) { - usleep(CMDLONGDELAY); - - ret = ser_send_char(upsfd, ct->cmd); - - if (ret != 1) { - upslog_with_errno(LOG_ERR, "do_cmd: ser_send_char failed"); - return STAT_INSTCMD_HANDLED; /* FUTURE: failed */ - } + ret = apc_write_rep(ct->cmd); + strerr = "apc_write_rep"; + } else { + ret = apc_write(ct->cmd); + strerr = "apc_write"; } - ret = read_buf(buf, sizeof(buf)); + if (ret < 1) { + upslog_with_errno(LOG_ERR, "do_cmd: %s failed", strerr); + return STAT_INSTCMD_FAILED; + } + + ret = apc_read(temp, sizeof(temp), SER_AA); if (ret < 1) - return STAT_INSTCMD_HANDLED; /* FUTURE: failed */ + return STAT_INSTCMD_FAILED; - if (strcmp(buf, "OK") != 0) { - upslogx(LOG_WARNING, "Got [%s] after command [%s]", - buf, ct->name); + if (strcmp(temp, "OK")) { + upslogx(LOG_WARNING, "got [%s] after command [%s]", + temp, ct->name); - return STAT_INSTCMD_HANDLED; /* FUTURE: failed */ + return STAT_INSTCMD_FAILED; } - upslogx(LOG_INFO, "Command: %s", ct->name); - return STAT_INSTCMD_HANDLED; /* FUTURE: success */ + upslogx(LOG_INFO, "command: %s", ct->name); + return STAT_INSTCMD_HANDLED; } /* some commands must be repeated in a window to execute */ -static int instcmd_chktime(apc_cmdtab_t *ct) +static int instcmd_chktime(apc_cmdtab_t *ct, const char *ext) { double elapsed; time_t now; @@ -1354,48 +1876,89 @@ static int instcmd_chktime(apc_cmdtab_t *ct) /* you have to hit this in a small window or it fails */ if ((elapsed < MINCMDTIME) || (elapsed > MAXCMDTIME)) { - upsdebugx(1, "instcmd_chktime: outside window for %s (%2.0f)", - ct->name, elapsed); - return STAT_INSTCMD_HANDLED; /* FUTURE: again */ + upsdebugx(1, "instcmd_chktime: outside window for [%s %s] (%2.0f)", + ct->name, ext ? ext : "\b", elapsed); + return 0; } - return do_cmd(ct); + return 1; } -static int instcmd(const char *cmdname, const char *extra) +static int instcmd(const char *cmd, const char *ext) { - int i; - apc_cmdtab_t *ct; + int i; + apc_cmdtab_t *ct = NULL; - ct = NULL; - - for (i = 0; apc_cmdtab[i].name != NULL; i++) - if (!strcasecmp(apc_cmdtab[i].name, cmdname)) - ct = &apc_cmdtab[i]; + for (i = 0; apc_cmdtab[i].name != NULL; i++) { + /* main command must match */ + if (strcasecmp(apc_cmdtab[i].name, cmd)) + continue; + /* extra was provided - check it */ + if (ext && *ext) { + if (!apc_cmdtab[i].ext) + continue; + if (strlen(apc_cmdtab[i].ext) > 2) { + if (rexhlp(apc_cmdtab[i].ext, ext)) + continue; + } else { + if (strcasecmp(apc_cmdtab[i].ext, ext)) + continue; + } + } else if (apc_cmdtab[i].ext) + continue; + ct = &apc_cmdtab[i]; + break; + } if (!ct) { - upslogx(LOG_WARNING, "instcmd: unknown command [%s]", cmdname); - return STAT_INSTCMD_UNKNOWN; + upslogx(LOG_WARNING, "instcmd: unknown command [%s %s]", cmd, + ext ? ext : "\b"); + return STAT_INSTCMD_INVALID; } - if ((ct->flags & APC_PRESENT) == 0) { - upslogx(LOG_WARNING, "instcmd: command [%s] is not supported", - cmdname); - return STAT_INSTCMD_UNKNOWN; + if (!(ct->flags & APC_PRESENT)) { + upslogx(LOG_WARNING, "instcmd: command [%s %s] recognized, but" + " not supported by your UPS model", cmd, + ext ? ext : "\b"); + return STAT_INSTCMD_INVALID; } - if (!strcasecmp(cmdname, "calibrate.start")) + /* first verify if the command is "nasty" */ + if ((ct->flags & APC_NASTY) && !instcmd_chktime(ct, ext)) + return STAT_INSTCMD_HANDLED; /* future: again */ + + /* we're good to go, handle special stuff first, then generic cmd */ + + if (!strcasecmp(cmd, "calibrate.start")) return do_cal(1); - if (!strcasecmp(cmdname, "calibrate.stop")) + if (!strcasecmp(cmd, "calibrate.stop")) return do_cal(0); - if (ct->flags & APC_NASTY) - return instcmd_chktime(ct); + if (!strcasecmp(cmd, "load.on")) + return do_loadon(); + + if (!strcasecmp(cmd, "load.off")) + return sdcmd_Z(0); + + if (!strcasecmp(cmd, "shutdown.stayoff")) + return sdcmd_K(0); + + if (!strcasecmp(cmd, "shutdown.return")) { + if (!ext || !*ext) + return sdcmd_S(0); + + /* ext length is guaranteed by regex match above */ + if (!strncasecmp(ext, "at", 2)) + return sdcmd_AT(ext + 3); + + if (!strncasecmp(ext, "cs", 2)) + return sdcmd_CS(0); + } /* nothing special here */ return do_cmd(ct); -} +} /* install pointers to functions for msg handlers called from msgparse */ static void setuphandlers(void) @@ -1408,26 +1971,53 @@ static void setuphandlers(void) void upsdrv_makevartable(void) { - addvar(VAR_VALUE, "cable", "Specify alternate cable (940-0095B)"); - addvar(VAR_VALUE, "wugrace", "Hard hibernate's wakeup grace"); - addvar(VAR_VALUE, "sdtype", "Specify simple shutdown method (0-6)"); - addvar(VAR_VALUE, "advorder", "Enable advanced shutdown control"); + addvar(VAR_VALUE, "cable", "specify alternate cable (940-0095B)"); + addvar(VAR_VALUE, "awd", "hard hibernate's additional wakeup delay"); + addvar(VAR_VALUE, "sdtype", "specify simple shutdown method (0 - " APC_SDMAX ")"); + addvar(VAR_VALUE, "advorder", "enable advanced shutdown control"); } void upsdrv_initups(void) { - char *cable; + size_t i, len; + char *val; - upsfd = ser_open(device_path); - ser_set_speed(upsfd, device_path, B2400); + upsfd = extrafd = ser_open(device_path); + apc_ser_set(); - cable = getval("cable"); + /* sanitize awd (additional waekup delay of '@' command) */ + if ((val = getval("awd")) && rexhlp(APC_AWDFMT, val)) { + fatalx(EXIT_FAILURE, "invalid value (%s) for option 'awd'", val); + } - if (cable && !strcasecmp(cable, ALT_CABLE_1)) - init_serial_0095B(); + /* sanitize sdtype */ + if ((val = getval("sdtype")) && rexhlp(APC_SDFMT, val)) { + fatalx(EXIT_FAILURE, "invalid value (%s) for option 'sdtype'", val); + } - /* make sure we wake up if the UPS sends alert chars to us */ - extrafd = upsfd; + /* sanitize advorder */ + if ((val = getval("advorder")) && strcasecmp(val, "no")) { + len = strlen(val); + + if (!len || len > SDCNT) + fatalx(EXIT_FAILURE, "invalid length of 'advorder' option (%s)", val); + for (i = 0; i < len; i++) { + if (val[i] < '0' || val[i] >= '0' + SDCNT) { + fatalx(EXIT_FAILURE, "invalid characters in 'advorder' option (%s)", val); + } + } + } +} + +void upsdrv_cleanup(void) +{ + char temp[APC_LBUF]; + + apc_flush(0); + /* try to bring the UPS out of smart mode */ + apc_write(APC_GODUMB); + apc_read(temp, sizeof(temp), SER_TO); + ser_close(upsfd, device_path); } void upsdrv_help(void) @@ -1438,10 +2028,10 @@ void upsdrv_initinfo(void) { const char *pmod, *pser; - if (!smartmode()) { - fatalx(EXIT_FAILURE, - "Unable to detect an APC Smart protocol UPS on port %s\n" - "Check the cabling, port name or model name and try again", device_path + if (!smartmode(5)) { + fatalx(EXIT_FAILURE, + "unable to detect an APC Smart protocol UPS on port %s\n" + "check the cabling, port name or model name and try again", device_path ); } @@ -1455,26 +2045,35 @@ void upsdrv_initinfo(void) if (!(pser = dstate_getinfo("ups.serial"))) pser = "unknown serial"; - upsdebugx(1, "Detected %s [%s] on %s", pmod, pser, device_path); + upsdebugx(1, "detected %s [%s] on %s", pmod, pser, device_path); setuphandlers(); } void upsdrv_updateinfo(void) { - static time_t last_full = 0; - time_t now; + static int last_worked = 0; + static time_t last_full = 0; + time_t now; /* try to wake up a dead ups once in awhile */ - if ((dstate_is_stale()) && (!smartmode())) { - ser_comm_fail("Communications with UPS lost - check cabling"); + if (dstate_is_stale()) { + if (!last_worked) + upsdebugx(LOG_DEBUG, "upsdrv_updateinfo: comm lost"); /* reset this so a full update runs when the UPS returns */ last_full = 0; - return; - } - ser_comm_good(); + if (++last_worked < 10) + return; + + /* become aggressive after a few tries */ + upsdebugx(LOG_DEBUG, "upsdrv_updateinfo: nudging ups with 'Y', iteration #%d ...", last_worked); + if (!smartmode(1)) + return; + + last_worked = 0; + } if (!update_status()) return; @@ -1491,11 +2090,3 @@ void upsdrv_updateinfo(void) update_info_normal(); } - -void upsdrv_cleanup(void) -{ - /* try to bring the UPS out of smart mode */ - ser_send_char(upsfd, APC_GODUMB); - - ser_close(upsfd, device_path); -} diff --git a/drivers/apcsmart.h b/drivers/apcsmart.h index f143cfa..e10c5fe 100644 --- a/drivers/apcsmart.h +++ b/drivers/apcsmart.h @@ -1,50 +1,88 @@ -/* apcsmart.h - command table for APC smart protocol units +/* + * apcsmart.h - common defines for apcsmart driver + * + * Copyright (C) 1999 Russell Kroll + * (C) 2000 Nigel Metheringham + * (C) 2011 Michal Soltys + * + * 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 + */ - Copyright (C) 1999 Russell Kroll - (C) 2000 Nigel Metheringham +#ifndef __apcsmart_h__ +#define __apcsmart_h__ - 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. +#define DRIVER_NAME "APC Smart protocol driver" +#define DRIVER_VERSION "3.0" - 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. +#define ALT_CABLE_1 "940-0095B" - 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 -*/ +/* + * alerts and other stuff for quick reference: + * + * $ OL + * ! OB + * % LB + * + not LB anymore + * # RB + * ? OVER + * = not OVER anymore + * * powering down now (only older models ?), handled by upsread() + * otherwise ignored (it doesn't have to be in ignore sets) + * + * | eeprom change + * & check alarm register for fail + * ~ ??? + */ -#include -#include -#include "serial.h" -#include "timehead.h" - -#define APC_TABLE_VERSION "version 2.2" +/* + * old ones for reference: + * #define IGNCHARS "\015+$|!~%?=#&" + * #define POLL_IGNORE "\015&|" + * #define POLL_ALERT "$!%+#?=" + * #define MINIGNCHARS "\015+$|!" + * notice ~ that was present in IGNCHARS, but not in POLL_IGNORE - this kinda + * didn't make sense (?); new versions doesn't filter ~, but keep that in mind + * in case something obscure surfaces + * due to switch to ICANON tty mode, we removed \015 from ignored characters, + * as it's handled by IGNCR at read() level + */ /* Basic UPS reply line structure */ -#define ENDCHAR 10 /* APC ends responses with LF */ +#define ENDCHAR 10 /* APC ends responses with LF (and CR, but it's IGNCRed) */ -/* characters ignored by default */ -#define IGNCHARS "\015+$|!~%?=#&" /* special characters to ignore */ +/* what to ignore during alert aware serial reads */ +#define IGN_AACHARS "|&" -/* these one is used only during startup, due to ^Z sending certain characters such as # */ -#define MINIGNCHARS "\015+$|!" /* minimum set of special characters to ignore */ +/* what alert_handler() should care about */ +#define ALERT_CHARS "$!%+#?=" -/* normal polls: characters we don't want to parse (including a few alerts) */ -#define POLL_IGNORE "\015&|" +/* characters ignored by alertless reads */ +#define IGN_CHARS IGN_AACHARS ALERT_CHARS -/* alert characters we care about - OL, OB, LB, not LB, RB, OVER, not OVER */ -#define POLL_ALERT "$!%+#?=" +/* + * these ones are used only during capability read, due to ^Z sending certain + * characters such as #; it seems it could be equal to just IGN_CHARS w/o # + * old: #define IGN_CCCHARS "|$!+" + */ +#define IGN_CCCHARS "|&$!%+?=" /* capability check ignore set */ -#define UPSDELAY 50000 /* slow down multicharacter commands */ -#define CMDLONGDELAY 1500000 /* some commands need a 1.5s gap for safety */ - -#define SER_WAIT_SEC 3 /* wait up to 3.0 sec for ser_get calls */ -#define SER_WAIT_USEC 0 +/* + * command set 'a' command reports everything - protocol number, alerts and + * supported commands + */ +#define IGN_CSCHARS "" /* command set ignore set */ /* dangerous instant commands must be reconfirmed within a 12 second window */ #define MINCMDTIME 3 @@ -53,239 +91,61 @@ /* it only does two strings, and they're both the same length */ #define APC_STRLEN 8 +#define SER_D0 0x001 /* 0 sec., for flushes */ +#define SER_DX 0x002 /* 200 ms for long/repeated cmds, in case of unexpected NAs */ +#define SER_D1 0x004 /* 1.5 sec. */ +#define SER_D3 0x008 /* 3 sec. (default) */ +#define SER_AA 0x010 /* alert aware set */ +#define SER_CC 0x020 /* capability check ign set */ +#define SER_CS 0x040 /* command set ign set */ +#define SER_TO 0x080 /* timeout allowed */ +#define SER_HA 0x100 /* handle asterisk */ + + +/* sets of the above (don't test against them, obviously */ + +/* + * Some cmd codes to ignore (nut doesn't expose those, though the driver might + * use them internally (e.g. [a]). If you decide to support them at some + * point, remember about removing them from here ! + */ +#define APC_UNR_CMDS "\032\177~')-+8QRYayz" + /* --------------- */ /* status bits */ -#define APC_STAT_CAL 1 /* calibration */ -#define APC_STAT_TRIM 2 /* SmartTrim */ -#define APC_STAT_BOOST 4 /* SmartBoost */ -#define APC_STAT_OL 8 /* on line */ -#define APC_STAT_OB 16 /* on battery */ -#define APC_STAT_OVER 32 /* overload */ -#define APC_STAT_LB 64 /* low battery */ -#define APC_STAT_RB 128 /* replace battery */ +#define APC_STAT_CAL 0x01 /* calibration */ +#define APC_STAT_TRIM 0x02 /* SmartTrim */ +#define APC_STAT_BOOST 0x04 /* SmartBoost */ +#define APC_STAT_OL 0x08 /* on line */ +#define APC_STAT_OB 0x10 /* on battery */ +#define APC_STAT_OVER 0x20 /* overload */ +#define APC_STAT_LB 0x40 /* low battery */ +#define APC_STAT_RB 0x80 /* replace battery */ -/* serial protocol: special commands - initialization and such */ +/* + * serial protocol: special commands - initialization and such + * these are not exposed as instant commands + */ #define APC_STATUS 'Q' #define APC_GOSMART 'Y' #define APC_GODUMB 'R' #define APC_CMDSET 'a' -#define APC_CAPABILITY 26 /* ^Z */ +#define APC_CAPS '\032' /* ^Z */ #define APC_NEXTVAL '-' +#define APC_FW_OLD 'V' +#define APC_FW_NEW 'b' -/* --------------- */ +#define APC_LBUF 512 +#define APC_SBUF 32 -/* Driver command table flag values */ +/* default a.w.d. value / regex format for command '@' */ +#define APC_AWDDEF "000" +#define APC_AWDFMT "^[0-9]{1,3}$" -#define APC_POLL 0x0001 /* Poll this variable regularly */ -#define APC_PRESENT 0x0004 /* Capability seen on this UPS */ +/* maximum number of supported sdtype methods + regex format*/ +#define APC_SDMAX "5" +#define APC_SDFMT "^[0-5]$" -#define APC_RW 0x0010 /* read-write variable */ -#define APC_ENUM 0x0020 /* enumerated type */ -#define APC_STRING 0x0040 /* string */ - -#define APC_NASTY 0x0100 /* Nasty command - take care */ -#define APC_REPEAT 0x0200 /* Command needs sending twice */ - -#define APC_FORMATMASK 0xFF0000 /* Mask for apc data formats */ - -#define APC_F_PERCENT 0x020000 /* Data in a percent format */ -#define APC_F_VOLT 0x030000 /* Data in a voltage format */ -#define APC_F_AMP 0x040000 /* Data in a current/amp format */ -#define APC_F_CELSIUS 0x050000 /* Data in a temp/C format */ -#define APC_F_HEX 0x060000 /* Data in a hex number format */ -#define APC_F_DEC 0x070000 /* Data in a decimal format */ -#define APC_F_SECONDS 0x100000 /* Time in seconds */ -#define APC_F_MINUTES 0x110000 /* Time in minutes */ -#define APC_F_HOURS 0x120000 /* Time in hours */ -#define APC_F_REASON 0x130000 /* Reason of transfer */ -#define APC_F_LEAVE 0 /* Just pass this through */ - -typedef struct { - const char *name; /* the variable name */ - unsigned int flags; /* various flags */ - char cmd; /* command character */ -} apc_vartab_t; - -apc_vartab_t apc_vartab[] = { - - { "ups.firmware.old", 0, 'V' }, - { "ups.firmware", 0, 'b' }, - { "ups.firmware.aux", 0, 'v' }, - { "ups.model", 0, 0x01 }, - - { "ups.serial", 0, 'n' }, - { "ups.mfr.date", 0, 'm' }, - - { "ups.temperature", APC_POLL|APC_F_CELSIUS, 'C' }, - { "ups.load", APC_POLL|APC_F_PERCENT, 'P' }, - - { "ups.test.interval", APC_F_HOURS, 'E' }, - { "ups.test.result", APC_POLL, 'X' }, - - { "ups.delay.start", APC_F_SECONDS, 'r' }, - { "ups.delay.shutdown", APC_F_SECONDS, 'p' }, - - { "ups.id", APC_STRING, 'c' }, - - { "ups.contacts", APC_POLL|APC_F_HEX, 'i' }, - { "ups.display.language", - 0, 0x0C }, - - { "input.voltage", APC_POLL|APC_F_VOLT, 'L' }, - { "input.frequency", APC_POLL|APC_F_DEC, 'F' }, - { "input.sensitivity", 0, 's' }, - { "input.quality", APC_POLL|APC_F_HEX, '9' }, - - { "input.transfer.low", APC_F_VOLT, 'l' }, - { "input.transfer.high", - APC_F_VOLT, 'u' }, - { "input.transfer.reason", - APC_POLL|APC_F_REASON, 'G' }, - - { "input.voltage.maximum", - APC_POLL|APC_F_VOLT, 'M' }, - { "input.voltage.minimum", - APC_POLL|APC_F_VOLT, 'N' }, - - { "output.current", APC_POLL|APC_F_AMP, '/' }, - { "output.voltage", APC_POLL|APC_F_VOLT, 'O' }, - { "output.voltage.nominal", - APC_F_VOLT, 'o' }, - - { "ambient.humidity", APC_POLL|APC_F_PERCENT, 'h' }, - { "ambient.humidity.high", - APC_F_PERCENT, '{' }, - { "ambient.humidity.low", - APC_F_PERCENT, '}' }, - - { "ambient.temperature", - APC_POLL|APC_F_CELSIUS, 't' }, - { "ambient.temperature.high", - APC_F_CELSIUS, '[' }, - { "ambient.temperature.low", - APC_F_CELSIUS, ']' }, - - { "battery.date", APC_STRING, 'x' }, - - { "battery.charge", APC_POLL|APC_F_PERCENT, 'f' }, - { "battery.charge.restart", - APC_F_PERCENT, 'e' }, - - { "battery.voltage", APC_POLL|APC_F_VOLT, 'B' }, - { "battery.voltage.nominal", - 0, 'g' }, - - { "battery.runtime", APC_POLL|APC_F_MINUTES, 'j' }, - { "battery.runtime.low", - APC_F_MINUTES, 'q' }, - - { "battery.packs", APC_F_DEC, '>' }, - { "battery.packs.bad", APC_F_DEC, '<' }, - { "battery.alarm.threshold", - 0, 'k' }, - /* todo: - - I = alarm enable (hex field) - split into alarm.n.enable - J = alarm status (hex field) - split into alarm.n.status - - 0x15 = output voltage selection (APC_F_VOLT) - 0x5C = load power (APC_POLL|APC_F_PERCENT) - - */ - - {NULL, 0, 0}, -}; - -/* ------ instant commands ------ */ - -#define APC_CMD_FPTEST 'A' -#define APC_CMD_CALTOGGLE 'D' -#define APC_CMD_SHUTDOWN 'K' -#define APC_CMD_SOFTDOWN 'S' -#define APC_CMD_GRACEDOWN '@' -#define APC_CMD_SIMPWF 'U' -#define APC_CMD_BTESTTOGGLE 'W' -#define APC_CMD_OFF 'Z' - -#define APC_CMD_ON 0x0E /* ^N */ -#define APC_CMD_BYPTOGGLE '^' - -typedef struct { - const char *name; - int flags; - char cmd; -} apc_cmdtab_t; - -apc_cmdtab_t apc_cmdtab[] = -{ - { "load.off", APC_NASTY|APC_REPEAT, APC_CMD_OFF }, - { "load.on", APC_REPEAT, APC_CMD_ON }, - - { "test.panel.start", 0, APC_CMD_FPTEST }, - - { "test.failure.start", 0, APC_CMD_SIMPWF }, - - { "test.battery.start", 0, APC_CMD_BTESTTOGGLE }, - { "test.battery.stop", 0, APC_CMD_BTESTTOGGLE }, - - { "shutdown.return.grace", - APC_NASTY, APC_CMD_GRACEDOWN }, - { "shutdown.return", APC_NASTY, APC_CMD_SOFTDOWN }, - { "shutdown.stayoff", APC_NASTY|APC_REPEAT, APC_CMD_SHUTDOWN }, - - { "calibrate.start", 0, APC_CMD_CALTOGGLE }, - { "calibrate.stop", 0, APC_CMD_CALTOGGLE }, - - { "bypass.start", 0, APC_CMD_BYPTOGGLE }, - { "bypass.stop", 0, APC_CMD_BYPTOGGLE }, - - { NULL, 0, 0 } -}; - -/* compatibility with hardware that doesn't do APC_CMDSET ('a') */ - -struct { - const char *firmware; - const char *cmdchars; - int flags; -} compat_tab[] = { - /* APC Matrix */ - { "0XI", "789ABCDEFGKLMNOPQRSTUVWXYZcefgjklmnopqrsuwxz/<>\\^\014\026", 0 }, - { "0XM", "789ABCDEFGKLMNOPQRSTUVWXYZcefgjklmnopqrsuwxz/<>\\^\014\026", 0 }, - { "0ZI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, - { "5UI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, - { "5ZM", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, - /* APC600 */ - { "6QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "6QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "6TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "6TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - /* SmartUPS 900 */ - { "7QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "7QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "7TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "7TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - /* SmartUPS 900I */ - { "7II", "79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, - /* SmartUPS 2000I */ - { "9II", "79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, - { "9GI", "79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, - /* SmartUPS 1250 */ - { "8QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "8QI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "8TD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - { "8TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, - /* CS 350 */ - { "5.4.D", "\1ABPQRSUYbdfgjmnx9", 0 }, - /* Smart-UPS 600 */ - { "D9", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D8", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D7", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D6", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D5", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - { "D4", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, - - { NULL, NULL, 0 }, -}; +#endif diff --git a/drivers/apcsmart_tabs.c b/drivers/apcsmart_tabs.c new file mode 100644 index 0000000..7b5c3cd --- /dev/null +++ b/drivers/apcsmart_tabs.c @@ -0,0 +1,155 @@ +/* apcsmart_tabs.c - common tables for APC smart protocol units + * + * Copyright (C) 1999 Russell Kroll + * (C) 2000 Nigel Metheringham + * (C) 2011 Michal Soltys + * + * 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 + */ + +#include "apcsmart_tabs.h" + +/* APC_MULTI variables *must* be listed in order of preference */ +apc_vartab_t apc_vartab[] = { + + { "ups.temperature", 'C', APC_POLL|APC_F_CELSIUS }, + { "ups.load", 'P', APC_POLL|APC_F_PERCENT }, + { "ups.test.interval", 'E', APC_F_HOURS }, + { "ups.test.result", 'X', APC_POLL }, + { "ups.delay.start", 'r', APC_F_SECONDS }, + { "ups.delay.shutdown", 'p', APC_F_SECONDS }, + { "ups.id", 'c', APC_STRING }, + { "ups.contacts", 'i', APC_POLL|APC_F_HEX }, + { "ups.display.language", '\014', 0 }, + { "input.voltage", 'L', APC_POLL|APC_F_VOLT }, + { "input.frequency", 'F', APC_POLL|APC_F_DEC }, + { "input.sensitivity", 's', 0 }, + { "input.quality", '9', APC_POLL|APC_F_HEX }, + { "input.transfer.low", 'l', APC_F_VOLT }, + { "input.transfer.high", 'u', APC_F_VOLT }, + { "input.transfer.reason", 'G', APC_POLL|APC_F_REASON }, + { "input.voltage.maximum", 'M', APC_POLL|APC_F_VOLT }, + { "input.voltage.minimum", 'N', APC_POLL|APC_F_VOLT }, + { "output.current", '/', APC_POLL|APC_F_AMP }, + { "output.voltage", 'O', APC_POLL|APC_F_VOLT }, + { "output.voltage.nominal", 'o', APC_F_VOLT }, + { "ambient.humidity", 'h', APC_POLL|APC_F_PERCENT }, + { "ambient.humidity.high", '{', APC_F_PERCENT }, + { "ambient.humidity.low", '}', APC_F_PERCENT }, + { "ambient.temperature", 't', APC_POLL|APC_F_CELSIUS }, + { "ambient.temperature.high", '[', APC_F_CELSIUS }, + { "ambient.temperature.low", ']', APC_F_CELSIUS }, + { "battery.date", 'x', APC_STRING }, + { "battery.charge", 'f', APC_POLL|APC_F_PERCENT }, + { "battery.charge.restart", 'e', APC_F_PERCENT }, + { "battery.voltage", 'B', APC_POLL|APC_F_VOLT }, + { "battery.voltage.nominal", 'g', 0 }, + { "battery.runtime", 'j', APC_POLL|APC_F_MINUTES }, + { "battery.runtime.low", 'q', APC_F_MINUTES }, + { "battery.packs", '>', APC_F_DEC }, + { "battery.packs.bad", '<', APC_F_DEC }, + { "battery.alarm.threshold", 'k', 0 }, + { "ups.serial", 'n', 0 }, + { "ups.mfr.date", 'm', 0 }, + { "ups.model", '\001', 0 }, + { "ups.firmware.aux", 'v', 0 }, + { "ups.firmware", 'b', APC_MULTI }, + { "ups.firmware", 'V', APC_MULTI }, + + { 0, 0, 0 } + /* todo: + + I = alarm enable (hex field) - split into alarm.n.enable + J = alarm status (hex field) - split into alarm.n.status + + 0x15 = output voltage selection (APC_F_VOLT) + 0x5C = load power (APC_POLL|APC_F_PERCENT) + + */ +}; + +/* + * apc commands mapped to nut's instant commands extra values are either + * exactly 2-char prefix, or longer than 2-char extended regex + */ +apc_cmdtab_t apc_cmdtab[] = { + { "test.panel.start", 0, APC_CMD_FPTEST, 0 }, + { "test.failure.start", 0, APC_CMD_SIMPWF, 0 }, + { "test.battery.start", 0, APC_CMD_BTESTTOGGLE, 0 }, + { "test.battery.stop", 0, APC_CMD_BTESTTOGGLE, 0 }, + { "shutdown.return", "^at:[0-9]{1,3}$", + APC_CMD_GRACEDOWN, APC_NASTY }, + { "shutdown.return", "cs", APC_CMD_SOFTDOWN, APC_NASTY }, + { "shutdown.return", 0, APC_CMD_SOFTDOWN, APC_NASTY }, + { "shutdown.stayoff", 0, APC_CMD_SHUTDOWN, APC_NASTY|APC_REPEAT }, + { "load.off", 0, APC_CMD_OFF, APC_NASTY|APC_REPEAT }, + { "load.on", 0, APC_CMD_ON, APC_REPEAT }, + { "bypass.start", 0, APC_CMD_BYPTOGGLE, 0 }, + { "bypass.stop", 0, APC_CMD_BYPTOGGLE, 0 }, + { "calibrate.start", 0, APC_CMD_CALTOGGLE, 0 }, + { "calibrate.stop", 0, APC_CMD_CALTOGGLE, 0 }, + + { 0, 0, 0, 0 } +}; + +/* compatibility with hardware that doesn't do APC_CMDSET ('a') */ +apc_compattab_t apc_compattab[] = { + /* APC Matrix */ + { "0XI", "@789ABCDEFGKLMNOPQRSTUVWXYZcefgjklmnopqrsuwxz/<>\\^\014\026", 0 }, + { "0XM", "@789ABCDEFGKLMNOPQRSTUVWXYZcefgjklmnopqrsuwxz/<>\\^\014\026", 0 }, + { "0ZI", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, + { "5UI", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, + { "5ZM", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 }, + /* APC600 */ + { "6QD", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "6QI", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "6TD", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "6TI", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + /* SmartUPS 900 */ + { "7QD", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "7QI", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "7TD", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "7TI", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + /* SmartUPS 900I */ + { "7II", "@79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, + /* SmartUPS 2000I */ + { "9II", "@79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, + { "9GI", "@79ABCEFGKLMNOPQSUVWXYZcfg", 0 }, + /* SmartUPS 1250 */ + { "8QD", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "8QI", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "8TD", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + { "8TI", "@79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 }, + /* CS 350 */ + { "5.4.D", "@\1ABPQRSUYbdfgjmnx9", 0 }, + /* Smart-UPS 600 */ + { "D9", "@789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D8", "@789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D7", "@789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D6", "@789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D5", "@789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D4", "@789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + + { 0, 0, 0 } +}; + +upsdrv_info_t apc_tab_info = { + "APC command table", + APC_TABLE_VERSION, + 0, + 0, + { 0 } +}; + diff --git a/drivers/apcsmart_tabs.h b/drivers/apcsmart_tabs.h new file mode 100644 index 0000000..c49ce9e --- /dev/null +++ b/drivers/apcsmart_tabs.h @@ -0,0 +1,100 @@ +/* + * apcsmart_tabs.h - tables for apcsmart driver + * + * Copyright (C) 1999 Russell Kroll + * (C) 2000 Nigel Metheringham + * (C) 2011 Michal Soltys + * + * 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 __apcsmart_tabs_h__ +#define __apcsmart_tabs_h__ + +#include "main.h" + +#define APC_TABLE_VERSION "version 3.0" + +/* common flags */ + +#define APC_PRESENT 0x00000001 /* capability seen on this UPS */ + +/* instant commands' flags */ + +#define APC_NASTY 0x00000002 /* Nasty command - must be reconfirmed */ +#define APC_REPEAT 0x00000004 /* Command needs sending twice */ + +/* variables' flags */ + +#define APC_POLL 0x00000100 /* poll this variable regularly */ +#define APC_RW 0x00000200 /* read-write variable */ +#define APC_ENUM 0x00000400 /* enumerated type variable */ +#define APC_STRING 0x00000800 /* string variable */ +#define APC_MULTI 0x00001000 /* there're other vars like that */ +#define APC_DEPR 0x00002000 /* deprecated variable */ + +/* variables' format */ + +#define APC_F_MASK 0xFF000000 /* Mask for apc data formats */ +#define APC_F_PERCENT 0x01000000 /* Data in a percent format */ +#define APC_F_VOLT 0x02000000 /* Data in a voltage format */ +#define APC_F_AMP 0x03000000 /* Data in a current/amp format */ +#define APC_F_CELSIUS 0x04000000 /* Data in a temp/C format */ +#define APC_F_HEX 0x05000000 /* Data in a hex number format */ +#define APC_F_DEC 0x06000000 /* Data in a decimal format */ +#define APC_F_SECONDS 0x07000000 /* Time in seconds */ +#define APC_F_MINUTES 0x08000000 /* Time in minutes */ +#define APC_F_HOURS 0x09000000 /* Time in hours */ +#define APC_F_REASON 0x10000000 /* Reason of transfer */ +#define APC_F_LEAVE 0x00000000 /* Just pass this through */ + +/* instant commands */ + +#define APC_CMD_OFF 'Z' +#define APC_CMD_ON '\016' /* ^N */ +#define APC_CMD_FPTEST 'A' +#define APC_CMD_SIMPWF 'U' +#define APC_CMD_BTESTTOGGLE 'W' +#define APC_CMD_GRACEDOWN '@' +#define APC_CMD_SOFTDOWN 'S' +#define APC_CMD_SHUTDOWN 'K' +#define APC_CMD_CALTOGGLE 'D' +#define APC_CMD_BYPTOGGLE '^' + + +typedef struct { + const char *name; /* the variable name */ + char cmd; /* variable character */ + unsigned int flags; /* various flags */ +} apc_vartab_t; + +typedef struct { + const char *name, *ext; + char cmd; + int flags; +} apc_cmdtab_t; + +typedef struct { + const char *firmware; + const char *cmdchars; + int flags; +} apc_compattab_t; + +extern apc_vartab_t apc_vartab[]; +extern apc_cmdtab_t apc_cmdtab[]; +extern apc_compattab_t apc_compattab[]; +extern upsdrv_info_t apc_tab_info; + +#endif diff --git a/drivers/bcmxcp.c b/drivers/bcmxcp.c index d2e0f5c..1bc8b78 100644 --- a/drivers/bcmxcp.c +++ b/drivers/bcmxcp.c @@ -19,6 +19,9 @@ ojw0000 2007Apr5 Oliver Wilcock - modified to control individual load segments (outlet.2.shutdown.return) on Powerware PW5125. + Modified to support setvar for outlet.n.delay.start by Rich Wrenn (RFW) 9-3-11. + Modified to support setvar for outlet.n.delay.shutdown by Arnaud Quette, 9-12-11 + 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 @@ -109,18 +112,22 @@ TODO List: Implement support for Password Authorization (XCP spec, §4.3.2) - Implement support for settable variables (upsh.setvar) + Complete support for settable variables (upsh.setvar) */ #include "main.h" #include /* For ldexp() */ #include /*for FLT_MAX */ +#include "nut_stdint.h" /* for uint8_t, uint16_t, uint32_t, ... */ #include "bcmxcp_io.h" #include "bcmxcp.h" #define DRIVER_NAME "BCMXCP UPS driver" -#define DRIVER_VERSION "0.24" +#define DRIVER_VERSION "0.25" + +#define MAX_NUT_NAME_LENGTH 128 +#define NUT_OUTLET_POSITION 7 /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -148,6 +155,7 @@ static void init_ups_alarm_map(const unsigned char *map, unsigned char len); static void decode_meter_map_entry(const unsigned char *entry, const unsigned char format, char* value); static int init_outlet(unsigned char len); static int instcmd(const char *cmdname, const char *extra); +static int setvar (const char *varname, const char *val); const char *FreqTol[3] = {"+/-2%", "+/-5%", "+/-7"}; @@ -881,8 +889,8 @@ int init_outlet(unsigned char len) res = command_read_sequence(PW_OUT_MON_BLOCK_REQ, answer); if (res <= 0) fatal_with_errno(EXIT_FAILURE, "Could not communicate with the ups"); -else - upsdebugx(1, "init_outlet(%i), res=%i", len, res); + else + upsdebugx(1, "init_outlet(%i), res=%i", len, res); num_outlet = answer[iIndex++]; upsdebugx(2, "Number of outlets: %d\n", num_outlet); @@ -906,12 +914,16 @@ else upsdebugx(2, "Auto delay off: %d\n", auto_dly_off); snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.delay.shutdown", num); dstate_setinfo(outlet_name, "%d", auto_dly_off); + dstate_setflags(outlet_name, ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux(outlet_name, 5); auto_dly_on = get_word(answer+iIndex); iIndex += 2; upsdebugx(2, "Auto delay on: %d\n", auto_dly_on); snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.delay.start", num); dstate_setinfo(outlet_name, "%d", auto_dly_on); + dstate_setflags(outlet_name, ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux(outlet_name, 5); } return num_outlet; @@ -1221,6 +1233,7 @@ void upsdrv_initinfo(void) dstate_addcmd("test.battery.start"); upsh.instcmd = instcmd; + upsh.setvar = setvar; return; } @@ -1465,9 +1478,11 @@ void upsdrv_shutdown(void) static int instcmd(const char *cmdname, const char *extra) { - unsigned char answer[5], cbuf[6]; - + unsigned char answer[128], cbuf[6]; + char varname[32]; + const char *varvalue = NULL; int res, sec; + int sddelay = 0x03; /* outlet off in 3 seconds, by default */ upsdebugx(1, "entering instcmd(%s)", cmdname); @@ -1480,9 +1495,15 @@ static int instcmd(const char *cmdname, const char *extra) sleep(1); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + /* Get the shutdown delay, if any */ + snprintf(varname, sizeof(varname)-1, "outlet.%c.delay.shutdown", cmdname[7]); + if ((varvalue = dstate_getinfo(varname)) != NULL) { + sddelay = atoi(dstate_getinfo(varname)); + } + cbuf[0] = PW_LOAD_OFF_RESTART; - cbuf[1] = 0x03; /* outlet off in 3 seconds */ - cbuf[2] = 0x00; /* high byte of the 2 byte time argument */ + cbuf[1] = sddelay & 0xff; + cbuf[2] = sddelay >> 8; /* high byte of the 2 byte time argument */ cbuf[3] = ( '1' == cmdname[7] ? 0x01 : 0x02); /* which outlet load segment? Assumes '1' or '2' at position 8 of the command string. */ /* ojw00000 the following copied from command "shutdown.return" below 2007Apr5 */ @@ -1586,7 +1607,7 @@ static int instcmd(const char *cmdname, const char *extra) break; } case 0x33: { - upslogx(LOG_NOTICE, "[%s] disbled by front panel", cmdname); + upslogx(LOG_NOTICE, "[%s] disabled by front panel", cmdname); return STAT_INSTCMD_UNKNOWN; break; } @@ -1596,7 +1617,8 @@ static int instcmd(const char *cmdname, const char *extra) break; } default: { - upslogx(LOG_NOTICE, "[%s] not supported", cmdname); + upslogx(LOG_NOTICE, "[%s] not supported (code %c)", + cmdname, (unsigned char) answer[0]); return STAT_INSTCMD_UNKNOWN; break; } @@ -1667,3 +1689,96 @@ void upsdrv_makevartable(void) addvar(VAR_VALUE, "baud_rate", "Specify communication speed (ex: 9600)"); } +int setvar (const char *varname, const char *val) +{ + unsigned char answer[128], cbuf[5]; + char namebuf[MAX_NUT_NAME_LENGTH]; + int res, sec, outlet_num; + int onOff_setting = PW_AUTO_OFF_DELAY; + + upsdebugx(1, "entering setvar(%s, %s)", varname, val); + + strncpy(namebuf, varname, sizeof(namebuf)); + namebuf[NUT_OUTLET_POSITION] = 'n'; /* Assumes a maximum of 9 outlets */ + + if ( (strcasecmp(namebuf, "outlet.n.delay.start")) && + (strcasecmp(namebuf, "outlet.n.delay.shutdown")) ) { + return STAT_SET_UNKNOWN; + } + + if (outlet_block_len <= 8) { + return STAT_SET_INVALID; + } + + if (!strcasecmp(namebuf, "outlet.n.delay.start")) { + onOff_setting = PW_AUTO_ON_DELAY; + } + + send_write_command(AUTHOR, 4); + /* Need to. Have to wait at least 0.25 sec max 16 sec */ + sleep (1); + + outlet_num = varname[NUT_OUTLET_POSITION] - '0'; + if (outlet_num < 1 || outlet_num > 9) { + return STAT_SET_INVALID; + } + + sec = atoi(val); + /* Check value: + * 0-32767 are valid values + * -1 means no Automatic off or restart + * for Auto Off Delay: + * 0-30 are valid but ill-advised */ + if (sec < -1 || sec > 0x7FFF) { + return STAT_SET_INVALID; + } + + cbuf[0] = PW_SET_OUTLET_COMMAND; /* Cmd */ + cbuf[1] = onOff_setting; /* Set Auto Off (1) or On (2) Delay */ + cbuf[2] = outlet_num; /* Outlet number */ + cbuf[3] = sec&0xff; /* Delay in seconds LSB */ + cbuf[4] = sec>>8; /* Delay in seconds MSB */ + + res = command_write_sequence(cbuf, 5, answer); + if (res <= 0) { + upslogx(LOG_ERR, "Short read from UPS"); + dstate_datastale(); + return -1; + } + + switch ((unsigned char) answer[0]) { + + case 0x31: { + upslogx(LOG_NOTICE,"Outlet %d %s delay set to %d sec", + outlet_num, (onOff_setting == PW_AUTO_ON_DELAY)?"start":"shutdown", sec); + dstate_setinfo(varname, "%d", sec); + return STAT_SET_HANDLED; + break; + } + case 0x33: { + upslogx(LOG_NOTICE, "Set [%s] failed due to UPS busy", varname); + /* TODO: we should probably retry... */ + return STAT_SET_UNKNOWN; + break; + } + case 0x35: { + upslogx(LOG_NOTICE, "Set [%s %s] failed due to parameter out of range", varname, val); + return STAT_SET_UNKNOWN; + break; + } + case 0x36: { + upslogx(LOG_NOTICE, "Set [%s %s] failed due to invalid parameter", varname, val); + return STAT_SET_UNKNOWN; + break; + } + default: { + upslogx(LOG_NOTICE, "Set [%s] not supported", varname); + return STAT_SET_FAILED; + break; + } + } + + return STAT_SET_INVALID; +} + + diff --git a/drivers/bcmxcp.h b/drivers/bcmxcp.h index bb811f4..beb19fe 100644 --- a/drivers/bcmxcp.h +++ b/drivers/bcmxcp.h @@ -42,6 +42,24 @@ #define PW_INIT_BAT_TEST (unsigned char)0xB1 /* Initiate battery test command. length 3 */ #define PW_INIT_SYS_TEST (unsigned char)0xB2 /* Initiate general system test command. length 2 */ +/* Define the XCP ACK block responses */ +#define XCPRESP_ACK 0x31 /* Accepted and executed */ +#define XCPRESP_NOT_IMPL 0x32 /* Recognized, but not implemented */ +#define XCPRESP_BUSY 0x33 /* Recognized, but Busy and not executed */ +#define XCPRESP_UNRECOGN 0x34 /* Unrecognized cmd */ +#define XCPRESP_OUT_RANGE 0x35 /* Parameter was out of range; not executed */ +#define XCPRESP_PRM_INVLD 0x36 /* Parameter invalid; not executed */ +#define XCPRESP_PRM_ADJST 0x37 /* Parameter adjusted to nearest good value */ +#define XCPRESP_PRM_RDONLY 0x38 /* Parameter is Read-only - cannot be written (at this privilege level) */ + +/* Outlet operations */ +#define PW_ALL_OUTLETS 0 +#define PW_AUTO_OFF_DELAY 1 +#define PW_AUTO_ON_DELAY 2 +/* 0 means Abort countdown */ +#define PW_TURN_OFF_DELAY 3 +#define PW_TURN_ON_DELAY 4 + /* Config block offsets */ #define BCMXCP_CONFIG_BLOCK_MACHINE_TYPE_CODE 0 #define BCMXCP_CONFIG_BLOCK_MODEL_NUMBER 2 diff --git a/drivers/bcmxcp_ser.c b/drivers/bcmxcp_ser.c index b03e0c1..0c7e6b3 100644 --- a/drivers/bcmxcp_ser.c +++ b/drivers/bcmxcp_ser.c @@ -197,7 +197,7 @@ int get_answer(unsigned char *data, unsigned char command) static int command_sequence(unsigned char *command, int command_length, unsigned char *answer) { int bytes_read, retry = 0; - + while (retry++ < PW_MAX_TRY) { if (retry == PW_MAX_TRY) { diff --git a/drivers/bestfcom.c b/drivers/bestfcom.c index 859ea7c..8a85e6d 100644 --- a/drivers/bestfcom.c +++ b/drivers/bestfcom.c @@ -260,13 +260,10 @@ void upsdrv_updateinfo(void) double ampsout=0.0, vbatt=0.0, battpercent=0.0, loadpercent=0.0, upstemp=0.0, acfreq=0.0; - char date[9], time[9], tmp[32]; + char tmp[32]; upsdebugx(3, "f response: %d %s", (int)strlen(fstring), fstring); - date[0]='\0'; - time[0]='\0'; - /* Inverter status. 0=off 1=on */ inverter = bcd2i(&fstring[16], 2); diff --git a/drivers/bestpower-mib.c b/drivers/bestpower-mib.c index d3bcc57..29c1926 100644 --- a/drivers/bestpower-mib.c +++ b/drivers/bestpower-mib.c @@ -29,6 +29,10 @@ * http://powerquality.eaton.com/Support/Software-Drivers/Downloads/connectivity-firmware/bestpwr2.mib */ +/* TODO: find the right sysOID for this MIB + * #define BESTPOWER_SYSOID ".1.3.6.1.4.1.2947???" + */ + static info_lkp_t bestpower_power_status[] = { { 1, "OL" }, { 2, "OB" }, diff --git a/drivers/blazer.c b/drivers/blazer.c index 5179be5..0b3cc8f 100644 --- a/drivers/blazer.c +++ b/drivers/blazer.c @@ -75,6 +75,7 @@ static const struct { { "megatec", "Q1\r", "F\r", "I\r" }, { "mustek", "QS\r", "F\r", "I\r" }, { "megatec/old", "D\r", "F\r", "I\r" }, + { "zinto", "Q1\r", "F\r", "FW?\r" }, { NULL } }; @@ -472,6 +473,8 @@ void blazer_makevartable(void) addvar(VAR_FLAG, "norating", "Skip reading rating information from UPS"); addvar(VAR_FLAG, "novendor", "Skip reading vendor information from UPS"); + + addvar(VAR_FLAG, "protocol", "Preselect communication protocol (skip autodetection)"); } @@ -594,12 +597,18 @@ static void blazer_initbattery(void) void blazer_initinfo(void) { + const char *protocol = getval("protocol"); int retry; for (proto = 0; command[proto].status; proto++) { int ret; + if (protocol && strcasecmp(protocol, command[proto].name)) { + upsdebugx(2, "Skipping %s protocol...", command[proto].name); + continue; + } + upsdebugx(2, "Trying %s protocol...", command[proto].name); for (retry = 1; retry <= MAXTRIES; retry++) { diff --git a/drivers/eaton-mib.c b/drivers/eaton-mib.c index 18fcf55..5d01a28 100644 --- a/drivers/eaton-mib.c +++ b/drivers/eaton-mib.c @@ -33,6 +33,7 @@ */ #define APHEL1_OID_MIB ".1.3.6.1.4.1.17373" +#define APHEL1_SYSOID APHEL1_OID_MIB #define APHEL1_OID_MODEL_NAME ".1.3.6.1.4.1.17373.3.1.1.0" #define APHEL1_OID_FIRMREV ".1.3.6.1.4.1.17373.3.1.2.0" #define APHEL1_OID_DEVICE_NAME ".1.3.6.1.4.1.17373.3.1.3.0" @@ -83,9 +84,9 @@ static snmp_info_t eaton_aphel_genesisII_mib[] = { /* APHEL PDU-MIB - Revelation MIB (Managed ePDU) * ********************************************* */ -#define AR_BASE_OID ".1.3.6.1.4.1.534.6.6.6" - -#define APHEL2_OID_MODEL_NAME AR_OID_MODEL_NAME +#define AR_BASE_OID ".1.3.6.1.4.1.534.6.6.6" +#define APHEL2_SYSOID AR_BASE_OID +#define APHEL2_OID_MODEL_NAME AR_OID_MODEL_NAME #define AR_OID_MODEL_NAME AR_BASE_OID ".1.1.12.0" #define AR_OID_DEVICE_NAME AR_BASE_OID ".1.1.13.0" @@ -207,5 +208,138 @@ static snmp_info_t eaton_aphel_revelation_mib[] = { { NULL, 0, 0, NULL, NULL, 0, NULL, NULL } }; -mib2nut_info_t aphel_genesisII = { "aphel_genesisII", EATON_APHEL_MIB_VERSION, "", APHEL1_OID_MODEL_NAME, eaton_aphel_genesisII_mib }; -mib2nut_info_t aphel_revelation = { "aphel_revelation", EATON_APHEL_MIB_VERSION, "", APHEL2_OID_MODEL_NAME, eaton_aphel_revelation_mib }; +/* Eaton PDU-MIB - Marlin MIB + * ************************** */ + +#define EATON_MARLIN_MIB_VERSION "0.05" +#define EATON_MARLIN_SYSOID ".1.3.6.1.4.1.534.6.6.7" +#define EATON_MARLIN_OID_MODEL_NAME ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.0" + +static info_lkp_t marlin_outlet_status_info[] = { + { 0, "off" }, + { 1, "on" }, + { 2, "pendingOff" }, /* transitional status */ + { 3, "pendingOn" }, /* transitional status */ + { 0, NULL } +}; + +/* Snmp2NUT lookup table for Eaton Marlin MIB */ +static snmp_info_t eaton_marlin_mib[] = { + /* Device page */ + { "device.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "EATON", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, + { "device.model", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.0", + "Eaton Powerware ePDU", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + { "device.serial", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.1.2.1.4.0", + "", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + { "device.type", ST_FLAG_STRING, SU_INFOSIZE, NULL, "pdu", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, + /* FIXME: need RFC validation on this variable + * { "device.part", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.1.2.1.3.0", + "", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, */ + + /* UPS page */ + { "ups.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "EATON", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, + { "ups.model", ST_FLAG_STRING, SU_INFOSIZE, "1.3.6.1.4.1.534.6.6.7.1.2.1.2.0", + "Eaton Powerware ePDU", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + + /* FIXME: use unitName.0 (ePDU)? + * { "ups.id", ST_FLAG_STRING, SU_INFOSIZE, AR_OID_DEVICE_NAME, + "unknown", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, */ + { "ups.serial", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.1.2.1.4.0", + "", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + { "ups.firmware", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.1.2.1.5.0", + "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, + { "ups.type", ST_FLAG_STRING, SU_INFOSIZE, NULL, "pdu", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, + /* TODO: + * The below possibly requires (?) the use of + * int snprint_hexstring(char *buf, size_t buf_len, const u_char *, size_t); + * { "ups.macaddr", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.2.1.2.2.1.6.2", + "", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + * + date reformating callback + * 2011-8-29,16:27:25.0,+1:0 + * Hex-STRING: 07 DB 08 1D 10 0C 36 00 2B 01 00 00 + * { "ups.date", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.1.2.1.8.0", + "", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + * { "ups.time", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.1.2.1.8.0", + "", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + */ + + /* Input page */ + { "input.phases", 0, 1, ".1.3.6.1.4.1.534.6.6.7.1.2.1.20.0", NULL, SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + /* inputType.0.1 singlePhase (1) iso.3.6.1.4.1.534.6.6.7.3.1.1.2.0.1 */ + { "input.frequency", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.3.1.1.3.0.1", NULL, 0, NULL, NULL }, + { "input.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.1", NULL, 0, NULL, NULL }, + /* FIXME: check multiplier */ + { "input.current", 0, 0.01, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, + + /* Ambient page */ + /* We use critical levels, for both temperature and humidity, + * since warning levels are also available! */ + { "ambient.temperature", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.7.1.1.4.0.1", NULL, SU_FLAG_OK, NULL, NULL }, + { "ambient.temperature.low", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.7.1.1.7.0.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "ambient.temperature.high", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.7.1.1.9.0.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "ambient.humidity", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.7.2.1.4.0.1", NULL, SU_FLAG_OK, NULL, NULL }, + { "ambient.humidity.low", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.7.2.1.7.0.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "ambient.humidity.high", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.7.2.1.9.0.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + + /* Outlet page */ + { "outlet.id", 0, 1, NULL, "0", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, + { "outlet.desc", ST_FLAG_RW | ST_FLAG_STRING, 20, NULL, "All outlets", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, + { "outlet.count", 0, 1, ".1.3.6.1.4.1.534.6.6.7.1.2.1.22.0", "0", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + /* The below ones are the same as the input.* equivalent */ + { "outlet.frequency", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.3.1.1.3.0.1", NULL, 0, NULL, NULL }, + { "outlet.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.1", NULL, 0, NULL, NULL }, + { "outlet.current", 0, 0.01, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, + /* There is also a .2 available (ie .1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.2) */ + { "outlet.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.2", NULL, 0, NULL, NULL }, + /* There is also a .2 available (ie .1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.2) */ + { "outlet.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.1", NULL, 0, NULL, NULL }, + + /* outlet template definition + * Indexes start from 1, ie outlet.1 => .1 */ + { "outlet.%i.switchable", 0, 1, ".1.3.6.1.4.1.534.6.6.7.6.6.1.3.0.%i", "yes", SU_FLAG_STATIC | SU_OUTLET, NULL, NULL }, + /* Note: the first definition is used to determine the base index (ie 0 or 1) */ + { "outlet.%i.desc", ST_FLAG_RW | ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.6.1.1.3.0.%i", NULL, SU_FLAG_STATIC | SU_FLAG_OK | SU_OUTLET, NULL, NULL }, + { "outlet.%i.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.6.6.1.2.0.%i", + NULL, SU_FLAG_OK | SU_OUTLET, &marlin_outlet_status_info[0], NULL }, + /* FIXME: or use ".1.3.6.1.4.1.534.6.6.7.6.1.1.2.0.1", though it's related to groups! */ + { "outlet.%i.id", 0, 1, NULL, "%i", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK | SU_OUTLET, NULL, NULL }, + { "outlet.%i.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.6.4.1.3.0.%i", NULL, SU_OUTLET, NULL, NULL }, + { "outlet.%i.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.6.5.1.3.0.%i", NULL, SU_OUTLET, NULL, NULL }, + { "outlet.%i.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.6.3.1.2.0.%i", NULL, SU_OUTLET, NULL, NULL }, + { "outlet.%i.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.6.5.1.2.0.%i", NULL, SU_OUTLET, NULL, NULL }, + + /* TODO: handle statistics + * outletWh.0.1 + * outletWhTimer.0.1 + */ + + /* instant commands. */ + /* Notes: + * - load.cycle might be replaced by / mapped on shutdown.reboot + * - outletControl{Off,On,Reboot}Cmd values: + * 0-n : Timer + * -1 : Cancel + * we currently use "0", so instant On | Off | Reboot... */ + /* no counterpart found! + { "outlet.load.off", 0, DO_OFF, AR_OID_OUTLET_STATUS ".0", NULL, SU_TYPE_CMD, NULL, NULL }, + { "outlet.load.on", 0, DO_ON, AR_OID_OUTLET_STATUS ".0", NULL, SU_TYPE_CMD, NULL, NULL }, + { "outlet.load.cycle", 0, DO_CYCLE, AR_OID_OUTLET_STATUS ".0", NULL, SU_TYPE_CMD, NULL, NULL }, */ + + /* TODO: handle delays */ + { "outlet.%i.load.off", 0, 0, ".1.3.6.1.4.1.534.6.6.7.6.6.1.3.0.%i", NULL, SU_TYPE_CMD | SU_OUTLET, NULL, NULL }, + { "outlet.%i.load.on", 0, 0, ".1.3.6.1.4.1.534.6.6.7.6.6.1.4.0.%i", NULL, SU_TYPE_CMD | SU_OUTLET, NULL, NULL }, + { "outlet.%i.load.cycle", 0, 0, ".1.3.6.1.4.1.534.6.6.7.6.6.1.5.0.%i", NULL, SU_TYPE_CMD | SU_OUTLET, NULL, NULL }, + + /* end of structure. */ + { NULL, 0, 0, NULL, NULL, 0, NULL, NULL } +}; + +mib2nut_info_t aphel_genesisII = { "aphel_genesisII", EATON_APHEL_MIB_VERSION, "", APHEL1_OID_MODEL_NAME, eaton_aphel_genesisII_mib, APHEL1_SYSOID }; +mib2nut_info_t aphel_revelation = { "aphel_revelation", EATON_APHEL_MIB_VERSION, "", APHEL2_OID_MODEL_NAME, eaton_aphel_revelation_mib, APHEL2_SYSOID }; +mib2nut_info_t eaton_marlin = { "eaton_epdu", EATON_MARLIN_MIB_VERSION, "", EATON_MARLIN_OID_MODEL_NAME, eaton_marlin_mib, EATON_MARLIN_SYSOID }; + diff --git a/drivers/eaton-mib.h b/drivers/eaton-mib.h index 60b463c..4997066 100644 --- a/drivers/eaton-mib.h +++ b/drivers/eaton-mib.h @@ -6,5 +6,6 @@ extern mib2nut_info_t aphel_genesisII; extern mib2nut_info_t aphel_revelation; +extern mib2nut_info_t eaton_marlin; #endif /* EATON_MIB_H */ diff --git a/drivers/ietf-mib.c b/drivers/ietf-mib.c index ee1247d..0cc3192 100644 --- a/drivers/ietf-mib.c +++ b/drivers/ietf-mib.c @@ -30,6 +30,7 @@ /* SNMP OIDs set */ #define IETF_OID_UPS_MIB "1.3.6.1.2.1.33.1." +#define IETF_SYSOID ".1.3.6.1.2.1.33" /* #define DEBUG */ @@ -273,4 +274,4 @@ static snmp_info_t ietf_mib[] = { { NULL, 0, 0, NULL, NULL, 0, NULL } }; -mib2nut_info_t ietf = { "ietf", IETF_MIB_VERSION, IETF_OID_UPS_MIB "4.1.0", IETF_OID_UPS_MIB "1.1.0", ietf_mib }; +mib2nut_info_t ietf = { "ietf", IETF_MIB_VERSION, IETF_OID_UPS_MIB "4.1.0", IETF_OID_UPS_MIB "1.1.0", ietf_mib, IETF_SYSOID }; diff --git a/drivers/main.c b/drivers/main.c index aafee68..66caa36 100644 --- a/drivers/main.c +++ b/drivers/main.c @@ -358,7 +358,6 @@ void do_upsconf_args(char *confupsname, char *var, char *val) } /* everything else must be for the driver */ - storeval(var, val); } @@ -556,10 +555,6 @@ int main(int argc, char **argv) "Error: you must specify a port name in ups.conf. Try -h for help."); } - pidfn = xmalloc(SMALLBUF); - - snprintf(pidfn, SMALLBUF, "%s/%s-%s.pid", altpidpath(), progname, upsname); - upsdebugx(1, "debug level is '%d'", nut_debug_level); new_uid = get_user_pwent(user); @@ -574,7 +569,39 @@ int main(int argc, char **argv) if ((!do_forceshutdown) && (chdir(dflt_statepath()))) fatal_with_errno(EXIT_FAILURE, "Can't chdir to %s", dflt_statepath()); - setup_signals(); + /* Setup signals to communicate with driver once backgrounded. */ + if ((nut_debug_level == 0) && (!do_forceshutdown)) { + char buffer[SMALLBUF]; + + setup_signals(); + + snprintf(buffer, sizeof(buffer), "%s/%s-%s.pid", altpidpath(), progname, upsname); + + /* Try to prevent that driver is started multiple times. If a PID file */ + /* already exists, send a TERM signal to the process and try if it goes */ + /* away. If not, retry a couple of times. */ + for (i = 0; i < 3; i++) { + struct stat st; + + if (stat(buffer, &st) != 0) { + /* PID file not found */ + break; + } + + if (sendsignalfn(buffer, SIGTERM) != 0) { + /* Can't send signal to PID, assume invalid file */ + break; + } + + upslogx(LOG_WARNING, "Duplicate driver instance detected! Terminating other driver!"); + + /* Allow driver some time to quit */ + sleep(5); + } + + pidfn = xstrdup(buffer); + writepid(pidfn); /* before backgrounding */ + } /* clear out callback handler data */ memset(&upsh, '\0', sizeof(upsh)); @@ -643,7 +670,7 @@ int main(int argc, char **argv) if (nut_debug_level == 0) { background(); - writepid(pidfn); + writepid(pidfn); /* PID changes when backgrounding */ } while (!exit_flag) { diff --git a/drivers/mge-hid.c b/drivers/mge-hid.c index ccf1c9a..7c07703 100644 --- a/drivers/mge-hid.c +++ b/drivers/mge-hid.c @@ -26,7 +26,7 @@ #include "usbhid-ups.h" #include "mge-hid.h" -#define MGE_HID_VERSION "MGE HID 1.21" +#define MGE_HID_VERSION "MGE HID 1.27" /* (prev. MGE Office Protection Systems, prev. MGE UPS SYSTEMS) */ /* Eaton */ @@ -59,8 +59,12 @@ static usb_device_id_t mge_usb_device_table[] = { #endif typedef enum { - MGE_DEFAULT = 0, - MGE_EVOLUTION = 0x100, /* MGE Evolution series */ + MGE_DEFAULT_OFFLINE = 0, + MGE_PEGASUS = 0x100, + MGE_3S = 0x110, + /* All offline models have type value < 200! */ + MGE_DEFAULT = 0x200, /* for line-interactive and online models */ + MGE_EVOLUTION = 0x300, /* MGE Evolution series */ MGE_EVOLUTION_650, MGE_EVOLUTION_850, MGE_EVOLUTION_1150, @@ -70,14 +74,29 @@ typedef enum { MGE_EVOLUTION_2000, MGE_EVOLUTION_S_2500, MGE_EVOLUTION_S_3000, - MGE_PULSAR_M = 0x200, /* MGE Pulsar M series */ + MGE_PULSAR_M = 0x400, /* MGE Pulsar M series */ MGE_PULSAR_M_2200, MGE_PULSAR_M_3000, - MGE_PULSAR_M_3000_XL, - MGE_PEGASUS = 0x400 + MGE_PULSAR_M_3000_XL } models_type_t; +/* Default to line-interactive or online (ie, not offline). + * This is then overriden for offline, through mge_model_names */ static models_type_t mge_type = MGE_DEFAULT; + +/* Countries definition, for region specific settings and features */ +typedef enum { + COUNTRY_UNKNOWN = -1, + COUNTRY_EUROPE = 0, + COUNTRY_US, + /* Special European models, which also supports 200 / 208 V */ + COUNTRY_EUROPE_208, + COUNTRY_WORLDWIDE, + COUNTRY_AUSTRALIA, +} country_code_t; + +static int country_code = COUNTRY_UNKNOWN; + static char mge_scratch_buf[20]; /* The HID path 'UPS.PowerSummary.Time' reports Unix time (ie the number of @@ -279,14 +298,19 @@ info_lkp_t mge_onbatt_info[] = { { 0, "online", NULL }, { 0, NULL, NULL } }; -/* allow limiting to ups.model ~= Protection Station */ + +/* allow limiting to ups.model = Protection Station, Ellipse Eco + * and 3S (US 750 and AUS 700 only!) */ static const char *eaton_check_pegasus_fun(double value) { switch (mge_type & 0xFF00) /* Ignore model byte */ { case MGE_PEGASUS: break; - + case MGE_3S: + /* Only consider non European models */ + if (country_code != COUNTRY_EUROPE) + break; default: return NULL; } @@ -302,6 +326,22 @@ static info_lkp_t pegasus_threshold_info[] = { { 0, NULL, NULL } }; +/* Determine country using UPS.PowerSummary.Country. + * If not present: + * if PowerConverter.Output.Voltage >= 200 => "Europe" + * else default to "US" */ +static const char *eaton_check_country_fun(double value) +{ + country_code = value; + /* Return NULL, not to get the value published! */ + return NULL; +} + +static info_lkp_t eaton_check_country_info[] = { + { 0, "dummy", eaton_check_country_fun }, + { 0, NULL, NULL } +}; + /* Limit nominal output voltage according to HV or LV models */ static const char *nominal_output_voltage_fun(double value) { @@ -330,6 +370,7 @@ static const char *nominal_output_voltage_fun(double value) } break; + /* line-interactive and online support 200/208 and 220/230/240*/ /* HV models */ /* 208V */ case 200: @@ -339,6 +380,12 @@ static const char *nominal_output_voltage_fun(double value) case 200: case 208: break; + /* 230V */ + case 220: + case 230: + case 240: + if ((mge_type & 0xFF00) >= MGE_DEFAULT) + break; default: return NULL; } @@ -351,6 +398,16 @@ static const char *nominal_output_voltage_fun(double value) case 240: switch ((long)value) { + case 200: + case 208: + /* line-interactive and online also support 200 / 208 V + * So break on offline models */ + if ((mge_type & 0xFF00) < MGE_DEFAULT) + return NULL; + /* FIXME: Some European models ("5130 RT 3000") also + * support both HV values */ + if (country_code == COUNTRY_EUROPE_208) + break; case 220: case 230: case 240: @@ -369,6 +426,7 @@ static const char *nominal_output_voltage_fun(double value) } static info_lkp_t nominal_output_voltage_info[] = { + /* line-interactive, starting with Evolution, support both HV values */ /* HV models */ /* 208V */ { 200, "200", nominal_output_voltage_fun }, @@ -560,34 +618,34 @@ typedef struct { static models_name_t mge_model_names [] = { /* Ellipse models */ - { "ELLIPSE", "300", MGE_DEFAULT, "ellipse 300" }, - { "ELLIPSE", "500", MGE_DEFAULT, "ellipse 500" }, - { "ELLIPSE", "650", MGE_DEFAULT, "ellipse 650" }, - { "ELLIPSE", "800", MGE_DEFAULT, "ellipse 800" }, - { "ELLIPSE", "1200", MGE_DEFAULT, "ellipse 1200" }, + { "ELLIPSE", "300", MGE_DEFAULT_OFFLINE, "ellipse 300" }, + { "ELLIPSE", "500", MGE_DEFAULT_OFFLINE, "ellipse 500" }, + { "ELLIPSE", "650", MGE_DEFAULT_OFFLINE, "ellipse 650" }, + { "ELLIPSE", "800", MGE_DEFAULT_OFFLINE, "ellipse 800" }, + { "ELLIPSE", "1200", MGE_DEFAULT_OFFLINE, "ellipse 1200" }, /* Ellipse Premium models */ - { "ellipse", "PR500", MGE_DEFAULT, "ellipse premium 500" }, - { "ellipse", "PR650", MGE_DEFAULT, "ellipse premium 650" }, - { "ellipse", "PR800", MGE_DEFAULT, "ellipse premium 800" }, - { "ellipse", "PR1200", MGE_DEFAULT, "ellipse premium 1200" }, + { "ellipse", "PR500", MGE_DEFAULT_OFFLINE, "ellipse premium 500" }, + { "ellipse", "PR650", MGE_DEFAULT_OFFLINE, "ellipse premium 650" }, + { "ellipse", "PR800", MGE_DEFAULT_OFFLINE, "ellipse premium 800" }, + { "ellipse", "PR1200", MGE_DEFAULT_OFFLINE, "ellipse premium 1200" }, /* Ellipse "Pro" */ - { "ELLIPSE", "600", MGE_DEFAULT, "Ellipse 600" }, - { "ELLIPSE", "750", MGE_DEFAULT, "Ellipse 750" }, - { "ELLIPSE", "1000", MGE_DEFAULT, "Ellipse 1000" }, - { "ELLIPSE", "1500", MGE_DEFAULT, "Ellipse 1500" }, + { "ELLIPSE", "600", MGE_DEFAULT_OFFLINE, "Ellipse 600" }, + { "ELLIPSE", "750", MGE_DEFAULT_OFFLINE, "Ellipse 750" }, + { "ELLIPSE", "1000", MGE_DEFAULT_OFFLINE, "Ellipse 1000" }, + { "ELLIPSE", "1500", MGE_DEFAULT_OFFLINE, "Ellipse 1500" }, - /* Ellipse "MAX" (TBR) */ -/* { "Ellipse MAX", "600", MGE_DEFAULT, NULL }, */ -/* { "Ellipse MAX", "850", MGE_DEFAULT, NULL }, */ -/* { "Ellipse MAX", "1100", MGE_DEFAULT, NULL }, */ -/* { "Ellipse MAX", "1500", MGE_DEFAULT, NULL }, */ + /* Ellipse MAX */ + { "Ellipse MAX", "600", MGE_DEFAULT_OFFLINE, NULL }, + { "Ellipse MAX", "850", MGE_DEFAULT_OFFLINE, NULL }, + { "Ellipse MAX", "1100", MGE_DEFAULT_OFFLINE, NULL }, + { "Ellipse MAX", "1500", MGE_DEFAULT_OFFLINE, NULL }, /* Protection Center */ - { "PROTECTIONCENTER", "420", MGE_DEFAULT, "Protection Center 420" }, - { "PROTECTIONCENTER", "500", MGE_DEFAULT, "Protection Center 500" }, - { "PROTECTIONCENTER", "675", MGE_DEFAULT, "Protection Center 675" }, + { "PROTECTIONCENTER", "420", MGE_DEFAULT_OFFLINE, "Protection Center 420" }, + { "PROTECTIONCENTER", "500", MGE_DEFAULT_OFFLINE, "Protection Center 500" }, + { "PROTECTIONCENTER", "675", MGE_DEFAULT_OFFLINE, "Protection Center 675" }, /* Protection Station, supports Eco control */ { "Protection Station", "500", MGE_PEGASUS, NULL }, @@ -600,6 +658,12 @@ static models_name_t mge_model_names [] = { "Ellipse ECO", "1200", MGE_PEGASUS, NULL }, { "Ellipse ECO", "1600", MGE_PEGASUS, NULL }, + /* 3S, also supports Eco control on some models (AUS 700 and US 750)*/ + { "3S", "450", MGE_DEFAULT_OFFLINE, NULL }, /* US only */ + { "3S", "550", MGE_DEFAULT_OFFLINE, NULL }, /* US 120V + EU 230V + AUS 240V */ + { "3S", "700", MGE_3S, NULL }, /* EU 230V + AUS 240V (w/ eco control) */ + { "3S", "750", MGE_3S, NULL }, /* US 120V (w/ eco control) */ + /* Evolution models */ { "Evolution", "500", MGE_DEFAULT, "Pulsar Evolution 500" }, { "Evolution", "800", MGE_DEFAULT, "Pulsar Evolution 800" }, @@ -695,6 +759,10 @@ static models_name_t mge_model_names [] = static hid_info_t mge_hid2nut[] = { + /* Device collection */ + /* Just declared to call *hid2info */ + { "device.country", ST_FLAG_STRING, 20, "UPS.PowerSummary.Country", NULL, "Europe", HU_FLAG_STATIC, eaton_check_country_info }, + /* Battery page */ { "battery.charge", 0, 0, "UPS.PowerSummary.RemainingCapacity", NULL, "%.0f", 0, NULL }, { "battery.charge.low", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerSummary.RemainingCapacityLimitSetting", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, @@ -704,6 +772,7 @@ static hid_info_t mge_hid2nut[] = { "battery.runtime", 0, 0, "UPS.PowerSummary.RunTimeToEmpty", NULL, "%.0f", 0, NULL }, { "battery.runtime.low", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.PowerSummary.RemainingTimeLimit", NULL, "%.0f", 0, NULL }, { "battery.runtime.elapsed", 0, 0, "UPS.StatisticSystem.Input.[1].Statistic.[1].Time", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL }, + { "battery.runtime.low", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.PowerSummary.RemainingTimeLimit", NULL, "%.0f", 0, NULL }, { "battery.temperature", 0, 0, "UPS.BatterySystem.Battery.Temperature", NULL, "%s", 0, kelvin_celsius_conversion }, { "battery.type", 0, 0, "UPS.PowerSummary.iDeviceChemistry", NULL, "%s", HU_FLAG_STATIC, stringid_conversion }, { "battery.voltage", 0, 0, "UPS.BatterySystem.Voltage", NULL, "%.1f", 0, NULL }, @@ -765,6 +834,7 @@ static hid_info_t mge_hid2nut[] = { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Overload", NULL, NULL, 0, overload_info }, { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.NeedReplacement", NULL, NULL, 0, replacebatt_info }, /* FIXME: on Dell, the above requires an "AND" with "UPS.BatterySystem.Battery.Test = 3 " */ + { "BOOL", 0, 0, "UPS.LCMSystem.LCMAlarm.[2].PresentStatus.TimerExpired", NULL, NULL, 0, replacebatt_info }, { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.Buck", NULL, NULL, 0, trim_info }, { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.Boost", NULL, NULL, 0, boost_info }, { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.VoltageOutOfRange", NULL, NULL, 0, vrange_info }, @@ -867,6 +937,13 @@ static hid_info_t mge_hid2nut[] = * on the master outlet used to automatically power off the slave outlets. * Values: 10, 25 (default) or 60 VA. */ { "outlet.power", ST_FLAG_RW | ST_FLAG_STRING, 6, "UPS.OutletSystem.Outlet.[1].ConfigApparentPower", NULL, "%s", HU_FLAG_SEMI_STATIC | HU_FLAG_ENUM, pegasus_threshold_info }, + + { "outlet.power", 0, 0, "UPS.OutletSystem.Outlet.[1].ApparentPower", NULL, "%.0f", 0, NULL }, + { "outlet.realpower", 0, 0, "UPS.OutletSystem.Outlet.[1].ActivePower", NULL, "%.0f", 0, NULL }, + { "outlet.current", 0, 0, "UPS.OutletSystem.Outlet.[1].Current", NULL, "%.2f", 0, NULL }, + { "outlet.powerfactor", 0, 0, "UPS.OutletSystem.Outlet.[1].PowerFactor", NULL, "%.2f", 0, NULL }, // "%s", 0, mge_powerfactor_conversion }, + + /* First outlet */ { "outlet.1.id", 0, 0, "UPS.OutletSystem.Outlet.[2].OutletID", NULL, "%.0f", HU_FLAG_STATIC, NULL }, { "outlet.1.desc", ST_FLAG_RW | ST_FLAG_STRING, 20, "UPS.OutletSystem.Outlet.[2].OutletID", NULL, "PowerShare Outlet 1", HU_FLAG_ABSENT, NULL }, { "outlet.1.switchable", 0, 0, "UPS.OutletSystem.Outlet.[2].PresentStatus.Switchable", NULL, "%s", HU_FLAG_STATIC, yes_no_info }, @@ -876,6 +953,11 @@ static hid_info_t mge_hid2nut[] = { "outlet.1.autoswitch.charge.low", ST_FLAG_RW | ST_FLAG_STRING, 3, "UPS.OutletSystem.Outlet.[2].RemainingCapacityLimit", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "outlet.1.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.OutletSystem.Outlet.[2].ShutdownTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "outlet.1.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.OutletSystem.Outlet.[2].StartupTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + { "outlet.1.power", 0, 0, "UPS.OutletSystem.Outlet.[2].ApparentPower", NULL, "%.0f", 0, NULL }, + { "outlet.1.realpower", 0, 0, "UPS.OutletSystem.Outlet.[2].ActivePower", NULL, "%.0f", 0, NULL }, + { "outlet.1.current", 0, 0, "UPS.OutletSystem.Outlet.[2].Current", NULL, "%.2f", 0, NULL }, + { "outlet.1.powerfactor", 0, 0, "UPS.OutletSystem.Outlet.[2].PowerFactor", NULL, "%.2f", 0, NULL }, // "%s", 0, mge_powerfactor_conversion }, + /* Second outlet */ { "outlet.2.id", 0, 0, "UPS.OutletSystem.Outlet.[3].OutletID", NULL, "%.0f", HU_FLAG_STATIC, NULL }, { "outlet.2.desc", ST_FLAG_RW | ST_FLAG_STRING, 20, "UPS.OutletSystem.Outlet.[3].OutletID", NULL, "PowerShare Outlet 2", HU_FLAG_ABSENT, NULL }, /* needed for Pegasus to enable master/slave mode */ @@ -884,6 +966,10 @@ static hid_info_t mge_hid2nut[] = { "outlet.2.autoswitch.charge.low", ST_FLAG_RW | ST_FLAG_STRING, 3, "UPS.OutletSystem.Outlet.[3].RemainingCapacityLimit", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "outlet.2.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.OutletSystem.Outlet.[3].ShutdownTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "outlet.2.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.OutletSystem.Outlet.[3].StartupTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + { "outlet.2.power", 0, 0, "UPS.OutletSystem.Outlet.[3].ApparentPower", NULL, "%.0f", 0, NULL }, + { "outlet.2.realpower", 0, 0, "UPS.OutletSystem.Outlet.[3].ActivePower", NULL, "%.0f", 0, NULL }, + { "outlet.2.current", 0, 0, "UPS.OutletSystem.Outlet.[3].Current", NULL, "%.2f", 0, NULL }, + { "outlet.2.powerfactor", 0, 0, "UPS.OutletSystem.Outlet.[3].PowerFactor", NULL, "%.2f", 0, NULL }, // "%s", 0, mge_powerfactor_conversion }, /* instant commands. */ /* splited into subset while waiting for extradata support diff --git a/drivers/mge-mib.c b/drivers/mge-mib.c index 817f168..a7d3731 100644 --- a/drivers/mge-mib.c +++ b/drivers/mge-mib.c @@ -28,8 +28,12 @@ #define MGE_MIB_VERSION "0.4" +/* TODO: + * - MGE PDU MIB and sysOID (".1.3.6.1.4.1.705.2") */ + /* SNMP OIDs set */ #define MGE_BASE_OID ".1.3.6.1.4.1.705.1" +#define MGE_SYSOID MGE_BASE_OID #define MGE_OID_MODEL_NAME MGE_BASE_OID ".1.1.0" static info_lkp_t mge_lowbatt_info[] = { @@ -156,4 +160,4 @@ static snmp_info_t mge_mib[] = { { NULL, 0, 0, NULL, NULL, 0, NULL } }; -mib2nut_info_t mge = { "mge", MGE_MIB_VERSION, "", MGE_OID_MODEL_NAME, mge_mib }; +mib2nut_info_t mge = { "mge", MGE_MIB_VERSION, "", MGE_OID_MODEL_NAME, mge_mib, MGE_SYSOID }; diff --git a/drivers/mge-utalk.c b/drivers/mge-utalk.c index c6114c7..616e2ad 100644 --- a/drivers/mge-utalk.c +++ b/drivers/mge-utalk.c @@ -465,7 +465,8 @@ void upsdrv_shutdown(void) { char buf[BUFFLEN]; /* static time_t lastcmd = 0; */ - + memset(buf, 0, sizeof(buf)); + if (sdtype == SD_RETURN) { /* enable automatic restart */ mge_command(buf, sizeof(buf), "Sx 5"); diff --git a/drivers/netvision-mib.c b/drivers/netvision-mib.c index e225d64..91e4d35 100644 --- a/drivers/netvision-mib.c +++ b/drivers/netvision-mib.c @@ -25,6 +25,8 @@ #define NETVISION_MIB_VERSION "0.1" +#define NETVISION_SYSOID ".1.3.6.1.4.1.4555.1.1.1" + /* SNMP OIDs set */ #define NETVISION_OID_UPS_MIB ".1.3.6.1.4.1.4555.1.1.1.1" #define NETVISION_OID_UPSIDENTMODEL ".1.3.6.1.4.1.4555.1.1.1.1.1.1.0" @@ -118,4 +120,4 @@ static snmp_info_t netvision_mib[] = { { NULL, 0, 0, NULL, NULL, 0, NULL } }; -mib2nut_info_t netvision = { "netvision", NETVISION_MIB_VERSION, "", NETVISION_OID_UPSIDENTMODEL, netvision_mib }; +mib2nut_info_t netvision = { "netvision", NETVISION_MIB_VERSION, "", NETVISION_OID_UPSIDENTMODEL, netvision_mib, NETVISION_SYSOID }; diff --git a/drivers/nut-ipmi.h b/drivers/nut-ipmi.h new file mode 100644 index 0000000..56fde19 --- /dev/null +++ b/drivers/nut-ipmi.h @@ -0,0 +1,57 @@ +/* nut-ipmi.h - Abstract IPMI interface, to allow using different IPMI backends + * + * Copyright (C) 2011 - Arnaud Quette + * + * 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 + * + */ + +typedef enum { + PSU_STATUS_UNKNOWN = 1, + PSU_PRESENT, /* = status OL */ + PSU_ABSENT, /* = status stale */ + PSU_POWER_FAILURE /* = status OFF */ +} psu_status_t; + +/* Abstract structure to store information */ +typedef struct IPMIDevice_s { + int ipmi_id; /* FRU ID */ + char* manufacturer; /* Manufacturer Name */ + char* product; /* Product Name */ + char* serial; /* Product serial number */ + char* part; /* Part Number */ + char* date; /* Manufacturing Date/Time */ + int overall_capacity; /* realpower.nominal? */ + int input_minvoltage; + int input_maxvoltage; + int input_minfreq; + int input_maxfreq; + int voltage; /* psu.voltage or device.voltage */ + unsigned int sensors_count; /* number of sensors IDs in sensors_id_list */ + unsigned int sensors_id_list[20]; /* ID of sensors linked to this FRU */ + + /* measurements... */ + int status; /* values from psu_status_t */ + double input_voltage; + double input_current; + double temperature; +} IPMIDevice_t; + +/* Generic functions, to implement in the backends */ +int nut_ipmi_open(int ipmi_id, IPMIDevice_t *ipmi_dev); +void nut_ipmi_close(void); +int nut_ipmi_monitoring_init(); +int ipmi_get_sensors_status(IPMIDevice_t *ipmi_dev); diff --git a/drivers/nut-ipmipsu.c b/drivers/nut-ipmipsu.c new file mode 100644 index 0000000..18cb355 --- /dev/null +++ b/drivers/nut-ipmipsu.c @@ -0,0 +1,240 @@ +/* nut-ipmipsu.c - Driver for IPMI Power Supply Units (PSU) + * + * Copyright (C) 2011 - Arnaud Quette + * + * 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 + * + * TODO list: + * - PSU sensor monitoring (how to find the right one?) + * - dump all value at init, so that we can check for other interesting data + */ + +#include "main.h" +#include "nut-ipmi.h" + +#define DRIVER_NAME "IPMI PSU driver" +#define DRIVER_VERSION "0.06" + +/* driver description structure */ +upsdrv_info_t upsdrv_info = { + DRIVER_NAME, + DRIVER_VERSION, + "Arnaud Quette \n", + DRV_EXPERIMENTAL, + { NULL } +}; + +/* Note on device.status + * OL: present and providing power + * OFF: present but not providing power (power cable removed) + * stale: not present (PSU removed) + * => should we prefer RB, MISSING, ABSENT, ??? + */ + +/* Abstract structure to allow different IPMI implementation + * We currently use FreeIPMI, but OpenIPMI and others are serious + * candidates! */ +IPMIDevice_t ipmi_dev; + +/* Currently used to store FRU ID, but will probably evolve... */ +int ipmi_id = -1; + +void upsdrv_initinfo(void) +{ + /* try to detect the PSU here - call fatal_with_errno(EXIT_FAILURE, ) if it fails */ + upsdebugx(1, "upsdrv_initinfo..."); + + /* print what we detected during IPMI open */ + upsdebugx(1, "Detected a PSU: %s/%s", + ipmi_dev.manufacturer ? ipmi_dev.manufacturer : "unknown", + ipmi_dev.product ? ipmi_dev.product : "unknown"); + + dstate_setinfo("driver.version.data", "%s", DRIVER_NAME); + dstate_setinfo("driver.version.internal", DRIVER_VERSION); + + dstate_setinfo ("device.type", "psu"); + + /* Publish information from the IPMI structure */ + if (ipmi_dev.manufacturer) + dstate_setinfo("device.mfr", "%s", ipmi_dev.manufacturer); + + if (ipmi_dev.product) + dstate_setinfo("device.model", "%s", ipmi_dev.product); + + if (ipmi_dev.serial) + dstate_setinfo("device.serial", "%s", ipmi_dev.serial); + + if (ipmi_dev.part) + dstate_setinfo("device.part", "%s", ipmi_dev.part); + + if (ipmi_dev.date) + dstate_setinfo("device.mfr.date", "%s", ipmi_dev.date); + + /* FIXME: move to device.id */ + dstate_setinfo("ups.id", "%i", ipmi_id); + /* FIXME: move to device.realpower.nominal */ + if (ipmi_dev.overall_capacity != -1) + dstate_setinfo("ups.realpower.nominal", "%i", ipmi_dev.overall_capacity); + + if (ipmi_dev.input_minvoltage != -1) + dstate_setinfo("input.voltage.minimum", "%i", ipmi_dev.input_minvoltage); + + if (ipmi_dev.input_maxvoltage != -1) + dstate_setinfo("input.voltage.maximum", "%i", ipmi_dev.input_maxvoltage); + + if (ipmi_dev.input_minfreq != -1) + dstate_setinfo("input.frequency.low", "%i", ipmi_dev.input_minfreq); + + if (ipmi_dev.input_maxfreq != -1) + dstate_setinfo("input.frequency.high", "%i", ipmi_dev.input_maxfreq); + + /* FIXME: move to device.voltage */ + if (ipmi_dev.voltage != -1) + dstate_setinfo("ups.voltage", "%i", ipmi_dev.voltage); + + if (nut_ipmi_monitoring_init() != 0) + fatalx(EXIT_FAILURE, "Can't initialize IPMI monitoring"); + + if (nut_ipmi_get_sensors_status(&ipmi_dev) != 0) { + upsdebugx(1, "Error while updating sensors values"); + dstate_datastale(); + } + else { + dstate_dataok(); + } + + /* upsh.instcmd = instcmd; */ +} + +void upsdrv_updateinfo(void) +{ + upsdebugx(1, "upsdrv_updateinfo..."); + + /* FIXME: implement sensors monitoring */ + + if (nut_ipmi_get_sensors_status(&ipmi_dev) != 0) { + upsdebugx(1, "Error while updating sensors values"); + dstate_datastale(); + } + else { + dstate_dataok(); + } + + /* + * poll_interval = 2; + */ +} + +void upsdrv_shutdown(void) +{ + fatalx(EXIT_FAILURE, "shutdown not supported"); +} + +/* +static int instcmd(const char *cmdname, const char *extra) +{ + if (!strcasecmp(cmdname, "test.battery.stop")) { + ser_send_buf(upsfd, ...); + return STAT_INSTCMD_HANDLED; + } + + upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); + return STAT_INSTCMD_UNKNOWN; +} +*/ + +/* +static int setvar(const char *varname, const char *val) +{ + if (!strcasecmp(varname, "ups.test.interval")) { + ser_send_buf(upsfd, ...); + return STAT_SET_HANDLED; + } + + upslogx(LOG_NOTICE, "setvar: unknown variable [%s]", varname); + return STAT_SET_UNKNOWN; +} +*/ + +void upsdrv_help(void) +{ +} + +/* list flags and values that you want to receive via -x */ +void upsdrv_makevartable(void) +{ + /* FIXME: need more params. + addvar(VAR_VALUE, "username", "Remote server username"); + addvar(VAR_VALUE, "password", "Remote server password"); + addvar(VAR_VALUE, "authtype", + "Authentication type to use during lan session activation"); + addvar(VAR_VALUE, "type", + "Type of the device to match ('psu' for \"Power Supply\")"); + + addvar(VAR_VALUE, "serial", "Serial number to match a specific device"); + addvar(VAR_VALUE, "fruid", "FRU identifier to match a specific device"); + addvar(VAR_VALUE, "sensorid", "Sensor identifier to match a specific device"); */ +} + +void upsdrv_initups(void) +{ + upsdebugx(1, "upsdrv_initups..."); + + /* port can be expressed using: + * "id?" for device (FRU) ID 0x? + * "psu?" for PSU number ? + */ + if (!strncmp( device_path, "id", 2)) + { + ipmi_id = atoi(device_path+2); + upsdebugx(2, "Device ID 0x%i", ipmi_id); + } + /* else... to select PSU number X */ + + /* Clear the interface structure */ + ipmi_dev.ipmi_id = -1; + ipmi_dev.manufacturer = NULL; + ipmi_dev.product = NULL; + ipmi_dev.serial = NULL; + ipmi_dev.part = NULL; + ipmi_dev.date = NULL; + ipmi_dev.overall_capacity = -1; + ipmi_dev.input_minvoltage = -1; + ipmi_dev.input_maxvoltage = -1; + ipmi_dev.input_minfreq = -1; + ipmi_dev.input_maxfreq = -1; + ipmi_dev.voltage = -1; + ipmi_dev.sensors_count = 0; + ipmi_dev.status = -1; + ipmi_dev.input_voltage = -1; + ipmi_dev.input_current = -1; + ipmi_dev.temperature = -1; + + /* Open IPMI using the above */ + nut_ipmi_open(ipmi_id, &ipmi_dev); + + /* the upsh handlers can't be done here, as they get initialized + * shortly after upsdrv_initups returns to main. + */ + + /* don't try to detect the UPS here */ +} + +void upsdrv_cleanup(void) +{ + upsdebugx(1, "upsdrv_cleanup..."); + nut_ipmi_close(); +} diff --git a/drivers/nut-libfreeipmi.c b/drivers/nut-libfreeipmi.c new file mode 100644 index 0000000..f83b77a --- /dev/null +++ b/drivers/nut-libfreeipmi.c @@ -0,0 +1,935 @@ +/* nut-libfreeipmi.c - NUT IPMI backend, using FreeIPMI + * + * Copyright (C) + * 2011 - Arnaud Quette + * 2011 - Albert Chu + * + * Based on the sample codes 'ipmi-fru-example.c', 'frulib.c' and + * 'ipmimonitoring-sensors.c', from FreeIPMI + * + * 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 + * + */ + +#include +#include +#include +#include +#include +#include +#include "common.h" +#include "nut-ipmi.h" +#include "dstate.h" + +/* FreeIPMI defines */ +#define IPMI_FRU_STR_BUFLEN 1024 +/* haven't seen a motherboard with more than 2-3 so far, + * 64 should be more than enough */ +#define IPMI_FRU_CUSTOM_FIELDS 64 + +/* FreeIPMI contexts and configuration*/ +ipmi_ctx_t ipmi_ctx = NULL; +ipmi_fru_parse_ctx_t fru_parse_ctx = NULL; +ipmi_sdr_cache_ctx_t sdr_cache_ctx = NULL; +ipmi_sdr_parse_ctx_t sdr_parse_ctx = NULL; +ipmi_monitoring_ctx_t mon_ctx = NULL; +struct ipmi_monitoring_ipmi_config ipmi_config; + +/* FIXME: freeipmi auto selects a cache based on the hostname you are + * connecting too, but this is probably fine for you + */ +#define CACHE_LOCATION "/tmp/sdrcache" + +/* Support functions */ +static const char* libfreeipmi_getfield (uint8_t language_code, + ipmi_fru_parse_field_t *field); + +static void libfreeipmi_cleanup(); + +static int libfreeipmi_get_psu_info (const void *areabuf, + uint8_t area_length, IPMIDevice_t *ipmi_dev); + +static int libfreeipmi_get_board_info (const void *areabuf, + uint8_t area_length, IPMIDevice_t *ipmi_dev); + +static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev); + + +/******************************************************************************* + * Implementation + ******************************************************************************/ +int nut_ipmi_open(int ipmi_id, IPMIDevice_t *ipmi_dev) +{ + int ret = -1; + uint8_t areabuf[IPMI_FRU_PARSE_AREA_SIZE_MAX+1]; + unsigned int area_type = 0; + unsigned int area_length = 0; + + upsdebugx(1, "nut-libfreeipmi: nutipmi_open()..."); + + /* Initialize the FreeIPMI library. */ + if (!(ipmi_ctx = ipmi_ctx_create ())) + { + /* we have to force cleanup, since exit handler is not yet installed */ + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_ctx_create"); + } + + if ((ret = ipmi_ctx_find_inband (ipmi_ctx, + NULL, + 0, /* don't disable auto-probe */ + 0, + 0, + NULL, + 0, /* workaround flags, none by default */ + 0 /* flags */ + )) < 0) + { + libfreeipmi_cleanup(); + fatalx(EXIT_FAILURE, "ipmi_ctx_find_inband: %s", + ipmi_ctx_errormsg (ipmi_ctx)); + } + if (!ret) + { + libfreeipmi_cleanup(); + fatalx(EXIT_FAILURE, "could not find inband device"); + } + + upsdebugx(1, "FreeIPMI initialized..."); + + /* Parse FRU information */ + if (!(fru_parse_ctx = ipmi_fru_parse_ctx_create (ipmi_ctx))) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_fru_parse_ctx_create()"); + } + + /* lots of motherboards calculate checksums incorrectly */ + if (ipmi_fru_parse_ctx_set_flags (fru_parse_ctx, IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS) < 0) + { + libfreeipmi_cleanup(); + fatalx(EXIT_FAILURE, "ipmi_fru_parse_ctx_set_flags: %s\n", + ipmi_fru_parse_ctx_strerror (ipmi_fru_parse_ctx_errnum (fru_parse_ctx))); + } + + /* Now open the requested (local) PSU */ + if (ipmi_fru_parse_open_device_id (fru_parse_ctx, ipmi_id) < 0) + { + libfreeipmi_cleanup(); + fatalx(EXIT_FAILURE, "ipmi_fru_parse_open_device_id: %s\n", + ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); + } + + /* Set IPMI identifier */ + ipmi_dev->ipmi_id = ipmi_id; + + do + { + /* clear fields */ + area_type = 0; + area_length = 0; + memset (areabuf, '\0', IPMI_FRU_PARSE_AREA_SIZE_MAX + 1); + + /* parse FRU buffer */ + if (ipmi_fru_parse_read_data_area (fru_parse_ctx, + &area_type, + &area_length, + areabuf, + IPMI_FRU_PARSE_AREA_SIZE_MAX) < 0) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, + "ipmi_fru_parse_open_device_id: %s\n", + ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); + } + + if (area_length) + { + switch (area_type) + { + /* get generic board information */ + case IPMI_FRU_PARSE_AREA_TYPE_BOARD_INFO_AREA: + + if(libfreeipmi_get_board_info (areabuf, area_length, + ipmi_dev) < 0) + { + upsdebugx(1, "Can't retrieve board information"); + } + break; + /* get specific PSU information */ + case IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION: + + if(libfreeipmi_get_psu_info (areabuf, area_length, ipmi_dev) < 0) + { + upsdebugx(1, "Can't retrieve PSU information"); + } + break; + default: + upsdebugx (5, "FRU: discarding FRU Area Type Read: %02Xh", area_type); + break; + } + } + } while ((ret = ipmi_fru_parse_next (fru_parse_ctx)) == 1); + + /* check for errors */ + if (ret < 0) { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_fru_parse_next: %s", + ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); + } + else { + /* Get all related sensors information */ + libfreeipmi_get_sensors_info (ipmi_dev); + } + + /* cleanup context */ + libfreeipmi_cleanup(); + + return (0); +} + +void nut_ipmi_close(void) +{ + upsdebugx(1, "nutipmi_close..."); + + libfreeipmi_cleanup(); +} + +static const char* libfreeipmi_getfield (uint8_t language_code, + ipmi_fru_parse_field_t *field) +{ + static char strbuf[IPMI_FRU_PARSE_AREA_STRING_MAX + 1]; + unsigned int strbuflen = IPMI_FRU_PARSE_AREA_STRING_MAX; + + if (!field->type_length_field_length) + return NULL; + + memset (strbuf, '\0', IPMI_FRU_PARSE_AREA_STRING_MAX + 1); + + if (ipmi_fru_parse_type_length_field_to_string (fru_parse_ctx, + field->type_length_field, + field->type_length_field_length, + language_code, + strbuf, + &strbuflen) < 0) + { + upsdebugx (2, "ipmi_fru_parse_type_length_field_to_string: %s", + ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); + return NULL; + } + + if (strbuflen) + return strbuf; + + return NULL; +} + +/* Get voltage value from the IPMI voltage code */ +static float libfreeipmi_get_voltage (uint8_t voltage_code) +{ + if (voltage_code == IPMI_FRU_VOLTAGE_12V) + return 12; + else if (voltage_code == IPMI_FRU_VOLTAGE_MINUS12V) + return -12; + else if (voltage_code == IPMI_FRU_VOLTAGE_5V) + return 5; + else if (voltage_code == IPMI_FRU_VOLTAGE_3_3V) + return 3.3; + else + return 0; +} + +/* Cleanup IPMI contexts */ +static void libfreeipmi_cleanup() +{ + /* cleanup */ + if (fru_parse_ctx) { + ipmi_fru_parse_close_device_id (fru_parse_ctx); + ipmi_fru_parse_ctx_destroy (fru_parse_ctx); + } + + if (sdr_cache_ctx) { + ipmi_sdr_cache_ctx_destroy (sdr_cache_ctx); + } + + if (sdr_parse_ctx) { + ipmi_sdr_parse_ctx_destroy (sdr_parse_ctx); + } + + if (ipmi_ctx) { + ipmi_ctx_close (ipmi_ctx); + ipmi_ctx_destroy (ipmi_ctx); + } + + if (mon_ctx) { + ipmi_monitoring_ctx_destroy (mon_ctx); + } +} + +/* Get generic board information (manufacturer and model names, serial, ...) + * from IPMI FRU */ +static int libfreeipmi_get_psu_info (const void *areabuf, + uint8_t area_length, + IPMIDevice_t *ipmi_dev) +{ + /* FIXME: directly use ipmi_dev fields */ + unsigned int overall_capacity; + unsigned int low_end_input_voltage_range_1; + unsigned int high_end_input_voltage_range_1; + unsigned int low_end_input_frequency_range; + unsigned int high_end_input_frequency_range; + unsigned int voltage_1; + + /* FIXME: check for the interest and capability to use these data */ + unsigned int peak_va; + unsigned int inrush_current; + unsigned int inrush_interval; + unsigned int low_end_input_voltage_range_2; + unsigned int high_end_input_voltage_range_2; + unsigned int ac_dropout_tolerance; + unsigned int predictive_fail_support; + unsigned int power_factor_correction; + unsigned int autoswitch; + unsigned int hot_swap_support; + unsigned int tachometer_pulses_per_rotation_predictive_fail_polarity; + unsigned int peak_capacity; + unsigned int hold_up_time; + unsigned int voltage_2; + unsigned int total_combined_wattage; + unsigned int predictive_fail_tachometer_lower_threshold; + + upsdebugx(1, "entering libfreeipmi_get_psu_info()"); + + if (ipmi_fru_parse_multirecord_power_supply_information (fru_parse_ctx, + areabuf, + area_length, + &overall_capacity, + &peak_va, + &inrush_current, + &inrush_interval, + &low_end_input_voltage_range_1, + &high_end_input_voltage_range_1, + &low_end_input_voltage_range_2, + &high_end_input_voltage_range_2, + &low_end_input_frequency_range, + &high_end_input_frequency_range, + &ac_dropout_tolerance, + &predictive_fail_support, + &power_factor_correction, + &autoswitch, + &hot_swap_support, + &tachometer_pulses_per_rotation_predictive_fail_polarity, + &peak_capacity, + &hold_up_time, + &voltage_1, + &voltage_2, + &total_combined_wattage, + &predictive_fail_tachometer_lower_threshold) < 0) + { + fatalx(EXIT_FAILURE, "ipmi_fru_parse_multirecord_power_supply_information: %s", + ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); + } + + ipmi_dev->overall_capacity = overall_capacity; + + /* Voltages are in mV! */ + ipmi_dev->input_minvoltage = low_end_input_voltage_range_1 / 1000; + ipmi_dev->input_maxvoltage = high_end_input_voltage_range_1 / 1000; + + ipmi_dev->input_minfreq = low_end_input_frequency_range; + ipmi_dev->input_maxfreq = high_end_input_frequency_range; + + ipmi_dev->voltage = libfreeipmi_get_voltage(voltage_1); + + return (0); +} + +/* Get specific PSU information from IPMI FRU */ +static int libfreeipmi_get_board_info (const void *areabuf, + uint8_t area_length, IPMIDevice_t *ipmi_dev) +{ + uint8_t language_code; + uint32_t mfg_date_time; + ipmi_fru_parse_field_t board_manufacturer; + ipmi_fru_parse_field_t board_product_name; + ipmi_fru_parse_field_t board_serial_number; + ipmi_fru_parse_field_t board_part_number; + ipmi_fru_parse_field_t board_fru_file_id; + ipmi_fru_parse_field_t board_custom_fields[IPMI_FRU_CUSTOM_FIELDS]; + const char *string = NULL; + time_t timetmp; + struct tm mfg_date_time_tm; + char mfg_date_time_buf[IPMI_FRU_STR_BUFLEN + 1]; + + upsdebugx(1, "entering libfreeipmi_get_board_info()"); + + /* clear fields */ + memset (&board_manufacturer, '\0', sizeof (ipmi_fru_parse_field_t)); + memset (&board_product_name, '\0', sizeof (ipmi_fru_parse_field_t)); + memset (&board_serial_number, '\0', sizeof (ipmi_fru_parse_field_t)); + memset (&board_fru_file_id, '\0', sizeof (ipmi_fru_parse_field_t)); + memset (&board_custom_fields[0], '\0', + sizeof (ipmi_fru_parse_field_t) * IPMI_FRU_CUSTOM_FIELDS); + + /* parse FRU buffer */ + if (ipmi_fru_parse_board_info_area (fru_parse_ctx, + areabuf, + area_length, + &language_code, + &mfg_date_time, + &board_manufacturer, + &board_product_name, + &board_serial_number, + &board_part_number, + &board_fru_file_id, + board_custom_fields, + IPMI_FRU_CUSTOM_FIELDS) < 0) + { + libfreeipmi_cleanup(); + fatalx(EXIT_FAILURE, "ipmi_fru_parse_board_info_area: %s", + ipmi_fru_parse_ctx_errormsg (fru_parse_ctx)); + } + + + if (IPMI_FRU_LANGUAGE_CODE_VALID (language_code)) { + upsdebugx (5, "FRU Board Language: %s", ipmi_fru_language_codes[language_code]); + } + else { + upsdebugx (5, "FRU Board Language Code: %02Xh", language_code); + } + + /* Posix says individual calls need not clear/set all portions of + * 'struct tm', thus passing 'struct tm' between functions could + * have issues. So we need to memset */ + memset (&mfg_date_time_tm, '\0', sizeof (struct tm)); + timetmp = mfg_date_time; + localtime_r (&timetmp, &mfg_date_time_tm); + memset (mfg_date_time_buf, '\0', IPMI_FRU_STR_BUFLEN + 1); + strftime (mfg_date_time_buf, IPMI_FRU_STR_BUFLEN, "%D - %T", &mfg_date_time_tm); + + /* Store values */ + ipmi_dev->date = xstrdup(mfg_date_time_buf); + upsdebugx(2, "FRU Board Manufacturing Date/Time: %s", ipmi_dev->date); + + if ((string = libfreeipmi_getfield (language_code, &board_manufacturer)) != NULL) + ipmi_dev->manufacturer = xstrdup(string); + else + ipmi_dev->manufacturer = xstrdup("Generic IPMI manufacturer"); + + if ((string = libfreeipmi_getfield (language_code, &board_product_name)) != NULL) + ipmi_dev->product = xstrdup(string); + else + ipmi_dev->product = xstrdup("Generic PSU"); + + if ((string = libfreeipmi_getfield (language_code, &board_serial_number)) != NULL) + ipmi_dev->serial = xstrdup(string); + else + ipmi_dev->serial = NULL; + + if ((string = libfreeipmi_getfield (language_code, &board_part_number)) != NULL) + ipmi_dev->part = xstrdup(string); + else + ipmi_dev->part = NULL; + + return (0); +} + + +/* Get the sensors list & values, specific to the given FRU ID + * Return -1 on error, or the number of sensors found otherwise */ +static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) +{ + uint8_t sdr_record[IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH]; + uint8_t record_type, logical_physical_fru_device, logical_fru_device_device_slave_address; + uint8_t tmp_entity_id, tmp_entity_instance; + int sdr_record_len; + uint16_t record_count; + int found_device_id = 0; + uint16_t record_id; + uint8_t entity_id, entity_instance; + int i; + + if (ipmi_ctx == NULL) + return (-1); + + /* Clear the sensors list */ + ipmi_dev->sensors_count = 0; + memset(ipmi_dev->sensors_id_list, 0, sizeof(ipmi_dev->sensors_id_list)); + + if (!(sdr_cache_ctx = ipmi_sdr_cache_ctx_create ())) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_cache_ctx_create()"); + } + + if (!(sdr_parse_ctx = ipmi_sdr_parse_ctx_create ())) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_parse_ctx_create()"); + } + + if (ipmi_sdr_cache_open (sdr_cache_ctx, ipmi_ctx, CACHE_LOCATION) < 0) + { + if (ipmi_sdr_cache_ctx_errnum (sdr_cache_ctx) != IPMI_SDR_CACHE_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_cache_open: %s", + ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); + } + } + + if (ipmi_sdr_cache_ctx_errnum (sdr_cache_ctx) == IPMI_SDR_CACHE_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST) + { + if (ipmi_sdr_cache_create (sdr_cache_ctx, + ipmi_ctx, CACHE_LOCATION, + IPMI_SDR_CACHE_CREATE_FLAGS_DEFAULT, + IPMI_SDR_CACHE_VALIDATION_FLAGS_DEFAULT, + NULL, NULL) < 0) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_cache_create: %s", + ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); + } + + if (ipmi_sdr_cache_open (sdr_cache_ctx, + ipmi_ctx, CACHE_LOCATION) < 0) + { + if (ipmi_sdr_cache_ctx_errnum (sdr_cache_ctx) != IPMI_SDR_CACHE_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_cache_open: %s", + ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); + } + } + } + + if (ipmi_sdr_cache_record_count (sdr_cache_ctx, &record_count) < 0) + { + fprintf (stderr, + "ipmi_sdr_cache_record_count: %s", + ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); + goto cleanup; + } + + for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (sdr_cache_ctx)) + { + memset (sdr_record, '\0', IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH); + if ((sdr_record_len = ipmi_sdr_cache_record_read (sdr_cache_ctx, + sdr_record, + IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH)) < 0) + { + fprintf (stderr, "ipmi_sdr_cache_record_read: %s", + ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); + goto cleanup; + } + + if (ipmi_sdr_parse_record_id_and_type (sdr_parse_ctx, + sdr_record, + sdr_record_len, + NULL, + &record_type) < 0) + { + fprintf (stderr, "ipmi_sdr_parse_record_id_and_type: %s", + ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); + goto cleanup; + } + + if (record_type != IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD) + continue; + + if (ipmi_sdr_parse_fru_device_locator_parameters (sdr_parse_ctx, + sdr_record, + sdr_record_len, + NULL, + &logical_fru_device_device_slave_address, + NULL, + NULL, + &logical_physical_fru_device, + NULL) < 0) + { + fprintf (stderr, "ipmi_sdr_parse_fru_device_locator_parameters: %s", + ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); + goto cleanup; + } + + if (logical_physical_fru_device + && logical_fru_device_device_slave_address == ipmi_dev->ipmi_id) + { + found_device_id++; + + if (ipmi_sdr_parse_fru_entity_id_and_instance (sdr_parse_ctx, + sdr_record, + sdr_record_len, + &entity_id, + &entity_instance) < 0) + { + fprintf (stderr, + "ipmi_sdr_parse_fru_entity_id_and_instance: %s", + ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); + goto cleanup; + } + break; + } + } + + if (!found_device_id) + { + fprintf (stderr, "Couldn't find device id %d", ipmi_dev->ipmi_id); + goto cleanup; + } + else + upsdebugx(1, "Found device id %d", ipmi_dev->ipmi_id); + + if (ipmi_sdr_cache_first (sdr_cache_ctx) < 0) + { + fprintf (stderr, "ipmi_sdr_cache_first: %s", + ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); + goto cleanup; + } + + for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (sdr_cache_ctx)) + { + /* uint8_t sdr_record[IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH]; + uint8_t record_type, tmp_entity_id, tmp_entity_instance; + int sdr_record_len; */ + + memset (sdr_record, '\0', IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH); + if ((sdr_record_len = ipmi_sdr_cache_record_read (sdr_cache_ctx, + sdr_record, + IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH)) < 0) + { + fprintf (stderr, "ipmi_sdr_cache_record_read: %s", + ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); + goto cleanup; + } + + if (ipmi_sdr_parse_record_id_and_type (sdr_parse_ctx, + sdr_record, + sdr_record_len, + &record_id, + &record_type) < 0) + { + fprintf (stderr, "ipmi_sdr_parse_record_id_and_type: %s", + ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); + goto cleanup; + } + + upsdebugx (5, "Checking record %i (/%i)", record_id, record_count); + + if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD + && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD + && record_type != IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { + continue; + } + + if (ipmi_sdr_parse_entity_id_instance_type (sdr_parse_ctx, + sdr_record, + sdr_record_len, + &tmp_entity_id, + &tmp_entity_instance, + NULL) < 0) + { + fprintf (stderr, "ipmi_sdr_parse_entity_instance_type: %s", + ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); + goto cleanup; + } + + if (tmp_entity_id == entity_id + && tmp_entity_instance == entity_instance) + { + upsdebugx (1, "Found record id = %u for device id %u", + record_id, ipmi_dev->ipmi_id); + + /* Add it to the tracked list */ + ipmi_dev->sensors_id_list[ipmi_dev->sensors_count] = record_id; + ipmi_dev->sensors_count++; + } + } + + +cleanup: + /* Cleanup */ + if (sdr_cache_ctx) { + ipmi_sdr_cache_ctx_destroy (sdr_cache_ctx); + } + + if (sdr_parse_ctx) { + ipmi_sdr_parse_ctx_destroy (sdr_parse_ctx); + } + + return ipmi_dev->sensors_count; +} + + +/* +=> Nominal conditions + + +Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State, Sensor Reading, Sensor Units, Sensor Event/Reading Type Code, Sensor Event Bitmask, Sensor Event String +52, Presence, 84, Entity Presence, Nominal, N/A, N/A, 6Fh, 1h, 'Entity Present' +57, Status, 100, Power Supply, Nominal, N/A, N/A, 6Fh, 1h, 'Presence detected' +116, Current, 148, Current, Nominal, 0.20, A, 1h, C0h, 'OK' +118, Voltage, 150, Voltage, Nominal, 236.00, V, 1h, C0h, 'OK' + +=> Power failure conditions + +Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State, Sensor Reading, Sensor Units, Sensor Event/Reading Type Code, Sensor Event Bitmask, Sensor Event String +52, Presence, 84, Entity Presence, Nominal, N/A, N/A, 6Fh, 1h, 'Entity Present' +57, Status, 100, Power Supply, Critical, N/A, N/A, 6Fh, 9h, 'Presence detected' 'Power Supply input lost (AC/DC)' + +=> PSU removed + +Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State, Sensor Reading, Sensor Units, Sensor Event/Reading Type Code, Sensor Event Bitmask, Sensor Event String +52, Presence, 84, Entity Presence, Critical, N/A, N/A, 6Fh, 2h, 'Entity Absent' +57, Status, 100, Power Supply, Critical, N/A, N/A, 6Fh, 8h, 'Power Supply input lost (AC/DC)' + +*/ + +int nut_ipmi_monitoring_init() +{ + int errnum; + + if (ipmi_monitoring_init (0, &errnum) < 0) { + upsdebugx (1, "ipmi_monitoring_init() error: %s", ipmi_monitoring_ctx_strerror (errnum)); + return -1; + } + + if (!(mon_ctx = ipmi_monitoring_ctx_create ())) { + upsdebugx (1, "ipmi_monitoring_ctx_create() failed"); + return -1; + } + + /* FIXME: replace "/tmp" by a proper place, using mkdtemp() or similar */ + if (ipmi_monitoring_ctx_sdr_cache_directory (mon_ctx, "/tmp") < 0) { + upsdebugx (1, "ipmi_monitoring_ctx_sdr_cache_directory() error: %s", + ipmi_monitoring_ctx_errormsg (mon_ctx)); + return -1; + } + + if (ipmi_monitoring_ctx_sensor_config_file (mon_ctx, NULL) < 0) { + upsdebugx (1, "ipmi_monitoring_ctx_sensor_config_file() error: %s", + ipmi_monitoring_ctx_errormsg (mon_ctx)); + return -1; + } + return 0; +} + +int nut_ipmi_get_sensors_status(IPMIDevice_t *ipmi_dev) +{ + /* It seems we don't need more! */ + unsigned int sensor_reading_flags = IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_NON_INTERPRETABLE_SENSORS; + int sensor_count, i, str_count; + int psu_status = PSU_STATUS_UNKNOWN; + int retval = 0; + + if (mon_ctx == NULL) { + upsdebugx (1, "Monitoring context not initialized!"); + return -1; + } + + /* Monitor only the list of sensors found previously */ + if ((sensor_count = ipmi_monitoring_sensor_readings_by_record_id (mon_ctx, + NULL, /* hostname is NULL for In-band communication */ + NULL, /* FIXME: needed? ipmi_config */ + sensor_reading_flags, + ipmi_dev->sensors_id_list, + ipmi_dev->sensors_count, + NULL, + NULL)) < 0) + { + upsdebugx (1, "ipmi_monitoring_sensor_readings_by_record_id() error: %s", + ipmi_monitoring_ctx_errormsg (mon_ctx)); + return -1; + } + + for (i = 0; i < sensor_count; i++, ipmi_monitoring_sensor_iterator_next (mon_ctx)) + { + int record_id, sensor_type; + int sensor_bitmask_type = -1; + /* int sensor_reading_type, sensor_state; */ + char **sensor_bitmask_strings = NULL; + void *sensor_reading = NULL; + + if ((record_id = ipmi_monitoring_sensor_read_record_id (mon_ctx)) < 0) + { + upsdebugx (1, "ipmi_monitoring_sensor_read_record_id() error: %s", + ipmi_monitoring_ctx_errormsg (mon_ctx)); + continue; + } + + if ((sensor_type = ipmi_monitoring_sensor_read_sensor_type (mon_ctx)) < 0) + { + upsdebugx (1, "ipmi_monitoring_sensor_read_sensor_type() error: %s", + ipmi_monitoring_ctx_errormsg (mon_ctx)); + continue; + } + + /* should we consider this for ALARM? + * IPMI_MONITORING_STATE_NOMINAL + * IPMI_MONITORING_STATE_WARNING + * IPMI_MONITORING_STATE_CRITICAL + * if ((sensor_state = ipmi_monitoring_sensor_read_sensor_state (mon_ctx)) < 0) + * ... */ + + if ((sensor_reading = ipmi_monitoring_sensor_read_sensor_reading (mon_ctx)) < 0) + { + upsdebugx (1, "ipmi_monitoring_sensor_read_sensor_reading() error: %s", + ipmi_monitoring_ctx_errormsg (mon_ctx)); + } + + /* This can be needed to interpret sensor_reading format! + if ((sensor_reading_type = ipmi_monitoring_sensor_read_sensor_reading_type (ctx)) < 0) + { + upsdebugx (1, "ipmi_monitoring_sensor_read_sensor_reading_type() error: %s", + ipmi_monitoring_ctx_errormsg (mon_ctx)); + } */ + + if ((sensor_bitmask_type = ipmi_monitoring_sensor_read_sensor_bitmask_type (mon_ctx)) < 0) + { + upsdebugx (1, "ipmi_monitoring_sensor_read_sensor_bitmask_type() error: %s", + ipmi_monitoring_ctx_errormsg (mon_ctx)); + continue; + } + + if ((sensor_bitmask_strings = ipmi_monitoring_sensor_read_sensor_bitmask_strings (mon_ctx)) < 0) + { + upsdebugx (1, "ipmi_monitoring_sensor_read_sensor_bitmask_strings() error: %s", + ipmi_monitoring_ctx_errormsg (mon_ctx)); + continue; + } + + /* Only the few possibly interesting sensors are considered */ + switch (sensor_type) + { + case IPMI_MONITORING_SENSOR_TYPE_TEMPERATURE: + ipmi_dev->temperature = *((double *)sensor_reading); + upsdebugx (3, "Temperature: %.2f", *((double *)sensor_reading)); + dstate_setinfo("ambient.temperature", "%.2f", *((double *)sensor_reading)); + break; + case IPMI_MONITORING_SENSOR_TYPE_VOLTAGE: + ipmi_dev->voltage = *((double *)sensor_reading); + upsdebugx (3, "Voltage: %.2f", *((double *)sensor_reading)); + dstate_setinfo("input.voltage", "%.2f", *((double *)sensor_reading)); + break; + case IPMI_MONITORING_SENSOR_TYPE_CURRENT: + ipmi_dev->input_current = *((double *)sensor_reading); + upsdebugx (3, "Current: %.2f", *((double *)sensor_reading)); + dstate_setinfo("input.current", "%.2f", *((double *)sensor_reading)); + break; + + case IPMI_MONITORING_SENSOR_TYPE_POWER_SUPPLY: + /* Possible values: + * 'Presence detected' + * 'Power Supply input lost (AC/DC)' => maps to status:OFF */ + upsdebugx (3, "Power Supply: status string"); + if (sensor_bitmask_type == IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN) { + upsdebugx(3, "No status string"); + } + str_count = 0; + while (sensor_bitmask_strings[str_count]) + { + upsdebugx (3, "\t'%s'", sensor_bitmask_strings[str_count]); + if (!strncmp("Power Supply input lost (AC/DC)", + sensor_bitmask_strings[str_count], + strlen("Power Supply input lost (AC/DC)"))) { + /* Don't override PSU absence! */ + if (psu_status != PSU_ABSENT) { + psu_status = PSU_POWER_FAILURE; /* = status OFF */ + } + } + str_count++; + } + break; + case IPMI_MONITORING_SENSOR_TYPE_ENTITY_PRESENCE: + /* Possible values: + * 'Entity Present' => maps to status:OL + * 'Entity Absent' (PSU has been removed!) => declare staleness */ + upsdebugx (3, "Entity Presence: status string"); + if (sensor_bitmask_type == IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN) { + upsdebugx(3, "No status string"); + } + str_count = 0; + while (sensor_bitmask_strings[str_count]) + { + upsdebugx (3, "\t'%s'", sensor_bitmask_strings[str_count]); + if (!strncmp("Entity Present", + sensor_bitmask_strings[str_count], + strlen("Entity Present"))) { + psu_status = PSU_PRESENT; + } + else if (!strncmp("Entity Absent", + sensor_bitmask_strings[str_count], + strlen("Entity Absent"))) { + psu_status = PSU_ABSENT; + } + str_count++; + } + break; + /* Not sure of the values of these, so get as much as possible... */ + case IPMI_MONITORING_SENSOR_TYPE_POWER_UNIT: + upsdebugx (3, "Power Unit: status string"); + str_count = 0; + while (sensor_bitmask_strings[str_count]) + { + upsdebugx (3, "\t'%s'", sensor_bitmask_strings[str_count]); + str_count++; + } + break; + case IPMI_MONITORING_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE: + upsdebugx (3, "System ACPI Power State: status string"); + str_count = 0; + while (sensor_bitmask_strings[str_count]) + { + upsdebugx (3, "\t'%s'", sensor_bitmask_strings[str_count]); + str_count++; + } + break; + case IPMI_MONITORING_SENSOR_TYPE_BATTERY: + upsdebugx (3, "Battery: status string"); + str_count = 0; + while (sensor_bitmask_strings[str_count]) + { + upsdebugx (3, "\t'%s'", sensor_bitmask_strings[str_count]); + str_count++; + } + break; + } + } + + /* Process status if needed */ + if (psu_status != PSU_STATUS_UNKNOWN) { + + status_init(); + + switch (psu_status) + { + case PSU_PRESENT: + status_set("OL"); + break; + case PSU_ABSENT: + status_set("OFF"); + /* Declare stale */ + retval = -1; + break; + case PSU_POWER_FAILURE: + status_set("OFF"); + break; + } + + status_commit(); + } + + return retval; +} diff --git a/drivers/powerware-mib.c b/drivers/powerware-mib.c index 6f2fb09..7c4d45b 100644 --- a/drivers/powerware-mib.c +++ b/drivers/powerware-mib.c @@ -26,6 +26,17 @@ #define PW_MIB_VERSION "0.6.1" +/* TODO: more sysOID and MIBs support: + * + * Powerware UPS (Ingrasys X-SLOT and BD-SLOT): ".1.3.6.1.4.1.534.1" + * Powerware PXGX cards: ".1.3.6.1.4.1.534.2.12" + * PXGX 2000 cards (UPS): Get xupsIdentModel (".1.3.6.1.4.1.534.1.1.2.0") + * PXGX 1000 cards (PDU/RPP/RPM): Get pduNumPanels ".1.3.6.1.4.1.534.6.6.4.1.1.1.4.0" + */ + +/* Powerware UPS (Ingrasys X-SLOT and BD-SLOT) */ +#define POWERWARE_SYSOID ".1.3.6.1.4.1.534.1" + /* SNMP OIDs set */ #define PW_OID_MFR_NAME "1.3.6.1.4.1.534.1.1.1.0" /* XUPS-MIB::xupsIdentManufacturer.0 */ #define PW_OID_MODEL_NAME "1.3.6.1.4.1.534.1.1.2.0" /* XUPS-MIB::xupsIdentModel.0 */ @@ -313,4 +324,4 @@ static snmp_info_t pw_mib[] = { { NULL, 0, 0, NULL, NULL, 0, NULL } } ; -mib2nut_info_t powerware = { "pw", PW_MIB_VERSION, "", PW_OID_MODEL_NAME, pw_mib }; +mib2nut_info_t powerware = { "pw", PW_MIB_VERSION, "", PW_OID_MODEL_NAME, pw_mib, POWERWARE_SYSOID }; diff --git a/drivers/raritan-pdu-mib.c b/drivers/raritan-pdu-mib.c index 5147b3d..fd832c1 100644 --- a/drivers/raritan-pdu-mib.c +++ b/drivers/raritan-pdu-mib.c @@ -28,8 +28,10 @@ #define RARITAN_MIB_VERSION "0.4" /* Raritan MIB - * this one uses the Revelation MIB, with a different entry point */ + * this one uses the same MIB as Eaton Revelation, + * but with a different entry point */ #define RARITAN_BASE_OID ".1.3.6.1.4.1.13742" +#define RARITAN_SYSOID RARITAN_BASE_OID #define RARITAN_OID_MODEL_NAME ".1.3.6.1.4.1.13742.1.1.12.0" #define DO_OFF 0 @@ -119,4 +121,4 @@ static snmp_info_t raritan_mib[] = { { NULL, 0, 0, NULL, NULL, 0, NULL, NULL } }; -mib2nut_info_t raritan = { "raritan", RARITAN_MIB_VERSION, "", RARITAN_OID_MODEL_NAME, raritan_mib }; +mib2nut_info_t raritan = { "raritan", RARITAN_MIB_VERSION, "", RARITAN_OID_MODEL_NAME, raritan_mib, RARITAN_SYSOID }; diff --git a/drivers/snmp-ups.c b/drivers/snmp-ups.c index 344f514..1ca6eda 100644 --- a/drivers/snmp-ups.c +++ b/drivers/snmp-ups.c @@ -3,7 +3,7 @@ * Based on NetSNMP API (Simple Network Management Protocol V1-2) * * Copyright (C) - * 2002 - 2010 Arnaud Quette + * 2002 - 2011 Arnaud Quette * 2002 - 2006 Dmitry Frolov * J.W. Hoogervorst * Niels Baggesen @@ -53,6 +53,7 @@ static mib2nut_info_t *mib2nut[] = { &powerware, &aphel_genesisII, &aphel_revelation, + &eaton_marlin, &raritan, &baytech, &compaq, @@ -79,7 +80,7 @@ const char *mibvers; static void disable_transfer_oids(void); #define DRIVER_NAME "Generic SNMP UPS driver" -#define DRIVER_VERSION "0.50" +#define DRIVER_VERSION "0.56" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -101,6 +102,9 @@ time_t lastpoll = 0; * automatically guessed at the first pass */ int outlet_index_base = -1; +/* sysOID location */ +#define SYSOID_OID ".1.3.6.1.2.1.1.2.0" + /* --------------------------------------------- * driver functions implementations * --------------------------------------------- */ @@ -144,6 +148,7 @@ void upsdrv_updateinfo(void) upsdebugx(1,"SNMP UPS driver : entering upsdrv_updateinfo()"); /* only update every pollfreq */ + /* FIXME: update status (SU_STATUS_*), à la usbhid-ups, in between */ if (time(NULL) > (lastpoll + pollfreq)) { status_init(); @@ -257,12 +262,20 @@ void upsdrv_cleanup(void) void nut_snmp_init(const char *type, const char *hostname) { + char *ns_options = NULL; const char *community, *version; const char *secLevel = NULL, *authPassword, *privPassword; const char *authProtocol, *privProtocol; upsdebugx(2, "SNMP UPS driver : entering nut_snmp_init(%s)", type); + /* Force numeric OIDs resolution (ie, do not resolve to textual names) + * This is mostly for the convenience of debug output */ + ns_options = snmp_out_toggle_options("n"); + if (ns_options != NULL) { + upsdebugx(2, "Failed to enable numeric OIDs resolution"); + } + /* Initialize the SNMP library */ init_snmp(type); @@ -316,9 +329,11 @@ void nut_snmp_init(const char *type, const char *hostname) case SNMP_SEC_LEVEL_AUTHNOPRIV: if (authPassword == NULL) fatalx(EXIT_FAILURE, "authPassword is required for SNMPv3 in %s mode", secLevel); + break; case SNMP_SEC_LEVEL_AUTHPRIV: if ((authPassword == NULL) || (privPassword == NULL)) fatalx(EXIT_FAILURE, "authPassword and privPassword are required for SNMPv3 in %s mode", secLevel); + break; default: case SNMP_SEC_LEVEL_NOAUTH: /* nothing else needed */ @@ -342,12 +357,15 @@ void nut_snmp_init(const char *type, const char *hostname) /* set the authentication key to a MD5/SHA1 hashed version of our * passphrase (must be at least 8 characters long) */ - if (generate_Ku(g_snmp_sess.securityAuthProto, + if(g_snmp_sess.securityLevel != SNMP_SEC_LEVEL_NOAUTH) { + if (generate_Ku(g_snmp_sess.securityAuthProto, g_snmp_sess.securityAuthProtoLen, - (u_char *) privPassword, strlen(privPassword), + (u_char *) authPassword, strlen(authPassword), g_snmp_sess.securityAuthKey, - &g_snmp_sess.securityAuthKeyLen) != SNMPERR_SUCCESS) { - fatalx(EXIT_FAILURE, "Error generating Ku from authentication pass phrase"); + &g_snmp_sess.securityAuthKeyLen) != + SNMPERR_SUCCESS) { + fatalx(EXIT_FAILURE, "Error generating Ku from authentication pass phrase"); + } } privProtocol = testvar(SU_VAR_PRIVPROT) ? getval(SU_VAR_PRIVPROT) : "DES"; @@ -362,6 +380,20 @@ void nut_snmp_init(const char *type, const char *hostname) } else fatalx(EXIT_FAILURE, "Bad SNMPv3 authProtocol: %s", authProtocol); + + /* set the privacy key to a MD5/SHA1 hashed version of our + * passphrase (must be at least 8 characters long) */ + if(g_snmp_sess.securityLevel == SNMP_SEC_LEVEL_AUTHPRIV) { + g_snmp_sess.securityPrivKeyLen = USM_PRIV_KU_LEN; + if (generate_Ku(g_snmp_sess.securityAuthProto, + g_snmp_sess.securityAuthProtoLen, + (u_char *) privPassword, strlen(privPassword), + g_snmp_sess.securityPrivKey, + &g_snmp_sess.securityPrivKeyLen) != + SNMPERR_SUCCESS) { + fatalx(EXIT_FAILURE, "Error generating Ku from privacy pass phrase"); + } + } } else fatalx(EXIT_FAILURE, "Bad SNMP version: %s", version); @@ -447,6 +479,8 @@ bool_t nut_snmp_get_str(const char *OID, char *buf, size_t buf_len, info_lkp_t * size_t len = 0; struct snmp_pdu *pdu; + upsdebugx(3, "Entering nut_snmp_get_str()"); + /* zero out buffer. */ memset(buf, 0, buf_len); @@ -483,11 +517,13 @@ bool_t nut_snmp_get_str(const char *OID, char *buf, size_t buf_len, info_lkp_t * /* convert timeticks to seconds */ len = snprintf(buf, buf_len, "%ld", *pdu->variables->val.integer / 100); break; + case ASN_OBJECT_ID: + len = snprint_objid (buf, buf_len, pdu->variables->val.objid, pdu->variables->val_len / sizeof(oid)); + break; default: - upslogx(LOG_ERR, "[%s] unhandled ASN 0x%x received from %s", + upsdebugx(2, "[%s] unhandled ASN 0x%x received from %s", upsname?upsname:device_name, pdu->variables->type, OID); return FALSE; - break; } snmp_free_pdu(pdu); @@ -673,13 +709,19 @@ void su_setinfo(snmp_info_t *su_info_p, const char *value) if (SU_TYPE(su_info_p) == SU_TYPE_CMD) return; - if (strcasecmp(su_info_p->info_type, "ups.status")) { + if (strcasecmp(su_info_p->info_type, "ups.status")) + { if (value != NULL) dstate_setinfo(su_info_p->info_type, "%s", value); else dstate_setinfo(su_info_p->info_type, "%s", su_info_p->dfl); + dstate_setflags(su_info_p->info_type, su_info_p->info_flags); dstate_setaux(su_info_p->info_type, su_info_p->info_len); + + /* Commit the current value, to avoid staleness with huge + * data collections on slow devices */ + dstate_dataok(); } } @@ -713,36 +755,119 @@ snmp_info_t *su_find_info(const char *type) return NULL; } +/* Try to find the MIB using sysOID matching. + * Return a pointer to a mib2nut definition if found, NULL otherwise */ +mib2nut_info_t *match_sysoid() +{ + char sysOID_buf[LARGEBUF]; + oid device_sysOID[MAX_OID_LEN]; + size_t device_sysOID_len = MAX_OID_LEN; + oid mib2nut_sysOID[MAX_OID_LEN]; + size_t mib2nut_sysOID_len = MAX_OID_LEN; + int i; + + /* Retrieve sysOID value of this device */ + if (nut_snmp_get_str(SYSOID_OID, sysOID_buf, sizeof(sysOID_buf), NULL)) + { + upsdebugx(1, "match_sysoid: device sysOID value = %s", sysOID_buf); + + /* Build OIDs for comparison */ + if (!read_objid(sysOID_buf, device_sysOID, &device_sysOID_len)) + { + upsdebugx(2, "match_sysoid: can't build device_sysOID %s: %s", + sysOID_buf, snmp_api_errstring(snmp_errno)); + + return FALSE; + } + + /* Now, iterate on mib2nut definitions */ + for (i = 0; mib2nut[i] != NULL; i++) + { + upsdebugx(1, "match_sysoid: checking MIB %s", mib2nut[i]->mib_name); + + if (mib2nut[i]->sysOID == NULL) + continue; + + /* Clear variables */ + memset(mib2nut_sysOID, 0, MAX_OID_LEN); + mib2nut_sysOID_len = MAX_OID_LEN; + + if (!read_objid(mib2nut[i]->sysOID, mib2nut_sysOID, &mib2nut_sysOID_len)) + { + upsdebugx(2, "match_sysoid: can't build OID %s: %s", + sysOID_buf, snmp_api_errstring(snmp_errno)); + + /* Try to continue anyway! */ + continue; + } + /* Now compare these */ + upsdebugx(1, "match_sysoid: comparing %s with %s", sysOID_buf, mib2nut[i]->sysOID); + if (!netsnmp_oid_equals(device_sysOID, device_sysOID_len, mib2nut_sysOID, mib2nut_sysOID_len)) + { + upsdebugx(2, "match_sysoid: sysOID matches MIB '%s'!", mib2nut[i]->mib_name); + return mib2nut[i]; + } + } + /* Yell all to call for user report */ + upslogx(LOG_ERR, "No matching MIB found for sysOID '%s'! " \ + "Please report it to NUT developers, with the 'mib' paramater for your devices", + sysOID_buf); + } + else + upsdebugx(2, "Can't get sysOID value"); + + return NULL; +} + /* Load the right snmp_info_t structure matching mib parameter */ bool_t load_mib2nut(const char *mib) { int i; char buf[LARGEBUF]; + mib2nut_info_t *m2n = NULL; upsdebugx(2, "SNMP UPS driver : entering load_mib2nut(%s)", mib); - /* FIXME: first try SysOID (.1.3.6.1.2.1.1.2) - * to speed up detection if mib==auto - * This is an indirection on the MIB's entry point - * examples: - * APHEL-GENESIS-II-MIB => .iso.org.dod.internet.private.enterprises.17373 - * APHEL Revelation MIB => .iso.org.dod.internet.private.enterprises.534.6.6.6 - */ - for (i = 0; mib2nut[i] != NULL; i++) { - if (strcmp(mib, "auto") && strcmp(mib, mib2nut[i]->mib_name)) { - continue; + /* First, try to match against sysOID, if no MIB was provided. + * This should speed up init stage + * (Note: sysOID points the device main MIB entry point) */ + if (!strcmp(mib, "auto")) + { + upsdebugx(1, "trying the new match_sysoid() method"); + m2n = match_sysoid(); + } + + /* Otherwise, revert to the classic method */ + if (m2n == NULL) + { + for (i = 0; mib2nut[i] != NULL; i++) { + /* Is there already a MIB name provided? */ + if (strcmp(mib, "auto") && strcmp(mib, mib2nut[i]->mib_name)) { + continue; + } + upsdebugx(1, "load_mib2nut: trying classic method with '%s' mib", mib2nut[i]->mib_name); + + /* Classic method: test an OID specific to this MIB */ + if (!nut_snmp_get_str(mib2nut[i]->oid_auto_check, buf, sizeof(buf), NULL)) { + continue; + } + /* MIB found */ + m2n = mib2nut[i]; + break; } - upsdebugx(1, "load_mib2nut: trying %s mib", mib2nut[i]->mib_name); - if (!nut_snmp_get_str(mib2nut[i]->oid_auto_check, buf, sizeof(buf), NULL)) { - continue; - } - snmp_info = mib2nut[i]->snmp_info; - OID_pwr_status = mib2nut[i]->oid_pwr_status; - mibname = mib2nut[i]->mib_name; - mibvers = mib2nut[i]->mib_version; + } + + /* Store the result, if any */ + if (m2n != NULL) + { + snmp_info = m2n->snmp_info; + OID_pwr_status = m2n->oid_pwr_status; + mibname = m2n->mib_name; + mibvers = m2n->mib_version; upsdebugx(1, "load_mib2nut: using %s mib", mibname); return TRUE; } + /* Did we find something or is it really an unknown mib */ if (strcmp(mib, "auto") != 0) { fatalx(EXIT_FAILURE, "Unknown mibs value: %s", mib); @@ -852,17 +977,25 @@ void free_info(snmp_info_t *su_info_p) int base_snmp_outlet_index(const char *OID_template) { int base_index = outlet_index_base; + char test_OID[SU_INFOSIZE]; if (outlet_index_base == -1) { /* not initialised yet */ - char test_OID[SU_INFOSIZE]; - for (base_index = 0 ; base_index < 2 ; base_index++) { - sprintf(test_OID, OID_template, base_index); - if (nut_snmp_get(test_OID) != NULL) - break; + /* Workaround for Eaton Marlin, while waiting for a FW fix and + * a driver rewrite (advanced hooks) */ + if ((mibname != NULL) && (!strncmp(mibname, "eaton_epdu", 11))) + { + upsdebugx(3, "Appying Eaton Marlin workaround"); + outlet_index_base = base_index = 1; + } else { + for (base_index = 0 ; base_index < 2 ; base_index++) { + sprintf(test_OID, OID_template, base_index); + if (nut_snmp_get(test_OID) != NULL) + break; + } + outlet_index_base = base_index; } - outlet_index_base = base_index; } upsdebugx(3, "base_snmp_outlet_index: %i", outlet_index_base); return base_index; @@ -1066,8 +1199,9 @@ bool_t snmp_ups_walk(int mode) instantiate_info(su_info_p, &cur_info_p); for (cur_outlet_number = base_snmp_outlet_index(su_info_p->OID) ; - cur_outlet_number < outlet_count ; cur_outlet_number++) { - + cur_outlet_number < (outlet_count + base_snmp_outlet_index(su_info_p->OID)) ; + cur_outlet_number++) + { cur_nut_index = cur_outlet_number + base_nut_outlet_offset(); sprintf((char*)cur_info_p.info_type, su_info_p->info_type, cur_nut_index); diff --git a/drivers/snmp-ups.h b/drivers/snmp-ups.h index a42c15e..d130428 100644 --- a/drivers/snmp-ups.h +++ b/drivers/snmp-ups.h @@ -75,6 +75,10 @@ for each OID request we made), instead of sending many small packets #include #include +/* Force numeric OIDs by disabling MIB loading */ +#define DISABLE_MIB_LOADING 1 + + #define DEFAULT_POLLFREQ 30 /* in seconds */ /* use explicit booleans */ @@ -193,11 +197,13 @@ typedef struct { #define SU_ERR_RATE 100 /* only print every nth error once limiting starts */ typedef struct { - const char *mib_name; - const char *mib_version; - const char *oid_pwr_status; - const char *oid_auto_check; - snmp_info_t *snmp_info; /* pointer to the good Snmp2Nut lookup data */ + const char *mib_name; + const char *mib_version; + const char *oid_pwr_status; + const char *oid_auto_check; /* FIXME: rename to SysOID */ + snmp_info_t *snmp_info; /* pointer to the good Snmp2Nut lookup data */ + const char *sysOID; /* OID to match against sysOID, aka MIB + * main entry point */ } mib2nut_info_t; diff --git a/drivers/usb-common.c b/drivers/usb-common.c index e51f3cf..e459872 100644 --- a/drivers/usb-common.c +++ b/drivers/usb-common.c @@ -116,7 +116,7 @@ int USBNewExactMatcher(USBDeviceMatcher_t **matcher, USBDevice_t *hd) USBDevice_t *data; m = malloc(sizeof(*m)); - if (!matcher) { + if (!m) { return -1; } diff --git a/include/Makefile.in b/include/Makefile.in index 6767600..c9db7a7 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -44,6 +44,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -110,10 +112,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -151,6 +157,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -215,6 +225,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/include/config.h.in b/include/config.h.in index ae5bb0a..f0a94b6 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -36,6 +36,18 @@ /* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT +/* Define to 1 if you have the header file. */ +#undef HAVE_AVAHI_CLIENT_CLIENT_H + +/* Define to 1 if you have the `avahi_client_new' function. */ +#undef HAVE_AVAHI_CLIENT_NEW + +/* Define to 1 if you have the header file. */ +#undef HAVE_AVAHI_COMMON_MALLOC_H + +/* Define to 1 if you have the `avahi_free' function. */ +#undef HAVE_AVAHI_FREE + /* Define to 1 if you have the `cfsetispeed' function. */ #undef HAVE_CFSETISPEED @@ -77,6 +89,9 @@ /* Define to 1 if you have the `flock' function. */ #undef HAVE_FLOCK +/* Define to 1 if you have the header file. */ +#undef HAVE_FREEIPMI_FREEIPMI_H + /* Define to 1 if you have the header file. */ #undef HAVE_GDFONTMB_H @@ -86,6 +101,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H +/* Define to 1 if you have the `getopt_long' function. */ +#undef HAVE_GETOPT_LONG + /* Define to 1 if you have the `getpassphrase' function. */ #undef HAVE_GETPASSPHRASE @@ -101,6 +119,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_IPMI_MONITORING_H + /* Define if you have Boutell's libgd installed */ #undef HAVE_LIBGD @@ -149,6 +170,9 @@ /* Define to 1 if you have the `pm_connect' function. */ #undef HAVE_PM_CONNECT +/* Define to enable pthread support code */ +#undef HAVE_PTHREAD + /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV @@ -325,6 +349,18 @@ /* Version number of package */ #undef VERSION +/* Define to enable avahi support */ +#undef WITH_AVAHI + +/* Define to enable IPMI support using FreeIPMI */ +#undef WITH_FREEIPMI + +/* Define to enable IPMI support */ +#undef WITH_IPMI + +/* Define to enable Neon XML/HTTP support */ +#undef WITH_NEON + /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD diff --git a/include/nut_version.h b/include/nut_version.h index 42cfb0c..cfd5f09 100644 --- a/include/nut_version.h +++ b/include/nut_version.h @@ -1,3 +1,3 @@ /* Autogenerated file. Do not change. */ /* This file was generated by "make". */ -#define NUT_VERSION_MACRO "2.6.1-3015:3023" +#define NUT_VERSION_MACRO "2.6.2-3235:3238" diff --git a/include/parseconf.h b/include/parseconf.h index 00d4d8d..d85c89d 100644 --- a/include/parseconf.h +++ b/include/parseconf.h @@ -20,6 +20,8 @@ #ifndef PARSECONF_H_SEEN #define PARSECONF_H_SEEN 1 +#include + #ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { diff --git a/lib/Makefile.in b/lib/Makefile.in index 73e3a58..aa13f0c 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -48,6 +48,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -138,10 +140,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -179,6 +185,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -243,6 +253,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/m4/nut_check_libavahi.m4 b/m4/nut_check_libavahi.m4 new file mode 100644 index 0000000..034d31a --- /dev/null +++ b/m4/nut_check_libavahi.m4 @@ -0,0 +1,78 @@ +dnl Check for LIBAVAHI compiler flags. On success, set nut_have_neon="yes" +dnl and set LIBAVAHI_CFLAGS and LIBAVAHI_LIBS. On failure, set +dnl nut_have_avahi="no". This macro can be run multiple times, but will +dnl do the checking only once. + +AC_DEFUN([NUT_CHECK_LIBAVAHI], +[ +if test -z "${nut_have_avahi_seen}"; then + nut_have_avahi_seen=yes + + dnl save CFLAGS and LIBS + CFLAGS_ORIG="${CFLAGS}" + LIBS_ORIG="${LIBS}" + + dnl See which version of the avahi library (if any) is installed + AC_MSG_CHECKING(for avahi-core version via pkg-config (0.6.30 minimum required)) + AVAHI_CORE_VERSION="`pkg-config --silence-errors --modversion avahi-core 2>/dev/null`" + if test "$?" != "0" -o -z "${AVAHI_CORE_VERSION}"; then + AVAHI_CORE_VERSION="none" + fi + AC_MSG_RESULT(${AVAHI_CORE_VERSION} found) + + AC_MSG_CHECKING(for avahi-client version via pkg-config (0.6.30 minimum required)) + AVAHI_CLIENT_VERSION="`pkg-config --silence-errors --modversion avahi-client 2>/dev/null`" + if test "$?" != "0" -o -z "${AVAHI_CLIENT_VERSION}"; then + AVAHI_CLIENT_VERSION="none" + fi + AC_MSG_RESULT(${AVAHI_CLIENT_VERSION} found) + + AC_MSG_CHECKING(for avahi cflags) + AC_ARG_WITH(avahi-includes, + AS_HELP_STRING([@<:@--with-avahi-includes=CFLAGS@:>@], [include flags for the avahi library]), + [ + case "${withval}" in + yes|no) + AC_MSG_ERROR(invalid option --with(out)-avahi-includes - see docs/configure.txt) + ;; + *) + CFLAGS="${withval}" + ;; + esac + ], [CFLAGS="`pkg-config --silence-errors --cflags avahi-core avahi-client 2>/dev/null`"]) + AC_MSG_RESULT([${CFLAGS}]) + + AC_MSG_CHECKING(for avahi ldflags) + AC_ARG_WITH(avahi-libs, + AS_HELP_STRING([@<:@--with-avahi-libs=LIBS@:>@], [linker flags for the avahi library]), + [ + case "${withval}" in + yes|no) + AC_MSG_ERROR(invalid option --with(out)-avahi-libs - see docs/configure.txt) + ;; + *) + LIBS="${withval}" + ;; + esac + ], [LIBS="`pkg-config --silence-errors --libs avahi-core avahi-client 2>/dev/null`"]) + AC_MSG_RESULT([${LIBS}]) + + dnl check if avahi-core is usable + AC_CHECK_HEADERS(avahi-common/malloc.h, [nut_have_avahi=yes], [nut_have_avahi=no], [AC_INCLUDES_DEFAULT]) + AC_CHECK_FUNCS(avahi_free, [], [nut_have_avahi=no]) + + if test "${nut_have_avahi}" = "yes"; then + dnl check if avahi-client is usable + AC_CHECK_HEADERS(avahi-client/client.h, [nut_have_avahi=yes], [nut_have_avahi=no], [AC_INCLUDES_DEFAULT]) + AC_CHECK_FUNCS(avahi_client_new, [], [nut_have_avahi=no]) + if test "${nut_have_avahi}" = "yes"; then + LIBAVAHI_CFLAGS="${CFLAGS}" + LIBAVAHI_LIBS="${LIBS}" + fi + fi + + dnl restore original CFLAGS and LIBS + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi +]) diff --git a/m4/nut_check_libfreeipmi.m4 b/m4/nut_check_libfreeipmi.m4 new file mode 100644 index 0000000..0800886 --- /dev/null +++ b/m4/nut_check_libfreeipmi.m4 @@ -0,0 +1,85 @@ +dnl Check for FreeIPMI (LIBFREEIPMI) compiler flags. On success, set +dnl nut_have_freeipmi="yes" and nut_ipmi_lib="FreeIPMI", and define WITH_IPMI, +dnl WITH_FREEIPMI, LIBIPMI_CFLAGS and LIBIPMI_LIBS. On failure, set +dnl nut_have_freeipmi="no". +dnl This macro can be run multiple times, but will do the checking only once. + +AC_DEFUN([NUT_CHECK_LIBFREEIPMI], +[ +if test -z "${nut_have_libfreeipmi_seen}"; then + nut_have_libfreeipmi_seen=yes + + dnl save CFLAGS and LIBS + CFLAGS_ORIG="${CFLAGS}" + LIBS_ORIG="${LIBS}" + + AC_MSG_CHECKING(for FreeIPMI version via pkg-config) + dnl pkg-config support requires Freeipmi 1.0.5, released on Thu Jun 30 2011 + dnl but NUT should only require 0.8.5 or 1.0.1 (comment from upstream Al Chu) + FREEIPMI_VERSION="`pkg-config --silence-errors --modversion libfreeipmi 2>/dev/null`" + if test "$?" = "0" -a -n "${FREEIPMI_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags libfreeipmi libipmimonitoring 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs libfreeipmi libipmimonitoring 2>/dev/null`" + else + FREEIPMI_VERSION="none" + CFLAGS="" + LIBS="-lfreeipmi -lipmimonitoring" + fi + AC_MSG_RESULT(${FREEIPMI_VERSION} found) + + dnl allow overriding FreeIPMI settings if the user knows best + AC_MSG_CHECKING(for FreeIPMI cflags) + AC_ARG_WITH(freeipmi-includes, + AS_HELP_STRING([@<:@--with-freeipmi-includes=CFLAGS@:>@], [include flags for the FreeIPMI library]), + [ + case "${withval}" in + yes|no) + AC_MSG_ERROR(invalid option --with(out)-freeipmi-includes - see docs/configure.txt) + ;; + *) + CFLAGS="${withval}" + ;; + esac + ], []) + AC_MSG_RESULT([${CFLAGS}]) + + AC_MSG_CHECKING(for FreeIPMI ldflags) + AC_ARG_WITH(freeipmi-libs, + AS_HELP_STRING([@<:@--with-freeipmi-libs=LIBS@:>@], [linker flags for the FreeIPMI library]), + [ + case "${withval}" in + yes|no) + AC_MSG_ERROR(invalid option --with(out)-freeipmi-libs - see docs/configure.txt) + ;; + *) + LIBS="${withval}" + ;; + esac + ], []) + AC_MSG_RESULT([${LIBS}]) + + dnl check if freeipmi is usable with our current flags + AC_CHECK_HEADERS(freeipmi/freeipmi.h, [nut_have_freeipmi=yes], [nut_have_freeipmi=no], [AC_INCLUDES_DEFAULT]) + AC_CHECK_HEADERS(ipmi_monitoring.h, [], [nut_have_freeipmi=no], [AC_INCLUDES_DEFAULT]) + AC_SEARCH_LIBS([ipmi_ctx_create], [freeipmi], [], [nut_have_freeipmi=no]) + dnl when version cannot be tested (prior to 1.0.5, with no pkg-config) + dnl we have to check for some specific functions + AC_SEARCH_LIBS([ipmi_ctx_find_inband], [freeipmi], [], [nut_have_freeipmi=no]) + AC_SEARCH_LIBS([ipmi_fru_parse_ctx_create], [freeipmi], [], [nut_have_freeipmi=no]) + AC_SEARCH_LIBS([ipmi_monitoring_init], [ipmimonitoring], [], [nut_have_freeipmi=no]) + + if test "${nut_have_freeipmi}" = "yes"; then + nut_with_ipmi="yes" + nut_ipmi_lib="(FreeIPMI)" + nut_have_libipmi="yes" + AC_DEFINE(WITH_IPMI, 1, [Define to enable IPMI support]) + AC_DEFINE(WITH_FREEIPMI, 1, [Define to enable IPMI support using FreeIPMI]) + LIBIPMI_CFLAGS="${CFLAGS}" + LIBIPMI_LIBS="${LIBS}" + fi + + dnl restore original CFLAGS and LIBS + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi +]) diff --git a/m4/nut_check_os.m4 b/m4/nut_check_os.m4 index e913a47..c735712 100644 --- a/m4/nut_check_os.m4 +++ b/m4/nut_check_os.m4 @@ -44,6 +44,7 @@ AC_DEFUN_ONCE([NUT_OS_FUNCTIONS], AC_DEFUN([NUT_CHECK_OS], [ + m4_pattern_allow([^PKG_TARGET$]) # Look for all possible source of OS name resolution # 1) we look for a LSB release info file eval "dist_search_path=\" diff --git a/m4/nut_report_feature.m4 b/m4/nut_report_feature.m4 index e8d73b6..fc57470 100644 --- a/m4/nut_report_feature.m4 +++ b/m4/nut_report_feature.m4 @@ -5,7 +5,8 @@ AC_DEFUN([NUT_REPORT], nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature - echo -e "Configuration summary:\n======================" >> conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature fi echo "$1: $2" >> conf_nut_report_feature ]) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 4a3f064..2e0ed23 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,4 +1,5 @@ EXTRA_DIST = README \ +avahi/nut.service.in \ HP-UX/Makefile \ HP-UX/nut-drvctl \ HP-UX/nut-drvctl.sh \ @@ -22,4 +23,4 @@ upower/95-upower-hid.rules \ Windows/halt.c \ Windows/Makefile -SUBDIRS = augeas hal hotplug python udev +SUBDIRS = augeas hal hotplug java python systemd udev diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 895ca91..97182e1 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -43,6 +43,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -149,10 +151,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -190,6 +196,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -254,6 +264,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -264,6 +276,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ EXTRA_DIST = README \ +avahi/nut.service.in \ HP-UX/Makefile \ HP-UX/nut-drvctl \ HP-UX/nut-drvctl.sh \ @@ -287,7 +300,7 @@ upower/95-upower-hid.rules \ Windows/halt.c \ Windows/Makefile -SUBDIRS = augeas hal hotplug python udev +SUBDIRS = augeas hal hotplug java python systemd udev all: all-recursive .SUFFIXES: diff --git a/scripts/README b/scripts/README index d795fe9..0b1b981 100644 --- a/scripts/README +++ b/scripts/README @@ -7,7 +7,9 @@ specific USB devices, - UPower (previously DeviceKit-power) rules file, - Python Client module and application, - Perl client module, -- Augeas support lenses and modules for NUT. +- Augeas support lenses and modules for NUT, +- Java client library and test application, +- systemd support files. They have either been contributed by users of the software, or by the NUT Team itself. diff --git a/scripts/augeas/Makefile.in b/scripts/augeas/Makefile.in index f35554d..f9f6293 100644 --- a/scripts/augeas/Makefile.in +++ b/scripts/augeas/Makefile.in @@ -48,6 +48,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -116,10 +118,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -157,6 +163,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -221,6 +231,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/scripts/augeas/README b/scripts/augeas/README index 1f12136..3be147e 100644 --- a/scripts/augeas/README +++ b/scripts/augeas/README @@ -203,3 +203,59 @@ Test the conformity testing module Existing configuration files can be tested for conformity. To do so, use: $ augparse -I ./ ./test_nut.aug + + +Complete configuration wizard example +------------------------------------- + +Here is a Python example that generate a complete and usable standalone configuration: + +-------------------------------------------------------------------------------- +import augeas + +device_name="dev1" +driver_name="usbhid-ups" +port_name="auto" + +a = augeas.augeas() + +# Generate nut.conf +a.set("/files/etc/nut/nut.conf/MODE", "standalone") + +# Generate ups.conf +# FIXME: chroot, driverpath? +a.set(("/files/etc/nut/ups.conf/%s/driver" % device_name), driver_name) +a.set(("/files/etc/nut/ups.conf/%s/port" % device_name), port_name) + +# Generate upsd.conf +a.set("/files/etc/nut/upsd.conf/#comment[1]", "just to touch the file!") + +# Generate upsd.users +user = "admin" +a.set(("/files/etc/nut/upsd.users/%s/password" % user), "dummypass") +a.set(("/files/etc/nut/upsd.users/%s/actions/SET" % user), "") +# FIXME: instcmds lens should be fixed, as per the above rule +a.set(("/files/etc/nut/upsd.users/%s/instcmds" % user), "ALL") + +monuser = "monuser" +monpasswd = "******" +a.set(("/files/etc/nut/upsd.users/%s/password" % monuser), monpasswd) +a.set(("/files/etc/nut/upsd.users/%s/upsmon" % monuser), "master") + +# Generate upsmon.conf +a.set("/files/etc/nut/upsmon.conf/MONITOR/system/upsname", device_name) +# Note: we prefer to omit localhost, not to be bound to a specific +# entry in /etc/hosts, and thus be more generic +#a.set("/files/etc/nut/upsmon.conf/MONITOR/system/hostname", "localhost") +a.set("/files/etc/nut/upsmon.conf/MONITOR/powervalue", "1") +a.set("/files/etc/nut/upsmon.conf/MONITOR/username", monuser) +a.set("/files/etc/nut/upsmon.conf/MONITOR/password", monpasswd) +a.set("/files/etc/nut/upsmon.conf/MONITOR/type", "master") + +# FIXME: glitch on the generated content +a.set("/files/etc/nut/upsmon.conf/SHUTDOWNCMD", "/sbin/shutdown -h +0") + +# save config +a.save() +a.close() +-------------------------------------------------------------------------------- diff --git a/scripts/augeas/nutupsconf.aug.in b/scripts/augeas/nutupsconf.aug.in index 1c5918e..ed087fe 100644 --- a/scripts/augeas/nutupsconf.aug.in +++ b/scripts/augeas/nutupsconf.aug.in @@ -54,6 +54,8 @@ let ups_fields = "driver" | "advorder" | "authPassword" | "authProtocol" + | "authtype" + | "awd" | "batteryPercentage" | "battext" | "baud_rate" @@ -70,6 +72,7 @@ let ups_fields = "driver" | "fake_lowbatt" | "flash" | "frequency" + | "fruid" | "full_update" | "houroff" | "houron" @@ -120,6 +123,7 @@ let ups_fields = "driver" | "sdtype" | "secLevel" | "secName" + | "sensorid" | "serial" | "serialnumber" | "shutdownArguments" @@ -139,6 +143,7 @@ let ups_fields = "driver" | "usd" | "use_crlf" | "use_pre_lf" + | "username" | "validationSequence" | "vendor" | "vendorid" diff --git a/scripts/avahi/nut.service.in b/scripts/avahi/nut.service.in new file mode 100644 index 0000000..5c2eb3e --- /dev/null +++ b/scripts/avahi/nut.service.in @@ -0,0 +1,34 @@ + + + + + + + + + + %h + + + _nut._tcp + @PORT@ + + + diff --git a/scripts/hal/Makefile.in b/scripts/hal/Makefile.in index ed3dc02..646ff23 100644 --- a/scripts/hal/Makefile.in +++ b/scripts/hal/Makefile.in @@ -45,6 +45,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -134,10 +136,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -175,6 +181,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -239,6 +249,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/scripts/hal/ups-nut-device.fdi.in b/scripts/hal/ups-nut-device.fdi.in index 609c17d..30c6f12 100644 --- a/scripts/hal/ups-nut-device.fdi.in +++ b/scripts/hal/ups-nut-device.fdi.in @@ -194,6 +194,24 @@ ups + + + + battery + battery + hald-addon-blazer_usb + ups + + + + + + battery + battery + hald-addon-blazer_usb + ups + + @@ -255,6 +273,15 @@ ups + + + + battery + battery + hald-addon-richcomm_usb + ups + + @@ -515,6 +542,15 @@ ups + + + + battery + battery + hald-addon-blazer_usb + ups + + @@ -526,6 +562,15 @@ ups + + + + battery + battery + hald-addon-blazer_usb + ups + + diff --git a/scripts/hotplug/Makefile.in b/scripts/hotplug/Makefile.in index ae6a80f..9bbde22 100644 --- a/scripts/hotplug/Makefile.in +++ b/scripts/hotplug/Makefile.in @@ -47,6 +47,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -139,10 +141,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -180,6 +186,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -244,6 +254,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/scripts/hotplug/libhid.usermap b/scripts/hotplug/libhid.usermap index 9b301a6..4eba6e3 100644 --- a/scripts/hotplug/libhid.usermap +++ b/scripts/hotplug/libhid.usermap @@ -64,6 +64,10 @@ libhidups 0x0003 0x051d 0x0003 0x0000 0x0000 0x00 libhidups 0x0003 0x0592 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PW 9140 libhidups 0x0003 0x0592 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Agiler UPS +libhidups 0x0003 0x05b8 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Belkin F6C1200-UNV +libhidups 0x0003 0x0665 0x5161 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Phoenixtec # various models @@ -84,6 +88,8 @@ libhidups 0x0003 0x0764 0x0005 0x0000 0x0000 0x00 libhidups 0x0003 0x0764 0x0501 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # OR2200LCDRM2U libhidups 0x0003 0x0764 0x0601 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Sweex 1000VA +libhidups 0x0003 0x0925 0x1234 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # TrippLite # e.g. OMNIVS1000, SMART550USB, ... @@ -160,7 +166,11 @@ libhidups 0x0003 0x0d9f 0x00a4 0x0000 0x0000 0x00 libhidups 0x0003 0x0d9f 0x00a5 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PowerCOM BNT - Black Knight Pro libhidups 0x0003 0x0d9f 0x00a6 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Unitek Alpha 1200Sx +libhidups 0x0003 0x0f03 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Liebert # Liebert PowerSure PSA UPS libhidups 0x0003 0x10af 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# GE EP series +libhidups 0x0003 0x14f0 0x00c9 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 diff --git a/scripts/java/Makefile.am b/scripts/java/Makefile.am new file mode 100644 index 0000000..83f5c1d --- /dev/null +++ b/scripts/java/Makefile.am @@ -0,0 +1,15 @@ +# TODO: Java / Maven build integration + +EXTRA_DIST = README \ +jNut/pom.xml \ +jNut/README \ +jNut/src/main/java/org/networkupstools/jnut/Client.java \ +jNut/src/main/java/org/networkupstools/jnut/Command.java \ +jNut/src/main/java/org/networkupstools/jnut/Device.java \ +jNut/src/main/java/org/networkupstools/jnut/NutException.java \ +jNut/src/main/java/org/networkupstools/jnut/StringLineSocket.java \ +jNut/src/main/java/org/networkupstools/jnut/Variable.java \ +jNut/src/test/java/org/networkupstools/jnut/ClientTest.java \ +jNutList/pom.xml \ +jNutList/README \ +jNutList/src/main/java/org/networkupstools/jnutlist/AppList.java diff --git a/scripts/java/Makefile.in b/scripts/java/Makefile.in new file mode 100644 index 0000000..8e5a589 --- /dev/null +++ b/scripts/java/Makefile.in @@ -0,0 +1,441 @@ +# Makefile.in generated by automake 1.11.1 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. +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# TODO: Java / Maven build integration +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = scripts/java +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.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 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nut_arg_with.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ + $(top_srcdir)/m4/nut_check_libgd.m4 \ + $(top_srcdir)/m4/nut_check_libhal.m4 \ + $(top_srcdir)/m4/nut_check_libneon.m4 \ + $(top_srcdir)/m4/nut_check_libnetsnmp.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 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ + $(top_srcdir)/m4/nut_report_feature.m4 \ + $(top_srcdir)/m4/nut_type_socklen_t.m4 \ + $(top_srcdir)/configure.in +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 = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +ASCIIDOC = @ASCIIDOC@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFPATH = @CONFPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ +DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ +DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ +DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ +HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ +HAL_FDI_PATH = @HAL_FDI_PATH@ +HAL_USER = @HAL_USER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBGD_CFLAGS = @LIBGD_CFLAGS@ +LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ +LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ +LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ +LIBS = @LIBS@ +LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NETLIBS = @NETLIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OS_NAME = @OS_NAME@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ +RANLIB = @RANLIB@ +RUN_AS_GROUP = @RUN_AS_GROUP@ +RUN_AS_USER = @RUN_AS_USER@ +SED = @SED@ +SERLIBS = @SERLIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STATEPATH = @STATEPATH@ +STRIP = @STRIP@ +SUN_LIBUSB = @SUN_LIBUSB@ +VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cgiexecdir = @cgiexecdir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverexecdir = @driverexecdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +hotplugdir = @hotplugdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +udevdir = @udevdir@ +EXTRA_DIST = README \ +jNut/pom.xml \ +jNut/README \ +jNut/src/main/java/org/networkupstools/jnut/Client.java \ +jNut/src/main/java/org/networkupstools/jnut/Command.java \ +jNut/src/main/java/org/networkupstools/jnut/Device.java \ +jNut/src/main/java/org/networkupstools/jnut/NutException.java \ +jNut/src/main/java/org/networkupstools/jnut/StringLineSocket.java \ +jNut/src/main/java/org/networkupstools/jnut/Variable.java \ +jNut/src/test/java/org/networkupstools/jnut/ClientTest.java \ +jNutList/pom.xml \ +jNutList/README \ +jNutList/src/main/java/org/networkupstools/jnutlist/AppList.java + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/java/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu scripts/java/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-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 +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir 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 maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# 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. +.NOEXPORT: diff --git a/scripts/java/README b/scripts/java/README new file mode 100644 index 0000000..95d1bee --- /dev/null +++ b/scripts/java/README @@ -0,0 +1,14 @@ +Java NUT Client files +~~~~~~~~~~~~~~~~~~~~~ + +This directory contains various NUT Client related java source files, written by +Emilien Kia, sponsored by Eaton, and released under GPL v2. + +* "jNut": this directory contains maven project and source files for jNut, +which is a Java abstraction bundle to access NUT server(s). +You can use it in Java programs to access NUT's upsd data server in a simple +way, without having to know the NUT protocol. + +* "jNutList": this directory contains maven project and source files for +jNutList, a simple Java example program using jNut which connect to an UPSD, +lists its ups and their variables and commands. diff --git a/scripts/java/jNut/README b/scripts/java/jNut/README new file mode 100644 index 0000000..3c75e24 --- /dev/null +++ b/scripts/java/jNut/README @@ -0,0 +1,71 @@ +jNut library +~~~~~~~~~~~~ + +This directory contains source files for the jNut library, +which is a Java abstraction bundle to access NUT server(s). +You can use it in Java programs to access NUT's upsd data server in a simple +way, without having to know the NUT protocol. + +jNut building requirements +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +jNut requires to be build : +- A Java JDK 6 correctly set in environment (ie bin folder in path) +- A Maven 3 installation set in environment (ie bin folder in path) with +sufficient configuration (internet connection, local repository) to let maven +get all plugins to make processes. + +jNut is written in Java SE 1.4 and is tuned to be compiled to Java 1.4 code +level so most of environment can use it. + +jNut building +^^^^^^^^^^^^^ + +Once JDK and Maven installed and configured, just go into the jNut directory +and type: + + mvn install + +The produced package called 'jNut-x.x-xxx.jar' is located in 'target' +subdirectory. + +jNut javadoc +^^^^^^^^^^^^ + +You can generate jNut javadoc by typing: + + mvn javadoc:javadoc + +Documentation will be generated in 'target/site/apidocs' subdirectory and its +entry point is located at 'target/site/apidocs/index.html'. + +Workspace cleaning +^^^^^^^^^^^^^^^^^^ + +The jNut workspace can be cleaned by removing the 'target' subdirectory or by +typing: + + mvn clean + +Unit test notes +^^^^^^^^^^^^^^^ + +jNut sources embed some unit tests in the 'src/test/java' subdirectory. +These tests are based on JUnit and are executed between compilation and +packaging phases at each build. + +Implementation notes +^^^^^^^^^^^^^^^^^^^^ + +Currently, jNut is not thread safe. It is not protected against concurrent +queries but queries to different clients can be done in parallel as there are +done on different sockets. + +Moreover, jNut have no connection preservation system so servers can break down +connections due to timeout. +Application using retrieved data must forget them when a disconnection occurs. +If the application want to maintain the connection, it must implement a +ping-pong mecanism itself. + +At present time, jNut do not support SSL connection. It is planned for near +future. diff --git a/scripts/java/jNut/pom.xml b/scripts/java/jNut/pom.xml new file mode 100644 index 0000000..a2c0e5c --- /dev/null +++ b/scripts/java/jNut/pom.xml @@ -0,0 +1,40 @@ + + 4.0.0 + + org.networkupstools + jNut + 0.1-SNAPSHOT + jar + + jNut + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + 3.8.1 + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.4 + 1.4 + + + + + + diff --git a/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Client.java b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Client.java new file mode 100644 index 0000000..474f812 --- /dev/null +++ b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Client.java @@ -0,0 +1,619 @@ +/* Client.java + + Copyright (C) 2011 Eaton + + 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 +*/ +package org.networkupstools.jnut; + +import java.io.IOException; +import java.net.UnknownHostException; +import java.util.ArrayList; + +/** + * A jNut client is start point to dialog to UPSD. + * It can connect to an UPSD then retrieve its device list. + * It support authentication by login/password. + *

    + * You can directly create and connect a client by using the + * Client(String host, int port, String login, String passwd) constructor + * or use a three phase construction: + *

      + *
    • empty constructor + *
    • setting host, port, login and password with setters + *
    • call empty connect() + *
    + *

    + * Objects retrieved by Client are attached (directly or indirectly) to it. + * If the connection is closed, attached objects must not be used anymore (GC). + *

    + * Note: The jNut Client does not support any reconnection nor ping mechanism, + * so the calling application must know the UPSD can timeout the connection. + *

    + * Note: Retrieved values are not valid along the time, they are valid at the + * precise moment they are retrieved. + * + * @author Emilien Kia + */ +public class Client { + + /** + * Host to which connect. + * Network name or IP. + * Default to "127.0.0.1" + */ + private String host = "127.0.0.1"; + + /** + * IP port. + * Default to 3493 + */ + private int port = 3493; + + /** + * Login to use to connect to UPSD. + */ + private String login = null; + + /** + * Password to use to connect to UPSD. + */ + private String passwd = null; + + /** + * Communication socket + */ + private StringLineSocket socket = null; + + + /** + * Get the host name or address to which client is (or will be) connected. + * @return Host name or address. + */ + public String getHost() { + return host; + } + + /** + * Set the host name (or address) to which the client will intend to connect to at next connection. + * @param host New host name or address. + */ + public void setHost(String host) { + this.host = host; + } + + /** + * Get the login with which the client is (or will be connected). + * @return The login. + */ + public String getLogin() { + return login; + } + + /** + * Set the login with which the client will intend to connect. + * @param login New login. + */ + public void setLogin(String login) { + this.login = login; + } + + /** + * Get the password with which the client is (or will be connected). + * @return The password. + */ + public String getPasswd() { + return passwd; + } + + /** + * Set the password with which the client will intend to connect. + * @param passwd New password. + */ + public void setPasswd(String passwd) { + this.passwd = passwd; + } + + /** + * Get the port to which client is (or will be) connected. + * @return Port number. + */ + public int getPort() { + return port; + } + + /** + * Set the port to which client is (or will be) connected. + * @param port Port number. + */ + public void setPort(int port) { + this.port = port; + } + + + + /** + * Default constructor. + */ + public Client() + { + } + + /** + * Connection constructor. + * Construct the Client object and intend to connect. + * Throw an exception if cannot connect. + * @param host Host to which connect. + * @param port IP port. + * @param login Login to use to connect to UPSD. + * @param passwd Password to use to connect to UPSD. + */ + public Client(String host, int port, String login, String passwd) throws IOException, UnknownHostException, NutException + { + connect(host, port, login, passwd); + } + + /** + * Intent to connect and authenticate to an UPSD with specified parameters. + * Throw an exception if cannot connect. + * @param host Host to which connect. + * @param port IP port. + * @param login Login to use to connect to UPSD. + * @param passwd Password to use to connect to UPSD. + */ + public void connect(String host, int port, String login, String passwd) throws IOException, UnknownHostException, NutException + { + this.host = host; + this.port = port; + this.login = login; + this.passwd = passwd; + connect(); + } + + /** + * Intent to connect to an UPSD with specified parameters without authentication. + * Throw an exception if cannot connect. + * @param host Host to which connect. + * @param port IP port. + */ + public void connect(String host, int port) throws IOException, UnknownHostException, NutException + { + this.host = host; + this.port = port; + connect(); + } + + /** + * Connection to UPSD with already specified parameters. + * Throw an exception if cannot connect. + */ + public void connect() throws IOException, UnknownHostException, NutException + { + // Force disconnect if another connection is alive. + if(socket!=null) + disconnect(); + + socket = new StringLineSocket(host, port); + + authenticate(); + } + + /** + * Intend to authenticate with specified login and password, overriding + * already defined ones. + * @param login + * @param passwd + * @throws IOException + * @throws NutException + */ + public void authenticate(String login, String passwd) throws IOException, NutException + { + this.login = login; + this.passwd = passwd; + authenticate(); + } + + /** + * Intend to authenticate with alread set login and password. + * @throws IOException + * @throws NutException + */ + public void authenticate() throws IOException, NutException + { + // Send login + if(login!=null && !login.isEmpty()) + { + String res = query("USERNAME", login); + if(!res.startsWith("OK")) + { + // Normaly response should be OK or ERR and nothing else. + throw new NutException(NutException.UnknownResponse, "Unknown response in Client.connect (USERNAME) : " + res); + } + } + // Send password + if(passwd!=null && !passwd.isEmpty()) + { + String res = query("PASSWORD", passwd); + if(!res.startsWith("OK")) + { + // Normaly response should be OK or ERR and nothing else. + throw new NutException(NutException.UnknownResponse, "Unknown response in Client.connect (PASSWORD) : " + res); + } + } + } + + /** + * Test if the client is connected to the UPSD. + * Note: it does not detect if the connection have been closed by server. + * @return True if connected. + */ + public boolean isConnected() + { + return socket!=null && socket.isConnected(); + } + + /** + * Disconnect. + */ + public void disconnect() + { + if(socket!=null) + { + try + { + if(socket.isConnected()) + socket.close(); + } + catch(IOException e) + { + e.printStackTrace(); + } + socket = null; + } + } + + /** + * Log out. + */ + public void logout() + { + if(socket!=null) + { + try + { + if(socket.isConnected()) + { + socket.write("LOGOUT"); + socket.close(); + } + } + catch(IOException e) + { + e.printStackTrace(); + } + socket = null; + } + } + + /** + * Merge an array of stings into on string, with a space ' ' separator. + * @param str First string to merge + * @param strings Additionnal strings to merge + * @param sep Separator. + * @return The merged string, empty if no source string. + */ + static String merge(String str, String[] strings) + { + String res = str; + if(strings!=null) + { + for(int n=0; n ""'. + * @param source String source to split. + * @return String couple with name and value. + */ + static String[] splitNameValueString(String source) + { + int pos = source.indexOf(' '); + if(pos<1) + return null; + String name = source.substring(0, pos); + String value = extractDoublequotedValue(source.substring(pos+1)); + if(value==null) + return null; + String[] res = new String[2]; + res[0] = name; + res[1] = value; + return res; + } + + /** + * Intend to extract a value from its doublequoted and escaped representation. + * @param source Source string to convert. + * @return Extracted value + */ + static String extractDoublequotedValue(String source) + { + // Test doublequote at begin and end of string, then remove them. + if(!(source.startsWith("\"") && source.endsWith("\""))) + return null; + source = source.substring(1, source.length()-1); + // Unescape it. + return unescape(source); + } + + /** + * Escape string with backslashes. + * @param str String to escape. + * @return Escaped string. + */ + static String escape(String str) + { + // Replace a backslash by two backslash (regexp) + str = str.replaceAll("\\\\", "\\\\\\\\"); + // Replace a doublequote by backslash-doublequote (regexp) + str = str.replaceAll("\"", "\\\\\""); + return str; + } + + /** + * Unescape string with backslashes. + * @param str String to unescape. + * @return Unescaped string. + */ + static String unescape(String str) + { + // Replace a backslash-doublequote by doublequote (regexp) + str = str.replaceAll("\\\\\"", "\""); + // Replace two backslash by a backslash (regexp) + str = str.replaceAll("\\\\\\\\", "\\\\"); + return str; + } + + /** + * Detect an UPSD ERR line. + * If found, parse it, construct and throw an NutException + * @param str Line to analyse. + * @throws NutException + */ + private void detectError(String str) throws NutException + { + if(str.startsWith("ERR ")) + { + String[] arr = str.split(" ", 3); + switch(arr.length) + { + case 2: + throw new NutException(arr[1]); + case 3: + throw new NutException(arr[1], arr[2]); + default: + throw new NutException(); + } + } + } + + /** + * Send a query line then read the response. + * Helper around query(String). + * @param query Query to send. + * @param subquery Sub query to send. + * @return The reply. + * @throws IOException + */ + protected String query(String query, String subquery) throws IOException, NutException + { + return query(query + " " + subquery); + } + + /** + * Send a query line then read the response. + * Helper around query(String, String ...). + * @param query Query to send. + * @param subquery Sub query to send. + * @param params Optionnal additionnal parameters. + * @return The reply. + * @throws IOException + */ + protected String query(String query, String subquery, String[] params) throws IOException, NutException + { + return query(query + " " + subquery, params); + } + + /** + * Send a query line then read the response. + * @param query Query to send. + * @param params Optionnal additionnal parameters. + * @return The reply. + * @throws IOException + */ + protected String query(String query, String [] params) throws IOException, NutException + { + query = merge(query, params); + return query(query); + } + + /** + * Send a query line then read the response. + * @param query Query to send. + * @return The reply. + * @throws IOException + */ + protected String query(String query) throws IOException, NutException + { + if(!isConnected()) + return null; + + socket.write(query); + String res = socket.read(); + detectError(res); + return res; + } + + /** + * Send a GET query line then read the reply and validate the response. + * @param subcmd GET subcommand to send. + * @param param Extra parameters + * @return GET result return by UPSD, without the subcommand and param prefix. + * @throws IOException + */ + protected String get(String subcmd, String param) throws IOException, NutException + { + String[] params = {param}; + return get(subcmd, params); + } + + /** + * Send a GET query line then read the reply and validate the response. + * @param subcmd GET subcommand to send. + * @param params Eventual extra parameters. + * @return GET result return by UPSD, without the subcommand and param prefix. + * @throws IOException + */ + protected String get(String subcmd, String [] params) throws IOException, NutException + { + if(!isConnected()) + return null; + + subcmd = merge(subcmd, params); + socket.write("GET " + subcmd); + String res = socket.read(); + if(res==null) + return null; + detectError(res); + if(res.startsWith(subcmd + " ")) + { + return res.substring(subcmd.length()+1); + } + else + { + return null; + } + } + + /** + * Send a LIST query line then read replies and validate them. + * @param subcmd LIST subcommand to send. + * @return LIST results return by UPSD, without the subcommand and param prefix. + * @throws IOException + */ + protected String[] list(String subcmd) throws IOException, NutException + { + return list(subcmd, (String[])null); + } + + /** + * Send a LIST query line then read replies and validate them. + * @param subcmd LIST subcommand to send. + * @param param Extra parameters. + * @return LIST results return by UPSD, without the subcommand and param prefix. + * @throws IOException + */ + protected String[] list(String subcmd, String param) throws IOException, NutException + { + String[] params = {param}; + return list(subcmd, params); + } + + /** + * Send a LIST query line then read replies and validate them. + * @param subcmd LIST subcommand to send. + * @param params Eventual extra parameters. + * @return LIST results return by UPSD, without the subcommand and param prefix. + * @throws IOException + */ + protected String[] list(String subcmd, String [] params) throws IOException, NutException + { + if(!isConnected()) + return null; + + subcmd = merge(subcmd, params); + socket.write("LIST " + subcmd); + String res = socket.read(); + if(res==null) + return null; + detectError(res); + if(!res.startsWith("BEGIN LIST " + subcmd)) + return null; + + ArrayList/**/ list = new ArrayList/**/(); + int sz = subcmd.length()+1; + while(true) + { + res = socket.read(); + detectError(res); + if(!res.startsWith(subcmd + " ")) + break; + list.add(res.substring(sz)); + } + if(!res.equals("END LIST " + subcmd)) + return null; + + return (String[])list.toArray(new String[list.size()]); + } + + + /** + * Returns the list of available devices from the NUT server. + * @return List of devices, empty if nothing, + * null if not connected or failed. + * + */ + public Device[] getDeviceList() throws IOException, NutException + { + String[] res = list("UPS"); + if(res==null) + return null; + + ArrayList/**/ list = new ArrayList/**/(); + for(int i=0; i + * It can be used to retrieve description and execute commands. + * A Command object can be retrieved from Device instance and can not be constructed directly. + * + * @author Emilien Kia + */ +public class Command { + /** + * Device to which command is attached + */ + Device device = null; + + /** + * Command name + */ + String name = null; + + /** + * Internally create a command. + * @param name Command name. + * @param device Device to which the command is attached. + */ + protected Command(String name, Device device) + { + this.device = device; + this.name = name; + } + + /** + * Return the device to which the command can be executed. + * @return Attached device. + */ + public Device getDevice() { + return device; + } + + /** + * Return the command name. + * @return Command name. + */ + public String getName() { + return name; + } + + /** + * Retrieve the command description from UPSD and store it in cache. + * @return Command description + * @throws IOException + */ + public String getDescription() throws IOException, NutException { + if(device!=null && device.getClient()!=null) + { + String[] params = {device.getName(), name}; + String res = device.getClient().get("CMDDESC", params); + return res!=null?Client.extractDoublequotedValue(res):null; + } + return null; + } + + /** + * Execute the instant command. + * @throws IOException + */ + public void execute() throws IOException, NutException { + if(device!=null && device.getClient()!=null) + { + String[] params = {device.getName(), name}; + String res = device.getClient().query("INSTCMD", params); + if(!res.equals("OK")) + { + // Normaly response should be OK or ERR and nothing else. + throw new NutException(NutException.UnknownResponse, "Unknown response in Command.execute : " + res); + } + } + } +} diff --git a/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Device.java b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Device.java new file mode 100644 index 0000000..8f4fdc1 --- /dev/null +++ b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Device.java @@ -0,0 +1,279 @@ +/* Device.java + + Copyright (C) 2011 Eaton + + 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 +*/ +package org.networkupstools.jnut; + +import java.io.IOException; +import java.util.ArrayList; + +/** + * Class representing a device attached to a Client. + *

    + * It can retrieve its description, its number of logins, its variable and command lists. + * A Device object can be retrieved from Client instance and can not be constructed directly. + * + * @author Emilien Kia + */ +public class Device { + + /** + * Client to which device is attached + */ + Client client = null; + + /** + * Device name + */ + String name = null; + + /** + * Internally create a device. + * @param name Device name. + * @param client Client to which the device is attached. + */ + protected Device(String name, Client client) + { + this.client = client; + this.name = name; + } + + /** + * Return the client to which the device is connected. + * @return Attached client. + */ + public Client getClient() { + return client; + } + + /** + * Return the device name. + * @return Device name. + */ + public String getName() { + return name; + } + + /** + * Retrieve the device description from UPSD and store it in cache. + * @return Device description + * @throws IOException + */ + public String getDescription() throws IOException, NutException { + if(client!=null) + { + return client.get("UPSDESC", name); + } + return null; + } + + /** + * Log in to the ups. + *

    + * Use this to log the fact that a system is drawing power from this UPS. + * The upsmon master will wait until the count of attached systems reaches + * 1 - itself. This allows the slaves to shut down first. + *

    + * NOTE: You probably shouldn't send this command unless you are upsmon, + * or a upsmon replacement. + * @throws IOException + * @throws NutException + */ + public void login() throws IOException, NutException { + if(client!=null) + { + String res = client.query("LOGIN", name); + if(!res.startsWith("OK")) + { + // Normaly response should be OK or ERR and nothing else. + throw new NutException(NutException.UnknownResponse, "Unknown response in Device.login : " + res); + } + } + } + + /** + * This function doesn't do much by itself. It is used by upsmon to make + * sure that master-level functions like FSD are available if necessary + * @throws IOException + * @throws NutException + */ + public void master() throws IOException, NutException { + if(client!=null) + { + String res = client.query("MASTER", name); + if(!res.startsWith("OK")) + { + // Normaly response should be OK or ERR and nothing else. + throw new NutException(NutException.UnknownResponse, "Unknown response in Device.master : " + res); + } + } + } + + /** + * Set the "forced shutdown" flag. + *

    + * upsmon in master mode is the primary user of this function. It sets this + * "forced shutdown" flag on any UPS when it plans to power it off. This is + * done so that slave systems will know about it and shut down before the + * power disappears. + *

    + * Setting this flag makes "FSD" appear in a STATUS request for this UPS. + * Finding "FSD" in a status request should be treated just like a "OB LB". + *

    + * It should be noted that FSD is currently a latch - once set, there is + * no way to clear it short of restarting upsd or dropping then re-adding + * it in the ups.conf. This may cause issues when upsd is running on a + * system that is not shut down due to the UPS event. + * @throws IOException + * @throws NutException + */ + public void setForcedShutdown() throws IOException, NutException { + if(client!=null) + { + String res = client.query("FSD", name); + if(!res.startsWith("OK")) + { + // Normaly response should be OK or ERR and nothing else. + throw new NutException(NutException.UnknownResponse, "Unknown response in Device.setForcedShutdown : " + res); + } + } + } + + /** + * Return the number of clients which have done LOGIN for this UPS. + * Force to retrieve it from UPSD and store it in cache. + * @return Number of clients, -1 if error. + * @throws IOException + */ + public int getNumLogin() throws IOException, NutException { + if(client!=null) + { + String res = client.get("NUMLOGINS", name); + return res!=null?Integer.parseInt(res):-1; + } + return -1; + } + + + /** + * Return the list of device variables from the NUT server. + * @return List of variables, empty if nothing, + * null if not connected or failed. + * @throws IOException + */ + public Variable[] getVariableList() throws IOException, NutException { + if(client==null) + return null; + + String[] res = client.list("VAR", name); + if(res==null) + return null; + + ArrayList/**/ list = new ArrayList/**/(); + for(int i=0; i*/ list = new ArrayList/**/(); + for(int i=0; i*/ list = new ArrayList/**/(); + for(int i=0; i + * Instance are thrown when an UPSD returns an error with an "ERR" directive. + * Moreover it can ben thrown with some extra errors like: + *

      + *
    • UNKNOWN-RESPONSE : The response is not understood + *
    + *

    + * A Nut exception has a (standard java exception message) message which correspond + * to error code returns by UPSD (like 'ACCESS-DENIED', 'UNKNOWN-UPS' ...). + * An extra string embed a more descriptive english message. + * + * @author Emilien Kia + */ +public class NutException extends java.lang.Exception{ + + public static String UnknownResponse = "UNKNOWN-RESPONSE"; + + public static String DriverNotConnected = "DRIVER-NOT-CONNECTED"; + + public String extra = ""; + + public NutException() + { + } + + public NutException(String message) + { + super(message); + } + + public NutException(String message, String extra) + { + super(message); + this.extra = extra; + } + + public NutException(Throwable cause) + { + super(cause); + } + + public NutException(String message, Throwable cause) + { + super(message, cause); + } + + public NutException(String message, String extra, Throwable cause) + { + super(message, cause); + this.extra = extra; + } + + /** + * Returns the extra message. + * @return Extra message if any. + */ + public String getExtra() { + return extra; + } + + /** + * Set the extra message. + * @param extra The new extra message. + */ + public void setExtra(String extra) { + this.extra = extra; + } + + /** + * Test is the exception corresponds to the specified name. + * @param name Name to test + * @return True if exception corresponds. + */ + public boolean is(String name) { + return getMessage()!=null&&getMessage().equals(name); + } + + /** + * Format an exception message. + * @return Exception message + */ + public String toString() { + return "[" + getClass().getSimpleName() + "]" + getMessage() + " : " + getExtra(); + } +} diff --git a/scripts/java/jNut/src/main/java/org/networkupstools/jnut/StringLineSocket.java b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/StringLineSocket.java new file mode 100644 index 0000000..fe39b71 --- /dev/null +++ b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/StringLineSocket.java @@ -0,0 +1,137 @@ +/* StringLineSocket.java + + Copyright (C) 2011 Eaton + + 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 +*/ +package org.networkupstools.jnut; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.net.Socket; +import java.net.UnknownHostException; + +/** + * Class representing a socket, internally used to communicate with UPSD. + * Abstract some stream mechanisms. + * + * @author Emilien Kia + */ +class StringLineSocket { + + /** + * Real internal TCP socket. + */ + Socket socket = null; + + /** + * Writer to the socket. + */ + private OutputStreamWriter writer = null; + + /** + * Reader from the socket. + */ + private BufferedReader reader = null; + + /** + * Create a new line socket. + */ + public StringLineSocket(){ + + } + + /** + * Create a new line socket and connect it. + * @param host Host to connect to + * @param port Port to connect to + * @throws UnknownHostException + * @throws IOException + */ + public StringLineSocket(String host, int port) throws UnknownHostException, IOException{ + connect(host, port); + } + + /** + * Connect a new line socket. + * @param host Host to connect to + * @param port Port to connect to + * @throws UnknownHostException + * @throws IOException + */ + public void connect(String host, int port) throws UnknownHostException, IOException{ + socket = new Socket(host, port); + if(socket!=null) + { + reader = new BufferedReader(new InputStreamReader( + socket.getInputStream())); + writer = new OutputStreamWriter(socket.getOutputStream()); + } + } + + /** + * Close the socket. + */ + public void close() throws IOException{ + if(socket!=null){ + writer.close(); + reader.close(); + socket.close(); + socket = null; + writer = null; + reader = null; + } + } + + /** + * Test if the soecket is connected. + * @return True if connected. + */ + public boolean isConnected() { + return socket!=null && socket.isConnected() && !socket.isClosed(); + } + + /** + * Write a line follow by a '\n' character. + * @param line + * @throws IOException + */ + public void write(String line) throws IOException + { + if(isConnected()) + { + writer.write(line + "\n"); + writer.flush(); + } + } + + /** + * Read a line terminated by a '\n'. + * @return The line without the ending '\n' + * @throws IOException + */ + public String read() throws IOException + { + if(isConnected()) + { + String res = reader.readLine(); + return res; + } + return ""; + } + +} diff --git a/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java new file mode 100644 index 0000000..07c7c37 --- /dev/null +++ b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java @@ -0,0 +1,120 @@ +/* Variable.java + + Copyright (C) 2011 Eaton + + 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 +*/ +package org.networkupstools.jnut; + +import java.io.IOException; + +/** + * Class representing a variable of a device. + *

    + * It can be used to get and set its value (if possible). + * A Variable object can be retrieved from Device instance and can not be constructed directly. + * + * @author Emilien Kia + */ +public class Variable { + /** + * Device to which variable is attached + */ + Device device = null; + + /** + * Variable name + */ + String name = null; + + /** + * Internally create a variable. + * @param name Variable name. + * @param device Device to which the variable is attached. + */ + protected Variable(String name, Device device) + { + this.device = device; + this.name = name; + } + + /** + * Return the device to which the variable is related. + * @return Attached device. + */ + public Device getDevice() { + return device; + } + + /** + * Return the variable name. + * @return Command name. + */ + public String getName() { + return name; + } + + /** + * Retrieve the variable value from UPSD and store it in cache. + * @return Variable value + * @throws IOException + */ + public String getValue() throws IOException, NutException { + if(device!=null && device.getClient()!=null) + { + String[] params = {device.getName(), name}; + String res = device.getClient().get("VAR", params); + return res!=null?Client.extractDoublequotedValue(res):null; + } + return null; + } + + /** + * Retrieve the variable description from UPSD and store it in cache. + * @return Variable description + * @throws IOException + */ + public String getDescription() throws IOException, NutException { + if(device!=null && device.getClient()!=null) + { + String[] params = {device.getName(), name}; + String res = device.getClient().get("DESC", params); + return res!=null?Client.extractDoublequotedValue(res):null; + } + return null; + } + + /** + * Set the variable value. + * Note the new value can be applied with a little delay depending of UPSD and connection. + * @param value New value for the variable + * @throws IOException + */ + public void setValue(String value) throws IOException, NutException { + if(device!=null && device.getClient()!=null) + { + String[] params = {"VAR", device.getName(), + name, " \"" + Client.escape(value) + "\""}; + String res = device.getClient().query("SET", params); + if(!res.equals("OK")) + { + // Normaly response should be OK or ERR and nothing else. + throw new NutException(NutException.UnknownResponse, "Unknown response in Variable.setValue : " + res); + } + } + } + + // TODO Add query for type and enum values +} diff --git a/scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java b/scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java new file mode 100644 index 0000000..73f6296 --- /dev/null +++ b/scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java @@ -0,0 +1,95 @@ +package org.networkupstools.jnut; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class ClientTest extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public ClientTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( ClientTest.class ); + } + + /** + * Escape function test. + */ + public void testEscape() + { + assertEquals("Empty string", "", Client.escape("")); + assertEquals("Simple string", "hello", Client.escape("hello")); + assertEquals("Internal doublequote", "he\\\"llo", Client.escape("he\"llo")); + assertEquals("Internal backslash", "he\\\\llo", Client.escape("he\\llo")); + assertEquals("Internal backslash and doublequote", "he\\\\\\\"llo", Client.escape("he\\\"llo")); + assertEquals("Initial and final doublequote", "\\\"hello\\\"", Client.escape("\"hello\"")); + } + + /** + * Unescape function test. + */ + public void testUnescape() + { + assertEquals("Empty string", "", Client.unescape("")); + assertEquals("Simple string", "hello", Client.unescape("hello")); + assertEquals("Internal doublequote", "he\"llo", Client.unescape("he\\\"llo")); + assertEquals("Internal backslash", "he\\llo", Client.unescape("he\\\\llo")); + assertEquals("Internal backslash and doublequote", "he\\\"llo", Client.unescape("he\\\\\\\"llo")); + assertEquals("Initial and final doublequote", "\"hello\"", Client.unescape("\\\"hello\\\"")); + } + + /** + * extractDoublequotedValue function test. + */ + public void testExtractDoublequotedValue() + { + assertNull("Empty string", Client.extractDoublequotedValue("")); + assertNull("Non doublequoted string", Client.extractDoublequotedValue("hello")); + assertNull("No begining doublequote", Client.extractDoublequotedValue("hello\"")); + assertNull("No ending doublequote", Client.extractDoublequotedValue("\"hello")); + assertEquals("Simple string", "hello", Client.extractDoublequotedValue("\"hello\"")); + assertEquals("String with doublequote", "he\"llo", Client.extractDoublequotedValue("\"he\\\"llo\"")); + assertEquals("String with backslash", "he\\llo", Client.extractDoublequotedValue("\"he\\\\llo\"")); + assertEquals("String with backslash and doublequote", "he\\\"llo", Client.extractDoublequotedValue("\"he\\\\\\\"llo\"")); + } + + /** + * splitNameValueString function test. + */ + public void testSplitNameValueString() + { + String[] res; + assertNull("Empty string", Client.splitNameValueString("")); + assertNull("One word string", Client.splitNameValueString("name")); + assertNull("Non doublequoted string", Client.extractDoublequotedValue("name value")); + assertNull("No begining doublequote", Client.extractDoublequotedValue("name value\"")); + assertNull("No ending doublequote", Client.extractDoublequotedValue("name \"value")); + res = Client.splitNameValueString("name \"value\""); + assertEquals("Simple name/value (name)", "name", res[0]); + assertEquals("Simple name/value (value)", "value", res[1]); + res = Client.splitNameValueString("name \"complex value\""); + assertEquals("Simple name / complex value (name)", "name", res[0]); + assertEquals("Simple name / complex value (value)", "complex value", res[1]); + res = Client.splitNameValueString("name \"complex\\\\value\""); + assertEquals("Simple name / backslash value (name)", "name", res[0]); + assertEquals("Simple name / backslash value (value)", "complex\\value", res[1]); + res = Client.splitNameValueString("name \"complex\\\"value\""); + assertEquals("Simple name / doublequote value (name)", "name", res[0]); + assertEquals("Simple name / doublequote value (value)", "complex\"value", res[1]); + } +} diff --git a/scripts/java/jNutList/README b/scripts/java/jNutList/README new file mode 100644 index 0000000..4e52bb8 --- /dev/null +++ b/scripts/java/jNutList/README @@ -0,0 +1,30 @@ +jNutList example application +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This directory contains source files for the jNutList application. +It allows to connect to an UPSD then retrieve devices and their variables. +It is a little example application to show how to use jNut. + +jNutList building +^^^^^^^^^^^^^^^^^ + +As jNut, jNutList is a maven project so a maven environment must be set. +Please reffer to jNut building notes. + +jNutList running +^^^^^^^^^^^^^^^^ + +jNutList can be run launching it in a console: + + java -jar jNutList-x.x-xxx-jar-with-dependencies.jar + +Some parameters can be passed : + + java -jar jNutList-x.x-jar-with-dependencies.jar host port login password + +For example: + + java -jar jNutList-x.x-jar-with-dependencies.jar localhost 3493 admin passwd + +By default, host is localhost, port is 3493 and login and password are not +specified. diff --git a/scripts/java/jNutList/pom.xml b/scripts/java/jNutList/pom.xml new file mode 100644 index 0000000..3558aad --- /dev/null +++ b/scripts/java/jNutList/pom.xml @@ -0,0 +1,62 @@ + + 4.0.0 + + org.networkupstools + jNutList + 0.1-SNAPSHOT + jar + + jNutList + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + 3.8.1 + test + + + ${project.groupId} + jNut + 0.1-SNAPSHOT + + + + + + + + maven-assembly-plugin + 2.2.1 + + + jar-with-dependencies + + + + org.networkupstools.jnutlist.AppList + + + + + + make-assembly + package + + single + + + + + + + + diff --git a/scripts/java/jNutList/src/main/java/org/networkupstools/jnutlist/AppList.java b/scripts/java/jNutList/src/main/java/org/networkupstools/jnutlist/AppList.java new file mode 100644 index 0000000..a15452d --- /dev/null +++ b/scripts/java/jNutList/src/main/java/org/networkupstools/jnutlist/AppList.java @@ -0,0 +1,112 @@ +/* AppList.java + + Copyright (C) 2011 Eaton + + 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 +*/ +package org.networkupstools.jnutlist; + +import java.io.IOException; +import java.net.UnknownHostException; +import org.networkupstools.jnut.*; + + +public class AppList +{ + + public static void main( String[] args ) + { + String host = args.length>=1?args[0]:"localhost"; + int port = args.length>=2?Integer.valueOf(args[1]).intValue():3493; + String login = args.length>=3?args[2]:""; + String pass = args.length>=4?args[3]:""; + + System.out.println( "jNutList connecting to " + login+":"+pass+"@"+host+":"+port ); + + Client client = new Client(); + try { + client.connect(host, port, login, pass); + Device[] devs = client.getDeviceList(); + if(devs!=null) + { + for(int d=0; d $@ + +nutshutdown: nutshutdown.in + sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + +systemdsystemunit_DATA = \ + nut-driver.service \ + nut-monitor.service \ + nut-server.service + +systemdsystemshutdown_SCRIPTS = nutshutdown + +else +EXTRA_DIST += nut-driver.service.in nut-monitor.service.in \ + nut-server.service.in nutshutdown.in +endif + diff --git a/scripts/systemd/Makefile.in b/scripts/systemd/Makefile.in new file mode 100644 index 0000000..9f9f633 --- /dev/null +++ b/scripts/systemd/Makefile.in @@ -0,0 +1,531 @@ +# Makefile.in generated by automake 1.11.1 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. +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@HAVE_SYSTEMD_FALSE@am__append_1 = nut-driver.service.in nut-monitor.service.in \ +@HAVE_SYSTEMD_FALSE@ nut-server.service.in nutshutdown.in + +subdir = scripts/systemd +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.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 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nut_arg_with.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ + $(top_srcdir)/m4/nut_check_libgd.m4 \ + $(top_srcdir)/m4/nut_check_libhal.m4 \ + $(top_srcdir)/m4/nut_check_libneon.m4 \ + $(top_srcdir)/m4/nut_check_libnetsnmp.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 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ + $(top_srcdir)/m4/nut_report_feature.m4 \ + $(top_srcdir)/m4/nut_type_socklen_t.m4 \ + $(top_srcdir)/configure.in +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 = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(systemdsystemshutdowndir)" \ + "$(DESTDIR)$(systemdsystemunitdir)" +SCRIPTS = $(systemdsystemshutdown_SCRIPTS) +SOURCES = +DIST_SOURCES = +DATA = $(systemdsystemunit_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +ASCIIDOC = @ASCIIDOC@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFPATH = @CONFPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ +DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ +DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ +DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ +HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ +HAL_FDI_PATH = @HAL_FDI_PATH@ +HAL_USER = @HAL_USER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBGD_CFLAGS = @LIBGD_CFLAGS@ +LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ +LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ +LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ +LIBS = @LIBS@ +LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NETLIBS = @NETLIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OS_NAME = @OS_NAME@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ +RANLIB = @RANLIB@ +RUN_AS_GROUP = @RUN_AS_GROUP@ +RUN_AS_USER = @RUN_AS_USER@ +SED = @SED@ +SERLIBS = @SERLIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STATEPATH = @STATEPATH@ +STRIP = @STRIP@ +SUN_LIBUSB = @SUN_LIBUSB@ +VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cgiexecdir = @cgiexecdir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverexecdir = @driverexecdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +hotplugdir = @hotplugdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +udevdir = @udevdir@ +EXTRA_DIST = README $(am__append_1) +@HAVE_SYSTEMD_TRUE@systemdsystemunit_DATA = \ +@HAVE_SYSTEMD_TRUE@ nut-driver.service \ +@HAVE_SYSTEMD_TRUE@ nut-monitor.service \ +@HAVE_SYSTEMD_TRUE@ nut-server.service + +@HAVE_SYSTEMD_TRUE@systemdsystemshutdown_SCRIPTS = nutshutdown +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/systemd/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu scripts/systemd/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-systemdsystemshutdownSCRIPTS: $(systemdsystemshutdown_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(systemdsystemshutdowndir)" || $(MKDIR_P) "$(DESTDIR)$(systemdsystemshutdowndir)" + @list='$(systemdsystemshutdown_SCRIPTS)'; test -n "$(systemdsystemshutdowndir)" || list=; \ + 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; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(systemdsystemshutdowndir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(systemdsystemshutdowndir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-systemdsystemshutdownSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(systemdsystemshutdown_SCRIPTS)'; test -n "$(systemdsystemshutdowndir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(systemdsystemshutdowndir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(systemdsystemshutdowndir)" && rm -f $$files + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-systemdsystemunitDATA: $(systemdsystemunit_DATA) + @$(NORMAL_INSTALL) + test -z "$(systemdsystemunitdir)" || $(MKDIR_P) "$(DESTDIR)$(systemdsystemunitdir)" + @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemdsystemunitdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(systemdsystemunitdir)" || exit $$?; \ + done + +uninstall-systemdsystemunitDATA: + @$(NORMAL_UNINSTALL) + @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(systemdsystemunitdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(systemdsystemunitdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(systemdsystemshutdowndir)" "$(DESTDIR)$(systemdsystemunitdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-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 +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-systemdsystemshutdownSCRIPTS \ + install-systemdsystemunitDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-systemdsystemshutdownSCRIPTS \ + uninstall-systemdsystemunitDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir 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 \ + install-systemdsystemshutdownSCRIPTS \ + install-systemdsystemunitDATA installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am \ + uninstall-systemdsystemshutdownSCRIPTS \ + uninstall-systemdsystemunitDATA + + +@HAVE_SYSTEMD_TRUE@%.service: %.service.in +@HAVE_SYSTEMD_TRUE@ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + +@HAVE_SYSTEMD_TRUE@nutshutdown: nutshutdown.in +@HAVE_SYSTEMD_TRUE@ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + +# 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. +.NOEXPORT: diff --git a/scripts/systemd/README b/scripts/systemd/README new file mode 100644 index 0000000..c8930ab --- /dev/null +++ b/scripts/systemd/README @@ -0,0 +1,8 @@ +This directory contains the NUT support files for systemd, the System and +Service Manager. + +These files are automatically installed, upon detection (at configure time) +of a systemd enabled system. + +Contributed by Michal Hlavinka + diff --git a/scripts/systemd/nut-driver.service.in b/scripts/systemd/nut-driver.service.in new file mode 100644 index 0000000..eef3480 --- /dev/null +++ b/scripts/systemd/nut-driver.service.in @@ -0,0 +1,10 @@ +[Unit] +Description=Network UPS Tools - power device driver controller +After=local-fs.target network.target +StopWhenUnneeded=yes + +[Service] +ExecStart=/sbin/upsdrvctl start +ExecStop=/sbin/upsdrvctl stop +Type=forking + diff --git a/scripts/systemd/nut-monitor.service.in b/scripts/systemd/nut-monitor.service.in new file mode 100644 index 0000000..8a7f3b2 --- /dev/null +++ b/scripts/systemd/nut-monitor.service.in @@ -0,0 +1,11 @@ +[Unit] +Description=Network UPS Tools - power device monitor and shutdown controller +After=local-fs.target network.target nut-server.service + +[Service] +ExecStart=/usr/sbin/upsmon +PIDFile=/var/run/nut/upsmon.pid +Type=forking + +[Install] +WantedBy=multi-user.target diff --git a/scripts/systemd/nut-server.service.in b/scripts/systemd/nut-server.service.in new file mode 100644 index 0000000..38b1322 --- /dev/null +++ b/scripts/systemd/nut-server.service.in @@ -0,0 +1,12 @@ +[Unit] +Description=Network UPS Tools - power devices information server +After=local-fs.target network.target nut-driver.service +Requires=nut-driver.service +Before=nut-monitor.service + +[Service] +ExecStart=/usr/sbin/upsd +Type=forking + +[Install] +WantedBy=multi-user.target diff --git a/scripts/systemd/nutshutdown.in b/scripts/systemd/nutshutdown.in new file mode 100644 index 0000000..3406592 --- /dev/null +++ b/scripts/systemd/nutshutdown.in @@ -0,0 +1,2 @@ +#!/bin/sh +upsmon -K >/dev/null 2>&1 && upsdrvctl shutdown diff --git a/scripts/udev/Makefile.am b/scripts/udev/Makefile.am index d288cc2..fcd6eeb 100644 --- a/scripts/udev/Makefile.am +++ b/scripts/udev/Makefile.am @@ -1,7 +1,13 @@ if WITH_UDEV udevrulesdir = $(udevdir)/rules.d - udevrules_DATA = 52-nut-usbups.rules + udevrules_DATA = +if WITH_USB + udevrules_DATA += 52-nut-usbups.rules +endif +if WITH_IPMI + udevrules_DATA += 52-nut-ipmipsu.rules +endif endif EXTRA_DIST = README @@ -9,7 +15,10 @@ EXTRA_DIST = README 52-nut-usbups.rules: nut-usbups.rules cp nut-usbups.rules 52-nut-usbups.rules -DISTCLEANFILES = nut-usbups.rules -CLEANFILES = 52-nut-usbups.rules +52-nut-ipmipsu.rules: nut-ipmipsu.rules + cp nut-ipmipsu.rules 52-nut-ipmipsu.rules + +DISTCLEANFILES = nut-usbups.rules nut-ipmipsu.rules +CLEANFILES = 52-nut-usbups.rules 52-nut-ipmipsu.rules # we should never remove this one, apart from a distclean-check #MAINTAINERCLEANFILES = nut-usbups.rules.in diff --git a/scripts/udev/Makefile.in b/scripts/udev/Makefile.in index 678ff5c..55c58b3 100644 --- a/scripts/udev/Makefile.in +++ b/scripts/udev/Makefile.in @@ -35,9 +35,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +@WITH_UDEV_TRUE@@WITH_USB_TRUE@am__append_1 = 52-nut-usbups.rules +@WITH_IPMI_TRUE@@WITH_UDEV_TRUE@am__append_2 = 52-nut-ipmipsu.rules subdir = scripts/udev DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/nut-usbups.rules.in + $(srcdir)/nut-ipmipsu.rules.in $(srcdir)/nut-usbups.rules.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 \ @@ -45,6 +47,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -62,7 +66,7 @@ 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 = nut-usbups.rules +CONFIG_CLEAN_FILES = nut-ipmipsu.rules nut-usbups.rules CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = @@ -134,10 +138,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -175,6 +183,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -239,6 +251,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -249,10 +263,10 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ @WITH_UDEV_TRUE@udevrulesdir = $(udevdir)/rules.d -@WITH_UDEV_TRUE@udevrules_DATA = 52-nut-usbups.rules +@WITH_UDEV_TRUE@udevrules_DATA = $(am__append_1) $(am__append_2) EXTRA_DIST = README -DISTCLEANFILES = nut-usbups.rules -CLEANFILES = 52-nut-usbups.rules +DISTCLEANFILES = nut-usbups.rules nut-ipmipsu.rules +CLEANFILES = 52-nut-usbups.rules 52-nut-ipmipsu.rules all: all-am .SUFFIXES: @@ -286,6 +300,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): +nut-ipmipsu.rules: $(top_builddir)/config.status $(srcdir)/nut-ipmipsu.rules.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ nut-usbups.rules: $(top_builddir)/config.status $(srcdir)/nut-usbups.rules.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ @@ -468,6 +484,9 @@ uninstall-am: uninstall-udevrulesDATA 52-nut-usbups.rules: nut-usbups.rules cp nut-usbups.rules 52-nut-usbups.rules + +52-nut-ipmipsu.rules: nut-ipmipsu.rules + cp nut-ipmipsu.rules 52-nut-ipmipsu.rules # we should never remove this one, apart from a distclean-check #MAINTAINERCLEANFILES = nut-usbups.rules.in diff --git a/scripts/udev/README b/scripts/udev/README index 06d2e17..a3b5567 100644 --- a/scripts/udev/README +++ b/scripts/udev/README @@ -1,17 +1,18 @@ -Desc: Udev script for NUT USB drivers +Desc: Udev script for NUT USB and IPMI drivers File: scripts/udev/README -Date: 27 January 2008 +Date: 25 July 2011 Auth: Arnaud Quette This document introduces the Linux udev script for NUT USB -drivers (usbhid-ups, bcmxcp_usb, tripplite_usb, ...). +drivers (usbhid-ups, bcmxcp_usb, tripplite_usb, ...) and IPMI driver +(nut-ipmipsu). These are needed on Linux systems running udev (recommended as of kernel 2.6.3, and mandatory as of 2.6.14 and higher). This script ensure that the right privileges are set on the -usb devices files to allow the NUT driver to operate (ie -allowing the nut user to read AND write to the UPS device). +USB and IPMI devices files to allow the NUT driver to operate (ie +allowing the nut user to read AND write to the device). Note that the old style hotplug files, available in the scripts/hotplug directory, are not needed if your kernel supports @@ -21,21 +22,23 @@ Installation ------------ For most users, these files will be automatically installed in -/etc/udev (or /lib/udev) upon "make install", if that directory exists. You can +/etc/udev (or /lib/udev) upon "make install", if that directory exists and if +the feature (USB and / or IPMI) has been enabled at configure time. You can specify an alternate directory with ./configure --with-udev-dir=DIR. Manual installation ------------------- -To install them manually, copy nut-usbups.rules to /etc/udev/rules.d -(or /lib/udev/rules.d on newer systems) using the command +To install them manually, copy the rules file(s) to /etc/udev/rules.d +(or /lib/udev/rules.d on newer systems) using the command(s): $ cp -f nut-usbups.rules /etc/udev/rules.d/52-nut-usbups.rules +$ cp -f nut-ipmipsu.rules /etc/udev/rules.d/52-nut-ipmipsu.rules You will need to refresh the bus to avoid a reboot for these rules to be active. You can do so using: $ udevadm trigger --subsystem-match=usb_device -You can then plug your UPS USB cord, or unplug / replug it to -refresh the device permission, and start NUT. +For USB devices, you can then plug your UPS USB cord, or unplug / replug +it to refresh the device permission, and start NUT. diff --git a/scripts/udev/nut-ipmipsu.rules.in b/scripts/udev/nut-ipmipsu.rules.in new file mode 100644 index 0000000..0d3e969 --- /dev/null +++ b/scripts/udev/nut-ipmipsu.rules.in @@ -0,0 +1,4 @@ +# This file is generated and installed by the Network UPS Tools package. +# It sets the correct device permissions for nut-ipmipsu driver. + +KERNEL=="ipmi*", MODE="664", GROUP="@RUN_AS_GROUP@" diff --git a/scripts/udev/nut-usbups.rules.in b/scripts/udev/nut-usbups.rules.in index 9331e60..6537eec 100644 --- a/scripts/udev/nut-usbups.rules.in +++ b/scripts/udev/nut-usbups.rules.in @@ -66,6 +66,10 @@ ATTR{idVendor}=="051d", ATTR{idProduct}=="0003", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="0592", ATTR{idProduct}=="0002", MODE="664", GROUP="@RUN_AS_GROUP@" # PW 9140 - usbhid-ups ATTR{idVendor}=="0592", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" +# Agiler UPS - blazer_usb +ATTR{idVendor}=="05b8", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" +# Belkin F6C1200-UNV - blazer_usb +ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="@RUN_AS_GROUP@" # Phoenixtec # various models - bcmxcp_usb @@ -86,6 +90,8 @@ ATTR{idVendor}=="0764", ATTR{idProduct}=="0005", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664", GROUP="@RUN_AS_GROUP@" # OR2200LCDRM2U - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0601", MODE="664", GROUP="@RUN_AS_GROUP@" +# Sweex 1000VA - richcomm_usb +ATTR{idVendor}=="0925", ATTR{idProduct}=="1234", MODE="664", GROUP="@RUN_AS_GROUP@" # TrippLite # e.g. OMNIVS1000, SMART550USB, ... - tripplite_usb @@ -162,9 +168,13 @@ ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a4", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a5", MODE="664", GROUP="@RUN_AS_GROUP@" # PowerCOM BNT - Black Knight Pro - usbhid-ups ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a6", MODE="664", GROUP="@RUN_AS_GROUP@" +# Unitek Alpha 1200Sx - blazer_usb +ATTR{idVendor}=="0f03", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" # Liebert # Liebert PowerSure PSA UPS - usbhid-ups ATTR{idVendor}=="10af", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" +# GE EP series - blazer_usb +ATTR{idVendor}=="14f0", ATTR{idProduct}=="00c9", MODE="664", GROUP="@RUN_AS_GROUP@" LABEL="nut-usbups_rules_end" diff --git a/server/Makefile.in b/server/Makefile.in index 6decd15..994e64a 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -52,6 +52,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -153,10 +155,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -194,6 +200,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -258,6 +268,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ diff --git a/tools/Makefile.am b/tools/Makefile.am index c46f27c..fbe4e34 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,10 +1,37 @@ -EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py device-recorder.sh svn2cl.authors +# Force build in ./ before nut-scanner, to have nutscan-{usb,snmp}.h +# built before going into the nut-scanner sub-directory +SUBDIRS = . nut-scanner + +EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py device-recorder.sh svn2cl.authors nut-snmpinfo.py + +all: nut-scanner-deps + +nut-scanner-deps: + @if python -c 1; then \ + echo "Regenerating the SNMP helper files."; \ + $(top_srcdir)/tools/nut-snmpinfo.py; \ + else \ + echo "----------------------------------------------------------------------"; \ + echo "Warning: Python is not available."; \ + echo "Skipping the SNMP helper files regeneration."; \ + echo "----------------------------------------------------------------------"; \ + fi + + @if perl -e 1; then \ + echo "Regenerating the USB helper files."; \ + $(top_srcdir)/tools/nut-usbinfo.pl; \ + else \ + echo "----------------------------------------------------------------------"; \ + echo "Warning: Perl is not available."; \ + echo "Skipping the USB helper files regeneration."; \ + echo "----------------------------------------------------------------------"; \ + fi website: @if python -c pass; then \ echo "Regenerating the HTML and JSON formated HCL tables."; \ - ./nut-hclinfo.py; \ + $(top_srcdir)/tools/nut-hclinfo.py; \ else \ echo "----------------------------------------------------------------------"; \ echo "Warning: Python is not available."; \ @@ -12,8 +39,20 @@ website: echo "----------------------------------------------------------------------"; \ fi -# only call the USB info script upon "make dist", and if Perl is present +# call the USB info script upon "make dist", and if Perl is present +# call the SNMP info script upon "make dist", and if Python is present +# and call both for building nut-scanner dist-hook: + @if python -c 1; then \ + echo "Regenerating the SNMP helper files."; \ + $(distdir)/nut-snmpinfo.py; \ + else \ + echo "----------------------------------------------------------------------"; \ + echo "Warning: Python is not available."; \ + echo "Skipping the SNMP helper files regeneration."; \ + echo "----------------------------------------------------------------------"; \ + fi + @if perl -e 1; then \ echo "Regenerating the USB helper files."; \ $(distdir)/nut-usbinfo.pl; \ @@ -23,3 +62,5 @@ dist-hook: echo "Skipping the USB helper files regeneration."; \ echo "----------------------------------------------------------------------"; \ fi + +.PHONY: nut-scanner-deps nut-scanner-snmp-deps nut-scanner-usb-deps diff --git a/tools/Makefile.in b/tools/Makefile.in index 103b72d..404d40b 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -43,6 +43,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ @@ -64,7 +66,47 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -109,10 +151,14 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -150,6 +196,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -214,6 +264,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -223,8 +275,12 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py device-recorder.sh svn2cl.authors -all: all-am + +# Force build in ./ before nut-scanner, to have nutscan-{usb,snmp}.h +# built before going into the nut-scanner sub-directory +SUBDIRS = . nut-scanner +EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py device-recorder.sh svn2cl.authors nut-snmpinfo.py +all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -263,12 +319,141 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi ctags: CTAGS -CTAGS: +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -300,22 +485,51 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am -check: check-am +check: check-recursive all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -332,91 +546,117 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: -.MAKE: install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - dist-hook distclean distclean-generic distclean-libtool \ - distdir 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive dist-hook distclean distclean-generic \ + distclean-libtool distclean-tags distdir 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 +all: nut-scanner-deps + +nut-scanner-deps: + @if python -c 1; then \ + echo "Regenerating the SNMP helper files."; \ + $(top_srcdir)/tools/nut-snmpinfo.py; \ + else \ + echo "----------------------------------------------------------------------"; \ + echo "Warning: Python is not available."; \ + echo "Skipping the SNMP helper files regeneration."; \ + echo "----------------------------------------------------------------------"; \ + fi + + @if perl -e 1; then \ + echo "Regenerating the USB helper files."; \ + $(top_srcdir)/tools/nut-usbinfo.pl; \ + else \ + echo "----------------------------------------------------------------------"; \ + echo "Warning: Perl is not available."; \ + echo "Skipping the USB helper files regeneration."; \ + echo "----------------------------------------------------------------------"; \ + fi + website: @if python -c pass; then \ echo "Regenerating the HTML and JSON formated HCL tables."; \ - ./nut-hclinfo.py; \ + $(top_srcdir)/tools/nut-hclinfo.py; \ else \ echo "----------------------------------------------------------------------"; \ echo "Warning: Python is not available."; \ @@ -424,8 +664,20 @@ website: echo "----------------------------------------------------------------------"; \ fi -# only call the USB info script upon "make dist", and if Perl is present +# call the USB info script upon "make dist", and if Perl is present +# call the SNMP info script upon "make dist", and if Python is present +# and call both for building nut-scanner dist-hook: + @if python -c 1; then \ + echo "Regenerating the SNMP helper files."; \ + $(distdir)/nut-snmpinfo.py; \ + else \ + echo "----------------------------------------------------------------------"; \ + echo "Warning: Python is not available."; \ + echo "Skipping the SNMP helper files regeneration."; \ + echo "----------------------------------------------------------------------"; \ + fi + @if perl -e 1; then \ echo "Regenerating the USB helper files."; \ $(distdir)/nut-usbinfo.pl; \ @@ -436,6 +688,8 @@ dist-hook: echo "----------------------------------------------------------------------"; \ fi +.PHONY: nut-scanner-deps nut-scanner-snmp-deps nut-scanner-usb-deps + # 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. .NOEXPORT: diff --git a/tools/nut-scanner/Makefile.am b/tools/nut-scanner/Makefile.am new file mode 100644 index 0000000..005ba0c --- /dev/null +++ b/tools/nut-scanner/Makefile.am @@ -0,0 +1,46 @@ +BUILT_SOURCES = nutscan-usb.h nutscan-snmp.h + +nutscan-usb.h nutscan-snmp.h: + cd ..; $(MAKE) $(AM_MAKEFLAGS) nut-scanner-deps + +lib_LTLIBRARIES = libnutscan.la +libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \ + nutscan-device.c nutscan-ip.c nutscan-display.c +libnutscan_la_LIBADD = ../../clients/libupsclient.la $(NETLIBS) +libnutscan_la_LDFLAGS = -version-info 1:0:0 +libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include + +bin_PROGRAMS = nut-scanner +nut_scanner_SOURCES = nut-scanner.c +nut_scanner_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include +nut_scanner_LDADD = libnutscan.la + +if WITH_SSL + libnutscan_la_CFLAGS += $(LIBSSL_CFLAGS) + libnutscan_la_LIBADD += $(LIBSSL_LIBS) +endif +if WITH_USB + libnutscan_la_SOURCES += scan_usb.c + libnutscan_la_CFLAGS += $(LIBUSB_CFLAGS) + libnutscan_la_LIBADD += $(LIBUSB_LIBS) +endif +if WITH_SNMP + libnutscan_la_SOURCES += scan_snmp.c + libnutscan_la_CFLAGS += $(LIBNETSNMP_CFLAGS) + libnutscan_la_LIBADD += $(LIBNETSNMP_LIBS) +endif +if WITH_NEONXML + libnutscan_la_SOURCES += scan_xml_http.c + libnutscan_la_CFLAGS += $(LIBNEON_CFLAGS) + libnutscan_la_LIBADD += $(LIBNEON_LIBS) +endif +if WITH_AVAHI + libnutscan_la_SOURCES += scan_avahi.c + libnutscan_la_CFLAGS += $(LIBAVAHI_CFLAGS) + libnutscan_la_LIBADD += $(LIBAVAHI_LIBS) +endif + +dist_noinst_HEADERS = nut-scan.h nutscan-usb.h nutscan-snmp.h nutscan-device.h nutscan-ip.h + +CLEANFILES = nutscan-usb.h nutscan-snmp.h + diff --git a/tools/nut-scanner/Makefile.in b/tools/nut-scanner/Makefile.in new file mode 100644 index 0000000..a489329 --- /dev/null +++ b/tools/nut-scanner/Makefile.in @@ -0,0 +1,797 @@ +# Makefile.in generated by automake 1.11.1 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. +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = nut-scanner$(EXEEXT) +@WITH_SSL_TRUE@am__append_1 = $(LIBSSL_CFLAGS) +@WITH_SSL_TRUE@am__append_2 = $(LIBSSL_LIBS) +@WITH_USB_TRUE@am__append_3 = scan_usb.c +@WITH_USB_TRUE@am__append_4 = $(LIBUSB_CFLAGS) +@WITH_USB_TRUE@am__append_5 = $(LIBUSB_LIBS) +@WITH_SNMP_TRUE@am__append_6 = scan_snmp.c +@WITH_SNMP_TRUE@am__append_7 = $(LIBNETSNMP_CFLAGS) +@WITH_SNMP_TRUE@am__append_8 = $(LIBNETSNMP_LIBS) +@WITH_NEONXML_TRUE@am__append_9 = scan_xml_http.c +@WITH_NEONXML_TRUE@am__append_10 = $(LIBNEON_CFLAGS) +@WITH_NEONXML_TRUE@am__append_11 = $(LIBNEON_LIBS) +@WITH_AVAHI_TRUE@am__append_12 = scan_avahi.c +@WITH_AVAHI_TRUE@am__append_13 = $(LIBAVAHI_CFLAGS) +@WITH_AVAHI_TRUE@am__append_14 = $(LIBAVAHI_LIBS) +subdir = tools/nut-scanner +DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.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 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nut_arg_with.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ + $(top_srcdir)/m4/nut_check_libgd.m4 \ + $(top_srcdir)/m4/nut_check_libhal.m4 \ + $(top_srcdir)/m4/nut_check_libneon.m4 \ + $(top_srcdir)/m4/nut_check_libnetsnmp.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 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ + $(top_srcdir)/m4/nut_report_feature.m4 \ + $(top_srcdir)/m4/nut_type_socklen_t.m4 \ + $(top_srcdir)/configure.in +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 = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +@WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +@WITH_USB_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) +@WITH_SNMP_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) +@WITH_NEONXML_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1) +@WITH_AVAHI_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1) +libnutscan_la_DEPENDENCIES = ../../clients/libupsclient.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) \ + $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) +am__libnutscan_la_SOURCES_DIST = scan_nut.c scan_ipmi.c \ + nutscan-device.c nutscan-ip.c nutscan-display.c scan_usb.c \ + scan_snmp.c scan_xml_http.c scan_avahi.c +@WITH_USB_TRUE@am__objects_1 = libnutscan_la-scan_usb.lo +@WITH_SNMP_TRUE@am__objects_2 = libnutscan_la-scan_snmp.lo +@WITH_NEONXML_TRUE@am__objects_3 = libnutscan_la-scan_xml_http.lo +@WITH_AVAHI_TRUE@am__objects_4 = libnutscan_la-scan_avahi.lo +am_libnutscan_la_OBJECTS = libnutscan_la-scan_nut.lo \ + libnutscan_la-scan_ipmi.lo libnutscan_la-nutscan-device.lo \ + libnutscan_la-nutscan-ip.lo libnutscan_la-nutscan-display.lo \ + $(am__objects_1) $(am__objects_2) $(am__objects_3) \ + $(am__objects_4) +libnutscan_la_OBJECTS = $(am_libnutscan_la_OBJECTS) +libnutscan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libnutscan_la_CFLAGS) \ + $(CFLAGS) $(libnutscan_la_LDFLAGS) $(LDFLAGS) -o $@ +PROGRAMS = $(bin_PROGRAMS) +am_nut_scanner_OBJECTS = nut_scanner-nut-scanner.$(OBJEXT) +nut_scanner_OBJECTS = $(am_nut_scanner_OBJECTS) +nut_scanner_DEPENDENCIES = libnutscan.la +nut_scanner_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(nut_scanner_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libnutscan_la_SOURCES) $(nut_scanner_SOURCES) +DIST_SOURCES = $(am__libnutscan_la_SOURCES_DIST) \ + $(nut_scanner_SOURCES) +HEADERS = $(dist_noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +ASCIIDOC = @ASCIIDOC@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFPATH = @CONFPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ +DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ +DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ +DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ +HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ +HAL_FDI_PATH = @HAL_FDI_PATH@ +HAL_USER = @HAL_USER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBGD_CFLAGS = @LIBGD_CFLAGS@ +LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ +LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ +LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ +LIBS = @LIBS@ +LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NETLIBS = @NETLIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OS_NAME = @OS_NAME@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ +RANLIB = @RANLIB@ +RUN_AS_GROUP = @RUN_AS_GROUP@ +RUN_AS_USER = @RUN_AS_USER@ +SED = @SED@ +SERLIBS = @SERLIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STATEPATH = @STATEPATH@ +STRIP = @STRIP@ +SUN_LIBUSB = @SUN_LIBUSB@ +VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cgiexecdir = @cgiexecdir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverexecdir = @driverexecdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +hotplugdir = @hotplugdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +udevdir = @udevdir@ +BUILT_SOURCES = nutscan-usb.h nutscan-snmp.h +lib_LTLIBRARIES = libnutscan.la +libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c nutscan-device.c \ + nutscan-ip.c nutscan-display.c $(am__append_3) $(am__append_6) \ + $(am__append_9) $(am__append_12) +libnutscan_la_LIBADD = ../../clients/libupsclient.la $(NETLIBS) \ + $(am__append_2) $(am__append_5) $(am__append_8) \ + $(am__append_11) $(am__append_14) +libnutscan_la_LDFLAGS = -version-info 1:0:0 +libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include \ + $(am__append_1) $(am__append_4) $(am__append_7) \ + $(am__append_10) $(am__append_13) +nut_scanner_SOURCES = nut-scanner.c +nut_scanner_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include +nut_scanner_LDADD = libnutscan.la +dist_noinst_HEADERS = nut-scan.h nutscan-usb.h nutscan-snmp.h nutscan-device.h nutscan-ip.h +CLEANFILES = nutscan-usb.h nutscan-snmp.h +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/nut-scanner/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tools/nut-scanner/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(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 \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + 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)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libnutscan.la: $(libnutscan_la_OBJECTS) $(libnutscan_la_DEPENDENCIES) + $(libnutscan_la_LINK) -rpath $(libdir) $(libnutscan_la_OBJECTS) $(libnutscan_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +nut-scanner$(EXEEXT): $(nut_scanner_OBJECTS) $(nut_scanner_DEPENDENCIES) + @rm -f nut-scanner$(EXEEXT) + $(nut_scanner_LINK) $(nut_scanner_OBJECTS) $(nut_scanner_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-device.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-display.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-ip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_avahi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_ipmi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_nut.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_snmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_usb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_xml_http.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nut_scanner-nut-scanner.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libnutscan_la-scan_nut.lo: scan_nut.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_nut.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_nut.Tpo -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_nut.Tpo $(DEPDIR)/libnutscan_la-scan_nut.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_nut.c' object='libnutscan_la-scan_nut.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c + +libnutscan_la-scan_ipmi.lo: scan_ipmi.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_ipmi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo $(DEPDIR)/libnutscan_la-scan_ipmi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_ipmi.c' object='libnutscan_la-scan_ipmi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c + +libnutscan_la-nutscan-device.lo: nutscan-device.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-device.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-device.Tpo -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-device.Tpo $(DEPDIR)/libnutscan_la-nutscan-device.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-device.c' object='libnutscan_la-nutscan-device.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c + +libnutscan_la-nutscan-ip.lo: nutscan-ip.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-ip.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo $(DEPDIR)/libnutscan_la-nutscan-ip.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-ip.c' object='libnutscan_la-nutscan-ip.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c + +libnutscan_la-nutscan-display.lo: nutscan-display.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-display.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-display.Tpo -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-display.Tpo $(DEPDIR)/libnutscan_la-nutscan-display.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-display.c' object='libnutscan_la-nutscan-display.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c + +libnutscan_la-scan_usb.lo: scan_usb.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_usb.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_usb.Tpo -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_usb.Tpo $(DEPDIR)/libnutscan_la-scan_usb.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_usb.c' object='libnutscan_la-scan_usb.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c + +libnutscan_la-scan_snmp.lo: scan_snmp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_snmp.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_snmp.Tpo -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_snmp.Tpo $(DEPDIR)/libnutscan_la-scan_snmp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_snmp.c' object='libnutscan_la-scan_snmp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c + +libnutscan_la-scan_xml_http.lo: scan_xml_http.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_xml_http.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo $(DEPDIR)/libnutscan_la-scan_xml_http.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_xml_http.c' object='libnutscan_la-scan_xml_http.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c + +libnutscan_la-scan_avahi.lo: scan_avahi.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_avahi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_avahi.Tpo -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_avahi.Tpo $(DEPDIR)/libnutscan_la-scan_avahi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_avahi.c' object='libnutscan_la-scan_avahi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c + +nut_scanner-nut-scanner.o: nut-scanner.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.o -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nut-scanner.c' object='nut_scanner-nut-scanner.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c + +nut_scanner-nut-scanner.obj: nut-scanner.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.obj -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nut-scanner.c' object='nut_scanner-nut-scanner.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-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 +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + 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-libLTLIBRARIES \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-libLTLIBRARIES + + +nutscan-usb.h nutscan-snmp.h: + cd ..; $(MAKE) $(AM_MAKEFLAGS) nut-scanner-deps + +# 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. +.NOEXPORT: diff --git a/tools/nut-scanner/nut-scan.h b/tools/nut-scanner/nut-scan.h new file mode 100644 index 0000000..c5ce748 --- /dev/null +++ b/tools/nut-scanner/nut-scan.h @@ -0,0 +1,65 @@ +/* nut-scan.h: detect NUT services + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 NUT_SCAN_H +#define NUT_SCAN_H + +#include +#include + +/* SNMP structure */ +typedef struct nutscan_snmp { + char * community; + char * secLevel; + char * secName; + char * authPassword; + char * privPassword; + char * authProtocol; + char * privProtocol; + char * peername; + void * handle; +} nutscan_snmp_t; + +/* Scanning */ +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H +nutscan_device_t * nutscan_scan_snmp(const char * start_ip,const char * stop_ip,long usec_timeout, nutscan_snmp_t * sec); +#endif + +#ifdef HAVE_USB_H +nutscan_device_t * nutscan_scan_usb(); +#endif + +#ifdef WITH_NEON +nutscan_device_t * nutscan_scan_xml_http(long usec_timeout); +#endif + +nutscan_device_t * nutscan_scan_nut(const char * startIP, const char * stopIP, const char * port, long usec_timeout); + +#ifdef HAVE_AVAHI_CLIENT_CLIENT_H +nutscan_device_t * nutscan_scan_avahi(long usec_timeout); +#endif + +#ifdef HAVE_FREEIPMI_FREEIPMI_H +nutscan_device_t * nutscan_scan_ipmi(void); +#endif + +/* Displaying */ +void nutscan_display_ups_conf(nutscan_device_t * device); +void nutscan_display_parsable(nutscan_device_t * device); + +#endif diff --git a/tools/nut-scanner/nut-scanner.c b/tools/nut-scanner/nut-scanner.c new file mode 100644 index 0000000..b42dbca --- /dev/null +++ b/tools/nut-scanner/nut-scanner.c @@ -0,0 +1,415 @@ +/* nut-scanner.c: a tool to detect NUT supported devices + * + * Copyright (C) 2011 - Arnaud Quette + * + * 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 + */ + +#include +#include +#include +#include "common.h" +#include +#include +#ifdef HAVE_PTHREAD +#include +#endif + +#include "nut-scan.h" + +#define DEFAULT_TIMEOUT 5 + +const char optstring[] = "?ht:s:e:c:l:u:W:X:w:x:p:CUSMOAm:NPqI"; + +#ifdef HAVE_GETOPT_LONG +const struct option longopts[] = + {{ "timeout",required_argument,NULL,'t' }, + { "start_ip",required_argument,NULL,'s' }, + { "end_ip",required_argument,NULL,'e' }, + { "mask_cidr",required_argument,NULL,'m' }, + { "community",required_argument,NULL,'c' }, + { "secLevel",required_argument,NULL,'l' }, + { "secName",required_argument,NULL,'u' }, + { "authPassword",required_argument,NULL,'W' }, + { "privPassword",required_argument,NULL,'X' }, + { "authProtocol",required_argument,NULL,'w' }, + { "privProtocol",required_argument,NULL,'x' }, + { "port",required_argument,NULL,'p' }, + { "complete_scan",no_argument,NULL,'C' }, + { "usb_scan",no_argument,NULL,'U' }, + { "snmp_scan",no_argument,NULL,'S' }, + { "xml_scan",no_argument,NULL,'M' }, + { "oldnut_scan",no_argument,NULL,'O' }, + { "avahi_scan",no_argument,NULL,'A' }, + { "ipmi_scan",no_argument,NULL,'I' }, + { "disp_nut_conf",no_argument,NULL,'N' }, + { "disp_parsable",no_argument,NULL,'P' }, + { "quiet",no_argument,NULL,'q' }, + { "help",no_argument,NULL,'h' }, + {NULL,0,NULL,0}}; +#else +#define getopt_long(a,b,c,d,e) getopt(a,b,c) +#endif /* HAVE_GETOPT_LONG */ + +static nutscan_device_t *dev[TYPE_END]; +static pthread_t thread[TYPE_END]; + +static long timeout = DEFAULT_TIMEOUT*1000*1000; /* in usec */ +static char * start_ip = NULL; +static char * end_ip = NULL; +static char * port = NULL; + +#ifdef HAVE_PTHREAD +#ifdef HAVE_USB_H +static void * run_usb(void * arg) +{ + dev[TYPE_USB] = nutscan_scan_usb(); + return NULL; +} +#endif +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H +static void * run_snmp(void * arg) +{ + nutscan_snmp_t * sec = (nutscan_snmp_t *)arg; + + dev[TYPE_SNMP] = nutscan_scan_snmp(start_ip,end_ip,timeout,sec); + return NULL; +} +#endif +#ifdef WITH_NEON +static void * run_xml(void * arg) +{ + dev[TYPE_XML] = nutscan_scan_xml_http(timeout); + return NULL; +} +#endif + +static void * run_nut_old(void * arg) +{ + dev[TYPE_NUT] = nutscan_scan_nut(start_ip,end_ip,port,timeout); + return NULL; +} + +#ifdef HAVE_AVAHI_CLIENT_CLIENT_H +static void * run_avahi(void * arg) +{ + dev[TYPE_AVAHI] = nutscan_scan_avahi(timeout); + return NULL; +} +#endif +#ifdef HAVE_FREEIPMI_FREEIPMI_H +static void * run_ipmi(void * arg) +{ + dev[TYPE_IPMI] = nutscan_scan_ipmi(); + return NULL; +} +#endif +#endif /* HAVE_PTHREAD */ +static int printq(int quiet,const char *fmt, ...) +{ + va_list ap; + int ret; + + if(quiet) { + return 0; + } + + va_start(ap, fmt); + ret = vprintf(fmt, ap); + va_end(ap); + + return ret; +} + +int main(int argc, char *argv[]) +{ + nutscan_snmp_t sec; + int opt_ret; + char * cidr = NULL; + int allow_all = 0; + int allow_usb = 0; + int allow_snmp = 0; + int allow_xml = 0; + int allow_oldnut = 0; + int allow_avahi = 0; + int allow_ipmi = 0; + int quiet = 0; + void (*display_func)(nutscan_device_t * device); + + memset(&sec,0,sizeof(sec)); + + display_func = nutscan_display_ups_conf; + + while((opt_ret = getopt_long(argc, argv, optstring, longopts, NULL))!=-1) { + + switch(opt_ret) { + case 't': + timeout = atol(optarg)*1000*1000; /*in usec*/ + if( timeout == 0 ) { + fprintf(stderr,"Illegal timeout value, using default %ds\n", DEFAULT_TIMEOUT); + timeout = DEFAULT_TIMEOUT*1000*1000; + } + break; + case 's': + start_ip = strdup(optarg); + end_ip = start_ip; + break; + case 'e': + end_ip = strdup(optarg); + break; + case 'm': + cidr = strdup(optarg); + break; +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H + case 'c': + sec.community = strdup(optarg); + break; + case 'l': + sec.secLevel = strdup(optarg); + break; + case 'u': + sec.secName = strdup(optarg); + break; + case 'W': + sec.authPassword = strdup(optarg); + break; + case 'X': + sec.privPassword = strdup(optarg); + break; + case 'w': + sec.authProtocol = strdup(optarg); + break; + case 'x': + sec.privProtocol = strdup(optarg); + break; +#endif + case 'p': + port = strdup(optarg); + break; + case 'C': + allow_all = 1; + break; +#ifdef HAVE_USB_H + case 'U': + allow_usb = 1; + break; +#endif +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H + case 'S': + allow_snmp = 1; + break; +#endif +#ifdef WITH_NEON + case 'M': + allow_xml = 1; + break; +#endif + case 'O': + allow_oldnut = 1; + break; +#ifdef WITH_AVAHI + case 'A': + allow_avahi = 1; + break; +#endif +#ifdef HAVE_FREEIPMI_FREEIPMI_H + case 'I': + allow_ipmi = 1; + break; +#endif + case 'N': + display_func = nutscan_display_ups_conf; + break; + case 'P': + display_func = nutscan_display_parsable; + break; + case 'q': + quiet = 1; + break; + case 'h': + case '?': + default: + puts("nut-scanner : detecting available UPS.\n"); + puts("OPTIONS:"); + printf(" -C, --complete_scan : Scan all available devices (default).\n"); +#ifdef HAVE_USB_H + printf(" -U, --usb_scan : Scan USB devices.\n"); +#endif +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H + printf(" -S, --snmp_scan : Scan SNMP devices.\n"); +#endif +#ifdef WITH_NEON + printf(" -M, --xml_scan : Scan XML/HTTP devices.\n"); +#endif + printf(" -O, --oldnut_scan : Scan NUT devices (old method).\n"); +#ifdef WITH_AVAHI + printf(" -A, --avahi_scan : Scan NUT devices (avahi method).\n"); +#endif +#ifdef HAVE_FREEIPMI_FREEIPMI_H + printf(" -I, --ipmi_scan : Scan IPMI devices.\n"); +#endif + printf(" -t, --timeout : network operation timeout (default %d).\n",DEFAULT_TIMEOUT); + printf(" -s, --start_ip : First IP address to scan.\n"); + printf(" -e, --end_ip : Last IP address to scan.\n"); + +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H + printf("\nSNMP v1 specific options:\n"); + printf(" -c, --community : Set SNMP v1 community name (default = public)\n"); + + printf("\nSNMP v3 specific options:\n"); + printf(" -l, --secLevel : Set the securityLevel used for SNMPv3 messages (allowed values: noAuthNoPriv,authNoPriv,authPriv)\n"); + printf(" -u, --secName : Set the securityName used for authenticated SNMPv3 messages (mandatory if you set secLevel. No default)\n"); + printf(" -a, --authProtocol : Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 messages (default=MD5)\n"); + printf(" -A, --authPassword : Set the authentication pass phrase used for authenticated SNMPv3 messages (mandatory if you set secLevel to authNoPriv or authPriv)\n"); + printf(" -x, --privProtocol : Set the privacy protocol (DES or AES) used for encrypted SNMPv3 messages (default=DES)\n"); + printf(" -X, --privPassword : Set the privacy pass phrase used for encrypted SNMPv3 messages (mandatory if you set secLevel to authPriv)\n"); +#endif + + printf("\nNUT device specific options:\n"); + printf(" -p, --port : Port number of remote NUT devices\n"); + printf("\ndisplay specific options:\n"); + printf(" -N, --disp_nut_conf : Display result in the ups.conf format\n"); + printf(" -P, --disp_parsable : Display result in a parsable format\n"); + return 0; + } + + } + + if( cidr ) { + nutscan_cidr_to_ip(cidr, &start_ip, &end_ip); + } + + if( !allow_usb && !allow_snmp && !allow_xml && !allow_oldnut && + !allow_avahi && !allow_ipmi ) { + allow_all = 1; + } + +#ifdef HAVE_USB_H + if( allow_all || allow_usb) { + printq(quiet,"Scanning USB bus.\n"); +#ifdef HAVE_PTHREAD + pthread_create(&thread[TYPE_USB],NULL,run_usb,NULL); +#else + dev[TYPE_USB] = nutscan_scan_usb(); +#endif + } +#endif /* HAVE_USB_H */ + +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H + if( allow_all || allow_snmp) { + if( start_ip == NULL ) { + printq(quiet,"No start IP, skipping SNMP\n"); + } + else { + printq(quiet,"Scanning SNMP bus.\n"); +#ifdef HAVE_PTHREAD + pthread_create(&thread[TYPE_SNMP],NULL,run_snmp,&sec); +#else + dev[TYPE_SNMP] = nutscan_scan_snmp(start_ip,end_ip,timeout,&sec); +#endif + } + } +#endif /* HAVE_NET_SNMP_NET_SNMP_CONFIG_H */ + +#ifdef WITH_NEON + if( allow_all || allow_xml) { + printq(quiet,"Scanning XML/HTTP bus.\n"); +#ifdef HAVE_PTHREAD + pthread_create(&thread[TYPE_XML],NULL,run_xml,NULL); +#else + dev[TYPE_XML] = nutscan_scan_xml_http(timeout); +#endif + } +#endif + + if( allow_all || allow_oldnut) { + if( start_ip == NULL ) { + printq(quiet,"No start IP, skipping NUT bus (old connect method)\n"); + } + else { + printq(quiet,"Scanning NUT bus (old connect method).\n"); +#ifdef HAVE_PTHREAD + pthread_create(&thread[TYPE_NUT],NULL,run_nut_old,NULL); +#else + dev[TYPE_NUT] = nutscan_scan_nut(start_ip,end_ip,port,timeout); +#endif + } + } + +#ifdef HAVE_AVAHI_CLIENT_CLIENT_H + if( allow_all || allow_avahi) { + printq(quiet,"Scanning NUT bus (avahi method).\n"); +#ifdef HAVE_PTHREAD + pthread_create(&thread[TYPE_AVAHI],NULL,run_avahi,NULL); +#else + dev[TYPE_AVAHI] = nutscan_scan_avahi(); +#endif + } +#endif + +#ifdef HAVE_FREEIPMI_FREEIPMI_H + if( allow_all || allow_ipmi) { + printq(quiet,"Scanning IPMI bus.\n"); +#ifdef HAVE_PTHREAD + pthread_create(&thread[TYPE_IPMI],NULL,run_ipmi,NULL); +#else + dev[TYPE_IPMI] = nutscan_scan_ipmi(); +#endif + } +#endif + +#ifdef HAVE_PTHREAD +#ifdef HAVE_USB_H + pthread_join(thread[TYPE_USB],NULL); +#endif +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H + pthread_join(thread[TYPE_SNMP],NULL); +#endif +#ifdef WITH_NEON + pthread_join(thread[TYPE_XML],NULL); +#endif + pthread_join(thread[TYPE_NUT],NULL); +#ifdef HAVE_AVAHI_CLIENT_CLIENT_H + pthread_join(thread[TYPE_AVAHI],NULL); +#endif +#ifdef HAVE_FREEIPMI_FREEIPMI_H + pthread_join(thread[TYPE_IPMI],NULL); +#endif +#endif /* HAVE_PTHREAD */ + +#ifdef HAVE_USB_H + display_func(dev[TYPE_USB]); + nutscan_free_device(dev[TYPE_USB]); +#endif +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H + display_func(dev[TYPE_SNMP]); + nutscan_free_device(dev[TYPE_SNMP]); +#endif +#ifdef WITH_NEON + display_func(dev[TYPE_XML]); + nutscan_free_device(dev[TYPE_XML]); +#endif + display_func(dev[TYPE_NUT]); + nutscan_free_device(dev[TYPE_NUT]); +#ifdef HAVE_AVAHI_CLIENT_CLIENT_H + display_func(dev[TYPE_AVAHI]); + nutscan_free_device(dev[TYPE_AVAHI]); +#endif +#ifdef HAVE_FREEIPMI_FREEIPMI_H + display_func(dev[TYPE_IPMI]); + nutscan_free_device(dev[TYPE_IPMI]); +#endif + return EXIT_SUCCESS; +} diff --git a/tools/nut-scanner/nutscan-device.c b/tools/nut-scanner/nutscan-device.c new file mode 100644 index 0000000..b536398 --- /dev/null +++ b/tools/nut-scanner/nutscan-device.c @@ -0,0 +1,183 @@ +/* device.c: manipulation of a container describing a NUT device + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ +#include "nutscan-device.h" +#include +#include + +nutscan_device_t * nutscan_new_device() +{ + nutscan_device_t * device; + + device = malloc(sizeof(nutscan_device_t)); + if( device==NULL) { + return NULL; + } + + memset(device,0,sizeof(nutscan_device_t)); + + return device; +} + +static void deep_free_device(nutscan_device_t * device) +{ + nutscan_options_t * current; + nutscan_options_t * old; + + if(device==NULL) { + return; + } + if(device->driver) { + free(device->driver); + } + if(device->port) { + free(device->port); + } + + current = &device->opt; + + if(current->option != NULL) { + free(current->option); + } + + if(current->value != NULL) { + free(current->value); + } + + current = current->next; + while (current != NULL) { + if(current->option != NULL) { + free(current->option); + } + + if(current->value != NULL) { + free(current->value); + } + old = current; + current = current->next; + free(old); + }; + + if(device->prev) { + device->prev->next = device->next; + } + if(device->next) { + device->next->prev = device->prev; + } + + free(device); +} + +void nutscan_free_device(nutscan_device_t * device) +{ + if(device==NULL) { + return; + } + while(device->prev != NULL) { + deep_free_device(device->prev); + } + while(device->next != NULL) { + deep_free_device(device->next); + } + + free(device); +} + +void nutscan_add_option_to_device(nutscan_device_t * device,char * option, char * value) +{ + nutscan_options_t * opt; + + opt = &(device->opt); + /* search for last entry */ + if( opt->option != NULL ) { + while( opt->next != NULL ) { + opt = opt->next; + } + + opt->next = malloc(sizeof(nutscan_options_t)); + opt = opt->next; + memset(opt,0,sizeof(nutscan_options_t)); + } + + if( option != NULL ) { + opt->option = strdup(option); + } + else { + opt->option = NULL; + } + + if( value != NULL ) { + opt->value = strdup(value); + } + else { + opt->value = NULL; + } +} + +nutscan_device_t * nutscan_add_device_to_device(nutscan_device_t * first, nutscan_device_t * second) +{ + nutscan_device_t * dev1=NULL; + nutscan_device_t * dev2=NULL; + + /* Get end of first device */ + if( first != NULL) { + dev1 = first; + while(dev1->next != NULL) { + dev1 = dev1->next; + } + } + else { + if( second == NULL ) { + return NULL; + } + /* return end of second */ + dev2 = second; + while(dev2->next != NULL) { + dev2 = dev2->next; + } + return dev2; + } + + /* Get start of second */ + if( second != NULL ) { + dev2 = second; + while(dev2->prev != NULL) { + dev2 = dev2->prev; + } + } + else { + /* return end of first */ + dev1 = first; + while(dev1->next != NULL) { + dev1 = dev1->next; + + } + return dev1; + } + + /* join both */ + dev1->next = dev2; + dev2->prev = dev1; + + /* return end of both */ + while(dev2->next != NULL) { + dev2 = dev2->next; + } + + return dev2; +} diff --git a/tools/nut-scanner/nutscan-device.h b/tools/nut-scanner/nutscan-device.h new file mode 100644 index 0000000..d96f9f3 --- /dev/null +++ b/tools/nut-scanner/nutscan-device.h @@ -0,0 +1,52 @@ +/* device.h: definition of a container describing a NUT device + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 SCAN_DEVICE +#define SCAN_DEVICE + +typedef enum nutscan_device_type { + TYPE_NONE=0, + TYPE_USB, + TYPE_SNMP, + TYPE_XML, + TYPE_NUT, + TYPE_IPMI, + TYPE_AVAHI, + TYPE_END +} nutscan_device_type_t; + +typedef struct nutscan_options { + char * option; + char * value; + struct nutscan_options* next; +} nutscan_options_t; + +typedef struct nutscan_device { + nutscan_device_type_t type; + char * driver; + char * port; + nutscan_options_t opt; + struct nutscan_device * prev; + struct nutscan_device * next; +} nutscan_device_t; + +nutscan_device_t * nutscan_new_device(); +void nutscan_free_device(nutscan_device_t * device); +void nutscan_add_option_to_device(nutscan_device_t * device,char * option, char * value); +nutscan_device_t * nutscan_add_device_to_device(nutscan_device_t * first, nutscan_device_t * second); +#endif diff --git a/tools/nut-scanner/nutscan-display.c b/tools/nut-scanner/nutscan-display.c new file mode 100644 index 0000000..1cbbfc8 --- /dev/null +++ b/tools/nut-scanner/nutscan-display.c @@ -0,0 +1,112 @@ +/* display.c: format and display scanned devices + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ + +#include "common.h" +#include +#include "nutscan-device.h" + +char nutscan_device_type_string[TYPE_END][6] = { + "NONE", + "USB", + "SNMP", + "XML", + "NUT", + "IPMI", + "AVAHI" }; + +void nutscan_display_ups_conf(nutscan_device_t * device) +{ + nutscan_device_t * current_dev = device; + nutscan_options_t * opt; + static int nutdev_num = 1; + + if(device==NULL) { + return; + } + + /* Find start of the list */ + while(current_dev->prev != NULL) { + current_dev = current_dev->prev; + } + + /* Display each devices */ + do { + printf("[nutdev%i]\n\tdriver = \"%s\"\n\tport = \"%s\"\n", + nutdev_num, current_dev->driver, + current_dev->port); + + opt = &(current_dev->opt); + + do { + if( opt->option != NULL ) { + printf("\t%s",opt->option); + if( opt->value != NULL ) { + printf(" = \"%s\"", opt->value); + } + printf("\n"); + } + opt = opt->next; + } while( opt != NULL ); + + nutdev_num++; + + current_dev = current_dev->next; + } + while( current_dev != NULL ); +} + +void nutscan_display_parsable(nutscan_device_t * device) +{ + nutscan_device_t * current_dev = device; + nutscan_options_t * opt; + + if(device==NULL) { + return; + } + + /* Find start of the list */ + while(current_dev->prev != NULL) { + current_dev = current_dev->prev; + } + + /* Display each devices */ + do { + printf("%s:driver=\"%s\",port=\"%s\"", + nutscan_device_type_string[current_dev->type], + current_dev->driver, + current_dev->port); + + opt = &(current_dev->opt); + + do { + if( opt->option != NULL ) { + printf(",%s",opt->option); + if( opt->value != NULL ) { + printf("=\"%s\"", opt->value); + } + } + opt = opt->next; + } while( opt != NULL ); + printf("\n"); + + current_dev = current_dev->next; + } + while( current_dev != NULL ); +} + diff --git a/tools/nut-scanner/nutscan-ip.c b/tools/nut-scanner/nutscan-ip.c new file mode 100644 index 0000000..97fbffb --- /dev/null +++ b/tools/nut-scanner/nutscan-ip.c @@ -0,0 +1,219 @@ +/* ip.c: iterator for IPv4 or IPv6 addresses + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ + +#include "nutscan-ip.h" +#include +#include "common.h" + +static void increment_IPv6(struct in6_addr * addr) +{ + int i; + + for( i=15 ; i>= 0 ; i--) { + addr->s6_addr[i]++; + if( addr->s6_addr[i] != 0) { + break; + } + } +} + +static void invert_IPv6(struct in6_addr * addr1, struct in6_addr * addr2) +{ + struct in6_addr addr; + + memcpy(addr.s6_addr,addr1->s6_addr,sizeof(addr.s6_addr)); + memcpy(addr1->s6_addr,addr2->s6_addr,sizeof(addr.s6_addr)); + memcpy(addr2->s6_addr,addr.s6_addr,sizeof(addr.s6_addr)); +} + +/* Return the first ip or NULL if error */ +char * nutscan_ip_iter_init(nutscan_ip_iter_t * ip, const char * startIP, const char * stopIP) +{ + int addr; + int i; + char buf[SMALLBUF]; + + if( startIP == NULL ) { + return NULL; + } + + if(stopIP == NULL ) { + stopIP = startIP; + } + + ip->type = IPv4; + /* Detecting IPv4 vs IPv6 */ + if(!inet_aton(startIP, &ip->start)) { + /*Try IPv6 detection */ + ip->type = IPv6; + if(!inet_pton(AF_INET6, startIP, &ip->start6)){ + fprintf(stderr,"Invalid address : %s\n",startIP); + return NULL; + } + } + + /* Compute stop IP */ + if( ip->type == IPv4 ) { + if(!inet_aton(stopIP, &ip->stop)) { + fprintf(stderr,"Invalid address : %s\n",stopIP); + return NULL; + } + } + else { + if(!inet_pton(AF_INET6, stopIP, &ip->stop6)){ + fprintf(stderr,"Invalid address : %s\n",stopIP); + return NULL; + } + } + + /* Make sure start IP is lesser than stop IP */ + if( ip->type == IPv4 ) { + if( ntohl(ip->start.s_addr) > ntohl(ip->stop.s_addr) ) { + addr = ip->start.s_addr; + ip->start.s_addr = ip->stop.s_addr; + ip->stop.s_addr = addr; + } + return strdup(inet_ntoa(ip->start)); + } + else { /* IPv6 */ + for( i=0; i<16; i++ ) { + if( ip->start6.s6_addr[i] !=ip->stop6.s6_addr[i] ) { + if(ip->start6.s6_addr[i]>ip->stop6.s6_addr[i]){ + invert_IPv6(&ip->start6,&ip->stop6); + } + break; + } + } + return strdup(inet_ntop(AF_INET6,&ip->start6,buf,sizeof(buf))); + } + + +} + +/* return the next IP +return NULL if there is no more IP +*/ +char * nutscan_ip_iter_inc(nutscan_ip_iter_t * ip) +{ + char buf[SMALLBUF]; + + if( ip->type == IPv4 ) { + /* Check if this is the last address to scan */ + if(ip->start.s_addr == ip->stop.s_addr) { + return NULL; + } + /* increment the address (need to pass address in host + byte order, then pass back in network byte order */ + ip->start.s_addr = htonl((ntohl(ip->start.s_addr)+1)); + + return strdup(inet_ntoa(ip->start)); + } + else { + /* Check if this is the last address to scan */ + if( memcmp(&ip->start6.s6_addr, &ip->stop6.s6_addr, + sizeof(ip->start6.s6_addr)) == 0 ) { + return NULL; + } + + increment_IPv6(&ip->start6); + + return strdup(inet_ntop(AF_INET6,&ip->start6,buf,sizeof(buf))); + } +} + +int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip) +{ + char * cidr_tok; + char * first_ip; + char * mask; + char * saveptr = NULL; + nutscan_ip_iter_t ip; + int mask_val; + int mask_byte; + long mask_bit; + char buf[SMALLBUF]; + + *start_ip = NULL; + *stop_ip = NULL; + + cidr_tok = strdup(cidr); + first_ip = strdup(strtok_r(cidr_tok,"/",&saveptr)); + if( first_ip == NULL) { + return 0; + } + mask = strtok_r(NULL,"/",&saveptr); + if( mask == NULL ) { + return 0; + } + free(cidr_tok); + + mask_val = atoi(mask); + + /* Detecting IPv4 vs IPv6 */ + ip.type = IPv4; + if(!inet_aton(first_ip, &ip.start)) { + /*Try IPv6 detection */ + ip.type = IPv6; + if(!inet_pton(AF_INET6, first_ip, &ip.start6)){ + free(first_ip); + return 0; + } + } + + if( ip.type == IPv4 ) { + + if( mask_val > 0 ) { + mask_val --; + mask_bit = 0x80000000; + mask_bit >>= mask_val; + mask_bit--; + } + else { + mask_bit = 0xffffffff; + } + ip.stop.s_addr = htonl(ntohl(ip.start.s_addr)|mask_bit); + ip.start.s_addr = htonl(ntohl(ip.start.s_addr)&(~mask_bit)); + + *start_ip = strdup(inet_ntoa(ip.start)); + *stop_ip = strdup(inet_ntoa(ip.stop)); + free(first_ip); + return 1; + } + else { + inet_pton(AF_INET6, first_ip, &ip.stop6); + + mask_byte = mask_val / 8; + if( mask_byte < 16 ) { + memset( &(ip.stop6.s6_addr[mask_byte+1]), 0xFF, 15 - mask_byte); + memset( &(ip.start6.s6_addr[mask_byte+1]), 0x00, 15 - mask_byte); + + mask_bit = (0x100 >> mask_val%8)-1; + ip.stop6.s6_addr[mask_byte] |= mask_bit; + ip.start6.s6_addr[mask_byte] &= (~mask_bit); + } + + inet_ntop(AF_INET6,&ip.start6,buf,sizeof(buf)); + *start_ip = strdup(buf); + inet_ntop(AF_INET6,&ip.stop6,buf,sizeof(buf)); + *stop_ip = strdup(buf); + } + + free(first_ip); + return 1; +} diff --git a/tools/nut-scanner/nutscan-ip.h b/tools/nut-scanner/nutscan-ip.h new file mode 100644 index 0000000..01f329f --- /dev/null +++ b/tools/nut-scanner/nutscan-ip.h @@ -0,0 +1,42 @@ +/* ip.h: iterator for IPv4 or IPv6 addresses + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 SCAN_IP +#define SCAN_IP + +#include +#include +#include + +enum network_type { + IPv4, + IPv6 +}; + +typedef struct nutscan_ip_iter { + enum network_type type; + struct in_addr start; + struct in_addr stop; + struct in6_addr start6; + struct in6_addr stop6; +} nutscan_ip_iter_t; + +char * nutscan_ip_iter_init(nutscan_ip_iter_t *, const char * startIP, const char * stopIP); +char * nutscan_ip_iter_inc(nutscan_ip_iter_t *); +int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip); +#endif diff --git a/tools/nut-scanner/nutscan-snmp.h b/tools/nut-scanner/nutscan-snmp.h new file mode 100644 index 0000000..a08a892 --- /dev/null +++ b/tools/nut-scanner/nutscan-snmp.h @@ -0,0 +1,45 @@ +/* nutscan-snmp + * Copyright (C) 2011 - Frederic Bohe + * + * 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 DEVSCAN_SNMP_H +#define DEVSCAN_SNMP_H + +typedef struct { + char * oid; + char * mib; + char * sysoid; +} snmp_device_id_t; + +/* SNMP IDs device table */ +static snmp_device_id_t snmp_device_table[] = { + { ".1.3.6.1.4.1.2947.1.1.2.0" , "bestpower", NULL}, + { ".1.3.6.1.4.1.13742.1.1.12.0" , "raritan", ".1.3.6.1.4.1.13742"}, + { "1.3.6.1.2.1.33.1.1.1.0" , "ietf", ".1.3.6.1.2.1.33"}, + { ".1.3.6.1.4.1.17373.3.1.1.0" , "aphel_genesisII", ".1.3.6.1.4.1.17373"}, + { ".1.3.6.1.4.1.534.6.6.6.1.1.12.0" , "aphel_revelation", ".1.3.6.1.4.1.534.6.6.6"}, + { ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.0" , "eaton_epdu", ".1.3.6.1.4.1.534.6.6.7"}, + { "1.3.6.1.4.1.534.1.1.2.0" , "pw", ".1.3.6.1.4.1.534.1"}, + { ".1.3.6.1.4.1.705.1.1.1.0" , "mge", ".1.3.6.1.4.1.705.1"}, + { ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" , "apcc", NULL}, + { ".1.3.6.1.4.1.4779.1.3.5.2.1.24.1" , "baytech", NULL}, + { "1.3.6.1.4.1.232.165.3.1.1.0" , "cpqpower", NULL}, + { ".1.3.6.1.4.1.4555.1.1.1.1.1.1.0" , "netvision", ".1.3.6.1.4.1.4555.1.1.1"}, + /* Terminating entry */ + { NULL, NULL, NULL} +}; +#endif /* DEVSCAN_SNMP_H */ diff --git a/tools/nut-scanner/nutscan-usb.h b/tools/nut-scanner/nutscan-usb.h new file mode 100644 index 0000000..6065e33 --- /dev/null +++ b/tools/nut-scanner/nutscan-usb.h @@ -0,0 +1,111 @@ +/* nutscan-usb + * Copyright (C) 2011 - Arnaud Quette + * + * 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 DEVSCAN_USB_H +#define DEVSCAN_USB_H + +#include +#include "nut_stdint.h" /* for uint16_t */ + +typedef struct { + uint16_t vendorID; + uint16_t productID; + char* driver_name; +} usb_device_id_t; + +/* USB IDs device table */ +static usb_device_id_t usb_device_table[] = { + + { 0x03f0, 0x1f01, "bcmxcp_usb" }, + { 0x03f0, 0x1f02, "bcmxcp_usb" }, + { 0x03f0, 0x1f06, "usbhid-ups" }, + { 0x03f0, 0x1f08, "usbhid-ups" }, + { 0x03f0, 0x1f09, "usbhid-ups" }, + { 0x03f0, 0x1f0a, "usbhid-ups" }, + { 0x03f0, 0x1fe0, "usbhid-ups" }, + { 0x03f0, 0x1fe1, "usbhid-ups" }, + { 0x0463, 0x0001, "usbhid-ups" }, + { 0x0463, 0xffff, "usbhid-ups" }, + { 0x047c, 0xffff, "usbhid-ups" }, + { 0x050d, 0x0375, "usbhid-ups" }, + { 0x050d, 0x0551, "usbhid-ups" }, + { 0x050d, 0x0750, "usbhid-ups" }, + { 0x050d, 0x0751, "usbhid-ups" }, + { 0x050d, 0x0900, "usbhid-ups" }, + { 0x050d, 0x0910, "usbhid-ups" }, + { 0x050d, 0x0912, "usbhid-ups" }, + { 0x050d, 0x0980, "usbhid-ups" }, + { 0x050d, 0x1100, "usbhid-ups" }, + { 0x051d, 0x0002, "usbhid-ups" }, + { 0x051d, 0x0003, "usbhid-ups" }, + { 0x0592, 0x0002, "bcmxcp_usb" }, + { 0x0592, 0x0004, "usbhid-ups" }, + { 0x05b8, 0x0000, "blazer_usb" }, + { 0x0665, 0x5161, "blazer_usb" }, + { 0x06da, 0x0002, "bcmxcp_usb" }, + { 0x06da, 0x0003, "blazer_usb" }, + { 0x06da, 0xffff, "usbhid-ups" }, + { 0x075d, 0x0300, "usbhid-ups" }, + { 0x0764, 0x0005, "usbhid-ups" }, + { 0x0764, 0x0501, "usbhid-ups" }, + { 0x0764, 0x0601, "usbhid-ups" }, + { 0x0925, 0x1234, "richcomm_usb" }, + { 0x09ae, 0x0001, "tripplite_usb" }, + { 0x09ae, 0x1003, "usbhid-ups" }, + { 0x09ae, 0x1007, "usbhid-ups" }, + { 0x09ae, 0x1008, "usbhid-ups" }, + { 0x09ae, 0x1009, "usbhid-ups" }, + { 0x09ae, 0x1010, "usbhid-ups" }, + { 0x09ae, 0x2005, "usbhid-ups" }, + { 0x09ae, 0x2007, "usbhid-ups" }, + { 0x09ae, 0x2008, "usbhid-ups" }, + { 0x09ae, 0x2009, "usbhid-ups" }, + { 0x09ae, 0x2010, "usbhid-ups" }, + { 0x09ae, 0x2011, "usbhid-ups" }, + { 0x09ae, 0x2012, "usbhid-ups" }, + { 0x09ae, 0x2013, "usbhid-ups" }, + { 0x09ae, 0x2014, "usbhid-ups" }, + { 0x09ae, 0x3008, "usbhid-ups" }, + { 0x09ae, 0x3009, "usbhid-ups" }, + { 0x09ae, 0x3010, "usbhid-ups" }, + { 0x09ae, 0x3011, "usbhid-ups" }, + { 0x09ae, 0x3012, "usbhid-ups" }, + { 0x09ae, 0x3013, "usbhid-ups" }, + { 0x09ae, 0x3014, "usbhid-ups" }, + { 0x09ae, 0x3015, "usbhid-ups" }, + { 0x09ae, 0x4001, "usbhid-ups" }, + { 0x09ae, 0x4002, "usbhid-ups" }, + { 0x09ae, 0x4003, "usbhid-ups" }, + { 0x09ae, 0x4004, "usbhid-ups" }, + { 0x09ae, 0x4005, "usbhid-ups" }, + { 0x09ae, 0x4006, "usbhid-ups" }, + { 0x09ae, 0x4007, "usbhid-ups" }, + { 0x09ae, 0x4008, "usbhid-ups" }, + { 0x0d9f, 0x00a2, "usbhid-ups" }, + { 0x0d9f, 0x00a3, "usbhid-ups" }, + { 0x0d9f, 0x00a4, "usbhid-ups" }, + { 0x0d9f, 0x00a5, "usbhid-ups" }, + { 0x0d9f, 0x00a6, "usbhid-ups" }, + { 0x0f03, 0x0001, "blazer_usb" }, + { 0x10af, 0x0001, "usbhid-ups" }, + { 0x14f0, 0x00c9, "blazer_usb" }, + /* Terminating entry */ + { -1, -1, NULL } +}; +#endif /* DEVSCAN_USB_H */ + diff --git a/tools/nut-scanner/scan_avahi.c b/tools/nut-scanner/scan_avahi.c new file mode 100644 index 0000000..6c4a74e --- /dev/null +++ b/tools/nut-scanner/scan_avahi.c @@ -0,0 +1,338 @@ +/* scan_avahi.c: detect NUT avahi services + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ +#include "common.h" + +#ifdef HAVE_AVAHI_CLIENT_CLIENT_H +#include "nut-scan.h" + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +static AvahiSimplePoll *simple_poll = NULL; +static nutscan_device_t * dev_ret = NULL; +static long avahi_usec_timeout = 0; + +static void update_device(const char * host_name,const char *ip, uint16_t port,char * text, int proto) +{ + nutscan_device_t * dev = NULL; + + char * t = NULL; + char * t_saveptr = NULL; + char * phrase = NULL; + char * phrase_saveptr = NULL; + char * word = NULL; + char * value = NULL; + char * device = NULL; + char * device_saveptr = NULL; + int device_found = 0; + char buf[6]; + int buf_size; + + if( text == NULL ) { + return; + } + + t = strdup(text); + phrase = strtok_r(t,"\"",&t_saveptr); + while(phrase != NULL ) { + word = strtok_r(phrase,"=",&phrase_saveptr); + if( word == NULL ) { + phrase = strtok_r(NULL,"\"",&t_saveptr); + continue; + } + value = strtok_r(NULL,"=",&phrase_saveptr); + if( value == NULL ) { + phrase = strtok_r(NULL,"\"",&t_saveptr); + continue; + } + + if( strcmp(word,"device_list") != 0 ) { + phrase = strtok_r(NULL,"\"",&t_saveptr); + continue; + } + + device = strtok_r(value,";",&device_saveptr); + while( device != NULL ) { + device_found = 1; + dev = nutscan_new_device(); + dev->type = TYPE_NUT; + dev->driver = strdup("nutclient"); + if( proto == AVAHI_PROTO_INET) { + nutscan_add_option_to_device(dev,"desc","IPv4"); + } + if( proto == AVAHI_PROTO_INET6 ) { + nutscan_add_option_to_device(dev,"desc","IPv6"); + } + + if( port != PORT) { + /* +5+1+1+1 is for : + - port number (max 65535 so 5 characters), + - '@' and ':' characters + - terminating 0 */ + buf_size = strlen(device)+strlen(host_name)+ + 5+1+1+1; + dev->port=malloc(buf_size); + if(dev->port) { + snprintf(dev->port,buf_size,"%s@%s:%u", + device,host_name,port); + } + } + else { + /*+1+1 is for '@' character and terminating 0 */ + buf_size = strlen(device)+strlen(host_name)+1+1; + dev->port=malloc(buf_size); + if(dev->port) { + snprintf(dev->port,buf_size,"%s@%s", + device,host_name); + } + } + if( dev->port ) { + dev_ret = nutscan_add_device_to_device(dev_ret,dev); + } + else { + nutscan_free_device(dev); + } + device = strtok_r(NULL,";",&device_saveptr); + }; + + phrase = strtok_r(NULL,"\"",&t_saveptr); + }; + free(t); + + /* If no device published in avahi data, try to get the device by + connecting directly to upsd */ + if( !device_found) { + snprintf(buf,sizeof(buf),"%u",port); + dev = nutscan_scan_nut(ip,ip,buf,avahi_usec_timeout); + if(dev) { + dev_ret = nutscan_add_device_to_device(dev_ret,dev); + } + /* add an upsd entry without associated device */ + else { + dev = nutscan_new_device(); + dev->type = TYPE_NUT; + dev->driver = strdup("nutclient"); + if( proto == AVAHI_PROTO_INET) { + nutscan_add_option_to_device(dev,"desc","IPv4"); + } + if( proto == AVAHI_PROTO_INET6 ) { + nutscan_add_option_to_device(dev,"desc","IPv6"); + } + if( port != PORT) { + /*+1+1 is for ':' character and terminating 0 */ + /*buf is the string containing the port number*/ + buf_size = strlen(host_name)+strlen(buf)+1+1; + dev->port=malloc(buf_size); + if(dev->port) { + snprintf(dev->port,buf_size,"%s:%s", + host_name,buf); + } + } + else { + dev->port=strdup(host_name); + } + if( dev->port ) { + dev_ret = nutscan_add_device_to_device(dev_ret,dev); + } + else { + nutscan_free_device(dev); + } + } + } +} + +static void resolve_callback( + AvahiServiceResolver *r, + AVAHI_GCC_UNUSED AvahiIfIndex interface, + AVAHI_GCC_UNUSED AvahiProtocol protocol, + AvahiResolverEvent event, + const char *name, + const char *type, + const char *domain, + const char *host_name, + const AvahiAddress *address, + uint16_t port, + AvahiStringList *txt, + AvahiLookupResultFlags flags, + AVAHI_GCC_UNUSED void* userdata) { + + assert(r); + + /* Called whenever a service has been resolved successfully or timed out */ + + switch (event) { + case AVAHI_RESOLVER_FAILURE: + fprintf(stderr, "(Resolver) Failed to resolve service '%s' of type '%s' in domain '%s': %s\n", name, type, domain, avahi_strerror(avahi_client_errno(avahi_service_resolver_get_client(r)))); + break; + + case AVAHI_RESOLVER_FOUND: { + char a[AVAHI_ADDRESS_STR_MAX], *t; + +/* fprintf(stderr, "Service '%s' of type '%s' in domain '%s':\n", name, type, domain); */ + + avahi_address_snprint(a, sizeof(a), address); + t = avahi_string_list_to_string(txt); +/* + fprintf(stderr, + "\t%s:%u (%s)\n" + "\tTXT=%s\n" + "\tcookie is %u\n" + "\tis_local: %i\n" + "\tour_own: %i\n" + "\twide_area: %i\n" + "\tmulticast: %i\n" + "\tcached: %i\n", + host_name, port, a, + t, + avahi_string_list_get_service_cookie(txt), + !!(flags & AVAHI_LOOKUP_RESULT_LOCAL), + !!(flags & AVAHI_LOOKUP_RESULT_OUR_OWN), + !!(flags & AVAHI_LOOKUP_RESULT_WIDE_AREA), + !!(flags & AVAHI_LOOKUP_RESULT_MULTICAST), + !!(flags & AVAHI_LOOKUP_RESULT_CACHED)); +*/ + update_device(host_name,a,port,t,address->proto); + avahi_free(t); + } + } + + avahi_service_resolver_free(r); +} + +static void browse_callback( + AvahiServiceBrowser *b, + AvahiIfIndex interface, + AvahiProtocol protocol, + AvahiBrowserEvent event, + const char *name, + const char *type, + const char *domain, + AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, + void* userdata) { + + AvahiClient *c = userdata; + assert(b); + + /* Called whenever a new services becomes available on the LAN or is removed from the LAN */ + + switch (event) { + case AVAHI_BROWSER_FAILURE: + + fprintf(stderr, "(Browser) %s\n", avahi_strerror(avahi_client_errno(avahi_service_browser_get_client(b)))); + avahi_simple_poll_quit(simple_poll); + return; + + case AVAHI_BROWSER_NEW: +/* fprintf(stderr, "(Browser) NEW: service '%s' of type '%s' in domain '%s'\n", name, type, domain); */ + + /* We ignore the returned resolver object. In the callback + function we free it. If the server is terminated before + the callback function is called the server will free + the resolver for us. */ + + if (!(avahi_service_resolver_new(c, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, resolve_callback, c))) + fprintf(stderr, "Failed to resolve service '%s': %s\n", name, avahi_strerror(avahi_client_errno(c))); + + break; + + case AVAHI_BROWSER_REMOVE: + fprintf(stderr, "(Browser) REMOVE: service '%s' of type '%s' in domain '%s'\n", name, type, domain); + break; + + case AVAHI_BROWSER_ALL_FOR_NOW: + avahi_simple_poll_quit(simple_poll); + case AVAHI_BROWSER_CACHE_EXHAUSTED: +/* fprintf(stderr, "(Browser) %s\n", event == AVAHI_BROWSER_CACHE_EXHAUSTED ? "CACHE_EXHAUSTED" : "ALL_FOR_NOW"); */ + break; + } +} + +static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata) { + assert(c); + + /* Called whenever the client or server state changes */ + + if (state == AVAHI_CLIENT_FAILURE) { + fprintf(stderr, "Server connection failure: %s\n", avahi_strerror(avahi_client_errno(c))); + avahi_simple_poll_quit(simple_poll); + } +} + +nutscan_device_t * nutscan_scan_avahi(long usec_timeout) +{ + /* Example service publication + * $ avahi-publish -s nut _upsd._tcp 3493 txtvers=1 protovers=1.0.0 device_list="dev1;dev2" + */ + AvahiClient *client = NULL; + AvahiServiceBrowser *sb = NULL; + int error; + int ret = 1; + + avahi_usec_timeout = usec_timeout; + + /* Allocate main loop object */ + if (!(simple_poll = avahi_simple_poll_new())) { + fprintf(stderr, "Failed to create simple poll object.\n"); + goto fail; + } + + /* Allocate a new client */ + client = avahi_client_new(avahi_simple_poll_get(simple_poll), 0, client_callback, NULL, &error); + + /* Check wether creating the client object succeeded */ + if (!client) { + fprintf(stderr, "Failed to create client: %s\n", avahi_strerror(error)); + goto fail; + } + + /* Create the service browser */ + if (!(sb = avahi_service_browser_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_upsd._tcp", NULL, 0, browse_callback, client))) { + fprintf(stderr, "Failed to create service browser: %s\n", avahi_strerror(avahi_client_errno(client))); + goto fail; + } + + /* Run the main loop */ + avahi_simple_poll_loop(simple_poll); + + ret = 0; + +fail: + + /* Cleanup things */ + if (sb) + avahi_service_browser_free(sb); + + if (client) + avahi_client_free(client); + + if (simple_poll) + avahi_simple_poll_free(simple_poll); + + return dev_ret; +} +#endif /* HAVE_AVAHI_CLIENT_CLIENT_H */ diff --git a/tools/nut-scanner/scan_ipmi.c b/tools/nut-scanner/scan_ipmi.c new file mode 100644 index 0000000..145e281 --- /dev/null +++ b/tools/nut-scanner/scan_ipmi.c @@ -0,0 +1,29 @@ +/* scan_ipmi.c: detect NUT supported Power Supply Units + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ +#include "common.h" + +#ifdef HAVE_FREEIPMI_FREEIPMI_H +#include "nut-scan.h" + +/* TODO */ +nutscan_device_t * nutscan_scan_ipmi() +{ + return NULL; +} +#endif /* HAVE_FREEIPMI_FREEIPMI_H */ diff --git a/tools/nut-scanner/scan_nut.c b/tools/nut-scanner/scan_nut.c new file mode 100644 index 0000000..bed4d1c --- /dev/null +++ b/tools/nut-scanner/scan_nut.c @@ -0,0 +1,194 @@ +/* scan_nut.c: detect remote NUT services + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ + +#include "common.h" +#include "upsclient.h" +#include "nut-scan.h" +#ifdef HAVE_PTHREAD +#include +#endif + + +static nutscan_device_t * dev_ret = NULL; +#ifdef HAVE_PTHREAD +static pthread_mutex_t dev_mutex; +#endif + +struct scan_nut_arg { + char * hostname; + long timeout; +}; + +/* FIXME: SSL support */ +static void * list_nut_devices(void * arg) +{ + struct scan_nut_arg * nut_arg = (struct scan_nut_arg*)arg; + char *target_hostname = nut_arg->hostname; + struct timeval tv; + int port; + unsigned int numq, numa; + const char *query[4]; + char **answer; + char *hostname = NULL; + UPSCONN_t *ups = malloc(sizeof(*ups)); + nutscan_device_t * dev = NULL; + int buf_size; + + tv.tv_sec = nut_arg->timeout / (1000*1000); + tv.tv_usec = nut_arg->timeout % (1000*1000); + + query[0] = "UPS"; + numq = 1; + + if (upscli_splitaddr(target_hostname, &hostname, &port) != 0) { + free(target_hostname); + free(nut_arg); + return NULL; + } + if (upscli_tryconnect(ups, hostname, port,UPSCLI_CONN_TRYSSL,&tv) < 0) { + free(target_hostname); + free(nut_arg); + return NULL; + } + + if(upscli_list_start(ups, numq, query) < 0) { + free(target_hostname); + free(nut_arg); + return NULL; + } + + while (upscli_list_next(ups, numq, query, &numa, &answer) == 1) { + /* UPS */ + if (numa < 3) { + free(target_hostname); + free(nut_arg); + return NULL; + } + /* FIXME: check for duplication by getting driver.port and device.serial + * for comparison with other busses results */ + /* FIXME: + * - also print answer[2] if != "Unavailable"? + * - for upsmon.conf or ups.conf (using dummy-ups)? */ + if (numa >= 3) { + dev = nutscan_new_device(); + dev->type = TYPE_NUT; + dev->driver = strdup("nutclient"); + /* +1+1 is for '@' character and terminnating 0 */ + buf_size = strlen(answer[1])+strlen(hostname)+1+1; + dev->port = malloc(buf_size); + if( dev->port ) { + snprintf(dev->port,buf_size,"%s@%s",answer[1], + hostname); +#ifdef HAVE_PTHREAD + pthread_mutex_lock(&dev_mutex); +#endif + dev_ret = nutscan_add_device_to_device(dev_ret,dev); +#ifdef HAVE_PTHREAD + pthread_mutex_unlock(&dev_mutex); +#endif + } + + } + } + + free(target_hostname); + free(nut_arg); + return NULL; +} + +nutscan_device_t * nutscan_scan_nut(const char* startIP, const char* stopIP, const char* port,long usec_timeout) +{ + nutscan_ip_iter_t ip; + char * ip_str = NULL; + char * ip_dest = NULL; + char buf[SMALLBUF]; + struct sigaction oldact; + int change_action_handler = 0; + int i; + struct scan_nut_arg *nut_arg; + +#ifdef HAVE_PTHREAD + pthread_t thread; + pthread_t * thread_array = NULL; + int thread_count = 0; + + pthread_mutex_init(&dev_mutex,NULL); +#endif + + /* Ignore SIGPIPE if the caller hasn't set a handler for it yet */ + if( sigaction(SIGPIPE, NULL, &oldact) == 0 ) { + if( oldact.sa_handler == SIG_DFL ) { + change_action_handler = 1; + signal(SIGPIPE,SIG_IGN); + } + } + + ip_str = nutscan_ip_iter_init(&ip,startIP,stopIP); + + while( ip_str != NULL ) + { + if( port ) { + if( ip.type == IPv4 ) { + snprintf(buf,sizeof(buf),"%s:%s",ip_str,port); + } + else { + snprintf(buf,sizeof(buf),"[%s]:%s",ip_str,port); + } + + ip_dest = strdup(buf); + } + else { + ip_dest = strdup(ip_str); + } + + if((nut_arg = malloc(sizeof(struct scan_nut_arg))) == NULL ) { + free(ip_dest); + break; + } + + nut_arg->timeout = usec_timeout; + nut_arg->hostname = ip_dest; +#ifdef HAVE_PTHREAD + if (pthread_create(&thread,NULL,list_nut_devices,(void*)nut_arg)==0){ + thread_count++; + thread_array = realloc(thread_array, + thread_count*sizeof(pthread_t)); + thread_array[thread_count-1] = thread; + } +#else + list_nut_devices(nut_arg); +#endif + free(ip_str); + ip_str = nutscan_ip_iter_inc(&ip); + } + +#ifdef HAVE_PTHREAD + for ( i=0; i < thread_count ; i++) { + pthread_join(thread_array[i],NULL); + } + pthread_mutex_destroy(&dev_mutex); + free(thread_array); +#endif + + if(change_action_handler) { + signal(SIGPIPE,SIG_DFL); + } + + return dev_ret; +} diff --git a/tools/nut-scanner/scan_snmp.c b/tools/nut-scanner/scan_snmp.c new file mode 100644 index 0000000..e6ffc54 --- /dev/null +++ b/tools/nut-scanner/scan_snmp.c @@ -0,0 +1,520 @@ +/* scan_snmp.c: detect NUT supported SNMP devices + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ + +#include "common.h" + +#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H + +#include "nut-scan.h" +#include +#include +#include +#include +#include + +/* workaround for buggy Net-SNMP config + * from drivers/snmp-ups.h */ +#ifdef PACKAGE_BUGREPORT +#undef PACKAGE_BUGREPORT +#endif + +#ifdef PACKAGE_NAME +#undef PACKAGE_NAME +#endif + +#ifdef PACKAGE_VERSION +#undef PACKAGE_VERSION +#endif + +#ifdef PACKAGE_STRING +#undef PACKAGE_STRING +#endif + +#ifdef PACKAGE_TARNAME +#undef PACKAGE_TARNAME +#endif + +#include +#include +#ifdef HAVE_PTHREAD +#include +#endif +#include "nutscan-snmp.h" + + +#define SysOID ".1.3.6.1.2.1.1.2.0" + +static nutscan_device_t * dev_ret = NULL; +#ifdef HAVE_PTHREAD +static pthread_mutex_t dev_mutex; +static pthread_t * thread_array = NULL; +static int thread_count = 0; +#endif +long g_usec_timeout ; + +static void scan_snmp_add_device(nutscan_snmp_t * sec, struct snmp_pdu *response,char * mib) +{ + nutscan_device_t * dev = NULL; + struct snmp_session * session; + char * buf; + + session = snmp_sess_session(sec->handle); + /* SNMP device found */ + dev = nutscan_new_device(); + dev->type = TYPE_SNMP; + dev->driver = strdup("snmp-ups"); + dev->port = strdup(session->peername); + buf = malloc( response->variables->val_len + 1 ); + if( buf ) { + memcpy(buf,response->variables->val.string, + response->variables->val_len); + buf[response->variables->val_len]=0; + nutscan_add_option_to_device(dev,"desc",buf); + free(buf); + } + nutscan_add_option_to_device(dev,"mibs",mib); + /* SNMP v3 */ + if( session->community == NULL || session->community[0] == 0) { + if( sec->secLevel ) { + nutscan_add_option_to_device(dev,"secLevel", + sec->secLevel); + } + if( sec->secName ) { + nutscan_add_option_to_device(dev,"secName", + sec->secName); + } + if( sec->authPassword ) { + nutscan_add_option_to_device(dev,"authPassword", + sec->authPassword); + } + if( sec->privPassword ) { + nutscan_add_option_to_device(dev,"privPassword", + sec->privPassword); + } + if( sec->authProtocol ) { + nutscan_add_option_to_device(dev,"authProtocol", + sec->authProtocol); + } + if( sec->privProtocol ) { + nutscan_add_option_to_device(dev,"privProtocol", + sec->privProtocol); + } + } + else { + buf = malloc( session->community_len + 1 ); + if( buf ) { + memcpy(buf,session->community, + session->community_len); + buf[session->community_len]=0; + nutscan_add_option_to_device(dev,"community",buf); + free(buf); + } + } + +#ifdef HAVE_PTHREAD + pthread_mutex_lock(&dev_mutex); +#endif + dev_ret = nutscan_add_device_to_device(dev_ret,dev); +#ifdef HAVE_PTHREAD + pthread_mutex_unlock(&dev_mutex); +#endif + +} + +static struct snmp_pdu * scan_snmp_get_manufacturer(char* oid_str,void* handle) +{ + size_t name_len; + oid name[MAX_OID_LEN]; + struct snmp_pdu *pdu, *response = NULL; + int status; + int index = 0; + + /* create and send request. */ + name_len = MAX_OID_LEN; + if (!snmp_parse_oid(oid_str, name, &name_len)) { + index++; + return NULL; + } + + pdu = snmp_pdu_create(SNMP_MSG_GET); + + if (pdu == NULL) { + index++; + return NULL; + } + + snmp_add_null_var(pdu, name, name_len); + + status = snmp_sess_synch_response(handle,pdu, &response); + if( response == NULL ) { + index++; + return NULL; + } + + if(status!=STAT_SUCCESS||response->errstat!=SNMP_ERR_NOERROR|| + response->variables == NULL || + response->variables->name == NULL || + snmp_oid_compare(response->variables->name, + response->variables->name_length, + name, name_len) != 0 || + response->variables->val.string == NULL ) { + snmp_free_pdu(response); + index++; + return NULL; + } + + return response; +} + +static void try_all_oid(void * arg) +{ + struct snmp_pdu *response = NULL; + int index = 0; + nutscan_snmp_t * sec = (nutscan_snmp_t *)arg; + + while(snmp_device_table[index].oid != NULL) { + + response = scan_snmp_get_manufacturer(snmp_device_table[index].oid,sec->handle); + if( response == NULL ) { + index++; + continue; + } + + scan_snmp_add_device(sec,response,snmp_device_table[index].mib); + + snmp_free_pdu(response); + response = NULL; + + index++; + } +} + +static int init_session(struct snmp_session * snmp_sess, nutscan_snmp_t * sec) +{ + snmp_sess_init(snmp_sess); + + snmp_sess->peername = sec->peername; + + if( sec->community != NULL || sec->secLevel == NULL ) { + snmp_sess->version = SNMP_VERSION_1; + if( sec->community != NULL ) { + snmp_sess->community = (unsigned char *)sec->community; + snmp_sess->community_len = strlen(sec->community); + } + else { + snmp_sess->community = (unsigned char *)"public"; + snmp_sess->community_len = strlen("public"); + } + } + else { /* SNMP v3 */ + snmp_sess->version = SNMP_VERSION_3; + + /* Security level */ + if (strcmp(sec->secLevel, "noAuthNoPriv") == 0) + snmp_sess->securityLevel = SNMP_SEC_LEVEL_NOAUTH; + else if (strcmp(sec->secLevel, "authNoPriv") == 0) + snmp_sess->securityLevel = SNMP_SEC_LEVEL_AUTHNOPRIV; + else if (strcmp(sec->secLevel, "authPriv") == 0) + snmp_sess->securityLevel = SNMP_SEC_LEVEL_AUTHPRIV; + else { + fprintf(stderr,"Bad SNMPv3 securityLevel: %s\n", + sec->secLevel); + return 0; + } + + /* Security name */ + if( sec->secName == NULL ) { + fprintf(stderr,"securityName is required for SNMPv3\n"); + return 0; + } + snmp_sess->securityName = strdup(sec->secName); + snmp_sess->securityNameLen = strlen(snmp_sess->securityName); + + /* Everything is ready for NOAUTH */ + if( snmp_sess->securityLevel == SNMP_SEC_LEVEL_NOAUTH ) { + return 1; + } + + /* Process mandatory fields, based on the security level */ + switch (snmp_sess->securityLevel) { + case SNMP_SEC_LEVEL_AUTHNOPRIV: + if (sec->authPassword == NULL) { + fprintf(stderr, + "authPassword is required for SNMPv3 in %s mode\n", + sec->secLevel); + return 0; + } + break; + case SNMP_SEC_LEVEL_AUTHPRIV: + if ((sec->authPassword == NULL) || + (sec->privPassword == NULL)) { + fprintf(stderr, + "authPassword and privPassword are required for SNMPv3 in %s mode\n", + sec->secLevel); + return 0; + } + break; + default: + /* nothing else needed */ + break; + } + + /* Process authentication protocol and key */ + snmp_sess->securityAuthKeyLen = USM_AUTH_KU_LEN; + + /* default to MD5 */ + snmp_sess->securityAuthProto = usmHMACMD5AuthProtocol; + snmp_sess->securityAuthProtoLen =sizeof(usmHMACMD5AuthProtocol)/ + sizeof(oid); + + if( sec->authProtocol ) { + if (strcmp(sec->authProtocol, "SHA") == 0) { + snmp_sess->securityAuthProto = + usmHMACSHA1AuthProtocol; + snmp_sess->securityAuthProtoLen = + sizeof(usmHMACSHA1AuthProtocol)/ + sizeof(oid); + } + else { + if (strcmp(sec->authProtocol, "MD5") != 0) { + fprintf(stderr, + "Bad SNMPv3 authProtocol: %s", + sec->authProtocol); + return 0; + } + } + } + + /* set the authentication key to a MD5/SHA1 hashed version of + * our passphrase (must be at least 8 characters long) */ + if (generate_Ku(snmp_sess->securityAuthProto, + snmp_sess->securityAuthProtoLen, + (u_char *) sec->authPassword, + strlen(sec->authPassword), + snmp_sess->securityAuthKey, + &snmp_sess->securityAuthKeyLen) + != SNMPERR_SUCCESS) { + fprintf(stderr, + "Error generating Ku from authentication pass phrase\n"); + return 0; + } + + /* Everything is ready for AUTHNOPRIV */ + if( snmp_sess->securityLevel == SNMP_SEC_LEVEL_AUTHNOPRIV ) { + return 1; + } + + /* default to DES */ + snmp_sess->securityPrivProto=usmDESPrivProtocol; + snmp_sess->securityPrivProtoLen = + sizeof(usmDESPrivProtocol)/sizeof(oid); + + if( sec->privProtocol ) { + if (strcmp(sec->privProtocol, "AES") == 0) { + snmp_sess->securityPrivProto=usmAESPrivProtocol; + snmp_sess->securityPrivProtoLen = + sizeof(usmAESPrivProtocol)/sizeof(oid); + } + else { + if (strcmp(sec->privProtocol, "DES") != 0) { + fprintf(stderr, + "Bad SNMPv3 authProtocol: %s\n" + ,sec->authProtocol); + return 0; + } + } + } + + /* set the private key to a MD5/SHA hashed version of + * our passphrase (must be at least 8 characters long) */ + snmp_sess->securityPrivKeyLen = USM_PRIV_KU_LEN; + if (generate_Ku(snmp_sess->securityAuthProto, + snmp_sess->securityAuthProtoLen, + (u_char *) sec->privPassword, + strlen(sec->privPassword), + snmp_sess->securityPrivKey, + &snmp_sess->securityPrivKeyLen) + != SNMPERR_SUCCESS) { + fprintf(stderr, + "Error generating Ku from private pass phrase\n"); + return 0; + } + + } + + return 1; +} + +static void * try_SysOID(void * arg) +{ + struct snmp_session snmp_sess; + void * handle; + struct snmp_pdu *pdu, *response = NULL; + oid name[MAX_OID_LEN]; + size_t name_len = MAX_OID_LEN; + nutscan_snmp_t * sec = (nutscan_snmp_t *)arg; + int index = 0; + int sysoid_found = 0; + + /* Initialize session */ + if( !init_session(&snmp_sess,sec) ) { + goto try_SysOID_free; + } + + snmp_sess.retries = 0; + snmp_sess.timeout = g_usec_timeout; + + /* Open the session */ + handle = snmp_sess_open(&snmp_sess); /* establish the session */ + if (handle == NULL) { + fprintf(stderr,"Failed to open SNMP session for %s.\n", + sec->peername); + goto try_SysOID_free; + } + + /* create and send request. */ + if (!snmp_parse_oid(SysOID, name, &name_len)) { + fprintf(stderr,"SNMP errors: %s\n", + snmp_api_errstring(snmp_errno)); + snmp_sess_close(handle); + goto try_SysOID_free; + } + + pdu = snmp_pdu_create(SNMP_MSG_GET); + + if (pdu == NULL) { + fprintf(stderr,"Not enough memory\n"); + snmp_sess_close(handle); + goto try_SysOID_free; + } + + snmp_add_null_var(pdu, name, name_len); + + snmp_sess_synch_response(handle, + pdu, &response); + + if (response) { + sec->handle = handle; + + /* SNMP device found */ + /* SysOID is supposed to give the required MIB. */ + + /* Check if the received OID match with a known sysOID */ + if(response->variables != NULL && + response->variables->val.objid != NULL){ + while(snmp_device_table[index].oid != NULL) { + if(snmp_device_table[index].sysoid == NULL ) { + index++; + continue; + } + name_len = MAX_OID_LEN; + if (!snmp_parse_oid( + snmp_device_table[index].sysoid, + name, &name_len)) { + index++; + continue; + } + + if ( snmp_oid_compare( + response->variables->val.objid, + response->variables->val_len/sizeof(oid), + name, name_len) == 0 ) { + /* we have found a relevent sysoid */ + snmp_free_pdu(response); + response = scan_snmp_get_manufacturer( + snmp_device_table[index].oid, + handle); + scan_snmp_add_device(sec,response, + snmp_device_table[index].mib); + sysoid_found = 1; + } + index++; + } + } + + /* try a list of known OID */ + if( !sysoid_found ) { + try_all_oid(sec); + } + + snmp_free_pdu(response); + response = NULL; + } + + snmp_sess_close(handle); + +try_SysOID_free: + if( sec->peername ) { + free(sec->peername); + } + free(sec); + + return NULL; +} + +nutscan_device_t * nutscan_scan_snmp(const char * start_ip, const char * stop_ip,long usec_timeout, nutscan_snmp_t * sec) +{ + int i; + nutscan_snmp_t * tmp_sec; + nutscan_ip_iter_t ip; + char * ip_str = NULL; +#ifdef HAVE_PTHREAD + pthread_t thread; + + pthread_mutex_init(&dev_mutex,NULL); +#endif + + g_usec_timeout = usec_timeout; + + /* Initialize the SNMP library */ + init_snmp("nut-scanner"); + + ip_str = nutscan_ip_iter_init(&ip, start_ip, stop_ip); + + while(ip_str != NULL) { + tmp_sec = malloc(sizeof(nutscan_snmp_t)); + memcpy(tmp_sec, sec, sizeof(nutscan_snmp_t)); + tmp_sec->peername = ip_str; + +#ifdef HAVE_PTHREAD + if (pthread_create(&thread,NULL,try_SysOID,(void*)tmp_sec)==0){ + thread_count++; + thread_array = realloc(thread_array, + thread_count*sizeof(pthread_t)); + thread_array[thread_count-1] = thread; + } +#else + try_SysOID((void *)tmp_sec); +#endif + ip_str = nutscan_ip_iter_inc(&ip); + }; + +#ifdef HAVE_PTHREAD + for ( i=0; i < thread_count ; i++) { + pthread_join(thread_array[i],NULL); + } + pthread_mutex_destroy(&dev_mutex); + free(thread_array); +#endif + + return dev_ret; +} +#endif /* HAVE_NET_SNMP_NET_SNMP_CONFIG_H */ + + diff --git a/tools/nut-scanner/scan_usb.c b/tools/nut-scanner/scan_usb.c new file mode 100644 index 0000000..8ce8759 --- /dev/null +++ b/tools/nut-scanner/scan_usb.c @@ -0,0 +1,168 @@ +/* scan_usb.c: detect NUT supported USB devices + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ + +#include "common.h" +#ifdef HAVE_USB_H +#include "upsclient.h" +#include "nutscan-usb.h" +#include +#include +#include "nutscan-device.h" + +static char* is_usb_device_supported(usb_device_id_t *usb_device_id_list, + int dev_VendorID, int dev_ProductID) +{ + usb_device_id_t *usbdev; + + for (usbdev=usb_device_id_list; usbdev->driver_name != NULL; usbdev++) { + if ( (usbdev->vendorID == dev_VendorID) + && (usbdev->productID == dev_ProductID) ) { + + return usbdev->driver_name; + } + } + + return NULL; +} + +/* return NULL if error */ +nutscan_device_t * nutscan_scan_usb() +{ + int ret; + char string[256]; + char *driver_name = NULL; + char *serialnumber = NULL; + char *device_name = NULL; + char *vendor_name = NULL; + struct usb_device *dev; + struct usb_bus *bus; + usb_dev_handle *udev; + + nutscan_device_t * nut_dev = NULL; + nutscan_device_t * current_nut_dev = NULL; + + /* libusb base init */ + usb_init(); + usb_find_busses(); + usb_find_devices(); + + for (bus = usb_busses; bus; bus = bus->next) { + for (dev = bus->devices; dev; dev = dev->next) { + if ((driver_name = + is_usb_device_supported(usb_device_table, + dev->descriptor.idVendor, + dev->descriptor.idProduct)) != NULL) { + + /* open the device */ + udev = usb_open(dev); + if (!udev) { + fprintf(stderr,"Failed to open device, \ + skipping. (%s)\n", + usb_strerror()); + continue; + } + + /* get serial number */ + if (dev->descriptor.iSerialNumber) { + ret = usb_get_string_simple(udev, + dev->descriptor.iSerialNumber, + string, sizeof(string)); + if (ret > 0) { + serialnumber = strdup(string); + } + } + /* get product name */ + if (dev->descriptor.iProduct) { + ret = usb_get_string_simple(udev, + dev->descriptor.iProduct, + string, sizeof(string)); + if (ret > 0) { + device_name = strdup(string); + } + } + + /* get vendor name */ + if (dev->descriptor.iManufacturer) { + ret = usb_get_string_simple(udev, + dev->descriptor.iManufacturer, + string, sizeof(string)); + if (ret > 0) { + vendor_name = strdup(string); + } + } + + nut_dev = nutscan_new_device(); + if(nut_dev == NULL) { + fprintf(stderr,"Memory allocation \ + error\n"); + nutscan_free_device(current_nut_dev); + free(serialnumber); + free(device_name); + free(vendor_name); + return NULL; + } + + nut_dev->type = TYPE_USB; + if(driver_name) { + nut_dev->driver = strdup(driver_name); + } + nut_dev->port = strdup("auto"); + sprintf(string,"%04X",dev->descriptor.idVendor); + nutscan_add_option_to_device(nut_dev,"vendorid", + string); + sprintf(string,"%04X", + dev->descriptor.idProduct); + nutscan_add_option_to_device(nut_dev,"productid", + string); + if(device_name) { + nutscan_add_option_to_device(nut_dev, + "product", + device_name); + free(device_name); + } + if(serialnumber) { + nutscan_add_option_to_device(nut_dev, + "serial", + serialnumber); + free(serialnumber); + } + if(vendor_name) { + nutscan_add_option_to_device(nut_dev, + "vendor", + vendor_name); + free(vendor_name); + } + nutscan_add_option_to_device(nut_dev,"bus", + bus->dirname); + + current_nut_dev = nutscan_add_device_to_device( + current_nut_dev, + nut_dev); + + memset (string, 0, sizeof(string)); + + usb_close(udev); + } + } + } + + return current_nut_dev; +} +#endif /* HAVE_USB_H */ + diff --git a/tools/nut-scanner/scan_xml_http.c b/tools/nut-scanner/scan_xml_http.c new file mode 100644 index 0000000..7c68a65 --- /dev/null +++ b/tools/nut-scanner/scan_xml_http.c @@ -0,0 +1,160 @@ +/* scan_xml_http.c: detect NUT supported XML HTTP devices + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ + +#include "common.h" +#ifdef WITH_NEON +#include +#include +#include +#include +#include +#include +#include +#include +#include "nutscan-device.h" + +static int startelm_cb(void *userdata, int parent, const char *nspace, const char *name, const char **atts) { + nutscan_device_t * dev = (nutscan_device_t *)userdata; + char buf[SMALLBUF]; + int i = 0; + while( atts[i] != NULL ) { + if(strcmp(atts[i],"type") == 0) { + snprintf(buf,sizeof(buf),"%s",atts[i+1]); + nutscan_add_option_to_device(dev,"desc",buf); + return 0; + } + i=i+2; + } + return 0; +} + +nutscan_device_t * nutscan_scan_xml_http(long usec_timeout) +{ + char *scanMsg = ""; + int port = 4679; + int peerSocket; + int sockopt_on = 1; + struct sockaddr_in sockAddress; + socklen_t sockAddressLength = sizeof(sockAddress); + memset(&sockAddress, 0, sizeof(sockAddress)); + fd_set fds; + struct timeval timeout; + int ret; + char buf[SMALLBUF]; + char string[SMALLBUF]; + ssize_t recv_size; + + nutscan_device_t * nut_dev = NULL; + nutscan_device_t * current_nut_dev = NULL; + + + if((peerSocket = socket(AF_INET, SOCK_DGRAM, 0)) != -1) + { + /* Initialize socket */ + sockAddress.sin_family = AF_INET; + sockAddress.sin_addr.s_addr = INADDR_BROADCAST; + sockAddress.sin_port = htons(port); + setsockopt(peerSocket, SOL_SOCKET, SO_BROADCAST, &sockopt_on, + sizeof(sockopt_on)); + + /* Send scan request */ + if(sendto(peerSocket, scanMsg, strlen(scanMsg), 0, + (struct sockaddr *)&sockAddress, + sockAddressLength) <= 0) + { + fprintf(stderr,"Error sending Eaton \n"); + } + else + { + FD_ZERO(&fds); + FD_SET(peerSocket,&fds); + + timeout.tv_sec = usec_timeout / 1000000; + timeout.tv_usec = usec_timeout % 1000000; + + while ((ret=select(peerSocket+1,&fds,NULL,NULL, + &timeout) )) { + + timeout.tv_sec = usec_timeout / 1000000; + timeout.tv_usec = usec_timeout % 1000000; + + if( ret == -1 ) { + fprintf(stderr, + "Error waiting on \ + socket: %d\n",errno); + break; + } + + sockAddressLength = sizeof(struct sockaddr_in); + recv_size = recvfrom(peerSocket,buf, + sizeof(buf),0, + (struct sockaddr *)&sockAddress, + &sockAddressLength); + + if(recv_size==-1) { + fprintf(stderr, + "Error reading \ + socket: %d\n",errno); + continue; + } + + + if( inet_ntop(AF_INET, + &(sockAddress.sin_addr), + string,sizeof(buf)) == NULL ) { + fprintf(stderr, + "Error converting IP address \ + : %d\n",errno); + continue; + } + + nut_dev = nutscan_new_device(); + if(nut_dev == NULL) { + fprintf(stderr,"Memory allocation \ + error\n"); + return NULL; + } + + nut_dev->type = TYPE_XML; + /* Try to read device type */ + ne_xml_parser *parser = ne_xml_create(); + ne_xml_push_handler(parser, startelm_cb, NULL, + NULL, nut_dev); + ne_xml_parse(parser, buf, strlen(buf)); + ne_xml_destroy(parser); + + nut_dev->driver = strdup("netxml-ups"); + sprintf(buf,"http://%s",string); + nut_dev->port = strdup(buf); + + current_nut_dev = nutscan_add_device_to_device( + current_nut_dev,nut_dev); + + } + } + } + else + { + fprintf(stderr,"Error creating socket\n"); + } + + + return current_nut_dev; +} +#endif /* WITH_NEON */ diff --git a/tools/nut-snmpinfo.py b/tools/nut-snmpinfo.py new file mode 100755 index 0000000..8489db1 --- /dev/null +++ b/tools/nut-snmpinfo.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python +# Copyright (C) 2011 - Frederic Bohe +# +# 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 + +# This program extracts all SNMP information related to NUT snmp-ups +# drivers. + +import glob +import re + +output_file_name="./nut-scanner/nutscan-snmp.h" +output_file = open(output_file_name,'w') + +#expand #define constant +def expand_define(filename,constant): + ret_line = "" + f = open(filename, 'r') + for line in f: + if constant in line and "#define" in line: + line_without_carriage_return = re.sub("[\n\r]", "", line) + line_with_single_blank = re.sub("[ \t]+", " ", line_without_carriage_return) + define_line = line_with_single_blank.split(" "); + #define_line[0] = "#define" + #define_line[1] = const name + #define_line[2...] = const value (may be other const name) + if constant in define_line[1]: + define_line.pop(0) #remove #define + define_line.pop(0) #remove the constant name + for elem in define_line: + if elem[0] == "\"": + clean_elem = re.sub("\"", "", elem) + ret_line = ret_line + clean_elem + else: + ret_line = ret_line + expand_define(filename,elem); + return ret_line + + +output_file.write( "/* nutscan-snmp\n" ) +output_file.write( " * Copyright (C) 2011 - Frederic Bohe \n" ) +output_file.write( " *\n" ) +output_file.write( " * This program is free software; you can redistribute it and/or modify\n" ) +output_file.write( " * it under the terms of the GNU General Public License as published by\n" ) +output_file.write( " * the Free Software Foundation; either version 2 of the License, or\n" ) +output_file.write( " * (at your option) any later version.\n" ) +output_file.write( " *\n" ) +output_file.write( " * This program is distributed in the hope that it will be useful,\n" ) +output_file.write( " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" ) +output_file.write( " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" ) +output_file.write( " * GNU General Public License for more details.\n" ) +output_file.write( " *\n" ) +output_file.write( " * You should have received a copy of the GNU General Public License\n" ) +output_file.write( " * along with this program; if not, write to the Free Software\n" ) +output_file.write( " * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" ) +output_file.write( " */\n" ) +output_file.write( "\n" ) +output_file.write( "#ifndef DEVSCAN_SNMP_H\n" ) +output_file.write( "#define DEVSCAN_SNMP_H\n" ) +output_file.write( "\n" ) +output_file.write( "typedef struct {\n" ) +output_file.write( " char * oid;\n" ) +output_file.write( " char * mib;\n" ) +output_file.write( " char * sysoid;\n" ) +output_file.write( "} snmp_device_id_t;\n" ) +output_file.write( "\n" ) +output_file.write( "/* SNMP IDs device table */\n" ) +output_file.write( "static snmp_device_id_t snmp_device_table[] = {\n" ) + +for filename in glob.glob('../drivers/*-mib.c'): + list_of_line = file(filename,'r').read().split(';') + for line in list_of_line: + if "mib2nut_info_t" in line: + #clean up line + line2 = re.sub("[\n\t\r}]", "", line) + # split line + line = line2.split("{",1) + #line[1] is the part between {} + line2 = line[1].split(",") + mib = line2[0] + #line2[3] is the OID of the device model name which + #could be made of #define const and string. + source_oid = line2[3] + #line2[5] is the SysOID of the device which + #could be made of #define const and string. + if len(line2) >= 6: + source_sysoid = line2[5] + else: + source_sysoid = "NULL" + + #decode source_oid + line = source_oid.lstrip(" ") + line2 = line.split(" ") + + oid = "" + for elem in line2: + if elem[0] == "\"": + clean_elem = re.sub("\"", "", elem) + oid = oid+clean_elem + else: + oid = oid + expand_define(filename,elem); + + #decode source_sysoid + line = source_sysoid.lstrip(" ") + line = line.rstrip(" ") + line2 = line.split(" ") + + sysoid = "" + for elem in line2: + if elem[0] == "\"": + clean_elem = re.sub("\"", "", elem) + sysoid = sysoid+clean_elem + else: + sysoid = sysoid + expand_define(filename,elem); + + if sysoid == "": + sysoid = "NULL" + else: + sysoid = "\"" + sysoid + "\"" + + output_file.write( "\t{ \"" + oid + "\" , " + mib + ", " + sysoid + "},\n" ) + +output_file.write( " /* Terminating entry */\n" ) +output_file.write( " { NULL, NULL, NULL}\n" ) +output_file.write( "};\n" ) +output_file.write( "#endif /* DEVSCAN_SNMP_H */\n" ) diff --git a/tools/nut-usbinfo.pl b/tools/nut-usbinfo.pl index 606d89d..7833086 100755 --- a/tools/nut-usbinfo.pl +++ b/tools/nut-usbinfo.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# Current Version : 1.0 -# Copyright (C) 2008 - 2010 +# Current Version : 1.1 +# Copyright (C) 2008 - 2011 # Arnaud Quette # dloic (loic.dardant AT gmail DOT com) # @@ -43,6 +43,26 @@ my $tmpOutputUPower; # mfr header flag my $upowerMfrHeaderDone = 0; +# NUT device scanner - C header +my $outputDevScanner = "./nut-scanner/nutscan-usb.h"; + +my $GPL_header = "\ + * Copyright (C) 2011 - Arnaud Quette \ + *\ + * 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"; + # array of products indexed by vendorID my %vendor; @@ -94,6 +114,16 @@ sub gen_usb_files print $outputUPower '# if usbraw device, ignore'."\n".'KERNEL!="hiddev*", GOTO="up_hid_end"'."\n\n"; print $outputUPower '# if an interface, ignore'."\n".'ENV{DEVTYPE}=="usb_interface", GOTO="up_hid_end"'."\n\n"; + # Device scanner header + open my $outputDevScanner, ">$outputDevScanner" || die "error $outputDevScanner : $!"; + print $outputDevScanner '/* nutscan-usb'.$GPL_header."\n */\n\n"; + print $outputDevScanner "#ifndef DEVSCAN_USB_H\n#define DEVSCAN_USB_H\n\n"; + print $outputDevScanner "#include \n"; + print $outputDevScanner "#include \"nut_stdint.h\"\t/* for uint16_t */\n\n"; + # vid, pid, driver + print $outputDevScanner "typedef struct {\n\tuint16_t\tvendorID;\n\tuint16_t\tproductID;\n\tchar*\tdriver_name;\n} usb_device_id_t;\n\n"; + print $outputDevScanner "/* USB IDs device table */\nstatic usb_device_id_t usb_device_table[] = {\n\n"; + # generate the file in alphabetical order (first for VendorID, then for ProductID) foreach my $vendorId (sort { lc $a cmp lc $b } keys %vendorName) { @@ -154,6 +184,9 @@ sub gen_usb_files $tmpOutputUPower = $tmpOutputUPower."\", ATTRS{idProduct}==\"".removeHexPrefix($productId)."\","; $tmpOutputUPower = $tmpOutputUPower.' ENV{UPOWER_BATTERY_TYPE}="ups"'."\n"; } + + # Device scanner entry + print $outputDevScanner "\t{ ".$vendorId.', '.$productId.", \"".$vendor{$vendorId}{$productId}{"driver"}."\" },\n"; } # HAL vendor footer print $outHAL " \n"; @@ -171,6 +204,9 @@ sub gen_usb_files print $outputUPower $tmpOutputUPower; # ...and print footer print $outputUPower "\n".'LABEL="up_hid_end"'."\n"; + + # Device scanner footer + print $outputDevScanner "\t/* Terminating entry */\n\t{ -1, -1, NULL }\n};\n#endif /* DEVSCAN_USB_H */\n\n"; } sub find_usbdevs @@ -231,8 +267,9 @@ sub find_usbdevs } } - # store data (to be optimized) - if (($vendorName{$VendorID} eq "") && ($VendorName)) + # store date (to be optimized) + # and don't overwritte actual vendor names with empty values + if( (!$vendorName{$VendorID}) or (($vendorName{$VendorID} eq "") and ($VendorName ne "")) ) { $vendorName{$VendorID}=trim($VendorName); } diff --git a/tools/svn2cl.authors b/tools/svn2cl.authors index bc5252f..99086b3 100644 --- a/tools/svn2cl.authors +++ b/tools/svn2cl.authors @@ -1,5 +1,13 @@ +esr-guest:Eric S. Raymond +lestat-guest:David Goncalves +agordeev-guest:Alexander Gordeev +emilienkia-guest:Emilien Kia +prachi-guest:Prachi Gandhi +praveenkumar-guest:Praveen Kumar +msoltyspl-guest:Michal Soltys +keyson-guest:Kjell Claesson +chetanagarwal-guest:Chetan Agarwal +fbohe-guest:Frederic Bohe +aquette:Arnaud Quette clepple-guest:Charles Lepple adkorte-guest:Arjen de Korte -aquette:Arnaud Quette -lestat-guest:David Goncalves -chetanagarwal-guest: Chetan Agarwal From 18de36389b10ac8cc7400442627b0db46748aec9 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 29 Sep 2011 20:17:51 +0200 Subject: [PATCH 062/300] Debian release 2.6.2-1 --- debian/changelog | 15 +++++++++++++++ debian/control | 4 +--- debian/nut-server.init | 10 ++-------- debian/nut-server.install | 1 + debian/nut.TODO.Debian | 19 +++++++++---------- 5 files changed, 28 insertions(+), 21 deletions(-) diff --git a/debian/changelog b/debian/changelog index 71dc1ca..6124fed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +nut (2.6.2-1) unstable; urgency=low + + * New upstream release (Closes: #594989) + * debian/control: + - remove legacy Build-Depends for nut-hal-drivers on libdbus and libglib + - Build-Depends-Indep on docbook-xsl for offline document + generation (Closes: #635347) + * debian/nut-server.install: add apcsmart-old + * debian/nut-server.init: + - add udev as Required-Start/Stop (Closes: #642412) + - remove legacy support for /etc/default/nut (Closes: #638021) + * debian/nut.TODO.Debian: update and complete the TODO list + + -- Arnaud Quette Thu, 29 Sep 2011 18:39:16 +0200 + nut (2.6.1-2) unstable; urgency=low * debian/nut.README.Debian: Adjust udev rules naming for permissions override diff --git a/debian/control b/debian/control index 2696b7c..b0e8188 100644 --- a/debian/control +++ b/debian/control @@ -8,14 +8,12 @@ Build-Depends: debhelper (>= 8), libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), - libdbus-1-dev, - libdbus-glib-1-dev, - libglib2.0-dev, libneon27-gnutls-dev | libneon27-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6), python (>= 2.6.6-3~) Build-Depends-Indep: asciidoc (>= 8.6.3), + docbook-xsl, dblatex (>= 0.2.5), libxml2-utils Standards-Version: 3.9.2 diff --git a/debian/nut-server.init b/debian/nut-server.init index 50706ed..158e127 100644 --- a/debian/nut-server.init +++ b/debian/nut-server.init @@ -1,8 +1,8 @@ #! /bin/sh ### BEGIN INIT INFO # Provides: nut -# Required-Start: $local_fs $syslog $network $remote_fs -# Required-Stop: $local_fs $syslog $network $remote_fs +# Required-Start: $local_fs $syslog $network $remote_fs udev +# Required-Stop: $local_fs $syslog $network $remote_fs udev # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Network UPS Tools initscript @@ -17,7 +17,6 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin NAME=nut DESC="Network UPS Tools" -DEFAULT=/etc/default/nut CONFIG=/etc/nut/nut.conf . /lib/lsb/init-functions @@ -28,11 +27,6 @@ UPSD_OPTIONS="" # set upsmon specific options. use "man upsmon" for more info UPSMON_OPTIONS="" -# Include defaults if available (transition period) -if [ -f $DEFAULT ] ; then - . $DEFAULT -fi - # Include NUT nut.conf if [ -f $CONFIG ] ; then . $CONFIG diff --git a/debian/nut-server.install b/debian/nut-server.install index 034e307..3c0c086 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -12,6 +12,7 @@ debian/tmp/lib/nut/bestups debian/tmp/lib/nut/bestfortress debian/tmp/lib/nut/usbhid-ups debian/tmp/lib/nut/apcsmart +debian/tmp/lib/nut/apcsmart-old debian/tmp/lib/nut/belkin debian/tmp/lib/nut/blazer_ser debian/tmp/lib/nut/blazer_usb diff --git a/debian/nut.TODO.Debian b/debian/nut.TODO.Debian index 3a35bbc..4efc003 100644 --- a/debian/nut.TODO.Debian +++ b/debian/nut.TODO.Debian @@ -1,11 +1,10 @@ -- address the /var/www issue with upstream -- rewrite and enhance the init script (log output, LSB, ...) -- audit and solve the lintian reports... -- factorise install rules (possibly use CDBS) +- split nut-server.init into nut-server.init + nut-client.init (upsmon) +- how to distribute the nut-scanner and its library? Ie, a single package, + or using the nut-{xml,snmp,...} packages. + this requires libusb (0.1), Net SNMP, FreeIPMi, Avahi, libupsclient and Neon! - consider an SSL/TLS set of packages (ie nut-ssl, ...) - or help the port to NSS -- apply when available the NUT Packaging Standard (NPS) - ie create a nut-client package -- install the device-recorder.sh script (with nut-client or nut-dev?) -- consider joining the powermgt effort: - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=55123 + or help the port to NSS +- install the device-recorder.sh script (with libupsclient-dev or a more + generic nut-dev that depends?) +- address the /var/www issue with upstream +- audit and solve the lintian reports... From e75060ac30ae0e80f9c776cf25f8067663f7f125 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 29 Sep 2011 22:58:03 +0200 Subject: [PATCH 063/300] Debian release 2.6.2-1 UNRELEASED --- debian/changelog | 2 +- debian/rules | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6124fed..8ea2bc5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.6.2-1) unstable; urgency=low +nut (2.6.2-1) UNRELEASED; urgency=low * New upstream release (Closes: #594989) * debian/control: diff --git a/debian/rules b/debian/rules index 871ffb1..8fa38f7 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,8 @@ #!/usr/bin/make -f +DEB_AUTO_UPDATE_ACLOCAL := 1.11 +DEB_AUTO_UPDATE_LIBTOOL := pre +include /usr/share/cdbs/1/rules/autoreconf.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/class/python-module.mk From e69a4460bbe3bebc13d369a6e72acdeb8f0201c7 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Fri, 30 Sep 2011 22:37:48 +0200 Subject: [PATCH 064/300] Debian release 2.6.2-1 --- debian/changelog | 6 +++++- debian/libupsclient1-dev.links | 2 +- debian/libupsclient1.symbols | 1 + .../patches/0003-libupsclient-version.patch | 20 +++++++++++++++++++ debian/patches/series | 1 + debian/rules | 3 --- 6 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 debian/patches/0003-libupsclient-version.patch diff --git a/debian/changelog b/debian/changelog index 8ea2bc5..83671bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.6.2-1) UNRELEASED; urgency=low +nut (2.6.2-1) unstable; urgency=low * New upstream release (Closes: #594989) * debian/control: @@ -9,6 +9,10 @@ nut (2.6.2-1) UNRELEASED; urgency=low * debian/nut-server.init: - add udev as Required-Start/Stop (Closes: #642412) - remove legacy support for /etc/default/nut (Closes: #638021) + * debian/patches/0003-libupsclient-version.patch: added to fix the missing + libupsclient version info bump + * debian/libupsclient1-dev.links: update link name + * debian/libupsclient1.symbols: add with upscli_tryconnect * debian/nut.TODO.Debian: update and complete the TODO list -- Arnaud Quette Thu, 29 Sep 2011 18:39:16 +0200 diff --git a/debian/libupsclient1-dev.links b/debian/libupsclient1-dev.links index 107c217..0ac64c7 100644 --- a/debian/libupsclient1-dev.links +++ b/debian/libupsclient1-dev.links @@ -1 +1 @@ -/lib/libupsclient.so.1.0.0 /usr/lib/libupsclient.so +/lib/libupsclient.so.1.1.0 /usr/lib/libupsclient.so diff --git a/debian/libupsclient1.symbols b/debian/libupsclient1.symbols index f9cd39a..85e4066 100644 --- a/debian/libupsclient1.symbols +++ b/debian/libupsclient1.symbols @@ -22,3 +22,4 @@ libupsclient.so.1 libupsclient1 #MINVER# upscli_sslcert@Base 2.4.1 upscli_strerror@Base 2.4.1 upscli_upserror@Base 2.4.1 + upscli_tryconnect@Base 2.6.2 diff --git a/debian/patches/0003-libupsclient-version.patch b/debian/patches/0003-libupsclient-version.patch new file mode 100644 index 0000000..4b02835 --- /dev/null +++ b/debian/patches/0003-libupsclient-version.patch @@ -0,0 +1,20 @@ +--- a/clients/Makefile.am ++++ b/clients/Makefile.am +@@ -50,4 +50,4 @@ + if WITH_SSL + libupsclient_la_LIBADD += $(LIBSSL_LIBS) + endif +-libupsclient_la_LDFLAGS = -version-info 1:0:0 ++libupsclient_la_LDFLAGS = -version-info 2:0:1 +diff -ru nut-2.6.2.orig/clients/Makefile.in nut-2.6.2/clients/Makefile.in +--- a/clients/Makefile.in ++++ b/clients/Makefile.in +@@ -384,7 +384,7 @@ + # not LDADD. + libupsclient_la_SOURCES = upsclient.c upsclient.h + libupsclient_la_LIBADD = ../common/libparseconf.la $(am__append_4) +-libupsclient_la_LDFLAGS = -version-info 1:0:0 ++libupsclient_la_LDFLAGS = -version-info 2:0:1 + all: all-am + + .SUFFIXES: diff --git a/debian/patches/series b/debian/patches/series index 9e8eaf1..6ea723f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-fix_spelling_and_typo.patch 0002-nut-monitor-paths.patch +0003-libupsclient-version.patch diff --git a/debian/rules b/debian/rules index 8fa38f7..871ffb1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,5 @@ #!/usr/bin/make -f -DEB_AUTO_UPDATE_ACLOCAL := 1.11 -DEB_AUTO_UPDATE_LIBTOOL := pre -include /usr/share/cdbs/1/rules/autoreconf.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/class/python-module.mk From 968d86eb0288513a6b39e3ee22de399b21f10296 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 3 Nov 2011 21:49:45 -0400 Subject: [PATCH 065/300] add richcomm_usb --- debian/changelog | 6 ++++++ debian/nut-server.install | 1 + debian/nut-server.manpages | 1 + 3 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 83671bf..96a7139 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nut (2.6.2-2) UNRELEASED; urgency=low + + * debian/nut-server.{install,manpages}: add richcomm_usb + + -- Arnaud Quette Thu, 03 Nov 2011 21:34:14 -0400 + nut (2.6.2-1) unstable; urgency=low * New upstream release (Closes: #594989) diff --git a/debian/nut-server.install b/debian/nut-server.install index 3c0c086..ec6965f 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -45,3 +45,4 @@ debian/tmp/lib/nut/optiups debian/tmp/lib/nut/upsdrvctl /sbin debian/tmp/lib/nut/everups debian/tmp/lib/nut/dummy-ups +debian/tmp/lib/nut/richcomm_usb diff --git a/debian/nut-server.manpages b/debian/nut-server.manpages index b23eea8..7b82e84 100644 --- a/debian/nut-server.manpages +++ b/debian/nut-server.manpages @@ -29,6 +29,7 @@ debian/tmp/usr/share/man/man8/optiups.8 debian/tmp/usr/share/man/man8/powercom.8 debian/tmp/usr/share/man/man8/powerpanel.8 debian/tmp/usr/share/man/man8/rhino.8 +debian/tmp/usr/share/man/man8/richcomm_usb.8 debian/tmp/usr/share/man/man8/safenet.8 debian/tmp/usr/share/man/man8/solis.8 debian/tmp/usr/share/man/man8/tripplite.8 From 39af1601d0eedf7ca7b63ba7a2efa5a31e720737 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Fri, 2 Dec 2011 20:40:30 +0100 Subject: [PATCH 066/300] Install Avahi service file --- debian/changelog | 1 + debian/nut-server.install | 1 + debian/rules | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 96a7139..1c30aee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ nut (2.6.2-2) UNRELEASED; urgency=low * debian/nut-server.{install,manpages}: add richcomm_usb + * debian/nut-server.install, debian/rules: install Avahi service file -- Arnaud Quette Thu, 03 Nov 2011 21:34:14 -0400 diff --git a/debian/nut-server.install b/debian/nut-server.install index ec6965f..be2e16c 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -2,6 +2,7 @@ debian/tmp/sbin/upsd debian/tmp/usr/share/nut/cmdvartab debian/tmp/usr/share/nut/driver.list debian/tmp/*/udev/ +debian/tmp/etc/avahi/services/nut.service debian/tmp/etc/nut/ups.conf debian/tmp/etc/nut/upsd.conf debian/tmp/etc/nut/upsd.users diff --git a/debian/rules b/debian/rules index 871ffb1..5d6983d 100755 --- a/debian/rules +++ b/debian/rules @@ -43,6 +43,11 @@ common-install-arch:: cp $(CURDIR)/scripts/misc/nut.bash_completion \ $(CURDIR)/debian/tmp/etc/bash_completion.d/nut + # install the avahi service file + mkdir -p $(CURDIR)/debian/tmp/etc/avahi/services + cp $(CURDIR)/scripts/avahi/nut.service \ + $(CURDIR)/debian/tmp/etc/avahi/services + # install the default configuration for f in $(CURDIR)/debian/tmp/etc/nut/*; do \ nf=`basename $${f} | sed 's/\(.*\).sample/\1/'`; \ From bd91941eb2d4def0591e694e44f675b633bdf501 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Fri, 2 Dec 2011 21:02:54 +0100 Subject: [PATCH 067/300] Install Augeas lenses --- debian/changelog | 1 + debian/nut-client.install | 9 +++++++++ debian/rules | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1c30aee..8a7777e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ nut (2.6.2-2) UNRELEASED; urgency=low * debian/nut-server.{install,manpages}: add richcomm_usb * debian/nut-server.install, debian/rules: install Avahi service file + * debian/rules, nut-client.install: install Augeas lenses -- Arnaud Quette Thu, 03 Nov 2011 21:34:14 -0400 diff --git a/debian/nut-client.install b/debian/nut-client.install index d15acda..cde4bd7 100644 --- a/debian/nut-client.install +++ b/debian/nut-client.install @@ -8,3 +8,12 @@ debian/tmp/etc/bash_completion.d/nut debian/tmp/etc/nut/nut.conf debian/tmp/etc/nut/upsmon.conf debian/tmp/etc/nut/upssched.conf +debian/tmp/usr/share/augeas/lenses/dist/nuthostsconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutnutconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsdconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsdusers.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsmonconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsschedconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupssetconf.aug +debian/tmp/usr/share/augeas/lenses/dist/tests/test_nut.aug diff --git a/debian/rules b/debian/rules index 5d6983d..9af3f0b 100755 --- a/debian/rules +++ b/debian/rules @@ -48,6 +48,13 @@ common-install-arch:: cp $(CURDIR)/scripts/avahi/nut.service \ $(CURDIR)/debian/tmp/etc/avahi/services + # install Augeas lenses + mkdir -p $(CURDIR)/debian/tmp/usr/share/augeas/lenses/dist/tests + cp $(CURDIR)/scripts/augeas/*.aug \ + $(CURDIR)/debian/tmp/usr/share/augeas/lenses/dist/ + cp $(CURDIR)/scripts/augeas/tests/test_nut.aug \ + $(CURDIR)/debian/tmp/usr/share/augeas/lenses/dist/tests/ + # install the default configuration for f in $(CURDIR)/debian/tmp/etc/nut/*; do \ nf=`basename $${f} | sed 's/\(.*\).sample/\1/'`; \ From 0d4527e4ffa178649c5d083d28baf3ab791c2d2e Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 5 Jan 2012 17:00:59 +0100 Subject: [PATCH 068/300] Clarify udev explanation (Closes: #529664) --- debian/changelog | 1 + debian/nut-server.README.Debian | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8a7777e..1e5b064 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ nut (2.6.2-2) UNRELEASED; urgency=low * debian/nut-server.{install,manpages}: add richcomm_usb * debian/nut-server.install, debian/rules: install Avahi service file * debian/rules, nut-client.install: install Augeas lenses + * debian/nut-server.README.Debian: clarify udev explanation (Closes: #529664) -- Arnaud Quette Thu, 03 Nov 2011 21:34:14 -0400 diff --git a/debian/nut-server.README.Debian b/debian/nut-server.README.Debian index 975b389..ed4446c 100644 --- a/debian/nut-server.README.Debian +++ b/debian/nut-server.README.Debian @@ -70,15 +70,17 @@ MODE. If you are running in "netclient" MODE, jump directly to section 6. This is not done by default for security reason on Debian, but is applied on Ubuntu. - b) Another solution, for system supporting udev, is to create a file - (for example /etc/udev/rules.d/92-nut-serialups.rules), placed - after 91-permissions.rules and to add something like: + b) Another solution, for system supporting udev, is to create a file, + For example /etc/udev/rules.d/92-nut-serialups.rules. It will + be used after /lib/udev/rules.d/91-permissions.rules, and + contains something like: + KERNEL=="ttyS1", GROUP="nut" where 'ttyS1' has to be replaced by the exact name of your serial port. For USB devices, permissions are automatically set by the - 52-nut-usbups.rules udev rules file. + /lib/udev/rules.d/52-nut-usbups.rules udev rules file. (4) /etc/nut/upsd.conf (see 'man 5 upsd.conf' for more information) the default /etc/nut/upsd.conf is fine for a "standalone" configuration. From fad6ced6f69c7ab5d7dd479dc7dff176af605882 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Tue, 24 Jan 2012 11:22:33 +0100 Subject: [PATCH 069/300] Imported Upstream version 2.6.3 --- ChangeLog | 453 ++ Makefile.am | 11 +- Makefile.in | 24 +- NEWS | 51 + UPGRADING | 5 + aclocal.m4 | 15 +- clients/Makefile.am | 2 +- clients/Makefile.in | 10 +- clients/upsclient.c | 3 +- common/Makefile.am | 2 +- common/Makefile.in | 8 +- compile | 21 +- conf/Makefile.in | 8 +- conf/upsd.conf.sample | 9 +- config.guess | 219 +- config.sub | 156 +- configure | 3643 ++++++++++----- configure.in | 100 +- data/Makefile.in | 8 +- data/driver.list.in | 15 +- data/html/Makefile.in | 8 +- docs/FAQ.txt | 13 + docs/Makefile.am | 23 +- docs/Makefile.in | 30 +- docs/cables.txt | 7 + docs/config-notes.txt | 11 +- docs/configure.txt | 5 + docs/developer-guide.txt | 57 +- docs/download.txt | 29 +- docs/images/nut-logo.png | Bin 0 -> 6406 bytes docs/macros.txt | 5 +- docs/man/Makefile.am | 10 +- docs/man/Makefile.in | 18 +- docs/man/apcsmart-old.8 | 4 +- docs/man/apcsmart.8 | 22 +- docs/man/apcsmart.txt | 5 +- docs/man/bcmxcp.8 | 6 +- docs/man/bcmxcp.txt | 2 +- docs/man/bcmxcp_usb.8 | 4 +- docs/man/belkin.8 | 4 +- docs/man/belkinunv.8 | 4 +- docs/man/bestfcom.8 | 4 +- docs/man/bestfortress.8 | 4 +- docs/man/bestuferrups.8 | 4 +- docs/man/bestups.8 | 4 +- docs/man/blazer.8 | 15 +- docs/man/blazer.txt | 21 +- docs/man/clone.8 | 4 +- docs/man/dummy-ups.8 | 14 +- docs/man/dummy-ups.txt | 6 +- docs/man/etapro.8 | 4 +- docs/man/everups.8 | 4 +- docs/man/gamatronic.8 | 4 +- docs/man/genericups.8 | 4 +- docs/man/hosts.conf.5 | 4 +- docs/man/isbmex.8 | 4 +- docs/man/ivtscd.8 | 4 +- docs/man/libupsclient-config.1 | 4 +- docs/man/liebert-esp2.8 | 4 +- docs/man/liebert.8 | 4 +- docs/man/masterguard.8 | 4 +- docs/man/metasys.8 | 4 +- docs/man/mge-shut.8 | 4 +- docs/man/mge-utalk.8 | 4 +- docs/man/microdowell.8 | 4 +- docs/man/netxml-ups.8 | 4 +- docs/man/nut-ipmipsu.8 | 4 +- docs/man/nut-scanner.8 | 62 +- docs/man/nut-scanner.txt | 56 +- docs/man/nut.conf.5 | 4 +- docs/man/nutscan.3 | 165 + docs/man/nutscan.txt | 59 + docs/man/nutscan_add_device_to_device.3 | 4 +- docs/man/nutscan_add_option_to_device.3 | 4 +- docs/man/nutscan_cidr_to_ip.3 | 4 +- docs/man/nutscan_display_parsable.3 | 4 +- docs/man/nutscan_display_ups_conf.3 | 4 +- docs/man/nutscan_free_device.3 | 4 +- docs/man/nutscan_init.3 | 65 + docs/man/nutscan_init.txt | 40 + docs/man/nutscan_new_device.3 | 4 +- docs/man/nutscan_scan_avahi.3 | 8 +- docs/man/nutscan_scan_avahi.txt | 3 + docs/man/nutscan_scan_ipmi.3 | 8 +- docs/man/nutscan_scan_ipmi.txt | 3 + docs/man/nutscan_scan_nut.3 | 8 +- docs/man/nutscan_scan_nut.txt | 3 + docs/man/nutscan_scan_snmp.3 | 8 +- docs/man/nutscan_scan_snmp.txt | 3 + docs/man/nutscan_scan_usb.3 | 8 +- docs/man/nutscan_scan_usb.txt | 3 + docs/man/nutscan_scan_xml_http.3 | 8 +- docs/man/nutscan_scan_xml_http.txt | 3 + docs/man/nutupsdrv.8 | 11 +- docs/man/nutupsdrv.txt | 5 + docs/man/oneac.8 | 4 +- docs/man/optiups.8 | 4 +- docs/man/powercom.8 | 4 +- docs/man/powerman-pdu.8 | 4 +- docs/man/powerpanel.8 | 4 +- docs/man/rhino.8 | 4 +- docs/man/richcomm_usb.8 | 4 +- docs/man/safenet.8 | 4 +- docs/man/snmp-ups.8 | 9 +- docs/man/snmp-ups.txt | 3 + docs/man/solis.8 | 4 +- docs/man/tripplite.8 | 4 +- docs/man/tripplite_usb.8 | 4 +- docs/man/tripplitesu.8 | 4 +- docs/man/ups.conf.5 | 4 +- docs/man/upsc.8 | 4 +- docs/man/upscli_connect.3 | 4 +- docs/man/upscli_disconnect.3 | 4 +- docs/man/upscli_fd.3 | 4 +- docs/man/upscli_get.3 | 4 +- docs/man/upscli_list_next.3 | 4 +- docs/man/upscli_list_start.3 | 4 +- docs/man/upscli_readline.3 | 4 +- docs/man/upscli_sendline.3 | 4 +- docs/man/upscli_splitaddr.3 | 4 +- docs/man/upscli_splitname.3 | 4 +- docs/man/upscli_ssl.3 | 4 +- docs/man/upscli_strerror.3 | 4 +- docs/man/upscli_upserror.3 | 4 +- docs/man/upsclient.3 | 4 +- docs/man/upscmd.8 | 4 +- docs/man/upscode2.8 | 4 +- docs/man/upsd.8 | 4 +- docs/man/upsd.conf.5 | 4 +- docs/man/upsd.users.5 | 4 +- docs/man/upsdrvctl.8 | 4 +- docs/man/upsimage.cgi.8 | 4 +- docs/man/upslog.8 | 4 +- docs/man/upsmon.8 | 4 +- docs/man/upsmon.conf.5 | 4 +- docs/man/upsrw.8 | 4 +- docs/man/upssched.8 | 4 +- docs/man/upssched.conf.5 | 4 +- docs/man/upsset.cgi.8 | 4 +- docs/man/upsset.conf.5 | 4 +- docs/man/upsstats.cgi.8 | 4 +- docs/man/upsstats.html.5 | 4 +- docs/man/usbhid-ups.8 | 4 +- docs/man/victronups.8 | 4 +- docs/new-clients.txt | 18 +- docs/support.txt | 8 +- docs/website/Makefile.am | 5 +- docs/website/Makefile.in | 12 +- docs/website/css/web-layout.css | 5 + docs/website/faviconut.ico | Bin 1150 -> 1150 bytes docs/website/faviconut.png | Bin 814 -> 988 bytes docs/website/news.txt | 2 + docs/website/projects.txt | 4 + docs/website/web-layout.conf | 5 +- drivers/Makefile.am | 8 +- drivers/Makefile.in | 21 +- drivers/apcsmart.c | 2 - drivers/bcmxcp_usb.c | 151 +- drivers/belkinunv.c | 18 +- drivers/blazer_usb.c | 81 +- drivers/cyberpower-mib.c | 81 + drivers/cyberpower-mib.h | 9 + drivers/dummy-ups.c | 9 + drivers/eaton-mib.c | 31 +- drivers/etapro.c | 2 - drivers/gamatronic.c | 4 +- drivers/isbmex.c | 4 +- drivers/libshut.c | 7 +- drivers/metasys.c | 9 +- drivers/mge-mib.c | 1 + drivers/mge-shut.c | 3 - drivers/microdowell.c | 25 +- drivers/nut-ipmi.h | 8 +- drivers/nut-libfreeipmi.c | 26 +- drivers/powercom-hid.c | 4 +- drivers/rhino.c | 84 +- drivers/snmp-ups.c | 23 +- drivers/solis.c | 6 +- drivers/usb-common.h | 5 +- include/Makefile.am | 12 +- include/Makefile.in | 20 +- include/config.h.in | 52 +- include/nut_version.h | 2 +- lib/Makefile.am | 2 +- lib/Makefile.in | 17 +- lib/README | 211 +- lib/libnutscan.pc.in | 10 + ltmain.sh | 3977 +++++++++++------ m4/libtool.m4 | 2028 +++++---- m4/ltoptions.m4 | 13 +- m4/ltversion.m4 | 12 +- m4/lt~obsolete.m4 | 12 +- m4/nut_check_libfreeipmi.m4 | 14 +- m4/nut_check_libltdl.m4 | 27 + m4/nut_check_libwrap.m4 | 2 +- m4/nut_report_feature.m4 | 15 +- scripts/HP-UX/nut.psf.in | 371 ++ scripts/Makefile.in | 8 +- scripts/augeas/Makefile.in | 8 +- scripts/augeas/nutupsconf.aug.in | 1 + scripts/hal/Makefile.in | 8 +- scripts/hal/ups-nut-device.fdi.in | 25 + scripts/hotplug/Makefile.in | 8 +- scripts/hotplug/libhid.usermap | 6 + scripts/java/Makefile.in | 8 +- scripts/java/README | 5 + scripts/java/jNut/README | 6 + scripts/java/jNut/pom.xml | 2 +- .../org/networkupstools/jnut/ClientTest.java | 18 + scripts/python/Makefile.in | 8 +- scripts/systemd/Makefile.in | 8 +- scripts/udev/Makefile.in | 8 +- scripts/udev/nut-usbups.rules.in | 6 + scripts/upower/95-upower-hid.rules | 1 + server/Makefile.am | 2 +- server/Makefile.in | 10 +- server/netcmds.h | 4 +- server/netget.c | 16 +- server/netget.h | 2 +- server/netinstcmd.c | 4 +- server/netinstcmd.h | 2 +- server/netlist.c | 14 +- server/netlist.h | 2 +- server/netmisc.c | 6 +- server/netmisc.h | 6 +- server/netset.c | 4 +- server/netset.h | 2 +- server/netuser.c | 10 +- server/netuser.h | 10 +- server/{ctype.h => nut_ctype.h} | 17 +- server/ssl.c | 18 +- server/ssl.h | 10 +- server/upsd.c | 43 +- server/upsd.h | 8 +- tools/Makefile.am | 18 +- tools/Makefile.in | 27 +- tools/nut-hclinfo.py | 13 +- tools/nut-scanner/Makefile.am | 35 +- tools/nut-scanner/Makefile.in | 137 +- tools/nut-scanner/README | 114 + tools/nut-scanner/nut-scan.h | 13 +- tools/nut-scanner/nut-scanner.c | 293 +- tools/nut-scanner/nutscan-init.c | 52 + tools/nut-scanner/nutscan-init.h | 30 + tools/nut-scanner/nutscan-ip.c | 167 +- tools/nut-scanner/nutscan-ip.h | 3 +- tools/nut-scanner/nutscan-snmp.h | 1 + tools/nut-scanner/nutscan-usb.h | 3 + tools/nut-scanner/scan_avahi.c | 232 +- tools/nut-scanner/scan_ipmi.c | 318 +- tools/nut-scanner/scan_nut.c | 5 +- tools/nut-scanner/scan_snmp.c | 283 +- tools/nut-scanner/scan_usb.c | 124 +- tools/nut-scanner/scan_xml_http.c | 101 +- tools/nut-snmpinfo.py | 4 +- 255 files changed, 11081 insertions(+), 4629 deletions(-) create mode 100644 docs/images/nut-logo.png create mode 100644 docs/man/nutscan.3 create mode 100644 docs/man/nutscan.txt create mode 100644 docs/man/nutscan_init.3 create mode 100644 docs/man/nutscan_init.txt create mode 100644 drivers/cyberpower-mib.c create mode 100644 drivers/cyberpower-mib.h create mode 100644 lib/libnutscan.pc.in create mode 100644 m4/nut_check_libltdl.m4 create mode 100644 scripts/HP-UX/nut.psf.in rename server/{ctype.h => nut_ctype.h} (80%) create mode 100644 tools/nut-scanner/README create mode 100644 tools/nut-scanner/nutscan-init.c create mode 100644 tools/nut-scanner/nutscan-init.h diff --git a/ChangeLog b/ChangeLog index 0e1be23..ceb1271 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,458 @@ +2012-01-04 Arnaud Quette + + * [r3371] docs/website/news.txt: Update 2.6.3 release date + +2012-01-03 Arnaud Quette + + * [r3370] NEWS, UPGRADING, configure.in, docs/website/news.txt: + Final update for 2.6.3 release + +2012-01-03 Frederic Bohe + + * [r3369] docs/config-notes.txt: Add a note about file names with + space characters in the documentation. + +2012-01-03 Arnaud Quette + + * [r3368] drivers/dummy-ups.c: Add a comment for further processing + +2012-01-03 Frederic Bohe + + * [r3367] tools/nut-scanner/nut-scanner.c: Fix nut scanner SNMP v3 + help message. + * [r3366] docs/man/nut-scanner.txt: Fix nut scanner SNMP v3 + documentation. + +2011-12-17 Arnaud Quette + + * [r3364] drivers/blazer_usb.c: Actually apply the langid_fix + value, when calling usb_get_string (reported by Charles Lepple) + * [r3363] data/driver.list.in, docs/man/blazer.txt, + drivers/blazer_usb.c: Try to fix language ID support for USB + units from LDLC, Dynamix and no names in blazer_usb (reworked + patch, from Brian R. Smith and Aurélien Grenotton) + +2011-12-16 Arnaud Quette + + * [r3362] scripts/HP-UX: Add the generated HP-UX packaging script + (.psf) to the list of Subversion ignored files + * [r3361] drivers/eaton-mib.c, drivers/snmp-ups.c: Fix newer Eaton + ePDU OIDs declaration ordering, so that it better supports the + various models (switched or advanced monitored) + +2011-12-15 Arnaud Quette + + * [r3360] clients/upsclient.c, drivers/belkinunv.c, + drivers/etapro.c, drivers/gamatronic.c, drivers/isbmex.c, + drivers/libshut.c, drivers/metasys.c, drivers/mge-shut.c, + drivers/microdowell.c, drivers/nut-libfreeipmi.c, + drivers/rhino.c, drivers/solis.c: Fix set but not used variables + [-Wunused-but-set-variable] (including patch from Regid Ichira) + +2011-12-13 Arnaud Quette + + * [r3359] Makefile.am, configure.in, docs/man, + docs/man/Makefile.am, docs/man/nutscan_init.txt, + docs/man/nutscan_scan_avahi.txt, docs/man/nutscan_scan_ipmi.txt, + docs/man/nutscan_scan_nut.txt, docs/man/nutscan_scan_snmp.txt, + docs/man/nutscan_scan_usb.txt, + docs/man/nutscan_scan_xml_http.txt, drivers/nut-libfreeipmi.c, + m4/nut_check_libfreeipmi.m4, m4/nut_check_libltdl.m4, + tools/nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, + tools/nut-scanner/nut-scanner.c, + tools/nut-scanner/nutscan-init.c, + tools/nut-scanner/nutscan-init.h, tools/nut-scanner/scan_avahi.c, + tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, + tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, + tools/nut-scanner/scan_xml_http.c: Merge nut-scanner_dlopen + branch, at revision 3358. This brings weak runtime dependencies + to nut-scanner, allowing to compile with all options and to run + according to the available dependencies. It also adds IPMI scan + * [r3358] compile: Update compile script, as per the latest version + available in Automake (1.11) + +2011-12-05 Arnaud Quette + + * [r3341] data/driver.list.in, docs/man/snmp-ups.txt, + drivers/Makefile.am, drivers/cyberpower-mib.c, + drivers/cyberpower-mib.h, drivers/snmp-ups.c: Add Cyber Power + Systems with SNMP RMCARD (100, 201, 202 and 301) to the list of + snmp-ups supported models (patch from Eric Schultz) + * [r3340] drivers/snmp-ups.c: Remove the Eaton Marlin hook, for + base outlet index, since it has been fixed by a new firmware + revision + +2011-11-29 Arnaud Quette + + * [r3338] tools/nut-snmpinfo.py: Fix indentation and use open() + instead of file(), to better support Python 3 (Alioth bug + #313446, patch from Bohdan Popovych) + +2011-11-25 Arnaud Quette + + * [r3335] drivers/nut-ipmi.h: Fix wrong prototype declaration, that + was causing a compilation warning (implicit declaration of + function ‘nut_ipmi_get_sensors_status’) + +2011-11-24 Prachi Gandhi + + * [r3328] Makefile.am, configure.in, scripts/Makefile.am, + scripts/Solaris: Reverted changes made for Solaris packaging + files(revision 3326), added files in NUT_packaging branch + * [r3326] Makefile.am, configure.in, scripts/Makefile.am, + scripts/Solaris, scripts/Solaris/Makefile.am, + scripts/Solaris/makelocal.sh, scripts/Solaris/pkginfo.in, + scripts/Solaris/prototype: Solaris NUT package files added + +2011-11-15 Arnaud Quette + + * [r3321] drivers/blazer_usb.c, drivers/usb-common.h: Revert commit + r2993 and r2994. This enables again inclusion of buggy USB Device + and Vendor IDs, supported by blazer_usb, in udev rules file + (Reported by Stanislav Brabec, from Suse) + * [r3320] tools/Makefile.am: Add missing comment + +2011-11-12 Arnaud Quette + + * [r3318] drivers/mge-mib.c: Add upsmgBatteryLowCondition OID to + the status mapping (reported by Kiss Gabor (Bitman)) + +2011-11-11 Praveen Kumar + + * [r3317] scripts/HP-UX/makedepot.sh: script file to create package + (depot) for HP-UX + +2011-11-08 Arnaud Quette + + * [r3316] docs/website/web-layout.conf: Complete search keywords + * [r3315] docs/website/web-layout.conf: Final fix for the + displaying of the legend, to work on all browsers, while still + being conforming to W3C validation + +2011-11-07 Arnaud Quette + + * [r3314] docs/website/web-layout.conf: Fix displaying of the + legend + +2011-11-05 Michal Soltys + + * [r3313] docs/cables.txt, docs/man/apcsmart.txt: apcsmart.txt: + minor documentation update + + Broken diagram link and 940-0024E cable mention (reported by + Jonathan + Laventhol). + +2011-11-05 Arnaud Quette + + * [r3312] conf/upsd.conf.sample, server/upsd.c: Don't fail to start + if at least one of the listening interface is available. This is + needed on systems where either IPv4 or IPv6 is disabled, and no + explicit LISTEN directive has been specified (Reported by Pavel + Zubkou, Debian bug #598741) + +2011-11-02 Praveen Kumar + + * [r3310] configure.in, scripts/HP-UX/nut.psf.in: Adding packaging + script for HPUX + +2011-10-31 Arnaud Quette + + * [r3308] docs/download.txt, docs/website/news.txt: Publish update + jNut 0.2, along with the new jNutWebAPI (contributed by Emilien + Kia, from Eaton) + +2011-10-28 Emilien Kia + + * [r3306] scripts/java/README, scripts/java/jNutWebAPI, + scripts/java/jNutWebAPI/README, scripts/java/jNutWebAPI/pom.xml, + scripts/java/jNutWebAPI/src, scripts/java/jNutWebAPI/src/main, + scripts/java/jNutWebAPI/src/main/java, + scripts/java/jNutWebAPI/src/main/java/org, + scripts/java/jNutWebAPI/src/main/java/org/networkupstools, + scripts/java/jNutWebAPI/src/main/java/org/networkupstools/jnutwebapi, + scripts/java/jNutWebAPI/src/main/java/org/networkupstools/jnutwebapi/NutRestProvider.java, + scripts/java/jNutWebAPI/src/main/java/org/networkupstools/jnutwebapi/RestWSApplication.java, + scripts/java/jNutWebAPI/src/main/java/org/networkupstools/jnutwebapi/ScannerProvider.java, + scripts/java/jNutWebAPI/src/main/resources, + scripts/java/jNutWebAPI/src/main/webapp, + scripts/java/jNutWebAPI/src/main/webapp/WEB-INF, + scripts/java/jNutWebAPI/src/main/webapp/WEB-INF/web.xml, + scripts/java/jNutWebAPI/src/test, + scripts/java/jNutWebAPI/src/test/java, + scripts/java/jNutWebAPI/src/test/java/org, + scripts/java/jNutWebAPI/src/test/java/org/networkupstools, + scripts/java/jNutWebAPI/src/test/java/org/networkupstools/jnutwebapi: + Initial commit of jNutWebAPI. + * [r3305] scripts/java/jNut, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Scanner.java: + Fix a little bug with function namming (get instead of set). + +2011-10-27 Arnaud Quette + + * [r3304] docs/maintainer-guide.txt: Create a basic NUT maintainer + guide, to start tracking and improving maintenance workflow + * [r3303] drivers/bcmxcp_usb.c: Handle disconnection issues and + reconnection mechanism (bug reported by Rich Wrenn) + +2011-10-25 Emilien Kia + + * [r3302] + scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java: + Add licence information. + * [r3301] scripts/java/jNut/README, scripts/java/jNut/pom.xml, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Scanner.java, + scripts/java/jNut/src/test/java/org/networkupstools/jnut/ScannerTest.java: + Add nut-scanner. + +2011-10-25 Frederic Bohe + + * [r3300] tools/nut-scanner/scan_snmp.c: Add sanity checks + * [r3299] tools/nut-scanner/scan_avahi.c: Remove unused variable + +2011-10-25 Michal Soltys + + * [r3298] drivers/apcsmart.c: drivers/apcsmart.c: minor correction + + Assigning 0 directly was wrong (actually, a leftover from earlier + version of the code that was removed) - ser_set_speed() prepares + the + port initially, we only adjust certain options. + +2011-10-24 Frederic Bohe + + * [r3297] docs/man/nut-scanner.txt, + tools/nut-scanner/nut-scanner.c: Forgot to document "-q" option + (thanks to Emilien Kia for reporting this) + +2011-10-21 Frederic Bohe + + * [r3296] tools/nut-scanner/nut-scanner.c: Trivial layout + consistency + * [r3295] docs/man/nut-scanner.txt: Update man page with -V and -a + option + * [r3294] tools/nut-scanner/nut-scanner.c: Add an option to display + available bus (usefull for wrapper). + * [r3293] tools/nut-scanner/nut-scanner.c: return -1 on bad command + line option + +2011-10-19 Frederic Bohe + + * [r3292] tools/nut-scanner/nutscan-ip.c: Fix crash on 32bits + systems + * [r3291] tools/nut-scanner/nut-scanner.c: Add a switch to display + NUT version. + +2011-10-19 Charles Lepple + + * [r3290] docs/FAQ.txt: Add FAQ entry for LISTEN directive + +2011-10-18 Arnaud Quette + + * [r3289] drivers/eaton-mib.c: Fix outlets reported current, which + were off by 100 in aphel_genesisII MIB, and bump MIB version to + 0.46 (patch from Sven Nilsson) + +2011-10-14 Arnaud Quette + + * [r3288] docs/Makefile.am, docs/images/nut-logo.png, + docs/images/nut.svg, docs/website/Makefile.am, + docs/website/css/web-layout.css, docs/website/faviconut.ico, + docs/website/faviconut.png, docs/website/web-layout.conf: Add the + new NUT logo (contributed by Luc Descotils, from Eaton) + * [r3287] docs/website/web-layout.conf: Fix another W3C validator + error (there is no attribute "language" anymore for - + endif::hcl[] + + battery + battery + hald-addon-blazer_usb + ups + + @@ -506,6 +515,13 @@ + + + battery + battery + hald-addon-usbhid-ups + ups + battery @@ -571,6 +587,15 @@ ups + + + + battery + battery + hald-addon-blazer_usb + ups + + diff --git a/scripts/hotplug/Makefile.in b/scripts/hotplug/Makefile.in index 9bbde22..62bc680 100644 --- a/scripts/hotplug/Makefile.in +++ b/scripts/hotplug/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.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_libpowerman.m4 \ @@ -117,6 +118,7 @@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ @@ -149,6 +151,8 @@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ +LIBLTDL_LIBS = @LIBLTDL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -169,6 +173,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ @@ -200,12 +205,14 @@ SHELL = @SHELL@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ +TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -241,7 +248,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff --git a/scripts/hotplug/libhid.usermap b/scripts/hotplug/libhid.usermap index 4eba6e3..53c1519 100644 --- a/scripts/hotplug/libhid.usermap +++ b/scripts/hotplug/libhid.usermap @@ -4,6 +4,8 @@ # libhidups 0x0003 0xVVVV 0xPPPP 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # # usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info +# Krauler UP-M500VA +libhidups 0x0003 0x0001 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Hewlett Packard # T500 @@ -156,6 +158,8 @@ libhidups 0x0003 0x09ae 0x4007 0x0000 0x0000 0x00 libhidups 0x0003 0x09ae 0x4008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PowerCOM +# PowerCOM BNT-xxxAP +libhidups 0x0003 0x0d9f 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PowerCOM IMP - IMPERIAL Series libhidups 0x0003 0x0d9f 0x00a2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PowerCOM SKP - Smart KING Pro (all Smart series) @@ -174,3 +178,5 @@ libhidups 0x0003 0x0f03 0x0001 0x0000 0x0000 0x00 libhidups 0x0003 0x10af 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # GE EP series libhidups 0x0003 0x14f0 0x00c9 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Ablerex 625L USB +libhidups 0x0003 0xffff 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 diff --git a/scripts/java/Makefile.in b/scripts/java/Makefile.in index 8e5a589..a10e01e 100644 --- a/scripts/java/Makefile.in +++ b/scripts/java/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.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_libpowerman.m4 \ @@ -89,6 +90,7 @@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ @@ -121,6 +123,8 @@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ +LIBLTDL_LIBS = @LIBLTDL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -141,6 +145,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ @@ -172,12 +177,14 @@ SHELL = @SHELL@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ +TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -213,7 +220,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff --git a/scripts/java/README b/scripts/java/README index 95d1bee..6996f1d 100644 --- a/scripts/java/README +++ b/scripts/java/README @@ -12,3 +12,8 @@ way, without having to know the NUT protocol. * "jNutList": this directory contains maven project and source files for jNutList, a simple Java example program using jNut which connect to an UPSD, lists its ups and their variables and commands. + +* "jNutWebAPI": this directory contains maven project and source files for +jNutWebAPI, a simple Java web archive to access nut informations via REST +web services. + diff --git a/scripts/java/jNut/README b/scripts/java/jNut/README index 3c75e24..b68eef2 100644 --- a/scripts/java/jNut/README +++ b/scripts/java/jNut/README @@ -69,3 +69,9 @@ ping-pong mecanism itself. At present time, jNut do not support SSL connection. It is planned for near future. + +Changelog +^^^^^^^^^ +* "0.2": Add nut-scanner. +* "0.1": Initial version with basic dialog with UPSD. + diff --git a/scripts/java/jNut/pom.xml b/scripts/java/jNut/pom.xml index a2c0e5c..b53b426 100644 --- a/scripts/java/jNut/pom.xml +++ b/scripts/java/jNut/pom.xml @@ -4,7 +4,7 @@ org.networkupstools jNut - 0.1-SNAPSHOT + 0.2-SNAPSHOT jar jNut diff --git a/scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java b/scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java index 73f6296..e3bce72 100644 --- a/scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java +++ b/scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java @@ -1,3 +1,21 @@ +/* ClientTest.java + + Copyright (C) 2011 Eaton + + 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 +*/ package org.networkupstools.jnut; import junit.framework.Test; diff --git a/scripts/python/Makefile.in b/scripts/python/Makefile.in index 7f07265..4f89ab1 100644 --- a/scripts/python/Makefile.in +++ b/scripts/python/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.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_libpowerman.m4 \ @@ -89,6 +90,7 @@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ @@ -121,6 +123,8 @@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ +LIBLTDL_LIBS = @LIBLTDL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -141,6 +145,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ @@ -172,12 +177,14 @@ SHELL = @SHELL@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ +TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -213,7 +220,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff --git a/scripts/systemd/Makefile.in b/scripts/systemd/Makefile.in index 9f9f633..28dc04a 100644 --- a/scripts/systemd/Makefile.in +++ b/scripts/systemd/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.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_libpowerman.m4 \ @@ -117,6 +118,7 @@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ @@ -149,6 +151,8 @@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ +LIBLTDL_LIBS = @LIBLTDL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -169,6 +173,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ @@ -200,12 +205,14 @@ SHELL = @SHELL@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ +TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -241,7 +248,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff --git a/scripts/udev/Makefile.in b/scripts/udev/Makefile.in index 55c58b3..be711f3 100644 --- a/scripts/udev/Makefile.in +++ b/scripts/udev/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.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_libpowerman.m4 \ @@ -114,6 +115,7 @@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ @@ -146,6 +148,8 @@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ +LIBLTDL_LIBS = @LIBLTDL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -166,6 +170,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ @@ -197,12 +202,14 @@ SHELL = @SHELL@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ +TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -238,7 +245,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff --git a/scripts/udev/nut-usbups.rules.in b/scripts/udev/nut-usbups.rules.in index 6537eec..2faf9a2 100644 --- a/scripts/udev/nut-usbups.rules.in +++ b/scripts/udev/nut-usbups.rules.in @@ -6,6 +6,8 @@ SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real" SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end" LABEL="nut-usbups_rules_real" +# Krauler UP-M500VA - blazer_usb +ATTR{idVendor}=="0001", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" # Hewlett Packard # T500 - bcmxcp_usb @@ -158,6 +160,8 @@ ATTR{idVendor}=="09ae", ATTR{idProduct}=="4007", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="09ae", ATTR{idProduct}=="4008", MODE="664", GROUP="@RUN_AS_GROUP@" # PowerCOM +# PowerCOM BNT-xxxAP - usbhid-ups +ATTR{idVendor}=="0d9f", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" # PowerCOM IMP - IMPERIAL Series - usbhid-ups ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a2", MODE="664", GROUP="@RUN_AS_GROUP@" # PowerCOM SKP - Smart KING Pro (all Smart series) - usbhid-ups @@ -176,5 +180,7 @@ ATTR{idVendor}=="0f03", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="10af", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" # GE EP series - blazer_usb ATTR{idVendor}=="14f0", ATTR{idProduct}=="00c9", MODE="664", GROUP="@RUN_AS_GROUP@" +# Ablerex 625L USB - blazer_usb +ATTR{idVendor}=="ffff", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" LABEL="nut-usbups_rules_end" diff --git a/scripts/upower/95-upower-hid.rules b/scripts/upower/95-upower-hid.rules index 25c267d..dd9d899 100644 --- a/scripts/upower/95-upower-hid.rules +++ b/scripts/upower/95-upower-hid.rules @@ -102,6 +102,7 @@ ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4007", ENV{UPOWER_BATTERY_TYPE}="ups ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4008", ENV{UPOWER_BATTERY_TYPE}="ups" # PowerCOM +ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="0004", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a2", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a3", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a4", ENV{UPOWER_BATTERY_TYPE}="ups" diff --git a/server/Makefile.am b/server/Makefile.am index 1c9c789..5f2f679 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -23,7 +23,7 @@ EXTRA_PROGRAMS = sockdebug upsd_SOURCES = upsd.c user.c conf.c ssl.c sstate.c desc.c \ netget.c netmisc.c netlist.c netuser.c netset.c netinstcmd.c \ - conf.h ctype.h desc.h netcmds.h neterr.h netget.h netinstcmd.h \ + conf.h nut_ctype.h desc.h netcmds.h neterr.h netget.h netinstcmd.h \ netlist.h netmisc.h netset.h netuser.h ssl.h sstate.h stype.h upsd.h \ upstype.h user-data.h user.h diff --git a/server/Makefile.in b/server/Makefile.in index 994e64a..0c32dea 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -56,6 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.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_libpowerman.m4 \ @@ -131,6 +132,7 @@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ @@ -163,6 +165,8 @@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ +LIBLTDL_LIBS = @LIBLTDL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -183,6 +187,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ @@ -214,12 +219,14 @@ SHELL = @SHELL@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ +TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -255,7 +262,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -288,7 +294,7 @@ LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS) \ $(am__append_3) $(am__append_4) upsd_SOURCES = upsd.c user.c conf.c ssl.c sstate.c desc.c \ netget.c netmisc.c netlist.c netuser.c netset.c netinstcmd.c \ - conf.h ctype.h desc.h netcmds.h neterr.h netget.h netinstcmd.h \ + conf.h nut_ctype.h desc.h netcmds.h neterr.h netget.h netinstcmd.h \ netlist.h netmisc.h netset.h netuser.h ssl.h sstate.h stype.h upsd.h \ upstype.h user-data.h user.h diff --git a/server/netcmds.h b/server/netcmds.h index a001f70..30f5124 100644 --- a/server/netcmds.h +++ b/server/netcmds.h @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ctype.h" +#include "nut_ctype.h" #include "ssl.h" #include "netget.h" @@ -31,7 +31,7 @@ struct { const char *name; - void (*func)(ctype_t *client, int numargs, const char **arg); + void (*func)(nut_ctype_t *client, int numargs, const char **arg); int flags; } netcmds[] = { { "VER", net_ver, 0 }, diff --git a/server/netget.c b/server/netget.c index a10a011..43e7370 100644 --- a/server/netget.c +++ b/server/netget.c @@ -27,7 +27,7 @@ #include "netget.h" -static void get_numlogins(ctype_t *client, const char *upsname) +static void get_numlogins(nut_ctype_t *client, const char *upsname) { const upstype_t *ups; @@ -44,7 +44,7 @@ static void get_numlogins(ctype_t *client, const char *upsname) sendback(client, "NUMLOGINS %s %d\n", upsname, ups->numlogins); } -static void get_upsdesc(ctype_t *client, const char *upsname) +static void get_upsdesc(nut_ctype_t *client, const char *upsname) { const upstype_t *ups; char esc[SMALLBUF]; @@ -69,7 +69,7 @@ static void get_upsdesc(ctype_t *client, const char *upsname) } } -static void get_desc(ctype_t *client, const char *upsname, const char *var) +static void get_desc(nut_ctype_t *client, const char *upsname, const char *var) { const upstype_t *ups; const char *desc; @@ -92,7 +92,7 @@ static void get_desc(ctype_t *client, const char *upsname, const char *var) sendback(client, "DESC %s %s \"Description unavailable\"\n", upsname, var); } -static void get_cmddesc(ctype_t *client, const char *upsname, const char *cmd) +static void get_cmddesc(nut_ctype_t *client, const char *upsname, const char *cmd) { const upstype_t *ups; const char *desc; @@ -116,7 +116,7 @@ static void get_cmddesc(ctype_t *client, const char *upsname, const char *cmd) upsname, cmd); } -static void get_type(ctype_t *client, const char *upsname, const char *var) +static void get_type(nut_ctype_t *client, const char *upsname, const char *var) { char buf[SMALLBUF]; const upstype_t *ups; @@ -159,7 +159,7 @@ static void get_type(ctype_t *client, const char *upsname, const char *var) sendback(client, "TYPE %s %s UNKNOWN\n", upsname, var); } -static void get_var_server(ctype_t *client, const char *upsname, const char *var) +static void get_var_server(nut_ctype_t *client, const char *upsname, const char *var) { if (!strcasecmp(var, "server.info")) { sendback(client, "VAR %s server.info " @@ -178,7 +178,7 @@ static void get_var_server(ctype_t *client, const char *upsname, const char *var send_err(client, NUT_ERR_VAR_NOT_SUPPORTED); } -static void get_var(ctype_t *client, const char *upsname, const char *var) +static void get_var(nut_ctype_t *client, const char *upsname, const char *var) { const upstype_t *ups; const char *val; @@ -213,7 +213,7 @@ static void get_var(ctype_t *client, const char *upsname, const char *var) sendback(client, "VAR %s %s \"%s\"\n", upsname, var, val); } -void net_get(ctype_t *client, int numarg, const char **arg) +void net_get(nut_ctype_t *client, int numarg, const char **arg) { if (numarg < 2) { send_err(client, NUT_ERR_INVALID_ARGUMENT); diff --git a/server/netget.h b/server/netget.h index 0bc8759..f1209d2 100644 --- a/server/netget.h +++ b/server/netget.h @@ -1 +1 @@ -void net_get(ctype_t *client, int numarg, const char **arg); +void net_get(nut_ctype_t *client, int numarg, const char **arg); diff --git a/server/netinstcmd.c b/server/netinstcmd.c index 7411e2b..c21d7ec 100644 --- a/server/netinstcmd.c +++ b/server/netinstcmd.c @@ -28,7 +28,7 @@ #include "netinstcmd.h" -static void send_instcmd(ctype_t *client, const char *upsname, +static void send_instcmd(nut_ctype_t *client, const char *upsname, const char *cmdname, const char *value) { int found; @@ -95,7 +95,7 @@ static void send_instcmd(ctype_t *client, const char *upsname, sendback(client, "OK\n"); } -void net_instcmd(ctype_t *client, int numarg, const char **arg) +void net_instcmd(nut_ctype_t *client, int numarg, const char **arg) { if (numarg < 2) { send_err(client, NUT_ERR_INVALID_ARGUMENT); diff --git a/server/netinstcmd.h b/server/netinstcmd.h index 58dc155..1015931 100644 --- a/server/netinstcmd.h +++ b/server/netinstcmd.h @@ -1 +1 @@ -void net_instcmd(ctype_t *client, int numarg, const char **arg); +void net_instcmd(nut_ctype_t *client, int numarg, const char **arg); diff --git a/server/netlist.c b/server/netlist.c index 104026c..ea6ee4c 100644 --- a/server/netlist.c +++ b/server/netlist.c @@ -28,7 +28,7 @@ extern upstype_t *firstups; /* for list_ups */ -static int tree_dump(st_tree_t *node, ctype_t *client, const char *ups, +static int tree_dump(st_tree_t *node, nut_ctype_t *client, const char *ups, int rw, int fsd) { int ret; @@ -78,7 +78,7 @@ static int tree_dump(st_tree_t *node, ctype_t *client, const char *ups, return 1; } -static void list_rw(ctype_t *client, const char *upsname) +static void list_rw(nut_ctype_t *client, const char *upsname) { const upstype_t *ups; @@ -101,7 +101,7 @@ static void list_rw(ctype_t *client, const char *upsname) sendback(client, "END LIST RW %s\n", upsname); } -static void list_var(ctype_t *client, const char *upsname) +static void list_var(nut_ctype_t *client, const char *upsname) { const upstype_t *ups; @@ -124,7 +124,7 @@ static void list_var(ctype_t *client, const char *upsname) sendback(client, "END LIST VAR %s\n", upsname); } -static void list_cmd(ctype_t *client, const char *upsname) +static void list_cmd(nut_ctype_t *client, const char *upsname) { const upstype_t *ups; cmdlist_t *ctmp; @@ -150,7 +150,7 @@ static void list_cmd(ctype_t *client, const char *upsname) sendback(client, "END LIST CMD %s\n", upsname); } -static void list_enum(ctype_t *client, const char *upsname, const char *var) +static void list_enum(nut_ctype_t *client, const char *upsname, const char *var) { const upstype_t *ups; const st_tree_t *node; @@ -185,7 +185,7 @@ static void list_enum(ctype_t *client, const char *upsname, const char *var) sendback(client, "END LIST ENUM %s %s\n", upsname, var); } -static void list_ups(ctype_t *client) +static void list_ups(nut_ctype_t *client) { upstype_t *utmp; char esc[SMALLBUF]; @@ -217,7 +217,7 @@ static void list_ups(ctype_t *client) sendback(client, "END LIST UPS\n"); } -void net_list(ctype_t *client, int numarg, const char **arg) +void net_list(nut_ctype_t *client, int numarg, const char **arg) { if (numarg < 1) { send_err(client, NUT_ERR_INVALID_ARGUMENT); diff --git a/server/netlist.h b/server/netlist.h index 445627e..d3b7776 100644 --- a/server/netlist.h +++ b/server/netlist.h @@ -1 +1 @@ -void net_list(ctype_t *client, int numarg, const char **arg); +void net_list(nut_ctype_t *client, int numarg, const char **arg); diff --git a/server/netmisc.c b/server/netmisc.c index 3273514..cbfb1ca 100644 --- a/server/netmisc.c +++ b/server/netmisc.c @@ -27,7 +27,7 @@ #include "netmisc.h" -void net_ver(ctype_t *client, int numarg, const char **arg) +void net_ver(nut_ctype_t *client, int numarg, const char **arg) { if (numarg != 0) { send_err(client, NUT_ERR_INVALID_ARGUMENT); @@ -38,7 +38,7 @@ void net_ver(ctype_t *client, int numarg, const char **arg) UPS_VERSION); } -void net_help(ctype_t *client, int numarg, const char **arg) +void net_help(nut_ctype_t *client, int numarg, const char **arg) { if (numarg != 0) { send_err(client, NUT_ERR_INVALID_ARGUMENT); @@ -49,7 +49,7 @@ void net_help(ctype_t *client, int numarg, const char **arg) " USERNAME PASSWORD STARTTLS\n"); } -void net_fsd(ctype_t *client, int numarg, const char **arg) +void net_fsd(nut_ctype_t *client, int numarg, const char **arg) { upstype_t *ups; diff --git a/server/netmisc.h b/server/netmisc.h index 19e7254..e1899df 100644 --- a/server/netmisc.h +++ b/server/netmisc.h @@ -1,3 +1,3 @@ -void net_ver(ctype_t *client, int numarg, const char **arg); -void net_help(ctype_t *client, int numarg, const char **arg); -void net_fsd(ctype_t *client, int numarg, const char **arg); +void net_ver(nut_ctype_t *client, int numarg, const char **arg); +void net_help(nut_ctype_t *client, int numarg, const char **arg); +void net_fsd(nut_ctype_t *client, int numarg, const char **arg); diff --git a/server/netset.c b/server/netset.c index ae5a681..145bd2f 100644 --- a/server/netset.c +++ b/server/netset.c @@ -27,7 +27,7 @@ #include "netset.h" -static void set_var(ctype_t *client, const char *upsname, const char *var, +static void set_var(nut_ctype_t *client, const char *upsname, const char *var, const char *newval) { upstype_t *ups; @@ -125,7 +125,7 @@ static void set_var(ctype_t *client, const char *upsname, const char *var, sendback(client, "OK\n"); } -void net_set(ctype_t *client, int numarg, const char **arg) +void net_set(nut_ctype_t *client, int numarg, const char **arg) { if (numarg < 4) { send_err(client, NUT_ERR_INVALID_ARGUMENT); diff --git a/server/netset.h b/server/netset.h index 0061962..81068dd 100644 --- a/server/netset.h +++ b/server/netset.h @@ -1 +1 @@ -void net_set(ctype_t *client, int numarg, const char **arg); +void net_set(nut_ctype_t *client, int numarg, const char **arg); diff --git a/server/netuser.c b/server/netuser.c index 5c1b399..29c8596 100644 --- a/server/netuser.c +++ b/server/netuser.c @@ -28,7 +28,7 @@ #include "netuser.h" /* LOGIN */ -void net_login(ctype_t *client, int numarg, const char **arg) +void net_login(nut_ctype_t *client, int numarg, const char **arg) { upstype_t *ups; @@ -65,7 +65,7 @@ void net_login(ctype_t *client, int numarg, const char **arg) sendback(client, "OK\n"); } -void net_logout(ctype_t *client, int numarg, const char **arg) +void net_logout(nut_ctype_t *client, int numarg, const char **arg) { if (numarg != 0) { send_err(client, NUT_ERR_INVALID_ARGUMENT); @@ -83,7 +83,7 @@ void net_logout(ctype_t *client, int numarg, const char **arg) } /* MASTER */ -void net_master(ctype_t *client, int numarg, const char **arg) +void net_master(nut_ctype_t *client, int numarg, const char **arg) { upstype_t *ups; @@ -110,7 +110,7 @@ void net_master(ctype_t *client, int numarg, const char **arg) } /* USERNAME */ -void net_username(ctype_t *client, int numarg, const char **arg) +void net_username(nut_ctype_t *client, int numarg, const char **arg) { if (numarg != 1) { send_err(client, NUT_ERR_INVALID_ARGUMENT); @@ -130,7 +130,7 @@ void net_username(ctype_t *client, int numarg, const char **arg) } /* PASSWORD */ -void net_password(ctype_t *client, int numarg, const char **arg) +void net_password(nut_ctype_t *client, int numarg, const char **arg) { if (numarg != 1) { send_err(client, NUT_ERR_INVALID_ARGUMENT); diff --git a/server/netuser.h b/server/netuser.h index e31fb0d..5f7e047 100644 --- a/server/netuser.h +++ b/server/netuser.h @@ -1,5 +1,5 @@ -void net_login(ctype_t *client, int numarg, const char **arg); -void net_logout(ctype_t *client, int numarg, const char **arg); -void net_master(ctype_t *client, int numarg, const char **arg); -void net_username(ctype_t *client, int numarg, const char **arg); -void net_password(ctype_t *client, int numarg, const char **arg); +void net_login(nut_ctype_t *client, int numarg, const char **arg); +void net_logout(nut_ctype_t *client, int numarg, const char **arg); +void net_master(nut_ctype_t *client, int numarg, const char **arg); +void net_username(nut_ctype_t *client, int numarg, const char **arg); +void net_password(nut_ctype_t *client, int numarg, const char **arg); diff --git a/server/ctype.h b/server/nut_ctype.h similarity index 80% rename from server/ctype.h rename to server/nut_ctype.h index dac0980..498298c 100644 --- a/server/ctype.h +++ b/server/nut_ctype.h @@ -1,8 +1,9 @@ -/* ctype.h - client data definitions for upsd +/* nut_ctype.h - client data definitions for upsd Copyright (C) 2002 Russell Kroll 2008 Arjen de Korte + 2011 Arnaud Quette 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 @@ -19,8 +20,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef CTYPE_H_SEEN -#define CTYPE_H_SEEN 1 +#ifndef NUT_CTYPE_H_SEEN +#define NUT_CTYPE_H_SEEN 1 #ifdef HAVE_SSL #include @@ -30,7 +31,7 @@ #include "parseconf.h" /* client structure */ -typedef struct ctype_s { +typedef struct nut_ctype_s { char *addr; int sock_fd; time_t last_heard; @@ -48,8 +49,8 @@ typedef struct ctype_s { PCONF_CTX_t ctx; /* doubly linked list */ - struct ctype_s *prev; - struct ctype_s *next; -} ctype_t; + struct nut_ctype_s *prev; + struct nut_ctype_s *next; +} nut_ctype_t; -#endif /* CTYPE_H_SEEN */ +#endif /* NUT_CTYPE_H_SEEN */ diff --git a/server/ssl.c b/server/ssl.c index 21614d9..bb95dca 100644 --- a/server/ssl.c +++ b/server/ssl.c @@ -38,19 +38,19 @@ static int ssl_initialized = 0; #ifndef HAVE_SSL /* stubs for non-ssl compiles */ -void net_starttls(ctype_t *client, int numarg, const char **arg) +void net_starttls(nut_ctype_t *client, int numarg, const char **arg) { send_err(client, NUT_ERR_FEATURE_NOT_SUPPORTED); return; } -int ssl_write(ctype_t *client, const char *buf, size_t buflen) +int ssl_write(nut_ctype_t *client, const char *buf, size_t buflen) { upslogx(LOG_ERR, "ssl_write called but SSL wasn't compiled in"); return -1; } -int ssl_read(ctype_t *client, char *buf, size_t buflen) +int ssl_read(nut_ctype_t *client, char *buf, size_t buflen) { upslogx(LOG_ERR, "ssl_read called but SSL wasn't compiled in"); return -1; @@ -61,7 +61,7 @@ void ssl_init(void) ssl_initialized = 0; /* keep gcc quiet */ } -void ssl_finish(ctype_t *client) +void ssl_finish(nut_ctype_t *client) { if (client->ssl) { upslogx(LOG_ERR, "ssl_finish found active SSL connection but SSL wasn't compiled in"); @@ -83,7 +83,7 @@ static void ssl_debug(void) } } -void net_starttls(ctype_t *client, int numarg, const char **arg) +void net_starttls(nut_ctype_t *client, int numarg, const char **arg) { if (client->ssl) { send_err(client, NUT_ERR_ALREADY_SSL_MODE); @@ -196,7 +196,7 @@ static int ssl_error(SSL *ssl, int ret) return -1; } -static int ssl_accept(ctype_t *client) +static int ssl_accept(nut_ctype_t *client) { int ret; @@ -218,7 +218,7 @@ static int ssl_accept(ctype_t *client) return -1; } -int ssl_read(ctype_t *client, char *buf, size_t buflen) +int ssl_read(nut_ctype_t *client, char *buf, size_t buflen) { int ret; @@ -237,7 +237,7 @@ int ssl_read(ctype_t *client, char *buf, size_t buflen) return ret; } -int ssl_write(ctype_t *client, const char *buf, size_t buflen) +int ssl_write(nut_ctype_t *client, const char *buf, size_t buflen) { int ret; @@ -248,7 +248,7 @@ int ssl_write(ctype_t *client, const char *buf, size_t buflen) return ret; } -void ssl_finish(ctype_t *client) +void ssl_finish(nut_ctype_t *client) { if (client->ssl) { SSL_free(client->ssl); diff --git a/server/ssl.h b/server/ssl.h index eb9826c..7f4009c 100644 --- a/server/ssl.h +++ b/server/ssl.h @@ -25,16 +25,16 @@ #include #endif -#include "ctype.h" +#include "nut_ctype.h" extern char *certfile; void ssl_init(void); -void ssl_finish(ctype_t *client); +void ssl_finish(nut_ctype_t *client); -int ssl_read(ctype_t *client, char *buf, size_t buflen); -int ssl_write(ctype_t *client, const char *buf, size_t buflen); +int ssl_read(nut_ctype_t *client, char *buf, size_t buflen); +int ssl_write(nut_ctype_t *client, const char *buf, size_t buflen); -void net_starttls(ctype_t *client, int numarg, const char **arg); +void net_starttls(nut_ctype_t *client, int numarg, const char **arg); #endif /* SSL_H_SEEN */ diff --git a/server/upsd.c b/server/upsd.c index 662284e..db200aa 100644 --- a/server/upsd.c +++ b/server/upsd.c @@ -3,6 +3,7 @@ Copyright (C) 1999 Russell Kroll 2008 Arjen de Korte + 2011 Arnaud Quette 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 @@ -32,7 +33,7 @@ #include #include "user.h" -#include "ctype.h" +#include "nut_ctype.h" #include "stype.h" #include "ssl.h" #include "sstate.h" @@ -64,8 +65,8 @@ int deny_severity = LOG_WARNING; /* everything else */ const char *progname; -static ctype_t *firstclient = NULL; -/* static ctype_t *lastclient = NULL; */ +static nut_ctype_t *firstclient = NULL; +/* static nut_ctype_t *lastclient = NULL; */ /* default is to listen on all local interfaces */ static stype_t *firstaddr = NULL; @@ -234,9 +235,10 @@ static void setuptcp(stype_t *server) freeaddrinfo(res); - /* don't fail silently */ + /* leave up to the caller, server_load(), to fail silently if there is + * no other valid LISTEN interface */ if (server->sock_fd < 0) { - fatalx(EXIT_FAILURE, "not listening on %s port %s", server->addr, server->port); + upslogx(LOG_ERR, "not listening on %s port %s", server->addr, server->port); } else { upslogx(LOG_INFO, "listening on %s port %s", server->addr, server->port); } @@ -264,7 +266,7 @@ static void declogins(const char *upsname) } /* disconnect a client connection and free all related memory */ -static void client_disconnect(ctype_t *client) +static void client_disconnect(nut_ctype_t *client) { if (!client) { return; @@ -307,7 +309,7 @@ static void client_disconnect(ctype_t *client) } /* send the buffer of length to host */ -int sendback(ctype_t *client, const char *fmt, ...) +int sendback(nut_ctype_t *client, const char *fmt, ...) { int res, len; char ans[NUT_NET_ANSWER_MAX+1]; @@ -341,7 +343,7 @@ int sendback(ctype_t *client, const char *fmt, ...) } /* just a simple wrapper for now */ -int send_err(ctype_t *client, const char *errtype) +int send_err(nut_ctype_t *client, const char *errtype) { if (!client) { return -1; @@ -355,7 +357,7 @@ int send_err(ctype_t *client, const char *errtype) /* disconnect anyone logged into this UPS */ void kick_login_clients(const char *upsname) { - ctype_t *client, *cnext; + nut_ctype_t *client, *cnext; for (client = firstclient; client; client = cnext) { @@ -374,7 +376,7 @@ void kick_login_clients(const char *upsname) } /* make sure a UPS is sane - connected, with fresh data */ -int ups_available(const upstype_t *ups, ctype_t *client) +int ups_available(const upstype_t *ups, nut_ctype_t *client) { if (ups->sock_fd < 0) { send_err(client, NUT_ERR_DRIVER_NOT_CONNECTED); @@ -391,7 +393,7 @@ int ups_available(const upstype_t *ups, ctype_t *client) } /* check flags and access for an incoming command from the network */ -static void check_command(int cmdnum, ctype_t *client, int numarg, +static void check_command(int cmdnum, nut_ctype_t *client, int numarg, const char **arg) { if (netcmds[cmdnum].flags & FLAG_USER) { @@ -426,7 +428,7 @@ static void check_command(int cmdnum, ctype_t *client, int numarg, } /* parse requests from the network */ -static void parse_net(ctype_t *client) +static void parse_net(nut_ctype_t *client) { int i; @@ -458,7 +460,7 @@ static void client_connect(stype_t *server) socklen_t clen; #endif int fd; - ctype_t *client; + nut_ctype_t *client; clen = sizeof(csock); fd = accept(server->sock_fd, (struct sockaddr *) &csock, &clen); @@ -496,7 +498,7 @@ static void client_connect(stype_t *server) } /* read tcp messages and handle them */ -static void client_readline(ctype_t *client) +static void client_readline(nut_ctype_t *client) { char buf[SMALLBUF]; int i, ret; @@ -561,6 +563,11 @@ void server_load(void) for (server = firstaddr; server; server = server->next) { setuptcp(server); } + + /* check if we have at least 1 valid LISTEN interface */ + if (firstaddr->sock_fd < 0) { + fatalx(EXIT_FAILURE, "no listening interface available"); + } } void server_free(void) @@ -585,7 +592,7 @@ void server_free(void) static void client_free(void) { - ctype_t *client, *cnext; + nut_ctype_t *client, *cnext; /* cleanup client fds */ for (client = firstclient; client; client = cnext) { @@ -663,7 +670,7 @@ static void mainloop(void) int i, ret, nfds = 0; upstype_t *ups; - ctype_t *client, *cnext; + nut_ctype_t *client, *cnext; stype_t *server; time_t now; @@ -765,7 +772,7 @@ static void mainloop(void) sstate_disconnect((upstype_t *)handler[i].data); break; case CLIENT: - client_disconnect((ctype_t *)handler[i].data); + client_disconnect((nut_ctype_t *)handler[i].data); break; case SERVER: upsdebugx(2, "%s: server disconnected", __func__); @@ -786,7 +793,7 @@ static void mainloop(void) sstate_readline((upstype_t *)handler[i].data); break; case CLIENT: - client_readline((ctype_t *)handler[i].data); + client_readline((nut_ctype_t *)handler[i].data); break; case SERVER: client_connect((stype_t *)handler[i].data); diff --git a/server/upsd.h b/server/upsd.h index c43fd67..85985fe 100644 --- a/server/upsd.h +++ b/server/upsd.h @@ -40,7 +40,7 @@ #include #include "parseconf.h" -#include "ctype.h" +#include "nut_ctype.h" #include "upstype.h" #define NUT_NET_ANSWER_MAX SMALLBUF @@ -48,14 +48,14 @@ /* prototypes from upsd.c */ upstype_t *get_ups_ptr(const char *upsname); -int ups_available(const upstype_t *ups, ctype_t *client); +int ups_available(const upstype_t *ups, nut_ctype_t *client); void listen_add(const char *addr, const char *port); void kick_login_clients(const char *upsname); -int sendback(ctype_t *client, const char *fmt, ...) +int sendback(nut_ctype_t *client, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); -int send_err(ctype_t *client, const char *errtype); +int send_err(nut_ctype_t *client, const char *errtype); void server_load(void); void server_free(void); diff --git a/tools/Makefile.am b/tools/Makefile.am index fbe4e34..0d9828b 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,3 +1,4 @@ +# TODO: remove redundancies! # Force build in ./ before nut-scanner, to have nutscan-{usb,snmp}.h # built before going into the nut-scanner sub-directory @@ -29,12 +30,13 @@ nut-scanner-deps: fi website: - @if python -c pass; then \ + @if python -c "import json,simplejson,lxml"; then \ echo "Regenerating the HTML and JSON formated HCL tables."; \ $(top_srcdir)/tools/nut-hclinfo.py; \ else \ echo "----------------------------------------------------------------------"; \ - echo "Warning: Python is not available."; \ + echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \ + echo "is not available."; \ echo "Skipping the HTML and JSON formated HCL tables regeneration."; \ echo "----------------------------------------------------------------------"; \ fi @@ -42,6 +44,7 @@ website: # call the USB info script upon "make dist", and if Perl is present # call the SNMP info script upon "make dist", and if Python is present # and call both for building nut-scanner +# also generate HCL data files dist-hook: @if python -c 1; then \ echo "Regenerating the SNMP helper files."; \ @@ -63,4 +66,15 @@ dist-hook: echo "----------------------------------------------------------------------"; \ fi + @if python -c "import json,simplejson,lxml"; then \ + echo "Regenerating the HTML and JSON formated HCL tables."; \ + $(distdir)/nut-hclinfo.py; \ + else \ + echo "----------------------------------------------------------------------"; \ + echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \ + echo "is not available."; \ + echo "Skipping the HTML and JSON formated HCL tables regeneration."; \ + echo "----------------------------------------------------------------------"; \ + fi + .PHONY: nut-scanner-deps nut-scanner-snmp-deps nut-scanner-usb-deps diff --git a/tools/Makefile.in b/tools/Makefile.in index 404d40b..66f35e8 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -14,6 +14,8 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + +# TODO: remove redundancies! VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -47,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.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_libpowerman.m4 \ @@ -127,6 +130,7 @@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ @@ -159,6 +163,8 @@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ +LIBLTDL_LIBS = @LIBLTDL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -179,6 +185,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ @@ -210,12 +217,14 @@ SHELL = @SHELL@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ +TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -251,7 +260,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -654,12 +662,13 @@ nut-scanner-deps: fi website: - @if python -c pass; then \ + @if python -c "import json,simplejson,lxml"; then \ echo "Regenerating the HTML and JSON formated HCL tables."; \ $(top_srcdir)/tools/nut-hclinfo.py; \ else \ echo "----------------------------------------------------------------------"; \ - echo "Warning: Python is not available."; \ + echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \ + echo "is not available."; \ echo "Skipping the HTML and JSON formated HCL tables regeneration."; \ echo "----------------------------------------------------------------------"; \ fi @@ -667,6 +676,7 @@ website: # call the USB info script upon "make dist", and if Perl is present # call the SNMP info script upon "make dist", and if Python is present # and call both for building nut-scanner +# also generate HCL data files dist-hook: @if python -c 1; then \ echo "Regenerating the SNMP helper files."; \ @@ -688,6 +698,17 @@ dist-hook: echo "----------------------------------------------------------------------"; \ fi + @if python -c "import json,simplejson,lxml"; then \ + echo "Regenerating the HTML and JSON formated HCL tables."; \ + $(distdir)/nut-hclinfo.py; \ + else \ + echo "----------------------------------------------------------------------"; \ + echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \ + echo "is not available."; \ + echo "Skipping the HTML and JSON formated HCL tables regeneration."; \ + echo "----------------------------------------------------------------------"; \ + fi + .PHONY: nut-scanner-deps nut-scanner-snmp-deps nut-scanner-usb-deps # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/nut-hclinfo.py b/tools/nut-hclinfo.py index 925873f..8a7aa4e 100755 --- a/tools/nut-hclinfo.py +++ b/tools/nut-hclinfo.py @@ -29,6 +29,7 @@ except ImportError: import re import sys +import os, errno # HCL file location and name rawHCL="../data/driver.list"; @@ -238,13 +239,21 @@ def buildHTMLTable(deviceData): table.append(tbody) - return etree.tostring(table, pretty_print=True) - + +# main program deviceData = buildData(rawHCL) # Dump device data as JSON jsonData = "var UPSData = %s" % json.dumps(deviceData, encoding="utf-8") + +# First, check if target directory exists (which is not the case for 'dist') +dir = os.path.dirname(webJsonHCL) +try: + os.makedirs(dir) +except OSError: + pass + try: file = open(webJsonHCL, "w") file.write(jsonData) diff --git a/tools/nut-scanner/Makefile.am b/tools/nut-scanner/Makefile.am index 005ba0c..0656e49 100644 --- a/tools/nut-scanner/Makefile.am +++ b/tools/nut-scanner/Makefile.am @@ -3,14 +3,18 @@ BUILT_SOURCES = nutscan-usb.h nutscan-snmp.h nutscan-usb.h nutscan-snmp.h: cd ..; $(MAKE) $(AM_MAKEFLAGS) nut-scanner-deps -lib_LTLIBRARIES = libnutscan.la +# Only build nut-scanner, and its library, if libltdl was found (required!) +if WITH_LIBLTDL + bin_PROGRAMS = nut-scanner + lib_LTLIBRARIES = libnutscan.la +endif libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \ - nutscan-device.c nutscan-ip.c nutscan-display.c -libnutscan_la_LIBADD = ../../clients/libupsclient.la $(NETLIBS) + nutscan-device.c nutscan-ip.c nutscan-display.c nutscan-init.c \ + scan_usb.c scan_snmp.c scan_xml_http.c scan_avahi.c +libnutscan_la_LIBADD = ../../clients/libupsclient.la $(NETLIBS) $(LIBLTDL_LIBS) libnutscan_la_LDFLAGS = -version-info 1:0:0 -libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include +libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include $(LIBLTDL_CFLAGS) -bin_PROGRAMS = nut-scanner nut_scanner_SOURCES = nut-scanner.c nut_scanner_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include nut_scanner_LDADD = libnutscan.la @@ -20,27 +24,28 @@ if WITH_SSL libnutscan_la_LIBADD += $(LIBSSL_LIBS) endif if WITH_USB - libnutscan_la_SOURCES += scan_usb.c libnutscan_la_CFLAGS += $(LIBUSB_CFLAGS) - libnutscan_la_LIBADD += $(LIBUSB_LIBS) endif if WITH_SNMP - libnutscan_la_SOURCES += scan_snmp.c libnutscan_la_CFLAGS += $(LIBNETSNMP_CFLAGS) - libnutscan_la_LIBADD += $(LIBNETSNMP_LIBS) endif -if WITH_NEONXML - libnutscan_la_SOURCES += scan_xml_http.c +if WITH_NEON libnutscan_la_CFLAGS += $(LIBNEON_CFLAGS) - libnutscan_la_LIBADD += $(LIBNEON_LIBS) endif if WITH_AVAHI - libnutscan_la_SOURCES += scan_avahi.c libnutscan_la_CFLAGS += $(LIBAVAHI_CFLAGS) - libnutscan_la_LIBADD += $(LIBAVAHI_LIBS) +endif +if WITH_IPMI + libnutscan_la_CFLAGS += $(LIBIPMI_CFLAGS) endif -dist_noinst_HEADERS = nut-scan.h nutscan-usb.h nutscan-snmp.h nutscan-device.h nutscan-ip.h +dist_noinst_HEADERS = nutscan-usb.h nutscan-snmp.h + +if WITH_DEV + include_HEADERS = nut-scan.h nutscan-device.h nutscan-ip.h nutscan-init.h +else + dist_noinst_HEADERS += nut-scan.h nutscan-device.h nutscan-ip.h nutscan-init.h +endif CLEANFILES = nutscan-usb.h nutscan-snmp.h diff --git a/tools/nut-scanner/Makefile.in b/tools/nut-scanner/Makefile.in index a489329..cf53410 100644 --- a/tools/nut-scanner/Makefile.in +++ b/tools/nut-scanner/Makefile.in @@ -37,23 +37,18 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -bin_PROGRAMS = nut-scanner$(EXEEXT) +@WITH_LIBLTDL_TRUE@bin_PROGRAMS = nut-scanner$(EXEEXT) @WITH_SSL_TRUE@am__append_1 = $(LIBSSL_CFLAGS) @WITH_SSL_TRUE@am__append_2 = $(LIBSSL_LIBS) -@WITH_USB_TRUE@am__append_3 = scan_usb.c -@WITH_USB_TRUE@am__append_4 = $(LIBUSB_CFLAGS) -@WITH_USB_TRUE@am__append_5 = $(LIBUSB_LIBS) -@WITH_SNMP_TRUE@am__append_6 = scan_snmp.c -@WITH_SNMP_TRUE@am__append_7 = $(LIBNETSNMP_CFLAGS) -@WITH_SNMP_TRUE@am__append_8 = $(LIBNETSNMP_LIBS) -@WITH_NEONXML_TRUE@am__append_9 = scan_xml_http.c -@WITH_NEONXML_TRUE@am__append_10 = $(LIBNEON_CFLAGS) -@WITH_NEONXML_TRUE@am__append_11 = $(LIBNEON_LIBS) -@WITH_AVAHI_TRUE@am__append_12 = scan_avahi.c -@WITH_AVAHI_TRUE@am__append_13 = $(LIBAVAHI_CFLAGS) -@WITH_AVAHI_TRUE@am__append_14 = $(LIBAVAHI_LIBS) +@WITH_USB_TRUE@am__append_3 = $(LIBUSB_CFLAGS) +@WITH_SNMP_TRUE@am__append_4 = $(LIBNETSNMP_CFLAGS) +@WITH_NEON_TRUE@am__append_5 = $(LIBNEON_CFLAGS) +@WITH_AVAHI_TRUE@am__append_6 = $(LIBAVAHI_CFLAGS) +@WITH_IPMI_TRUE@am__append_7 = $(LIBIPMI_CFLAGS) +@WITH_DEV_FALSE@am__append_8 = nut-scan.h nutscan-device.h nutscan-ip.h nutscan-init.h subdir = tools/nut-scanner -DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ +DIST_COMMON = README $(am__dist_noinst_HEADERS_DIST) \ + $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ @@ -66,6 +61,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libhal.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_libpowerman.m4 \ @@ -104,34 +100,25 @@ 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__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = @WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -@WITH_USB_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) -@WITH_SNMP_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) -@WITH_NEONXML_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1) -@WITH_AVAHI_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1) libnutscan_la_DEPENDENCIES = ../../clients/libupsclient.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) \ - $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) -am__libnutscan_la_SOURCES_DIST = scan_nut.c scan_ipmi.c \ - nutscan-device.c nutscan-ip.c nutscan-display.c scan_usb.c \ - scan_snmp.c scan_xml_http.c scan_avahi.c -@WITH_USB_TRUE@am__objects_1 = libnutscan_la-scan_usb.lo -@WITH_SNMP_TRUE@am__objects_2 = libnutscan_la-scan_snmp.lo -@WITH_NEONXML_TRUE@am__objects_3 = libnutscan_la-scan_xml_http.lo -@WITH_AVAHI_TRUE@am__objects_4 = libnutscan_la-scan_avahi.lo + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_2) am_libnutscan_la_OBJECTS = libnutscan_la-scan_nut.lo \ libnutscan_la-scan_ipmi.lo libnutscan_la-nutscan-device.lo \ libnutscan_la-nutscan-ip.lo libnutscan_la-nutscan-display.lo \ - $(am__objects_1) $(am__objects_2) $(am__objects_3) \ - $(am__objects_4) + libnutscan_la-nutscan-init.lo libnutscan_la-scan_usb.lo \ + libnutscan_la-scan_snmp.lo libnutscan_la-scan_xml_http.lo \ + libnutscan_la-scan_avahi.lo libnutscan_la_OBJECTS = $(am_libnutscan_la_OBJECTS) libnutscan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libnutscan_la_CFLAGS) \ $(CFLAGS) $(libnutscan_la_LDFLAGS) $(LDFLAGS) -o $@ +@WITH_LIBLTDL_TRUE@am_libnutscan_la_rpath = -rpath $(libdir) PROGRAMS = $(bin_PROGRAMS) am_nut_scanner_OBJECTS = nut_scanner-nut-scanner.$(OBJEXT) nut_scanner_OBJECTS = $(am_nut_scanner_OBJECTS) @@ -153,9 +140,12 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libnutscan_la_SOURCES) $(nut_scanner_SOURCES) -DIST_SOURCES = $(am__libnutscan_la_SOURCES_DIST) \ - $(nut_scanner_SOURCES) -HEADERS = $(dist_noinst_HEADERS) +DIST_SOURCES = $(libnutscan_la_SOURCES) $(nut_scanner_SOURCES) +am__dist_noinst_HEADERS_DIST = nutscan-usb.h nutscan-snmp.h nut-scan.h \ + nutscan-device.h nutscan-ip.h nutscan-init.h +am__include_HEADERS_DIST = nut-scan.h nutscan-device.h nutscan-ip.h \ + nutscan-init.h +HEADERS = $(dist_noinst_HEADERS) $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -179,6 +169,7 @@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ @@ -211,6 +202,8 @@ LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ +LIBLTDL_LIBS = @LIBLTDL_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -231,6 +224,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ @@ -262,12 +256,14 @@ SHELL = @SHELL@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ +TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -303,7 +299,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -328,21 +323,23 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ BUILT_SOURCES = nutscan-usb.h nutscan-snmp.h -lib_LTLIBRARIES = libnutscan.la -libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c nutscan-device.c \ - nutscan-ip.c nutscan-display.c $(am__append_3) $(am__append_6) \ - $(am__append_9) $(am__append_12) +@WITH_LIBLTDL_TRUE@lib_LTLIBRARIES = libnutscan.la +libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \ + nutscan-device.c nutscan-ip.c nutscan-display.c nutscan-init.c \ + scan_usb.c scan_snmp.c scan_xml_http.c scan_avahi.c + libnutscan_la_LIBADD = ../../clients/libupsclient.la $(NETLIBS) \ - $(am__append_2) $(am__append_5) $(am__append_8) \ - $(am__append_11) $(am__append_14) + $(LIBLTDL_LIBS) $(am__append_2) libnutscan_la_LDFLAGS = -version-info 1:0:0 libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include \ - $(am__append_1) $(am__append_4) $(am__append_7) \ - $(am__append_10) $(am__append_13) + $(LIBLTDL_CFLAGS) $(am__append_1) $(am__append_3) \ + $(am__append_4) $(am__append_5) $(am__append_6) \ + $(am__append_7) nut_scanner_SOURCES = nut-scanner.c nut_scanner_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include nut_scanner_LDADD = libnutscan.la -dist_noinst_HEADERS = nut-scan.h nutscan-usb.h nutscan-snmp.h nutscan-device.h nutscan-ip.h +dist_noinst_HEADERS = nutscan-usb.h nutscan-snmp.h $(am__append_8) +@WITH_DEV_TRUE@include_HEADERS = nut-scan.h nutscan-device.h nutscan-ip.h nutscan-init.h CLEANFILES = nutscan-usb.h nutscan-snmp.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -411,7 +408,7 @@ clean-libLTLIBRARIES: rm -f "$${dir}/so_locations"; \ done libnutscan.la: $(libnutscan_la_OBJECTS) $(libnutscan_la_DEPENDENCIES) - $(libnutscan_la_LINK) -rpath $(libdir) $(libnutscan_la_OBJECTS) $(libnutscan_la_LIBADD) $(LIBS) + $(libnutscan_la_LINK) $(am_libnutscan_la_rpath) $(libnutscan_la_OBJECTS) $(libnutscan_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @@ -467,6 +464,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-display.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-ip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_avahi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_ipmi.Plo@am__quote@ @@ -532,6 +530,13 @@ libnutscan_la-nutscan-display.lo: nutscan-display.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c +libnutscan_la-nutscan-init.lo: nutscan-init.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-init.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-init.Tpo -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-init.Tpo $(DEPDIR)/libnutscan_la-nutscan-init.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-init.c' object='libnutscan_la-nutscan-init.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c + libnutscan_la-scan_usb.lo: scan_usb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_usb.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_usb.Tpo -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_usb.Tpo $(DEPDIR)/libnutscan_la-scan_usb.Plo @@ -579,6 +584,26 @@ mostlyclean-libtool: 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=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +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 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -669,7 +694,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -723,7 +748,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-includeHEADERS install-dvi: install-dvi-am @@ -769,7 +794,8 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES +uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES .MAKE: all check install install-am install-strip @@ -780,13 +806,14 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES html-am info info-am install install-am install-binPROGRAMS \ 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-libLTLIBRARIES \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-libLTLIBRARIES + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES nutscan-usb.h nutscan-snmp.h: diff --git a/tools/nut-scanner/README b/tools/nut-scanner/README new file mode 100644 index 0000000..d6e9d59 --- /dev/null +++ b/tools/nut-scanner/README @@ -0,0 +1,114 @@ +NUT device discovery +==================== + +Introduction +------------ + +linkman:nut-scanner[8] is available to discover supported NUT devices +(USB, SNMP, Eaton XML/HTTP and IPMI) and NUT servers (using Avahi or the +classic connection method). + +This tool actually use a library, called *libnutscan*, to perform actual +processing. + + +Client access library +~~~~~~~~~~~~~~~~~~~~~ + +The nutscan library can be linked into other programs to give access +to NUT discovery. Both static and shared versions are provided. + +linkman:nut-scanner[8] is provided as an example of how to use the nutscan +functions. + +Here is a simple example that scans for USB devices, and use its own +iteration function to display results: + + #include + #include + #include + + /* Only enable USB scan */ + #define HAVE_USB_H + + #include "nut-scan.h" + + int main() + { + nutscan_options_t * opt; + nutscan_device_t *device; + + if ((device = nutscan_scan_usb()) == NULL) { + printf("No device found\n"); + exit(EXIT_FAILURE); + } + + /* Rewind the list */ + while(device->prev != NULL) { + device = device->prev; + } + + /* Print results */ + do { + printf("USB device found\n\tdriver: \"%s\"\n\tport: \"%s\"\n", + device->driver, device->port); + + /* process options (serial number, bus, ...) */ + opt = &(device->opt); + do { + if( opt->option != NULL ) { + printf("\t%s",opt->option); + if( opt->value != NULL ) { + printf(": \"%s\"", opt->value); + } + printf("\n"); + } + opt = opt->next; + } while( opt != NULL ); + + device = device->next; + } + while( device != NULL ); + + exit(EXIT_SUCCESS); + } + + +This library file and the associated header files are not installed by +default. You must `./configure --with-lib` to enable building and +installing these files. The libraries can then be built and installed +with `make` and `make install` as usual. This must be done before +building other (non-NUT) programs which depend on them. + +For more information, refer to the linkman:nutscan[3], +manual page and the various +link:man/index.html#devscan[nutscan_*(3)] functions documentation +referenced in the same file. + + +Configuration helpers +~~~~~~~~~~~~~~~~~~~~~ + +NUT provides helper scripts to ease the configuration step of your program, by +detecting the right compilation and link flags. + +For more information, refer to a +<>. + + +Python +------ + +Python support for NUT discovery features is not yet available. + + +Perl +---- + +Perl support for NUT discovery features is not yet available. + + +Java +---- + +Java support for NUT discovery features is not yet available. diff --git a/tools/nut-scanner/nut-scan.h b/tools/nut-scanner/nut-scan.h index c5ce748..affcc77 100644 --- a/tools/nut-scanner/nut-scan.h +++ b/tools/nut-scanner/nut-scan.h @@ -19,6 +19,7 @@ #ifndef NUT_SCAN_H #define NUT_SCAN_H +#include #include #include @@ -36,29 +37,19 @@ typedef struct nutscan_snmp { } nutscan_snmp_t; /* Scanning */ -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H nutscan_device_t * nutscan_scan_snmp(const char * start_ip,const char * stop_ip,long usec_timeout, nutscan_snmp_t * sec); -#endif -#ifdef HAVE_USB_H nutscan_device_t * nutscan_scan_usb(); -#endif -#ifdef WITH_NEON nutscan_device_t * nutscan_scan_xml_http(long usec_timeout); -#endif nutscan_device_t * nutscan_scan_nut(const char * startIP, const char * stopIP, const char * port, long usec_timeout); -#ifdef HAVE_AVAHI_CLIENT_CLIENT_H nutscan_device_t * nutscan_scan_avahi(long usec_timeout); -#endif -#ifdef HAVE_FREEIPMI_FREEIPMI_H nutscan_device_t * nutscan_scan_ipmi(void); -#endif -/* Displaying */ +/* Display functions */ void nutscan_display_ups_conf(nutscan_device_t * device); void nutscan_display_parsable(nutscan_device_t * device); diff --git a/tools/nut-scanner/nut-scanner.c b/tools/nut-scanner/nut-scanner.c index b42dbca..2114674 100644 --- a/tools/nut-scanner/nut-scanner.c +++ b/tools/nut-scanner/nut-scanner.c @@ -21,6 +21,7 @@ #include #include #include "common.h" +#include "nut_version.h" #include #include #ifdef HAVE_PTHREAD @@ -31,7 +32,9 @@ #define DEFAULT_TIMEOUT 5 -const char optstring[] = "?ht:s:e:c:l:u:W:X:w:x:p:CUSMOAm:NPqI"; +#define ERR_BAD_OPTION (-1) + +const char optstring[] = "?ht:s:e:c:l:u:W:X:w:x:p:CUSMOAm:NPqIVa"; #ifdef HAVE_GETOPT_LONG const struct option longopts[] = @@ -58,13 +61,14 @@ const struct option longopts[] = { "disp_parsable",no_argument,NULL,'P' }, { "quiet",no_argument,NULL,'q' }, { "help",no_argument,NULL,'h' }, + { "version",no_argument,NULL,'V' }, + { "available",no_argument,NULL,'a' }, {NULL,0,NULL,0}}; #else #define getopt_long(a,b,c,d,e) getopt(a,b,c) #endif /* HAVE_GETOPT_LONG */ static nutscan_device_t *dev[TYPE_END]; -static pthread_t thread[TYPE_END]; static long timeout = DEFAULT_TIMEOUT*1000*1000; /* in usec */ static char * start_ip = NULL; @@ -72,14 +76,13 @@ static char * end_ip = NULL; static char * port = NULL; #ifdef HAVE_PTHREAD -#ifdef HAVE_USB_H +static pthread_t thread[TYPE_END]; + static void * run_usb(void * arg) { dev[TYPE_USB] = nutscan_scan_usb(); return NULL; } -#endif -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H static void * run_snmp(void * arg) { nutscan_snmp_t * sec = (nutscan_snmp_t *)arg; @@ -87,14 +90,11 @@ static void * run_snmp(void * arg) dev[TYPE_SNMP] = nutscan_scan_snmp(start_ip,end_ip,timeout,sec); return NULL; } -#endif -#ifdef WITH_NEON static void * run_xml(void * arg) { dev[TYPE_XML] = nutscan_scan_xml_http(timeout); return NULL; } -#endif static void * run_nut_old(void * arg) { @@ -102,20 +102,16 @@ static void * run_nut_old(void * arg) return NULL; } -#ifdef HAVE_AVAHI_CLIENT_CLIENT_H static void * run_avahi(void * arg) { dev[TYPE_AVAHI] = nutscan_scan_avahi(timeout); return NULL; } -#endif -#ifdef HAVE_FREEIPMI_FREEIPMI_H static void * run_ipmi(void * arg) { dev[TYPE_IPMI] = nutscan_scan_ipmi(); return NULL; } -#endif #endif /* HAVE_PTHREAD */ static int printq(int quiet,const char *fmt, ...) { @@ -147,9 +143,12 @@ int main(int argc, char *argv[]) int allow_ipmi = 0; int quiet = 0; void (*display_func)(nutscan_device_t * device); + int ret_code = EXIT_SUCCESS; memset(&sec,0,sizeof(sec)); + nutscan_init(); + display_func = nutscan_display_ups_conf; while((opt_ret = getopt_long(argc, argv, optstring, longopts, NULL))!=-1) { @@ -172,63 +171,87 @@ int main(int argc, char *argv[]) case 'm': cidr = strdup(optarg); break; -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H case 'c': + if(!nutscan_avail_snmp) { + goto display_help; + } sec.community = strdup(optarg); break; case 'l': + if(!nutscan_avail_snmp) { + goto display_help; + } sec.secLevel = strdup(optarg); break; case 'u': + if(!nutscan_avail_snmp) { + goto display_help; + } sec.secName = strdup(optarg); break; case 'W': + if(!nutscan_avail_snmp) { + goto display_help; + } sec.authPassword = strdup(optarg); break; case 'X': + if(!nutscan_avail_snmp) { + goto display_help; + } sec.privPassword = strdup(optarg); break; case 'w': + if(!nutscan_avail_snmp) { + goto display_help; + } sec.authProtocol = strdup(optarg); break; case 'x': + if(!nutscan_avail_snmp) { + goto display_help; + } sec.privProtocol = strdup(optarg); break; -#endif + case 'S': + if(!nutscan_avail_snmp) { + goto display_help; + } + allow_snmp = 1; + break; case 'p': port = strdup(optarg); break; case 'C': allow_all = 1; break; -#ifdef HAVE_USB_H case 'U': + if(!nutscan_avail_usb) { + goto display_help; + } allow_usb = 1; break; -#endif -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H - case 'S': - allow_snmp = 1; - break; -#endif -#ifdef WITH_NEON case 'M': + if(!nutscan_avail_xml_http) { + goto display_help; + } allow_xml = 1; break; -#endif case 'O': allow_oldnut = 1; break; -#ifdef WITH_AVAHI case 'A': + if(!nutscan_avail_avahi) { + goto display_help; + } allow_avahi = 1; break; -#endif -#ifdef HAVE_FREEIPMI_FREEIPMI_H case 'I': + if(!nutscan_avail_ipmi) { + goto display_help; + } allow_ipmi = 1; break; -#endif case 'N': display_func = nutscan_display_ups_conf; break; @@ -238,51 +261,79 @@ int main(int argc, char *argv[]) case 'q': quiet = 1; break; - case 'h': + case 'V': + printf("Network UPS Tools - %s\n", NUT_VERSION_MACRO); + exit(EXIT_SUCCESS); + case 'a': + printf("OLDNUT\n"); + if(nutscan_avail_usb) { + printf("USB\n"); + } + if(nutscan_avail_snmp) { + printf("SNMP\n"); + } + if(nutscan_avail_xml_http) { + printf("XML\n"); + } + if(nutscan_avail_avahi) { + printf("AVAHI\n"); + } + if(nutscan_avail_ipmi) { + printf("IPMI\n"); + } + exit(EXIT_SUCCESS); case '?': + ret_code = ERR_BAD_OPTION; + case 'h': default: - puts("nut-scanner : detecting available UPS.\n"); +display_help: + puts("nut-scanner : detecting available power devices.\n"); puts("OPTIONS:"); - printf(" -C, --complete_scan : Scan all available devices (default).\n"); -#ifdef HAVE_USB_H - printf(" -U, --usb_scan : Scan USB devices.\n"); -#endif -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H - printf(" -S, --snmp_scan : Scan SNMP devices.\n"); -#endif -#ifdef WITH_NEON - printf(" -M, --xml_scan : Scan XML/HTTP devices.\n"); -#endif - printf(" -O, --oldnut_scan : Scan NUT devices (old method).\n"); -#ifdef WITH_AVAHI - printf(" -A, --avahi_scan : Scan NUT devices (avahi method).\n"); -#endif -#ifdef HAVE_FREEIPMI_FREEIPMI_H - printf(" -I, --ipmi_scan : Scan IPMI devices.\n"); -#endif + printf(" -C, --complete_scan: Scan all available devices (default).\n"); + if( nutscan_avail_usb ) { + printf(" -U, --usb_scan: Scan USB devices.\n"); + } + if( nutscan_avail_snmp ) { + printf(" -S, --snmp_scan: Scan SNMP devices.\n"); + } + if( nutscan_avail_xml_http ) { + printf(" -M, --xml_scan: Scan XML/HTTP devices.\n"); + } + printf(" -O, --oldnut_scan: Scan NUT devices (old method).\n"); + if( nutscan_avail_avahi ) { + printf(" -A, --avahi_scan: Scan NUT devices (avahi method).\n"); + } + if( nutscan_avail_ipmi ) { + printf(" -I, --ipmi_scan: Scan IPMI devices.\n"); + } printf(" -t, --timeout : network operation timeout (default %d).\n",DEFAULT_TIMEOUT); printf(" -s, --start_ip : First IP address to scan.\n"); printf(" -e, --end_ip : Last IP address to scan.\n"); + printf(" -m, --mask_cidr : Give a range of IP using CIDR notation.\n"); -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H - printf("\nSNMP v1 specific options:\n"); - printf(" -c, --community : Set SNMP v1 community name (default = public)\n"); + if( nutscan_avail_snmp ) { + printf("\nSNMP v1 specific options:\n"); + printf(" -c, --community : Set SNMP v1 community name (default = public)\n"); - printf("\nSNMP v3 specific options:\n"); - printf(" -l, --secLevel : Set the securityLevel used for SNMPv3 messages (allowed values: noAuthNoPriv,authNoPriv,authPriv)\n"); - printf(" -u, --secName : Set the securityName used for authenticated SNMPv3 messages (mandatory if you set secLevel. No default)\n"); - printf(" -a, --authProtocol : Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 messages (default=MD5)\n"); - printf(" -A, --authPassword : Set the authentication pass phrase used for authenticated SNMPv3 messages (mandatory if you set secLevel to authNoPriv or authPriv)\n"); - printf(" -x, --privProtocol : Set the privacy protocol (DES or AES) used for encrypted SNMPv3 messages (default=DES)\n"); - printf(" -X, --privPassword : Set the privacy pass phrase used for encrypted SNMPv3 messages (mandatory if you set secLevel to authPriv)\n"); -#endif + printf("\nSNMP v3 specific options:\n"); + printf(" -l, --secLevel : Set the securityLevel used for SNMPv3 messages (allowed values: noAuthNoPriv,authNoPriv,authPriv)\n"); + printf(" -u, --secName : Set the securityName used for authenticated SNMPv3 messages (mandatory if you set secLevel. No default)\n"); + printf(" -w, --authProtocol : Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 messages (default=MD5)\n"); + printf(" -W, --authPassword : Set the authentication pass phrase used for authenticated SNMPv3 messages (mandatory if you set secLevel to authNoPriv or authPriv)\n"); + printf(" -x, --privProtocol : Set the privacy protocol (DES or AES) used for encrypted SNMPv3 messages (default=DES)\n"); + printf(" -X, --privPassword : Set the privacy pass phrase used for encrypted SNMPv3 messages (mandatory if you set secLevel to authPriv)\n"); + } - printf("\nNUT device specific options:\n"); - printf(" -p, --port : Port number of remote NUT devices\n"); + printf("\nNUT specific options:\n"); + printf(" -p, --port : Port number of remote NUT upsd\n"); printf("\ndisplay specific options:\n"); - printf(" -N, --disp_nut_conf : Display result in the ups.conf format\n"); - printf(" -P, --disp_parsable : Display result in a parsable format\n"); - return 0; + printf(" -N, --disp_nut_conf: Display result in the ups.conf format\n"); + printf(" -P, --disp_parsable: Display result in a parsable format\n"); + printf("\nMiscellaneous options:\n"); + printf(" -V, --version: Display NUT version\n"); + printf(" -a, --available: Display available bus that can be scanned\n"); + printf(" -q, --quiet: Display only scan result. No information on currently scanned bus is displayed.\n"); + return ret_code; } } @@ -296,120 +347,128 @@ int main(int argc, char *argv[]) allow_all = 1; } -#ifdef HAVE_USB_H - if( allow_all || allow_usb) { + if( allow_all ) { + allow_usb = 1; + allow_snmp = 1; + allow_xml = 1; + allow_oldnut = 1; + allow_avahi = 1; + allow_ipmi = 1; + } + + if( allow_usb && nutscan_avail_usb ) { printq(quiet,"Scanning USB bus.\n"); #ifdef HAVE_PTHREAD - pthread_create(&thread[TYPE_USB],NULL,run_usb,NULL); + if(pthread_create(&thread[TYPE_USB],NULL,run_usb,NULL)) { + nutscan_avail_usb = 0; + } #else dev[TYPE_USB] = nutscan_scan_usb(); -#endif +#endif /* HAVE_PTHREAD */ } -#endif /* HAVE_USB_H */ -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H - if( allow_all || allow_snmp) { + if( allow_snmp && nutscan_avail_snmp ) { if( start_ip == NULL ) { printq(quiet,"No start IP, skipping SNMP\n"); } else { printq(quiet,"Scanning SNMP bus.\n"); #ifdef HAVE_PTHREAD - pthread_create(&thread[TYPE_SNMP],NULL,run_snmp,&sec); + if( pthread_create(&thread[TYPE_SNMP],NULL,run_snmp,&sec)) { + nutscan_avail_snmp = 0; + } #else dev[TYPE_SNMP] = nutscan_scan_snmp(start_ip,end_ip,timeout,&sec); -#endif +#endif /* HAVE_PTHREAD */ } } -#endif /* HAVE_NET_SNMP_NET_SNMP_CONFIG_H */ -#ifdef WITH_NEON - if( allow_all || allow_xml) { + if( allow_xml && nutscan_avail_xml_http) { printq(quiet,"Scanning XML/HTTP bus.\n"); #ifdef HAVE_PTHREAD - pthread_create(&thread[TYPE_XML],NULL,run_xml,NULL); + if(pthread_create(&thread[TYPE_XML],NULL,run_xml,NULL)) { + nutscan_avail_xml_http = 0; + } #else dev[TYPE_XML] = nutscan_scan_xml_http(timeout); -#endif +#endif /* HAVE_PTHREAD */ } -#endif - if( allow_all || allow_oldnut) { + if( allow_oldnut && nutscan_avail_nut) { if( start_ip == NULL ) { printq(quiet,"No start IP, skipping NUT bus (old connect method)\n"); } else { printq(quiet,"Scanning NUT bus (old connect method).\n"); #ifdef HAVE_PTHREAD - pthread_create(&thread[TYPE_NUT],NULL,run_nut_old,NULL); + if(pthread_create(&thread[TYPE_NUT],NULL,run_nut_old,NULL)) { + nutscan_avail_nut = 0; + } #else dev[TYPE_NUT] = nutscan_scan_nut(start_ip,end_ip,port,timeout); -#endif +#endif /* HAVE_PTHREAD */ } } -#ifdef HAVE_AVAHI_CLIENT_CLIENT_H - if( allow_all || allow_avahi) { + if( allow_avahi && nutscan_avail_avahi) { printq(quiet,"Scanning NUT bus (avahi method).\n"); #ifdef HAVE_PTHREAD - pthread_create(&thread[TYPE_AVAHI],NULL,run_avahi,NULL); + if(pthread_create(&thread[TYPE_AVAHI],NULL,run_avahi,NULL)) { + nutscan_avail_avahi = 0; + } #else - dev[TYPE_AVAHI] = nutscan_scan_avahi(); -#endif + dev[TYPE_AVAHI] = nutscan_scan_avahi(timeout); +#endif /* HAVE_PTHREAD */ } -#endif -#ifdef HAVE_FREEIPMI_FREEIPMI_H - if( allow_all || allow_ipmi) { + if( allow_ipmi && nutscan_avail_ipmi) { printq(quiet,"Scanning IPMI bus.\n"); #ifdef HAVE_PTHREAD - pthread_create(&thread[TYPE_IPMI],NULL,run_ipmi,NULL); + if(pthread_create(&thread[TYPE_IPMI],NULL,run_ipmi,NULL)) { + nutscan_avail_ipmi = 0; + } #else dev[TYPE_IPMI] = nutscan_scan_ipmi(); -#endif +#endif /* HAVE_PTHREAD */ } -#endif #ifdef HAVE_PTHREAD -#ifdef HAVE_USB_H - pthread_join(thread[TYPE_USB],NULL); -#endif -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H - pthread_join(thread[TYPE_SNMP],NULL); -#endif -#ifdef WITH_NEON - pthread_join(thread[TYPE_XML],NULL); -#endif - pthread_join(thread[TYPE_NUT],NULL); -#ifdef HAVE_AVAHI_CLIENT_CLIENT_H - pthread_join(thread[TYPE_AVAHI],NULL); -#endif -#ifdef HAVE_FREEIPMI_FREEIPMI_H - pthread_join(thread[TYPE_IPMI],NULL); -#endif + if( allow_usb && nutscan_avail_usb ) { + pthread_join(thread[TYPE_USB],NULL); + } + if( allow_snmp && nutscan_avail_snmp ) { + pthread_join(thread[TYPE_SNMP],NULL); + } + if( allow_xml && nutscan_avail_xml_http ) { + pthread_join(thread[TYPE_XML],NULL); + } + if( allow_oldnut && nutscan_avail_nut ) { + pthread_join(thread[TYPE_NUT],NULL); + } + if( allow_avahi && nutscan_avail_avahi ) { + pthread_join(thread[TYPE_AVAHI],NULL); + } + if( allow_ipmi && nutscan_avail_ipmi ) { + pthread_join(thread[TYPE_IPMI],NULL); + } #endif /* HAVE_PTHREAD */ -#ifdef HAVE_USB_H display_func(dev[TYPE_USB]); nutscan_free_device(dev[TYPE_USB]); -#endif -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H + display_func(dev[TYPE_SNMP]); nutscan_free_device(dev[TYPE_SNMP]); -#endif -#ifdef WITH_NEON + display_func(dev[TYPE_XML]); nutscan_free_device(dev[TYPE_XML]); -#endif + display_func(dev[TYPE_NUT]); nutscan_free_device(dev[TYPE_NUT]); -#ifdef HAVE_AVAHI_CLIENT_CLIENT_H + display_func(dev[TYPE_AVAHI]); nutscan_free_device(dev[TYPE_AVAHI]); -#endif -#ifdef HAVE_FREEIPMI_FREEIPMI_H + display_func(dev[TYPE_IPMI]); nutscan_free_device(dev[TYPE_IPMI]); -#endif return EXIT_SUCCESS; } diff --git a/tools/nut-scanner/nutscan-init.c b/tools/nut-scanner/nutscan-init.c new file mode 100644 index 0000000..f668546 --- /dev/null +++ b/tools/nut-scanner/nutscan-init.c @@ -0,0 +1,52 @@ +/* nutscan-init.c: init functions for nut scanner library + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 + */ + +#include "common.h" + +int nutscan_avail_avahi = 0; +int nutscan_avail_ipmi = 0; +int nutscan_avail_nut = 1; +int nutscan_avail_snmp = 0; +int nutscan_avail_usb = 0; +int nutscan_avail_xml_http = 0; + +int nutscan_load_usb_library(void); +int nutscan_load_snmp_library(void); +int nutscan_load_neon_library(void); +int nutscan_load_avahi_library(void); +int nutscan_load_ipmi_library(void); + +void nutscan_init(void) +{ +#ifdef WITH_USB + nutscan_avail_usb = nutscan_load_usb_library(); +#endif +#ifdef WITH_SNMP + nutscan_avail_snmp = nutscan_load_snmp_library(); +#endif +#ifdef WITH_NEON + nutscan_avail_xml_http = nutscan_load_neon_library(); +#endif +#ifdef WITH_AVAHI + nutscan_avail_avahi = nutscan_load_avahi_library(); +#endif +#ifdef WITH_FREEIPMI + nutscan_avail_ipmi = nutscan_load_ipmi_library(); +#endif +} diff --git a/tools/nut-scanner/nutscan-init.h b/tools/nut-scanner/nutscan-init.h new file mode 100644 index 0000000..e952e6c --- /dev/null +++ b/tools/nut-scanner/nutscan-init.h @@ -0,0 +1,30 @@ +/* nutscan-init.h: initialisation data + * + * Copyright (C) 2011 - Frederic Bohe + * + * 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 SCAN_INIT +#define SCAN_INIT + +extern int nutscan_avail_avahi; +extern int nutscan_avail_ipmi; +extern int nutscan_avail_nut; +extern int nutscan_avail_snmp; +extern int nutscan_avail_usb; +extern int nutscan_avail_xml_http; + +void nutscan_init(void); +#endif diff --git a/tools/nut-scanner/nutscan-ip.c b/tools/nut-scanner/nutscan-ip.c index 97fbffb..8788018 100644 --- a/tools/nut-scanner/nutscan-ip.c +++ b/tools/nut-scanner/nutscan-ip.c @@ -20,6 +20,9 @@ #include "nutscan-ip.h" #include #include "common.h" +#include +#include +#include static void increment_IPv6(struct in6_addr * addr) { @@ -42,12 +45,38 @@ static void invert_IPv6(struct in6_addr * addr1, struct in6_addr * addr2) memcpy(addr2->s6_addr,addr.s6_addr,sizeof(addr.s6_addr)); } +static int ntop( struct in_addr * ip, char * host, size_t host_size) +{ + struct sockaddr_in in; + memset(&in,0,sizeof(struct sockaddr_in)); + in.sin_addr = *ip; + in.sin_family = AF_INET; + return getnameinfo((struct sockaddr *)&in, + sizeof(struct sockaddr_in), + host,host_size,NULL,0,NI_NUMERICHOST); +} + +static int ntop6( struct in6_addr * ip, char * host, size_t host_size) +{ + struct sockaddr_in6 in6; + memset(&in6,0,sizeof(struct sockaddr_in6)); + memcpy( &in6.sin6_addr, ip, sizeof(struct in6_addr) ); + in6.sin6_family = AF_INET6; + return getnameinfo((struct sockaddr *)&in6, + sizeof(struct sockaddr_in6), + host,host_size,NULL,0,NI_NUMERICHOST); +} + /* Return the first ip or NULL if error */ char * nutscan_ip_iter_init(nutscan_ip_iter_t * ip, const char * startIP, const char * stopIP) { int addr; int i; - char buf[SMALLBUF]; + struct addrinfo hints; + struct addrinfo *res; + struct sockaddr_in * s_in; + struct sockaddr_in6 * s_in6; + char host[SMALLBUF]; if( startIP == NULL ) { return NULL; @@ -57,29 +86,51 @@ char * nutscan_ip_iter_init(nutscan_ip_iter_t * ip, const char * startIP, const stopIP = startIP; } + memset(&hints,0,sizeof(struct addrinfo)); + hints.ai_family = AF_INET; + ip->type = IPv4; /* Detecting IPv4 vs IPv6 */ - if(!inet_aton(startIP, &ip->start)) { + if(getaddrinfo(startIP,NULL,&hints,&res) != 0) { /*Try IPv6 detection */ ip->type = IPv6; - if(!inet_pton(AF_INET6, startIP, &ip->start6)){ + hints.ai_family = AF_INET6; + if(getaddrinfo(startIP,NULL,&hints,&res) != 0) { fprintf(stderr,"Invalid address : %s\n",startIP); return NULL; } + + s_in6 = (struct sockaddr_in6 *)res->ai_addr; + memcpy(&ip->start6,&s_in6->sin6_addr,sizeof(struct in6_addr)); + freeaddrinfo(res); + } + else { + s_in = (struct sockaddr_in *)res->ai_addr; + ip->start = s_in->sin_addr; + freeaddrinfo(res); } /* Compute stop IP */ if( ip->type == IPv4 ) { - if(!inet_aton(stopIP, &ip->stop)) { + hints.ai_family = AF_INET; + if(getaddrinfo(stopIP,NULL,&hints,&res) != 0) { fprintf(stderr,"Invalid address : %s\n",stopIP); return NULL; } + + s_in = (struct sockaddr_in *)res->ai_addr; + ip->stop = s_in->sin_addr; + freeaddrinfo(res); } else { - if(!inet_pton(AF_INET6, stopIP, &ip->stop6)){ + hints.ai_family = AF_INET6; + if(getaddrinfo(stopIP,NULL,&hints,&res) != 0) { fprintf(stderr,"Invalid address : %s\n",stopIP); return NULL; } + s_in6 = (struct sockaddr_in6 *)res->ai_addr; + memcpy(&ip->stop6,&s_in6->sin6_addr,sizeof(struct in6_addr)); + freeaddrinfo(res); } /* Make sure start IP is lesser than stop IP */ @@ -89,7 +140,12 @@ char * nutscan_ip_iter_init(nutscan_ip_iter_t * ip, const char * startIP, const ip->start.s_addr = ip->stop.s_addr; ip->stop.s_addr = addr; } - return strdup(inet_ntoa(ip->start)); + + if( ntop(&ip->start, host, sizeof(host)) != 0 ) { + return NULL; + } + + return strdup(host); } else { /* IPv6 */ for( i=0; i<16; i++ ) { @@ -100,7 +156,12 @@ char * nutscan_ip_iter_init(nutscan_ip_iter_t * ip, const char * startIP, const break; } } - return strdup(inet_ntop(AF_INET6,&ip->start6,buf,sizeof(buf))); + + if( ntop6(&ip->start6, host, sizeof(host)) != 0 ) { + return NULL; + } + + return strdup(host); } @@ -111,7 +172,7 @@ return NULL if there is no more IP */ char * nutscan_ip_iter_inc(nutscan_ip_iter_t * ip) { - char buf[SMALLBUF]; + char host[SMALLBUF]; if( ip->type == IPv4 ) { /* Check if this is the last address to scan */ @@ -122,7 +183,11 @@ char * nutscan_ip_iter_inc(nutscan_ip_iter_t * ip) byte order, then pass back in network byte order */ ip->start.s_addr = htonl((ntohl(ip->start.s_addr)+1)); - return strdup(inet_ntoa(ip->start)); + if( ntop(&ip->start, host, sizeof(host)) != 0 ) { + return NULL; + } + + return strdup(host); } else { /* Check if this is the last address to scan */ @@ -132,8 +197,11 @@ char * nutscan_ip_iter_inc(nutscan_ip_iter_t * ip) } increment_IPv6(&ip->start6); + if( ntop6(&ip->start6, host, sizeof(host)) != 0 ) { + return NULL; + } - return strdup(inet_ntop(AF_INET6,&ip->start6,buf,sizeof(buf))); + return strdup(host); } } @@ -146,8 +214,12 @@ int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip) nutscan_ip_iter_t ip; int mask_val; int mask_byte; - long mask_bit; - char buf[SMALLBUF]; + unsigned long mask_bit; + char host[SMALLBUF]; + struct addrinfo hints; + struct addrinfo *res; + struct sockaddr_in * s_in; + struct sockaddr_in6 * s_in6; *start_ip = NULL; *stop_ip = NULL; @@ -166,15 +238,30 @@ int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip) mask_val = atoi(mask); /* Detecting IPv4 vs IPv6 */ + memset(&hints,0,sizeof(struct addrinfo)); + hints.ai_family = AF_INET; + ip.type = IPv4; - if(!inet_aton(first_ip, &ip.start)) { - /*Try IPv6 detection */ - ip.type = IPv6; - if(!inet_pton(AF_INET6, first_ip, &ip.start6)){ + /* Detecting IPv4 vs IPv6 */ + if(getaddrinfo(first_ip,NULL,&hints,&res) != 0) { + /*Try IPv6 detection */ + ip.type = IPv6; + hints.ai_family = AF_INET6; + int ret; + if((ret=getaddrinfo(first_ip,NULL,&hints,&res)) != 0) { free(first_ip); - return 0; - } - } + return 0; + } + + s_in6 = (struct sockaddr_in6 *)res->ai_addr; + memcpy(&ip.start6,&s_in6->sin6_addr,sizeof(struct in6_addr)); + freeaddrinfo(res); + } + else { + s_in = (struct sockaddr_in *)res->ai_addr; + ip.start = s_in->sin_addr; + freeaddrinfo(res); + } if( ip.type == IPv4 ) { @@ -190,13 +277,31 @@ int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip) ip.stop.s_addr = htonl(ntohl(ip.start.s_addr)|mask_bit); ip.start.s_addr = htonl(ntohl(ip.start.s_addr)&(~mask_bit)); - *start_ip = strdup(inet_ntoa(ip.start)); - *stop_ip = strdup(inet_ntoa(ip.stop)); + if( ntop(&ip.start, host, sizeof(host)) != 0 ) { + *start_ip = NULL; + *stop_ip = NULL; + return 0; + } + *start_ip = strdup(host); + + if( ntop(&ip.stop, host, sizeof(host)) != 0 ) { + free(*start_ip); + *start_ip = NULL; + *stop_ip = NULL; + return 0; + } + *stop_ip = strdup(host); + free(first_ip); return 1; } else { - inet_pton(AF_INET6, first_ip, &ip.stop6); + if(getaddrinfo(first_ip,NULL,&hints,&res) != 0) { + return 0; + } + s_in6 = (struct sockaddr_in6 *)res->ai_addr; + memcpy(&ip.stop6,&s_in6->sin6_addr,sizeof(struct in6_addr)); + freeaddrinfo(res); mask_byte = mask_val / 8; if( mask_byte < 16 ) { @@ -208,10 +313,20 @@ int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip) ip.start6.s6_addr[mask_byte] &= (~mask_bit); } - inet_ntop(AF_INET6,&ip.start6,buf,sizeof(buf)); - *start_ip = strdup(buf); - inet_ntop(AF_INET6,&ip.stop6,buf,sizeof(buf)); - *stop_ip = strdup(buf); + if( ntop6(&ip.start6, host, sizeof(host)) != 0 ) { + *start_ip = NULL; + *stop_ip = NULL; + return 0; + } + *start_ip = strdup(host); + + if( ntop6(&ip.stop6, host, sizeof(host)) != 0 ) { + free(*start_ip); + *start_ip = NULL; + *stop_ip = NULL; + return 0; + } + *stop_ip = strdup(host); } free(first_ip); diff --git a/tools/nut-scanner/nutscan-ip.h b/tools/nut-scanner/nutscan-ip.h index 01f329f..fbae00b 100644 --- a/tools/nut-scanner/nutscan-ip.h +++ b/tools/nut-scanner/nutscan-ip.h @@ -19,9 +19,8 @@ #ifndef SCAN_IP #define SCAN_IP -#include -#include #include +#include enum network_type { IPv4, diff --git a/tools/nut-scanner/nutscan-snmp.h b/tools/nut-scanner/nutscan-snmp.h index a08a892..7af6cef 100644 --- a/tools/nut-scanner/nutscan-snmp.h +++ b/tools/nut-scanner/nutscan-snmp.h @@ -37,6 +37,7 @@ static snmp_device_id_t snmp_device_table[] = { { ".1.3.6.1.4.1.705.1.1.1.0" , "mge", ".1.3.6.1.4.1.705.1"}, { ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" , "apcc", NULL}, { ".1.3.6.1.4.1.4779.1.3.5.2.1.24.1" , "baytech", NULL}, + { ".1.3.6.1.4.1.3808.1.1.1.1.1.1.0" , "cyberpower", ".1.3.6.1.4.1.3808"}, { "1.3.6.1.4.1.232.165.3.1.1.0" , "cpqpower", NULL}, { ".1.3.6.1.4.1.4555.1.1.1.1.1.1.0" , "netvision", ".1.3.6.1.4.1.4555.1.1.1"}, /* Terminating entry */ diff --git a/tools/nut-scanner/nutscan-usb.h b/tools/nut-scanner/nutscan-usb.h index 6065e33..89a39fc 100644 --- a/tools/nut-scanner/nutscan-usb.h +++ b/tools/nut-scanner/nutscan-usb.h @@ -31,6 +31,7 @@ typedef struct { /* USB IDs device table */ static usb_device_id_t usb_device_table[] = { + { 0x0001, 0x0000, "blazer_usb" }, { 0x03f0, 0x1f01, "bcmxcp_usb" }, { 0x03f0, 0x1f02, "bcmxcp_usb" }, { 0x03f0, 0x1f06, "usbhid-ups" }, @@ -96,6 +97,7 @@ static usb_device_id_t usb_device_table[] = { { 0x09ae, 0x4006, "usbhid-ups" }, { 0x09ae, 0x4007, "usbhid-ups" }, { 0x09ae, 0x4008, "usbhid-ups" }, + { 0x0d9f, 0x0004, "usbhid-ups" }, { 0x0d9f, 0x00a2, "usbhid-ups" }, { 0x0d9f, 0x00a3, "usbhid-ups" }, { 0x0d9f, 0x00a4, "usbhid-ups" }, @@ -104,6 +106,7 @@ static usb_device_id_t usb_device_table[] = { { 0x0f03, 0x0001, "blazer_usb" }, { 0x10af, 0x0001, "usbhid-ups" }, { 0x14f0, 0x00c9, "blazer_usb" }, + { 0xffff, 0x0000, "blazer_usb" }, /* Terminating entry */ { -1, -1, NULL } }; diff --git a/tools/nut-scanner/scan_avahi.c b/tools/nut-scanner/scan_avahi.c index 6c4a74e..7763b36 100644 --- a/tools/nut-scanner/scan_avahi.c +++ b/tools/nut-scanner/scan_avahi.c @@ -17,14 +17,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "common.h" - -#ifdef HAVE_AVAHI_CLIENT_CLIENT_H #include "nut-scan.h" +#ifdef WITH_AVAHI + #include #include #include -#include +#include "timehead.h" #include #include @@ -33,6 +33,175 @@ #include #include +#include + +/* dynamic link library stuff */ +static lt_dlhandle dl_handle = NULL; +static const char *dl_error = NULL; + +static AvahiClient* (*nut_avahi_service_browser_get_client)(AvahiServiceBrowser *); +static int (*nut_avahi_simple_poll_loop)(AvahiSimplePoll *s); +static void (*nut_avahi_client_free)(AvahiClient *client); +static int (*nut_avahi_client_errno)(AvahiClient*); +static void (*nut_avahi_free)(void *p); +static void (*nut_avahi_simple_poll_quit)(AvahiSimplePoll *s); +static AvahiClient* (*nut_avahi_client_new)( + const AvahiPoll *poll_api, + AvahiClientFlags flags, + AvahiClientCallback callback, + void *userdata, + int *error); +static void (*nut_avahi_simple_poll_free)(AvahiSimplePoll *s); +static AvahiServiceResolver * (*nut_avahi_service_resolver_new)( + AvahiClient *client, + AvahiIfIndex interface, + AvahiProtocol protocol, + const char *name, + const char *type, + const char *domain, + AvahiProtocol aprotocol, + AvahiLookupFlags flags, + AvahiServiceResolverCallback callback, + void *userdata); +static const char * (*nut_avahi_strerror)(int error); +static AvahiClient* (*nut_avahi_service_resolver_get_client)(AvahiServiceResolver *); +static AvahiServiceBrowser* (*nut_avahi_service_browser_new)( + AvahiClient *client, + AvahiIfIndex interface, + AvahiProtocol protocol, + const char *type, + const char *domain, + AvahiLookupFlags flags, + AvahiServiceBrowserCallback callback, + void *userdata); +static int (*nut_avahi_service_resolver_free)(AvahiServiceResolver *r); +static AvahiSimplePoll *(*nut_avahi_simple_poll_new)(void); +static char* (*nut_avahi_string_list_to_string)(AvahiStringList *l); +static int (*nut_avahi_service_browser_free)(AvahiServiceBrowser *); +static char * (*nut_avahi_address_snprint)(char *ret_s, size_t length, const AvahiAddress *a); +static const AvahiPoll* (*nut_avahi_simple_poll_get)(AvahiSimplePoll *s); + +/* return 0 on error */ +int nutscan_load_avahi_library() +{ + if( dl_handle != NULL ) { + /* if previous init failed */ + if( dl_handle == (void *)1 ) { + return 0; + } + /* init has already been done */ + return 1; + } + + if( lt_dlinit() != 0 ) { + fprintf(stderr, "Error initializing lt_init\n"); + return 0; + } + + dl_handle = lt_dlopenext("libavahi-client"); + if (!dl_handle) { + dl_error = lt_dlerror(); + goto err; + } + lt_dlerror(); /* Clear any existing error */ + *(void **) (&nut_avahi_service_browser_get_client) = lt_dlsym(dl_handle, "avahi_service_browser_get_client"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_simple_poll_loop) = lt_dlsym(dl_handle, "avahi_simple_poll_loop"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_client_free) = lt_dlsym(dl_handle, "avahi_client_free"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_client_errno) = lt_dlsym(dl_handle, "avahi_client_errno"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_free) = lt_dlsym(dl_handle, "avahi_free"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_simple_poll_quit) = lt_dlsym(dl_handle, "avahi_simple_poll_quit"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_client_new) = lt_dlsym(dl_handle, "avahi_client_new"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_simple_poll_free) = lt_dlsym(dl_handle, "avahi_simple_poll_free"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_service_resolver_new) = lt_dlsym(dl_handle, "avahi_service_resolver_new"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_strerror) = lt_dlsym(dl_handle, "avahi_strerror"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_service_resolver_get_client) = lt_dlsym(dl_handle, "avahi_service_resolver_get_client"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_service_browser_new) = lt_dlsym(dl_handle, "avahi_service_browser_new"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_service_resolver_free) = lt_dlsym(dl_handle, "avahi_service_resolver_free"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_simple_poll_new) = lt_dlsym(dl_handle, "avahi_simple_poll_new"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_string_list_to_string) = lt_dlsym(dl_handle, "avahi_string_list_to_string"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_service_browser_free) = lt_dlsym(dl_handle, "avahi_service_browser_free"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_address_snprint) = lt_dlsym(dl_handle, "avahi_address_snprint"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_avahi_simple_poll_get) = lt_dlsym(dl_handle, "avahi_simple_poll_get"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + return 1; +err: + fprintf(stderr, "%s\n", dl_error); + dl_handle = (void *)1; + return 0; +} +/* end of dynamic link library stuff */ + static AvahiSimplePoll *simple_poll = NULL; static nutscan_device_t * dev_ret = NULL; static long avahi_usec_timeout = 0; @@ -187,7 +356,7 @@ static void resolve_callback( switch (event) { case AVAHI_RESOLVER_FAILURE: - fprintf(stderr, "(Resolver) Failed to resolve service '%s' of type '%s' in domain '%s': %s\n", name, type, domain, avahi_strerror(avahi_client_errno(avahi_service_resolver_get_client(r)))); + fprintf(stderr, "(Resolver) Failed to resolve service '%s' of type '%s' in domain '%s': %s\n", name, type, domain, (*nut_avahi_strerror)((*nut_avahi_client_errno)((*nut_avahi_service_resolver_get_client)(r)))); break; case AVAHI_RESOLVER_FOUND: { @@ -195,8 +364,8 @@ static void resolve_callback( /* fprintf(stderr, "Service '%s' of type '%s' in domain '%s':\n", name, type, domain); */ - avahi_address_snprint(a, sizeof(a), address); - t = avahi_string_list_to_string(txt); + (*nut_avahi_address_snprint)(a, sizeof(a), address); + t = (*nut_avahi_string_list_to_string)(txt); /* fprintf(stderr, "\t%s:%u (%s)\n" @@ -217,11 +386,11 @@ static void resolve_callback( !!(flags & AVAHI_LOOKUP_RESULT_CACHED)); */ update_device(host_name,a,port,t,address->proto); - avahi_free(t); + (*nut_avahi_free)(t); } } - avahi_service_resolver_free(r); + (*nut_avahi_service_resolver_free)(r); } static void browse_callback( @@ -243,8 +412,8 @@ static void browse_callback( switch (event) { case AVAHI_BROWSER_FAILURE: - fprintf(stderr, "(Browser) %s\n", avahi_strerror(avahi_client_errno(avahi_service_browser_get_client(b)))); - avahi_simple_poll_quit(simple_poll); + fprintf(stderr, "(Browser) %s\n", (*nut_avahi_strerror)((*nut_avahi_client_errno)((*nut_avahi_service_browser_get_client)(b)))); + (*nut_avahi_simple_poll_quit)(simple_poll); return; case AVAHI_BROWSER_NEW: @@ -255,8 +424,8 @@ static void browse_callback( the callback function is called the server will free the resolver for us. */ - if (!(avahi_service_resolver_new(c, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, resolve_callback, c))) - fprintf(stderr, "Failed to resolve service '%s': %s\n", name, avahi_strerror(avahi_client_errno(c))); + if (!((*nut_avahi_service_resolver_new)(c, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, resolve_callback, c))) + fprintf(stderr, "Failed to resolve service '%s': %s\n", name, (*nut_avahi_strerror)((*nut_avahi_client_errno)(c))); break; @@ -265,7 +434,7 @@ static void browse_callback( break; case AVAHI_BROWSER_ALL_FOR_NOW: - avahi_simple_poll_quit(simple_poll); + (*nut_avahi_simple_poll_quit)(simple_poll); case AVAHI_BROWSER_CACHE_EXHAUSTED: /* fprintf(stderr, "(Browser) %s\n", event == AVAHI_BROWSER_CACHE_EXHAUSTED ? "CACHE_EXHAUSTED" : "ALL_FOR_NOW"); */ break; @@ -278,8 +447,8 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN /* Called whenever the client or server state changes */ if (state == AVAHI_CLIENT_FAILURE) { - fprintf(stderr, "Server connection failure: %s\n", avahi_strerror(avahi_client_errno(c))); - avahi_simple_poll_quit(simple_poll); + fprintf(stderr, "Server connection failure: %s\n", (*nut_avahi_strerror)((*nut_avahi_client_errno)(c))); + (*nut_avahi_simple_poll_quit)(simple_poll); } } @@ -291,48 +460,55 @@ nutscan_device_t * nutscan_scan_avahi(long usec_timeout) AvahiClient *client = NULL; AvahiServiceBrowser *sb = NULL; int error; - int ret = 1; + + if( !nutscan_avail_avahi ) { + return NULL; + } avahi_usec_timeout = usec_timeout; /* Allocate main loop object */ - if (!(simple_poll = avahi_simple_poll_new())) { + if (!(simple_poll = (*nut_avahi_simple_poll_new)())) { fprintf(stderr, "Failed to create simple poll object.\n"); goto fail; } /* Allocate a new client */ - client = avahi_client_new(avahi_simple_poll_get(simple_poll), 0, client_callback, NULL, &error); + client = (*nut_avahi_client_new)((*nut_avahi_simple_poll_get)(simple_poll), 0, client_callback, NULL, &error); /* Check wether creating the client object succeeded */ if (!client) { - fprintf(stderr, "Failed to create client: %s\n", avahi_strerror(error)); + fprintf(stderr, "Failed to create client: %s\n", (*nut_avahi_strerror)(error)); goto fail; } /* Create the service browser */ - if (!(sb = avahi_service_browser_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_upsd._tcp", NULL, 0, browse_callback, client))) { - fprintf(stderr, "Failed to create service browser: %s\n", avahi_strerror(avahi_client_errno(client))); + if (!(sb = (*nut_avahi_service_browser_new)(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_upsd._tcp", NULL, 0, browse_callback, client))) { + fprintf(stderr, "Failed to create service browser: %s\n", (*nut_avahi_strerror)((*nut_avahi_client_errno)(client))); goto fail; } /* Run the main loop */ - avahi_simple_poll_loop(simple_poll); - - ret = 0; + (*nut_avahi_simple_poll_loop)(simple_poll); fail: /* Cleanup things */ if (sb) - avahi_service_browser_free(sb); + (*nut_avahi_service_browser_free)(sb); if (client) - avahi_client_free(client); + (*nut_avahi_client_free)(client); if (simple_poll) - avahi_simple_poll_free(simple_poll); + (*nut_avahi_simple_poll_free)(simple_poll); return dev_ret; } -#endif /* HAVE_AVAHI_CLIENT_CLIENT_H */ +#else /* WITH_AVAHI */ +/* stub function */ +nutscan_device_t * nutscan_scan_avahi(long usec_timeout) +{ + return NULL; +} +#endif /* WITH_AVAHI */ diff --git a/tools/nut-scanner/scan_ipmi.c b/tools/nut-scanner/scan_ipmi.c index 145e281..eac17c3 100644 --- a/tools/nut-scanner/scan_ipmi.c +++ b/tools/nut-scanner/scan_ipmi.c @@ -1,6 +1,6 @@ /* scan_ipmi.c: detect NUT supported Power Supply Units * - * Copyright (C) 2011 - Frederic Bohe + * Copyright (C) 2011 - Arnaud Quette * * 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 @@ -17,13 +17,321 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "common.h" - -#ifdef HAVE_FREEIPMI_FREEIPMI_H #include "nut-scan.h" -/* TODO */ +#ifdef WITH_IPMI +#include "upsclient.h" +#include +#include +#include +#include + +#define NUT_IPMI_DRV_NAME "nut-ipmipsu" + +/* dynamic link library stuff */ +static lt_dlhandle dl_handle = NULL; +static const char *dl_error = NULL; + +static int (*nut_ipmi_fru_parse_close_device_id) (ipmi_fru_parse_ctx_t ctx); +static void (*nut_ipmi_fru_parse_ctx_destroy) (ipmi_fru_parse_ctx_t ctx); +static void (*nut_ipmi_sdr_cache_ctx_destroy) (ipmi_sdr_cache_ctx_t ctx); +static void (*nut_ipmi_sdr_parse_ctx_destroy) (ipmi_sdr_parse_ctx_t ctx); +static ipmi_fru_parse_ctx_t (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx_t ipmi_ctx); +static int (*nut_ipmi_fru_parse_ctx_set_flags) (ipmi_fru_parse_ctx_t ctx, unsigned int flags); +static int (*nut_ipmi_fru_parse_open_device_id) (ipmi_fru_parse_ctx_t ctx, uint8_t fru_device_id); +static char * (*nut_ipmi_fru_parse_ctx_errormsg) (ipmi_fru_parse_ctx_t ctx); +static int (*nut_ipmi_fru_parse_read_data_area) (ipmi_fru_parse_ctx_t ctx, + unsigned int *area_type, + unsigned int *area_length, + void *areabuf, + unsigned int areabuflen); +static int (*nut_ipmi_fru_parse_next) (ipmi_fru_parse_ctx_t ctx); +static ipmi_ctx_t (*nut_ipmi_ctx_create) (void); +static int (*nut_ipmi_ctx_find_inband) (ipmi_ctx_t ctx, + ipmi_driver_type_t *driver_type, + int disable_auto_probe, + uint16_t driver_address, + uint8_t register_spacing, + const char *driver_device, + unsigned int workaround_flags, + unsigned int flags); +static char * (*nut_ipmi_ctx_errormsg) (ipmi_ctx_t ctx); +static int (*nut_ipmi_ctx_close) (ipmi_ctx_t ctx); +static void (*nut_ipmi_ctx_destroy) (ipmi_ctx_t ctx); + + +/* Return 0 on error */ +int nutscan_load_ipmi_library() +{ + if( dl_handle != NULL ) { + /* if previous init failed */ + if( dl_handle == (void *)1 ) { + return 0; + } + /* init has already been done */ + return 1; + } + + if( lt_dlinit() != 0 ) { + fprintf(stderr, "Error initializing lt_init\n"); + return 0; + } + + dl_handle = lt_dlopenext("libfreeipmi"); + if (!dl_handle) { + dl_error = lt_dlerror(); + goto err; + } + + /* Clear any existing error */ + lt_dlerror(); + + *(void **) (&nut_ipmi_fru_parse_close_device_id) = lt_dlsym(dl_handle, "ipmi_fru_parse_close_device_id"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_fru_parse_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_destroy"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_sdr_cache_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_sdr_cache_ctx_destroy"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_sdr_parse_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_sdr_parse_ctx_destroy"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_fru_parse_ctx_create) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_create"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_fru_parse_ctx_set_flags) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_set_flags"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_fru_parse_open_device_id) = lt_dlsym(dl_handle, "ipmi_fru_parse_open_device_id"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_fru_parse_ctx_errormsg) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_errormsg"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_fru_parse_read_data_area) = lt_dlsym(dl_handle, "ipmi_fru_parse_read_data_area"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_fru_parse_next) = lt_dlsym(dl_handle, "ipmi_fru_parse_next"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_ctx_create) = lt_dlsym(dl_handle, "ipmi_ctx_create"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_ctx_find_inband) = lt_dlsym(dl_handle, "ipmi_ctx_find_inband"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_ctx_errormsg) = lt_dlsym(dl_handle, "ipmi_ctx_errormsg"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_ctx_close) = lt_dlsym(dl_handle, "ipmi_ctx_close"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ipmi_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_ctx_destroy"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + return 1; +err: + fprintf(stderr, "%s\n", dl_error); + dl_handle = (void *)1; + return 0; +} +/* end of dynamic link library stuff */ + +/* Cleanup IPMI contexts */ +static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx, + ipmi_sdr_cache_ctx_t sdr_cache_ctx, + ipmi_sdr_parse_ctx_t sdr_parse_ctx) +{ + if (fru_parse_ctx) { + (*nut_ipmi_fru_parse_close_device_id) (fru_parse_ctx); + (*nut_ipmi_fru_parse_ctx_destroy) (fru_parse_ctx); + } + + if (sdr_cache_ctx) { + (*nut_ipmi_sdr_cache_ctx_destroy) (sdr_cache_ctx); + } + + if (sdr_parse_ctx) { + (*nut_ipmi_sdr_parse_ctx_destroy) (sdr_parse_ctx); + } +} + +/* Return 1 if supported, 0 otherwise */ +int is_ipmi_device_supported(ipmi_ctx_t ipmi_ctx, int ipmi_id) +{ + int ret = -1; + unsigned int area_type = 0; + unsigned int area_length = 0; + uint8_t areabuf[IPMI_FRU_PARSE_AREA_SIZE_MAX+1]; + ipmi_fru_parse_ctx_t fru_parse_ctx = NULL; + ipmi_sdr_cache_ctx_t sdr_cache_ctx = NULL; + ipmi_sdr_parse_ctx_t sdr_parse_ctx = NULL; + + /* Parse FRU information */ + if (!(fru_parse_ctx = (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx))) + { + fprintf(stderr, "ipmi_fru_parse_ctx_create()\n"); + return 0; + } + + /* lots of motherboards calculate checksums incorrectly */ + if ((*nut_ipmi_fru_parse_ctx_set_flags) (fru_parse_ctx, IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS) < 0) + { + nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); + return 0; + } + + if ((*nut_ipmi_fru_parse_open_device_id) (fru_parse_ctx, ipmi_id) < 0) + { + nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); + return 0; + } + + do + { + /* clear fields */ + area_type = 0; + area_length = 0; + memset (areabuf, '\0', IPMI_FRU_PARSE_AREA_SIZE_MAX + 1); + + /* parse FRU buffer */ + if ((*nut_ipmi_fru_parse_read_data_area) (fru_parse_ctx, + &area_type, + &area_length, + areabuf, + IPMI_FRU_PARSE_AREA_SIZE_MAX) < 0) + { + nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); + return 0; + } + + if (area_length) + { + if (area_type == IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION) + { + /* Found a POWER_SUPPLY record */ + nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); + return 1; + } + } + } while ((ret = (*nut_ipmi_fru_parse_next) (fru_parse_ctx)) == 1); + + /* No need for further errors checking */ + nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); + return 0; +} + +/* return NULL on error */ +nutscan_device_t * nutscan_scan_ipmi() +{ + ipmi_ctx_t ipmi_ctx = NULL; + nutscan_device_t * nut_dev = NULL; + nutscan_device_t * current_nut_dev = NULL; + int ret = -1; + int ipmi_id = 0; + char port_id[10]; + + if( !nutscan_avail_ipmi ) { + return NULL; + } + + /* Initialize the FreeIPMI library. */ + if (!(ipmi_ctx = (*nut_ipmi_ctx_create) ())) + { + /* we have to force cleanup, since exit handler is not yet installed */ + fprintf(stderr, "ipmi_ctx_create\n"); + return NULL; + } + + if ((ret = (*nut_ipmi_ctx_find_inband) (ipmi_ctx, + NULL, + 0, /* don't disable auto-probe */ + 0, + 0, + NULL, + 0, /* workaround flags, none by default */ + 0 /* flags */ + )) < 0) + { + fprintf(stderr, "ipmi_ctx_find_inband: %s\n", + (*nut_ipmi_ctx_errormsg) (ipmi_ctx)); + return NULL; + } + if (!ret) + { + /* No local IPMI device detected */ + return NULL; + } + + /* Loop through all possible devices */ + for (ipmi_id = 0 ; ipmi_id <= IPMI_FRU_DEVICE_ID_MAX ; ipmi_id++) { + + if (is_ipmi_device_supported(ipmi_ctx, ipmi_id)) { + + if ( (nut_dev = nutscan_new_device()) == NULL ) { + fprintf(stderr,"Memory allocation error\n"); + nutscan_free_device(current_nut_dev); + break; + } + + /* Fill the device structure (sufficient with driver and port) */ + nut_dev->type = TYPE_IPMI; + nut_dev->driver = strdup(NUT_IPMI_DRV_NAME); + sprintf(port_id, "id%x", ipmi_id); + nut_dev->port = strdup(port_id); + + current_nut_dev = nutscan_add_device_to_device( + current_nut_dev, + nut_dev); + + memset (port_id, 0, sizeof(port_id)); + } + } + + /* Final cleanup */ + if (ipmi_ctx) { + (*nut_ipmi_ctx_close) (ipmi_ctx); + (*nut_ipmi_ctx_destroy) (ipmi_ctx); + } + + return current_nut_dev; +} +#else /* WITH_IPMI */ +/* stub function */ nutscan_device_t * nutscan_scan_ipmi() { return NULL; } -#endif /* HAVE_FREEIPMI_FREEIPMI_H */ +#endif /* WITH_IPMI */ diff --git a/tools/nut-scanner/scan_nut.c b/tools/nut-scanner/scan_nut.c index bed4d1c..5fb8b70 100644 --- a/tools/nut-scanner/scan_nut.c +++ b/tools/nut-scanner/scan_nut.c @@ -122,7 +122,6 @@ nutscan_device_t * nutscan_scan_nut(const char* startIP, const char* stopIP, con int change_action_handler = 0; int i; struct scan_nut_arg *nut_arg; - #ifdef HAVE_PTHREAD pthread_t thread; pthread_t * thread_array = NULL; @@ -131,6 +130,10 @@ nutscan_device_t * nutscan_scan_nut(const char* startIP, const char* stopIP, con pthread_mutex_init(&dev_mutex,NULL); #endif + if( !nutscan_avail_nut ) { + return NULL; + } + /* Ignore SIGPIPE if the caller hasn't set a handler for it yet */ if( sigaction(SIGPIPE, NULL, &oldact) == 0 ) { if( oldact.sa_handler == SIG_DFL ) { diff --git a/tools/nut-scanner/scan_snmp.c b/tools/nut-scanner/scan_snmp.c index e6ffc54..32b2b1f 100644 --- a/tools/nut-scanner/scan_snmp.c +++ b/tools/nut-scanner/scan_snmp.c @@ -18,15 +18,14 @@ */ #include "common.h" - -#ifdef HAVE_NET_SNMP_NET_SNMP_CONFIG_H - #include "nut-scan.h" + +#ifdef WITH_SNMP + #include -#include -#include #include #include +#include /* workaround for buggy Net-SNMP config * from drivers/snmp-ups.h */ @@ -63,18 +62,196 @@ static nutscan_device_t * dev_ret = NULL; #ifdef HAVE_PTHREAD static pthread_mutex_t dev_mutex; +static pthread_mutex_t lib_mutex; static pthread_t * thread_array = NULL; static int thread_count = 0; #endif long g_usec_timeout ; +/* dynamic link library stuff */ +static lt_dlhandle dl_handle = NULL; +static const char *dl_error = NULL; + +static void (*nut_init_snmp)(const char *type); +static void (*nut_snmp_sess_init)(netsnmp_session * session); +static void * (*nut_snmp_sess_open)(struct snmp_session *session); +static int (*nut_snmp_sess_close)(void *handle); +static struct snmp_session * (*nut_snmp_sess_session)(void *handle); +static void * (*nut_snmp_parse_oid)(const char *input, oid *objid, + size_t *objidlen); +static struct snmp_pdu * (*nut_snmp_pdu_create) (int command ); +netsnmp_variable_list * (*nut_snmp_add_null_var)(netsnmp_pdu *pdu, + const oid *objid, size_t objidlen); +static int (*nut_snmp_sess_synch_response) (void *sessp, netsnmp_pdu *pdu, + netsnmp_pdu **response); +static int (*nut_snmp_oid_compare) (const oid *in_name1, size_t len1, + const oid *in_name2, size_t len2); +static void (*nut_snmp_free_pdu) (netsnmp_pdu *pdu); +static int (*nut_generate_Ku)(const oid * hashtype, u_int hashtype_len, + u_char * P, size_t pplen, u_char * Ku, size_t * kulen); +static const char * (*nut_snmp_api_errstring) (int snmp_errnumber); +static int (*nut_snmp_errno); +static oid * (*nut_usmAESPrivProtocol); +static oid * (*nut_usmHMACMD5AuthProtocol); +static oid * (*nut_usmHMACSHA1AuthProtocol); +static oid * (*nut_usmDESPrivProtocol); + +/* return 0 on error */ +int nutscan_load_snmp_library() +{ +#ifdef HAVE_PTHREAD + pthread_mutex_lock(&lib_mutex); +#endif + + if( dl_handle != NULL ) { + /* if previous init failed */ + if( dl_handle == (void *)1 ) { + return 0; + } + /* init has already been done */ + return 1; + } + + if( lt_dlinit() != 0 ) { + fprintf(stderr, "Error initializing lt_init\n"); + return 0; + } + + dl_handle = lt_dlopenext("libnetsnmp"); + if (!dl_handle) { + dl_error = lt_dlerror(); + goto err; + } + + lt_dlerror(); /* Clear any existing error */ + *(void **) (&nut_init_snmp) = lt_dlsym(dl_handle, "init_snmp"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_sess_init) = lt_dlsym(dl_handle, + "snmp_sess_init"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_sess_open) = lt_dlsym(dl_handle, + "snmp_sess_open"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_sess_close) = lt_dlsym(dl_handle, + "snmp_sess_close"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_sess_session) = lt_dlsym(dl_handle, + "snmp_sess_session"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_parse_oid) = lt_dlsym(dl_handle, + "snmp_parse_oid"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_pdu_create) = lt_dlsym(dl_handle, + "snmp_pdu_create"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_add_null_var) = lt_dlsym(dl_handle, + "snmp_add_null_var"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_sess_synch_response) = lt_dlsym(dl_handle, + "snmp_sess_synch_response"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_oid_compare) = lt_dlsym(dl_handle, + "snmp_oid_compare"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_free_pdu) = lt_dlsym(dl_handle,"snmp_free_pdu"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_generate_Ku) = lt_dlsym(dl_handle, "generate_Ku"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_api_errstring) = lt_dlsym(dl_handle, + "snmp_api_errstring"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_snmp_errno) = lt_dlsym(dl_handle, "snmp_errno"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usmAESPrivProtocol) = lt_dlsym(dl_handle, + "usmAESPrivProtocol"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usmHMACMD5AuthProtocol) = lt_dlsym(dl_handle, + "usmHMACMD5AuthProtocol"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usmHMACSHA1AuthProtocol) = lt_dlsym(dl_handle, + "usmHMACSHA1AuthProtocol"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usmDESPrivProtocol) = lt_dlsym(dl_handle, + "usmDESPrivProtocol"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + +#ifdef HAVE_PTHREAD + pthread_mutex_unlock(&dev_mutex); +#endif + return 1; +err: + fprintf(stderr, "%s\n", dl_error); + dl_handle = (void *)1; +#ifdef HAVE_PTHREAD + pthread_mutex_unlock(&dev_mutex); +#endif + return 0; +} +/* end of dynamic link library stuff */ + static void scan_snmp_add_device(nutscan_snmp_t * sec, struct snmp_pdu *response,char * mib) { nutscan_device_t * dev = NULL; struct snmp_session * session; char * buf; - session = snmp_sess_session(sec->handle); + session = (*nut_snmp_sess_session)(sec->handle); + if(session == NULL) { + return; + } /* SNMP device found */ dev = nutscan_new_device(); dev->type = TYPE_SNMP; @@ -147,21 +324,21 @@ static struct snmp_pdu * scan_snmp_get_manufacturer(char* oid_str,void* handle) /* create and send request. */ name_len = MAX_OID_LEN; - if (!snmp_parse_oid(oid_str, name, &name_len)) { + if (!(*nut_snmp_parse_oid)(oid_str, name, &name_len)) { index++; return NULL; } - pdu = snmp_pdu_create(SNMP_MSG_GET); + pdu = (*nut_snmp_pdu_create)(SNMP_MSG_GET); if (pdu == NULL) { index++; return NULL; } - snmp_add_null_var(pdu, name, name_len); + (*nut_snmp_add_null_var)(pdu, name, name_len); - status = snmp_sess_synch_response(handle,pdu, &response); + status = (*nut_snmp_sess_synch_response)(handle,pdu, &response); if( response == NULL ) { index++; return NULL; @@ -170,11 +347,11 @@ static struct snmp_pdu * scan_snmp_get_manufacturer(char* oid_str,void* handle) if(status!=STAT_SUCCESS||response->errstat!=SNMP_ERR_NOERROR|| response->variables == NULL || response->variables->name == NULL || - snmp_oid_compare(response->variables->name, + (*nut_snmp_oid_compare)(response->variables->name, response->variables->name_length, name, name_len) != 0 || response->variables->val.string == NULL ) { - snmp_free_pdu(response); + (*nut_snmp_free_pdu)(response); index++; return NULL; } @@ -198,7 +375,7 @@ static void try_all_oid(void * arg) scan_snmp_add_device(sec,response,snmp_device_table[index].mib); - snmp_free_pdu(response); + (*nut_snmp_free_pdu)(response); response = NULL; index++; @@ -207,7 +384,7 @@ static void try_all_oid(void * arg) static int init_session(struct snmp_session * snmp_sess, nutscan_snmp_t * sec) { - snmp_sess_init(snmp_sess); + (*nut_snmp_sess_init)(snmp_sess); snmp_sess->peername = sec->peername; @@ -279,16 +456,17 @@ static int init_session(struct snmp_session * snmp_sess, nutscan_snmp_t * sec) snmp_sess->securityAuthKeyLen = USM_AUTH_KU_LEN; /* default to MD5 */ - snmp_sess->securityAuthProto = usmHMACMD5AuthProtocol; - snmp_sess->securityAuthProtoLen =sizeof(usmHMACMD5AuthProtocol)/ - sizeof(oid); + snmp_sess->securityAuthProto = (*nut_usmHMACMD5AuthProtocol); + snmp_sess->securityAuthProtoLen = + sizeof((*nut_usmHMACMD5AuthProtocol))/ + sizeof(oid); if( sec->authProtocol ) { if (strcmp(sec->authProtocol, "SHA") == 0) { snmp_sess->securityAuthProto = - usmHMACSHA1AuthProtocol; + (*nut_usmHMACSHA1AuthProtocol); snmp_sess->securityAuthProtoLen = - sizeof(usmHMACSHA1AuthProtocol)/ + sizeof((*nut_usmHMACSHA1AuthProtocol))/ sizeof(oid); } else { @@ -303,7 +481,7 @@ static int init_session(struct snmp_session * snmp_sess, nutscan_snmp_t * sec) /* set the authentication key to a MD5/SHA1 hashed version of * our passphrase (must be at least 8 characters long) */ - if (generate_Ku(snmp_sess->securityAuthProto, + if ((*nut_generate_Ku)(snmp_sess->securityAuthProto, snmp_sess->securityAuthProtoLen, (u_char *) sec->authPassword, strlen(sec->authPassword), @@ -321,15 +499,17 @@ static int init_session(struct snmp_session * snmp_sess, nutscan_snmp_t * sec) } /* default to DES */ - snmp_sess->securityPrivProto=usmDESPrivProtocol; + snmp_sess->securityPrivProto=(*nut_usmDESPrivProtocol); snmp_sess->securityPrivProtoLen = - sizeof(usmDESPrivProtocol)/sizeof(oid); + sizeof((*nut_usmDESPrivProtocol))/sizeof(oid); if( sec->privProtocol ) { if (strcmp(sec->privProtocol, "AES") == 0) { - snmp_sess->securityPrivProto=usmAESPrivProtocol; + snmp_sess->securityPrivProto= + (*nut_usmAESPrivProtocol); snmp_sess->securityPrivProtoLen = - sizeof(usmAESPrivProtocol)/sizeof(oid); + sizeof((*nut_usmAESPrivProtocol))/ + sizeof(oid); } else { if (strcmp(sec->privProtocol, "DES") != 0) { @@ -344,7 +524,7 @@ static int init_session(struct snmp_session * snmp_sess, nutscan_snmp_t * sec) /* set the private key to a MD5/SHA hashed version of * our passphrase (must be at least 8 characters long) */ snmp_sess->securityPrivKeyLen = USM_PRIV_KU_LEN; - if (generate_Ku(snmp_sess->securityAuthProto, + if ((*nut_generate_Ku)(snmp_sess->securityAuthProto, snmp_sess->securityAuthProtoLen, (u_char *) sec->privPassword, strlen(sec->privPassword), @@ -365,7 +545,7 @@ static void * try_SysOID(void * arg) { struct snmp_session snmp_sess; void * handle; - struct snmp_pdu *pdu, *response = NULL; + struct snmp_pdu *pdu, *response = NULL, *resp = NULL; oid name[MAX_OID_LEN]; size_t name_len = MAX_OID_LEN; nutscan_snmp_t * sec = (nutscan_snmp_t *)arg; @@ -381,7 +561,7 @@ static void * try_SysOID(void * arg) snmp_sess.timeout = g_usec_timeout; /* Open the session */ - handle = snmp_sess_open(&snmp_sess); /* establish the session */ + handle = (*nut_snmp_sess_open)(&snmp_sess); /* establish the session */ if (handle == NULL) { fprintf(stderr,"Failed to open SNMP session for %s.\n", sec->peername); @@ -389,24 +569,24 @@ static void * try_SysOID(void * arg) } /* create and send request. */ - if (!snmp_parse_oid(SysOID, name, &name_len)) { + if (!(*nut_snmp_parse_oid)(SysOID, name, &name_len)) { fprintf(stderr,"SNMP errors: %s\n", - snmp_api_errstring(snmp_errno)); - snmp_sess_close(handle); + (*nut_snmp_api_errstring)((*nut_snmp_errno))); + (*nut_snmp_sess_close)(handle); goto try_SysOID_free; } - pdu = snmp_pdu_create(SNMP_MSG_GET); + pdu = (*nut_snmp_pdu_create)(SNMP_MSG_GET); if (pdu == NULL) { fprintf(stderr,"Not enough memory\n"); - snmp_sess_close(handle); + (*nut_snmp_sess_close)(handle); goto try_SysOID_free; } - snmp_add_null_var(pdu, name, name_len); + (*nut_snmp_add_null_var)(pdu, name, name_len); - snmp_sess_synch_response(handle, + (*nut_snmp_sess_synch_response)(handle, pdu, &response); if (response) { @@ -424,25 +604,27 @@ static void * try_SysOID(void * arg) continue; } name_len = MAX_OID_LEN; - if (!snmp_parse_oid( + if (!(*nut_snmp_parse_oid)( snmp_device_table[index].sysoid, name, &name_len)) { index++; continue; } - if ( snmp_oid_compare( + if ( (*nut_snmp_oid_compare)( response->variables->val.objid, response->variables->val_len/sizeof(oid), name, name_len) == 0 ) { /* we have found a relevent sysoid */ - snmp_free_pdu(response); - response = scan_snmp_get_manufacturer( + resp = scan_snmp_get_manufacturer( snmp_device_table[index].oid, handle); - scan_snmp_add_device(sec,response, - snmp_device_table[index].mib); - sysoid_found = 1; + if( resp != NULL ) { + scan_snmp_add_device(sec,resp, + snmp_device_table[index].mib); + sysoid_found = 1; + (*nut_snmp_free_pdu)(resp); + } } index++; } @@ -453,11 +635,11 @@ static void * try_SysOID(void * arg) try_all_oid(sec); } - snmp_free_pdu(response); + (*nut_snmp_free_pdu)(response); response = NULL; } - snmp_sess_close(handle); + (*nut_snmp_sess_close)(handle); try_SysOID_free: if( sec->peername ) { @@ -478,12 +660,18 @@ nutscan_device_t * nutscan_scan_snmp(const char * start_ip, const char * stop_ip pthread_t thread; pthread_mutex_init(&dev_mutex,NULL); + pthread_mutex_init(&lib_mutex,NULL); #endif + if( !nutscan_avail_snmp ) { + return NULL; + } + + g_usec_timeout = usec_timeout; /* Initialize the SNMP library */ - init_snmp("nut-scanner"); + (*nut_init_snmp)("nut-scanner"); ip_str = nutscan_ip_iter_init(&ip, start_ip, stop_ip); @@ -515,6 +703,11 @@ nutscan_device_t * nutscan_scan_snmp(const char * start_ip, const char * stop_ip return dev_ret; } -#endif /* HAVE_NET_SNMP_NET_SNMP_CONFIG_H */ +#else /* WITH_SNMP */ +nutscan_device_t * nutscan_scan_snmp(const char * start_ip, const char * stop_ip,long usec_timeout, nutscan_snmp_t * sec) +{ + return NULL; +} +#endif /* WITH_SNMP */ diff --git a/tools/nut-scanner/scan_usb.c b/tools/nut-scanner/scan_usb.c index 8ce8759..3fac8a6 100644 --- a/tools/nut-scanner/scan_usb.c +++ b/tools/nut-scanner/scan_usb.c @@ -18,12 +18,99 @@ */ #include "common.h" -#ifdef HAVE_USB_H +#include "nut-scan.h" + +#ifdef WITH_USB #include "upsclient.h" #include "nutscan-usb.h" #include #include -#include "nutscan-device.h" +#include + +/* dynamic link library stuff */ +static lt_dlhandle dl_handle = NULL; +static const char *dl_error = NULL; +static int (*nut_usb_close)(usb_dev_handle *dev); +static int (*nut_usb_find_busses)(void); +static char * (*nut_usb_strerror)(void); +static void (*nut_usb_init)(void); +static int (*nut_usb_get_string_simple)(usb_dev_handle *dev, int index, + char *buf, size_t buflen); +static struct usb_bus * (*nut_usb_busses); +static usb_dev_handle * (*nut_usb_open)(struct usb_device *dev); +static int (*nut_usb_find_devices)(void); + +/* return 0 on error */ +int nutscan_load_usb_library() +{ + if( dl_handle != NULL ) { + /* if previous init failed */ + if( dl_handle == (void *)1 ) { + return 0; + } + /* init has already been done */ + return 1; + } + + if( lt_dlinit() != 0 ) { + fprintf(stderr, "Error initializing lt_init\n"); + return 0; + } + + dl_handle = lt_dlopenext("libusb"); + if (!dl_handle) { + dl_error = lt_dlerror(); + goto err; + } + lt_dlerror(); /* Clear any existing error */ + *(void **) (&nut_usb_close) = lt_dlsym(dl_handle, "usb_close"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usb_find_busses) = lt_dlsym(dl_handle, "usb_find_busses"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usb_strerror) = lt_dlsym(dl_handle, "usb_strerror"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usb_init) = lt_dlsym(dl_handle, "usb_init"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usb_get_string_simple) = lt_dlsym(dl_handle, + "usb_get_string_simple"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usb_busses) = lt_dlsym(dl_handle, "usb_busses"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_usb_open) = lt_dlsym(dl_handle, "usb_open"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **)(&nut_usb_find_devices) = lt_dlsym(dl_handle,"usb_find_devices"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + return 1; +err: + fprintf(stderr, "%s\n", dl_error); + dl_handle = (void *)1; + return 0; +} +/* end of dynamic link library stuff */ static char* is_usb_device_supported(usb_device_id_t *usb_device_id_list, int dev_VendorID, int dev_ProductID) @@ -57,12 +144,16 @@ nutscan_device_t * nutscan_scan_usb() nutscan_device_t * nut_dev = NULL; nutscan_device_t * current_nut_dev = NULL; - /* libusb base init */ - usb_init(); - usb_find_busses(); - usb_find_devices(); + if( !nutscan_avail_usb ) { + return NULL; + } - for (bus = usb_busses; bus; bus = bus->next) { + /* libusb base init */ + (*nut_usb_init)(); + (*nut_usb_find_busses)(); + (*nut_usb_find_devices)(); + + for (bus = (*nut_usb_busses); bus; bus = bus->next) { for (dev = bus->devices; dev; dev = dev->next) { if ((driver_name = is_usb_device_supported(usb_device_table, @@ -70,17 +161,17 @@ nutscan_device_t * nutscan_scan_usb() dev->descriptor.idProduct)) != NULL) { /* open the device */ - udev = usb_open(dev); + udev = (*nut_usb_open)(dev); if (!udev) { fprintf(stderr,"Failed to open device, \ skipping. (%s)\n", - usb_strerror()); + (*nut_usb_strerror)()); continue; } /* get serial number */ if (dev->descriptor.iSerialNumber) { - ret = usb_get_string_simple(udev, + ret = (*nut_usb_get_string_simple)(udev, dev->descriptor.iSerialNumber, string, sizeof(string)); if (ret > 0) { @@ -89,7 +180,7 @@ nutscan_device_t * nutscan_scan_usb() } /* get product name */ if (dev->descriptor.iProduct) { - ret = usb_get_string_simple(udev, + ret = (*nut_usb_get_string_simple)(udev, dev->descriptor.iProduct, string, sizeof(string)); if (ret > 0) { @@ -99,7 +190,7 @@ nutscan_device_t * nutscan_scan_usb() /* get vendor name */ if (dev->descriptor.iManufacturer) { - ret = usb_get_string_simple(udev, + ret = (*nut_usb_get_string_simple)(udev, dev->descriptor.iManufacturer, string, sizeof(string)); if (ret > 0) { @@ -157,12 +248,17 @@ nutscan_device_t * nutscan_scan_usb() memset (string, 0, sizeof(string)); - usb_close(udev); + (*nut_usb_close)(udev); } } } return current_nut_dev; } -#endif /* HAVE_USB_H */ +#else /* WITH_USB */ +nutscan_device_t * nutscan_scan_usb() +{ + return NULL; +} +#endif /* WITH_USB */ diff --git a/tools/nut-scanner/scan_xml_http.c b/tools/nut-scanner/scan_xml_http.c index 7c68a65..b66f42f 100644 --- a/tools/nut-scanner/scan_xml_http.c +++ b/tools/nut-scanner/scan_xml_http.c @@ -18,16 +18,85 @@ */ #include "common.h" +#include "nut-scan.h" #ifdef WITH_NEON -#include +#include #include +#include +#include +#include #include #include #include #include -#include #include -#include "nutscan-device.h" +#include + +/* dynamic link library stuff */ +static lt_dlhandle dl_handle = NULL; +static const char *dl_error = NULL; + +static void (*nut_ne_xml_push_handler)(ne_xml_parser *p, + ne_xml_startelm_cb *startelm, + ne_xml_cdata_cb *cdata, + ne_xml_endelm_cb *endelm, + void *userdata); +static void (*nut_ne_xml_destroy)(ne_xml_parser *p); +static ne_xml_parser * (*nut_ne_xml_create)(void); +static int (*nut_ne_xml_parse)(ne_xml_parser *p, const char *block, size_t len); + +/* return 0 on error */ +int nutscan_load_neon_library() +{ + + if( dl_handle != NULL ) { + /* if previous init failed */ + if( dl_handle == (void *)1 ) { + return 0; + } + /* init has already been done */ + return 1; + } + + if( lt_dlinit() != 0 ) { + fprintf(stderr, "Error initializing lt_init\n"); + return 0; + } + + dl_handle = lt_dlopenext("libneon"); + if (!dl_handle) { + dl_error = lt_dlerror(); + goto err; + } + + lt_dlerror(); /* Clear any existing error */ + *(void **) (&nut_ne_xml_push_handler) = lt_dlsym(dl_handle, + "ne_xml_push_handler"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ne_xml_destroy) = lt_dlsym(dl_handle,"ne_xml_destroy"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ne_xml_create) = lt_dlsym(dl_handle,"ne_xml_create"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_ne_xml_parse) = lt_dlsym(dl_handle,"ne_xml_parse"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + return 1; +err: + fprintf(stderr, "%s\n", dl_error); + dl_handle = (void *)1; + return 0; +} static int startelm_cb(void *userdata, int parent, const char *nspace, const char *name, const char **atts) { nutscan_device_t * dev = (nutscan_device_t *)userdata; @@ -63,6 +132,9 @@ nutscan_device_t * nutscan_scan_xml_http(long usec_timeout) nutscan_device_t * nut_dev = NULL; nutscan_device_t * current_nut_dev = NULL; + if( !nutscan_avail_xml_http ) { + return NULL; + } if((peerSocket = socket(AF_INET, SOCK_DGRAM, 0)) != -1) { @@ -114,10 +186,12 @@ nutscan_device_t * nutscan_scan_xml_http(long usec_timeout) continue; } + if( getnameinfo( + (struct sockaddr *)&sockAddress, + sizeof(struct sockaddr_in),string, + sizeof(string),NULL,0, + NI_NUMERICHOST) != 0) { - if( inet_ntop(AF_INET, - &(sockAddress.sin_addr), - string,sizeof(buf)) == NULL ) { fprintf(stderr, "Error converting IP address \ : %d\n",errno); @@ -133,11 +207,11 @@ nutscan_device_t * nutscan_scan_xml_http(long usec_timeout) nut_dev->type = TYPE_XML; /* Try to read device type */ - ne_xml_parser *parser = ne_xml_create(); - ne_xml_push_handler(parser, startelm_cb, NULL, - NULL, nut_dev); - ne_xml_parse(parser, buf, strlen(buf)); - ne_xml_destroy(parser); + ne_xml_parser *parser = (*nut_ne_xml_create)(); + (*nut_ne_xml_push_handler)(parser, startelm_cb, + NULL, NULL, nut_dev); + (*nut_ne_xml_parse)(parser, buf, strlen(buf)); + (*nut_ne_xml_destroy)(parser); nut_dev->driver = strdup("netxml-ups"); sprintf(buf,"http://%s",string); @@ -157,4 +231,9 @@ nutscan_device_t * nutscan_scan_xml_http(long usec_timeout) return current_nut_dev; } +#else /* WITH_NEON */ +nutscan_device_t * nutscan_scan_xml_http(long usec_timeout) +{ + return NULL; +} #endif /* WITH_NEON */ diff --git a/tools/nut-snmpinfo.py b/tools/nut-snmpinfo.py index 8489db1..89cc359 100755 --- a/tools/nut-snmpinfo.py +++ b/tools/nut-snmpinfo.py @@ -79,7 +79,7 @@ output_file.write( "/* SNMP IDs device table */\n" ) output_file.write( "static snmp_device_id_t snmp_device_table[] = {\n" ) for filename in glob.glob('../drivers/*-mib.c'): - list_of_line = file(filename,'r').read().split(';') + list_of_line = open(filename,'r').read().split(';') for line in list_of_line: if "mib2nut_info_t" in line: #clean up line @@ -116,7 +116,7 @@ for filename in glob.glob('../drivers/*-mib.c'): line = line.rstrip(" ") line2 = line.split(" ") - sysoid = "" + sysoid = "" for elem in line2: if elem[0] == "\"": clean_elem = re.sub("\"", "", elem) From ba627733517475db3dbd3d2ee3d3b3e63980043b Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Tue, 24 Jan 2012 11:28:33 +0100 Subject: [PATCH 070/300] Update patches list --- debian/changelog | 7 ++- .../patches/0001-fix_spelling_and_typo.patch | 46 ------------------- .../patches/0003-libupsclient-version.patch | 20 -------- debian/patches/series | 2 - 4 files changed, 6 insertions(+), 69 deletions(-) delete mode 100644 debian/patches/0001-fix_spelling_and_typo.patch delete mode 100644 debian/patches/0003-libupsclient-version.patch diff --git a/debian/changelog b/debian/changelog index 1e5b064..b25cefa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,14 @@ -nut (2.6.2-2) UNRELEASED; urgency=low +nut (2.6.3-1) unstable; urgency=low + * New upstream release * debian/nut-server.{install,manpages}: add richcomm_usb * debian/nut-server.install, debian/rules: install Avahi service file * debian/rules, nut-client.install: install Augeas lenses * debian/nut-server.README.Debian: clarify udev explanation (Closes: #529664) + * debian/patches/0001-fix_spelling_and_typo.patch, + debian/patches/0003-libupsclient-version.patch: removed since these are now + fixed upstream + * debian/patches/series: updated -- Arnaud Quette Thu, 03 Nov 2011 21:34:14 -0400 diff --git a/debian/patches/0001-fix_spelling_and_typo.patch b/debian/patches/0001-fix_spelling_and_typo.patch deleted file mode 100644 index 8d9bc86..0000000 --- a/debian/patches/0001-fix_spelling_and_typo.patch +++ /dev/null @@ -1,46 +0,0 @@ -Description: Fix several spelling errors -Author: Laurent Bigonville -Last-Update: 2011-06-03 - ---- a/docs/man/bcmxcp.8 -+++ b/docs/man/bcmxcp.8 -@@ -103,7 +103,7 @@ - .RE - .SH "TODO LIST" - .PP --Report UPS statistics informations -+Report UPS statistics information - .RS 4 - BCM/XCP supports reporting of UPS statistics data\&. - .RE ---- a/docs/man/blazer.8 -+++ b/docs/man/blazer.8 -@@ -264,7 +264,7 @@ - .RE - .\} - .sp --There is a way to get better readings without disconnecting the load but this requires 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\&. -+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 ---- a/docs/man/dummy-ups.8 -+++ b/docs/man/dummy-ups.8 -@@ -37,7 +37,7 @@ - This program is a multi\-purpose UPS emulation tool\&. Its behavior depends on the running mode: - .SS "Dummy Mode" - .sp --\fBdummy\-ups\fR looks like a standard device driver to \fBupsd\fR(8) and allows to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other real driver\&. This mode is mostly useful for development and testing purposes\&. -+\fBdummy\-ups\fR looks like a standard device driver to \fBupsd\fR(8) and allows one to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other real driver\&. This mode is mostly useful for development and testing purposes\&. - .SS "Repeater Mode" - .sp - \fBdummy\-ups\fR acts as a NUT client, simply forwarding data\&. This can be useful for supervision purposes\&. This can also allow some load sharing between several UPS instances, using a point\-to\-point communication with the UPS\&. -@@ -130,7 +130,7 @@ - .sp - It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework\&. - .sp --It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows to build a virtual device, composed of several other devices (either UPS, PDUs)\&. -+It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows one to build a virtual device, composed of several other devices (either UPS, PDUs)\&. - .SH "BUGS" - .sp - Instant commands are not yet supported in Dummy Mode, and data need name/value checking enforcement, as well as boundaries or enumeration definition\&. diff --git a/debian/patches/0003-libupsclient-version.patch b/debian/patches/0003-libupsclient-version.patch deleted file mode 100644 index 4b02835..0000000 --- a/debian/patches/0003-libupsclient-version.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/clients/Makefile.am -+++ b/clients/Makefile.am -@@ -50,4 +50,4 @@ - if WITH_SSL - libupsclient_la_LIBADD += $(LIBSSL_LIBS) - endif --libupsclient_la_LDFLAGS = -version-info 1:0:0 -+libupsclient_la_LDFLAGS = -version-info 2:0:1 -diff -ru nut-2.6.2.orig/clients/Makefile.in nut-2.6.2/clients/Makefile.in ---- a/clients/Makefile.in -+++ b/clients/Makefile.in -@@ -384,7 +384,7 @@ - # not LDADD. - libupsclient_la_SOURCES = upsclient.c upsclient.h - libupsclient_la_LIBADD = ../common/libparseconf.la $(am__append_4) --libupsclient_la_LDFLAGS = -version-info 1:0:0 -+libupsclient_la_LDFLAGS = -version-info 2:0:1 - all: all-am - - .SUFFIXES: diff --git a/debian/patches/series b/debian/patches/series index 6ea723f..2024d93 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1 @@ -0001-fix_spelling_and_typo.patch 0002-nut-monitor-paths.patch -0003-libupsclient-version.patch From 926c972a29fa346b0980241f4dadc7f854750166 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Tue, 24 Jan 2012 13:17:02 +0100 Subject: [PATCH 071/300] Update the list of closed bugs --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b25cefa..d5fe734 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ nut (2.6.3-1) unstable; urgency=low - * New upstream release + * New upstream release (Closes: #635186, #598741, #633756, #638221) * debian/nut-server.{install,manpages}: add richcomm_usb * debian/nut-server.install, debian/rules: install Avahi service file * debian/rules, nut-client.install: install Augeas lenses @@ -10,7 +10,7 @@ nut (2.6.3-1) unstable; urgency=low fixed upstream * debian/patches/series: updated - -- Arnaud Quette Thu, 03 Nov 2011 21:34:14 -0400 + -- Arnaud Quette Tue, 24 Jan 2012 13:14:59 +0100 nut (2.6.2-1) unstable; urgency=low From 1aa25b671de39e63c454251c14601ad076d60d30 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Sat, 28 Jan 2012 19:26:35 +0100 Subject: [PATCH 072/300] Debian release 2.6.3-2 --- debian/Makefile.am | 7 +- debian/changelog | 15 ++ debian/control | 6 +- debian/nut-client.init | 177 ++++++++++++++++++ debian/nut-client.links | 1 + debian/nut-server.init | 159 +++++++--------- debian/nut-server.links | 1 - ...server.README.Debian => nut.README.Debian} | 11 +- debian/nut.TODO.Debian | 1 - debian/rules | 3 +- 10 files changed, 280 insertions(+), 101 deletions(-) create mode 100755 debian/nut-client.init create mode 100644 debian/nut-client.links delete mode 100644 debian/nut-server.links rename debian/{nut-server.README.Debian => nut.README.Debian} (94%) diff --git a/debian/Makefile.am b/debian/Makefile.am index 031e44b..68fdb08 100644 --- a/debian/Makefile.am +++ b/debian/Makefile.am @@ -2,7 +2,8 @@ EXTRA_DIST = changelog control copyright description.subst hotplug \ nut-cgi.config nut-cgi.docs nut-cgi.examples nut-cgi.postinst nut-cgi.postrm \ nut-cgi.preinst nut-cgi.README.Debian nut-cgi.templates nut.config \ nut.default nut.dirs nut.docs nut.examples nut-hal-drivers.docs \ - nut.init nut.links nut.postinst nut.postrm nut.preinst nut.prerm \ - nut.README.Debian nut.templates nut.TODO.Debian \ - rules watch po/ca.po po/cs.po po/de.po po/fr.po po/POTFILES.in \ + nut-server.init nut-client.init nut-client.links \ + nut.postinst nut.postrm nut.preinst nut.prerm nut.README.Debian \ + nut.templates nut.TODO.Debian rules watch \ + po/ca.po po/cs.po po/de.po po/fr.po po/POTFILES.in \ po/pt.po po/pt_BR.po po/templates.pot po/vi.po diff --git a/debian/changelog b/debian/changelog index d5fe734..052d4c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +nut (2.6.3-2) unstable; urgency=low + + * debian/nut-server.init: rewrite to match upsd / drivers startup scope + * debian/nut-client.init: created to match upsmon startup scope + (Closes: #634858) + * debian/nut.TODO.Debian, debian/Makefile.am: updated to reflect the above + * debian/rules: install nut-client.init, and update to reflect the above + * debian/control, debian/Makefile.am: updated to reflect the above + * debian/nut-client.links: renamed from debian/nut-server.links, since + ups-monitor is now provided by nut-client initscript + * debian/nut.README.Debian: renamed from nut-server.README.Debian, + to provide it with both client and server packages + + -- Arnaud Quette Tue, 24 Jan 2012 13:14:59 +0100 + nut (2.6.3-1) unstable; urgency=low * New upstream release (Closes: #635186, #598741, #633756, #638221) diff --git a/debian/control b/debian/control index b0e8188..50d49a4 100644 --- a/debian/control +++ b/debian/control @@ -38,8 +38,8 @@ Package: nut-server Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev}, nut-client (= ${binary:Version}) Suggests: nut-cgi, nut-snmp, nut-dev, nut-xml -Provides: ups-monitor, nut-usb -Conflicts: ups-monitor, nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) +Provides: nut-usb +Conflicts: nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) Replaces: nut (<< 2.6.1-2~) Breaks: nut (<< 2.6.1-2~) Description: network UPS tools - core system @@ -56,6 +56,8 @@ Description: network UPS tools - core system Package: nut-client Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: ups-monitor +Conflicts: ups-monitor, nut-server (<< 2.6.3-1) Recommends: bash-completion Replaces: nut (<< 2.6.1-2~) Breaks: nut (<< 2.6.1-2~) diff --git a/debian/nut-client.init b/debian/nut-client.init new file mode 100755 index 0000000..8aa663f --- /dev/null +++ b/debian/nut-client.init @@ -0,0 +1,177 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: nut-client upsmon ups-monitor +# Required-Start: $local_fs $syslog $network $remote_fs +# Required-Stop: $local_fs $syslog $network $remote_fs +# Should-Start: nut-server +# Should-Stop: nut-server +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Network UPS Tools monitor initscript +# Description: This script take care of starting and stopping the +# Network UPS Tools monitoring component (upsmon). +### END INIT INFO + +# Author: Arnaud Quette + +PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin + +NAME=nut-client +DESC="Network UPS Tools - power device monitor and shutdown controller" +CONFIG=/etc/nut/nut.conf +pid_dir=/var/run/nut +upsmon_pid=${pid_dir}/upsmon.pid +upsmon=/sbin/upsmon +log=">/dev/null 2>/dev/null" + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# set upsmon specific options. use "man upsmon" for more info +# this parameter is now located in nut.conf, and not in /etc/default/nut anymore +# FIXME: retrieved from 'nut' script during update +UPSMON_OPTIONS="" + +# Exit if the package is not installed +[ -x "$upsmon" ] || exit 0 + +# Include NUT nut.conf +[ -r $CONFIG ] && . $CONFIG + +# FIXME: put all common bits, between nut-client and nut-server, +# into a common nut-function + +# Explicitly require the configuration to be done in /etc/nut/nut.conf +if [ "x$MODE" = "xnone" -o -z "$MODE" ] ; then + log_action_msg "$NAME disabled, please adjust the configuration to your needs" + log_action_msg "Then set MODE to a suitable value in $CONFIG to enable it" + # exit success to avoid breaking the install process! + exit 0 +fi + +# Check if /var/run/nut exists and has the correct perms +check_var_directory() { + [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ + && chown root:nut ${pid_dir} \ + && chmod 770 ${pid_dir} +} + +# check if the right components are running +check_status() { + case "$MODE" in + standalone|netserver|netclient) + status_of_proc -p $upsmon_pid $upsmon upsmon + ;; + none|*) + ;; + esac +} + +start_stop_client () { + case "$MODE" in + standalone|netserver|netclient) + # FIXME: for standalone|netserver, ensure 'nut-server status' returns ? + case "$1" in + start) + start-stop-daemon -S -q -p $upsmon_pid -x $upsmon \ + -- $UPSMON_OPTIONS >/dev/null 2>&1 && + log_progress_msg "upsmon" || log_progress_msg "(upsmon failed)" + ;; + stop) + start-stop-daemon -K -o -q -p $upsmon_pid -n upsmon >/dev/null 2>&1 && + log_progress_msg "upsmon" || log_progress_msg "(upsmon failed)" + ;; + esac + ;; + none|*) + return 1 + ;; + esac +} + +case "$1" in + + start) + log_daemon_msg "Starting $DESC" + check_var_directory + start_stop_client start #&& log_progress_msg "upsmon" + log_end_msg 0 + ;; + + stop) + log_daemon_msg "Stopping $DESC" + start_stop_client stop && log_progress_msg "upsmon" + log_end_msg 0 + ;; + + reload) + $upsmon -c reload >/dev/null 2>&1 + ;; + + restart|force-reload) + # FIXME: lack consistency, due to initscript split. + # This only addresses partial reload. + # Full reload requires to: + # - stop nut-client + # - restart (Ie stop+start) nut-server + # - start nut-client + log_daemon_msg "Restarting $DESC" + start_stop_client stop + # should then 'start_stop_server stop', Ie /etc/init.d/nut-server stop + #sleep 5 + check_var_directory + # should first 'start_stop_server start', Ie /etc/init.d/nut-server start + start_stop_client start && log_progress_msg "upsmon" + log_end_msg 0 + ;; + + status) + #log_daemon_msg "Checking status of $DESC" + echo "Checking status of $DESC" + check_status + exit $? + ;; + + poweroff) + case "$MODE" in + standalone|netserver) + # Sanity check + flag=`sed -ne 's#^ *POWERDOWNFLAG *\(.*\)$#\1#p' /etc/nut/upsmon.conf` + if [ -z "$flag" ] ; then + log_action_msg "##########################################################" + log_action_msg "## POWERDOWNFLAG is not defined in /etc/nut/upsmon.conf ##" + log_action_msg "## ##" + log_action_msg "## Please read the Manual page upsmon.conf(5) ##" + log_action_msg "##########################################################" + exit 1 + fi + + # Defer to nut-server to actually poweroff the UPS, if needed + if $upsmon -K >/dev/null 2>&1 ; then + log_daemon_msg "UPS poweroff required..." + log_end_msg 0 + if [ -x /etc/init.d/nut-server ] ; then + exec /etc/init.d/nut-server poweroff + else + log_action_msg "Failure: /etc/init.d/nut-server script missing" + fi + else + log_action_msg "Power down flag is not set (UPS poweroff not needed)" + fi + ;; + none|netclient|*) + # nothing to do + log_action_msg "'$MODE' configuration does not require UPS poweroff" + ;; + esac + ;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|reload|restart|force-reload|status|poweroff}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/nut-client.links b/debian/nut-client.links new file mode 100644 index 0000000..c8d27c5 --- /dev/null +++ b/debian/nut-client.links @@ -0,0 +1 @@ +etc/init.d/nut-client etc/init.d/ups-monitor diff --git a/debian/nut-server.init b/debian/nut-server.init index 158e127..bf924ac 100644 --- a/debian/nut-server.init +++ b/debian/nut-server.init @@ -1,8 +1,8 @@ #! /bin/sh ### BEGIN INIT INFO -# Provides: nut +# Provides: nut-server upsd # Required-Start: $local_fs $syslog $network $remote_fs udev -# Required-Stop: $local_fs $syslog $network $remote_fs udev +# Required-Stop: $local_fs $syslog $network $remote_fs udev nut-client # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Network UPS Tools initscript @@ -15,24 +15,32 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin -NAME=nut -DESC="Network UPS Tools" +NAME=nut-server +DESC="Network UPS Tools - power devices information server and drivers" CONFIG=/etc/nut/nut.conf +pid_dir=/var/run/nut +upsd_pid=${pid_dir}/upsd.pid +upsd=/sbin/upsd +upsdrvctl=/sbin/upsdrvctl +log=">/dev/null 2>/dev/null" +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # set upsd specific options. use "man upsd" for more info +# this parameter is now located in nut.conf, and not in /etc/default/nut anymore +# FIXME: retrieved from 'nut' script during update UPSD_OPTIONS="" -# set upsmon specific options. use "man upsmon" for more info -UPSMON_OPTIONS="" +# Exit if the package is not installed +[ -x "$upsd" ] || exit 0 # Include NUT nut.conf -if [ -f $CONFIG ] ; then - . $CONFIG -fi +[ -r $CONFIG ] && . $CONFIG # Explicitly require the configuration to be done in /etc/nut/nut.conf +# redundant with nut-client if [ "x$MODE" = "xnone" -o -z "$MODE" ] ; then log_action_msg "$NAME disabled, please adjust the configuration to your needs" log_action_msg "Then set MODE to a suitable value in $CONFIG to enable it" @@ -40,32 +48,23 @@ if [ "x$MODE" = "xnone" -o -z "$MODE" ] ; then exit 0 fi -pid_dir=/var/run/nut -upsmon_pid=${pid_dir}/upsmon.pid -upsd_pid=${pid_dir}/upsd.pid -upsd=/sbin/upsd -upsdrvctl=/sbin/upsdrvctl -upsmon=/sbin/upsmon -log=">/dev/null 2>/dev/null" - # Check if /var/run/nut exists and has the correct perms check_var_directory() { - [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ - && chown root:nut ${pid_dir} \ - && chmod 770 ${pid_dir} + [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ + && chown root:nut ${pid_dir} \ + && chmod 770 ${pid_dir} } # check if the right components are running check_status() { case "$MODE" in standalone|netserver) - status_of_proc -p $upsd_pid $upsd upsd - status_of_proc -p $upsmon_pid $upsmon upsmon + status_of_proc -p $upsd_pid $upsd upsd + # FIXME: need driver(s) status too! ;; - netclient) - status_of_proc -p $upsmon_pid $upsmon upsmon - ;; - none|*) + none|netclient|*) + # defered to nut-client + #status_of_proc -p $upsmon_pid $upsmon upsmon ;; esac } @@ -75,38 +74,25 @@ start_stop_server () { standalone|netserver) case "$1" in start) + # First, start driver(s) ! $upsdrvctl start >/dev/null 2>&1 && \ log_progress_msg "(driver(s) failed)" || log_progress_msg "driver(s)" - start-stop-daemon -S -q -p $upsd_pid -x $upsd \ - -- $UPSD_OPTIONS >/dev/null 2>&1 + # Then, data server (upsd) + start-stop-daemon -S -p $upsd_pid -x $upsd \ + -- $UPSD_OPTIONS >/dev/null 2>&1 && + log_progress_msg "upsd" || log_progress_msg "(upsd failed)" ;; stop) - start-stop-daemon -K -o -q -p $upsd_pid -n upsd >/dev/null 2>&1 + # Reverse order for stop + start-stop-daemon -K -o -p $upsd_pid -n upsd && #>/dev/null 2>&1 && + log_action_msg "upsd" || log_action_msg "(upsd failed)" ! /sbin/upsdrvctl stop >/dev/null 2>&1 && \ - log_progress_msg "(driver(s) failed)" || log_progress_msg "driver(s)" + log_action_msg "(driver(s) failed)" || log_action_msg "driver(s)" ;; esac ;; none|netclient|*) - return 1 - ;; - esac -} - -start_stop_client () { - case "$MODE" in - standalone|netserver|netclient) - case "$1" in - start) - start-stop-daemon -S -q -p $upsmon_pid -x $upsmon \ - -- $UPSMON_OPTIONS >/dev/null 2>&1 - ;; - stop) - start-stop-daemon -K -o -q -p $upsmon_pid -n upsmon >/dev/null 2>&1 - ;; - esac - ;; - none|*) + # now handled by nut-client return 1 ;; esac @@ -117,31 +103,31 @@ case "$1" in start) log_daemon_msg "Starting $DESC" check_var_directory - start_stop_server start && log_progress_msg "upsd" - start_stop_client start && log_progress_msg "upsmon" + start_stop_server start #&& log_progress_msg "upsd" + #start_stop_client start && log_progress_msg "upsmon" log_end_msg 0 ;; stop) log_daemon_msg "Stopping $DESC" - start_stop_server stop && log_progress_msg "upsd" - start_stop_client stop && log_progress_msg "upsmon" + start_stop_server stop #&& log_progress_msg "upsd" + #start_stop_client stop && log_progress_msg "upsmon" log_end_msg 0 ;; reload) $upsd -c reload >/dev/null 2>&1 - $upsmon -c reload >/dev/null 2>&1 + #$upsmon -c reload >/dev/null 2>&1 ;; restart|force-reload) log_daemon_msg "Restarting $DESC" - start_stop_client stop + #start_stop_client stop start_stop_server stop sleep 5 check_var_directory - start_stop_server start && log_progress_msg "upsd" - start_stop_client start && log_progress_msg "upsmon" + start_stop_server start #&& log_progress_msg "upsd" + #start_stop_client start && log_progress_msg "upsmon" log_end_msg 0 ;; @@ -153,44 +139,37 @@ case "$1" in ;; poweroff) - flag=`sed -ne 's#^ *POWERDOWNFLAG *\(.*\)$#\1#p' /etc/nut/upsmon.conf` wait_delay=`sed -ne 's#^ *POWEROFF_WAIT= *\(.*\)$#\1#p' /etc/nut/nut.conf` - if [ -f "$flag" ] ; then - if $upsmon -K >/dev/null 2>&1 ; then - log_daemon_msg "Shutting down the UPS ..." - sleep 1 - if $upsdrvctl shutdown ; then - sleep 5 - log_progress_msg "Waiting for UPS to cut the power" - log_end_msg 0 - else - log_progress_msg "Shutdown failed." - log_progress_msg "Waiting for UPS batteries to run down" - log_end_msg 0 - fi - if [ "$wait_delay" ] ; then - log_daemon_msg " (will reboot after $wait_delay) ..." - sleep "$wait_delay" - invoke-rc.d reboot stop - fi - else - log_daemon_msg "Power down flag is not set (UPS shutdown not needed)" - fi - else - if [ -z "$flag" ] ; then - log_daemon_msg "##########################################################" - log_progress_msg "## POWERDOWNFLAG is not defined in /etc/nut/upsmon.conf ##" - log_progress_msg "## ##" - log_progress_msg "## Please read the Manual page upsmon.conf(5) ##" - log_progress_msg "##########################################################" - log_end_msg 0 - fi - fi + # UPS poweroff action is actually done here. + # But nut-monitor (Ie nut-client) does the check and call nut-server if needed! + # This action MUST NOT be called directly, and thus is not exposed in 'Usage' + case "$MODE" in + standalone|netserver) + log_daemon_msg "Shutting down the UPS ..." + if $upsdrvctl shutdown ; then + # FIXME (needed?): sleep 5 + log_progress_msg "Waiting for UPS to cut the power" + log_end_msg 0 + else + log_progress_msg "Shutdown failed." + log_progress_msg "Waiting for UPS batteries to run down" + log_end_msg 0 + fi + if [ -n "$wait_delay" ] ; then + log_daemon_msg " (will reboot after $wait_delay) ..." + sleep "$wait_delay" + invoke-rc.d reboot stop + fi + ;; + none|netclient|*) + # nothing to do + ;; + esac ;; *) N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|reload|restart|force-reload|status|poweroff}" >&2 + echo "Usage: $N {start|stop|reload|restart|force-reload|status}" >&2 exit 1 ;; esac diff --git a/debian/nut-server.links b/debian/nut-server.links deleted file mode 100644 index a86f46f..0000000 --- a/debian/nut-server.links +++ /dev/null @@ -1 +0,0 @@ -etc/init.d/nut etc/init.d/ups-monitor diff --git a/debian/nut-server.README.Debian b/debian/nut.README.Debian similarity index 94% rename from debian/nut-server.README.Debian rename to debian/nut.README.Debian index ed4446c..882e2af 100644 --- a/debian/nut-server.README.Debian +++ b/debian/nut.README.Debian @@ -126,9 +126,14 @@ MODE. If you are running in "netclient" MODE, jump directly to section 6. nut.conf provides all the needed features to replace this file. (8) start the daemon - Invoke '/etc/init.d/nut start' to start the daemon(s). Check - /var/log/syslog to ensure that upsd, appropriate drivers, and upsmon - started up correctly. + If you use a "standalone" or "netserver" MODE, invoke: + - '/etc/init.d/nut-server start' to start upsd and appropriate driver(s), + - '/etc/init.d/nut-client start' to start upsmon. + + If you are running in "netclient" MODE, invoke: + - '/etc/init.d/nut-client start' to start upsmon. + + Check /var/log/syslog to ensure that daemon(s) started up correctly. Additional Notes for Sharing a UPS diff --git a/debian/nut.TODO.Debian b/debian/nut.TODO.Debian index 4efc003..b8fe9dd 100644 --- a/debian/nut.TODO.Debian +++ b/debian/nut.TODO.Debian @@ -1,4 +1,3 @@ -- split nut-server.init into nut-server.init + nut-client.init (upsmon) - how to distribute the nut-scanner and its library? Ie, a single package, or using the nut-{xml,snmp,...} packages. this requires libusb (0.1), Net SNMP, FreeIPMi, Avahi, libupsclient and Neon! diff --git a/debian/rules b/debian/rules index 9af3f0b..b9eef15 100755 --- a/debian/rules +++ b/debian/rules @@ -76,7 +76,8 @@ common-install-indep:: binary-install/nut-monitor:: dh_python2 -pnut-monitor -DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut -- start 50 2 3 4 5 . stop 50 0 1 6 . +DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut-server -- start 50 2 3 4 5 . stop 50 0 1 6 . +DEB_DH_INSTALLINIT_ARGS_nut-client := --init-script=nut-client -- start 51 2 3 4 5 . stop 51 0 1 6 . DEB_DH_COMPRESS_ARGS_nut-doc := -X.pdf ifeq (linux,$(DEB_HOST_ARCH_OS)) From dafbfe8075feea14935bf0ef9df4bac24bdad225 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Mon, 6 Feb 2012 11:11:05 +0100 Subject: [PATCH 073/300] Fix control file --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 052d4c7..9c7a814 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ nut (2.6.3-2) unstable; urgency=low * debian/nut.TODO.Debian, debian/Makefile.am: updated to reflect the above * debian/rules: install nut-client.init, and update to reflect the above * debian/control, debian/Makefile.am: updated to reflect the above + * debian/control: add Breaks on nut-server (<< 2.6.3-1~) * debian/nut-client.links: renamed from debian/nut-server.links, since ups-monitor is now provided by nut-client initscript * debian/nut.README.Debian: renamed from nut-server.README.Debian, diff --git a/debian/control b/debian/control index 50d49a4..782effa 100644 --- a/debian/control +++ b/debian/control @@ -60,7 +60,7 @@ Provides: ups-monitor Conflicts: ups-monitor, nut-server (<< 2.6.3-1) Recommends: bash-completion Replaces: nut (<< 2.6.1-2~) -Breaks: nut (<< 2.6.1-2~) +Breaks: nut (<< 2.6.1-2~), nut-server (<< 2.6.3-1~) Description: network UPS tools - clients Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and From 19bb945c6489694f74ec75a317591e2e8486eb11 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Mon, 6 Feb 2012 11:37:46 +0100 Subject: [PATCH 074/300] Fix loop between nut-server and nut-client in stop mode --- debian/nut-client.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/nut-client.init b/debian/nut-client.init index 8aa663f..22a4b63 100755 --- a/debian/nut-client.init +++ b/debian/nut-client.init @@ -4,7 +4,7 @@ # Required-Start: $local_fs $syslog $network $remote_fs # Required-Stop: $local_fs $syslog $network $remote_fs # Should-Start: nut-server -# Should-Stop: nut-server +# Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Network UPS Tools monitor initscript From f4447a2e78177d70f8c01f2ed508fd6407d82531 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Wed, 2 May 2012 20:31:36 +0200 Subject: [PATCH 075/300] Fix output messages content and format --- debian/nut-client.init | 14 +++++++++----- debian/nut-server.init | 9 +++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/debian/nut-client.init b/debian/nut-client.init index 22a4b63..ade3ffe 100755 --- a/debian/nut-client.init +++ b/debian/nut-client.init @@ -17,7 +17,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin NAME=nut-client -DESC="Network UPS Tools - power device monitor and shutdown controller" +DESC="NUT - power device monitor and shutdown controller" CONFIG=/etc/nut/nut.conf pid_dir=/var/run/nut upsmon_pid=${pid_dir}/upsmon.pid @@ -75,8 +75,7 @@ start_stop_client () { case "$1" in start) start-stop-daemon -S -q -p $upsmon_pid -x $upsmon \ - -- $UPSMON_OPTIONS >/dev/null 2>&1 && - log_progress_msg "upsmon" || log_progress_msg "(upsmon failed)" + -- $UPSMON_OPTIONS >/dev/null 2>&1 && return 0 || return 1 ;; stop) start-stop-daemon -K -o -q -p $upsmon_pid -n upsmon >/dev/null 2>&1 && @@ -95,17 +94,20 @@ case "$1" in start) log_daemon_msg "Starting $DESC" check_var_directory - start_stop_client start #&& log_progress_msg "upsmon" + start_stop_client start && log_progress_msg "upsmon" + || log_progress_msg "upsmon (failed)" log_end_msg 0 ;; stop) log_daemon_msg "Stopping $DESC" start_stop_client stop && log_progress_msg "upsmon" + || log_progress_msg "upsmon (failed)" log_end_msg 0 ;; reload) + log_daemon_msg "Reloading $DESC" $upsmon -c reload >/dev/null 2>&1 ;; @@ -117,12 +119,13 @@ case "$1" in # - restart (Ie stop+start) nut-server # - start nut-client log_daemon_msg "Restarting $DESC" - start_stop_client stop + start_stop_client stop || log_progress_msg "upsmon (failed)" # should then 'start_stop_server stop', Ie /etc/init.d/nut-server stop #sleep 5 check_var_directory # should first 'start_stop_server start', Ie /etc/init.d/nut-server start start_stop_client start && log_progress_msg "upsmon" + || log_progress_msg "upsmon (failed)" log_end_msg 0 ;; @@ -148,6 +151,7 @@ case "$1" in fi # Defer to nut-server to actually poweroff the UPS, if needed + # (the need is tested here though!) if $upsmon -K >/dev/null 2>&1 ; then log_daemon_msg "UPS poweroff required..." log_end_msg 0 diff --git a/debian/nut-server.init b/debian/nut-server.init index bf924ac..5505be4 100644 --- a/debian/nut-server.init +++ b/debian/nut-server.init @@ -16,7 +16,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin NAME=nut-server -DESC="Network UPS Tools - power devices information server and drivers" +DESC="NUT - power devices information server and drivers" CONFIG=/etc/nut/nut.conf pid_dir=/var/run/nut upsd_pid=${pid_dir}/upsd.pid @@ -76,18 +76,19 @@ start_stop_server () { start) # First, start driver(s) ! $upsdrvctl start >/dev/null 2>&1 && \ - log_progress_msg "(driver(s) failed)" || log_progress_msg "driver(s)" + log_progress_msg " (driver(s) failed)." || log_progress_msg " driver(s)." # Then, data server (upsd) start-stop-daemon -S -p $upsd_pid -x $upsd \ -- $UPSD_OPTIONS >/dev/null 2>&1 && log_progress_msg "upsd" || log_progress_msg "(upsd failed)" ;; stop) + # FIXME: should stop nut-client first! # Reverse order for stop start-stop-daemon -K -o -p $upsd_pid -n upsd && #>/dev/null 2>&1 && - log_action_msg "upsd" || log_action_msg "(upsd failed)" + log_progress_msg "upsd" || log_progress_msg "(upsd failed)" ! /sbin/upsdrvctl stop >/dev/null 2>&1 && \ - log_action_msg "(driver(s) failed)" || log_action_msg "driver(s)" + log_progress_msg "(driver(s) failed)" || log_progress_msg "driver(s)" ;; esac ;; From a97c4725339f5f611e1801c859321a13e078e940 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Wed, 2 May 2012 20:53:04 +0200 Subject: [PATCH 076/300] Add missing drivers and manpages --- debian/nut-server.install | 3 +++ debian/nut-server.manpages | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/debian/nut-server.install b/debian/nut-server.install index be2e16c..9486e8a 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -18,6 +18,7 @@ debian/tmp/lib/nut/belkin debian/tmp/lib/nut/blazer_ser debian/tmp/lib/nut/blazer_usb debian/tmp/lib/nut/clone +debian/tmp/lib/nut/clone-outlet debian/tmp/lib/nut/ivtscd debian/tmp/lib/nut/metasys debian/tmp/lib/nut/etapro @@ -47,3 +48,5 @@ debian/tmp/lib/nut/upsdrvctl /sbin debian/tmp/lib/nut/everups debian/tmp/lib/nut/dummy-ups debian/tmp/lib/nut/richcomm_usb +debian/tmp/lib/nut/liebert-esp2 +debian/tmp/lib/nut/microdowell diff --git a/debian/nut-server.manpages b/debian/nut-server.manpages index 7b82e84..f2f6a33 100644 --- a/debian/nut-server.manpages +++ b/debian/nut-server.manpages @@ -2,6 +2,7 @@ debian/tmp/usr/share/man/man5/ups.conf.5 debian/tmp/usr/share/man/man5/upsd.conf.5 debian/tmp/usr/share/man/man5/upsd.users.5 debian/tmp/usr/share/man/man8/apcsmart.8 +debian/tmp/usr/share/man/man8/apcsmart-old.8 debian/tmp/usr/share/man/man8/bcmxcp.8 debian/tmp/usr/share/man/man8/bcmxcp_usb.8 debian/tmp/usr/share/man/man8/belkin.8 @@ -18,11 +19,14 @@ debian/tmp/usr/share/man/man8/everups.8 debian/tmp/usr/share/man/man8/gamatronic.8 debian/tmp/usr/share/man/man8/genericups.8 debian/tmp/usr/share/man/man8/isbmex.8 +debian/tmp/usr/share/man/man8/ivtscd.8 debian/tmp/usr/share/man/man8/liebert.8 +debian/tmp/usr/share/man/man8/liebert-esp2.8 debian/tmp/usr/share/man/man8/masterguard.8 debian/tmp/usr/share/man/man8/metasys.8 debian/tmp/usr/share/man/man8/mge-shut.8 debian/tmp/usr/share/man/man8/mge-utalk.8 +debian/tmp/usr/share/man/man8/microdowell.8 debian/tmp/usr/share/man/man8/nutupsdrv.8 debian/tmp/usr/share/man/man8/oneac.8 debian/tmp/usr/share/man/man8/optiups.8 From 8b4a877ae9963038c1bb7b361317a04bde5507b7 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Wed, 2 May 2012 22:29:43 +0200 Subject: [PATCH 077/300] Bump Standards-Version to 3.9.3 --- debian/changelog | 8 +++++++- debian/control | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9c7a814..c4d4f6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,11 +6,17 @@ nut (2.6.3-2) unstable; urgency=low * debian/nut.TODO.Debian, debian/Makefile.am: updated to reflect the above * debian/rules: install nut-client.init, and update to reflect the above * debian/control, debian/Makefile.am: updated to reflect the above - * debian/control: add Breaks on nut-server (<< 2.6.3-1~) + * debian/control: + - add Breaks on nut-server (<< 2.6.3-1~) + - bump Standards-Version to 3.9.3 * debian/nut-client.links: renamed from debian/nut-server.links, since ups-monitor is now provided by nut-client initscript * debian/nut.README.Debian: renamed from nut-server.README.Debian, to provide it with both client and server packages + * debian/nut-server.install: add missing drivers (clone-outlet, + liebert-esp2 and microdowell) + * debian/nut-server.manpages: add missing manual pages (apcsmart-old, + ivtscd, liebert-esp2 and microdowell) -- Arnaud Quette Tue, 24 Jan 2012 13:14:59 +0100 diff --git a/debian/control b/debian/control index 782effa..dbf99d7 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends-Indep: asciidoc (>= 8.6.3), docbook-xsl, dblatex (>= 0.2.5), libxml2-utils -Standards-Version: 3.9.2 +Standards-Version: 3.9.3 Homepage: http://www.networkupstools.org/ Vcs-Browser: http://git.debian.org/?p=collab-maint/nut.git;a=summary Vcs-Git: git://git.debian.org/git/collab-maint/nut.git From fefe62b2bd5e37ccc38d0da8d0aeb545dc3d8094 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Fri, 1 Jun 2012 15:55:19 +0200 Subject: [PATCH 078/300] Imported Upstream version 2.6.4 --- ChangeLog | 1134 +++++++++++++++-- INSTALL | 2 +- Makefile.am | 2 +- Makefile.in | 13 +- NEWS | 119 ++ UPGRADING | 9 +- clients/Makefile.in | 3 + clients/upsc.c | 51 +- clients/upsmon.c | 36 +- clients/upsmon.h | 24 +- clients/upsrw.c | 60 + clients/upssched.c | 6 +- common/Makefile.am | 11 +- common/Makefile.in | 15 +- common/common.c | 25 +- common/parseconf.c | 22 + common/state.c | 114 ++ common/upsconf.c | 13 +- conf/Makefile.in | 3 + conf/nut.conf.sample | 6 +- configure | 53 +- configure.in | 25 +- data/Makefile.in | 3 + data/driver.list.in | 165 ++- data/html/Makefile.in | 3 + docs/Makefile.am | 2 +- docs/Makefile.in | 5 +- docs/cables/apc.txt | 30 +- docs/config-notes.txt | 34 +- docs/design.txt | 2 +- docs/developer-guide.txt | 4 +- docs/developers.txt | 13 +- docs/download.txt | 5 +- docs/man/Makefile.am | 6 +- docs/man/Makefile.in | 9 +- docs/man/apcsmart-old.8 | 4 +- docs/man/apcsmart.8 | 38 +- docs/man/apcsmart.txt | 41 +- docs/man/bcmxcp.8 | 4 +- docs/man/bcmxcp_usb.8 | 4 +- docs/man/belkin.8 | 4 +- docs/man/belkinunv.8 | 4 +- docs/man/bestfcom.8 | 4 +- docs/man/bestfortress.8 | 4 +- docs/man/bestuferrups.8 | 4 +- docs/man/bestups.8 | 4 +- docs/man/blazer.8 | 8 +- docs/man/blazer.txt | 9 +- docs/man/clone.8 | 4 +- docs/man/dummy-ups.8 | 4 +- docs/man/etapro.8 | 4 +- docs/man/everups.8 | 4 +- docs/man/gamatronic.8 | 4 +- docs/man/genericups.8 | 4 +- docs/man/hosts.conf.5 | 4 +- docs/man/isbmex.8 | 4 +- docs/man/ivtscd.8 | 4 +- docs/man/libupsclient-config.1 | 4 +- docs/man/liebert-esp2.8 | 4 +- docs/man/liebert.8 | 4 +- docs/man/masterguard.8 | 4 +- docs/man/metasys.8 | 4 +- docs/man/mge-shut.8 | 4 +- docs/man/mge-utalk.8 | 4 +- docs/man/microdowell.8 | 4 +- docs/man/netxml-ups.8 | 4 +- docs/man/nut-ipmipsu.8 | 4 +- docs/man/nut-recorder.8 | 103 ++ docs/man/nut-recorder.txt | 73 ++ docs/man/nut-scanner.8 | 7 +- docs/man/nut-scanner.txt | 10 +- docs/man/nut.conf.5 | 17 +- docs/man/nut.conf.txt | 16 +- docs/man/nutscan.3 | 4 +- docs/man/nutscan_add_device_to_device.3 | 4 +- docs/man/nutscan_add_option_to_device.3 | 4 +- docs/man/nutscan_cidr_to_ip.3 | 4 +- docs/man/nutscan_display_parsable.3 | 4 +- docs/man/nutscan_display_ups_conf.3 | 4 +- docs/man/nutscan_free_device.3 | 4 +- docs/man/nutscan_init.3 | 4 +- docs/man/nutscan_new_device.3 | 4 +- docs/man/nutscan_scan_avahi.3 | 4 +- docs/man/nutscan_scan_ipmi.3 | 4 +- docs/man/nutscan_scan_nut.3 | 4 +- docs/man/nutscan_scan_snmp.3 | 4 +- docs/man/nutscan_scan_usb.3 | 4 +- docs/man/nutscan_scan_xml_http.3 | 4 +- docs/man/nutupsdrv.8 | 4 +- docs/man/oneac.8 | 156 ++- docs/man/oneac.txt | 85 +- docs/man/optiups.8 | 4 +- docs/man/powercom.8 | 4 +- docs/man/powerman-pdu.8 | 4 +- docs/man/powerpanel.8 | 4 +- docs/man/rhino.8 | 4 +- docs/man/richcomm_usb.8 | 4 +- docs/man/safenet.8 | 4 +- docs/man/snmp-ups.8 | 6 +- docs/man/snmp-ups.txt | 2 +- docs/man/solis.8 | 4 +- docs/man/tripplite.8 | 4 +- docs/man/tripplite_usb.8 | 4 +- docs/man/tripplitesu.8 | 4 +- docs/man/ups.conf.5 | 4 +- docs/man/upsc.8 | 27 +- docs/man/upsc.txt | 15 + docs/man/upscli_connect.3 | 4 +- docs/man/upscli_disconnect.3 | 4 +- docs/man/upscli_fd.3 | 4 +- docs/man/upscli_get.3 | 4 +- docs/man/upscli_list_next.3 | 4 +- docs/man/upscli_list_start.3 | 15 +- docs/man/upscli_list_start.txt | 1 + docs/man/upscli_readline.3 | 4 +- docs/man/upscli_sendline.3 | 4 +- docs/man/upscli_splitaddr.3 | 4 +- docs/man/upscli_splitname.3 | 4 +- docs/man/upscli_ssl.3 | 4 +- docs/man/upscli_strerror.3 | 4 +- docs/man/upscli_upserror.3 | 4 +- docs/man/upsclient.3 | 4 +- docs/man/upscmd.8 | 4 +- docs/man/upscode2.8 | 4 +- docs/man/upsd.8 | 4 +- docs/man/upsd.conf.5 | 4 +- docs/man/upsd.users.5 | 17 +- docs/man/upsd.users.txt | 10 +- docs/man/upsdrvctl.8 | 4 +- docs/man/upsimage.cgi.8 | 4 +- docs/man/upslog.8 | 4 +- docs/man/upsmon.8 | 8 +- docs/man/upsmon.conf.5 | 4 +- docs/man/upsmon.txt | 4 +- docs/man/upsrw.8 | 6 +- docs/man/upsrw.txt | 4 +- docs/man/upssched.8 | 4 +- docs/man/upssched.conf.5 | 4 +- docs/man/upsset.cgi.8 | 4 +- docs/man/upsset.conf.5 | 4 +- docs/man/upsstats.cgi.8 | 4 +- docs/man/upsstats.html.5 | 4 +- docs/man/usbhid-ups.8 | 4 +- docs/man/victronups.8 | 4 +- docs/net-protocol.txt | 68 +- docs/new-drivers.txt | 25 +- docs/nut-names.txt | 95 +- docs/security.txt | 9 +- docs/sock-protocol.txt | 14 + docs/stable-hcl.txt | 29 +- docs/website/Makefile.in | 3 + docs/website/news.txt | 5 + docs/website/projects.txt | 6 + docs/website/ups-protocols.txt | 9 + drivers/Makefile.in | 3 + drivers/apc-mib.c | 7 + drivers/apcsmart.c | 172 ++- drivers/apcsmart.h | 18 +- drivers/bcmxcp.c | 132 +- drivers/bcmxcp.h | 35 +- drivers/bcmxcp_ser.c | 5 +- drivers/bcmxcp_usb.c | 10 +- drivers/belkin-hid.c | 152 ++- drivers/bestfortress.c | 24 +- drivers/bestups.c | 3 +- drivers/blazer.c | 43 +- drivers/blazer_ser.c | 8 +- drivers/blazer_usb.c | 10 +- drivers/compaq-mib.c | 207 ++- drivers/cps-hid.c | 2 +- drivers/dstate.c | 40 +- drivers/dstate.h | 6 +- drivers/dummy-ups.c | 2 +- drivers/dummy-ups.h | 68 +- drivers/ietf-mib.c | 10 +- drivers/libshut.c | 34 +- drivers/liebert-hid.c | 2 +- drivers/metasys.c | 41 +- drivers/mge-hid.c | 167 ++- drivers/mge-mib.c | 240 +++- drivers/mge-shut.c | 13 +- drivers/mge-utalk.c | 3 +- drivers/netvision-mib.c | 84 +- drivers/oneac.c | 1091 +++++++++++++--- drivers/oneac.h | 217 +++- drivers/rhino.c | 7 +- drivers/snmp-ups.c | 176 ++- drivers/snmp-ups.h | 13 +- drivers/solis.c | 14 +- drivers/tripplite-hid.c | 107 +- drivers/tripplite_usb.c | 20 +- drivers/upscode2.c | 12 +- drivers/upshandler.h | 4 +- drivers/usbhid-ups.c | 26 +- include/Makefile.am | 6 + include/Makefile.in | 18 +- include/common.h | 1 + include/config.h.in | 6 + include/extstate.h | 7 + include/nut_version.h | 3 - include/state.h | 8 +- lib/Makefile.in | 3 + scripts/Makefile.am | 2 + scripts/Makefile.in | 5 + scripts/augeas/Makefile.am | 2 +- scripts/augeas/Makefile.in | 5 +- scripts/augeas/nutupsconf.aug.in | 1 + scripts/hal/Makefile.in | 3 + scripts/hal/ups-nut-device.fdi.in | 80 +- scripts/hotplug/Makefile.in | 3 + scripts/hotplug/libhid.usermap | 28 +- scripts/java/Makefile.in | 3 + .../org/networkupstools/jnut/Variable.java | 2 +- scripts/logrotate/nutlogd | 24 + scripts/python/Makefile.in | 3 + scripts/python/module/PyNUT.py | 86 +- scripts/systemd/Makefile.am | 5 - scripts/systemd/Makefile.in | 25 +- scripts/systemd/nut-driver.service.in | 4 +- scripts/systemd/nut-monitor.service.in | 4 +- scripts/systemd/nut-server.service.in | 2 +- scripts/systemd/nutshutdown.in | 2 +- scripts/udev/Makefile.in | 3 + scripts/udev/nut-usbups.rules.in | 28 +- scripts/ufw/README | 30 + scripts/ufw/nut.ufw.profile.in | 4 + scripts/upower/95-upower-hid.rules | 11 +- server/Makefile.in | 3 + server/netcmds.h | 1 + server/netget.c | 8 +- server/netlist.c | 84 +- server/netmisc.c | 14 +- server/netmisc.h | 1 + server/netset.c | 24 + server/sstate.c | 21 +- server/sstate.h | 2 + server/upsd.c | 17 +- server/upsd.h | 1 + server/user.c | 6 + tools/Makefile.am | 22 +- tools/Makefile.in | 25 +- tools/{device-recorder.sh => nut-recorder.sh} | 16 +- tools/nut-scanner/Makefile.am | 2 +- tools/nut-scanner/Makefile.in | 11 +- tools/nut-scanner/nut-scanner.c | 3 + tools/nut-scanner/nutscan-init.c | 27 +- tools/nut-scanner/nutscan-init.h | 1 + tools/nut-scanner/nutscan-snmp.h | 2 +- tools/nut-scanner/nutscan-usb.h | 12 +- tools/nut-scanner/scan_avahi.c | 7 +- tools/nut-scanner/scan_ipmi.c | 6 +- tools/nut-scanner/scan_nut.c | 84 +- tools/nut-scanner/scan_snmp.c | 26 +- tools/nut-scanner/scan_usb.c | 6 +- tools/nut-scanner/scan_xml_http.c | 8 +- tools/nut-usbinfo.pl | 13 +- tools/svn2cl.authors | 8 + 257 files changed, 6020 insertions(+), 1394 deletions(-) create mode 100644 docs/man/nut-recorder.8 create mode 100644 docs/man/nut-recorder.txt delete mode 100644 include/nut_version.h create mode 100644 scripts/logrotate/nutlogd create mode 100644 scripts/ufw/README create mode 100644 scripts/ufw/nut.ufw.profile.in rename tools/{device-recorder.sh => nut-recorder.sh} (80%) diff --git a/ChangeLog b/ChangeLog index ceb1271..398ebcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,961 @@ +2012-05-31 Arnaud Quette + + * [r3643] NEWS, UPGRADING, configure.in, docs/website/news.txt: + Final update for 2.6.4 release + +2012-05-30 Arnaud Quette + + * [r3642] data/driver.list.in: Add support for Cyber Power Systems + CP1000PFCLCD + + Add CyberPower Systems CP1000PFCLCD (USB ID 0x0764:0x0501) to the + list of usbhid-ups supported models (reported by David Owen) + * [r3641] drivers/apc-mib.c: Track more APC SNMP sysOID values, as + comments + * [r3640] drivers/upshandler.h: Fix code spacing (no functional + change) + * [r3639] drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c: Add some + debug traces on incoming / outgoing data + * [r3638] INSTALL: Add missing reference to nut.conf manual page + * [r3637] drivers/bestfortress.c: Improve Best Fortress LI675VA + support + + Apply an old missed patch: all responses are preceded and + terminated by "CR LF". But bestfortress driver discards anything + after the first "CR LF". This patch trims everything up to the + first LF. (patch from Jørgen Thomsen) + * [r3636] drivers/metasys.c: Remove extraneous spaces (no + functional changes) + +2012-05-29 Arnaud Quette + + * [r3633] common/parseconf.c: Fix CVE-2012-2944: upsd can be + remotely crashed + + NUT server (upsd), from versions 2.4.0 to 2.6.3, are exposed to + crashes when receiving random data from the network. + + This issue is related to the way NUT parses characters, + especially from the network. Non printable characters were missed + from strings operation (such as strlen), but still copied to the + buffer, causing an overflow. + + Thus, fix NUT parser, to only allow the subset Ascii charset from + Space to ~ + + (Reported by Sebastian Pohle, Alioth bug #313636, CVE-2012-2944) + * [r3632] data/driver.list.in: Add support for Lexis X-power Tigra + 1kVA + + Add Lexis X-power Tigra 1kVA to the list of blazer_ser or bestups + supported models (reported by Tmima Pliroforikis Perifereiakis + Enotitas Pierias) + * [r3631] data/driver.list.in: Encourage the use of blazer_ser + instead of bestups + + Mention blazer_ser as prefered compared to bestups. Recent + changes to blazer_ser have made it possible to use it instead of + bestups. In the end, bestups will be replaced by blazer_ser, as + for other Megatec/Q1 drivers + * [r3629] drivers/blazer.c, drivers/blazer_ser.c: Improve Best UPS + support in blazer + + Best UPS units, which use a subset of the Megatec/Q1 protocol, + supported by the blazer drivers, can now work with blazer_ser. + This support is still limited, but already offers a decent set of + features + +2012-05-25 Arnaud Quette + + * [r3628] server/user.c: Add debug traces for instcmds and actions + + Whenever upsd adds an instant command or an action, from + upsd.users, display a debug trace + * [r3627] docs/man/upsd.users.txt: Clarify multiple actions + specification + + Add more details and an example, to illustrate multiple actions + specification (reported by Emilien Kia, from Eaton) + +2012-05-24 Arnaud Quette + + * [r3626] data/driver.list.in: Add support for Eaton Management + Card Contact + + Add Eaton Management Card Contact (ref 66104) to the list of + mge-shut or mge-utalk supported models + * [r3625] drivers/compaq-mib.c: HP SNMP completion + + Complete HP SNMP mapping table, with thresholds, nominal values + and more commands + +2012-05-23 Arnaud Quette + + * [r3623] clients/upsrw.c, common/state.c, + docs/man/upscli_list_start.txt, docs/man/upsrw.txt, + docs/net-protocol.txt, docs/new-drivers.txt, + docs/sock-protocol.txt, drivers/dstate.c, drivers/dstate.h, + include/extstate.h, include/state.h, + scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java, + server/netget.c, server/netlist.c, server/netset.c, + server/sstate.c, server/sstate.h: Support of ranges of values for + writable variables + + Merge branch that implement [RFC]: new dstate_addrange() and + "LIST RANGE" command: it is now possible to specify one or more + ranges of values for writable variables, using dstate_addrange() + in drivers. upsd also supports the new type 'RANGE' for 'GET + TYPE', along with the 'LIST RANGE' command. Finally, users can + interact through upsrw, which displays the supported ranges, and + enforces new value checking against the provided boundaries + * [r3622] docs/website/projects.txt: Reference Thecus NAS in + Related projects + + Add a reference in the Related projects, on Thecus NAS range, + which uses NUT for power protection + +2012-05-22 Arnaud Quette + + * [r3621] drivers/apcsmart.c, drivers/apcsmart.h: Complete r3620 + for HP-UX + + HP-UX does not support VREPRINT, so make it conditional + * [r3620] drivers/apcsmart.c, drivers/apcsmart.h: Fix commit r3603 + + Commit r3603 (fix tcsetattr() / tcgetattr() issue) has introduced + some incompatibility with older Unix systems, such as Solaris, + Aix and HP-UX. The present commit should address it + * [r3618] configure.in, docs/net-protocol.txt, server/netcmds.h, + server/netmisc.c, server/netmisc.h: Add versioning to the network + protocol + + Due to the number of recent evolutions to the network protocol, + along with other possible future changes, NUT network protocol is + now versioned. The chapter "Network protocol information", of the + developer guide, stores the revision history, while a new + "NETVER" command serves this information through the protocol + +2012-05-21 Arnaud Quette + + * [r3617] data/driver.list.in: Complete the supported PowerWalker + ranges + + Add PowerWalker Online VFI LCD, Line-Interactive VI LCD and + Line-Interactive VI models to the list of blazer_usb supported + models + * [r3616] data/driver.list.in: Add support for Microline C-Lion + Innova ranges + + Add Microline C-Lion Innova models to the list of blazer_usb + supported models + * [r3614] data/driver.list.in: Add support for KOLFF ranges + + Add KOLFF BLACK NOVA models to the list of blazer_usb supported + models + * [r3613] data/driver.list.in: Add support Ippon INNOVA RT range + + Add Ippon INNOVA RT models to the list of blazer_usb supported + models + * [r3612] data/driver.list.in: Add support for Gtec ranges + + Add Gtec models to the list of blazer_ser or blazer_usb supported + models + * [r3611] data/driver.list.in: Complete the supported EVER ranges + + Add EVER POWERLINE RT / 11 / 31 and DUO II Pro models to the list + of blazer_ser or blazer_usb supported models + * [r3610] data/driver.list.in: Add support for COVER ENERGY SA + ranges + + Add COVER ENERGY SA models to the list of blazer_usb supported + models + * [r3609] data/driver.list.in: Add support for Borri ranges + + Add Borri models to the list of blazer_usb supported models + * [r3608] data/driver.list.in: Add support for ARTronic ranges + + Add ARTronic models, both serial and USB, to the list of + blazer_ser and blazer_usb supported models + * [r3607] drivers/belkin-hid.c: Fix Liebert firmware (incorrect + exponents) + + There are at least two Liebert firmware types which both report a + VID:PID of 10af:0001. The newer ones tend not to have the Belkin + broken Usage Pages (and therefore use standard HID PDC paths) but + they have incorrect exponents for some fields. This patch fixes + the values for the latter implementation + + Author: Charles Lepple + * [r3606] data/driver.list.in, drivers/netvision-mib.c: Add + 3-phases support to Socomec Netvision MIB + + Improve Socomec Netvision MIB, by adding support for 3-phases UPS + (patch from Manuel Bouyer) + * [r3605] data/driver.list.in: Add support for PowerShield Defender + 1200VA + + Add PowerShield Defender 1200VA (USB ID 0665:5161) to the list of + blazer_usb supported models (reported by Tom Clarkson) + * [r3604] drivers/blazer.c, drivers/blazer_ser.c, + drivers/blazer_usb.c: beeper.status belongs to the "ups" data + collection + +2012-05-16 Arnaud Quette + + * [r3603] drivers/apcsmart.c, drivers/apcsmart.h: Final fix to the + tcsetattr() / tcgetattr() issue + + The most likely cause of all spurious differences between what + was set on the port with tcsetattr() and what tcgetattr() shows + are likely to do with the c_local PENDIN flag, which is a status + bit, not a control bit. It will change when there's unread + pending input, which can be quite often on an APC UPS. + + The right way to compare struct termios values is to clear the + status flags _after_ the tcsetattr() and of course after the + tcgetattr() call and then compare the result with what was set. + + Also set NOKERNINFO, if available, as we don't want the UPS or + noise on the line to accidentally trigger status output back to + the UPS, and finally make sure IEXTEN is also cleared along with + ISIG since it too can cause weird things to happen. + + This change also adds some debug code to show any differences in + the structures in a logical manner in debug output (and squashes + one tiny compiler warning) (patch from Greg A. Woods) + * [r3602] docs/config-notes.txt, docs/man/upsmon.txt: Whitespace + fixes + + Remove some extraneous spaces, suggested by "git diff --check", + and improve a bit formatting (patch #36 from Greg A. Woods) + +2012-05-15 Arnaud Quette + + * [r3601] drivers/snmp-ups.c, drivers/snmp-ups.h: Remove dead code + + Remove dead code, related to shutdown handling (no functional + changes) (based on patch #29 from Greg A. Woods) + * [r3599] docs/nut-names.txt: Fix formating issue + * [r3598] docs/nut-names.txt: Add missing battery.voltage data to + the namespace + + Add missing battery.voltage.{low,high} to the standard NUT + namespace + * [r3597] docs/nut-names.txt, drivers/upscode2.c: Rename + peakcurrent to current.peak (as per RFC) + + Rename peakcurrent to current.peak, since it is more coherent and + suitable + * [r3596] drivers/dummy-ups.c, drivers/dummy-ups.h: Update and + cleanup + + Convert flags defitions to bitwise left shift, convert some + comments about variables to actual values, and do a bit of + cleanup (patch #27 from Greg A. Woods) + * [r3594] drivers/blazer.c: Add comment on shutdown.return ondelay + value + + Add a comment reinforcing the need for ondelay=3 (partial patch + #26 from Greg A. Woods) + * [r3593] docs/man/snmp-ups.txt: Complete APC SNMP compatibility + information + + Mention more varieties of APC SNMP cards, and mention the + POWERNET MIB (patch #25 from Greg A. Woods) + * [r3590] drivers/netvision-mib.c: Fix status processing for "ECO + mode" + + When running in "ECO mode", the driver should report an + ups.status set to "OL", or it otherwise ends up with an empty + string that confuses upsmon (patch from Ivan Kuznetsov) + +2012-05-14 Arnaud Quette + + * [r3589] docs/man/blazer.txt: Mention General Electric in blazer + manual page + + Mention General Electric as a user of the Megatec/Q1 protocol + (patch #24 from Greg A. Woods) + * [r3588] clients/upsmon.h: Use bitwise left shift for flags + definitions + + Use (1 << N) to define a bit flag at bit N, which is more + coherent with other similar implementations in NUT (patch #23 + from Greg A. Woods) + * [r3587] clients/upsmon.c: Cosmetic changes + + Remove dead / redundant #defines, and enable interesting debug + traces that were commented out (based on patch #22 from Greg A. + Woods) + * [r3586] drivers/apcsmart.h: Use bitwise left shift for status + flags definitions + + Use (1 << N) to define a bit flag at bit N, which is more + coherent with other similar implementations in NUT (patch #21 + from Greg A. Woods) + * [r3585] drivers/apcsmart.c, drivers/apcsmart.h: Don't be too + strict about terminal settings + + Don't log an error when tcgetattr() reports different settings on + the port (patch #20 from Greg A. Woods) + * [r3584] tools/nut-usbinfo.pl: Better filtering on USB related + files + + The current USB information extraction script is not optimal at + filtering files that need to be inspected. While waiting for a + proper rewrite, improve a bit more filenames filtering (patch #18 + from Greg A. Woods) + * [r3583] drivers/blazer_ser.c: Quote the debug output for space + visibility + + Quote the debug output so one can see how many spaces there are + (patch #16 from Greg A. Woods) + * [r3582] docs/cables/apc.txt: Update APC cabling information + + Update information about APC cable model numbering and revisions + (patch #16 from Greg A. Woods) + * [r3581] data/driver.list.in: GE Digital Energy updates + + Rename "GE" to "GE Digital Energy", which is more appropriate in + this context. Also add GT Series 1000-3000 VA to the list of + blazer_ser supported models (patch #15 from Greg A. Woods) + * [r3580] docs/developers.txt: Complete notes on spaces for + alignements + + Add complementary note on the use of spaces for alignements + (patch #14 from Greg A. Woods) + * [r3577] docs/design.txt: Use more suitable examples + + Use an example driver name matching the unified NUT drivers + generic manual page name (patch #13 from Greg A. Woods) + * [r3576] drivers/mge-hid.c: Complete and update Eaton HID usages + table + +2012-05-11 Arnaud Quette + + * [r3574] tools/Makefile.am: Fix typo in comment + + Fix a typo error in comment (reported by Fred Bohé, from Eaton) + * [r3573] scripts/upower/95-upower-hid.rules: Update upower script + + Update upower script with recent changes and updates (redundant + with patch #6 from Greg A. Woods) + * [r3572] tools/Makefile.am: Explicit mention of Makefiles + brokenness + + Document that, at least, this Makefile.am is broken by design + (patch #5 from Greg A. Woods) + * [r3571] docs/man/apcsmart.txt: Fix documentation wording + + "there're" is not a valid contraction, especially not in a + technical document (patch #4 from Greg A. Woods) + * [r3570] docs/man/apcsmart.txt: Always use upper case for the + acronym "UPS" + + Be consistent in using all upper case for the acronym "UPS" (Ie + Uninterruptible Power Supply) (patch #3 from Greg A. Woods) + * [r3569] docs/man/apcsmart.txt: Fix SmartUPS cabling nomenclature + + Correct the nomenclature of the SmartUPS cabling part numbers + (patch #2 from Greg A. Woods) + * [r3568] configure.in: Fix a configure error message + + Asciidoc might actually be installed but documentation might + still not be build-able (earlier messages should hint at exactly + what was missing) (patch #1 from Greg A. Woods) + * [r3567] data/driver.list.in: Add support for ATEK Defensor range + + Add ATEK Defensor range (Innova series) to the list of blazer_usb + supported models + * [r3566] data/driver.list.in: Fix EVER brand name + + The correct name is "EVER", not "EVER UPS", as per a request from + the manufacturer + +2012-05-10 Arnaud Quette + + * [r3565] docs/website/news.txt: Update for WMNut 0.63 publication + * [r3564] docs/website/ups-protocols.txt: Official Riello protocols + publication + +2012-05-03 Arnaud Quette + + * [r3558] drivers/libshut.c, drivers/mge-shut.c: Forgotten driver + version bump + * [r3557] clients/upsmon.c: Coverity fix on upsmon + + Remove an unneeded null check, that cause a Coverity error + (reported by Michal Hlavinka from RedHat) + * [r3556] drivers/libshut.c, drivers/mge-shut.c: Coverity fix on + Eaton SHUT + + Fix some tests that are always false, regardless of the values of + operands (reported by Michal Hlavinka from RedHat) + * [r3555] clients/upssched.c, drivers/bcmxcp.c, + drivers/bcmxcp_usb.c, drivers/dstate.c, drivers/mge-utalk.c, + drivers/rhino.c, drivers/solis.c, drivers/tripplite_usb.c, + tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_xml_http.c: + Merge Coverity branch + + Merge all work done part of the Coverity static analysis scan, + done by Michal Hlavinka from RedHat + +2012-05-02 Arnaud Quette + + * [r3553] docs/download.txt, docs/website/news.txt: Update Windows + package publications + * [r3552] common/Makefile.am, include/Makefile.am: Better handling + of nut_version.h + + nut_version.h should not be distributed, since it is + automatically built. Moreover, hard dependency in common/ is not + needed since BUILT_SOURCES reference ensure generation before any + other target: + http://www.gnu.org/software/automake/manual/automake.html#Sources + (Reported by Regid Ichira, Debian bug #613643) + +2012-04-27 Arnaud Quette + + * [r3547] data/driver.list.in, drivers/cps-hid.c: Add support for + CyberPower Systems PR6000LCDRTXL5U + + Add CyberPower Systems PR6000LCDRTXL5U (USB ID 0x0764:0x0601) to + the list of usbhid-ups supported models (reported by Dax Kelson) + * [r3546] data/driver.list.in: Complete HP supported devices list + + Add HP UPS Management Module to the list of snmp-ups supported + models. Also complete serial compatibility for some models, using + mge-shut + +2012-04-25 Arnaud Quette + + * [r3542] docs/man/nut-scanner.txt: Clarify nut-scanner compilation + and distribution + + Document explicitely how nut-scanner is compiled, and how its + features are made available, according to its dependencies (both + compile time and runtime) + +2012-04-24 Frederic Bohe + + * [r3539] tools/nut-scanner/nut-scanner.c, + tools/nut-scanner/nutscan-init.c, + tools/nut-scanner/nutscan-init.h, tools/nut-scanner/scan_avahi.c, + tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, + tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, + tools/nut-scanner/scan_xml_http.c: Cleaner exit for nut-scanner + +2012-04-23 Frederic Bohe + + * [r3538] tools/nut-scanner/scan_avahi.c, + tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, + tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, + tools/nut-scanner/scan_xml_http.c: Be more verbose when failing + to dynamically load a library + +2012-04-14 Arnaud Quette + + * [r3534] docs/man, docs/man/Makefile.am, docs/man/index.txt, + docs/man/nut-recorder.txt, tools/nut-recorder.sh: Create + nut-recorder manual page + * [r3533] drivers/tripplite-hid.c: HP USB UPS completion #3 + + Remove R/T3000 USB ID (0x03f0:0x1fe5) from the TrippLite HID + mapping, since it is supported by the Eaton HID mapping. This + completes commit r3525. Also adds ups.firmware and device.part + * [r3532] drivers/usbhid-ups.c: Correct Celsius temperatures that + should be in Kelvin + + Check if raw value is in the Kelvin range, to detect buggy values + that are already expressed in Celsius degrees, as found on some + HP devices + * [r3531] docs/developer-guide.txt, tools/Makefile.am, + tools/device-recorder.sh, tools/nut-recorder.sh: Rename + device-recorder to nut-recorder + * [r3530] data/driver.list.in: Reorder Dell devices by connection + type + +2012-04-10 Arnaud Quette + + * [r3529] scripts/systemd/nut-driver.service.in, + scripts/systemd/nut-monitor.service.in, + scripts/systemd/nut-server.service.in, + scripts/systemd/nutshutdown.in: Fix broken systemd integration in + the build system + + Step 2: add the theoretical path templates to the systemd + scripts. This however requires adjustments to the RPM package. + Namely, upsd and upsmon will have to be installed in /sbin, + instead of the current /usr/sbin + * [r3528] configure.in, scripts/systemd/Makefile.am: Fix broken + systemd integration in the build system + + Step 1: remove Makefile rules that were both useless, and causing + warning. Generate nut-*.service files from .in templates in + configure, as it should be, which is currently void since there + is no target to substitute. This has however required to export + SBINDIR and PIDPATH through AC_SUBST, in configure + * [r3525] drivers/mge-hid.c: HP USB UPS completion #2 + + Address HP USB/HID devices, that use the Eaton HID definitions. + This includes the latest products range (USB IDs 0x1fe5, 0x1fe6, + 0x1fe7 and 0x1fe8), and few more variables and commands + * [r3524] drivers/mge-hid.c: Fix Eaton / MGE outlet.2.switchable + flags + + outlet.2.switchable should only be writable to enable ECO mode on + Ellipse ECO, Protection Station and some 3S. Other models should + only expose it as read only (reported by Prachi Gandhi from + Eaton, Alioth bug #313587) + +2012-04-04 Arnaud Quette + + * [r3520] scripts/Makefile.am, scripts/logrotate, + scripts/logrotate/nutlogd: Provide log rotation configuration for + NUT + + Provide a basic configuration file for managing rotation + (logrotate) of NUT log files, generated by upslog + +2012-04-02 Arnaud Quette + + * [r3518] docs/nut-names.txt: Update the namespace + + Complete the namespace with missing variables and commands, that + are either known or have had an RFC + * [r3517] docs/man: Subversion ignored files completion + + Mark nutscan_init.html as Subversion ignored (no functional + changes) + +2012-03-31 Arnaud Quette + + * [r3516] data/driver.list.in: Add support for AEG Power Solutions + PROTECT HOME + + Add AEG Power Solutions PROTECT HOME (USB ID 0x0665:0x5161) to + the list of blazer_ser and blazer_usb supported models (reported + by Joachim Schiele) + +2012-03-30 Arnaud Quette + + * [r3514] drivers/bcmxcp_usb.c: Add debug traces for read / write + commands + * [r3512] common/common.c, include/common.h: Improve support + functions for trimming strings + + Enforce verifications in rtrim, and add an ltrim function + +2012-03-29 Arnaud Quette + + * [r3511] data/driver.list.in, drivers/blazer_usb.c: Add support + Innova online UPS family + + Add Innova T (0x06da:0x0201), Innova RT (0x06da:0x0005) and + Innova 3/1 T (0x06da:0x0004) to the list of of blazer_usb and + blazer_ser supported models. Innova series are online UPS + supporting Q1 for compatibility, and many more commands. Better + support, either through blazer_* rewrite or through a new driver, + is considered as a future possibility + +2012-03-24 Arnaud Quette + + * [r3508] configure.in, docs/Makefile.am, docs/security.txt, + scripts/Makefile.am, scripts/ufw, scripts/ufw/README, + scripts/ufw/nut.ufw.profile.in: Uncomplicated Firewall (UFW) + support + + Provide an Uncomplicated Firewall (UFW) profile (nut.ufw.profile) + to tightly integrate NUT, along with some documentation + completion for the Security chapter of the user manual + +2012-03-23 Arnaud Quette + + * [r3507] conf/nut.conf.sample, docs/man/nut.conf.txt: Fix nut.conf + documentation and sample file + + Since nut.conf is intended to be sourced by shell scripts, spaces + must not be added around the equal sign. Fix documentation and + sample file to conform to this purpose, and add bold warning + (reported by Tim Rice, Alioth bug #312452) + * [r3506] clients/upsmon.c, server/upsd.c: Detect duplicate + instances of upsd / upsmon + + Fix a long standing issue, that is the lack of detection of + duplicate upsd / upsmon instances when starting another one of + these daemons. This previously resulted in inconsistencies, such + as being unable to stop the daemon, due to its .pid file being + removed by the newly started instance (last reported by Andrew + Min Chang) + +2012-03-21 Frederic Bohe + + * [r3503] drivers/libshut.c: Avoid stack corruption on invalid + frame + + In the protocol, the frame size can be 8 bytes max. That is why + the frame buffer is only 8 bytes long. If the frame is corrupted, + the size read may be up to 15, which may corrupt the stack while + writing into the frame buffer. This patch add a simple sanity + check on the size to avoid a crash and enforce protocol + limitation. + * [r3501] drivers/libshut.c: Fix SHUT variables read (from Arnaud + Quette) + * [r3500] drivers/bcmxcp.c, drivers/bcmxcp.h, drivers/bcmxcp_usb.c: + Change timeout for PW9120 + + Current timeout (1 sec) is too short for PW9120: numerous frames + are lost. Setting this to 2 seconds fix this. + * [r3499] drivers/libshut.c: Deactivate UPS notification + + Currently this driver is ignoring notification by automatically + sending NACK when they are received. Nevertheless,this behavior + creates communication errors with some UPS (M2200). So this patch + completly disable the sending of notification from the UPS. + Ideally we should correclty implement notifications managment for + optimal performance, but with this patch, at least, communiaton + works. + * [r3498] drivers/libshut.c: Fix shut notification mask + +2012-03-09 Arnaud Quette + + * [r3495] docs/config-notes.txt: Emphasize special characters + * [r3494] data/driver.list.in, drivers/tripplite-hid.c: HP USB UPS + completion #1 + + Address HP USB/HID devices, that use the TrippLite HID + definitions. This includes new ProductIDs, and few more variables + and commands + * [r3493] drivers/oneac.h: Remove extraneous comment start + +2012-03-08 Frederic Bohe + + * [r3487] common/parseconf.c, common/upsconf.c, + docs/config-notes.txt: More flexible '=' character managment in + conf files + + This allow to support the following forms : 'foo = bar', + 'foo=bar', 'foo =bar' and 'foo= bar' + +2012-03-06 Arnaud Quette + + * [r3485] docs/man/oneac.txt, drivers/oneac.c, drivers/oneac.h: + Improve general OneAC support (oneac 0.80) + + Improve support for all families of Oneac (EG, ON, OZ and OB), + including support for more data and instant commands (patch from + Bill Elliot) + +2012-03-05 Arnaud Quette + + * [r3484] drivers/blazer.c, drivers/blazer_ser.c, + drivers/blazer_usb.c: Guesstimate battery high and low voltages + + Add an automatic estimation for high and low voltages, to be able + to determine battery charge. This should cover most cases, but a + bold mention has been added at driver startup, to inform the + user. Driver version (USB and serial) have been bumped to reflect + this change + * [r3483] drivers/blazer.c: Set 'FSD' status flag upon need + + As per the recent decision to allow driver to set 'FSD' status + flag, set 'FSD' upon "Shutdown imminent" detection + +2012-03-02 Arnaud Quette + + * [r3481] autogen.sh, scripts/augeas/Makefile.am: Sanity check + before python script execution + + Only generate Augeas ups.conf lens if we can import required + Python modules (re,glob,codecs) + * [r3480] docs/man/blazer.txt: Fix typo error in runtimecal example + values + * [r3479] docs/stable-hcl.txt: Improve formating + * [r3478] docs/new-drivers.txt: Formalize the use of the FSD status + flag + + As an exception, drivers are now allowed to set the "FSD" (Forced + ShutDown) status flag when an imminent shutdown has been detected + +2012-02-29 Charles Lepple + + * [r3477] clients/upsc.c, docs/man/upsc.txt: Client side + implementation of "LIST CLIENT" + + Implement "LIST CLIENT" in upsc, using "-c " + + Author: Arnaud Quette + * [r3476] docs/net-protocol.txt, server/netlist.c: Adjust server + side implementation of "LIST CLIENT" + + Commands of the "LIST" family have to be coherent with the + command name. Ie, "LIST CLIENT" should use the same "CLIENT" + prefix, or it will otherwise break client side verification + mechanism + + Author: Arnaud Quette + * [r3475] server/netlist.c: Adjust "LIST CLIENTS" implementation + + Adjust "LIST CLIENTS" implementation to be more coherent with + other network protocol commands + + Author: Arnaud Quette + * [r3474] docs/net-protocol.txt: Document new "LIST CLIENTS" + command + + Author: Arnaud Quette + * [r3473] server/upsd.c, server/upsd.h: Remove upsd "info" command + + Adjust initial "LIST CLIENTS" commit, by removing the upsd "info" + command, which is not suitable, and redundant with the "LIST + CLIENT" command of the network protocol + + [Fixed compilation error] + + Author: Arnaud Quette + * [r3472] scripts/python/module/PyNUT.py: Add support for LIST + CLIENTS, etc. to PyNUT. + + Patch by Rene Martín Rodríguez . Merged with + typo fixes in repository. + + Covers LIST CLIENTS, FSD, HELP and VER. Module version bumped to + 1.2.2. + + Discussion: + http://article.gmane.org/gmane.comp.monitoring.nut.devel/5871 + * [r3471] server/netlist.c, server/upsd.c, server/upsd.h: Add new + "LIST CLIENTS" command to NUT protocol. + + Patch by Rene Martín Rodríguez , with + indentation changed to tabs. + + Discussion: + http://article.gmane.org/gmane.comp.monitoring.nut.devel/5870 + * [r3470] drivers/blazer.c: Update URL to Megatec protocol + description. + +2012-02-28 Arnaud Quette + + * [r3469] drivers/liebert-hid.c: UPower optimization + + Always spell manufacturer names the same way across the various + USB drivers. This avoids duplication of manufacturer entries in + scripts/upower/95-upower-hid.rules, during automatic generation + +2012-02-27 Arnaud Quette + + * [r3468] data/driver.list.in, drivers/cps-hid.c: Add support for + CyberPower OR700LCDRM1U + + Add CyberPower OR700LCDRM1U (0x0764:0x0601) to the list of + usbhid-ups supported models (reported by Brian McCann) + +2012-02-22 Michal Soltys + + * [r3467] drivers/apcsmart.c: drivers/apcsmart.c: setvar_string() + and apc_write_long() bugfixes + + setvar_string() couldn't function properly, due to the use of + wrong variable. + + Not associated with any bugreport (reported directly to email). + * [r3466] drivers/apcsmart.c: drivers/apcsmart.c: make + tcsetattr()/tcgetattr() difference not fatal + + This is follow up from earlier bug report (#313395). Earlier + commit should have fixed the issue, but the original submitter + never commented on it. + + Just in case - instead of making it fatal, we only log the issue. + +2012-02-20 Arnaud Quette + + * [r3450] drivers/snmp-ups.c, tools/nut-scanner/scan_snmp.c: Better + handling of Net-SNMP AES PrivProtocol + + Handle smartly issues related to Net-SNMP support and declaration + of AES PrivProtocol + +2012-02-19 Charles Lepple + + * [r3449] drivers/snmp-ups.c, drivers/snmp-ups.h: Don't allocate + storage for variables in snmp-ups.h + + The header files should declare variables as extern, and they + should be allocated in only one .c file (not all of the files + which include the .h file). While this is not an immediate + problem when only one .c file includes the .h file, it still + should be fixed in case that changes in the future. + + Patch by Daniel Macks: + http://fink.cvs.sourceforge.net/viewvc/fink/experimental/dmacks/finkinfo/nut.patch?revision=1.1&view=markup + * [r3448] drivers/bcmxcp.c, drivers/bcmxcp.h: Don't allocate + storage for variables in bcmxcp.h + + The header files should declare variables as extern, and they + should be allocated in only one .c file (not all of the files + which include the .h file). This was causing multiple symbol + definitions on Mac OS X. + + Patch by Daniel Macks: + http://fink.cvs.sourceforge.net/viewvc/fink/experimental/dmacks/finkinfo/nut.patch?revision=1.1&view=markup + +2012-02-16 Arnaud Quette + + * [r3447] data/driver.list.in, drivers/blazer_usb.c: Add support + for Online Yunto YQ450 + + Add Online Yunto YQ450 (0x06da:0x0002) to the list of blazer_usb + supported models (reported by Thomas Maisl) + +2012-02-16 Charles Lepple + + * [r3445] tools/git-svn.authors, tools/svn2cl.authors: Update SVN + username mappings + +2012-02-14 Arnaud Quette + + * [r3440] data/driver.list.in: Add support for Tripp-Lite + OMNISMART500 + + Add Tripp-Lite OMNISMART500 (productID 0001) to the list of + tripplite_usb supported models (reported by Matt Schulte) + +2012-02-10 Arnaud Quette + + * [r3439] data/driver.list.in: Support for Dell UPS Network + Management Card + + Add Dell UPS Network Management Card to the list of snmp-ups and + netxml-ups supported models. SNMP support currently relies on + IETF (RFC-1628) MIB, and not on Dell UPS MIB + +2012-02-09 Frederic Bohe + + * [r3435] tools/nut-scanner/scan_snmp.c: Remove useless lib_mutex + and buggy dev_mutex + +2012-02-03 Arnaud Quette + + * [r3431] Makefile.am: Update ChangeLog generation and fix text + wrapping + + Adapt the ChangeLog file generation process to correctly wrap + text, even with the new 'git style' format, used for Subversion + commit messages + +2012-02-02 Arnaud Quette + + * [r3426] drivers/bcmxcp.c, drivers/bcmxcp.h: Improve XCP support + for battery status + + Add support for battery test publication in ups.test.result, and + RB (replace battery) in ups.status + +2012-01-31 Arnaud Quette + + * [r3424] drivers/bestfortress.c: Add more debug traces + + Add more debug traces, again, to work on the checksum corruption + issue + +2012-01-23 Arnaud Quette + + * [r3411] drivers/mge-mib.c: Clean and complete MGE MIB + + Complete MGE MIB for status, variables and commands, using IETF + MIB OIDs when needed. Macro have also been replaced by actual + numeric OID paths for better clarity. + * [r3410] drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups shutdown + support + + snmp-ups now provides support for UPS shutdown, based on + usbhid-ups mechanisms (composite commands and fallback). + Composite commands are also supported. This means, for example, + that if 'shutdown.return' is not supported, a combination of + 'load.off' + 'load.on' may be used. + * [r3409] drivers/ietf-mib.c: Fix invalid variable name + + Beeper status belongs to the 'ups' data collection + * [r3408] drivers/snmp-ups.c: Check validity of instant commands + before addition + + Prior to adding new instant commands, referenced OIDs are now + checked for existance. This avoid adding commands that are not + supported + * [r3407] docs/man/upsmon.txt: Fix upsmon synopsis + + Add the missing '-K' (Test for the shutdown flag) to upsmon + synopsis (reported by Regid Ichira) + +2012-01-20 Arnaud Quette + + * [r3406] data/driver.list.in: Support for Riello Netman Plus 102 + SNMP Card + + Add Riello Netman Plus 102 SNMP Card, and attached Sentinel SDL + 6000-7 and Sentinel Dual SDH 1000-7 UPS, to the list of snmp-ups + supported models (reported by Rainer Stumbaum) + +2012-01-19 Arnaud Quette + + * [r3400] drivers/bestfortress.c: Add more debug traces, to work on + the checksum corruption issue + +2012-01-18 Arnaud Quette + + * [r3399] docs/nut-names.txt, drivers/usbhid-ups.c: Adjust + ups.start.auto value for shutdown commands + + When present, ups.start.auto value needs to be adjusted for + shutdown.{return,stayoff} to behave as expected. This is limited + to Eaton devices (reported by Rich Wrenn) + +2012-01-11 Arnaud Quette + + * [r3395] UPGRADING: Cleanup garbage line + + Remove garbage line that was added by accident during the + AsciiDoc branch merge or work + * [r3394] tools/nut-scanner/Makefile.am, + tools/nut-scanner/nutscan-init.c, tools/nut-scanner/scan_nut.c: + Move libupsclient to weak runtime dependencies + + libupsclient, as other libraries used by nut-scanner, is now a + weak runtime dependency, through the use of lt_dl*() functions. + This means that libupsclient is not anymore required, but only + suggested. This should also solve the distcheck-light compilation + on Aix (on behalf of Frédéric Bohe, from Eaton) + +2012-01-09 Arnaud Quette + + * [r3382] drivers/bestups.c: Add the missing driver variable + "battvoltmult" (patch from Sadara Kael) + +2012-01-06 Arnaud Quette + + * [r3379] drivers/snmp-ups.c: Reword the message when sysOID + detection fails + * [r3378] drivers/compaq-mib.c: Add the sysOID value, and bump the + MIB version to 1.1 (reported by Jack Challen) + * [r3377] docs/download.txt: Remove inline SHA-256 sum, and provide + links to MD5 and SHA-256 sums + +2012-01-05 Arnaud Quette + + * [r3376] server/netget.c: GET UPSDESC does not need device sanity + checks (Ie connected, with fresh data) to answer (reported by + Emilien Kia, Alioth bug #313323) + * [r3374] data/driver.list.in: Add Dynamix 1000VA USB to the list + of blazer_usb supported models (requires "langid_fix=0x0409" in + ups.conf ; reported by Glen Ogilvie) + 2012-01-04 Arnaud Quette + * [r3372] docs/download.txt: Add the missing SHA-256 sum on the + Download page / section (need to be generated after the + distribution package) * [r3371] docs/website/news.txt: Update 2.6.3 release date 2012-01-03 Arnaud Quette @@ -140,8 +1096,7 @@ minor documentation update Broken diagram link and 940-0024E cable mention (reported by - Jonathan - Laventhol). + Jonathan Laventhol). 2011-11-05 Arnaud Quette @@ -216,8 +1171,7 @@ Assigning 0 directly was wrong (actually, a leftover from earlier version of the code that was removed) - ser_set_speed() prepares - the - port initially, we only adjust certain options. + the port initially, we only adjust certain options. 2011-10-24 Frederic Bohe @@ -500,10 +1454,8 @@ macro warnings This should be fixed properly upstream, but in the mean time, the - SNMP-based - tools can't use these macros properly (since they will have the - values for - Net-SNMP, not NUT). + SNMP-based tools can't use these macros properly (since they will + have the values for Net-SNMP, not NUT). 2011-09-14 Frederic Bohe @@ -743,8 +1695,8 @@ * [r3150] configure.in: configure.in: minor changes to output - * Capitalized "UPS" - * --with-drivers= : Only *build* specific drivers + * Capitalized "UPS" * --with-drivers= : Only *build* specific + drivers 2011-07-30 Arnaud Quette @@ -1079,8 +2031,7 @@ * [r2934] drivers/bcmxcp_usb.c, drivers/microdowell.c, drivers/rhino.c, drivers/solis.c: Fix remaining C++ style comments, to conform to the NUT coding rules (no functional - change) - on behalf of Prachi Gandhi (prachisgandhi@eaton.com) + change) on behalf of Prachi Gandhi (prachisgandhi@eaton.com) 2011-03-14 Arjen de Korte @@ -1104,8 +2055,8 @@ * [r2927] drivers/apcsmart.c: Flush the input buffer before sending a command [on behalf of Michal Soltys ] * [r2926] drivers/apcsmart.c, drivers/apcsmart.h: protocol_verify() - only cares about explicitly specified commands - and variables [on behalf of Michal Soltys ] + only cares about explicitly specified commands and variables [on + behalf of Michal Soltys ] * [r2925] drivers/apcsmart.c: Additional driver variables that can be set to influence shutdown behavior [on behalf of Michal Soltys ] @@ -1114,9 +2065,8 @@ * [r2923] drivers/apcsmart.c: Deal with more different shutdown methods [on behalf of Michal Soltys ] * [r2922] drivers/apcsmart.c: As 'b' can return different things - than firmware version on some old - models, prefer 'V' over 'b' [on behalf of Michal Soltys - ] + than firmware version on some old models, prefer 'V' over 'b' [on + behalf of Michal Soltys ] * [r2921] drivers/apcsmart.c: remove superfluous status_commit() [on behalf of Michal Soltys ] * [r2920] drivers/apcsmart.c, drivers/apcsmart.h: adjust ignored @@ -1194,9 +2144,9 @@ Reported by Noel David Torres Taño: http://lists.alioth.debian.org/pipermail/nut-upsuser/2010-August/006163.html - Other models may be supported as well. - * http://www.mustek.com.tw/Yukai/html/prod_ups/PowerMust1000.html - * http://www.mustek.com.tw/Yukai/html/UPS.html + Other models may be supported as well. * + http://www.mustek.com.tw/Yukai/html/prod_ups/PowerMust1000.html * + http://www.mustek.com.tw/Yukai/html/UPS.html 2011-02-17 Arnaud Quette @@ -1216,8 +2166,7 @@ driver.list.in from r2516 These entries seem to have been dropped, potentially due to the - rename from - driver.list to driver.list.in, and the format change. + rename from driver.list to driver.list.in, and the format change. 2011-02-11 Arjen de Korte @@ -1377,14 +2326,11 @@ Python and Perl interpreter paths Useful for systems like FreeBSD where Python is optional, and - pulled in from - the ports tree. + pulled in from the ports tree. This patch uses the first interpreter seen in $PATH. A future - improvement would - be to add a configure script argument, although that might be - annoying for the - nut-autoreconf script. + improvement would be to add a configure script argument, although + that might be annoying for the nut-autoreconf script. 2010-12-24 Arnaud Quette @@ -1575,8 +2521,8 @@ [http://lists.alioth.debian.org/pipermail/nut-upsdev/2010-July/004866.html] * [r2733] conf/upsd.users.sample, docs/man/upsd.users.txt: - upsd.users: Specifying multiple instcmds - Add examples for adding multiple instcmds to upsd.users + upsd.users: Specifying multiple instcmds Add examples for adding + multiple instcmds to upsd.users [https://alioth.debian.org/tracker/index.php?func=detail&aid=312768&group_id=30602&atid=411544] * [r2732] drivers/belkin.c, drivers/belkin.h: Update to fix @@ -1713,104 +2659,76 @@ tools/nut-hclinfo.py: Merging AsciiDoc branch into trunk Merged svn://svn.debian.org/nut/branches/AsciiDoc at r2701, with - the trunk - as of r2720. The AsciiDoc branch commit r2721 was cherry-picked - later. + the trunk as of r2720. The AsciiDoc branch commit r2721 was + cherry-picked later. The AsciiDoc homepage is http://www.methods.co.nz/asciidoc/ and - the earliest - suggested version to use (in order to properly generate all - output formats) - is 8.6.3. + the earliest suggested version to use (in order to properly + generate all output formats) is 8.6.3. The commits have been grouped into the following categories: == Build Machinery, File Management, Miscellaneous == r1874, r1880, r1894, r1895, r1896, r1897, r1898, r1908, r1909, - r1910, r1917, - r1920, r1927, r1928, r1929, r1931, r1958, r1976, r1977, r1978, - r1994, r2032, - r2125, r2126, r2130, r2155, r2160, r2246, r2470, r2473, r2474, - r2475, r2505, - r2522, r2538, ~~r2541~~, r2542, r2544, r2546, r2547, r2548, - r2549, r2552, + r1910, r1917, r1920, r1927, r1928, r1929, r1931, r1958, r1976, + r1977, r1978, r1994, r2032, r2125, r2126, r2130, r2155, r2160, + r2246, r2470, r2473, r2474, r2475, r2505, r2522, r2538, + ~~r2541~~, r2542, r2544, r2546, r2547, r2548, r2549, r2552, ~~r2553~~, r2554, r2558, r2560, ~~r2563~~, r2564, r2565, r2566, - r2606, r2607, - r2608, r2611, r2612, r2613, r2614, r2615, r2617, r2630, r2661, - r2669, r2670, - r2672, r2673, r2674, ~~r2679~~, r2683, r2684, r2685, r2686, - r2689, r2690 + r2606, r2607, r2608, r2611, r2612, r2613, r2614, r2615, r2617, + r2630, r2661, r2669, r2670, r2672, r2673, r2674, ~~r2679~~, + r2683, r2684, r2685, r2686, r2689, r2690 == Text File Conversion == r1875, r1881, r1899, r1900, r1901, r1902, r1903, r1912, r1913, - r1916, r1921, - r1922, r1923, r1924, r1925, r1926, r1997, r1998, r2003, r2030, - r2031, r2064, - r2065, r2135, r2150, r2157, r2158, r2245, r2283, r2284, r2285, - r2289, r2291, - r2292, r2328, r2409, r2463, r2465, r2481, r2482, r2497, r2498, - r2499, r2502, - r2517, r2519, r2520, r2525, r2526, r2527, r2530, r2533, r2534, - r2535, r2536, - r2537, r2556, r2561, r2562, r2649, r2701 + r1916, r1921, r1922, r1923, r1924, r1925, r1926, r1997, r1998, + r2003, r2030, r2031, r2064, r2065, r2135, r2150, r2157, r2158, + r2245, r2283, r2284, r2285, r2289, r2291, r2292, r2328, r2409, + r2463, r2465, r2481, r2482, r2497, r2498, r2499, r2502, r2517, + r2519, r2520, r2525, r2526, r2527, r2530, r2533, r2534, r2535, + r2536, r2537, r2556, r2561, r2562, r2649, r2701 == Updated Content == r1938, r1939, r1984, r1985, r1991, r1992, r2052, r2069, r2108, - r2124, r2131, - r2142, r2144, r2149, r2154, r2156, r2164, r2211, r2227, r2293, - r2304, r2309, - r2351, r2358, r2409, r2416, r2418, r2419, r2420, r2438, r2460, - r2461, r2462, - r2464, r2466, r2469, r2471, r2472, r2476, r2477, r2478, r2479, - r2480, r2483, - r2484, r2485, r2493, r2496, r2501, r2503, r2506, r2507, r2510, - r2512, r2518, - r2529, r2540, r2543, r2545, r2550, r2551, r2555, r2557, r2559, - r2631, r2632, - r2633, r2634, r2637, r2638, r2639, r2640, r2643, r2648, r2652, - r2653, r2655, - r2662, r2664, r2665, r2666, r2681 + r2124, r2131, r2142, r2144, r2149, r2154, r2156, r2164, r2211, + r2227, r2293, r2304, r2309, r2351, r2358, r2409, r2416, r2418, + r2419, r2420, r2438, r2460, r2461, r2462, r2464, r2466, r2469, + r2471, r2472, r2476, r2477, r2478, r2479, r2480, r2483, r2484, + r2485, r2493, r2496, r2501, r2503, r2506, r2507, r2510, r2512, + r2518, r2529, r2540, r2543, r2545, r2550, r2551, r2555, r2557, + r2559, r2631, r2632, r2633, r2634, r2637, r2638, r2639, r2640, + r2643, r2648, r2652, r2653, r2655, r2662, r2664, r2665, r2666, + r2681 == Website == r1883, r1905, r1907, r1911, r1933, r1935, r1937, r1940, r1950, - r1953, r1954, - r1967, r1973, r1974, r1975, r2000, r2001, r2002, r2058, r2059, - ~~r2060~~, - r2061, r2063, r2066, r2123, r2134, r2136, r2159, r2225, r2288, - r2290, r2486, - r2487, r2494, r2495, r2500, r2504, r2515, r2521, r2523, r2539, - r2562, r2607, - r2721 + r1953, r1954, r1967, r1973, r1974, r1975, r2000, r2001, r2002, + r2058, r2059, ~~r2060~~, r2061, r2063, r2066, r2123, r2134, + r2136, r2159, r2225, r2288, r2290, r2486, r2487, r2494, r2495, + r2500, r2504, r2515, r2521, r2523, r2539, r2562, r2607, r2721 == Manual Page Conversion == r1961, r1962, r1963, r1965, r1969, r1971, r1972, r1981, r1982, - r1986, r1987, - r1988, r1993, r2004, r2005, r2006, r2007, r2008, r2009, r2010, - r2011, r2012, - r2013, r2014, r2019, r2020, r2021, r2028, r2033, r2034, r2038, - r2044, r2047, - r2048, r2049, r2050, r2051, r2062, r2067, r2068, r2074, r2075, - r2107, r2109, - r2110, r2111, r2112, r2113, r2127, r2129, r2132, r2137, r2146, - r2147, r2151, - r2152, r2162, r2204, r2205, r2206, r2207, r2208, r2209, r2210, - r2211, r2226, - r2227, r2228, r2229, r2249, r2251, r2252, r2258, r2259, r2310, - r2311, r2312, - r2313, r2314, r2572, r2580 + r1986, r1987, r1988, r1993, r2004, r2005, r2006, r2007, r2008, + r2009, r2010, r2011, r2012, r2013, r2014, r2019, r2020, r2021, + r2028, r2033, r2034, r2038, r2044, r2047, r2048, r2049, r2050, + r2051, r2062, r2067, r2068, r2074, r2075, r2107, r2109, r2110, + r2111, r2112, r2113, r2127, r2129, r2132, r2137, r2146, r2147, + r2151, r2152, r2162, r2204, r2205, r2206, r2207, r2208, r2209, + r2210, r2211, r2226, r2227, r2228, r2229, r2249, r2251, r2252, + r2258, r2259, r2310, r2311, r2312, r2313, r2314, r2572, r2580 == Ported from trunk == r2039, r2043, r2049, r2076, r2110, r2120, r2209, r2210, r2249, - r2258, r2287, - r2325, r2358, r2393, r2429, r2430, r2434, r2439, r2440, r2443, - r2447, r2514, - r2532, r2567, r2657, r2694, r2696, r2700 + r2258, r2287, r2325, r2358, r2393, r2429, r2430, r2434, r2439, + r2440, r2443, r2447, r2514, r2532, r2567, r2657, r2694, r2696, + r2700 2010-12-03 Arjen de Korte @@ -2232,12 +3150,10 @@ ` svn merge -r2401:r2413 svn+ssh://svn.debian.org/svn/nut/branches/svn-auto-changelog ` - Includes the following: - - r2402 removes the static ChangeLog and adds a rule and the - authors file. - - r2403 shows how little I remember about automake - - r2404 and r2413 cancel each other out - - r2405 fixes the SVN starting revision syntax. + Includes the following: - r2402 removes the static ChangeLog and + adds a rule and the authors file. - r2403 shows how little I + remember about automake - r2404 and r2413 cancel each other out - + r2405 fixes the SVN starting revision syntax. 2010-03-27 Arnaud Quette @@ -2373,9 +3289,8 @@ pkg-config, rather than checking for the return value, check for a (non-)zero length. It will happily return zero for unknown variables in otherwise supported packages (and this is usually - not what we want). - Also direct stderr to /dev/null for systems that don't use - pkg-config. + not what we want). Also direct stderr to /dev/null for systems + that don't use pkg-config. * [r2377] m4/nut_config_libhal.m4: Fix type (leftover from debugging) * [r2376] configure.in, m4/nut_check_libhal.m4, @@ -2428,8 +3343,7 @@ * [r2363] ChangeLog, configure.in: Final update for 2.4.2 release * [r2362] NEWS, data/driver.list: Add HP R1500 G2 to compatibility - list for bcmxcp - (reported by Stephan Schupfer) + list for bcmxcp (reported by Stephan Schupfer) 2010-02-19 Arjen de Korte diff --git a/INSTALL b/INSTALL index 1e58c4c..7762f5b 100644 --- a/INSTALL +++ b/INSTALL @@ -222,7 +222,7 @@ the 'nut' package, and optionaly the following: //////////////////////////////////////////////////////////////////////////////// Configuration files are located in /etc/nut. -nut.conf must be edited to be able to invoke /etc/init.d/nut +linkman:nut.conf[5] must be edited to be able to invoke /etc/init.d/nut NOTE: Ubuntu users can access the APT URL installation by clicking on link:apt://nut[this link]. diff --git a/Makefile.am b/Makefile.am index 8701f2a..f9e3cd9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,7 @@ MAINTAINERCLEAN_FILES = ChangeLog # in case it has already been generated previously dummy-stamp: ChangeLog: tools/svn2cl.authors dummy-stamp - svn2cl --group-by-day --include-rev --authors=$< --revision 'HEAD:2332' --output=$@ || \ + 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" > $@ if HAVE_ASCIIDOC diff --git a/Makefile.in b/Makefile.in index 884f95e..ac24401 100644 --- a/Makefile.in +++ b/Makefile.in @@ -40,7 +40,8 @@ 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/avahi/nut.service.in AUTHORS COPYING \ + $(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 \ depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -72,7 +73,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = scripts/avahi/nut.service scripts/HP-UX/nut.psf +CONFIG_CLEAN_FILES = scripts/avahi/nut.service scripts/HP-UX/nut.psf \ + scripts/ufw/nut.ufw.profile CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = @@ -207,6 +209,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -220,6 +223,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -227,6 +231,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -373,6 +378,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/ufw/nut.ufw.profile: $(top_builddir)/config.status $(top_srcdir)/scripts/ufw/nut.ufw.profile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -816,7 +823,7 @@ distcleancheck: # in case it has already been generated previously dummy-stamp: ChangeLog: tools/svn2cl.authors dummy-stamp - svn2cl --group-by-day --include-rev --authors=$< --revision 'HEAD:2332' --output=$@ || \ + 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" > $@ @HAVE_ASCIIDOC_TRUE@website: diff --git a/NEWS b/NEWS index c4d0c74..0fd98a7 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,125 @@ If you're upgrading from an earlier version, see the UPGRADING file. For a complete list of changes, please refer to the ChangeLog file. +--------------------------------------------------------------------------- +Release notes for NUT 2.6.4 - what's new since 2.6.3: + + - This release Fix an important vulnerability in upsd + (CVE-2012-2944: upsd can be remotely crashed) + + NUT server (upsd), from versions 2.4.0 to 2.6.3, are exposed to + crashes when receiving random data from the network. + This issue is related to the way NUT parses characters, + especially from the network. Non printable characters were missed + from strings operation (such as strlen), but still copied to the + buffer, causing an overflow. + Thus, fix NUT parser, to only allow the subset Ascii charset from + Space to ~ + (Reported by Sebastian Pohle, Alioth bug #313636, CVE-2012-2944) + + A separate patch, which applies to any faulty version, is also available: + http://trac.networkupstools.org/projects/nut/changeset/3633 + + For more information, refer to the Common Vulnerabilities and Exposures: + http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2944 + + - A static source code analysis has been done by Michal Hlavinka from RedHat, + using Coverity (12 issues fixed). + + - Add new "LIST CLIENTS" and "NETVER" commands to NUT network protocol. + "NETVER" allows to retrieve the Network protocol version, while + "LIST CLIENTS" provides the list of clients connected to a device. + Refer to the developer guide, "Network protocol information" section for + more information. + + - Support of ranges of values for writable variables has been added, to + complete the existing enumerated values mechanism. This will start to + appear in some drivers soon, beginning with Eaton. Refer to the developer + guide, "Creating a new driver..." section for more information. + + - PyNUT.py has been updated to version 1.2.2, adding support for + LIST CLIENTS, FSD, HELP and VER (Rene Martín Rodríguez) + + - support for new devices: + AEG Power Solutions PROTECT HOME + more APC SNMP cards + ATEK Defensor range + all Borri models + all COVER ENERGY SA + CyberPower OR700LCDRM1U, PR6000LCDRTXL5U and CP1000PFCLCD + Dell UPS Network Management Card + Dynamix 1000VA USB + Eaton Management Card Contact (ref 66104) + EVER POWERLINE RT / 11 / 31 and DUO II Pro + GE Digital Energy GT Series 1000-3000 VA + Gtec models + all recent HP serial / USB UPS (G2, G3 and R/T models, ) and HP UPS + Management Module + Ippon INNOVA RT + KOLFF BLACK NOVA + Lexis X-power Tigra 1kVA + Microline C-Lion Innova + Online Yunto YQ450 + PowerShield Defender 1200VA + PowerWalker Online VFI LCD, Line-Interactive VI LCD and Line-Interactive VI + Riello Netman Plus 102 SNMP Card + Tripp-Lite OMNISMART500 + + - apcsmart has received some fixes to work better on Mac OS X, and in general + + - bcmxcp has improved support for battery status, and better supports + PW9120 units + + - bestfortress has improved Best Fortress LI675VA support + + - blazer_ser and blazer_usb now try to automatically estimate high and low + voltages, to be able to calculate battery charge ; support for online + Innova UPS (T, RT and 3/1 T) has been added ; Best UPS support has been + improved, to prepare for superseeding bestups driver + + - bestups has also received some care, though users are encouraged to switch + to blazer_ser, since bestups will soon be deprecated. + + - newmge-shut has been heavilly improved. However, replacement of the + current mge-shut has been postponed to the next release, due to the CVE + issue. + + - oneac 0.80 improves support for all families of Oneac (EG, ON, OZ and OB), + including more data and instant commands (Bill Elliot). + + - usbhid-ups: for Eaton devices, ups.start.auto is now automatically adjusted + for shutdown.{return,stayoff} to behave as expected ; Liebert firmwares with + incorrect exponents have also been addressed. + + - snmp-ups now provides support for UPS shutdown, based on usbhid-ups + mechanisms (composite commands and fallback). Composite commands are also + supported now. This means, for example, that if 'shutdown.return' is not + supported, a combination of 'load.off' + 'load.on' may be used ; + Actual validity of instant commands is now tested before commands addition ; + Eaton/MGE MIB has been cleaned and completed ; 3-phases support has been + added to Socomec Netvision MIB ; HP/Compaq MIB has been completed, with + thresholds, nominal values and more commands. + + - nut-scanner now also has libupsclient has a weak runtime dependency ; more + docs and bugfixes have also happened. + + - Provide an Uncomplicated Firewall (UFW) profile (nut.ufw.profile) + + - Riello protocols have been officially published in NUT protocols library: + http://www.networkupstools.org/ups-protocols.html#_riello + + - Duplicate instances of upsd / upsmon are now detected upon startup + + - NUT variables namespace has been completed with missing variables and + commands that are already known and standard + + - upslog now comes with a companion file, for logrotate configuration + + - more devices embed NUT for power protection, now including Thecus NAS range + + - more bugfixes, cleanup and improvements, on both source code and + documentation, with a good bunch from Greg A. Woods. + --------------------------------------------------------------------------- Release notes for NUT 2.6.3 - what's new since 2.6.2: diff --git a/UPGRADING b/UPGRADING index 6ea3627..d00143d 100644 --- a/UPGRADING +++ b/UPGRADING @@ -7,6 +7,14 @@ 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.3 to 2.6.4 +--------------------------- + +- users are encouraged to update to NUT 2.6.4, to fix upsd vulnerability +(CVE-2012-2944: upsd can be remotely crashed) +- users of the bestups driver are encouraged to switch to blazer_ser, +since bestups will soon be deprecated. + Changes from 2.6.2 to 2.6.3 --------------------------- @@ -202,7 +210,6 @@ which makes it work with upsclient. - 'make install-misc' is now 'make install-lib'. The misc directory has been gone for a long time, and the target was ambiguous. ->>>>>>> switch UPGRADING information to AsciiDoc, and integrate these in the User Manual. - The newapc driver has been renamed to apcsmart. If you previously used newapc, make sure you delete the old binary and fix your diff --git a/clients/Makefile.in b/clients/Makefile.in index 1aec493..48e0dae 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -268,6 +268,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -281,6 +282,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -288,6 +290,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/clients/upsc.c b/clients/upsc.c index e07490b..19c9739 100644 --- a/clients/upsc.c +++ b/clients/upsc.c @@ -1,6 +1,7 @@ /* upsc - simple "client" to test communications Copyright (C) 1999 Russell Kroll + Copyright (C) 2012 Arnaud Quette 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 @@ -34,6 +35,7 @@ static void usage(const char *prog) printf("usage: %s -l | -L [[:port]]\n", prog); printf(" %s []\n", prog); + printf(" %s -c \n", prog); printf("\nDemo program to display UPS variables.\n\n"); @@ -46,6 +48,10 @@ static void usage(const char *prog) printf(" - upsd server, [@[:]] form\n"); printf(" - optional, display this variable only.\n"); printf(" Default: list all variables for \n"); + + printf("\nThird form (lists clients connected to a device):\n"); + printf(" -c - lists each client connected on , one per line.\n"); + printf(" - upsd server, [@[:]] form\n"); } static void printvar(const char *var) @@ -155,6 +161,39 @@ static void list_upses(int verbose) } } +static void list_clients(const char *devname) +{ + int ret; + unsigned int numq, numa; + const char *query[4]; + char **answer; + + query[0] = "CLIENT"; + query[1] = devname; + numq = 2; + + ret = upscli_list_start(ups, numq, query); + + if (ret < 0) { + /* check for an old upsd */ + if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) { + fatalx(EXIT_FAILURE, "Error: upsd is too old to support this query"); + } + + fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups)); + } + + while ((ret=upscli_list_next(ups, numq, query, &numa, &answer)) == 1) { + + /* CLIENT

    */ + if (numa < 3) { + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 3)", numa); + } + + printf("%s\n", answer[2]); + } +} + static void clean_exit(void) { if (ups) { @@ -169,10 +208,10 @@ static void clean_exit(void) int main(int argc, char **argv) { int i, port; - int varlist = 0, verbose = 0; + int varlist = 0, clientlist = 0, verbose = 0; const char *prog = xbasename(argv[0]); - while ((i = getopt(argc, argv, "+hlLV")) != -1) { + while ((i = getopt(argc, argv, "+hlLcV")) != -1) { switch (i) { @@ -181,6 +220,9 @@ int main(int argc, char **argv) case 'l': varlist = 1; break; + case 'c': + clientlist = 1; + break; case 'V': fatalx(EXIT_SUCCESS, "Network UPS Tools upscmd %s", UPS_VERSION); @@ -219,6 +261,11 @@ int main(int argc, char **argv) exit(EXIT_SUCCESS); } + if (clientlist) { + list_clients(upsname); + exit(EXIT_SUCCESS); + } + if (argc > 1) { printvar(argv[1]); } else { diff --git a/clients/upsmon.c b/clients/upsmon.c index fe3f5fb..e3016fe 100644 --- a/clients/upsmon.c +++ b/clients/upsmon.c @@ -1,6 +1,8 @@ /* upsmon - monitor power status over the 'net (talks to upsd via TCP) - Copyright (C) 1998 Russell Kroll + Copyright (C) + 1998 Russell Kroll + 2012 Arnaud Quette 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 @@ -79,12 +81,6 @@ static int opt_af = AF_UNSPEC; static struct sigaction sa; static sigset_t nut_upsmon_sigmask; -#ifdef SHUT_RDWR -#define shutdown_how SHUT_RDWR -#else -#define shutdown_how 2 -#endif - static void setflag(int *val, int flag) { *val |= flag; @@ -696,7 +692,7 @@ static void recalc(void) } /* note: we assume that a UPS that isn't critical must be OK * - * * + * * * this means a UPS we've never heard from is assumed OL * * whether this is really the best thing to do is undecided */ @@ -709,12 +705,12 @@ static void recalc(void) ups = ups->next; } - /* upsdebugx(3, "Current power value: %d", val_ol); - upsdebugx(3, "Minimum power value: %d", minsupplies); */ + upsdebugx(3, "Current power value: %d", val_ol); + upsdebugx(3, "Minimum power value: %d", minsupplies); if (val_ol < minsupplies) forceshutdown(); -} +} static void ups_low_batt(utype_t *ups) { @@ -792,10 +788,7 @@ static void redefine_ups(utype_t *ups, int pv, const char *un, free(ups->un); - if (un) - ups->un = xstrdup(un); - else - ups->un = NULL; + ups->un = xstrdup(un); /* * if not logged in force a reconnection since this @@ -954,7 +947,7 @@ static void addups(int reloading, const char *sys, const char *pvs, else upslogx(LOG_INFO, "UPS: %s (monitoring only)", tmp->sys); - tmp->upsname = tmp->hostname = NULL; + tmp->upsname = tmp->hostname = NULL; if (upscli_splitname(tmp->sys, &tmp->upsname, &tmp->hostname, &tmp->port) != 0) { @@ -1945,6 +1938,15 @@ int main(int argc, char *argv[]) exit(EXIT_SUCCESS); } + /* otherwise, we are being asked to start. + * so check if a previous instance is running by sending signal '0' + * (Ie 'kill 0') */ + if (sendsignal(prog, 0) == 0) { + printf("Fatal error: A previous upsmon instance is already running!\n"); + printf("Either stop the previous instance first, or use the 'reload' command.\n"); + exit(EXIT_FAILURE); + } + argc -= optind; argv += optind; @@ -1961,6 +1963,8 @@ int main(int argc, char *argv[]) /* we may need to get rid of a flag from a previous shutdown */ if (powerdownflag != NULL) clear_pdflag(); + /* FIXME (else): POWERDOWNFLAG is not defined!! + * => fallback to a default value */ if (totalpv < minsupplies) { printf("\nFatal error: insufficient power configured!\n\n"); diff --git a/clients/upsmon.h b/clients/upsmon.h index 92634bc..3193027 100644 --- a/clients/upsmon.h +++ b/clients/upsmon.h @@ -19,15 +19,13 @@ /* flags for ups->status */ -#define ST_ONLINE 0x001 /* UPS is on line (OL) */ -#define ST_ONBATT 0x002 /* UPS is on battery (OB) */ -#define ST_LOWBATT 0x004 /* UPS has a low battery (LB) */ -#define ST_FSD 0x008 /* master has set forced shutdown flag */ -#define ST_MASTER 0x010 /* we are the master on this UPS */ -/* was ST_ALIVE 0x020 */ -#define ST_LOGIN 0x040 /* we are logged into this UPS */ -/* was ST_FIRST 0x080 */ -#define ST_CONNECTED 0x100 /* upscli_connect returned OK */ +#define ST_ONLINE (1 << 0) /* UPS is on line (OL) */ +#define ST_ONBATT (1 << 1) /* UPS is on battery (OB) */ +#define ST_LOWBATT (1 << 2) /* UPS has a low battery (LB) */ +#define ST_FSD (1 << 3) /* master has set forced shutdown flag */ +#define ST_MASTER (1 << 4) /* we are the master on this UPS */ +#define ST_LOGIN (1 << 5) /* we are logged into this UPS */ +#define ST_CONNECTED (1 << 6) /* upscli_connect returned OK */ /* required contents of flag file */ #define SDMAGIC "upsmon-shutdown-file" @@ -74,10 +72,10 @@ typedef struct { /* notify flag values */ -#define NOTIFY_IGNORE 1 /* don't do anything */ -#define NOTIFY_SYSLOG 2 /* send the msg to the syslog */ -#define NOTIFY_WALL 4 /* send the msg to all users */ -#define NOTIFY_EXEC 8 /* send the msg to NOTIFYCMD script */ +#define NOTIFY_IGNORE (1 << 0) /* don't do anything */ +#define NOTIFY_SYSLOG (1 << 1) /* send the msg to the syslog */ +#define NOTIFY_WALL (1 << 2) /* send the msg to all users */ +#define NOTIFY_EXEC (1 << 3) /* send the msg to NOTIFYCMD script */ /* flags are set to NOTIFY_SYSLOG | NOTIFY_WALL at program init */ /* the user can override with NOTIFYFLAGS in the upsmon.conf */ diff --git a/clients/upsrw.c b/clients/upsrw.c index aacbfe8..ca02b99 100644 --- a/clients/upsrw.c +++ b/clients/upsrw.c @@ -267,6 +267,61 @@ static void do_enum(const char *varname) } } +static void do_range(const char *varname) +{ + int ret; + unsigned int numq, numa; + char **answer; + const char *query[4], *val; + int ival, min, max; + + /* get current value */ + val = get_data("VAR", varname); + + if (!val) { + fatalx(EXIT_FAILURE, "do_range: can't get current value of %s", varname); + } + + ival = atoi(val); + + query[0] = "RANGE"; + query[1] = upsname; + query[2] = varname; + numq = 3; + + ret = upscli_list_start(ups, numq, query); + + if (ret < 0) { + fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups)); + } + + ret = upscli_list_next(ups, numq, query, &numa, &answer); + + printf("Type: RANGE\n"); + + while (ret == 1) { + + /* RANGE */ + + if (numa < 5) { + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa); + } + + min = atoi(answer[3]); + max = atoi(answer[4]); + + printf("Option: \"%i-%i\"", min, max); + + if ((ival >= min) && (ival <= max)) { + printf(" SELECTED"); + } + + printf("\n"); + + ret = upscli_list_next(ups, numq, query, &numa, &answer); + } +} + static void do_type(const char *varname) { int ret; @@ -294,6 +349,11 @@ static void do_type(const char *varname) return; } + if (!strcasecmp(answer[i], "RANGE")) { + do_range(varname); + return; + } + if (!strncasecmp(answer[i], "STRING:", 7)) { do_string(varname); return; diff --git a/clients/upssched.c b/clients/upssched.c index 6fcb5c3..675a3d0 100644 --- a/clients/upssched.c +++ b/clients/upssched.c @@ -694,7 +694,7 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2) snprintfcat(buf, sizeof(buf), " \"%s\"", pconf_encode(arg2, enc, sizeof(enc))); - snprintfcat(buf, sizeof(buf), "\n"); + snprintfcat(enc, sizeof(enc), "%s\n", buf); /* see if the parent needs to be started (and maybe start it) */ @@ -715,10 +715,10 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2) /* we're connected now */ - ret = write(pipefd, buf, strlen(buf)); + ret = write(pipefd, enc, strlen(enc)); /* if we can't send the whole thing, loop back and try again */ - if ((ret < 1) || (ret != (int) strlen(buf))) { + if ((ret < 1) || (ret != (int) strlen(enc))) { upslogx(LOG_ERR, "write failed, trying again"); close(pipefd); continue; diff --git a/common/Makefile.am b/common/Makefile.am index 43d09ca..6dda04a 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -2,15 +2,14 @@ AM_CFLAGS = -I$(top_srcdir)/include -../include/nut_version.h: FORCE - (cd ../include/ && $(MAKE) $(AM_MAKEFLAGS) nut_version.h) - -FORCE: - noinst_LTLIBRARIES = libparseconf.la libcommon.la libparseconf_la_SOURCES = parseconf.c -libcommon_la_SOURCES = common.c state.c upsconf.c ../include/nut_version.h +# do not hard depend on '../include/nut_version.h', since it blocks +# 'dist', and is only required for actual build, in which case +# BUILT_SOURCES (in ../include) will ensure nut_version.h will +# be built before anything else +libcommon_la_SOURCES = common.c state.c upsconf.c # ensure inclusion of local implementation of missing systems functions # using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ diff --git a/common/Makefile.in b/common/Makefile.in index 8ba1221..9ccd162 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -174,6 +174,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -187,6 +188,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -194,6 +196,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -270,7 +273,12 @@ udevdir = @udevdir@ AM_CFLAGS = -I$(top_srcdir)/include noinst_LTLIBRARIES = libparseconf.la libcommon.la libparseconf_la_SOURCES = parseconf.c -libcommon_la_SOURCES = common.c state.c upsconf.c ../include/nut_version.h + +# do not hard depend on '../include/nut_version.h', since it blocks +# 'dist', and is only required for actual build, in which case +# BUILT_SOURCES (in ../include) will ensure nut_version.h will +# be built before anything else +libcommon_la_SOURCES = common.c state.c upsconf.c # ensure inclusion of local implementation of missing systems functions # using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ @@ -562,11 +570,6 @@ uninstall-am: pdf pdf-am ps ps-am tags uninstall uninstall-am -../include/nut_version.h: FORCE - (cd ../include/ && $(MAKE) $(AM_MAKEFLAGS) nut_version.h) - -FORCE: - # 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. .NOEXPORT: diff --git a/common/common.c b/common/common.c index e8004d7..ef680b0 100644 --- a/common/common.c +++ b/common/common.c @@ -527,11 +527,28 @@ char *rtrim(char *in, const char sep) { char *p; - p = &in[strlen(in) - 1]; + if (in) { + p = &in[strlen(in) - 1]; - while ((p >= in) && (*p == sep)) - *p-- = '\0'; - + while ((p >= in) && (*p == sep)) + *p-- = '\0'; + } + return in; +} + +/* modify in - strip all leading instances of */ +char* ltrim(char *in, const char sep) +{ + char *p; + + if (in) { + p = in; + + while ((*p != '\0') && (*p == sep)) + *p++ = *in++; + + p = '\0'; + } return in; } diff --git a/common/parseconf.c b/common/parseconf.c index bc6d6a1..7073eb1 100644 --- a/common/parseconf.c +++ b/common/parseconf.c @@ -171,6 +171,13 @@ static void addchar(PCONF_CTX_t *ctx) wbuflen = strlen(ctx->wordbuf); + /* CVE-2012-2944: only allow the subset Ascii charset from Space to ~ */ + if ((ctx->ch < 0x20) || (ctx->ch > 0x7f)) { + fprintf(stderr, "addchar: discarding invalid character (0x%02x)!\n", + ctx->ch); + return; + } + if (ctx->wordlen_limit != 0) { if (wbuflen >= ctx->wordlen_limit) { @@ -240,6 +247,13 @@ static int findwordstart(PCONF_CTX_t *ctx) /* at this point the word just started */ addchar(ctx); + + /* if the first character is a '=' this is considered a whole word */ + if (ctx->ch == '=') { + endofword(ctx); + return STATE_FINDWORDSTART; + } + return STATE_COLLECT; } @@ -326,6 +340,14 @@ static int collect(PCONF_CTX_t *ctx) return STATE_FINDWORDSTART; } + /* '=' means the word is done and the = is a single char word*/ + if (ctx->ch == '=') { + endofword(ctx); + findwordstart(ctx); + + return STATE_FINDWORDSTART; + } + /* \ = literal = accept the next char blindly */ if (ctx->ch == '\\') return STATE_COLLECTLITERAL; diff --git a/common/state.c b/common/state.c index 0e728a7..cb79e0f 100644 --- a/common/state.c +++ b/common/state.c @@ -3,6 +3,7 @@ Copyright (C) 2003 Russell Kroll 2008 Arjen de Korte + 2012 Arnaud Quette 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 @@ -65,6 +66,17 @@ static void st_tree_enum_free(enum_t *list) free(list); } +static void st_tree_range_free(range_t *list) +{ + if (!list) { + return; + } + + st_tree_range_free(list->next); + + free(list); +} + /* free all memory associated with a node */ static void st_tree_node_free(st_tree_t *node) { @@ -77,6 +89,9 @@ static void st_tree_node_free(st_tree_t *node) /* blow away the list of enums */ st_tree_enum_free(node->enum_list); + /* and the list of ranges */ + st_tree_range_free(node->range_list); + /* now finally kill the node itself */ free(node); } @@ -237,6 +252,54 @@ int state_addenum(st_tree_t *root, const char *var, const char *val) return st_tree_enum_add(&sttmp->enum_list, enc); } +static int st_tree_range_add(range_t **list, const int min, const int max) +{ + range_t *item; + + while (*list) { + + if (((*list)->min != min) && ((*list)->max != max)) { + list = &(*list)->next; + continue; + } + + return 0; /* duplicate */ + } + + item = xcalloc(1, sizeof(*item)); + item->min = min; + item->max = max; + item->next = *list; + + /* now we're done creating it, add it to the list */ + *list = item; + + return 1; /* added */ +} + +int state_addrange(st_tree_t *root, const char *var, const int min, const int max) +{ + st_tree_t *sttmp; + + /* sanity check */ + if (min > max) { + upslogx(LOG_ERR, "state_addrange: min is superior to max! (%i, %i)", + min, max); + return 0; + } + + /* find the tree node for var */ + sttmp = state_tree_find(root, var); + + if (!sttmp) { + upslogx(LOG_ERR, "state_addrange: base variable (%s) " + "does not exist", var); + return 0; /* failed */ + } + + return st_tree_range_add(&sttmp->range_list, min, max); +} + int state_setaux(st_tree_t *root, const char *var, const char *auxs) { st_tree_t *sttmp; @@ -319,6 +382,20 @@ const enum_t *state_getenumlist(st_tree_t *root, const char *var) return sttmp->enum_list; } +const range_t *state_getrangelist(st_tree_t *root, const char *var) +{ + st_tree_t *sttmp; + + /* find the tree node for var */ + sttmp = state_tree_find(root, var); + + if (!sttmp) { + return NULL; + } + + return sttmp->range_list; +} + void state_setflags(st_tree_t *root, const char *var, int numflags, char **flag) { int i; @@ -471,6 +548,43 @@ int state_delenum(st_tree_t *root, const char *var, const char *val) return st_tree_del_enum(&sttmp->enum_list, val); } +static int st_tree_del_range(range_t **list, const int min, const int max) +{ + while (*list) { + + range_t *item = *list; + + /* if this is not the right value, go on to the next */ + if (((*list)->min != min) && ((*list)->max != max)) { + list = &item->next; + continue; + } + + /* we found it! */ + *list = item->next; + + free(item); + + return 1; /* deleted */ + } + + return 0; /* not found */ +} + +int state_delrange(st_tree_t *root, const char *var, const int min, const int max) +{ + st_tree_t *sttmp; + + /* find the tree node for var */ + sttmp = state_tree_find(root, var); + + if (!sttmp) { + return 0; + } + + return st_tree_del_range(&sttmp->range_list, min, max); +} + st_tree_t *state_tree_find(st_tree_t *node, const char *var) { while (node) { diff --git a/common/upsconf.c b/common/upsconf.c index 3504150..867163b 100644 --- a/common/upsconf.c +++ b/common/upsconf.c @@ -31,8 +31,6 @@ /* handle arguments separated by parseconf */ static void conf_args(int numargs, char **arg) { - char *ep; - if (numargs < 1) return; @@ -46,15 +44,6 @@ static void conf_args(int numargs, char **arg) return; } - /* handle 'foo=bar' (compressed form) */ - ep = strchr(arg[0], '='); - if (ep) { - *ep = '\0'; - - do_upsconf_args(ups_section, arg[0], ep+1); - return; - } - /* handle 'foo' (flag) */ if (numargs == 1) { do_upsconf_args(ups_section, arg[0], NULL); @@ -64,7 +53,7 @@ static void conf_args(int numargs, char **arg) if (numargs < 3) return; - /* handle 'foo = bar' (split form) */ + /* handle 'foo = bar', 'foo=bar', 'foo =bar' or 'foo= bar' forms */ if (!strcmp(arg[1], "=")) { do_upsconf_args(ups_section, arg[0], arg[2]); return; diff --git a/conf/Makefile.in b/conf/Makefile.in index 98596dc..be4cd06 100644 --- a/conf/Makefile.in +++ b/conf/Makefile.in @@ -179,6 +179,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -192,6 +193,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -199,6 +201,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/conf/nut.conf.sample b/conf/nut.conf.sample index 5c5a4a6..9309825 100644 --- a/conf/nut.conf.sample +++ b/conf/nut.conf.sample @@ -24,5 +24,9 @@ # Since this MODE is opened to the network, a special care should be applied # to security concerns. # - netclient: this mode only requires upsmon. +# +# IMPORTANT NOTE: +# This file is intended to be sourced by shell scripts. +# You MUST NOT use spaces around the equal sign! -MODE = none +MODE=none diff --git a/configure b/configure index 7e936e8..68b465c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for nut 2.6.3. +# Generated by GNU Autoconf 2.68 for nut 2.6.4. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nut' PACKAGE_TARNAME='nut' -PACKAGE_VERSION='2.6.3' -PACKAGE_STRING='nut 2.6.3' +PACKAGE_VERSION='2.6.4' +PACKAGE_STRING='nut 2.6.4' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -626,9 +626,11 @@ SUN_LIBUSB RUN_AS_GROUP RUN_AS_USER PORT +SBINDIR BINDIR CONFPATH STATEPATH +PIDPATH SERLIBS NETLIBS DRIVER_INSTALL_TARGET @@ -661,6 +663,7 @@ LIBGD_LDFLAGS LIBGD_CFLAGS LIBSSL_LIBS LIBSSL_CFLAGS +NUT_NETVERSION TREE_VERSION OS_NAME MANUALUPDATE_FALSE @@ -1449,7 +1452,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nut 2.6.3 to adapt to many kinds of systems. +\`configure' configures nut 2.6.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1520,7 +1523,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nut 2.6.3:";; + short | recursive ) echo "Configuration of nut 2.6.4:";; esac cat <<\_ACEOF @@ -1706,7 +1709,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nut configure 2.6.3 +nut configure 2.6.4 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2171,7 +2174,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nut $as_me 2.6.3, which was +It was created by nut $as_me 2.6.4, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3241,7 +3244,7 @@ fi # Define the identity of the package. PACKAGE='nut' - VERSION='2.6.3' + VERSION='2.6.4' cat >>confdefs.h <<_ACEOF @@ -4753,6 +4756,7 @@ fi + TREE_VERSION="`echo ${PACKAGE_VERSION} | awk '{ print substr($0,1,3) }'`" cat >>confdefs.h <<_ACEOF @@ -4760,6 +4764,13 @@ cat >>confdefs.h <<_ACEOF _ACEOF +NUT_NETVERSION="1.2" + +cat >>confdefs.h <<_ACEOF +#define NUT_NETVERSION "${NUT_NETVERSION}" +_ACEOF + + test "${prefix}" = "NONE" && prefix="${ac_default_prefix}" test "${exec_prefix}" = "NONE" && exec_prefix='${prefix}' @@ -10352,7 +10363,7 @@ no) if test -z "${DOC_NOBUILD_LIST}"; then nut_with_doc="yes" else - as_fn_error $? "\"Asciidoc is required for documentation support and missing\"" "$LINENO" 5 + as_fn_error $? "\"Unable to build ${DOC_NOBUILD_LIST} documentation\"" "$LINENO" 5 fi ;; esac @@ -18438,6 +18449,14 @@ cat >>confdefs.h <<_ACEOF _ACEOF +conftemp="${sbindir}" +eval conftemp=\"${conftemp}\" +eval conftemp=\"${conftemp}\" +SBINDIR=${conftemp} + +cat >>confdefs.h <<_ACEOF +#define SBINDIR "${conftemp}" +_ACEOF @@ -18489,7 +18508,12 @@ _ACEOF -ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutscan.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf scripts/java/Makefile scripts/python/Makefile scripts/systemd/Makefile scripts/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile Makefile" + + + + + +ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutscan.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf scripts/java/Makefile 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/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -19130,7 +19154,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nut $as_me 2.6.3, which was +This file was extended by nut $as_me 2.6.4, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19196,7 +19220,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nut config.status 2.6.3 +nut config.status 2.6.4 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -19640,9 +19664,14 @@ do "scripts/java/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/java/Makefile" ;; "scripts/python/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/python/Makefile" ;; "scripts/systemd/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/systemd/Makefile" ;; + "scripts/systemd/nut-driver.service") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-driver.service" ;; + "scripts/systemd/nut-monitor.service") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-monitor.service" ;; + "scripts/systemd/nut-server.service") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-server.service" ;; + "scripts/systemd/nutshutdown") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nutshutdown" ;; "scripts/udev/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/udev/Makefile" ;; "scripts/udev/nut-ipmipsu.rules") CONFIG_FILES="$CONFIG_FILES scripts/udev/nut-ipmipsu.rules" ;; "scripts/udev/nut-usbups.rules") CONFIG_FILES="$CONFIG_FILES scripts/udev/nut-usbups.rules" ;; + "scripts/ufw/nut.ufw.profile") CONFIG_FILES="$CONFIG_FILES scripts/ufw/nut.ufw.profile" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "server/Makefile") CONFIG_FILES="$CONFIG_FILES server/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; diff --git a/configure.in b/configure.in index f906a30..2bcf7df 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ 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.3) +AC_INIT(nut, 2.6.4) AC_CONFIG_SRCDIR(server/upsd.c) AC_CONFIG_MACRO_DIR([m4]) echo "Network UPS Tools version ${PACKAGE_VERSION}" @@ -28,6 +28,9 @@ AM_MAINTAINER_MODE dnl PKG_PROG_PKG_CONFIG +dnl Various version related processing +dnl ---------------------------------- + dnl # the following is commented out, because the UPS_VERSION macro now dnl # resides in include/nut_version.h, which is generated by Makefile.am, dnl # rather than in include/config.h, which is generated by configure. The @@ -39,6 +42,9 @@ dnl However, automatically define the tree version (mostly for AC_SUBST) TREE_VERSION="`echo ${PACKAGE_VERSION} | awk '{ print substr($0,1,3) }'`" AC_DEFINE_UNQUOTED(TREE_VERSION, "${TREE_VERSION}", [NUT tree version]) +NUT_NETVERSION="1.2" +AC_DEFINE_UNQUOTED(NUT_NETVERSION, "${NUT_NETVERSION}", [NUT network protocol version]) + dnl Fix this early so we can expand with eval later test "${prefix}" = "NONE" && prefix="${ac_default_prefix}" @@ -594,7 +600,7 @@ no) if test -z "${DOC_NOBUILD_LIST}"; then nut_with_doc="yes" else - AC_MSG_ERROR(["Asciidoc is required for documentation support and missing"]) + AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation"]) fi ;; esac @@ -1028,8 +1034,16 @@ eval conftemp=\"${conftemp}\" BINDIR=${conftemp} AC_DEFINE_UNQUOTED(BINDIR, "${conftemp}", [Default path for user executables]) +dnl same for sbindir +conftemp="${sbindir}" +eval conftemp=\"${conftemp}\" +eval conftemp=\"${conftemp}\" +SBINDIR=${conftemp} +AC_DEFINE_UNQUOTED(SBINDIR, "${conftemp}", [Default path for system executables]) + AC_SUBST(OS_NAME) AC_SUBST(TREE_VERSION) +AC_SUBST(NUT_NETVERSION) AC_SUBST(LIBSSL_CFLAGS) AC_SUBST(LIBSSL_LIBS) AC_SUBST(LIBGD_CFLAGS) @@ -1062,9 +1076,11 @@ AC_SUBST(DRIVER_MAN_LIST) AC_SUBST(DRIVER_INSTALL_TARGET) AC_SUBST(NETLIBS) AC_SUBST(SERLIBS) +AC_SUBST(PIDPATH) AC_SUBST(STATEPATH) AC_SUBST(CONFPATH) AC_SUBST(BINDIR) +AC_SUBST(SBINDIR) AC_SUBST(PORT) AC_SUBST(RUN_AS_USER) AC_SUBST(RUN_AS_GROUP) @@ -1115,9 +1131,14 @@ AC_OUTPUT([ scripts/java/Makefile 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/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules + scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile diff --git a/data/Makefile.in b/data/Makefile.in index 9296e6d..0bd3feb 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -215,6 +215,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -228,6 +229,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -235,6 +237,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/data/driver.list.in b/data/driver.list.in index 0d47616..b305b92 100644 --- a/data/driver.list.in +++ b/data/driver.list.in @@ -46,6 +46,8 @@ "AEC" "ups" "1" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21" +"AEG Power Solutions" "ups" "2" "PROTECT HOME" "" "blazer_ser or blazer_usb" + "APC" "ups" "1" "Back-UPS Pro" "" "apcsmart" "APC" "ups" "1" "Matrix-UPS" "" "apcsmart" "APC" "ups" "1" "Smart-UPS" "" "apcsmart" @@ -76,6 +78,22 @@ "Appro" "pdu" "1" "SWPDU" "48 outlets" "powerman-pdu (experimental)" +"ARTronic" "ups" "2" "ARTon Millenium 1/2/3/6/10 kVA" "Serial" "blazer_ser" +"ARTronic" "ups" "2" "ARTon Millenium 3.1 10/15/20 kVA" "Serial" "blazer_ser" +"ARTronic" "ups" "2" "ARTon Titanium 6/10 kVA" "Serial" "blazer_ser" +"ARTronic" "ups" "2" "ARTon Titanium 3.1 10/15/20 kVA" "Serial" "blazer_ser" +"ARTronic" "ups" "2" "ARTon Optimum 1/2/3/6/10 kVA" "Serial" "blazer_ser" +"ARTronic" "ups" "2" "ARTon Titanium Plus 1/2/3 kVA" "USB" "blazer_usb" +"ARTronic" "ups" "2" "ARTon Platinium 6/10 kVA" "USB" "blazer_usb" +"ARTronic" "ups" "2" "ARTon Platinium Combo 3.1 10/15/20 kVA" "USB" "blazer_usb" +"ARTronic" "ups" "2" "ARTon Platinium RT 1/2/3/6/10 kVA" "USB" "blazer_usb" + +"ATEK" "ups" "2" "Defensor 1K Tower / Rack" "USB" "blazer_usb" +"ATEK" "ups" "2" "Defensor 2K Tower / Rack" "USB" "blazer_usb" +"ATEK" "ups" "2" "Defensor 3K Tower / Rack" "USB" "blazer_usb" +"ATEK" "ups" "2" "Defensor 6K Tower / Rack" "USB" "blazer_usb" +"ATEK" "ups" "2" "Defensor 10K Tower / Rack" "USB" "blazer_usb" + "Atlantis Land" "ups" "2" "A03-P826" "" "blazer_ser" "Baytech" "pdu" "1" "RPC3" "8 outlets" "powerman-pdu (experimental)" @@ -111,15 +129,21 @@ "Belkin" "ups" "2" "F6S600auUSB" "USB" "blazer_usb" "Best Power" "ups" "1" "Fortress (older)" "" "bestfortress" -"Best Power" "ups" "1" "Fortress (newer)" "" "bestups" -"Best Power" "ups" "1" "Fortress Telecom" "" "bestups" -"Best Power" "ups" "1" "Axxium Rackmount" "" "bestups" -"Best Power" "ups" "1" "Patriot Pro" "" "bestups" -"Best Power" "ups" "1" "Patriot Pro II" "" "bestups" +"Best Power" "ups" "1" "Fortress (newer)" "" "blazer_ser or bestups" +"Best Power" "ups" "1" "Fortress Telecom" "" "blazer_ser or bestups" +"Best Power" "ups" "1" "Axxium Rackmount" "" "blazer_ser or bestups" +"Best Power" "ups" "1" "Patriot Pro" "" "blazer_ser or bestups" +"Best Power" "ups" "1" "Patriot Pro II" "" "blazer_ser or bestups" "Best Power" "ups" "1" "Patriot" "INT51 cable" "genericups upstype=6" "Best Power" "ups" "1" "Micro-Ferrups" "" "bestuferrups" "Best Power" "ups" "1" "Fortress/Ferrups" "f-command support" "bestfcom" +"Borri" "ups" "2" "B400-010-B/B400-020-B/B400-030-B/B400-010-C/B400-020-C/B400-030-C" "" "blazer_usb" +"Borri" "ups" "2" "B400-R010-B/B400-R020-B/B400-R030-B/B400-R010-C/B400-R020-C/B400-R030-C" "" "blazer_usb" +"Borri" "ups" "2" "B500-060-B/B500-100-B/B500-060-C/B500-100-C" "" "blazer_usb" +"Borri" "ups" "2" "B500-R060-B/B500-R100-B" "" "blazer_usb" +"Borri" "ups" "2" "B500EVO-100-B/B500EVO-200-B" "" "blazer_usb" + "Chloride" "ups" "2" "Desk Power 650" "serial port" "blazer_ser" "Cito Power" "ups" "2" "CPG-SR1000" "" "blazer_ser" @@ -131,6 +155,10 @@ "Compaq" "ups" "4" "R3000 XR" "" "bcmxcp" "Compaq" "ups" "4" "R5500 XR" "" "bcmxcp" +"COVER ENERGY SA" "ups" "2" "COVER PRM 1K/2K/3K/6K/10K" "" "blazer_usb" +"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" @@ -154,12 +182,15 @@ "Cyber Power Systems" "ups" "2" "AE550" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "3" "CP 1500C" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "3" "OR2200LCDRM2U" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "OR700LCDRM1U" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "PR6000LCDRTXL5U" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "Value 400E" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "Value 600E" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "Value 800E" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "CP1000AVRLCD" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP1000PFCLCD" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "3" "RMCARD100" "" "snmp-ups" "Cyber Power Systems" "ups" "3" "RMCARD201" "" "snmp-ups" "Cyber Power Systems" "ups" "3" "RMCARD202" "" "snmp-ups" @@ -168,26 +199,28 @@ "Cyclades" "pdu" "1" "PM8" "8 outlets" "powerman-pdu (experimental)" "Cyclades" "pdu" "1" "PM10" "10 outlets" "powerman-pdu (experimental)" -"Dell" "ups" "5" "Tower 500W LV / HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Tower 500W LV / HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 1500W LV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack/Tower 1500W LV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 2300W LV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack/Tower 2300W LV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, USB port" "usbhid-ups" "Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack 5600W HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack 5600W HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Tower 500W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 1500W LV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 2300W LV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Rack 5600W HV" "USB port" "usbhid-ups" +"Dell" "ups" "5" "Various (SNMP mode)" "UPS Network Management Card " "snmp-ups" +"Dell" "ups" "5" "Various (XML/HTTP mode)" "UPS Network Management Card " "netxml-ups (experimental)" "Delta" "ups" "1" "GES602N" "" "belkin" @@ -200,7 +233,7 @@ "Dynamix" "ups" "2" "UPS1700D" "" "blazer_ser" "Dynamix" "ups" "2" "UPS-650VA" "" "blazer_ser" -"Dynamix" "ups" "2" "650VA" "USB" "blazer_usb langid_fix=0x0409" +"Dynamix" "ups" "2" "650VA/1000VA" "USB" "blazer_usb langid_fix=0x0409" "Dynex" "ups" "1" "975AVR" "" "genericups upstype=7" "Dynex" "ups" "2" "DX-800U" "USB" "usbhid-ups" @@ -235,10 +268,11 @@ "Eaton" "ups" "5" "E Series DX UPS 1-20 kVA" "" "mge-utalk" "Eaton" "ups" "4" "NetUPS SE 450/700/1000/1500" "" "upscode2" "Eaton" "ups" "5" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" -"Eaton" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" -"Eaton" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" +"Eaton" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (ref 66102)" "netxml-ups (experimental)" +"Eaton" "ups" "5" "various models (SNMP mode)" "NMC Minislot (ref 66102)" "snmp-ups (experimental)" "Eaton" "ups" "5" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" "Eaton" "ups" "5" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" +"Eaton" "ups" "5" "various models (serial mode)" "Management Card Contact (ref 66104)" "mge-shut or mge-utalk" "Eaton" "pdu" "5" "ePDU Managed" "" "snmp-ups (experimental)" "Eaton" "pdu" "5" "ePDU Monitored" "" "snmp-ups or netxml-ups" "Eaton" "ups" "5" "Powerware 9130" "" "bcmxcp or usbhid-ups" @@ -257,10 +291,16 @@ "ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7" "ETA" "ups" "1" "mini+UPS PRO" "UPS Explorer cable" "etapro" -"Ever UPS" "ups" "1" "NET *-DPC" "" "everups" -"Ever UPS" "ups" "1" "AP *-PRO" "" "everups" - -"Ever-Power" "ups" "1" "625/1000" "" "safenet" +"EVER" "ups" "1" "NET DPC series" "Serial port" "everups" +"EVER" "ups" "1" "AP Pro series" "Serial port" "everups" +"EVER" "ups" "1" "625/1000" "" "safenet" +"EVER" "ups" "2" "POWERLINE RT 1-3kVA series" "Serial port" "blazer_ser" +"EVER" "ups" "2" "POWERLINE RT 6-10kVA series" "Serial port" "blazer_ser" +"EVER" "ups" "2" "POWERLINE 11 series" "Serial port" "blazer_ser" +"EVER" "ups" "2" "POWERLINE 31 series" "Serial port" "blazer_ser" +"EVER" "ups" "2" "DUO II Pro series" "USB port" "blazer_usb" +"EVER" "ups" "2" "POWERLINE RT 1-3kVA series" "USB port" "blazer_usb" +"EVER" "ups" "2" "POWERLINE RT 6-10kVA series" "USB port" "blazer_usb" "Exide" "ups" "1" "NetUPS SE" "" "genericups upstype=15" "Exide" "ups" "4" "NetUPS SE 450/700/1000/1500" "" "upscode2" @@ -291,24 +331,41 @@ "Gamatronic" "ups" "5" "MS" "" "gamatronic" "Gamatronic" "ups" "5" "µPS3/1" "" "gamatronic" -"GE" "ups" "2" "EP series" "" "blazer_usb" +"GE Digital Energy" "ups" "2" "EP Series" "" "blazer_usb" +"GE Digital Energy" "ups" "2" "GT Series 1000/1500/2000/3000 VA Rack/Tower" "UL-version" "blazer_ser" "Geek Squad" "ups" "2" "GS1285U" "USB" "usbhid-ups" "Gemini" "ups" "1" "UPS625/UPS1000" "" "safenet" +"Gtec" "ups" "2" "ZP120N-1K / ZP120N-1KS / ZP120N-2K / ZP120N-2KS / ZP120N-3K / ZP120N-3KS" "" "blazer_usb" +"Gtec" "ups" "2" "ZP120N-6K / ZP120N-6KS / ZP120N-10K-11 / ZP120N-10KS-11" "" "blazer_usb" +"Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "USB port" "blazer_usb" +"Gtec" "ups" "2" "AP160N-1K / AP160LCD-1K-KS / AP160N-2K / AP160LCD-2K-KS / AP160N-3K / AP160LCD-3K-KS / AP160N-6K-PDU / AP160N-10K-PDU" "USB port" "blazer_usb" +"Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "Serial port" "blazer_ser" +"Gtec" "ups" "2" "AP160N-1K / AP160LCD-1K-KS / AP160N-2K / AP160LCD-2K-KS / AP160N-3K / AP160LCD-3K-KS / AP160N-6K-PDU / AP160N-10K-PDU" "Serial port" "blazer_ser" + "HP" "ups" "1" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart" +"HP" "ups" "3" "T750 G2" "Serial port" "bcmxcp" +"HP" "ups" "3" "T1000 G3" "Serial port" "bcmxcp" +"HP" "ups" "3" "T1500 G3" "Serial port" "bcmxcp" +"HP" "ups" "3" "R1500 G2" "Serial port" "bcmxcp" "HP" "ups" "4" "R3000 XR" "" "bcmxcp" "HP" "ups" "4" "R5500 XR" "" "bcmxcp" -"HP" "ups" "2" "R1500 G2" "" "bcmxcp" -"HP" "ups" "2" "R/T 2200 G2" "" "usbhid-ups" -"HP" "ups" "2" "T500" "older models" "bcmxcp_usb" -"HP" "ups" "2" "T750 INTL" "" "usbhid-ups" -"HP" "ups" "2" "T750" "older models" "bcmxcp_usb" -"HP" "ups" "2" "T1000 INTL" "" "usbhid-ups" -"HP" "ups" "2" "T1500 INTL" "" "usbhid-ups" -"HP" "ups" "2" "T750 G2" "" "usbhid-ups" -"HP" "ups" "2" "R1500 G2 INTL" "" "usbhid-ups" +"HP" "ups" "3" "T500 / T750" "older models, USB port" "bcmxcp_usb" +"HP" "ups" "3" "R/T3000" "Serial port" "mge-shut or newmge-shut" +"HP" "ups" "3" "R5000 / R7000" "Serial port" "mge-shut or newmge-shut" +"HP" "ups" "3" "T750 INTL" "" "usbhid-ups" +"HP" "ups" "3" "T1000 INTL" "" "usbhid-ups" +"HP" "ups" "3" "T1500 INTL" "" "usbhid-ups" +"HP" "ups" "3" "T750 G2" "USB port" "usbhid-ups" +"HP" "ups" "3" "T1000 G3" "USB port" "usbhid-ups" +"HP" "ups" "3" "T1500 G3" "USB port" "usbhid-ups" +"HP" "ups" "3" "R1500 G2 INTL" "USB port" "usbhid-ups" +"HP" "ups" "3" "R/T 2200 G2" "" "usbhid-ups" +"HP" "ups" "3" "R/T3000" "USB port" "usbhid-ups" +"HP" "ups" "3" "R5000 / R7000" "USB port" "usbhid-ups" +"HP" "ups" "4" "Various (SNMP mode)" "HP UPS Management Module " "snmp-ups" "HP" "pdu" "1" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)" "IBM" "pdu" "1" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)" @@ -347,6 +404,7 @@ "Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "USB" "blazer_usb (experimental)" "Ippon" "ups" "2" "(various)" "" "blazer_ser" "Ippon" "ups" "2" "(various)" "USB" "blazer_usb" +"Ippon" "ups" "2" "INNOVA RT 1K/1.5K/2K/3K" "" "blazer_usb" "IVT" "scd" "1" "SCD series" "" "ivtscd" @@ -354,6 +412,11 @@ "Kebo" "ups" "2" "1200D/D Series" "" "blazer_ser" +"KOLFF" "ups" "2" "BLACK NOVA 1K/2K/3K/6K/10K/20K TOWER" "" "blazer_usb" +"KOLFF" "ups" "2" "BLACK NOVA 1K/2K/3K/6K/10K/20K XL TOWER" "" "blazer_usb" +"KOLFF" "ups" "2" "BLACK NOVA 1K/1.5K/2K/3K/6K/10K RACK" "" "blazer_usb" +"KOLFF" "ups" "2" "BLACK NOVA 1K/1.5K/2K/3K/6K/10K XL RACK" "" "blazer_usb" + "Krauler" "ups" "2" "UP-D1200VA" "USB" "blazer_usb" "Krauler" "ups" "2" "UP-M500VA" "USB" "blazer_usb" @@ -361,6 +424,8 @@ "Lestar" "ups" "2" "MD-800E" "" "blazer_ser" +"Lexis" "ups" "2" "X-Power Tigra 1kVA" "" "blazer_ser or bestups" + "Liebert" "ups" "2" "ITON 600VA" "" "blazer_ser" "Liebert" "ups" "5" "UPStation GXT2" "contact-closure cable" "liebert" "Liebert" "ups" "1" "GXT2-3000RT230" "" "liebert-esp2 (experimental)" @@ -560,6 +625,11 @@ "MicroDowell" "ups" "5" "Enterprise N60" "" "microdowell" "MicroDowell" "ups" "5" "Enterprise HiBox ST" "" "microdowell" +"Microline" "ups" "2" "C-Lion Innova RT 2K/3K" "" "blazer_usb" +"Microline" "ups" "2" "C-Lion Innova RT 6K/10K (Parallel)" "" "blazer_usb" +"Microline" "ups" "2" "C-Lion Innova Tower 6K/10K" "" "blazer_usb" +"Microline" "ups" "2" "C-Lion Innova Combo 10K/20K (3/1)" "" "blazer_usb" + "Microsol" "ups" "4" "Solis 1.0" "1000VA" "solis" "Microsol" "ups" "4" "Solis 1.5" "1500VA" "solis" "Microsol" "ups" "4" "Solis 2.0" "2000VA" "solis" @@ -608,6 +678,7 @@ "Online" "ups" "1" "P-Series" "" "genericups upstype=14" "Online" "ups" "1" "Zinto D" "" "optiups" +"Online" "ups" "2" "Yunto YQ450" "" "blazer_usb" "OnLite" "ups" "2" "AQUA" "50" "blazer_ser" @@ -651,14 +722,21 @@ "PowerMan" "ups" "2" "RealSmart 1000" "" "blazer_ser" "PowerMan" "ups" "1" "BackPro" "" "genericups upstype=4" +"PowerShield" "ups" "2" "Defender 1200VA" "" "blazer_usb" + "PowerTech" "ups" "1" "Comp1000" "DTR cable power" "genericups upstype=3" "PowerTech" "ups" "2" "SMK-800" "" "blazer_ser" "PowerWalker" "ups" "2" "Line-Interactive VI 1000" "" "blazer_ser" "PowerWalker" "ups" "2" "Line-Interactive VI 400/800" "" "blazer_ser" "PowerWalker" "ups" "2" "Line-Interactive VI 600" "" "blazer_ser" +"PowerWalker" "ups" "2" "Line-Interactive VI 600 SE" "" "blazer_usb" +"PowerWalker" "ups" "2" "Line-Interactive VI 800 SE" "" "blazer_usb" "PowerWalker" "ups" "2" "Line-Interactive VI 1400" "" "blazer_usb" +"PowerWalker" "ups" "2" "Line-Interactive VI 2000" "" "blazer_usb" "PowerWalker" "ups" "2" "Line-Interactive VI 850 LCD" "" "blazer_usb" +"PowerWalker" "ups" "2" "Online VFI 1000RT/1500RT/2000RT/3000RT/6000RT/10000RT LCD" "" "blazer_usb" +"PowerWalker" "ups" "2" "Line-Interactive VI 1000RT/1500RT/2000RT/3000RT LCD" "" "blazer_usb" "Powerware" "ups" "4" "3110" "" "genericups upstype=7" "Powerware" "ups" "4" "3115" "" "genericups upstype=11" @@ -693,6 +771,10 @@ "Repotec" "ups" "1" "RPT-800A" "" "genericups upstype=13" "Repotec" "ups" "1" "RPT-162A" "" "genericups upstype=13" +"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" "3" "(various)" "Netman Plus 102 SNMP Card" "snmp-ups" + "Rocketfish" "ups" "2" "RF-1000VA / RF-1025VA" "" "usbhid-ups" "SmartLabs" "pdu" "1" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)" @@ -700,16 +782,17 @@ "SMS (Brazil)" "ups" "2" "Manager III" "" "blazer_ser" "SOLA" "ups" "1" "305" "cable INT-0025C" "genericups upstype=7" -"SOLA" "ups" "1" "325" "" "bestups" -"SOLA" "ups" "1" "520" "" "bestups" -"SOLA" "ups" "1" "610" "use ID= in ups.conf" "bestups" -"SOLA" "ups" "1" "620" "" "bestups" +"SOLA" "ups" "1" "325" "" "blazer_ser or bestups" +"SOLA" "ups" "1" "520" "" "blazer_ser or bestups" +"SOLA" "ups" "1" "610" "use ID= in ups.conf" "blazer_ser or bestups" +"SOLA" "ups" "1" "620" "" "blazer_ser or bestups" "SOLA" "ups" "4" "330" "" "blazer_ser" "SOLA/BASIC Mexico" "ups" "1" "various" "ISBMEX protocol" "isbmex" -"Socomec" "ups" "2" "NeTYS-PE 600VA" "" "blazer_ser" +"Socomec Sicon" "ups" "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" "Netvision" "UPS equipped with Netvision WEB/SNMP card/external box" "snmp-ups (experimental)" "Soltec" "ups" "1" "Winmate 525/625/800/1000" "" "safenet" @@ -744,6 +827,7 @@ "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" @@ -783,10 +867,15 @@ "Various" "ups" "1" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21" "Various" "ups" "2" "(various serial)" "Q1 / Megatec protocol" "blazer_ser" "Various" "ups" "2" "(various USB)" "Q1 / Megatec protocol" "blazer_usb" -"Various" "ups" "2" "(various)" "PhoenixTec protocol" "bestups" +"Various" "ups" "2" "(various)" "PhoenixTec protocol" "blazer_ser or bestups" "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)" "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" +"Various" "ups" "2" "Various Innova RT" "(USB ID 06da:0005)" "blazer_ser or blazer_usb" +"Various" "ups" "2" "Various Innova 3/1 T" "(USB ID 06da:0004)" "blazer_ser or blazer_usb" "Victron/IMV" "ups" "1" "(various)" "" "victronups" "Victron/IMV" "ups" "1" "Lite" "crack cable" "genericups upstype=10" diff --git a/data/html/Makefile.in b/data/html/Makefile.in index 750195b..49fc9f7 100644 --- a/data/html/Makefile.in +++ b/data/html/Makefile.in @@ -174,6 +174,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -187,6 +188,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -194,6 +196,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/docs/Makefile.am b/docs/Makefile.am index 65d3b73..6521b3b 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -85,7 +85,7 @@ ups-html.txt: ### TODO: automatic dependency generation # Add other directory deps (not for local EXTRA_DIST) and generated contents FULL_USER_MANUAL_DEPS = $(USER_MANUAL_DEPS) $(SHARED_DEPS) ../README \ - ../INSTALL ../UPGRADING ../TODO + ../INSTALL ../UPGRADING ../TODO ../scripts/ufw/README FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ ../scripts/augeas/README ../TODO ../lib/README \ ../tools/nut-scanner/README diff --git a/docs/Makefile.in b/docs/Makefile.in index 87057a6..5f04658 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -188,6 +188,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -201,6 +202,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -208,6 +210,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -344,7 +347,7 @@ SUFFIXES = .txt .html .pdf ### TODO: automatic dependency generation # Add other directory deps (not for local EXTRA_DIST) and generated contents FULL_USER_MANUAL_DEPS = $(USER_MANUAL_DEPS) $(SHARED_DEPS) ../README \ - ../INSTALL ../UPGRADING ../TODO + ../INSTALL ../UPGRADING ../TODO ../scripts/ufw/README FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ ../scripts/augeas/README ../TODO ../lib/README \ diff --git a/docs/cables/apc.txt b/docs/cables/apc.txt index ef927e0..5803779 100644 --- a/docs/cables/apc.txt +++ b/docs/cables/apc.txt @@ -1,10 +1,37 @@ Desc: APC UPS cables File: apc.txt -Date: 12 Februari 2010 +Date: 12 February 2010 Auth: Arjen de Korte > step. If you reconfigure the driver, use 'upsdrvctl stop' to stop it, then start it again as shown in the <> step. diff --git a/docs/design.txt b/docs/design.txt index dfaeae8..4e39eca 100644 --- a/docs/design.txt +++ b/docs/design.txt @@ -128,7 +128,7 @@ This scenario requires some configuration, obviously: 2. upsd has a valid UPS entry in ups.conf for this UPS. [myups] - driver = upsdriver + driver = nutupsdrv port = /dev/ttySx 3. upsd has a valid user for upsmon in upsd.users. diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index e3c3bbe..7b0a823 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -119,7 +119,7 @@ Device recording ---------------- To complete dummy-ups, NUT provides a device recorder script called -'device-recorder.sh' and located in the 'tools/' directory of the +'nut-recorder.sh' and located in the 'tools/' directory of the NUT source tree. This script uses 'upsc' to record device information, and stores @@ -131,7 +131,7 @@ Its usage is the following: For example, to record information from the device 'myups' every 10 seconds: - tools/device-recorder.sh myups@localhost myups.seq 10 + nut-recorder.sh myups@localhost myups.seq 10 During the recording, you will want to generate power events, such as power failure and restoration. These will be tracked in the simulation files, and be diff --git a/docs/developers.txt b/docs/developers.txt index f26dd17..fa0f169 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -145,15 +145,15 @@ int open_subspace(char *ship, int privacy) } -------------------------------------------------------------------------------- -The basic idea is that I try to group things into functions, and then +The basic idea is that we try to group things into functions, and then find ways to drop out of them when we can't go any further. There's another way to program this involving a big else chunk and a bunch of braces, and it can be hard to follow. You can read this from top to bottom and have a pretty good idea of what's going on without having to track too much { } nesting and indenting. -I don't really care for pretentiousVariableNamingSchemes, but you can -probably get away with it in your own driver that I will never have to +We don't really care for pretentiousVariableNamingSchemes, but you can +probably get away with it in your own driver that we will never have to touch. If your function or variable names start pushing important code off the right margin of the screen, expect them to meet the byte chainsaw sooner or later. @@ -171,8 +171,13 @@ without inflicting much pain on other developers. If you use a space, then you've fixed the spacing in stone and have really annoyed half of the people out there. +Note that tabs apply only to *indenting*. Alignment of text after any +non-tab character has appeared on the line must be done by spaces in +order for it to remain at the same alignment when someone views tabs at +a different widths. + If you write something that uses spaces, you may get away with it in a -driver that's relatively secluded. However, if I have to work on that +driver that's relatively secluded. However, if we have to work on that code, expect it to get reformatted according to the above. Patches to existing code that don't conform to the coding style being diff --git a/docs/download.txt b/docs/download.txt index 79b5d82..33c6edf 100644 --- a/docs/download.txt +++ b/docs/download.txt @@ -25,7 +25,8 @@ Stable tree: {tree_version} - link:http://www.networkupstools.org/source/{tree_version}/nut-{revision}.tar.gz[nut-{revision}.tar.gz] - link:http://www.networkupstools.org/source/{tree_version}/nut-{revision}.tar.gz.sig[PGP/GPG signature] -- SHA-256 sum: 343554add0713348f8b09bca8d83eee2eb2ae8bad9cdad9a39e0f0e2d0f5d375 +- link:http://www.networkupstools.org/source/{tree_version}/nut-{revision}.tar.gz.sha256[SHA-256 sum] +- link:http://www.networkupstools.org/source/{tree_version}/nut-{revision}.tar.gz.md5[MD5 sum] - link:http://www.networkupstools.org/source/{tree_version}/new-{revision}.txt[Release notes] - link:http://www.networkupstools.org/source/{tree_version}/ChangeLog[ChangeLog] @@ -114,7 +115,7 @@ 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.1-1.msi[Windows MSI installer 2.6.1-1] +link:http://www.networkupstools.org/source/2.6/NUT-Installer-2.6.3-3.msi[Windows MSI installer 2.6.3-3] Java packages diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 2eefef9..a8c54a4 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -74,13 +74,13 @@ HTML_CLIENT_MANS = \ upsrw.html \ upssched.html -SRC_TOOL_PAGES = nut-scanner.txt +SRC_TOOL_PAGES = nut-scanner.txt nut-recorder.txt -MAN_TOOL_PAGES = nut-scanner.8 +MAN_TOOL_PAGES = nut-scanner.8 nut-recorder.8 man8_MANS += $(MAN_TOOL_PAGES) -HTML_TOOL_MANS = nut-scanner.html +HTML_TOOL_MANS = nut-scanner.html nut-recorder.html # CGI (--with-cgi) related manpages SRC_CGI_PAGES = \ diff --git a/docs/man/Makefile.in b/docs/man/Makefile.in index d7d8114..ef331f9 100644 --- a/docs/man/Makefile.in +++ b/docs/man/Makefile.in @@ -204,6 +204,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -217,6 +218,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -224,6 +226,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -361,9 +364,9 @@ HTML_CLIENT_MANS = \ upsrw.html \ upssched.html -SRC_TOOL_PAGES = nut-scanner.txt -MAN_TOOL_PAGES = nut-scanner.8 -HTML_TOOL_MANS = nut-scanner.html +SRC_TOOL_PAGES = nut-scanner.txt nut-recorder.txt +MAN_TOOL_PAGES = nut-scanner.8 nut-recorder.8 +HTML_TOOL_MANS = nut-scanner.html nut-recorder.html # CGI (--with-cgi) related manpages SRC_CGI_PAGES = \ diff --git a/docs/man/apcsmart-old.8 b/docs/man/apcsmart-old.8 index 7c1999d..9c44b72 100644 --- a/docs/man/apcsmart-old.8 +++ b/docs/man/apcsmart-old.8 @@ -2,12 +2,12 @@ .\" Title: apcsmart-old .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "APCSMART\-OLD" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "APCSMART\-OLD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/apcsmart.8 b/docs/man/apcsmart.8 index b129620..692e2ba 100644 --- a/docs/man/apcsmart.8 +++ b/docs/man/apcsmart.8 @@ -2,12 +2,12 @@ .\" Title: apcsmart .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/17/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "APCSMART" "8" "11/17/2011" "Network UPS Tools" "NUT Manual" +.TH "APCSMART" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -96,17 +96,17 @@ These models usually come from late 1990s / pre\-2009 times\&. They are often re .RS 4 WARNING: these are not \fInatively\fR -supported by apcsmart (or apcupsd for that matter, if you\(cqre wondering)\&. Around 2007 APC (now APC Schneider) decided to go back to its proprietry roots and all the new models (SMT, SMX, SURTD) use completely different protocol and cables\&. If you purchased a new APC ups, that uses cable with rj45 on the one end, and db\-9 on the other \- then you have such model\&. Your only option to support it through +supported by apcsmart (or apcupsd for that matter, if you\(cqre wondering)\&. Around 2007 APC (now APC Schneider) decided to go back to its proprietry roots and all the new models (SMT, SMX, SURTD) use completely different protocol and cables\&. If you purchased a new APC UPS, that uses cable with rj45 on the one end, and db\-9 on the other \- then you have such model\&. Your only option to support it through \fBNUT\fR is to purchase "legacy communications card" \- part #AP9620 (google \*(AqAP9620\*(Aq for more details)\&. Or if that\*(Aqs not an option, rely on official software\&. .RE .sp -Another thing to remember is that Smart protocol is not USB protocol\&. If you have ups with both USB and serial ports, then depending on how you connect it, you will need either apcsmart or usbhid\-ups driver\&. +Another thing to remember is that Smart protocol is not USB protocol\&. If you have UPS with both USB and serial ports, then depending on how you connect it, you will need either apcsmart or usbhid\-ups driver\&. .SH "CABLING" .sp This driver expects to see a 940\-0024C cable or a clone by default\&. You can switch to the 940\-0095B dual\-mode cable support with the \*(Aqcable=\*(Aq definition described below\&. .sp -If your 940\-0024C cable is broken or missing, use this diagram to build a clone: +If your 940\-xx24X cable is broken or missing, use this diagram to build a clone: .sp http://www\&.networkupstools\&.org/cables\&.html#_940_0024c_clone .if n \{\ @@ -122,7 +122,7 @@ http://www\&.networkupstools\&.org/cables\&.html#_940_0024c_clone .ps -1 .br .sp -It was reported, that the 940\-0024E cable uses the same wiring as the 940\-0024C one\&. +The "xx" is either "00" for a short cable, or the number of feet of a longer cable\&. The "X" is a letter representing the minor revision of the physical cable and its connectors ("C" and "E" are commonly found revisions)\&. All minor revisions should use the same pin\-outs and wiring\&. .sp .5v .RE .sp @@ -144,12 +144,12 @@ This is most basic command present in probably all APC models\&. It will hiberna .PP "old" models .RS 4 -The behaviour here is unfortunately pretty primitive \- when the power returns, the ups just wakes up\&. No grace periods, no min\&. battery charge condition, etc\&. This is probably not what you want\&. +The behaviour here is unfortunately pretty primitive \- when the power returns, the UPS just wakes up\&. No grace periods, no min\&. battery charge condition, etc\&. This is probably not what you want\&. .RE .PP "new" models .RS 4 -The behaviour here is as expected \- the power is cut off after the eeprom defined grace period\&. The ups will wake up when the power returns, after the eeprom defined delay AND if the eeprom defined min\&. battery charge level is met\&. The delay is counted from the power\*(Aqs return\&. +The behaviour here is as expected \- the power is cut off after the eeprom defined grace period\&. The UPS will wake up when the power returns, after the eeprom defined delay AND if the eeprom defined min\&. battery charge level is met\&. The delay is counted from the power\*(Aqs return\&. .RE .RE .PP @@ -173,9 +173,9 @@ This is basic command used to hibernate UPS regardless if it\*(Aqs running on ba "old" models .RS 4 The behaviour is \- unfortunately \- similary primitive to -\fBS\fR\&. The ups unconditionally wakes up after nnn*6 minutes \- +\fBS\fR\&. The UPS unconditionally wakes up after nnn*6 minutes \- \fBit doesn\*(Aqt care if the power returned !\fR -If nnn = 000, then UPS will do precisely nothing\&. On those models you\*(Aqre better specifying nnn > 0, if you can estimate the kind of power problems that might be happening in your environment\&. Another thing to consider with "old" models \- you might lose the connection with the ups, until it wakes up (with +If nnn = 000, then UPS will do precisely nothing\&. On those models you\*(Aqre better specifying nnn > 0, if you can estimate the kind of power problems that might be happening in your environment\&. Another thing to consider with "old" models \- you might lose the connection with the UPS, until it wakes up (with \fBS\fR, the serial connection is kept alive)\&. .RE .PP @@ -191,16 +191,16 @@ option, or argument to one of the supported instant commands)\&. .PP \fBK\fR (delayed poweroff) .RS 4 -This is permanent poweroff \- the ups will not wake up automatically\&. On newer units, it will respect applicable eeprom variables\&. +This is permanent poweroff \- the UPS will not wake up automatically\&. On newer units, it will respect applicable eeprom variables\&. .RE .PP \fBZ\fR (instant poweroff) .RS 4 -This is also permanent poweroff \- the ups will not wake up automatically\&. The poweroff is executed immediately\&. +This is also permanent poweroff \- the UPS will not wake up automatically\&. The poweroff is executed immediately\&. .RE .SH "SHUTDOWN CONTROL BY NUT" .sp -There\*(Aqre 3 options used to control shutdown behaviour\&. +There are three options used to control the shutdown behaviour\&. .PP \fBsdtype\fR=[0\-5] .RS 4 @@ -229,7 +229,7 @@ The values permitted are from 0 to 5\&. Only one can be specified\&. Anything el .PP 0 .RS 4 -issue soft hibernate (\fBS\fR) if the ups is running on batteries, otherwise issue hard hibernate (\fB@\fR) +issue soft hibernate (\fBS\fR) if the UPS is running on batteries, otherwise issue hard hibernate (\fB@\fR) .RE .PP 1 @@ -274,7 +274,7 @@ Hard hibernate\*(Aqs additional wakeup delay can be provided by \fBawd\fR\&. .RE .SS "ADVORDER" .sp -The argument is either a word \*(Aqno\*(Aq, or a string of 1 \- 5 digits in [0 \- 4] range\&. Each digit maps to the one of shutdown methods supported by APC upses\&. Methods listed in this way are tried in order, until one of them succedes\&. +The argument is either a word \*(Aqno\*(Aq, or a string of 1 \- 5 digits in [0 \- 4] range\&. Each digit maps to the one of shutdown methods supported by APC UPSes\&. Methods listed in this way are tried in order, until one of them succedes\&. .sp If \fBadvorder\fR is undefined or set to \*(Aqno\*(Aq, \fBsdtype\fR is used instead\&. .sp @@ -351,9 +351,9 @@ battery\&.runtime < battery\&.runtime\&.low .sp Of course \- if any of the variables are not available, the appropriate condition is not checked\&. If you want to explicitly disable one of the conditions, simply override the right hand variable causing the condition to always evaluate to false (you can even provide negative numbers)\&. .sp -APC upses don\*(Aqt have battery\&.charge\&.low \- you will have to define it if you want to use such condition (prefix the variable with override\&. or default\&.)\&. +APC UPSes don\*(Aqt have battery\&.charge\&.low \- you will have to define it if you want to use such condition (prefix the variable with override\&. or default\&.)\&. .sp -"New" units have battery\&.runtime\&.low, but depending on battery quality, firmware version, calibration and ups load \- this variable can be underestimated quite a bit \- especially right after going into OB state\&. This in turn can cause LB to be asserted, which under normal conditions will cause \fBNUT\fR to initiate the shutdown\&. You might want to disable this condition entirely, when relying on \fBignorelb\fR option (this was actually the main motivation behind introduction of such feature)\&. +"New" units have battery\&.runtime\&.low, but depending on battery quality, firmware version, calibration and UPS load \- this variable can be underestimated quite a bit \- especially right after going into OB state\&. This in turn can cause LB to be asserted, which under normal conditions will cause \fBNUT\fR to initiate the shutdown\&. You might want to disable this condition entirely, when relying on \fBignorelb\fR option (this was actually the main motivation behind introduction of such feature)\&. .sp Simple example: .sp @@ -372,7 +372,7 @@ Simple example: .sp This would cause apcsmart to go into shutdown \fIonly\fR if detected battery charge < 15%\&. Runtime condition is always false in this example\&. .sp -You could ask \- why bother ? Well, the reason is already hinted above\&. APC units can be very picky about the batteries, and their firmware can underestimate the remaining runtime (especially right after going into OB state)\&. \fBignorelb\fR option and \fBoverride\&.*\fR let you remain in control of the ups, not ups in control of you\&. +You could ask \- why bother ? Well, the reason is already hinted above\&. APC units can be very picky about the batteries, and their firmware can underestimate the remaining runtime (especially right after going into OB state)\&. \fBignorelb\fR option and \fBoverride\&.*\fR let you remain in control of the UPS, not UPS in control of you\&. .sp Furthermore, this allows to specify conditions similary to how it\(cqs done in apcupsd daemon, so it should be welcome by people used to that software\&. .SH "SUPPORTED INSTANT COMMANDS" @@ -406,7 +406,7 @@ load\&.off executes "instant poweroff" .RE .sp -All the above commands must be issued 2nd time to have any effect (no less than 3 seconds, and no more than 15 seconds after the initial call)\&. Those commands are mostly useful for manual testing, when your machine is not powered by the ups you\*(Aqre testing\&. +All the above commands must be issued 2nd time to have any effect (no less than 3 seconds, and no more than 15 seconds after the initial call)\&. Those commands are mostly useful for manual testing, when your machine is not powered by the UPS you\*(Aqre testing\&. .sp Other supported commands: .sp diff --git a/docs/man/apcsmart.txt b/docs/man/apcsmart.txt index 52cf0b4..ab99624 100644 --- a/docs/man/apcsmart.txt +++ b/docs/man/apcsmart.txt @@ -53,14 +53,14 @@ division isn\'t strict by any means, and the borders between those are pretty fu WARNING: these are not _natively_ supported by apcsmart (or apcupsd for that matter, if you\'re wondering). Around 2007 APC (now APC Schneider) decided to go back to its proprietry roots and all the new models (SMT, SMX, SURTD) use - completely different protocol and cables. If you purchased a new APC ups, + completely different protocol and cables. If you purchased a new APC UPS, that uses cable with rj45 on the one end, and db-9 on the other - then you have such model. Your only option to support it through *NUT* is to purchase "legacy communications card" - part #AP9620 (google \'AP9620' for more details). Or if that\'s not an option, rely on official software. Another thing to remember is that Smart protocol is not USB protocol. If you -have ups with both USB and serial ports, then depending on how you connect it, +have UPS with both USB and serial ports, then depending on how you connect it, you will need either apcsmart or usbhid-ups driver. CABLING @@ -70,13 +70,16 @@ This driver expects to see a 940-0024C cable or a clone by default. You can switch to the 940-0095B dual-mode cable support with the \'cable=' definition described below. -If your 940-0024C cable is broken or missing, use this diagram to build +If your 940-xx24X cable is broken or missing, use this diagram to build a clone: http://www.networkupstools.org/cables.html#_940_0024c_clone -NOTE: It was reported, that the 940-0024E cable uses the same wiring as the -940-0024C one. +NOTE: The "xx" is either "00" for a short cable, or the number of feet +of a longer cable. The "X" is a letter representing the minor revision +of the physical cable and its connectors ("C" and "E" are commonly found +revisions). All minor revisions should use the same pin-outs and +wiring. You can specify alternate cable in linkman:ups.conf[5]: @@ -99,12 +102,12 @@ behaviour quite a bit, depending on the model. "old" models::: The behaviour here is unfortunately pretty primitive - when the power - returns, the ups just wakes up. No grace periods, no min. battery + returns, the UPS just wakes up. No grace periods, no min. battery charge condition, etc. This is probably not what you want. "new" models::: The behaviour here is as expected - the power is cut off after the - eeprom defined grace period. The ups will wake up when the power + eeprom defined grace period. The UPS will wake up when the power returns, after the eeprom defined delay AND if the eeprom defined min. battery charge level is met. The delay is counted from the power\'s return. @@ -125,13 +128,13 @@ command if your UPS supports it (and is not too old, see below). + -- "old" models::: - The behaviour is - unfortunately - similary primitive to *S*. The ups + The behaviour is - unfortunately - similary primitive to *S*. The UPS unconditionally wakes up after $$nnn*6$$ minutes - *it doesn\'t care if the power returned !* If nnn = 000, then UPS will do precisely nothing. On those models you\'re better specifying nnn > 0, if you can estimate the kind of power problems that might be happening in your environment. Another thing to consider with "old" models - you might lose the - connection with the ups, until it wakes up (with *S*, the serial + connection with the UPS, until it wakes up (with *S*, the serial connection is kept alive). "new" models::: @@ -147,17 +150,17 @@ NUT also supports such variation. You have to provide exactly 2 digits to trigger it (*awd* option, or argument to one of the supported instant commands). *K* (delayed poweroff):: - This is permanent poweroff - the ups will not wake up automatically. On + This is permanent poweroff - the UPS will not wake up automatically. On newer units, it will respect applicable eeprom variables. *Z* (instant poweroff):: - This is also permanent poweroff - the ups will not wake up automatically. The - poweroff is executed immediately. + This is also permanent poweroff - the UPS will not wake up automatically. + The poweroff is executed immediately. SHUTDOWN CONTROL BY NUT ----------------------- -There\'re 3 options used to control shutdown behaviour. +There are three options used to control the shutdown behaviour. *sdtype*=[0-5]:: This option takes a single digit (0-5) as an argument. See below for @@ -188,7 +191,7 @@ The values permitted are from 0 to 5. Only one can be specified. Anything else will cause apcsmart to exit. 0:: -issue soft hibernate (*S*) if the ups is running on batteries, otherwise issue +issue soft hibernate (*S*) if the UPS is running on batteries, otherwise issue hard hibernate (*@*) 1:: issue soft hibernate (*S*) (if on batteries), and if it fails (or on mains) - @@ -208,7 +211,7 @@ ADVORDER ~~~~~~~~ The argument is either a word \'no', or a string of 1 - 5 digits in [0 - 4] -range. Each digit maps to the one of shutdown methods supported by APC upses. +range. Each digit maps to the one of shutdown methods supported by APC UPSes. Methods listed in this way are tried in order, until one of them succedes. If *advorder* is undefined or set to \'no', *sdtype* is used instead. @@ -245,11 +248,11 @@ is not checked. If you want to explicitly disable one of the conditions, simply override the right hand variable causing the condition to always evaluate to false (you can even provide negative numbers). -APC upses don\'t have battery.charge.low - you will have to define it if you want +APC UPSes don\'t have battery.charge.low - you will have to define it if you want to use such condition (prefix the variable with override. or default.). "New" units have battery.runtime.low, but depending on battery quality, firmware -version, calibration and ups load - this variable can be underestimated quite a bit - +version, calibration and UPS load - this variable can be underestimated quite a bit - especially right after going into OB state. This in turn can cause LB to be asserted, which under normal conditions will cause *NUT* to initiate the shutdown. You might want to disable this condition entirely, when relying on @@ -272,7 +275,7 @@ This would cause apcsmart to go into shutdown _only_ if detected battery charge You could ask - why bother ? Well, the reason is already hinted above. APC units can be very picky about the batteries, and their firmware can underestimate the remaining runtime (especially right after going into OB state). *ignorelb* -option and *$$override.*$$* let you remain in control of the ups, not ups in control +option and *$$override.*$$* let you remain in control of the UPS, not UPS in control of you. Furthermore, this allows to specify conditions similary to how it's done in @@ -298,7 +301,7 @@ executes "instant poweroff" All the above commands must be issued 2nd time to have any effect (no less than 3 seconds, and no more than 15 seconds after the initial call). Those commands are -mostly useful for manual testing, when your machine is not powered by the ups +mostly useful for manual testing, when your machine is not powered by the UPS you\'re testing. Other supported commands: diff --git a/docs/man/bcmxcp.8 b/docs/man/bcmxcp.8 index 8ebc50d..bee2f2c 100644 --- a/docs/man/bcmxcp.8 +++ b/docs/man/bcmxcp.8 @@ -2,12 +2,12 @@ .\" Title: bcmxcp .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BCMXCP" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "BCMXCP" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.8 index 4423f21..0f31d4f 100644 --- a/docs/man/bcmxcp_usb.8 +++ b/docs/man/bcmxcp_usb.8 @@ -2,12 +2,12 @@ .\" Title: bcmxcp_usb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BCMXCP_USB" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "BCMXCP_USB" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkin.8 b/docs/man/belkin.8 index bc70d65..2b9862f 100644 --- a/docs/man/belkin.8 +++ b/docs/man/belkin.8 @@ -2,12 +2,12 @@ .\" Title: belkin .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BELKIN" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "BELKIN" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkinunv.8 b/docs/man/belkinunv.8 index cbec5e2..626e5ca 100644 --- a/docs/man/belkinunv.8 +++ b/docs/man/belkinunv.8 @@ -2,12 +2,12 @@ .\" Title: belkinunv .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BELKINUNV" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "BELKINUNV" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestfcom.8 b/docs/man/bestfcom.8 index 3c238fc..dd57320 100644 --- a/docs/man/bestfcom.8 +++ b/docs/man/bestfcom.8 @@ -2,12 +2,12 @@ .\" Title: bestfcom .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTFCOM" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "BESTFCOM" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestfortress.8 b/docs/man/bestfortress.8 index 56e2137..e26767f 100644 --- a/docs/man/bestfortress.8 +++ b/docs/man/bestfortress.8 @@ -2,12 +2,12 @@ .\" Title: bestfortress .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTFORTRESS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "BESTFORTRESS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestuferrups.8 b/docs/man/bestuferrups.8 index b687c5c..03319a1 100644 --- a/docs/man/bestuferrups.8 +++ b/docs/man/bestuferrups.8 @@ -2,12 +2,12 @@ .\" Title: bestuferrups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTUFERRUPS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "BESTUFERRUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestups.8 b/docs/man/bestups.8 index e2f8ed2..0f2f6af 100644 --- a/docs/man/bestups.8 +++ b/docs/man/bestups.8 @@ -2,12 +2,12 @@ .\" Title: bestups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTUPS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "BESTUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/blazer.8 b/docs/man/blazer.8 index 4aa6382..67d718a 100644 --- a/docs/man/blazer.8 +++ b/docs/man/blazer.8 @@ -2,12 +2,12 @@ .\" Title: blazer .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 12/17/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BLAZER" "8" "12/17/2011" "Network UPS Tools" "NUT Manual" +.TH "BLAZER" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,7 +34,7 @@ blazer \- Driver for Megatec/Q1 protocol serial (blazer_ser) and USB (blazer_usb 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, 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\&. +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" @@ -109,7 +109,7 @@ Parameter used in the (optional) runtime estimation\&. This takes two runtimes a .RS 4 .\} .nf -runtimecal = 270,100,720,50 +runtimecal = 240,100,720,50 .fi .if n \{\ .RE diff --git a/docs/man/blazer.txt b/docs/man/blazer.txt index 3e0e46b..5a155b8 100644 --- a/docs/man/blazer.txt +++ b/docs/man/blazer.txt @@ -16,9 +16,10 @@ SUPPORTED HARDWARE ------------------ The blazer driver is known to work with various UPSes from Blazer, Energy -Sistem, Fenton Technologies, 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't been tested. +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'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. @@ -90,7 +91,7 @@ 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 + - runtimecal = 270,100,720,50 + runtimecal = 240,100,720,50 + 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 diff --git a/docs/man/clone.8 b/docs/man/clone.8 index d971078..a19e23c 100644 --- a/docs/man/clone.8 +++ b/docs/man/clone.8 @@ -2,12 +2,12 @@ .\" Title: clone .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "CLONE" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "CLONE" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/dummy-ups.8 b/docs/man/dummy-ups.8 index acb5fc9..fd0bc6f 100644 --- a/docs/man/dummy-ups.8 +++ b/docs/man/dummy-ups.8 @@ -2,12 +2,12 @@ .\" Title: dummy-ups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "DUMMY\-UPS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "DUMMY\-UPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/etapro.8 b/docs/man/etapro.8 index b241076..121131b 100644 --- a/docs/man/etapro.8 +++ b/docs/man/etapro.8 @@ -2,12 +2,12 @@ .\" Title: etapro .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "ETAPRO" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "ETAPRO" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/everups.8 b/docs/man/everups.8 index 0e66fdb..de926f2 100644 --- a/docs/man/everups.8 +++ b/docs/man/everups.8 @@ -2,12 +2,12 @@ .\" Title: everups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "EVERUPS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "EVERUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/gamatronic.8 b/docs/man/gamatronic.8 index 4c687ea..ed1a1b0 100644 --- a/docs/man/gamatronic.8 +++ b/docs/man/gamatronic.8 @@ -2,12 +2,12 @@ .\" Title: gamatronic .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "GAMATRONIC" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "GAMATRONIC" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/genericups.8 b/docs/man/genericups.8 index 683fbbe..4d77ca4 100644 --- a/docs/man/genericups.8 +++ b/docs/man/genericups.8 @@ -2,12 +2,12 @@ .\" Title: genericups .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "GENERICUPS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "GENERICUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/hosts.conf.5 b/docs/man/hosts.conf.5 index 3d3dcce..dafb543 100644 --- a/docs/man/hosts.conf.5 +++ b/docs/man/hosts.conf.5 @@ -2,12 +2,12 @@ .\" Title: hosts.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "HOSTS\&.CONF" "5" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "HOSTS\&.CONF" "5" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/isbmex.8 b/docs/man/isbmex.8 index e6216a6..04a46d4 100644 --- a/docs/man/isbmex.8 +++ b/docs/man/isbmex.8 @@ -2,12 +2,12 @@ .\" Title: isbmex .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "ISBMEX" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "ISBMEX" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ivtscd.8 b/docs/man/ivtscd.8 index 01835c8..66b5ae9 100644 --- a/docs/man/ivtscd.8 +++ b/docs/man/ivtscd.8 @@ -2,12 +2,12 @@ .\" Title: ivtscd .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "IVTSCD" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "IVTSCD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libupsclient-config.1 b/docs/man/libupsclient-config.1 index 8b37d24..e6d281e 100644 --- a/docs/man/libupsclient-config.1 +++ b/docs/man/libupsclient-config.1 @@ -2,12 +2,12 @@ .\" Title: libupsclient-config .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "LIBUPSCLIENT\-CONFIG" "1" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "LIBUPSCLIENT\-CONFIG" "1" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert-esp2.8 b/docs/man/liebert-esp2.8 index 9f8faf6..db12ebc 100644 --- a/docs/man/liebert-esp2.8 +++ b/docs/man/liebert-esp2.8 @@ -2,12 +2,12 @@ .\" Title: liebert-esp2 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "LIEBERT\-ESP2" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "LIEBERT\-ESP2" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert.8 b/docs/man/liebert.8 index cab4379..cc4ab97 100644 --- a/docs/man/liebert.8 +++ b/docs/man/liebert.8 @@ -2,12 +2,12 @@ .\" Title: liebert .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "LIEBERT" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "LIEBERT" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/masterguard.8 b/docs/man/masterguard.8 index f4b9bd3..4dd5aca 100644 --- a/docs/man/masterguard.8 +++ b/docs/man/masterguard.8 @@ -2,12 +2,12 @@ .\" Title: masterguard .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MASTERGUARD" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "MASTERGUARD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/metasys.8 b/docs/man/metasys.8 index 4c77eb7..4bcbaf0 100644 --- a/docs/man/metasys.8 +++ b/docs/man/metasys.8 @@ -2,12 +2,12 @@ .\" Title: metasys .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "METASYS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "METASYS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/mge-shut.8 b/docs/man/mge-shut.8 index accde1b..a2188cd 100644 --- a/docs/man/mge-shut.8 +++ b/docs/man/mge-shut.8 @@ -2,12 +2,12 @@ .\" Title: mge-shut .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MGE\-SHUT" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "MGE\-SHUT" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/mge-utalk.8 b/docs/man/mge-utalk.8 index 7bdabe1..670c4be 100644 --- a/docs/man/mge-utalk.8 +++ b/docs/man/mge-utalk.8 @@ -2,12 +2,12 @@ .\" Title: mge-utalk .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MGE\-UTALK" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "MGE\-UTALK" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/microdowell.8 b/docs/man/microdowell.8 index fe31f6b..f888340 100644 --- a/docs/man/microdowell.8 +++ b/docs/man/microdowell.8 @@ -2,12 +2,12 @@ .\" Title: microdowell .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MICRODOWELL" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "MICRODOWELL" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/netxml-ups.8 b/docs/man/netxml-ups.8 index 61957ed..69df2fe 100644 --- a/docs/man/netxml-ups.8 +++ b/docs/man/netxml-ups.8 @@ -2,12 +2,12 @@ .\" Title: netxml-ups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NETXML\-UPS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NETXML\-UPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nut-ipmipsu.8 b/docs/man/nut-ipmipsu.8 index 72c0320..9ff396a 100644 --- a/docs/man/nut-ipmipsu.8 +++ b/docs/man/nut-ipmipsu.8 @@ -2,12 +2,12 @@ .\" Title: nut-ipmipsu .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUT\-IPMIPSU" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUT\-IPMIPSU" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nut-recorder.8 b/docs/man/nut-recorder.8 new file mode 100644 index 0000000..de8969d --- /dev/null +++ b/docs/man/nut-recorder.8 @@ -0,0 +1,103 @@ +'\" t +.\" Title: nut-recorder +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 05/21/2012 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "NUT\-RECORDER" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nut-recorder \- utility to record device status and values changes +.SH "SYNOPSIS" +.sp +\fBnut\-recorder\fR \fIdevice\-name\fR [output\-file] [interval] +.SH "DESCRIPTION" +.sp +\fBnut\-recorder\fR is an utility to record device running sequence (Ie power failures or any other change) through a NUT data server, and dump it in a \&.seq format\&. +.sp +The \&.seq file can then be used by the \fBdummy-ups\fR(8) driver to replay the sequence\&. +.SH "OPTIONS" +.PP +\fIdevice\-name\fR +.RS 4 +Record the changes of that device\&. The format for this option is +\fIdevname[@hostname[:port]]\fR\&. The default hostname is "localhost"\&. +.RE +.PP +\fIoutput\-file\fR +.RS 4 +Optional\&. Data will be saved to this file\&. The default is +\fIdummy\-device\&.seq\fR\&. +.RE +.PP +\fIinterval\fR +.RS 4 +Optional\&. The status of the device will be checked every +\fIinterval\fR\&. The default is 5 seconds\&. +.RE +.SH "EXAMPLES" +.sp +To record data from \fIups1@host1\fR every 10 seconds: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ nut\-recorder ups1@host1\*(Aq ups1\-output\&.seq 10 +\&. \&. \&. +battery\&.charge: 100\&.0 +battery\&.voltage: 13\&.9 +battery\&.voltage\&.nominal: 13\&.6 +ups\&.status: OL +\&. \&. \&. +battery\&.charge: 90\&.0 +ups\&.status: OB +\&. \&. \&. +.fi +.if n \{\ +.RE +.\} +.sp +You can then define a dummy device in \fBups.conf\fR(5): +.sp +.if n \{\ +.RS 4 +.\} +.nf +[ups\-test] + driver = dummy\-ups + port = ups1\-output\&.seq +.fi +.if n \{\ +.RE +.\} +.SH "AUTHOR" +.sp +Arnaud Quette +.SH "SEE ALSO" +.sp +\fBdummy-ups\fR(8) +.SH "INTERNET RESOURCES" +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/nut-recorder.txt b/docs/man/nut-recorder.txt new file mode 100644 index 0000000..d4a22ed --- /dev/null +++ b/docs/man/nut-recorder.txt @@ -0,0 +1,73 @@ +NUT-RECORDER(8) +=============== + + +NAME +---- +nut-recorder - utility to record device status and values changes + +SYNOPSIS +-------- +*nut-recorder* 'device-name' [output-file] [interval] + +DESCRIPTION +----------- +*nut-recorder* is an utility to record device running sequence (Ie +power failures or any other change) through a NUT data server, and +dump it in a .seq format. + +The .seq file can then be used by the linkman:dummy-ups[8] driver +to replay the sequence. + +OPTIONS +------- +'device-name':: + +Record the changes of that device. The format for this option is +'devname[@hostname[:port]]'. The default hostname is "localhost". + +'output-file':: + +Optional. Data will be saved to this file. The default is +'dummy-device.seq'. + +'interval':: + +Optional. The status of the device will be checked every 'interval'. +The default is 5 seconds. + +EXAMPLES +-------- + +To record data from 'ups1@host1' every 10 seconds: + + $ nut-recorder ups1@host1' ups1-output.seq 10 + . . . + battery.charge: 100.0 + battery.voltage: 13.9 + battery.voltage.nominal: 13.6 + ups.status: OL + . . . + battery.charge: 90.0 + ups.status: OB + . . . + +You can then define a dummy device in linkman:ups.conf[5]: + + [ups-test] + driver = dummy-ups + port = ups1-output.seq + +AUTHOR +------ +Arnaud Quette + +SEE ALSO +-------- + +linkman:dummy-ups[8] + +INTERNET RESOURCES +------------------ + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nut-scanner.8 b/docs/man/nut-scanner.8 index 2b0c1f1..04e926c 100644 --- a/docs/man/nut-scanner.8 +++ b/docs/man/nut-scanner.8 @@ -2,12 +2,12 @@ .\" Title: nut-scanner .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 01/03/2012 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUT\-SCANNER" "8" "01/03/2012" "Network UPS Tools" "NUT Manual" +.TH "NUT\-SCANNER" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,6 +37,9 @@ nut-scanner \- scan communication buses for NUT devices .SH "DESCRIPTION" .sp \fBnut\-scanner\fR scans available communication buses and displays any NUT\-compatible devices it has found\&. +.SH "INSTALLATION" +.sp +\fBnut\-scanner\fR is always built by default\&. However, available options (USB, SNMP, IPMI, \&...) will vary according to the available compile time and runtime dependencies\&. For example, if Net\-SNMP is installed, thus providing libsnmp (\&.so or \&.dll) and headers, both during compilation and runtime, then SNMP discovery will be available\&. .SH "OPTIONS" .PP \fB\-h\fR diff --git a/docs/man/nut-scanner.txt b/docs/man/nut-scanner.txt index 90429fc..2f517ee 100644 --- a/docs/man/nut-scanner.txt +++ b/docs/man/nut-scanner.txt @@ -18,6 +18,15 @@ DESCRIPTION *nut-scanner* scans available communication buses and displays any NUT-compatible devices it has found. +INSTALLATION +------------ + +*nut-scanner* is always built by default. However, available options +(USB, SNMP, IPMI, ...) will vary according to the available compile time +and runtime dependencies. For example, if Net-SNMP is installed, thus +providing libsnmp (.so or .dll) and headers, both during compilation +and runtime, then SNMP discovery will be available. + OPTIONS ------- *-h*:: @@ -159,7 +168,6 @@ To scan NUT servers with a timeout of 10 seconds on IP range 192.168.0.0 to 192. *nut-scanner -O -t 10 -m 192.168.0.0/25* - SEE ALSO -------- diff --git a/docs/man/nut.conf.5 b/docs/man/nut.conf.5 index 199ac8f..4231178 100644 --- a/docs/man/nut.conf.5 +++ b/docs/man/nut.conf.5 @@ -2,12 +2,12 @@ .\" Title: nut.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUT\&.CONF" "5" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUT\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,6 +36,11 @@ This file attempts to standardize the various files being found in different ins Distribution\(cqs init script should source this file in order to determine which components have to be started\&. .sp Blank lines are ignored\&. Lines with a hash (\fI#\fR) character at the 1st position of the line are ignored, too\&. They can be used to add comments\&. +.SH "IMPORTANT NOTE" +.sp +This file is intended to be sourced by shell scripts\&. You MUST NOT use spaces around the equal sign! +.sp +Refer to the EXAMPLE section for illustrations\&. .SH "DIRECTIVES" .PP \fBMODE\fR @@ -123,7 +128,7 @@ this workaround might be dangerous under some circumstances\&. Please read http: .RS 4 .\} .nf -MODE = none +MODE=none .fi .if n \{\ .RE @@ -133,7 +138,7 @@ MODE = none .RS 4 .\} .nf -UPSD_OPTIONS = "" +UPSD_OPTIONS="" .fi .if n \{\ .RE @@ -143,7 +148,7 @@ UPSD_OPTIONS = "" .RS 4 .\} .nf -UPSMON_OPTIONS = "" +UPSMON_OPTIONS="" .fi .if n \{\ .RE @@ -153,7 +158,7 @@ UPSMON_OPTIONS = "" .RS 4 .\} .nf -# POWEROFF_WAIT = 15m +# POWEROFF_WAIT=15m .fi .if n \{\ .RE diff --git a/docs/man/nut.conf.txt b/docs/man/nut.conf.txt index 26ed896..074ff95 100644 --- a/docs/man/nut.conf.txt +++ b/docs/man/nut.conf.txt @@ -19,6 +19,14 @@ Blank lines are ignored. Lines with a hash ('#') character at the 1st position of the line are ignored, too. They can be used to add comments. +IMPORTANT NOTE +-------------- + +This file is intended to be sourced by shell scripts. +You MUST NOT use spaces around the equal sign! + +Refer to the EXAMPLE section for illustrations. + DIRECTIVES ---------- @@ -76,13 +84,13 @@ EXAMPLE # /etc/nut/nut.conf. See nut.conf(5) - MODE = none + MODE=none - UPSD_OPTIONS = "" + UPSD_OPTIONS="" - UPSMON_OPTIONS = "" + UPSMON_OPTIONS="" - # POWEROFF_WAIT = 15m + # POWEROFF_WAIT=15m INTEGRATION ----------- diff --git a/docs/man/nutscan.3 b/docs/man/nutscan.3 index 68658f8..022ede7 100644 --- a/docs/man/nutscan.3 +++ b/docs/man/nutscan.3 @@ -2,12 +2,12 @@ .\" Title: nutscan .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/03/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN" "3" "11/03/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_add_device_to_device.3 b/docs/man/nutscan_add_device_to_device.3 index 47641ee..91c0153 100644 --- a/docs/man/nutscan_add_device_to_device.3 +++ b/docs/man/nutscan_add_device_to_device.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_add_device_to_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_ADD_DEVICE_T" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_ADD_DEVICE_T" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_add_option_to_device.3 b/docs/man/nutscan_add_option_to_device.3 index fb8244e..4075e39 100644 --- a/docs/man/nutscan_add_option_to_device.3 +++ b/docs/man/nutscan_add_option_to_device.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_add_option_to_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_ADD_OPTION_T" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_ADD_OPTION_T" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_cidr_to_ip.3 b/docs/man/nutscan_cidr_to_ip.3 index 7157550..56a6454 100644 --- a/docs/man/nutscan_cidr_to_ip.3 +++ b/docs/man/nutscan_cidr_to_ip.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_cidr_to_ip .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_CIDR_TO_IP" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_CIDR_TO_IP" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_display_parsable.3 b/docs/man/nutscan_display_parsable.3 index 4dd2820..aee3034 100644 --- a/docs/man/nutscan_display_parsable.3 +++ b/docs/man/nutscan_display_parsable.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_display_parsable .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_PARS" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_DISPLAY_PARS" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_display_ups_conf.3 b/docs/man/nutscan_display_ups_conf.3 index cc04ade..cc8d242 100644 --- a/docs/man/nutscan_display_ups_conf.3 +++ b/docs/man/nutscan_display_ups_conf.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_display_ups_conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_UPS_" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_DISPLAY_UPS_" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_free_device.3 b/docs/man/nutscan_free_device.3 index 445bc0b..d3d462c 100644 --- a/docs/man/nutscan_free_device.3 +++ b/docs/man/nutscan_free_device.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_free_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_FREE_DEVICE" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_FREE_DEVICE" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_init.3 b/docs/man/nutscan_init.3 index bc89e84..24c62ba 100644 --- a/docs/man/nutscan_init.3 +++ b/docs/man/nutscan_init.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_init .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 12/15/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_INIT" "3" "12/15/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_INIT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_new_device.3 b/docs/man/nutscan_new_device.3 index 511d7e6..028b201 100644 --- a/docs/man/nutscan_new_device.3 +++ b/docs/man/nutscan_new_device.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_new_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_NEW_DEVICE" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_NEW_DEVICE" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_avahi.3 b/docs/man/nutscan_scan_avahi.3 index b9eda98..2bf5d71 100644 --- a/docs/man/nutscan_scan_avahi.3 +++ b/docs/man/nutscan_scan_avahi.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_avahi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 12/15/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_AVAHI" "3" "12/15/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_AVAHI" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_ipmi.3 b/docs/man/nutscan_scan_ipmi.3 index cfd2041..890c96c 100644 --- a/docs/man/nutscan_scan_ipmi.3 +++ b/docs/man/nutscan_scan_ipmi.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_ipmi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 12/15/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_IPMI" "3" "12/15/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_IPMI" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_nut.3 b/docs/man/nutscan_scan_nut.3 index 1ce7578..d40b690 100644 --- a/docs/man/nutscan_scan_nut.3 +++ b/docs/man/nutscan_scan_nut.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_nut .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 12/15/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_NUT" "3" "12/15/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_NUT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_snmp.3 b/docs/man/nutscan_scan_snmp.3 index 972e05e..dcdaa04 100644 --- a/docs/man/nutscan_scan_snmp.3 +++ b/docs/man/nutscan_scan_snmp.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_snmp .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 12/15/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_SNMP" "3" "12/15/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_SNMP" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_usb.3 b/docs/man/nutscan_scan_usb.3 index 7c95d00..40968c0 100644 --- a/docs/man/nutscan_scan_usb.3 +++ b/docs/man/nutscan_scan_usb.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_usb .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 12/15/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_USB" "3" "12/15/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_USB" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_xml_http.3 b/docs/man/nutscan_scan_xml_http.3 index 5d23cc5..d3c42cd 100644 --- a/docs/man/nutscan_scan_xml_http.3 +++ b/docs/man/nutscan_scan_xml_http.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_xml_http .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 12/15/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_XML_HTT" "3" "12/15/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_XML_HTT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutupsdrv.8 b/docs/man/nutupsdrv.8 index e6bc25c..262ddbc 100644 --- a/docs/man/nutupsdrv.8 +++ b/docs/man/nutupsdrv.8 @@ -2,12 +2,12 @@ .\" Title: nutupsdrv .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTUPSDRV" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "NUTUPSDRV" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/oneac.8 b/docs/man/oneac.8 index 064dd60..b468b38 100644 --- a/docs/man/oneac.8 +++ b/docs/man/oneac.8 @@ -2,12 +2,12 @@ .\" Title: oneac .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "ONEAC" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "ONEAC" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,7 +34,53 @@ oneac \- Driver for Oneac UPS equipment This man page only documents the hardware\-specific features of the oneac driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "SUPPORTED HARDWARE" .sp -This driver supports Oneac EG and ON UPS equipment with the Advanced Interface\&. If your UPS is equipped with the Basic Interface card, use the genericups driver\&. +This driver supports various Oneac UPS families: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +EG (late 80s, early 90s, plug\-in serial interface card) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ON (early and mid\-90s, plug\-in serial interface card) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +OZ (mid\-90s on, DB\-25 std\&., interface slot) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +OB (early 2000\(cqs on, big cabinet, DB\-25 std\&., interface slot) +.RE +.sp +If your UPS is equipped with the Basic Interface card, use the \fBgenericups\fR(8) driver\&. .SH "EXTRA ARGUMENTS" .sp This driver supports the following optional settings in the \fBups.conf\fR(5) file: @@ -43,18 +89,39 @@ This driver supports the following optional settings in the \fBups.conf\fR(5) fi .RS 4 Change battery test time from the 2 minute default\&. .RE +.PP +\fBoffdelay\fR=\fInum\fR +.RS 4 +Change shutdown delay time from 0 second default\&. +.RE .SH "INSTANT COMMANDS" .sp -This driver supports the following Instant Commands\&. +This driver supports the following Instant Commands\&. (See \fBupscmd\fR(8)) +.SS "All UPS units" .PP -\fBreset\&.input\&.minmax\fR +\fBshutdown\&.return\fR .RS 4 -Reset the minimum and maximum input line voltage values seen since the last reset or power on\&. +Turn off the load possibly after a delay and return when power is back\&. .RE .PP -\fBtest\&.battery\&.start\fR +\fBshutdown\&.stop\fR .RS 4 -Start a battery test\&. The default time is 2 minutes\&. This time can be set in the +Stop a shutdown in progress\&. +.RE +.PP +\fBshutdown\&.reboot\fR +.RS 4 +Shut down the load briefly while rebooting the UPS\&. +.RE +.PP +\fBtest\&.failure\&.start\fR +.RS 4 +Starts a 15 second long simulation of an input power failure\&. +.RE +.PP +\fBtest\&.battery\&.start\&.quick\fR +.RS 4 +Start a "quick" battery test\&. The default time is 2 minutes\&. This time can be set in the \fBups\&.conf\fR file\&. See \fBtestime\fR @@ -65,14 +132,81 @@ above\&. .RS 4 Stops a battery test that is in progress\&. .RE +.SS "All ON UPS units" .PP -\fBtest\&.failure\&.start\fR +\fBreset\&.input\&.minmax\fR .RS 4 -Starts a 15 second long simulation of an input power failure\&. +Reset the minimum and maximum input line voltage values seen since the last reset or power on\&. +.RE +.SS "Newer ON UPS units" +.PP +\fBtest\&.panel\&.start\fR +.RS 4 +Start testing the UPS panel\&. +.RE +.PP +\fBtest\&.battery\&.start\&.deep\fR +.RS 4 +Start a "deep" battery test\&. This test runs the UPS until the low battery point and then returns to the AC line\&. +.RE +.PP +\fBreset\&.input\&.minmax\fR +.RS 4 +Reset the minimum and maximum input line voltage values seen since the last reset or power on\&. +.RE +.PP +\fBbeeper\&.enable\fR +.RS 4 +Enable UPS beeper/buzzer\&. +.RE +.PP +\fBbeeper\&.disable\fR +.RS 4 +Disable UPS beeper/buzzer\&. +.RE +.PP +\fBbeeper\&.mute\fR +.RS 4 +Mutes the UPS beeper/buzzer for the current alarm condition(s)\&. +.RE +.SH "WRITABLE VARIABLES" +.sp +See \fBupsrw\fR(8) to see what variables are writable for the UPS\&. +.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 +If your UPS supports writing battery\&.runtime\&.low, the new set value is to be entered in minutes (up to 99) but the reported value is reported in seconds (set value * 60)\&. +.sp .5v +.RE +.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 +If your UPS supports input\&.transfer\&.low and input\&.transfer\&.high, those values are used to create an allowable output range\&. The UPS will do what it can to keep the output voltage value within the defined range (for example: tap change or switch to inverter)\&. +.sp .5v .RE .SH "AUTHOR" .sp -Eric Lawson +Bill Elliot , Eric Lawson .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/oneac.txt b/docs/man/oneac.txt index 88f6aa6..fe6c779 100644 --- a/docs/man/oneac.txt +++ b/docs/man/oneac.txt @@ -15,9 +15,16 @@ linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ -This driver supports Oneac EG and ON UPS equipment with the -Advanced Interface. If your UPS is equipped with the Basic -Interface card, use the genericups driver. + +This driver supports various Oneac UPS families: + + - EG (late 80s, early 90s, plug-in serial interface card) + - ON (early and mid-90s, plug-in serial interface card) + - OZ (mid-90s on, DB-25 std., interface slot) + - OB (early 2000's on, big cabinet, DB-25 std., interface slot) + +If your UPS is equipped with the Basic Interface card, use the +linkman:genericups[8] driver. EXTRA ARGUMENTS --------------- @@ -27,27 +34,83 @@ linkman:ups.conf[5] file: *testtime*='num':: Change battery test time from the 2 minute default. +*offdelay*='num':: +Change shutdown delay time from 0 second default. + INSTANT COMMANDS ---------------- This driver supports the following Instant Commands. +(See linkman:upscmd[8]) -*reset.input.minmax*:: -Reset the minimum and maximum input line voltage values -seen since the last reset or power on. +All UPS units +~~~~~~~~~~~~~ -*test.battery.start*:: -Start a battery test. The default time is 2 minutes. This -time can be set in the *ups.conf* file. See *testime* above. +*shutdown.return*:: +Turn off the load possibly after a delay and return when power is back. -*test.battery.stop*:: -Stops a battery test that is in progress. +*shutdown.stop*:: +Stop a shutdown in progress. + +*shutdown.reboot*:: +Shut down the load briefly while rebooting the UPS. *test.failure.start*:: Starts a 15 second long simulation of an input power failure. +*test.battery.start.quick*:: +Start a "quick" battery test. The default time is 2 minutes. This +time can be set in the *ups.conf* file. See *testime* above. + +*test.battery.stop*:: +Stops a battery test that is in progress. + +All ON UPS units +~~~~~~~~~~~~~~~~ + +*reset.input.minmax*:: +Reset the minimum and maximum input line voltage values +seen since the last reset or power on. + +Newer ON UPS units +~~~~~~~~~~~~~~~~~~ + +*test.panel.start*:: +Start testing the UPS panel. + +*test.battery.start.deep*:: +Start a "deep" battery test. This test runs the UPS until the low +battery point and then returns to the AC line. + +*reset.input.minmax*:: +Reset the minimum and maximum input line voltage values +seen since the last reset or power on. + +*beeper.enable*:: +Enable UPS beeper/buzzer. + +*beeper.disable*:: +Disable UPS beeper/buzzer. + +*beeper.mute*:: +Mutes the UPS beeper/buzzer for the current alarm condition(s). + +Writable Variables +------------------ +See linkman:upsrw[8] to see what variables are writable for the UPS. + +NOTE: If your UPS supports writing battery.runtime.low, the new set value +is to be entered in minutes (up to 99) but the reported value is reported +in seconds (set value * 60). + +NOTE: If your UPS supports input.transfer.low and input.transfer.high, +those values are used to create an allowable output range. The UPS +will do what it can to keep the output voltage value within the +defined range (for example: tap change or switch to inverter). + AUTHOR ------ +Bill Elliot , Eric Lawson SEE ALSO diff --git a/docs/man/optiups.8 b/docs/man/optiups.8 index 08d998e..7e48a29 100644 --- a/docs/man/optiups.8 +++ b/docs/man/optiups.8 @@ -2,12 +2,12 @@ .\" Title: optiups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "OPTIUPS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "OPTIUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powercom.8 b/docs/man/powercom.8 index 43aa95b..24f1c05 100644 --- a/docs/man/powercom.8 +++ b/docs/man/powercom.8 @@ -2,12 +2,12 @@ .\" Title: powercom .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "POWERCOM" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "POWERCOM" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powerman-pdu.8 b/docs/man/powerman-pdu.8 index 80b55f6..d8f4bc3 100644 --- a/docs/man/powerman-pdu.8 +++ b/docs/man/powerman-pdu.8 @@ -2,12 +2,12 @@ .\" Title: powerman-pdu .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "POWERMAN\-PDU" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "POWERMAN\-PDU" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powerpanel.8 b/docs/man/powerpanel.8 index b2a706e..53f5d5e 100644 --- a/docs/man/powerpanel.8 +++ b/docs/man/powerpanel.8 @@ -2,12 +2,12 @@ .\" Title: powerpanel .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "POWERPANEL" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "POWERPANEL" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/rhino.8 b/docs/man/rhino.8 index 40f1cb5..c92c25c 100644 --- a/docs/man/rhino.8 +++ b/docs/man/rhino.8 @@ -2,12 +2,12 @@ .\" Title: rhino .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "RHINO" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "RHINO" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/richcomm_usb.8 b/docs/man/richcomm_usb.8 index ad09d82..ab5f191 100644 --- a/docs/man/richcomm_usb.8 +++ b/docs/man/richcomm_usb.8 @@ -2,12 +2,12 @@ .\" Title: richcomm_usb .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "RICHCOMM_USB" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "RICHCOMM_USB" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/safenet.8 b/docs/man/safenet.8 index 32a17ba..c21a244 100644 --- a/docs/man/safenet.8 +++ b/docs/man/safenet.8 @@ -2,12 +2,12 @@ .\" Title: safenet .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "SAFENET" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "SAFENET" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/snmp-ups.8 b/docs/man/snmp-ups.8 index ee25930..d431961 100644 --- a/docs/man/snmp-ups.8 +++ b/docs/man/snmp-ups.8 @@ -2,12 +2,12 @@ .\" Title: snmp-ups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 12/05/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "SNMP\-UPS" "8" "12/05/2011" "Network UPS Tools" "NUT Manual" +.TH "SNMP\-UPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,7 +43,7 @@ MGE UPS SYSTEMS and MGE Office Protection Systems devices with SNMP cards (ref 6 .PP \fBapcc\fR .RS 4 -APC AP9606 APC Web/SNMP management card, perhaps others +APC AP9605, AP9606, AP9617, and AP9618 APC network management cards, as well as any others supporting the APC POWERNET MIB .RE .PP \fBnetvision\fR diff --git a/docs/man/snmp-ups.txt b/docs/man/snmp-ups.txt index 58ee71e..00fa083 100644 --- a/docs/man/snmp-ups.txt +++ b/docs/man/snmp-ups.txt @@ -23,7 +23,7 @@ UPS that is RFC 1628 (UPS MIB) compliant, e.g. MGE UPS SYSTEMS, Liebert, perhaps MGE UPS SYSTEMS and MGE Office Protection Systems devices with SNMP cards (ref 66062, 66045, 66074 and 66244) *apcc*:: -APC AP9606 APC Web/SNMP management card, perhaps others +APC AP9605, AP9606, AP9617, and AP9618 APC network management cards, as well as any others supporting the APC POWERNET MIB *netvision*:: Socomec Sicon UPS with Netvision Web/SNMP management card/external box diff --git a/docs/man/solis.8 b/docs/man/solis.8 index 2551f0e..da4d0e9 100644 --- a/docs/man/solis.8 +++ b/docs/man/solis.8 @@ -2,12 +2,12 @@ .\" Title: solis .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "SOLIS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "SOLIS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplite.8 b/docs/man/tripplite.8 index a25ad60..a74c0cf 100644 --- a/docs/man/tripplite.8 +++ b/docs/man/tripplite.8 @@ -2,12 +2,12 @@ .\" Title: tripplite .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "TRIPPLITE" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "TRIPPLITE" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplite_usb.8 b/docs/man/tripplite_usb.8 index dbaa6cb..5a71c35 100644 --- a/docs/man/tripplite_usb.8 +++ b/docs/man/tripplite_usb.8 @@ -2,12 +2,12 @@ .\" Title: tripplite_usb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "TRIPPLITE_USB" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "TRIPPLITE_USB" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplitesu.8 b/docs/man/tripplitesu.8 index a6f6b8d..366af7c 100644 --- a/docs/man/tripplitesu.8 +++ b/docs/man/tripplitesu.8 @@ -2,12 +2,12 @@ .\" Title: tripplitesu .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "TRIPPLITESU" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "TRIPPLITESU" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ups.conf.5 b/docs/man/ups.conf.5 index fe04f4b..0abc9a1 100644 --- a/docs/man/ups.conf.5 +++ b/docs/man/ups.conf.5 @@ -2,12 +2,12 @@ .\" Title: ups.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPS\&.CONF" "5" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPS\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsc.8 b/docs/man/upsc.8 index 24f0121..115da0e 100644 --- a/docs/man/upsc.8 +++ b/docs/man/upsc.8 @@ -2,12 +2,12 @@ .\" Title: upsc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSC" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSC" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,6 +34,8 @@ upsc \- example lightweight UPS client \fBupsc\fR \-l | \-L [\fIhost\fR] .sp \fBupsc\fR \fIups\fR [\fIvariable\fR] +.sp +\fBupsc\fR \-c \fIups\fR .SH "DESCRIPTION" .sp \fBupsc\fR is provided as a quick way to poll the status of a UPS server\&. It can be used inside shell scripts and other programs that need UPS data but don\(cqt want to include the full interface\&. @@ -51,6 +53,12 @@ As above, list all UPS names configured at \fIhost\fR, including their description provided by the remote upsd(8) from ups\&.conf(5)\&. The hostname defaults to "localhost"\&. You may optionally add a colon and a port number to override the default port\&. .RE .PP +\fB\-c\fR \fIups\fR +.RS 4 +Lists each client connected on +\fIups\fR, one name per line\&. +.RE +.PP \fIups\fR .RS 4 Display the status of that UPS\&. The format for this option is @@ -106,6 +114,21 @@ done .if n \{\ .RE .\} +.sp +To list clients connected on "myups": +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ upsc \-c myups +127\&.0\&.0\&.1 +::1 +192\&.168\&.1\&.2 +.fi +.if n \{\ +.RE +.\} .SH "DIAGNOSTICS" .sp upsc will either print a list of UPS names, a list of all supported variables and their values on the UPS, or an error message\&. If you receive an error, make sure you have specified a valid UPS on the command line, that \fBupsd\fR(8) is really running on the other host and that no firewalls are blocking you\&. diff --git a/docs/man/upsc.txt b/docs/man/upsc.txt index 74c96a9..a32afc7 100644 --- a/docs/man/upsc.txt +++ b/docs/man/upsc.txt @@ -12,6 +12,8 @@ SYNOPSIS *upsc* 'ups' ['variable'] +*upsc* -c 'ups' + DESCRIPTION ----------- @@ -33,6 +35,10 @@ OPTIONS "localhost". You may optionally add a colon and a port number to override the default port. +*-c* 'ups':: + + Lists each client connected on 'ups', one name per line. + 'ups':: Display the status of that UPS. The format for this option is @@ -69,6 +75,15 @@ syntax: upsc $UPS ups.status done +To list clients connected on "myups": + + $ upsc -c myups + 127.0.0.1 + ::1 + 192.168.1.2 + + + DIAGNOSTICS ----------- diff --git a/docs/man/upscli_connect.3 b/docs/man/upscli_connect.3 index 6500ac5..f696834 100644 --- a/docs/man/upscli_connect.3 +++ b/docs/man/upscli_connect.3 @@ -2,12 +2,12 @@ .\" Title: upscli_connect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_CONNECT" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_CONNECT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_disconnect.3 b/docs/man/upscli_disconnect.3 index 0d64bdd..b51af56 100644 --- a/docs/man/upscli_disconnect.3 +++ b/docs/man/upscli_disconnect.3 @@ -2,12 +2,12 @@ .\" Title: upscli_disconnect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_DISCONNECT" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_DISCONNECT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_fd.3 b/docs/man/upscli_fd.3 index 59da63e..4c22874 100644 --- a/docs/man/upscli_fd.3 +++ b/docs/man/upscli_fd.3 @@ -2,12 +2,12 @@ .\" Title: upscli_fd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_FD" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_FD" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_get.3 b/docs/man/upscli_get.3 index f9fe2b6..5fa3550 100644 --- a/docs/man/upscli_get.3 +++ b/docs/man/upscli_get.3 @@ -2,12 +2,12 @@ .\" Title: upscli_get .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_GET" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_GET" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_list_next.3 b/docs/man/upscli_list_next.3 index 40d36d6..028df71 100644 --- a/docs/man/upscli_list_next.3 +++ b/docs/man/upscli_list_next.3 @@ -2,12 +2,12 @@ .\" Title: upscli_list_next .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_LIST_NEXT" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_LIST_NEXT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_list_start.3 b/docs/man/upscli_list_start.3 index fcf87a7..9f7134b 100644 --- a/docs/man/upscli_list_start.3 +++ b/docs/man/upscli_list_start.3 @@ -2,12 +2,12 @@ .\" Title: upscli_list_start .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/31/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_LIST_START" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_LIST_START" "3" "05/31/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -98,6 +98,17 @@ LIST CMD .\} LIST ENUM .RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +LIST RANGE +.RE .SH "QUERY FORMATTING" .sp To see the list of variables on a UPS called \fIsu700\fR, the protocol command would be LIST VAR su700\&. To start that list with this function, you would populate query and numq as follows: diff --git a/docs/man/upscli_list_start.txt b/docs/man/upscli_list_start.txt index a017d9c..e041934 100644 --- a/docs/man/upscli_list_start.txt +++ b/docs/man/upscli_list_start.txt @@ -37,6 +37,7 @@ Some examples are: - LIST RW - LIST CMD - LIST ENUM + - LIST RANGE QUERY FORMATTING ---------------- diff --git a/docs/man/upscli_readline.3 b/docs/man/upscli_readline.3 index 6c619be..6f5be4a 100644 --- a/docs/man/upscli_readline.3 +++ b/docs/man/upscli_readline.3 @@ -2,12 +2,12 @@ .\" Title: upscli_readline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_READLINE" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_READLINE" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_sendline.3 b/docs/man/upscli_sendline.3 index 4f0559d..29d31db 100644 --- a/docs/man/upscli_sendline.3 +++ b/docs/man/upscli_sendline.3 @@ -2,12 +2,12 @@ .\" Title: upscli_sendline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SENDLINE" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SENDLINE" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitaddr.3 b/docs/man/upscli_splitaddr.3 index 940700b..17ed111 100644 --- a/docs/man/upscli_splitaddr.3 +++ b/docs/man/upscli_splitaddr.3 @@ -2,12 +2,12 @@ .\" Title: upscli_splitaddr .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SPLITADDR" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SPLITADDR" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitname.3 b/docs/man/upscli_splitname.3 index 45c544d..166dd0f 100644 --- a/docs/man/upscli_splitname.3 +++ b/docs/man/upscli_splitname.3 @@ -2,12 +2,12 @@ .\" Title: upscli_splitname .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SPLITNAME" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SPLITNAME" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_ssl.3 b/docs/man/upscli_ssl.3 index 76371e6..87da86c 100644 --- a/docs/man/upscli_ssl.3 +++ b/docs/man/upscli_ssl.3 @@ -2,12 +2,12 @@ .\" Title: upscli_ssl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SSL" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SSL" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_strerror.3 b/docs/man/upscli_strerror.3 index e6762c0..a5549ff 100644 --- a/docs/man/upscli_strerror.3 +++ b/docs/man/upscli_strerror.3 @@ -2,12 +2,12 @@ .\" Title: upscli_strerror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_STRERROR" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_STRERROR" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_upserror.3 b/docs/man/upscli_upserror.3 index 68eb5b3..4aebd4f 100644 --- a/docs/man/upscli_upserror.3 +++ b/docs/man/upscli_upserror.3 @@ -2,12 +2,12 @@ .\" Title: upscli_upserror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_UPSERROR" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_UPSERROR" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsclient.3 b/docs/man/upsclient.3 index 63c694c..00f57f3 100644 --- a/docs/man/upsclient.3 +++ b/docs/man/upsclient.3 @@ -2,12 +2,12 @@ .\" Title: upsclient .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLIENT" "3" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCLIENT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscmd.8 b/docs/man/upscmd.8 index e6ba464..1bcdded 100644 --- a/docs/man/upscmd.8 +++ b/docs/man/upscmd.8 @@ -2,12 +2,12 @@ .\" Title: upscmd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCMD" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCMD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscode2.8 b/docs/man/upscode2.8 index ca3559f..3cf38d9 100644 --- a/docs/man/upscode2.8 +++ b/docs/man/upscode2.8 @@ -2,12 +2,12 @@ .\" Title: upscode2 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCODE2" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSCODE2" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.8 b/docs/man/upsd.8 index 5b505ef..746253e 100644 --- a/docs/man/upsd.8 +++ b/docs/man/upsd.8 @@ -2,12 +2,12 @@ .\" Title: upsd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSD" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.conf.5 b/docs/man/upsd.conf.5 index 4f2d407..c3f95cb 100644 --- a/docs/man/upsd.conf.5 +++ b/docs/man/upsd.conf.5 @@ -2,12 +2,12 @@ .\" Title: upsd.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSD\&.CONF" "5" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSD\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.users.5 b/docs/man/upsd.users.5 index e2f9473..73fe1b5 100644 --- a/docs/man/upsd.users.5 +++ b/docs/man/upsd.users.5 @@ -2,12 +2,12 @@ .\" Title: upsd.users .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/25/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSD\&.USERS" "5" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSD\&.USERS" "5" "05/25/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -44,6 +44,7 @@ Here are some examples to get you started: [admin] password = mypass actions = set + actions = fsd instcmds = all .fi .if n \{\ @@ -95,7 +96,9 @@ Set the password for this user\&. .PP \fBactions\fR .RS 4 -Allow the user to do certain things with upsd\&. Valid actions are: +Allow the user to do certain things with upsd\&. To specify multiple actions, use multiple instances of the +\fBactions\fR +field\&. Valid actions are: .PP SET .RS 4 @@ -105,14 +108,16 @@ change the value of certain variables in the UPS FSD .RS 4 set the forced shutdown flag in the UPS\&. This is equivalent to an "on battery + low battery" situation for the purposes of monitoring\&. +.RE +.RE .sp The list of actions is expected to grow in the future\&. -.RE -.RE .PP \fBinstcmds\fR .RS 4 -Let a user initiate specific instant commands\&. Use "ALL" to grant all commands automatically\&. To specify multiple commands, use multiple instances of the instcmds field\&. For the full list of what your UPS supports, use "upscmd \-l"\&. +Let a user initiate specific instant commands\&. Use "ALL" to grant all commands automatically\&. To specify multiple commands, use multiple instances of the +\fBinstcmds\fR +field\&. For the full list of what your UPS supports, use "upscmd \-l"\&. .sp The cmdvartab diff --git a/docs/man/upsd.users.txt b/docs/man/upsd.users.txt index 457bc33..4f73ceb 100644 --- a/docs/man/upsd.users.txt +++ b/docs/man/upsd.users.txt @@ -22,6 +22,7 @@ Here are some examples to get you started: [admin] password = mypass actions = set + actions = fsd instcmds = all [pfy] @@ -46,22 +47,23 @@ Set the password for this user. *actions*:: -Allow the user to do certain things with upsd. -Valid actions are: +Allow the user to do certain things with upsd. To specify multiple +actions, use multiple instances of the *actions* field. Valid +actions are: SET;; change the value of certain variables in the UPS FSD;; set the forced shutdown flag in the UPS. This is equivalent to an "on battery + low battery" situation for the purposes of monitoring. -+ + The list of actions is expected to grow in the future. *instcmds*:: Let a user initiate specific instant commands. Use "ALL" to grant all commands automatically. To specify multiple commands, use multiple -instances of the instcmds field. For the full list of what your UPS +instances of the *instcmds* field. For the full list of what your UPS supports, use "upscmd -l". + The +cmdvartab+ file supplied with the distribution contains a list diff --git a/docs/man/upsdrvctl.8 b/docs/man/upsdrvctl.8 index 1cf796a..909d855 100644 --- a/docs/man/upsdrvctl.8 +++ b/docs/man/upsdrvctl.8 @@ -2,12 +2,12 @@ .\" Title: upsdrvctl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSDRVCTL" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSDRVCTL" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsimage.cgi.8 b/docs/man/upsimage.cgi.8 index f12a8e1..ab3f1ee 100644 --- a/docs/man/upsimage.cgi.8 +++ b/docs/man/upsimage.cgi.8 @@ -2,12 +2,12 @@ .\" Title: upsimage.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSIMAGE\&.CGI" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSIMAGE\&.CGI" "8" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upslog.8 b/docs/man/upslog.8 index 0907c79..2eb6121 100644 --- a/docs/man/upslog.8 +++ b/docs/man/upslog.8 @@ -2,12 +2,12 @@ .\" Title: upslog .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSLOG" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSLOG" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsmon.8 b/docs/man/upsmon.8 index 422f81e..08bf7aa 100644 --- a/docs/man/upsmon.8 +++ b/docs/man/upsmon.8 @@ -2,12 +2,12 @@ .\" Title: upsmon .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSMON" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSMON" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,12 +35,12 @@ upsmon \- UPS monitor and shutdown controller .sp \fBupsmon\fR \-c \fIcommand\fR .sp -\fBupsmon\fR [\-D] [\-p] [\-u \fIuser\fR] +\fBupsmon\fR [\-D] [\-K] [\-p] [\-u \fIuser\fR] .SH "DESCRIPTION" .sp \fBupsmon\fR is the client process that is responsible for the most important part of UPS monitoring\(emshutting down the system when the power goes out\&. It can call out to other helper programs for notification purposes during power events\&. .sp -upsmon can monitor multiple systems using a single process\&. Every UPS that is defined in the \fBupsmon.conf\fR(5) configuration file is assigned a power value and a type (slave or master)\&. +upsmon can monitor multiple systems using a single process\&. Every UPS that is defined in the \fBupsmon.conf\fR(5) configuration file is assigned a power value and a type (\fBslave\fR or \fBmaster\fR)\&. .SH "OPTIONS" .PP \fB\-h\fR diff --git a/docs/man/upsmon.conf.5 b/docs/man/upsmon.conf.5 index 0400f8a..f2079f3 100644 --- a/docs/man/upsmon.conf.5 +++ b/docs/man/upsmon.conf.5 @@ -2,12 +2,12 @@ .\" Title: upsmon.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSMON\&.CONF" "5" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSMON\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsmon.txt b/docs/man/upsmon.txt index 025c6e4..077144d 100644 --- a/docs/man/upsmon.txt +++ b/docs/man/upsmon.txt @@ -13,7 +13,7 @@ SYNOPSIS *upsmon* -c 'command' -*upsmon* [-D] [-p] [-u 'user'] +*upsmon* [-D] [-K] [-p] [-u 'user'] DESCRIPTION ----------- @@ -25,7 +25,7 @@ power events. upsmon can monitor multiple systems using a single process. Every UPS that is defined in the linkman:upsmon.conf[5] configuration file is assigned -a power value and a type (slave or master). +a power value and a type (*slave* or *master*). OPTIONS ------- diff --git a/docs/man/upsrw.8 b/docs/man/upsrw.8 index e6739ec..6a885bc 100644 --- a/docs/man/upsrw.8 +++ b/docs/man/upsrw.8 @@ -2,12 +2,12 @@ .\" Title: upsrw .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/24/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSRW" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSRW" "8" "05/24/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -64,7 +64,7 @@ Specify the variable to be changed inside the UPS\&. For unattended mode such as .sp Without this argument, upsrw will just display the list of the variables and their possible values\&. .sp -Some variables are strings, and can be set to any value within the length limit\&. Others are enumerated types and can only be set to one of those values\&. Refer to the list to know what\(cqs available in your hardware\&. +Some variables are strings, and can be set to any value within the length limit\&. Others are enumerated types and can only be set to one of those values\&. Others may be within an allowed range of values\&. Refer to the list to know what\(cqs available in your hardware\&. .RE .PP \fB\-u\fR \fIusername\fR diff --git a/docs/man/upsrw.txt b/docs/man/upsrw.txt index c58b040..fd4b49c 100644 --- a/docs/man/upsrw.txt +++ b/docs/man/upsrw.txt @@ -45,8 +45,8 @@ and their possible values. + Some variables are strings, and can be set to any value within the length limit. Others are enumerated types and can only be set to one of -those values. Refer to the list to know what's available in your -hardware. +those values. Others may be within an allowed range of values. Refer to +the list to know what's available in your hardware. *-u* 'username':: Set the NUT username for the connection to the server. This is optional, diff --git a/docs/man/upssched.8 b/docs/man/upssched.8 index 6f2102b..0695d66 100644 --- a/docs/man/upssched.8 +++ b/docs/man/upssched.8 @@ -2,12 +2,12 @@ .\" Title: upssched .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSCHED" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSCHED" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.conf.5 b/docs/man/upssched.conf.5 index 48b74ba..7ed2fb5 100644 --- a/docs/man/upssched.conf.5 +++ b/docs/man/upssched.conf.5 @@ -2,12 +2,12 @@ .\" Title: upssched.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSCHED\&.CONF" "5" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSCHED\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.cgi.8 b/docs/man/upsset.cgi.8 index 3c6b568..d89ece6 100644 --- a/docs/man/upsset.cgi.8 +++ b/docs/man/upsset.cgi.8 @@ -2,12 +2,12 @@ .\" Title: upsset.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSET\&.CGI" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSET\&.CGI" "8" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.conf.5 b/docs/man/upsset.conf.5 index 1f1994e..931c821 100644 --- a/docs/man/upsset.conf.5 +++ b/docs/man/upsset.conf.5 @@ -2,12 +2,12 @@ .\" Title: upsset.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSET\&.CONF" "5" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSET\&.CONF" "5" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.8 index 3c6f637..7ffbc0e 100644 --- a/docs/man/upsstats.cgi.8 +++ b/docs/man/upsstats.cgi.8 @@ -2,12 +2,12 @@ .\" Title: upsstats.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSTATS\&.CGI" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSTATS\&.CGI" "8" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.html.5 b/docs/man/upsstats.html.5 index bd23dd9..b305592 100644 --- a/docs/man/upsstats.html.5 +++ b/docs/man/upsstats.html.5 @@ -2,12 +2,12 @@ .\" Title: upsstats.html .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/22/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSTATS\&.HTML" "5" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "UPSSTATS\&.HTML" "5" "05/22/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/usbhid-ups.8 b/docs/man/usbhid-ups.8 index 9dc441d..207bfb1 100644 --- a/docs/man/usbhid-ups.8 +++ b/docs/man/usbhid-ups.8 @@ -2,12 +2,12 @@ .\" Title: usbhid-ups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "USBHID\-UPS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "USBHID\-UPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/victronups.8 b/docs/man/victronups.8 index a1210e5..412f19a 100644 --- a/docs/man/victronups.8 +++ b/docs/man/victronups.8 @@ -2,12 +2,12 @@ .\" Title: victronups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 10/09/2011 +.\" Date: 05/21/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "VICTRONUPS" "8" "10/09/2011" "Network UPS Tools" "NUT Manual" +.TH "VICTRONUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/net-protocol.txt b/docs/net-protocol.txt index 1c52d62..650effa 100644 --- a/docs/net-protocol.txt +++ b/docs/net-protocol.txt @@ -28,6 +28,24 @@ Embedded quotes are escaped with backslashes. Embedded backslashes are also escaped by representing them as \\. This protocol is intended to be interpreted with parseconf (NUT parser) or something similar. +Revision history +---------------- + +Here's a table to present the various changes that happened to the +NUT network protocol, over the time: + +[options="header",style="asciidoc",cols="^.^,^.^,<"] +|=============================================================================== +|Protocol version |NUT version |Description +|1.0 |< 1.5.0 |Original protocol (legacy version) +|1.1 |>= 1.5.0 |Original protocol (without old commands) +.2+|1.2 .2+|>= 2.6.4 |Add "LIST CLIENTS" and "NETVER" commands + |Add ranges of values for writable variables +|=============================================================================== + +NOTE: any new version of the protocol implies an update of NUT_NETVERSION +in *configure.in*. + GET --- @@ -106,8 +124,10 @@ Response: - 'RW': this variable may be set to another value with SET - 'ENUM': an enumerated type, which supports a few specific values - 'STRING:n': this is a string of maximum length n +- 'RANGE': this is an integer, comprised in the range (see LIST RANGE) -ENUM and STRING are usually associated with RW, but not always. +ENUM, STRING and RANGE are usually associated with RW, but not always. +The default , when omitted, is integer. This replaces the old "VARTYPE" command. @@ -286,6 +306,47 @@ This replaces the old "ENUM" command. NOTE: this does not support the old "SELECTED" notation. You must request the current value separately. +RANGE +~~~~~ + +Form: + + LIST RANGE + LIST RANGE su700 input.transfer.low + +Response: + + BEGIN LIST RANGE + RANGE "" "" + ... + END LIST RANGE + + BEGIN LIST RANGE su700 input.transfer.low + RANGE su700 input.transfer.low "90" "100" + RANGE su700 input.transfer.low "102" "105" + ... + END LIST RANGE su700 input.transfer.low + +CLIENT +~~~~~~ + +Form: + + LIST CLIENT + LIST CLIENT ups1 + +Response: + + BEGIN LIST CLIENT + CLIENT + ... + END LIST CLIENT + + BEGIN LIST CLIENT ups1 + CLIENT ups1 ::1 + CLIENT ups1 192.168.1.2 + END LIST CLIENT ups1 + SET --- @@ -426,15 +487,16 @@ Response: This tells upsd to switch to TLS mode internally, so all future communications will be encrypted. You must also change to TLS mode in -the client after receiving the OK, or the connection will be useless. +the client after receiving the OK, or the connection will be useless. Other commands -------------- - HELP: lists the commands supported by this server - VER: shows the version of the server currently in use +- NETVER: shows the version of the network protocol currently in use -These two are not intended to be used directly by programs. Humans can +These three are not intended to be used directly by programs. Humans can make use of this program by using telnet or netcat. If you use telnet, make sure you don't have it set to negotiate extra options. upsd doesn't speak telnet and will probably misunderstand your first diff --git a/docs/new-drivers.txt b/docs/new-drivers.txt index 2ebc5de..40a887f 100644 --- a/docs/new-drivers.txt +++ b/docs/new-drivers.txt @@ -208,15 +208,25 @@ Possible values for status_set: OVER - UPS is overloaded TRIM - UPS is trimming incoming voltage (called "buck" in some hardware) BOOST - UPS is boosting incoming voltage + FSD - Forced Shutdown (restricted use, see the note below) Anything else will not be recognized by the usual clients. Coordinate with the nut-upsdev list before creating something new, since there will be duplication and ugliness otherwise. -NOTE: upsd injects "FSD" by itself following that command by a master -upsmon process. Drivers must not set that value. +[NOTE] +================================================================================ -NOTE: the OL and OB flags are an indication of the input line status only. +- upsd injects "FSD" by itself following that command by a master upsmon +process. Drivers must not set that value, apart from specific cases (see +below). + +- As an exception, drivers may set "FSD" when an imminent shutdown has been +detected. In this case, the "on battery + low battery" condition should not be +met. Otherwise, setting status to "OB LB" should be prefered. + +- the OL and OB flags are an indication of the input line status only. +================================================================================ UPS alarms ---------- @@ -602,6 +612,15 @@ enumerated. You should add each one to make it available to the client: dstate_addenum("input.transfer.low", "99"); dstate_addenum("input.transfer.low", "105"); +Range values +------------ + +If you have a variable that support values comprised in one or more ranges, +you should add each one to make it available to the client: + + dstate_addrange("input.transfer.low", 90, 95); + dstate_addrange("input.transfer.low", 100, 105); + Writable strings ---------------- diff --git a/docs/nut-names.txt b/docs/nut-names.txt index 147e78c..e2563ab 100644 --- a/docs/nut-names.txt +++ b/docs/nut-names.txt @@ -23,17 +23,22 @@ Variables device: General unit information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -NOTE: these data will be redundant with some ups.* information +NOTE: some of these data will be redundant with ups.* information during a transition period. The ups.* data will then be removed. [options="header"] -|======================================================================== -| Name | Description | Example value -| device.model | Device model | BladeUPS -| device.mfr | Device manufacturer | Eaton -| device.serial | Device serial number (opaque string) | WS9643050926 -| device.type | Device type (ups, pdu, scd) | ups -|======================================================================== +|==================================================================================== +| Name | Description | Example value +| device.model | Device model | BladeUPS +| device.mfr | Device manufacturer | Eaton +| device.serial | Device serial number (opaque string) | WS9643050926 +| device.type | Device type (ups, pdu, scd, psu) | ups +| device.description | Device description (opaque string) | Some ups +| device.contact | Device administrator name (opaque string) | John Doe +| device.location | Device physical location (opaque string) | 1rst floor +| device.part | Device part number (opaque string) | 123456789 +| device.macaddr | Physical network address of the device | 68:b5:99:f5:89:27 +|===================================================================================== ups: General unit information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -110,6 +115,10 @@ ups: General unit information (enabled or disabled) | yes |=============================================================================== +NOTE: When present, the value of *ups.start.auto* has an impact on shutdown.* +commands. For the sake of coherence, shutdown commands will set *ups.start.auto* +to the right value before issuing the command. Ie, shutdown.stayoff will first +set *ups.start.auto* to *no*, while shutdown.return will set it to *yes*. input: Incoming line/power information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -240,7 +249,7 @@ Valid with/without context (ie. per phase or aggregated/averaged) | current | Current (A) | current.maximum | Maximum seen current (A) | current.minimum | Minimum seen current (A) -| peakcurrent | Peak current +| current.peak | Peak current | voltage | Voltage (V) | voltage.nominal | Nominal voltage (V) | voltage.maximum | Maximum seen voltage (V) @@ -295,36 +304,40 @@ battery: Any battery details [options="header"] |=============================================================================== -| Name | Description | Example value -| battery.charge | Battery charge (percent) | 100.0 +| Name | Description | Example value +| battery.charge | Battery charge (percent) | 100.0 | battery.charge.low | Remaining battery level when - UPS switches to LB (percent) | 20 + UPS switches to LB (percent) | 20 | battery.charge.restart | Minimum battery level for - UPS restart after power-off | 20 + UPS restart after power-off | 20 | battery.charge.warning | Battery level when UPS switches - to "Warning" state (percent) | 50 -| battery.voltage | Battery voltage (V) | 24.84 -| battery.capacity | Battery capacity (Ah) | 7.2 -| battery.current | Battery current (A) | 1.19 -| battery.temperature | Battery temperature (degrees C) | 050.7 -| battery.voltage.nominal | Nominal battery voltage (V) | 024 -| battery.runtime | Battery runtime (seconds) - Remaining battery runtime | 1080 -| battery.runtime.low | when UPS switches to LB - (seconds) | 180 -| battery.alarm.threshold | Battery alarm threshold | 0 (immediate) -| battery.date | Battery change date (opaque - string) | 11/14/00 + to "Warning" state (percent) | 50 +| battery.voltage | Battery voltage (V) | 24.84 +| battery.voltage.nominal | Nominal battery voltage (V) | 024 +| battery.voltage.low | Minimum battery voltage, that + triggers FSD status | 21,52 +| battery.voltage.high | Maximum battery voltage + (Ie battery.charge = 100) | 26,9 +| battery.capacity | Battery capacity (Ah) | 7.2 +| battery.current | Battery current (A) | 1.19 +| battery.temperature | Battery temperature (degrees C) | 050.7 +| battery.runtime | Battery runtime (seconds) | 1080 +| battery.runtime.low | Remaining battery runtime when + UPS switches to LB (seconds) | 180 +| battery.runtime.restart | Minimum battery runtime for UPS + restart after power-off (seconds) | 120 +| battery.alarm.threshold | Battery alarm threshold | 0 (immediate) +| battery.date | Battery change date (opaque string) | 11/14/00 | battery.mfr.date | Battery manufacturing date - (opaque string) | 2005/04/02 -| battery.packs | Number of battery packs | 001 -| battery.packs.bad | Number of bad battery packs | 000 + (opaque string) | 2005/04/02 +| battery.packs | Number of battery packs | 001 +| battery.packs.bad | Number of bad battery packs | 000 | battery.type | Battery chemistry (opaque - string) | PbAc + string) | PbAc | battery.protection | Prevent deep discharge of - battery | yes + battery | yes | battery.energysave | Switch off when running on - battery and no/low load | no + battery and no/low load | no |=============================================================================== @@ -385,13 +398,19 @@ represent the whole set of outlets of the device. | outlet.n.autoswitch.charge.low | Remaining battery level to power off this outlet (percent) | 80 +| outlet.n.battery.charge.low | Remaining battery level to + power off this outlet + (percent) | 80 | outlet.n.delay.shutdown | Interval to wait before shutting down this outlet (seconds) | 180 - | outlet.n.delay.start | Interval to wait before restarting this outlet - (seconds) | 120 + (seconds) | 120 +| outlet.n.timer.shutdown | Time before the outlet load + will be shutdown (seconds) | 20 +| outlet.n.timer.start | Time before the outlet load + will be started (seconds) | 30 | outlet.n.current | Current (A) | 0.19 | outlet.n.current.maximum | Maximum seen current (A) | 0.56 | outlet.n.realpower | Current value of real @@ -406,7 +425,6 @@ represent the whole set of outlets of the device. | outlet.n.power | Apparent power (VA) | 46 |=============================================================================== - driver: Internal driver information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -442,6 +460,8 @@ Instant commands | Name | Description | load.off | Turn off the load immediately | load.on | Turn on the load immediately +| load.off.delay | Turn off the load possibly after a delay +| load.on.delay | Turn on the load possibly after a delay | shutdown.return | Turn off the load possibly after a delay and return when power is back | shutdown.stayoff | Turn off the load possibly after a delay @@ -468,4 +488,9 @@ Instant commands | beeper.disable | Disable UPS beeper/buzzer | beeper.mute | Temporarily mute UPS beeper/buzzer | beeper.toggle | Toggle UPS beeper/buzzer +| outlet.n.shutdown.return | Turn off the outlet possibly after a delay + and return when power is back +| outlet.n.load.off | Turn off the outlet immediately +| outlet.n.load.on | Turn on the outlet immediately +| outlet.n.load.cycle | Power cycle the outlet immediately |======================================================================== diff --git a/docs/security.txt b/docs/security.txt index 1a83c09..04e795f 100644 --- a/docs/security.txt +++ b/docs/security.txt @@ -126,12 +126,15 @@ Firewall NUT has its own official IANA port: 3493/tcp. -The `upsmon` process on slave systems (as well as `upsc`) connects to the -`upsd` process on the master system via this TCP port. The `upsd` process does -not connect out. +The `upsmon` process on slave systems, as well as any other NUT client (such +as `upsc`, `upscmd`, `upsrw`, NUT-Monitor, ...) connects to the `upsd` process +on the master system via this TCP port. The `upsd` process does not connect out. You should use this to restrict network access. +[[UFW]] + +include::../scripts/ufw/README[] [[TCP_Wrappers]] TCP Wrappers diff --git a/docs/sock-protocol.txt b/docs/sock-protocol.txt index 7f25d9d..944d3ef 100644 --- a/docs/sock-protocol.txt +++ b/docs/sock-protocol.txt @@ -54,6 +54,20 @@ DELENUM DELENUM input.transfer.low "98" +ADDRANGE +~~~~~~~~ + + ADDRANGE + + ADDRANGE input.transfer.low 95 100 + +DELRANGE +~~~~~~~~ + + DELRANGE + + DELRANGE input.transfer.low 95 100 + SETAUX ~~~~~~ diff --git a/docs/stable-hcl.txt b/docs/stable-hcl.txt index 0599d3c..f23827c 100644 --- a/docs/stable-hcl.txt +++ b/docs/stable-hcl.txt @@ -150,20 +150,21 @@ The form of the URL is the following: http://www.networkupstools.org/stable-hcl.html?= -.Possible values for and -[cols="^,^",options="header"] -|========================================================================== -| | -| support-level | a number from '1' to '5' -.3+^.^| device-type | - 'ups' for uninterruptible power supply - | - 'pdu' for power distribution unit - | - 'scd' for solar controller device -| manufacturer | a manufacturer name from the selection list -| model | a model name from the selection list -.3+^.^| connection | 'USB' - | 'Serial' - | 'Network' -|========================================================================== +.Possible values +[options="header,autowidth",style="asciidoc",cols="<,<"] +|=================================================================== +| | +|support-level |a number from '1' to '5' +|device-type |- 'ups' for uninterruptible power supply + - 'pdu' for power distribution unit + - 'psu' for power supply unit + - 'scd' for solar controller device +|manufacturer |a manufacturer name from the selection list +|model |a model name from the selection list +|connection |- 'USB' + - 'Serial' + - 'Network' +|=================================================================== You can finally combine multiple filters, using ampersand (*&*). diff --git a/docs/website/Makefile.in b/docs/website/Makefile.in index 46688c9..fc22885 100644 --- a/docs/website/Makefile.in +++ b/docs/website/Makefile.in @@ -148,6 +148,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -161,6 +162,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -168,6 +170,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/docs/website/news.txt b/docs/website/news.txt index a505f08..e8f4f9e 100644 --- a/docs/website/news.txt +++ b/docs/website/news.txt @@ -1,3 +1,8 @@ +- May 31, 2012: 2.6.4 released, including link:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2944[CVE-2012-2944] fix +- May 10, 2012: link:http://wmnut.mgeops.org[WMNut] 0.63 released +- May 9, 2012: Official publication of Riello communication protocols +- May 2, 2012: link:download.html#_binary_packages[Beta NUT 2.6.3-3 package for Windows released] +- April 26, 2012: link:download.html#_binary_packages[Beta NUT 2.6.3-1 package for Windows released] - January 4, 2012: 2.6.3 released - October 31, 2011: link:download.html#_java_packages[jNUT and jNutWebAPI 0.2-SNAPSHOT released] - September 15, 2011: 2.6.2 released diff --git a/docs/website/projects.txt b/docs/website/projects.txt index 2032098..5968036 100644 --- a/docs/website/projects.txt +++ b/docs/website/projects.txt @@ -192,6 +192,12 @@ link:http://www.readynas.com/?page_id=92[Netgear ReadyNAS] The RAIDiator firmware for the ReadyNAS product line includes NUT to either monitor a local USB UPS, or to connect as a slave to a NUT server. +link:http://www.thecus.com[Thecus NAS] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Thecus NAS firmware includes NUT for UPS support. The +link:http://www.thecus.com/Downloads/Compatible_List/UPS_List_v1.0_ALL.pdf[following list of devices] is known to be supported. + link:http://www.webbastards.com/projects/[lcd-nut] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/website/ups-protocols.txt b/docs/website/ups-protocols.txt index 8067418..fd20cc6 100644 --- a/docs/website/ups-protocols.txt +++ b/docs/website/ups-protocols.txt @@ -71,6 +71,15 @@ PowerKinetics - PowerKinetics MiniCOL protocol - courtesy of PowerKinetics technical support +Riello +~~~~~~ + +All these document are officially provided by Riello + +- link:ups-protocols/riello/PSGPSER-0104.pdf[GPSER protocol] +- link:ups-protocols/riello/PSSENTR-0100.pdf[Sentry HPS / HTS protocol] +- link:ups-protocols/riello/Riello_UPS_protocol_list.pdf[UPS protocol list] + Standard protocols ~~~~~~~~~~~~~~~~~~ diff --git a/drivers/Makefile.in b/drivers/Makefile.in index 20f18c3..8b2c02e 100644 --- a/drivers/Makefile.in +++ b/drivers/Makefile.in @@ -512,6 +512,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -525,6 +526,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -532,6 +534,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/drivers/apc-mib.c b/drivers/apc-mib.c index 6b44fd6..368504c 100644 --- a/drivers/apc-mib.c +++ b/drivers/apc-mib.c @@ -31,8 +31,15 @@ * * examples found on the Net and other sources: * 'enterprises.apc.products.system.smartUPS.smartUPS700' + * - from fence agents * '.1.3.6.1.4.1.318.1.3.4.5': ApcRPDU, * '.1.3.6.1.4.1.318.1.3.4.4': ApcMSP + * - from Bill Seligman + * .1.3.6.1.4.1.318.1.3.2.11 + * .1.3.6.1.4.1.318.1.3.2.12 + * .1.3.6.1.4.1.318.1.3.27 + * .1.3.6.1.4.1.318.1.3.2.7 + * .1.3.6.1.4.1.318.1.3.2.8 */ /* TODO: find the right sysOID for this MIB diff --git a/drivers/apcsmart.c b/drivers/apcsmart.c index 93d46ff..1f5ab12 100644 --- a/drivers/apcsmart.c +++ b/drivers/apcsmart.c @@ -45,6 +45,81 @@ upsdrv_info_t upsdrv_info = { static int ups_status = 0; +/* + * Aix compatible names + */ +#if defined(VWERSE) && !defined(VWERASE) +#define VWERASE VWERSE +#endif /* VWERSE && !VWERASE */ + +#if defined(VDISCRD) && !defined(VDISCARD) +#define VDISCARD VDISCRD +#endif /* VDISCRD && !VDISCARD */ + + +#ifndef CTRL +#define CONTROL(x) (x&037) +#else +#define CONTROL CTRL +#endif + +/* + * Allow use of system default characters if defined and reasonable. + * These are based on the BSD ttydefaults.h + */ +#ifndef CDISCARD +#define CDISCARD CONTROL('O') +#endif +#ifndef CDSUSP +#define CDSUSP CONTROL('Y') +#endif +#ifndef CEOF +#define CEOF CONTROL('D') +#endif +#ifndef CEOL +#define CEOL 0xff /* was 0 */ +#endif +#ifndef CERASE +#define CERASE 0177 +#endif +#ifndef CINTR +#define CINTR CONTROL('C') +#endif +#ifndef CKILL +#define CKILL CONTROL('U') /* was '@' */ +#endif +#ifndef CLNEXT +#define CLNEXT CONTROL('V') +#endif +#ifndef CMIN +#define CMIN CEOF +#endif +#ifndef CQUIT +#define CQUIT CONTROL('\\') +#endif +#ifndef CRPRNT +#define CRPRNT CONTROL('R') +#endif +#ifndef CREPRINT +#define CREPRINT CRPRNT +#endif +#ifndef CSTART +#define CSTART CONTROL('Q') +#endif +#ifndef CSTOP +#define CSTOP CONTROL('S') +#endif +#ifndef CSUSP +#define CSUSP CONTROL('Z') +#endif +#ifndef CTIME +#define CTIME CEOL +#endif +#ifndef CWERASE +#define CWERASE CONTROL('W') +#endif + + /* some forwards */ static int sdcmd_S(const void *); @@ -188,7 +263,10 @@ static void apc_ser_set(void) tio.c_cflag |= (CS8 | CLOCAL | CREAD); tio.c_lflag |= ICANON; - tio.c_lflag &= ~ISIG; +#ifdef NOKERNINFO + tio.c_lflag |= NOKERNINFO; +#endif + tio.c_lflag &= ~(ISIG | IEXTEN); tio.c_iflag |= (IGNCR | IGNPAR); tio.c_iflag &= ~(IXON | IXOFF); @@ -220,11 +298,92 @@ static void apc_ser_set(void) if (tcsetattr(upsfd, TCSANOW, &tio)) fatal_with_errno(EXIT_FAILURE, "tcsetattr(%s)", device_path); + /* clear status flags so that they don't affect our binary compare */ +#ifdef PENDIN + tio.c_lflag &= ~PENDIN; +#endif +#ifdef FLUSHO + tio.c_lflag &= ~FLUSHO; +#endif + memset(&tio_chk, 0, sizeof(tio_chk)); if (tcgetattr(upsfd, &tio_chk)) fatal_with_errno(EXIT_FAILURE, "tcgetattr(%s)", device_path); - if (memcmp(&tio_chk, &tio, sizeof(tio))) - fatalx(EXIT_FAILURE, "unable to set the required attributes (%s)", device_path); + + /* clear status flags so that they don't affect our binary compare */ +#ifdef PENDIN + tio_chk.c_lflag &= ~PENDIN; +#endif +#ifdef FLUSHO + tio_chk.c_lflag &= ~FLUSHO; +#endif + + if (memcmp(&tio_chk, &tio, sizeof(tio))) { + struct cchar { + const char *name; + int sub; + u_char def; + }; + const struct cchar cchars1[] = { +#ifdef VDISCARD + { "discard", VDISCARD, CDISCARD }, +#endif +#ifdef VDSUSP + { "dsusp", VDSUSP, CDSUSP }, +#endif + { "eof", VEOF, CEOF }, + { "eol", VEOL, CEOL }, + { "eol2", VEOL2, CEOL }, + { "erase", VERASE, CERASE }, +#ifdef VINTR + { "intr", VINTR, CINTR }, +#endif + { "kill", VKILL, CKILL }, + { "lnext", VLNEXT, CLNEXT }, + { "min", VMIN, CMIN }, + { "quit", VQUIT, CQUIT }, +#ifdef VREPRINT + { "reprint", VREPRINT, CREPRINT }, +#endif + { "start", VSTART, CSTART }, +#ifdef VSTATUS + { "status", VSTATUS, CSTATUS }, +#endif + { "stop", VSTOP, CSTOP }, + { "susp", VSUSP, CSUSP }, + { "time", VTIME, CTIME }, + { "werase", VWERASE, CWERASE }, + { .name = NULL }, + }; + const struct cchar *cp; + struct termios *tp; + + upslogx(LOG_NOTICE, "%s: device reports different attributes than what were set", device_path); + + /* + * According to the manual the most common problem is + * mis-matched combinations of input and output baud rates. If + * the combination is not supported then neither are changed. + * This should not be a problem here since we set them both to + * the same extremely common rate of 2400. + */ + + tp = &tio; + upsdebugx(1, "tcsetattr(): gfmt1:cflag=%x:iflag=%x:lflag=%x:oflag=%x:", + (unsigned int) tp->c_cflag, (unsigned int) tp->c_iflag, + (unsigned int) tp->c_lflag, (unsigned int) tp->c_oflag); + for (cp = cchars1; cp->name; ++cp) + upsdebugx(1, "\t%s=%x:", cp->name, tp->c_cc[cp->sub]); + upsdebugx(1, "\tispeed=%d:ospeed=%d", (int) cfgetispeed(tp), (int) cfgetospeed(tp)); + + tp = &tio_chk; + upsdebugx(1, "tcgetattr(): gfmt1:cflag=%x:iflag=%x:lflag=%x:oflag=%x:", + (unsigned int) tp->c_cflag, (unsigned int) tp->c_iflag, + (unsigned int) tp->c_lflag, (unsigned int) tp->c_oflag); + for (cp = cchars1; cp->name; ++cp) + upsdebugx(1, "\t%s=%x:", cp->name, tp->c_cc[cp->sub]); + upsdebugx(1, "\tispeed=%d:ospeed=%d", (int) cfgetispeed(tp), (int) cfgetospeed(tp)); + } cable = getval("cable"); if (cable && !strcasecmp(cable, ALT_CABLE_1)) { @@ -464,7 +623,8 @@ static int apc_write_long(const char *code) return -1; } - return ser_send_pace(upsfd, 50000, "%s", code + 1); + ret = ser_send_pace(upsfd, 50000, "%s", code + 1); + return ret < 0 ? ret : ret + 1; } static int apc_write_rep(unsigned char code) @@ -1747,9 +1907,9 @@ static int setvar_string(apc_vartab_t *vt, const char *val) *ptr++ = '\015'; /* pad with CRs */ *ptr = 0; - ret = apc_write_long(ptr); + ret = apc_write_long(temp); - if ((size_t)ret != strlen(ptr)) { + if (ret != APC_STRLEN + 1) { upslog_with_errno(LOG_ERR, "setvar_string: apc_write_long failed"); return STAT_SET_FAILED; } diff --git a/drivers/apcsmart.h b/drivers/apcsmart.h index e10c5fe..012634d 100644 --- a/drivers/apcsmart.h +++ b/drivers/apcsmart.h @@ -24,7 +24,7 @@ #define __apcsmart_h__ #define DRIVER_NAME "APC Smart protocol driver" -#define DRIVER_VERSION "3.0" +#define DRIVER_VERSION "3.04" #define ALT_CABLE_1 "940-0095B" @@ -115,14 +115,14 @@ /* status bits */ -#define APC_STAT_CAL 0x01 /* calibration */ -#define APC_STAT_TRIM 0x02 /* SmartTrim */ -#define APC_STAT_BOOST 0x04 /* SmartBoost */ -#define APC_STAT_OL 0x08 /* on line */ -#define APC_STAT_OB 0x10 /* on battery */ -#define APC_STAT_OVER 0x20 /* overload */ -#define APC_STAT_LB 0x40 /* low battery */ -#define APC_STAT_RB 0x80 /* replace battery */ +#define APC_STAT_CAL (1 << 0) /* calibration */ +#define APC_STAT_TRIM (1 << 1) /* SmartTrim */ +#define APC_STAT_BOOST (1 << 2) /* SmartBoost */ +#define APC_STAT_OL (1 << 3) /* on line */ +#define APC_STAT_OB (1 << 4) /* on battery */ +#define APC_STAT_OVER (1 << 5) /* overload */ +#define APC_STAT_LB (1 << 6) /* low battery */ +#define APC_STAT_RB (1 << 7) /* replace battery */ /* * serial protocol: special commands - initialization and such diff --git a/drivers/bcmxcp.c b/drivers/bcmxcp.c index 1bc8b78..2e5f18f 100644 --- a/drivers/bcmxcp.c +++ b/drivers/bcmxcp.c @@ -6,8 +6,10 @@ * emes -at- geomer.de * * All rights reserved.* - Copyright (C) 2004 Kjell Claesson - and Tore Ørpetveit + Copyright (C) + 2004 Kjell Claesson + 2004 Tore Ørpetveit + 2011 - 2012 Arnaud Quette Thanks to Tore Ørpetveit that sent me the manuals for bcm/xcp. @@ -124,7 +126,7 @@ TODO List: #include "bcmxcp.h" #define DRIVER_NAME "BCMXCP UPS driver" -#define DRIVER_VERSION "0.25" +#define DRIVER_VERSION "0.26" #define MAX_NUT_NAME_LENGTH 128 #define NUT_OUTLET_POSITION 7 @@ -157,6 +159,7 @@ static int init_outlet(unsigned char len); static int instcmd(const char *cmdname, const char *extra); static int setvar (const char *varname, const char *val); +static const char *nut_find_infoval(info_lkp_t *xcp2info, const double value); const char *FreqTol[3] = {"+/-2%", "+/-5%", "+/-7"}; const char *ABMStatus[4] = {"Charging", "Discharging", "Floating", "Resting"}; @@ -166,6 +169,32 @@ int nphases = 0; int outlet_block_len = 0; const char *cpu_name[5] = {"Cont:", "Inve:", "Rect:", "Netw:", "Disp:"}; + + +/* Battery test results */ +info_lkp_t batt_test_info[] = { + { 0, "No test initiated", NULL }, + { 1, "In progress", NULL }, + { 2, "Done and passed", NULL }, + { 3, "Aborted", NULL }, + { 4, "Done and error", NULL }, + { 5, "Test scheduled", NULL }, + /* Not sure about the meaning of the below ones! */ + { 6, NULL, NULL }, /* The string was present but it has now been removed */ + { 7, NULL, NULL }, /* The string was not installed at the last power up */ + { 0, NULL, NULL } +}; + + +/* allocate storage for shared variables (extern in bcmxcp.h) */ +BCMXCP_METER_MAP_ENTRY_t + bcmxcp_meter_map[BCMXCP_METER_MAP_MAX]; +BCMXCP_ALARM_MAP_ENTRY_t + bcmxcp_alarm_map[BCMXCP_ALARM_MAP_MAX]; +BCMXCP_STATUS_t + bcmxcp_status; + + /* get_word function from nut driver metasys.c */ int get_word(const unsigned char *buffer) /* return an integer reading a word in the supplied buffer */ { @@ -583,7 +612,12 @@ void init_alarm_map() bcmxcp_alarm_map[BCMXCP_ALARM_CHARGER_ON_COMMAND].alarm_desc = "CHARGER_ON_COMMAND"; bcmxcp_alarm_map[BCMXCP_ALARM_CHARGER_OFF_COMMAND].alarm_desc = "CHARGER_OFF_COMMAND"; bcmxcp_alarm_map[BCMXCP_ALARM_UPS_NORMAL].alarm_desc = "UPS_NORMAL"; + bcmxcp_alarm_map[BCMXCP_ALARM_INVERTER_PHASE_ROTATION].alarm_desc = "INVERTER_PHASE_ROTATION"; + bcmxcp_alarm_map[BCMXCP_ALARM_UPS_OFF].alarm_desc = "UPS_OFF"; bcmxcp_alarm_map[BCMXCP_ALARM_EXTERNAL_COMMUNICATION_FAILURE].alarm_desc = "EXTERNAL_COMMUNICATION_FAILURE"; + bcmxcp_alarm_map[BCMXCP_ALARM_BATTERY_TEST_INPROGRESS].alarm_desc = "BATTERY_TEST_INPROGRESS"; + bcmxcp_alarm_map[BCMXCP_ALARM_SYSTEM_TEST_INPROGRESS].alarm_desc = "SYSTEM_TEST_INPROGRESS"; + bcmxcp_alarm_map[BCMXCP_ALARM_BATTERY_TEST_ABORTED].alarm_desc = "BATTERY_TEST_ABORTED"; } @@ -936,7 +970,7 @@ void init_config(void) int voltage = 0, res, len; char sValue[17]; - res = command_read_sequence(PW_CONFIG_BLOC_REQ, answer); + res = command_read_sequence(PW_CONFIG_BLOCK_REQ, answer); if (res <= 0) fatal_with_errno(EXIT_FAILURE, "Could not communicate with the ups"); @@ -1104,12 +1138,12 @@ void upsdrv_initinfo(void) dstate_setinfo("ups.firmware", "%s", pTmp); - free(pTmp); - /* Increment index to point at end of CPU bytes. */ iIndex += len * 2; } + free(pTmp); + /* Get rating in kVA, if present */ if ((iRating = answer[iIndex++]) > 0) iRating *= 1000; @@ -1244,6 +1278,8 @@ void upsdrv_updateinfo(void) char sValue[128]; int iIndex, res; float output, max_output, fValue = 0.0f; + int batt_status = 0; + const char *nutvalue; /* Get info from UPS */ res = command_read_sequence(PW_METER_BLOCK_REQ, answer); @@ -1332,6 +1368,14 @@ void upsdrv_updateinfo(void) if (iIndex == BCMXCP_ALARM_BATTERY_LOW) { bcmxcp_status.alarm_low_battery = 1; } + + if (iIndex == BCMXCP_ALARM_BATTERY_TEST_FAILED) { + bcmxcp_status.alarm_replace_battery = 1; + } + + if (iIndex == BCMXCP_ALARM_BATTERY_NEEDS_SERVICE) { + bcmxcp_status.alarm_replace_battery = 1; + } } } } @@ -1404,10 +1448,38 @@ void upsdrv_updateinfo(void) status_set("OB"); if (bcmxcp_status.alarm_low_battery) status_set("LB"); + if (bcmxcp_status.alarm_replace_battery) + status_set("RB"); status_commit(); } + /* Get battery info from UPS, if exist */ + res = command_read_sequence(PW_BATTERY_REQ, answer); + if (res <= 0) + { + upsdebugx(1, "Failed to read Battery Status from UPS"); + } + else + { + /* Only parse the status (first byte) + * Powerware 5115 RM output: + * 02 00 78 1d 42 00 e0 17 42 1e 00 00 00 00 00 00 00 00 00 01 03 + * Powerware 9130 output: + * 03 0a d7 25 42 0a d7 25 42 00 9a 19 6d 43 cd cc 4c 3e 01 00 01 03 + */ + upsdebug_hex(2, "Battery Status", answer, res); + batt_status = answer[0]; + + if ((nutvalue = nut_find_infoval(batt_test_info, batt_status)) != NULL) { + dstate_setinfo("ups.test.result", "%s", nutvalue); + upsdebugx(2, "Battery Status = %s (%i)", nutvalue, batt_status); + } + else { + upsdebugx(1, "Failed to extract Battery Status from answer"); + } + } + dstate_dataok(); } @@ -1428,7 +1500,7 @@ void upsdrv_shutdown(void) it doesn't respond at first if possible */ send_write_command(AUTHOR, 4); - sleep(1); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ cbuf[0] = PW_LOAD_OFF_RESTART; cbuf[1] = (unsigned char)(bcmxcp_status.shutdowndelay & 0x00ff); /* "delay" sec delay for shutdown, */ @@ -1493,12 +1565,12 @@ static int instcmd(const char *cmdname, const char *extra) ) { send_write_command(AUTHOR, 4); - sleep(1); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ /* Get the shutdown delay, if any */ snprintf(varname, sizeof(varname)-1, "outlet.%c.delay.shutdown", cmdname[7]); if ((varvalue = dstate_getinfo(varname)) != NULL) { - sddelay = atoi(dstate_getinfo(varname)); + sddelay = atoi(varvalue); } cbuf[0] = PW_LOAD_OFF_RESTART; @@ -1546,7 +1618,7 @@ static int instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "shutdown.return")) { send_write_command(AUTHOR, 4); - sleep(1); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ cbuf[0] = PW_LOAD_OFF_RESTART; cbuf[1] = (unsigned char)(bcmxcp_status.shutdowndelay & 0x00ff); /* "delay" sec delay for shutdown, */ @@ -1590,7 +1662,7 @@ static int instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "shutdown.stayoff")) { send_write_command(AUTHOR, 4); - sleep(1); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ res = command_read_sequence(PW_UPS_OFF, answer); if (res <= 0) { @@ -1626,10 +1698,13 @@ static int instcmd(const char *cmdname, const char *extra) } + /* Note: test result will be parsed from Battery status block, + * part of the update loop, and published into ups.test.result + */ if (!strcasecmp(cmdname, "test.battery.start")) { send_write_command(AUTHOR, 4); - sleep(1); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ cbuf[0] = PW_INIT_BAT_TEST; cbuf[1] = 0x0A; /* 10 sec start delay for test.*/ @@ -1665,12 +1740,6 @@ static int instcmd(const char *cmdname, const char *extra) break; } } - /* Get test info from UPS ? - Should we wait for 50 sec and get the - answer from the test. - Or return, as we may lose line power - and need to do a shutdown.*/ - } upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); @@ -1715,8 +1784,7 @@ int setvar (const char *varname, const char *val) } send_write_command(AUTHOR, 4); - /* Need to. Have to wait at least 0.25 sec max 16 sec */ - sleep (1); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ outlet_num = varname[NUT_OUTLET_POSITION] - '0'; if (outlet_num < 1 || outlet_num > 9) { @@ -1781,4 +1849,28 @@ int setvar (const char *varname, const char *val) return STAT_SET_INVALID; } +/******************************* + * Extracted from usbhid-ups.c * + *******************************/ +/* find the NUT value matching that XCP Item value */ +static const char *nut_find_infoval(info_lkp_t *xcp2info, const double value) +{ + info_lkp_t *info_lkp; + + /* if a conversion function is defined, use 'value' as argument for it */ + if (xcp2info->fun != NULL) { + return xcp2info->fun(value); + } + + /* use 'value' as an index for a lookup in an array */ + for (info_lkp = xcp2info; info_lkp->nut_value != NULL; info_lkp++) { + if (info_lkp->xcp_value == (long)value) { + upsdebugx(5, "nut_find_infoval: found %s (value: %ld)", info_lkp->nut_value, (long)value); + return info_lkp->nut_value; + } + } + + upsdebugx(3, "hu_find_infoval: no matching INFO_* value for this XCP value (%g)", value); + return NULL; +} diff --git a/drivers/bcmxcp.h b/drivers/bcmxcp.h index beb19fe..7174953 100644 --- a/drivers/bcmxcp.h +++ b/drivers/bcmxcp.h @@ -7,6 +7,11 @@ #include "timehead.h" +/* Have to wait at least 0,25 sec max 16 sec */ +/* 1 second is too short for PW9120 (leads to communication errors). + So we set it to 2 seconds */ +#define PW_SLEEP 2 + #define PW_MAX_TRY 3 /* How many times we try to send data. */ #define PW_COMMAND_START_BYTE (unsigned char)0xAB @@ -20,8 +25,8 @@ #define PW_STATUS_REQ (unsigned char)0x33 /* On Line, On Bypass, ... length 1-2 */ #define PW_METER_BLOCK_REQ (unsigned char)0x34 /* Current UPS status (Load, utility,...) length 1 */ #define PW_CUR_ALARM_REQ (unsigned char)0x35 /* Current alarm and event request. length 1 */ -#define PW_CONFIG_BLOC_REQ (unsigned char)0x36 /* Model serial#, ... length 1 */ -#define PW_BAT_TEST_REQ (unsigned char)0x3B /* Charging, floating, ... length 1 */ +#define PW_CONFIG_BLOCK_REQ (unsigned char)0x36 /* Model serial#, ... length 1 */ +#define PW_BATTERY_REQ (unsigned char)0x3B /* Charging, floating, ... length 1 */ #define PW_LIMIT_BLOCK_REQ (unsigned char)0x3C /* Configuration (Bypass thresholds,...). length 1 */ #define PW_TEST_RESULT_REQ (unsigned char)0x3F /* ??. length 1 */ #define PW_COMMAND_LIST_REQ (unsigned char)0x40 /* Available commands. length 1 */ @@ -342,10 +347,15 @@ #define BCMXCP_ALARM_CHARGER_ON_COMMAND 235 #define BCMXCP_ALARM_CHARGER_OFF_COMMAND 236 #define BCMXCP_ALARM_UPS_NORMAL 237 -#define BCMXCP_ALARM_EXTERNAL_COMMUNICATION_FAILURE 238 +#define BCMXCP_ALARM_INVERTER_PHASE_ROTATION 238 +#define BCMXCP_ALARM_UPS_OFF 239 +#define BCMXCP_ALARM_EXTERNAL_COMMUNICATION_FAILURE 240 +#define BCMXCP_ALARM_BATTERY_TEST_INPROGRESS 256 +#define BCMXCP_ALARM_SYSTEM_TEST_INPROGRESS 257 +#define BCMXCP_ALARM_BATTERY_TEST_ABORTED 258 #define BCMXCP_METER_MAP_MAX 91 /* Max no of entries in BCM/XCP meter map */ -#define BCMXCP_ALARM_MAP_MAX 240 /* Max no of entries in BCM/XCP alarm map (adjusted upwards to nearest multi of 8 */ +#define BCMXCP_ALARM_MAP_MAX 260 /* Max no of entries in BCM/XCP alarm map (adjusted upwards to nearest multi of 8 */ typedef struct { /* Entry in BCM/XCP - UPS - NUT mapping table */ const char *nut_entity; /* The NUT variable name */ @@ -353,7 +363,7 @@ typedef struct { /* Entry in BCM/XCP - UPS - NUT mapping table */ unsigned int meter_block_index; /* The position of this meter in the UPS meter block */ } BCMXCP_METER_MAP_ENTRY_t; -BCMXCP_METER_MAP_ENTRY_t +extern BCMXCP_METER_MAP_ENTRY_t bcmxcp_meter_map[BCMXCP_METER_MAP_MAX]; typedef struct { /* Entry in BCM/XCP - UPS mapping table */ @@ -361,7 +371,7 @@ typedef struct { /* Entry in BCM/XCP - UPS mapping table */ const char *alarm_desc; /* Description of this alarm */ } BCMXCP_ALARM_MAP_ENTRY_t; -BCMXCP_ALARM_MAP_ENTRY_t +extern BCMXCP_ALARM_MAP_ENTRY_t bcmxcp_alarm_map[BCMXCP_ALARM_MAP_MAX]; typedef struct { /* A place to store status info and other data not for NUT */ @@ -370,13 +380,22 @@ typedef struct { /* A place to store status info and other data not for NUT * unsigned int shutdowndelay; /* Shutdown delay in seconds, from ups.conf */ int alarm_on_battery; /* On Battery alarm active? */ int alarm_low_battery; /* Battery Low alarm active? */ + int alarm_replace_battery; /* Battery needs replacement! */ } BCMXCP_STATUS_t; -BCMXCP_STATUS_t +extern BCMXCP_STATUS_t bcmxcp_status; int checksum_test(const unsigned char*); unsigned char calc_checksum(const unsigned char *buf); - + +/* from usbhid-ups.h */ +typedef struct { + const long xcp_value; /* XCP value */ + const char *nut_value; /* NUT value */ + const char *(*fun)(double xcp_value); /* optional XCP to NUT mapping */ + double (*nuf)(const char *nut_value); /* optional NUT to HID mapping */ +} info_lkp_t; + #endif /*_POWERWARE_H */ diff --git a/drivers/bcmxcp_ser.c b/drivers/bcmxcp_ser.c index 0c7e6b3..2568eba 100644 --- a/drivers/bcmxcp_ser.c +++ b/drivers/bcmxcp_ser.c @@ -6,7 +6,7 @@ #define PW_MAX_BAUD 5 #define SUBDRIVER_NAME "RS-232 communication subdriver" -#define SUBDRIVER_VERSION "0.18" +#define SUBDRIVER_VERSION "0.19" /* communication driver description structure */ upsdrv_info_t comm_upsdrv_info = { @@ -45,6 +45,8 @@ static void send_command(unsigned char *command, int command_length) sbuf[command_length] = calc_checksum(sbuf); command_length += 1; + upsdebug_hex (3, "send_command", sbuf, command_length); + while (retry++ < PW_MAX_TRY) { if (retry == PW_MAX_TRY) { @@ -189,6 +191,7 @@ int get_answer(unsigned char *data, unsigned char command) } + upsdebug_hex (5, "get_answer", data, end_length); ser_comm_good(); return end_length; diff --git a/drivers/bcmxcp_usb.c b/drivers/bcmxcp_usb.c index 8c30a4d..6b9bcc5 100644 --- a/drivers/bcmxcp_usb.c +++ b/drivers/bcmxcp_usb.c @@ -12,7 +12,7 @@ #include #define SUBDRIVER_NAME "USB communication subdriver" -#define SUBDRIVER_VERSION "0.19" +#define SUBDRIVER_VERSION "0.21" /* communication driver description structure */ upsdrv_info_t comm_upsdrv_info = { @@ -104,6 +104,7 @@ void send_read_command(unsigned char command) buf[1] = 0x01; /* data length */ buf[2] = command; /* command to send */ buf[3] = calc_checksum(buf); /* checksum */ + upsdebug_hex (3, "send_read_command", buf, 4); usb_set_descriptor(upsdev, USB_DT_STRING, 4, buf, 4); /* FIXME: Ignore error */ } } @@ -122,6 +123,7 @@ void send_write_command(unsigned char *command, int command_length) /* Add checksum */ sbuf[command_length] = calc_checksum(sbuf); command_length += 1; + upsdebug_hex (3, "send_write_command", sbuf, command_length); usb_set_descriptor(upsdev, USB_DT_STRING, 4, sbuf, command_length); /* FIXME: Ignore error */ } } @@ -266,7 +268,8 @@ int get_answer(unsigned char *data, unsigned char command) end_length += length; my_buf += length + 5; } - upsdebugx(4, "get_answer: exiting (len=%d)", end_length); + + upsdebug_hex (5, "get_answer", data, end_length); return end_length; } @@ -299,6 +302,7 @@ int command_write_sequence(unsigned char *command, int command_length, unsigned while ((bytes_read < 1) && (retry < 5)) { send_write_command(command, command_length); + sleep(PW_SLEEP); bytes_read = get_answer(answer, command[0]); retry ++; } @@ -388,7 +392,7 @@ usb_dev_handle *nutusb_open(const char *port) usb_find_busses(); usb_find_devices(); - for (retry = 0; retry <= MAX_TRY ; retry++) + for (retry = 0; retry < MAX_TRY ; retry++) { dev_h = open_powerware_usb(); if (!dev_h) { diff --git a/drivers/belkin-hid.c b/drivers/belkin-hid.c index d3b294b..ce665e8 100644 --- a/drivers/belkin-hid.c +++ b/drivers/belkin-hid.c @@ -1,8 +1,9 @@ -/* belkin-hid.h - data to monitor Belkin UPS Systems USB/HID devices with NUT +/* belkin-hid.c - data to monitor Belkin UPS Systems USB/HID devices with NUT * * Copyright (C) * 2003 - 2008 Arnaud Quette * 2005 Peter Selinger + * 2011 Charles Lepple * * Sponsored by MGE UPS SYSTEMS * @@ -28,13 +29,18 @@ #include "belkin-hid.h" #include "usb-common.h" -#define BELKIN_HID_VERSION "Belkin HID 0.12" +#define BELKIN_HID_VERSION "Belkin HID 0.15" /* Belkin */ #define BELKIN_VENDORID 0x050d /* Liebert */ #define LIEBERT_VENDORID 0x10af +/* Note that there are at least two Liebert firmware types which both report + * a VID:PID of 10af:0001. The newer ones tend not to have the Belkin broken + * Usage Pages (and therefore use standard HID PDC paths) but they have + * incorrect exponents for some fields. + */ /* USB IDs device table */ static usb_device_id_t belkin_usb_device_table[] = { @@ -64,6 +70,123 @@ static usb_device_id_t belkin_usb_device_table[] = { { -1, -1, NULL } }; +static const char *liebert_online_fun(double value); +static const char *liebert_discharging_fun(double value); +static const char *liebert_charging_fun(double value); +static const char *liebert_lowbatt_fun(double value); +static const char *liebert_replacebatt_fun(double value); +static const char *liebert_shutdownimm_fun(double value); +static const char *liebert_config_voltage_fun(double value); +static const char *liebert_line_voltage_fun(double value); + +static info_lkp_t liebert_online_info[] = { + { 0, NULL, liebert_online_fun } +}; + +static info_lkp_t liebert_discharging_info[] = { + { 0, NULL, liebert_discharging_fun } +}; + +static info_lkp_t liebert_charging_info[] = { + { 0, NULL, liebert_charging_fun } +}; + +static info_lkp_t liebert_lowbatt_info[] = { + { 0, NULL, liebert_lowbatt_fun } +}; + +static info_lkp_t liebert_replacebatt_info[] = { + { 0, NULL, liebert_replacebatt_fun } +}; + +static info_lkp_t liebert_shutdownimm_info[] = { + { 0, NULL, liebert_shutdownimm_fun } +}; + +static info_lkp_t liebert_config_voltage_info[] = { + { 0, NULL, liebert_config_voltage_fun }, +}; + +static info_lkp_t liebert_line_voltage_info[] = { + { 0, NULL, liebert_line_voltage_fun }, +}; + +static double liebert_config_voltage_mult = 1.0; +static double liebert_line_voltage_mult = 1.0; +static char liebert_conversion_buf[10]; + +/* These lookup functions also cover the 1e-7 factor which seems to be due to a + * broken report descriptor in certain Liebert units. + */ +static const char *liebert_online_fun(double value) +{ + return value ? "online" : "!online"; +} + +static const char *liebert_discharging_fun(double value) +{ + return value ? "dischrg" : "!dischrg"; +} + +static const char *liebert_charging_fun(double value) +{ + return value ? "chrg" : "!chrg"; +} + +static const char *liebert_lowbatt_fun(double value) +{ + return value ? "lowbatt" : "!lowbatt"; +} + +static const char *liebert_replacebatt_fun(double value) +{ + return value ? "replacebatt" : "!replacebatt"; +} + +static const char *liebert_shutdownimm_fun(double value) +{ + return value ? "shutdownimm" : "!shutdownimm"; +} + +/*! Apply heuristics to Liebert ConfigVoltage for correction of other values. + * Logic is weird since the ConfigVoltage item comes after InputVoltage and + * OutputVoltage. + */ +static const char *liebert_config_voltage_fun(double value) +{ + if( value < 1 ) { + if( abs(value - 1e-7) < 1e-9 ) { + liebert_config_voltage_mult = 1e8; + liebert_line_voltage_mult = 1e7; /* stomp this in case input voltage was low */ + upsdebugx(2, "ConfigVoltage = %g -> assuming correction factor = %g", + value, liebert_config_voltage_mult); + } else { + upslogx(LOG_NOTICE, "ConfigVoltage exponent looks wrong, but not correcting."); + } + } + + snprintf(liebert_conversion_buf, sizeof(liebert_conversion_buf), "%.1f", + value * liebert_config_voltage_mult); + return liebert_conversion_buf; +} + +static const char *liebert_line_voltage_fun(double value) +{ + if( value < 1 ) { + if( abs(value - 1e-7) < 1e-9 ) { + liebert_line_voltage_mult = 1e7; + upsdebugx(2, "Input/OutputVoltage = %g -> assuming correction factor = %g", + value, liebert_line_voltage_mult); + } else { + upslogx(LOG_NOTICE, "LineVoltage exponent looks wrong, but not correcting."); + } + } + + snprintf(liebert_conversion_buf, sizeof(liebert_conversion_buf), "%.1f", + value * liebert_line_voltage_mult); + return liebert_conversion_buf; +} + /* some conversion functions specific to Belkin */ /* returns statically allocated string - must not use it again before @@ -338,12 +461,27 @@ static hid_info_t belkin_hid2nut[] = { { "ups.serial", 0, 0, "UPS.PowerSummary.iSerialNumber", NULL, "%s", 0, stringid_conversion }, { "ups.test.result", 0, 0, "UPS.BELKINControls.BELKINTest", NULL, "%s", 0, belkin_test_info }, { "ups.type", 0, 0, "UPS.BELKINDevice.BELKINUPSType", NULL, "%s", 0, belkin_upstype_conversion }, - + /* Liebert PSA: */ + { "battery.charge", 0, 0, "UPS.PowerSummary.RemainingCapacity", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL }, /* why .broken above? */ + { "input.frequency", 0, 0, "UPS.Input.Frequency", NULL, "%s", 0, divide_by_10_conversion }, + { "input.voltage", 0, 0, "UPS.Input.Voltage", NULL, "%s", 0, liebert_line_voltage_info }, + { "output.voltage", 0, 0, "UPS.Output.Voltage", NULL, "%s", 0, liebert_line_voltage_info }, + /* You would think these next two would be off by the same factor. You'd be wrong. */ + { "battery.voltage", 0, 0, "UPS.PowerSummary.Voltage", NULL, "%s", 0, liebert_line_voltage_info }, + { "battery.voltage.nominal", 0, 0, "UPS.PowerSummary.ConfigVoltage", NULL, "%s", HU_FLAG_STATIC, liebert_config_voltage_info }, + { "ups.load", 0, 0, "UPS.Output.PercentLoad", NULL, "%.0f", 0, NULL }, /* status */ - { "BOOL", 0, 0, "UPS.PowerSummary.Discharging", NULL, NULL, HU_FLAG_QUICK_POLL, discharging_info }, - { "BOOL", 0, 0, "UPS.PowerSummary.Charging", NULL, NULL, HU_FLAG_QUICK_POLL, charging_info }, - { "BOOL", 0, 0, "UPS.PowerSummary.ShutdownImminent", NULL, NULL, 0, shutdownimm_info }, - { "BOOL", 0, 0, "UPS.PowerSummary.ACPresent", NULL, NULL, HU_FLAG_QUICK_POLL, online_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.Discharging", NULL, NULL, HU_FLAG_QUICK_POLL, liebert_discharging_info }, /* might not need to be liebert_* version */ + { "BOOL", 0, 0, "UPS.PowerSummary.Charging", NULL, NULL, HU_FLAG_QUICK_POLL, liebert_charging_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.ShutdownImminent", NULL, NULL, 0, liebert_shutdownimm_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.ACPresent", NULL, NULL, HU_FLAG_QUICK_POLL, liebert_online_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Discharging", NULL, NULL, HU_FLAG_QUICK_POLL, liebert_discharging_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Charging", NULL, NULL, HU_FLAG_QUICK_POLL, liebert_charging_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.ShutdownImminent", NULL, NULL, 0, liebert_shutdownimm_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.ACPresent", NULL, NULL, HU_FLAG_QUICK_POLL, liebert_online_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.NeedReplacement", NULL, NULL, HU_FLAG_QUICK_POLL, liebert_replacebatt_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit", NULL, NULL, HU_FLAG_QUICK_POLL, liebert_lowbatt_info }, + /* { "BOOL", 0, 0, "UPS.PowerSummary.BelowRemainingCapacityLimit", NULL, "%s", 0, lowbatt_info }, broken! */ { "BOOL", 0, 0, "UPS.BELKINStatus.BELKINPowerStatus", NULL, NULL, 0, belkin_overload_conversion }, { "BOOL", 0, 0, "UPS.BELKINStatus.BELKINPowerStatus", NULL, NULL, 0, belkin_overheat_conversion }, diff --git a/drivers/bestfortress.c b/drivers/bestfortress.c index c3d60c4..b12dd15 100644 --- a/drivers/bestfortress.c +++ b/drivers/bestfortress.c @@ -33,8 +33,8 @@ #define inline __inline #endif -#define DRIVER_NAME "Best Fortress UPS driver" -#define DRIVER_VERSION "0.02" +#define DRIVER_NAME "Best Fortress UPS driver" +#define DRIVER_VERSION "0.05" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -116,7 +116,7 @@ static int checksum (char * s) int sum; for (i = 40, sum = 0; s[0] && s[1] && i > 0; i--, s += 2) { sum += (fromhex (s[0]) << 4) + fromhex (s[1]); - } + } return sum; } @@ -201,22 +201,30 @@ void upsdrv_updateinfo(void) char temp[256]; char *p; int loadva; - int len; + int len, recv; int retry; - + char ch; int checksum_ok, is_online=1, is_off, low_batt, trimming, boosting; + upsdebugx(1, "upsdrv_updateinfo"); + for (retry = 0; retry < 5; ++retry) { upsflushin (0, 0, "\r "); upssend ("f\r"); + while (ser_get_char(upsfd, &ch, 0, UPSDELAY) > 0 && ch != '\n'); /* response starts with \r\n */ + temp[2] = 0; do { - if (upsrecv (temp+2, sizeof temp - 2, ENDCHAR, IGNCHARS) <= 0) { + if ((recv = upsrecv (temp+2, sizeof temp - 2, ENDCHAR, IGNCHARS)) <= 0) { upsflushin (0, 0, "\r "); upssend ("f\r"); + while (ser_get_char(upsfd, &ch, 0, UPSDELAY) > 0 && ch != '\n'); /* response starts with \r\n */ } } while (temp[2] == 0); - /*syslog (LOG_DAEMON | LOG_NOTICE,"ups: got '%s'\n", p);*/ + upsdebugx(1, "upsdrv_updateinfo: received %i bytes (try %i)", recv, retry); + upsdebug_hex(5, "buffer", temp, recv); + + /* syslog (LOG_DAEMON | LOG_NOTICE,"ups: got %d chars '%s'\n", recv, temp + 2); */ /* status example: 000000000001000000000000012201210000001200014500000280600000990025000000000301BE 000000000001000000000000012401230000001200014800000280600000990025000000000301B7 @@ -248,6 +256,8 @@ void upsdrv_updateinfo(void) } if (!checksum_ok) { + upsdebugx(2, "checksum corruption"); + upsdebug_hex(3, "buffer", temp, len); dstate_datastale(); return; } diff --git a/drivers/bestups.c b/drivers/bestups.c index aa142da..854bddf 100644 --- a/drivers/bestups.c +++ b/drivers/bestups.c @@ -23,7 +23,7 @@ #include "serial.h" #define DRIVER_NAME "Best UPS driver" -#define DRIVER_VERSION "1.05" +#define DRIVER_VERSION "1.06" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -422,6 +422,7 @@ void upsdrv_help(void) void upsdrv_makevartable(void) { addvar(VAR_VALUE, "nombattvolt", "Override nominal battery voltage"); + addvar(VAR_VALUE, "battvoltmult", "Battery voltage multiplier"); addvar(VAR_VALUE, "ID", "Force UPS ID response string"); } diff --git a/drivers/blazer.c b/drivers/blazer.c index 0b3cc8f..d3792fc 100644 --- a/drivers/blazer.c +++ b/drivers/blazer.c @@ -2,9 +2,11 @@ * blazer.c: driver core for Megatec/Q1 protocol based UPSes * * A document describing the protocol implemented by this driver can be - * found online at "http://www.networkupstools.org/protocols/megatec.html". + * found online at http://www.networkupstools.org/ups-protocols/megatec.html * - * Copyright (C) 2008,2009 - Arjen de Korte + * Copyright (C) + * 2008,2009 - Arjen de Korte + * 2012 - Arnaud Quette * * 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 @@ -223,9 +225,9 @@ static int blazer_status(const char *cmd) } if (val[7] == '1') { /* Beeper On */ - dstate_setinfo("beeper.status", "enabled"); + dstate_setinfo("ups.beeper.status", "enabled"); } else { - dstate_setinfo("beeper.status", "disabled"); + dstate_setinfo("ups.beeper.status", "disabled"); } if (val[4] == '1') { /* UPS Type is Standby (0 is On_line) */ @@ -280,6 +282,7 @@ static int blazer_status(const char *cmd) if (val[6] == '1') { /* Shutdown Active */ alarm_set("Shutdown imminent!"); + status_set("FSD"); } alarm_commit(); @@ -425,6 +428,13 @@ static int blazer_instcmd(const char *cmdname, const char *extra) } if (!strcasecmp(cmdname, "shutdown.return")) { + /* + * Note: "S01R0001" and "S01R0002" may not work on early (GE) + * firmware versions. The failure mode is that the UPS turns + * off and never returns. The fix is to push the return value + * up by 2, i.e. S01R0003, and it will return online properly. + * (thus the default of ondelay=3 mins) + */ if (offdelay < 60) { snprintf(buf, sizeof(buf), "S.%dR%04d\r", offdelay / 6, ondelay); } else { @@ -450,11 +460,14 @@ static int blazer_instcmd(const char *cmdname, const char *extra) } /* - * If a command is invalid, it will be echoed back + * If a command is invalid, it will be echoed back. + * As an exception, Best UPS units will report "ACK" in case of success! */ if (blazer_command(buf, buf, sizeof(buf)) > 0) { - upslogx(LOG_ERR, "instcmd: command [%s] failed", cmdname); - return STAT_INSTCMD_FAILED; + if (strncmp(buf, "ACK", 3)) { + upslogx(LOG_ERR, "instcmd: command [%s] failed", cmdname); + return STAT_INSTCMD_FAILED; + } } upslogx(LOG_INFO, "instcmd: command [%s] handled", cmdname); @@ -523,6 +536,22 @@ static void blazer_initbattery(void) { const char *val; + /* If no values were provided by the user in ups.conf, try to guesstimate + * battery.charge, but announce it! */ + if ((batt.volt.nom != 1) && (batt.volt.high == -1) && (batt.volt.high == -1)) { + upslogx(LOG_INFO, "No values provided for battery high/low voltages in ups.conf\n"); + + /* Basic formula, which should cover most cases */ + batt.volt.low = 104 * batt.volt.nom / 120; + batt.volt.high = 130 * batt.volt.nom / 120; + + /* Publish these data too */ + dstate_setinfo("battery.voltage.low", "%.2f", batt.volt.low); + dstate_setinfo("battery.voltage.high", "%.2f", batt.volt.high); + + upslogx(LOG_INFO, "Using 'guestimation' (low: %f, high: %f)!", batt.volt.low, batt.volt.high); + } + val = getval("runtimecal"); if (val) { double rh, lh, rl, ll; diff --git a/drivers/blazer_ser.c b/drivers/blazer_ser.c index fbc7e35..6351c62 100644 --- a/drivers/blazer_ser.c +++ b/drivers/blazer_ser.c @@ -26,7 +26,7 @@ #include "blazer.h" #define DRIVER_NAME "Megatec/Q1 protocol serial driver" -#define DRIVER_VERSION "1.51" +#define DRIVER_VERSION "1.55" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -37,7 +37,7 @@ upsdrv_info_t upsdrv_info = { { NULL } }; -#define SER_WAIT_SEC 1 +#define SER_WAIT_SEC 1 /* 3 seconds for Best UPS */ /* * Generic command processing function. Send a command and read a reply. @@ -58,7 +58,7 @@ int blazer_command(const char *cmd, char *buf, size_t buflen) return ret; } - upsdebugx(3, "send: %.*s", (int)strcspn(cmd, "\r"), cmd); + upsdebugx(3, "send: '%.*s'", (int)strcspn(cmd, "\r"), cmd); ret = ser_get_buf(upsfd, buf, buflen, SER_WAIT_SEC, 0); @@ -67,7 +67,7 @@ int blazer_command(const char *cmd, char *buf, size_t buflen) return ret; } - upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); + upsdebugx(3, "read: '%.*s'", (int)strcspn(buf, "\r"), buf); return ret; #else const struct { diff --git a/drivers/blazer_usb.c b/drivers/blazer_usb.c index b303596..1104071 100644 --- a/drivers/blazer_usb.c +++ b/drivers/blazer_usb.c @@ -5,7 +5,7 @@ * found online at "http://www.networkupstools.org/protocols/megatec.html". * * Copyright (C) 2003-2009 Arjen de Korte - * Copyright (C) 2011 Arnaud Quette + * Copyright (C) 2011-2012 Arnaud Quette * * 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 @@ #include "blazer.h" #define DRIVER_NAME "Megatec/Q1 protocol USB driver" -#define DRIVER_VERSION "0.04" +#define DRIVER_VERSION "0.08" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -64,7 +64,7 @@ static int cypress_command(const char *cmd, char *buf, size_t buflen) /* Write data in 8-byte chunks */ /* ret = usb->set_report(udev, 0, (unsigned char *)&tmp[i], 8); */ ret = usb_control_msg(udev, USB_ENDPOINT_OUT + USB_TYPE_CLASS + USB_RECIP_INTERFACE, - 0x09, 0x200, 0, &tmp[i], 8, 1000); + 0x09, 0x200, 0, &tmp[i], 8, 5000); if (ret <= 0) { upsdebugx(3, "send: %s", ret ? usb_strerror() : "timeout"); @@ -346,7 +346,11 @@ static usb_device_id_t blazer_usb_id[] = { { USB_DEVICE(0x0001, 0x0000), &krauler_subdriver }, /* Krauler UP-M500VA */ { USB_DEVICE(0xffff, 0x0000), &krauler_subdriver }, /* Ablerex 625L USB */ { USB_DEVICE(0x0665, 0x5161), &cypress_subdriver }, /* Belkin F6C1200-UNV */ + { USB_DEVICE(0x06da, 0x0002), &cypress_subdriver }, /* Online Yunto YQ450 */ { USB_DEVICE(0x06da, 0x0003), &ippon_subdriver }, /* Mustek Powermust */ + { USB_DEVICE(0x06da, 0x0004), &cypress_subdriver }, /* Phoenixtec Innova 3/1 T */ + { USB_DEVICE(0x06da, 0x0005), &cypress_subdriver }, /* Phoenixtec Innova RT */ + { USB_DEVICE(0x06da, 0x0201), &cypress_subdriver }, /* Phoenixtec Innova T */ { USB_DEVICE(0x0f03, 0x0001), &cypress_subdriver }, /* Unitek Alpha 1200Sx */ { USB_DEVICE(0x14f0, 0x00c9), &phoenix_subdriver }, /* GE EP series */ /* end of list */ diff --git a/drivers/compaq-mib.c b/drivers/compaq-mib.c index 206b04b..febb9c0 100644 --- a/drivers/compaq-mib.c +++ b/drivers/compaq-mib.c @@ -1,14 +1,15 @@ /* compaq-mib.c - data to monitor SNMP UPS with NUT * - * Copyright (C) 2002-2006 - * Arnaud Quette - * Niels Baggesen - * Philip Ward + * Copyright (C) + * 2002-2012 Arnaud Quette + * 2002-2006 Niels Baggesen + * 2002-2006 Philip Ward * - * Sponsored by MGE UPS SYSTEMS + * This program was sponsored by MGE UPS SYSTEMS, and now Eaton * - * This version has been tested using an HP R5500XR UPS with AF401A - * management card and a single phase input. + * This version has been tested using: + * HP R5500XR UPS with management card AF401A and a single phase input + * HP R/T3000 UPS with management card AF465A and a single phase input * * 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 @@ -29,48 +30,58 @@ #include "compaq-mib.h" -#define CPQPOWER_MIB_VERSION "1.0" +#define CPQPOWER_MIB_VERSION "1.5" + +#define DEFAULT_ONDELAY 30 +#define DEFAULT_OFFDELAY 20 +#define STR_DEFAULT_ONDELAY "30" +#define STR_DEFAULT_OFFDELAY "20" + +/* Note: RFC-1628 (UPS MIB) is also supported on these devices! */ /* SNMP OIDs set */ -#define CPQPOWER_OID_UPS_MIB "1.3.6.1.4.1.232.165.3" +#define CPQPOWER_OID_UPS_MIB ".1.3.6.1.4.1.232.165.3" +/* FIXME: to be verified */ +#define CPQPOWER_SYSOID CPQPOWER_OID_UPS_MIB -#define CPQPOWER_OID_MFR_NAME CPQPOWER_OID_UPS_MIB ".1.1.0" /* UPS-MIB::upsIdentManufacturer */ -#define CPQPOWER_OID_MODEL_NAME CPQPOWER_OID_UPS_MIB ".1.2.0" /* UPS-MIB::upsIdentModel */ -#define CPQPOWER_OID_FIRMREV CPQPOWER_OID_UPS_MIB ".1.3.0" /* UPS-MIB::upsIdentUPSSoftwareVersion */ -#define CPQPOWER_OID_OEMCODE CPQPOWER_OID_UPS_MIB ".1.4.0" /* UPS-MIB::upsIdentAgentSoftwareVersion */ +#define CPQPOWER_OID_MFR_NAME ".1.3.6.1.4.1.232.165.3.1.1.0" /* UPS-MIB::upsIdentManufacturer */ +#define CPQPOWER_OID_MODEL_NAME ".1.3.6.1.4.1.232.165.3.1.2.0" /* UPS-MIB::upsIdentModel */ +#define CPQPOWER_OID_FIRMREV ".1.3.6.1.4.1.232.165.3.1.3.0" /* UPS-MIB::upsIdentUPSSoftwareVersion */ +#define CPQPOWER_OID_OEMCODE ".1.3.6.1.4.1.232.165.3.1.4.0" /* UPS-MIB::upsIdentAgentSoftwareVersion */ -#define CPQPOWER_OID_BATT_RUNTIME CPQPOWER_OID_UPS_MIB ".2.1.0" /* UPS-MIB::upsEstimatedMinutesRemaining */ -#define CPQPOWER_OID_BATT_VOLTAGE CPQPOWER_OID_UPS_MIB ".2.2.0" /* UPS-MIB::upsBatteryVoltage */ -#define CPQPOWER_OID_BATT_CURRENT CPQPOWER_OID_UPS_MIB ".2.3.0" /* UPS-MIB::upsBatteryCurrent */ -#define CPQPOWER_OID_BATT_CHARGE CPQPOWER_OID_UPS_MIB ".2.4.0" /* UPS-MIB::upsBattCapacity */ -#define CPQPOWER_OID_BATT_STATUS CPQPOWER_OID_UPS_MIB ".2.5.0" /* UPS-MIB::upsBatteryAbmStatus */ +#define CPQPOWER_OID_BATT_RUNTIME ".1.3.6.1.4.1.232.165.3.2.1.0" /* UPS-MIB::upsEstimatedMinutesRemaining */ +#define CPQPOWER_OID_BATT_VOLTAGE ".1.3.6.1.4.1.232.165.3.2.2.0" /* UPS-MIB::upsBatteryVoltage */ +#define CPQPOWER_OID_BATT_CURRENT ".1.3.6.1.4.1.232.165.3.2.3.0" /* UPS-MIB::upsBatteryCurrent */ +#define CPQPOWER_OID_BATT_CHARGE ".1.3.6.1.4.1.232.165.3.2.4.0" /* UPS-MIB::upsBattCapacity */ +#define CPQPOWER_OID_BATT_STATUS ".1.3.6.1.4.1.232.165.3.2.5.0" /* UPS-MIB::upsBatteryAbmStatus */ -#define CPQPOWER_OID_IN_FREQ CPQPOWER_OID_UPS_MIB ".3.1.0" /* UPS-MIB::upsInputFrequency */ -#define CPQPOWER_OID_IN_LINEBADS CPQPOWER_OID_UPS_MIB ".3.2.0" /* UPS-MIB::upsInputLineBads */ -#define CPQPOWER_OID_IN_LINES CPQPOWER_OID_UPS_MIB ".3.3.0" /* UPS-MIB::upsInputNumPhases */ +#define CPQPOWER_OID_IN_FREQ ".1.3.6.1.4.1.232.165.3.3.1.0" /* UPS-MIB::upsInputFrequency */ +#define CPQPOWER_OID_IN_LINEBADS ".1.3.6.1.4.1.232.165.3.3.2.0" /* UPS-MIB::upsInputLineBads */ +#define CPQPOWER_OID_IN_LINES ".1.3.6.1.4.1.232.165.3.3.3.0" /* UPS-MIB::upsInputNumPhases */ -#define CPQPOWER_OID_IN_PHASE CPQPOWER_OID_UPS_MIB ".3.4.1.1" /* UPS-MIB::upsInputPhase */ -#define CPQPOWER_OID_IN_VOLTAGE CPQPOWER_OID_UPS_MIB ".3.4.1.2" /* UPS-MIB::upsInputVoltage */ -#define CPQPOWER_OID_IN_CURRENT CPQPOWER_OID_UPS_MIB ".3.4.1.3" /* UPS-MIB::upsInputCurrent */ -#define CPQPOWER_OID_IN_POWER CPQPOWER_OID_UPS_MIB ".3.4.1.4" /* UPS-MIB::upsInputWatts */ +#define CPQPOWER_OID_IN_PHASE ".1.3.6.1.4.1.232.165.3.3.4.1.1" /* UPS-MIB::upsInputPhase */ +#define CPQPOWER_OID_IN_VOLTAGE ".1.3.6.1.4.1.232.165.3.3.4.1.2" /* UPS-MIB::upsInputVoltage */ +#define CPQPOWER_OID_IN_CURRENT ".1.3.6.1.4.1.232.165.3.3.4.1.3" /* UPS-MIB::upsInputCurrent */ +#define CPQPOWER_OID_IN_POWER ".1.3.6.1.4.1.232.165.3.3.4.1.4" /* UPS-MIB::upsInputWatts */ -#define CPQPOWER_OID_LOAD_LEVEL CPQPOWER_OID_UPS_MIB ".4.1.0" /* UPS-MIB::upsOutputLoad */ -#define CPQPOWER_OID_OUT_FREQUENCY CPQPOWER_OID_UPS_MIB ".4.2.0" /* UPS-MIB::upsOutputFrequency */ -#define CPQPOWER_OID_OUT_LINES CPQPOWER_OID_UPS_MIB ".4.3.0" /* UPS-MIB::upsOutputNumPhases */ +#define CPQPOWER_OID_LOAD_LEVEL ".1.3.6.1.4.1.232.165.3.4.1.0" /* UPS-MIB::upsOutputLoad */ +#define CPQPOWER_OID_OUT_FREQUENCY ".1.3.6.1.4.1.232.165.3.4.2.0" /* UPS-MIB::upsOutputFrequency */ +#define CPQPOWER_OID_OUT_LINES ".1.3.6.1.4.1.232.165.3.4.3.0" /* UPS-MIB::upsOutputNumPhases */ -#define CPQPOWER_OID_OUT_PHASE CPQPOWER_OID_UPS_MIB ".4.4.1.1" /* UPS-MIB::upsOutputPhase */ -#define CPQPOWER_OID_OUT_VOLTAGE CPQPOWER_OID_UPS_MIB ".4.4.1.2" /* UPS-MIB::upsOutputVoltage */ -#define CPQPOWER_OID_OUT_CURRENT CPQPOWER_OID_UPS_MIB ".4.4.1.3" /* UPS-MIB::upsOutputCurrent */ -#define CPQPOWER_OID_OUT_POWER CPQPOWER_OID_UPS_MIB ".4.4.1.4" /* UPS-MIB::upsOutputWatts */ +#define CPQPOWER_OID_OUT_PHASE ".1.3.6.1.4.1.232.165.3.4.4.1.1" /* UPS-MIB::upsOutputPhase */ +#define CPQPOWER_OID_OUT_VOLTAGE ".1.3.6.1.4.1.232.165.3.4.4.1.2" /* UPS-MIB::upsOutputVoltage */ +#define CPQPOWER_OID_OUT_CURRENT ".1.3.6.1.4.1.232.165.3.4.4.1.3" /* UPS-MIB::upsOutputCurrent */ +#define CPQPOWER_OID_OUT_POWER ".1.3.6.1.4.1.232.165.3.4.4.1.4" /* UPS-MIB::upsOutputWatts */ -#define CPQPOWER_OID_POWER_STATUS CPQPOWER_OID_UPS_MIB ".4.5.0" /* UPS-MIB::upsOutputSource */ +#define CPQPOWER_OID_POWER_STATUS ".1.3.6.1.4.1.232.165.3.4.5.0" /* UPS-MIB::upsOutputSource */ -#define CPQPOWER_OID_AMBIENT_TEMP CPQPOWER_OID_UPS_MIB ".6.1.0" /* UPS-MIB::upsEnvAmbientTemp */ +#define CPQPOWER_OID_AMBIENT_TEMP ".1.3.6.1.4.1.232.165.3.6.1.0" /* UPS-MIB::upsEnvAmbientTemp */ + +#define CPQPOWER_OID_UPS_TEST_BATT ".1.3.6.1.4.1.232.165.3.7.1.0" /* UPS-MIB::upsTestBattery */ +#define CPQPOWER_OID_UPS_TEST_RES ".1.3.6.1.4.1.232.165.3.7.2.0" /* UPS-MIB::upsTestBatteryStatus */ +#define CPQPOWER_OID_ALARM_OB ".1.3.6.1.4.1.232.165.3.7.3.0" /* UPS-MIB::upsOnBattery */ +#define CPQPOWER_OID_ALARM_LB ".1.3.6.1.4.1.232.165.3.7.4.0" /* UPS-MIB::upsLowBattery */ -#define CPQPOWER_OID_UPS_TEST_BATT CPQPOWER_OID_UPS_MIB ".7.1.0" /* UPS-MIB::upsTestBattery */ -#define CPQPOWER_OID_UPS_TEST_RES CPQPOWER_OID_UPS_MIB ".7.2.0" /* UPS-MIB::upsTestBatteryStatus */ -#define CPQPOWER_OID_ALARM_OB CPQPOWER_OID_UPS_MIB ".7.3.0" /* UPS-MIB::upsOnBattery */ -#define CPQPOWER_OID_ALARM_LB CPQPOWER_OID_UPS_MIB ".7.4.0" /* UPS-MIB::upsLowBattery */ static info_lkp_t cpqpower_alarm_ob[] = { { 1, "OB" }, @@ -132,7 +143,28 @@ static info_lkp_t cpqpower_test_res_info[] = { { 0, "NULL" } } ; -#define CPQPOWER_OID_SD_AFTER_DELAY CPQPOWER_OID_UPS_MIB ".8.1.0" /* UPS-MIB::upsShutdownAfterDelay */ +#define CPQPOWER_START_TEST 1 + +static info_lkp_t cpqpower_outlet_status_info[] = { + { 1, "on" }, + { 2, "off" }, + { 3, "pendingOff" }, /* transitional status */ + { 4, "pendingOn" }, /* transitional status */ + { 5, "unknown" }, + { 0, NULL } +}; + +/* Ugly hack: having the matching OID present means that the outlet is + * switchable. So, it should not require this value lookup */ +static info_lkp_t cpqpower_outlet_switchability_info[] = { + { 1, "yes" }, + { 2, "yes" }, + { 3, "yes" }, + { 4, "yes" }, + { 0, NULL } +}; + +#define CPQPOWER_OID_SD_AFTER_DELAY ".1.3.6.1.4.1.232.165.3.8.1.0" /* UPS-MIB::upsControlOutputOffDelay */ #define CPQPOWER_OFF_DO 0 /* Snmp2NUT lookup table */ @@ -142,10 +174,15 @@ static snmp_info_t cpqpower_mib[] = { /* info_type, info_flags, info_len, OID, dfl, flags, oid2info, setvar */ { "ups.mfr", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_MFR_NAME, "HP/Compaq", SU_FLAG_STATIC, NULL }, { "ups.model", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_MODEL_NAME, "SNMP UPS", SU_FLAG_STATIC, NULL }, - { "ups.model.aux", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_OEMCODE, "", SU_FLAG_STATIC, NULL }, + /* { "ups.model.aux", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_OEMCODE, "", SU_FLAG_STATIC, NULL },*/ + { "ups.serial", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.232.165.1.2.7.0", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, + /* FIXME: split between firmware and firmware.aux ("00.01.0019;00.01.0004") + * UPS Firmware Revision : 00.01.0004 + * Communication Board Firmware Revision : 00.01.0019 */ { "ups.firmware", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_FIRMREV, "", SU_FLAG_STATIC, NULL }, { "ups.load", 0, 1.0, CPQPOWER_OID_LOAD_LEVEL, "", 0, NULL }, { "ups.realpower", 0, 1.0, CPQPOWER_OID_OUT_POWER, "", SU_OUTPUT_1, NULL }, + { "ups.realpower", 0, 1.0, ".1.3.6.1.4.1.232.165.3.9.3.0", "", SU_OUTPUT_1, NULL }, { "ups.L1.realpower", 0, 0.1, CPQPOWER_OID_OUT_POWER ".1", "", SU_OUTPUT_3, NULL }, { "ups.L2.realpower", 0, 0.1, CPQPOWER_OID_OUT_POWER ".2", "", SU_OUTPUT_3, NULL }, { "ups.L3.realpower", 0, 0.1, CPQPOWER_OID_OUT_POWER ".3", "", SU_OUTPUT_3, NULL }, @@ -154,27 +191,54 @@ static snmp_info_t cpqpower_mib[] = { { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_ALARM_OB, "", SU_STATUS_BATT, cpqpower_alarm_ob }, { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_ALARM_LB, "", SU_STATUS_BATT, cpqpower_alarm_lb }, /* { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, IETF_OID_BATT_STATUS, "", SU_STATUS_BATT, ietf_batt_info }, */ + /* FIXME: this should use either .1.3.6.1.4.1.232.165.3.11.1.0 (upsTopologyType) + * or .1.3.6.1.4.1.232.165.3.11.2.0 (upsTopoMachineCode) */ { "ups.type", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_POWER_STATUS, "", SU_STATUS_PWR, cpqpower_mode_info }, { "ups.test.result", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_UPS_TEST_RES, "", 0, cpqpower_test_res_info }, + /* FIXME: handle ups.date and ups.time + * - OID: .1.3.6.1.4.1.232.165.3.9.5.0 + * - format MM/DD/YYYY HH:MM:SS */ + /* FIXME: handle upsInputSource.0 (".1.3.6.1.4.1.232.165.3.3.5.0") + * other(1) + * none(2) + * primaryUtility(3) + * bypassFeed(4) + * secondaryUtility(5) + * generator(6) + * flywheel(7) + * fuelcell(8) */ + + { "ups.delay.shutdown", ST_FLAG_STRING | ST_FLAG_RW, 6, ".1.3.6.1.4.1.232.165.3.8.1.0", STR_DEFAULT_OFFDELAY, SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + { "ups.delay.start", ST_FLAG_STRING | ST_FLAG_RW, 6, ".1.3.6.1.4.1.232.165.3.8.2.0", STR_DEFAULT_ONDELAY, SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + { "ups.timer.shutdown", 0, 1, ".1.3.6.1.4.1.232.165.3.8.1.0", "", SU_FLAG_OK, NULL }, + { "ups.timer.start", 0, 1, ".1.3.6.1.4.1.232.165.3.8.2.0", "", SU_FLAG_OK, NULL }, /* Ambient page */ { "ambient.temperature", 0, 1.0, CPQPOWER_OID_AMBIENT_TEMP, "", 0, NULL }, + { "ambient.temperature.low", 0, 1.0, ".1.3.6.1.4.1.232.165.3.6.2.0", "", 0, NULL }, + { "ambient.temperature.high", 0, 1.0, ".1.3.6.1.4.1.232.165.3.6.3.0", "", 0, NULL }, /* Battery page */ { "battery.charge", 0, 1.0, CPQPOWER_OID_BATT_CHARGE, "", 0, NULL }, - { "battery.runtime", 0, 60.0, CPQPOWER_OID_BATT_RUNTIME, "", 0, NULL }, + { "battery.runtime", 0, 1.0, CPQPOWER_OID_BATT_RUNTIME, "", 0, NULL }, { "battery.voltage", 0, 0.1, CPQPOWER_OID_BATT_VOLTAGE, "", 0, NULL }, { "battery.current", 0, 0.1, CPQPOWER_OID_BATT_CURRENT, "", 0, NULL }, + /* FIXME: need the new variable (for ABM) + { "battery.status", 0, 0.1, ".1.3.6.1.4.1.232.165.3.2.5.0", "", 0, NULL }, */ /* Input page */ { "input.phases", 0, 1.0, CPQPOWER_OID_IN_LINES, "", SU_FLAG_SETINT, NULL, &input_phases }, /* { "input.phase", 0, 1.0, CPQPOWER_OID_IN_PHASE, "", SU_OUTPUT_1, NULL }, */ { "input.frequency", 0, 0.1, CPQPOWER_OID_IN_FREQ , "", 0, NULL }, { "input.voltage", 0, 1.0, CPQPOWER_OID_IN_VOLTAGE, "", SU_OUTPUT_1, NULL }, + { "input.voltage", 0, 1.0, ".1.3.6.1.4.1.232.165.3.3.4.1.2.1", "", SU_OUTPUT_1, NULL }, + { "input.voltage.nominal", ST_FLAG_RW | ST_FLAG_STRING, 3, ".1.3.6.1.4.1.232.165.3.9.2.0", "", SU_OUTPUT_1, NULL }, { "input.L1-N.voltage", 0, 1.0, CPQPOWER_OID_IN_VOLTAGE ".1", "", SU_INPUT_3, NULL }, { "input.L2-N.voltage", 0, 1.0, CPQPOWER_OID_IN_VOLTAGE ".2", "", SU_INPUT_3, NULL }, { "input.L3-N.voltage", 0, 1.0, CPQPOWER_OID_IN_VOLTAGE ".3", "", SU_INPUT_3, NULL }, { "input.current", 0, 0.1, CPQPOWER_OID_IN_CURRENT, "", SU_OUTPUT_1, NULL }, + { "input.current", 0, 0.1, ".1.3.6.1.4.1.232.165.3.3.4.1.3.1", "", SU_OUTPUT_1, NULL }, + { "input.L1.current", 0, 0.1, CPQPOWER_OID_IN_CURRENT ".1", "", SU_INPUT_3, NULL }, { "input.L2.current", 0, 0.1, CPQPOWER_OID_IN_CURRENT ".2", "", SU_INPUT_3, NULL }, { "input.L3.current", 0, 0.1, CPQPOWER_OID_IN_CURRENT ".3", "", SU_INPUT_3, NULL }, @@ -188,21 +252,76 @@ static snmp_info_t cpqpower_mib[] = { { "output.phases", 0, 1.0, CPQPOWER_OID_OUT_LINES, "", SU_FLAG_SETINT, NULL, &output_phases }, /* { "output.phase", 0, 1.0, CPQPOWER_OID_OUT_PHASE, "", SU_OUTPUT_1, NULL }, */ { "output.frequency", 0, 0.1, CPQPOWER_OID_OUT_FREQUENCY, "", 0, NULL }, + /* FIXME: handle multiplier (0.1 there) */ + { "output.frequency.nominal", ST_FLAG_RW | ST_FLAG_STRING, 3, ".1.3.6.1.4.1.232.165.3.9.4.0", "", SU_OUTPUT_1, NULL }, { "output.voltage", 0, 1.0, CPQPOWER_OID_OUT_VOLTAGE, "", SU_OUTPUT_1, NULL }, + { "output.voltage", 0, 1.0, ".1.3.6.1.4.1.232.165.3.4.4.1.2.1", "", SU_OUTPUT_1, NULL }, + { "output.voltage.nominal", ST_FLAG_RW | ST_FLAG_STRING, 3, ".1.3.6.1.4.1.232.165.3.9.1.0", "", SU_OUTPUT_1, NULL }, { "output.L1-N.voltage", 0, 1.0, CPQPOWER_OID_OUT_VOLTAGE ".1", "", SU_OUTPUT_3, NULL }, { "output.L2-N.voltage", 0, 1.0, CPQPOWER_OID_OUT_VOLTAGE ".2", "", SU_OUTPUT_3, NULL }, { "output.L3-N.voltage", 0, 1.0, CPQPOWER_OID_OUT_VOLTAGE ".3", "", SU_OUTPUT_3, NULL }, { "output.current", 0, 0.1, CPQPOWER_OID_OUT_CURRENT, "", SU_OUTPUT_1, NULL }, + { "output.current", 0, 0.1, ".1.3.6.1.4.1.232.165.3.4.4.1.3.1", "", SU_OUTPUT_1, NULL }, + /* { "output.realpower", 0, 1.0, ".1.3.6.1.4.1.232.165.3.4.4.1.4", "", SU_OUTPUT_1, NULL }, */ { "output.L1.current", 0, 0.1, CPQPOWER_OID_OUT_CURRENT ".1", "", SU_OUTPUT_3, NULL }, { "output.L2.current", 0, 0.1, CPQPOWER_OID_OUT_CURRENT ".2", "", SU_OUTPUT_3, NULL }, { "output.L3.current", 0, 0.1, CPQPOWER_OID_OUT_CURRENT ".3", "", SU_OUTPUT_3, NULL }, + /* FIXME: what to map with these? + * Name/OID: upsConfigLowOutputVoltageLimit.0; Value (Integer): 160 + * => input.transfer.low? + * Name/OID: upsConfigHighOutputVoltageLimit.0; Value (Integer): 288 + * => input.transfer.high? */ + + /* Outlet page */ + { "outlet.id", 0, 1, NULL, "0", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + { "outlet.desc", ST_FLAG_RW | ST_FLAG_STRING, 20, NULL, "All outlets", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + { "outlet.count", 0, 1, ".1.3.6.1.4.1.232.165.3.10.1.0", "0", 0, NULL }, /* upsNumReceptacles */ + +/* { "outlet.current", 0, 0.001, AR_OID_UNIT_CURRENT ".0", NULL, 0, NULL, NULL }, + { "outlet.voltage", 0, 0.001, AR_OID_UNIT_VOLTAGE ".0", NULL, 0, NULL, NULL }, + { "outlet.realpower", 0, 1.0, AR_OID_UNIT_ACTIVEPOWER ".0", NULL, 0, NULL, NULL }, + { "outlet.power", 0, 1.0, AR_OID_UNIT_APPARENTPOWER ".0", NULL, 0, NULL, NULL }, */ + + /* outlet template definition */ + /* FIXME always true? */ + { "outlet.%i.switchable", ST_FLAG_STRING, 3, ".1.3.6.1.4.1.232.165.3.10.2.1.1.%i", "yes", SU_FLAG_STATIC | SU_OUTLET, &cpqpower_outlet_switchability_info[0], NULL }, + { "outlet.%i.id", 0, 1, ".1.3.6.1.4.1.232.165.3.10.2.1.1.%i", "%i", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK | SU_OUTLET, NULL, NULL }, + /* { "outlet.%i.desc", ST_FLAG_RW | ST_FLAG_STRING, SU_INFOSIZE, AR_OID_OUTLET_NAME ".%i", NULL, SU_OUTLET, NULL, NULL }, */ + { "outlet.%i.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.232.165.3.10.2.1.2.%i", NULL, SU_FLAG_OK | SU_OUTLET, &cpqpower_outlet_status_info[0], NULL }, + /* FIXME: come up with a suitable varname! + * - The delay after going On Battery until the Receptacle is automatically turned Off. + * A value of -1 means that this Output should never be turned Off automatically, but must be turned Off only by command. + * { "outlet.%i.autoswitch.delay.shutdown", ST_FLAG_STRING | ST_FLAG_RW, 6, ".1.3.6.1.4.1.232.165.3.10.2.1.5.%i", STR_DEFAULT_OFFDELAY, SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, // upsRecepAutoOffDelay + * - Seconds delay after the Outlet is signaled to turn On before the Output is Automatically turned ON. + * A value of -1 means that this Output should never be turned On automatically, but only when specifically commanded to do so. + * { "outlet.%i.autoswitch.delay.start", ST_FLAG_STRING | ST_FLAG_RW, 6, ".1.3.6.1.4.1.232.165.3.10.2.1.5.%i", STR_DEFAULT_OFFDELAY, SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, // upsRecepAutoOnDelay + */ + /* FIXME: also define .stop (as for 'shutdown.reboot') + * and .delay */ + { "outlet.%i.load.off", 0, 0, ".1.3.6.1.4.1.232.165.3.10.2.1.3.%i", NULL, SU_TYPE_CMD | SU_OUTLET, NULL, NULL }, + { "outlet.%i.load.on", 0, 0, ".1.3.6.1.4.1.232.165.3.10.2.1.4.%i", NULL, SU_TYPE_CMD | SU_OUTLET, NULL, NULL }, + /* FIXME: also define a .delay or map to "outlet.%i.delay.shutdown" */ + { "outlet.%i.load.cycle", 0, 0, ".1.3.6.1.4.1.232.165.3.10.2.1.7.%i", NULL, SU_TYPE_CMD | SU_OUTLET, NULL, NULL }, + /* instant commands. */ - { "load.off", 0, CPQPOWER_OFF_DO, CPQPOWER_OID_SD_AFTER_DELAY, "", SU_TYPE_CMD, NULL }, -/* { CMD_SHUTDOWN, 0, CPQPOWER_OFF_GRACEFUL, CPQPOWER_OID_OFF, "", 0, NULL }, */ + /* We need to duplicate load.{on,off} Vs load.{on,off}.delay, since + * "0" cancels the shutdown, so we put "1" (second) for immediate off! */ + { "load.off", 0, 1, ".1.3.6.1.4.1.232.165.3.8.1.0", "", SU_TYPE_CMD, NULL }, + { "load.on", 0, 1, ".1.3.6.1.4.1.232.165.3.8.2.0", "", SU_TYPE_CMD, NULL }, + { "shutdown.stop", 0, 0, ".1.3.6.1.4.1.232.165.3.8.1.0", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, + /* FIXME: need ups.{timer,delay}.{start,shutdown} param counterparts! */ + + { "load.off.delay", 0, DEFAULT_OFFDELAY, ".1.3.6.1.4.1.232.165.3.8.1.0", "", SU_TYPE_CMD, NULL }, + { "load.on.delay", 0, DEFAULT_ONDELAY, ".1.3.6.1.4.1.232.165.3.8.2.0", "", SU_TYPE_CMD, NULL }, + /* { CMD_SHUTDOWN, 0, CPQPOWER_OFF_GRACEFUL, CPQPOWER_OID_OFF, "", 0, NULL }, */ + { "shutdown.reboot", 0, 0, ".1.3.6.1.4.1.232.165.3.8.6.0", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, + { "test.battery.start", 0, CPQPOWER_START_TEST, ".1.3.6.1.4.1.232.165.3.7.1.0", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, /* end of structure. */ { NULL, 0, 0, NULL, NULL, 0, NULL } }; -mib2nut_info_t compaq = { "cpqpower", CPQPOWER_MIB_VERSION, "", CPQPOWER_OID_MFR_NAME, cpqpower_mib }; +mib2nut_info_t compaq = { "cpqpower", CPQPOWER_MIB_VERSION, "", CPQPOWER_OID_MFR_NAME, cpqpower_mib, CPQPOWER_SYSOID }; + diff --git a/drivers/cps-hid.c b/drivers/cps-hid.c index b098df3..44824ff 100644 --- a/drivers/cps-hid.c +++ b/drivers/cps-hid.c @@ -52,7 +52,7 @@ static usb_device_id_t cps_usb_device_table[] = { { USB_DEVICE(CPS_VENDORID, 0x0005), NULL }, /* Dynex DX-800U? */ { USB_DEVICE(CPS_VENDORID, 0x0501), &cps_battery_scale }, - /* OR2200LCDRM2U */ + /* OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U */ { USB_DEVICE(CPS_VENDORID, 0x0601), NULL }, /* Terminating entry */ diff --git a/drivers/dstate.c b/drivers/dstate.c index 316c54f..2e5bd7e 100644 --- a/drivers/dstate.c +++ b/drivers/dstate.c @@ -3,6 +3,7 @@ Copyright (C) 2003 Russell Kroll 2008 Arjen de Korte + 2012 Arnaud Quette 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 @@ -273,6 +274,7 @@ static int st_tree_dump_conn(st_tree_t *node, conn_t *conn) { int ret; enum_t *etmp; + range_t *rtmp; if (!node) { return 1; /* not an error */ @@ -297,6 +299,13 @@ static int st_tree_dump_conn(st_tree_t *node, conn_t *conn) } } + /* send any ranges */ + for (rtmp = node->range_list; rtmp; rtmp = rtmp->next) { + if (!send_to_one(conn, "ADDRANGE %s %i %i\n", node->var, rtmp->min, rtmp->max)) { + return 0; + } + } + /* provide any auxiliary data */ if (node->aux) { if (!send_to_one(conn, "SETAUX %s %d\n", node->var, node->aux)) { @@ -318,7 +327,9 @@ static int st_tree_dump_conn(st_tree_t *node, conn_t *conn) snprintfcat(flist, sizeof(flist), " STRING"); } - send_to_one(conn, "SETFLAGS %s\n", flist); + if (!send_to_one(conn, "SETFLAGS %s\n", flist)) { + return 0; + } } if (node->right) { @@ -633,6 +644,19 @@ int dstate_addenum(const char *var, const char *fmt, ...) return ret; } +int dstate_addrange(const char *var, const int min, const int max) +{ + int ret; + + ret = state_addrange(dtree_root, var, min, max); + + if (ret == 1) { + send_to_all("ADDRANGE %s %i %i\n", var, min, max); + } + + return ret; +} + void dstate_setflags(const char *var, int flags) { st_tree_t *sttmp; @@ -739,6 +763,20 @@ int dstate_delenum(const char *var, const char *val) return ret; } +int dstate_delrange(const char *var, const int min, const int max) +{ + int ret; + + ret = state_delrange(dtree_root, var, min, max); + + /* update listeners */ + if (ret == 1) { + send_to_all("DELRANGE %s \"%i %i\"\n", var, min, max); + } + + return ret; +} + int dstate_delcmd(const char *cmd) { int ret; diff --git a/drivers/dstate.h b/drivers/dstate.h index 7ffe899..b4a5aa9 100644 --- a/drivers/dstate.h +++ b/drivers/dstate.h @@ -1,6 +1,8 @@ /* dstate.h - Network UPS Tools driver-side state management - Copyright (C) 2003 Russell Kroll + Copyright (C) + 2003 Russell Kroll + 2012 Arnaud Quette 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 @@ -45,12 +47,14 @@ int dstate_setinfo(const char *var, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); int dstate_addenum(const char *var, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); +int dstate_addrange(const char *var, const int min, const int max); void dstate_setflags(const char *var, int flags); void dstate_setaux(const char *var, int aux); const char *dstate_getinfo(const char *var); void dstate_addcmd(const char *cmdname); int dstate_delinfo(const char *var); int dstate_delenum(const char *var, const char *val); +int dstate_delrange(const char *var, const int min, const int max); int dstate_delcmd(const char *cmd); void dstate_free(void); const st_tree_t *dstate_getroot(void); diff --git a/drivers/dummy-ups.c b/drivers/dummy-ups.c index c2e9957..7dbb991 100644 --- a/drivers/dummy-ups.c +++ b/drivers/dummy-ups.c @@ -40,7 +40,7 @@ #include "dummy-ups.h" #define DRIVER_NAME "Device simulation and repeater driver" -#define DRIVER_VERSION "0.12" +#define DRIVER_VERSION "0.13" /* driver description structure */ upsdrv_info_t upsdrv_info = diff --git a/drivers/dummy-ups.h b/drivers/dummy-ups.h index b086a52..49294ca 100644 --- a/drivers/dummy-ups.h +++ b/drivers/dummy-ups.h @@ -1,7 +1,7 @@ /* dummy-ups.h - NUT testing driver and repeater Copyright (C) - 2005 - 2010 Arnaud Quette + 2005 - 2012 Arnaud Quette 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 @@ -18,11 +18,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* This file list all valid data with their type and info. - * this are then enable through a definition file, specified +/* This file lists all valid data with their type and info. + * + * These are then enabled through a definition file, specified * as the "port" parameter (only the file name, not the path). + * * The format of this file is the same as an upsc dump: + * * : + * * FIXME: use cmdvartab for conformance checking * ... * Once the driver is loaded: @@ -36,24 +40,31 @@ /* Struct & data for ups.status processing */ /* --------------------------------------------------------------- */ +#if 0 /* XXX status lookup table not currently used???? */ +/* + * Status lookup table type definition + */ typedef struct { - const char *status_str; /* ups.status string */ - int status_value; /* ups.status value */ + const char *status_str; /* ups.status string */ + int status_value; /* ups.status flag bit */ } status_lkp_t; -#define STATUS_CAL 1 /* calibration */ -#define STATUS_TRIM 2 /* SmartTrim */ -#define STATUS_BOOST 4 /* SmartBoost */ -#define STATUS_OL 8 /* on line */ -#define STATUS_OB 16 /* on battery */ -#define STATUS_OVER 32 /* overload */ -#define STATUS_LB 64 /* low battery */ -#define STATUS_RB 128 /* replace battery */ -#define STATUS_BYPASS 256 /* on bypass */ -#define STATUS_OFF 512 /* ups is off */ -#define STATUS_CHRG 1024 /* charging */ -#define STATUS_DISCHRG 2048 /* discharging */ +#define STATUS_CAL (1 << 0) /* calibration */ +#define STATUS_TRIM (1 << 1) /* SmartTrim */ +#define STATUS_BOOST (1 << 2) /* SmartBoost */ +#define STATUS_OL (1 << 3) /* on line */ +#define STATUS_OB (1 << 4) /* on battery */ +#define STATUS_OVER (1 << 5) /* overload */ +#define STATUS_LB (1 << 6) /* low battery */ +#define STATUS_RB (1 << 7) /* replace battery */ +#define STATUS_BYPASS (1 << 8) /* on bypass */ +#define STATUS_OFF (1 << 9) /* ups is off */ +#define STATUS_CHRG (1 << 10) /* charging */ +#define STATUS_DISCHRG (1 << 11) /* discharging */ +/* + * Status lookup table + */ status_lkp_t status_info[] = { { "CAL", STATUS_CAL }, { "TRIM", STATUS_TRIM }, @@ -69,7 +80,7 @@ status_lkp_t status_info[] = { { "DISCHRG", STATUS_DISCHRG }, { "NULL", 0 }, }; -/* from usbhid-ups.h */ +#endif /* 0 -- not currently used??? */ typedef struct { char hid_value; /* HID value */ @@ -96,7 +107,6 @@ typedef struct { /* data flags */ #define DU_FLAG_NONE 0 #define DU_FLAG_INIT 1 /* intialy show element to upsd */ -#define DU_TYPE_CMD 2 /* --------------------------------------------------------------- */ /* Data table (all possible info from NUT, then enable upon cong */ @@ -166,16 +176,16 @@ battery.alarm.threshold battery.date battery.packs battery.packs.bad - -ambient.temperature -ambient.temperature.alarm -ambient.temperature.high -ambient.temperature.low -ambient.humidity -ambient.humidity.alarm -ambient.humidity.high -ambient.humidity.low - +*/ + { "ambient.temperature", ST_FLAG_RW, 1, NULL, DU_FLAG_NONE, NULL }, + { "ambient.temperature.alarm", ST_FLAG_RW, 1, NULL, DU_FLAG_NONE, NULL }, + { "ambient.temperature.high", ST_FLAG_RW, 1, NULL, DU_FLAG_NONE, NULL }, + { "ambient.temperature.low", ST_FLAG_RW, 1, NULL, DU_FLAG_NONE, NULL }, + { "ambient.humidity", ST_FLAG_RW, 1, NULL, DU_FLAG_NONE, NULL }, + { "ambient.humidity.alarm", ST_FLAG_RW, 1, NULL, DU_FLAG_NONE, NULL }, + { "ambient.humidity.high", ST_FLAG_RW, 1, NULL, DU_FLAG_NONE, NULL }, + { "ambient.humidity.low", ST_FLAG_RW, 1, NULL, DU_FLAG_NONE, NULL }, +/* FIXME: how to manage these? outlet.n.id outlet.n.desc diff --git a/drivers/ietf-mib.c b/drivers/ietf-mib.c index 0cc3192..6cae43d 100644 --- a/drivers/ietf-mib.c +++ b/drivers/ietf-mib.c @@ -1,9 +1,9 @@ /* ietf-mib.c - data to monitor SNMP UPS (RFC 1628 compliant) with NUT * * Copyright (C) 2002-2006 - * Arnaud Quette - * Niels Baggesen - * Arjen de Korte + * 2002-2012 Arnaud Quette + * 2002-2006 Niels Baggesen + * 2002-2006 Arjen de Korte * * Sponsored by MGE UPS SYSTEMS * @@ -26,7 +26,7 @@ #include "ietf-mib.h" -#define IETF_MIB_VERSION "1.3" +#define IETF_MIB_VERSION "1.4" /* SNMP OIDs set */ #define IETF_OID_UPS_MIB "1.3.6.1.2.1.33.1." @@ -263,7 +263,7 @@ static snmp_info_t ietf_mib[] = { { "output.power.nominal", 0, 1.0, IETF_OID_UPS_MIB "9.5.0", "", 0, NULL }, /* upsConfigOutputVA */ { "output.realpower.nominal", 0, 1.0, IETF_OID_UPS_MIB "9.6.0", "", 0, NULL }, /* upsConfigOutputPower */ { "battery.runtime.low", 0, 60.0, IETF_OID_UPS_MIB "9.7.0", "", 0, NULL }, /* upsConfigLowBattTime */ - { "beeper.status", ST_FLAG_STRING, SU_INFOSIZE, IETF_OID_UPS_MIB "9.8.0", "", 0, ietf_beeper_status_info }, /* upsConfigAudibleStatus */ + { "ups.beeper.status", ST_FLAG_STRING, SU_INFOSIZE, IETF_OID_UPS_MIB "9.8.0", "", 0, ietf_beeper_status_info }, /* upsConfigAudibleStatus */ { "beeper.disable", 0, 1, IETF_OID_UPS_MIB "9.8.0", "", SU_TYPE_CMD, NULL }, { "beeper.enable", 0, 2, IETF_OID_UPS_MIB "9.8.0", "", SU_TYPE_CMD, NULL }, { "beeper.mute", 0, 3, IETF_OID_UPS_MIB "9.8.0", "", SU_TYPE_CMD, NULL }, diff --git a/drivers/libshut.c b/drivers/libshut.c index 2028648..3c33668 100644 --- a/drivers/libshut.c +++ b/drivers/libshut.c @@ -41,7 +41,7 @@ #include "common.h" /* for xmalloc, upsdebugx prototypes */ #define SHUT_DRIVER_NAME "SHUT communication driver" -#define SHUT_DRIVER_VERSION "0.82" +#define SHUT_DRIVER_VERSION "0.83" /* communication driver description structure */ upsdrv_info_t comm_upsdrv_info = { @@ -610,7 +610,7 @@ void setline(int upsfd, int set) int shut_synchronise(int upsfd) { int retCode = 0; - u_char c = SHUT_SYNC, reply; + u_char c = SHUT_SYNC_OFF, reply; int try; upsdebugx (2, "entering shut_synchronise()"); @@ -695,6 +695,12 @@ int shut_packet_recv(int upsfd, u_char *Buf, int datalen) memcpy(Buf, Start, 1); return 1; } + else if(Start[0]==SHUT_SYNC_OFF) + { + upsdebugx (4, "received SYNC_OFF token"); + memcpy(Buf, Start, 1); + return 1; + } else { /* if((serial_read (SHUT_TIMEOUT, &Start[1]) > 0) && */ @@ -703,6 +709,12 @@ int shut_packet_recv(int upsfd, u_char *Buf, int datalen) { upsdebug_hex(4, "Receive", Start, 2); Size=Start[1]&0x0F; + if( Size > 8 ) { + upsdebugx (4, "shut_packet_recv: invalid frame size = %d", Size); + ser_send_char(upsfd, SHUT_NOK); + Retry++; + break; + } /* sdata.shut_pkt.bLength = Size; */ for(recv=0;recv notification"); @@ -736,7 +750,7 @@ int shut_packet_recv(int upsfd, u_char *Buf, int datalen) Pos=0; } else - return Pos; + return Pos; } else upsdebugx (4, "need more data (%i)!", datalen); @@ -876,8 +890,10 @@ int shut_control_msg(int upsfd, int requesttype, int request, upsdebug_hex(4, "data", bytes, data_size); } } - else - data_size = (size >= 8) ? 8 : remaining_size; + else { + /* Always 8 bytes payload for GET_REPORT with SHUT */ + data_size = 8; + } /* Forge the SHUT Frame */ shut_pkt[0] = SHUT_TYPE_REQUEST + ( ((requesttype == REQUEST_TYPE_SET_REPORT) && (remaining_size>8))? 0 : SHUT_PKT_LAST); @@ -970,7 +986,7 @@ int shut_wait_ack(int upsfd) upsdebugx (2, "shut_wait_ack(): NACK received"); retCode = -2; } - else if ((c & SHUT_PKT_LAST) == SHUT_TYPE_NOTIFY) + else if ((c & 0x0f) == SHUT_TYPE_NOTIFY) { upsdebugx (2, "shut_wait_ack(): NOTIFY received"); retCode = -3; diff --git a/drivers/liebert-hid.c b/drivers/liebert-hid.c index 2cce0ee..2ef293f 100644 --- a/drivers/liebert-hid.c +++ b/drivers/liebert-hid.c @@ -29,7 +29,7 @@ #define LIEBERT_HID_VERSION "Liebert HID 0.3" /* FIXME: experimental flag to be put in upsdrv_info */ -/* Phoenixtec */ +/* Phoenixtec Power Co., Ltd */ #define LIEBERT_VENDORID 0x06da /* USB IDs device table */ diff --git a/drivers/metasys.c b/drivers/metasys.c index e80217f..d05e5ef 100644 --- a/drivers/metasys.c +++ b/drivers/metasys.c @@ -108,7 +108,7 @@ void dump_buffer(unsigned char *buffer, int buf_len) { int i; for (i = 0; i < buf_len; i++) { printf("byte %d: %x\n", i, buffer[i]); - } + } return; } @@ -127,7 +127,7 @@ void send_read_command(char command) { if (retry == 4) send_zeros(); /* last retry is preceded by a serial reset...*/ sent = ser_send_buf(upsfd, buf, 4); retry += 1; - } + } } /* send a write command to the UPS, the write command and the value to be written are passed @@ -136,20 +136,20 @@ void send_read_command(char command) { void send_write_command(unsigned char *command, int command_length) { int i, retry, sent, checksum; unsigned char raw_buf[255]; - + /* prepares the raw data */ raw_buf[0] = 0x02; /* STX byte */ raw_buf[1] = (unsigned char)(command_length + 1); /* data length + checksum */ memcpy(raw_buf+2, command, command_length); command_length += 2; - + /* calculate checksum */ checksum = 0; for (i = 1; i < command_length; i++) checksum += raw_buf[i]; checksum = checksum % 256; raw_buf[command_length] = (unsigned char)checksum; command_length +=1; - + retry = 0; sent = 0; while ((sent != (command_length)) && (retry < 5)) { @@ -157,7 +157,7 @@ void send_write_command(unsigned char *command, int command_length) { sent = ser_send_buf(upsfd, raw_buf, (command_length)); if (sent != (command_length)) printf("Error sending command %d\n", raw_buf[2]); retry += 1; - } + } } @@ -192,7 +192,7 @@ int get_answer(unsigned char *data) { ser_comm_fail("Receive error (data): got %d bytes instead of %d!!!\n", res, packet_length); return -1; } - + /* now we have the whole answer from the ups, we can checksum it checksum byte is equal to the sum modulus 256 of all the data bytes + packet_length (no STX no checksum byte itself) */ @@ -215,7 +215,7 @@ int get_answer(unsigned char *data) { int command_read_sequence(unsigned char command, unsigned char *data) { int bytes_read = 0; int retry = 0; - + while ((bytes_read < 1) && (retry < 5)) { send_read_command(command); bytes_read = get_answer(data); @@ -806,7 +806,7 @@ void upsdrv_updateinfo(void) printf("status unknown \n"); break; } - status_commit(); + status_commit(); dstate_dataok(); } return; @@ -815,8 +815,7 @@ void upsdrv_updateinfo(void) void upsdrv_shutdown(void) { unsigned char command[10], answer[10]; - - + /* Ensure that the ups is configured for automatically restart after a complete battery discharge and when the power comes back after a shutdown */ @@ -831,14 +830,14 @@ void upsdrv_shutdown(void) command[5]=0x01; /* autorestart after battery depleted enabled */ command_write_sequence(command, 6, answer); } - + /* shedule a shutdown in 120 seconds */ command[0]=UPS_SET_SCHEDULING; command[1]=0x96; /* remaining */ command[2]=0x00; /* time */ command[3]=0x00; /* to */ command[4]=0x00; /* shutdown 150 secs */ - + /* restart time has been set to 1 instead of 0 for avoiding a bug in some ups firmware */ command[5]=0x01; /* programmed */ @@ -860,7 +859,7 @@ static int instcmd(const char *cmdname, const char *extra) { unsigned char command[10], answer[10]; int res; - + if (!strcasecmp(cmdname, "beeper.off")) { /* compatibility mode for old command */ upslogx(LOG_WARNING, @@ -892,7 +891,7 @@ static int instcmd(const char *cmdname, const char *extra) command[2]=0x00; /* time */ command[3]=0x00; /* to */ command[4]=0x00; /* shutdown 30 secs */ - + command[5]=0x01; /* programmed */ command[6]=0x00; /* time */ command[7]=0x00; /* to */ @@ -900,7 +899,7 @@ static int instcmd(const char *cmdname, const char *extra) command_write_sequence(command, 9, answer); return STAT_INSTCMD_HANDLED; } - + if (!strcasecmp(cmdname, "shutdown.stayoff")) { /* shedule a shutdown in 30 seconds with no restart (-1) */ command[0]=UPS_SET_SCHEDULING; @@ -916,7 +915,7 @@ static int instcmd(const char *cmdname, const char *extra) command_write_sequence(command, 9, answer); return STAT_INSTCMD_HANDLED; } - + if (!strcasecmp(cmdname, "shutdown.stop")) { /* set shutdown and restart time to -1 (no shutdown, no restart) */ command[0]=UPS_SET_SCHEDULING; @@ -943,7 +942,7 @@ static int instcmd(const char *cmdname, const char *extra) command_write_sequence(command, 2, answer); return STAT_INSTCMD_HANDLED; } - + if (!strcasecmp(cmdname, "test.failure.stop")) { /* restore standard mode (mains power) */ command[0]=UPS_SET_BATTERY_TEST; @@ -954,7 +953,7 @@ static int instcmd(const char *cmdname, const char *extra) command_write_sequence(command, 2, answer); return STAT_INSTCMD_HANDLED; } - + if (!strcasecmp(cmdname, "test.battery.start")) { /* launch battery test */ command[0]=UPS_SET_BATTERY_TEST; @@ -996,7 +995,7 @@ static int instcmd(const char *cmdname, const char *extra) upslogx(LOG_NOTICE, "test battery byte 1 = %x", answer[1]); return STAT_INSTCMD_HANDLED; } - + if (!strcasecmp(cmdname, "beeper.enable")) { /* set buzzer to not muted */ command[0]=UPS_SET_BUZZER_MUTE; @@ -1007,7 +1006,7 @@ static int instcmd(const char *cmdname, const char *extra) command_write_sequence(command, 2, answer); return STAT_INSTCMD_HANDLED; } - + if (!strcasecmp(cmdname, "beeper.mute")) { /* set buzzer to muted */ command[0]=UPS_SET_BUZZER_MUTE; diff --git a/drivers/mge-hid.c b/drivers/mge-hid.c index 7c07703..628152d 100644 --- a/drivers/mge-hid.c +++ b/drivers/mge-hid.c @@ -1,6 +1,6 @@ -/* mge-hid.c - data to monitor MGE UPS SYSTEMS HID (USB and serial) devices +/* mge-hid.c - data to monitor Eaton / MGE HID (USB and serial) devices * - * Copyright (C) 2003 - 2009 + * Copyright (C) 2003 - 2012 * Arnaud Quette * * Sponsored by MGE UPS SYSTEMS @@ -22,11 +22,21 @@ * */ +/* TODO list: + * - better processing of FW info: + * * some models (HP R5000) include firmware.aux (00.01.0021;00.01.00) + * * other (9130) need more processing (0128 => 1.28) + * ... + * - better handling of input.transfer.* (need dstate_addrange) + * - outlet management logic (Ie, for outlet.X.load.{on,off}.delay + * => use outlet.X.delay.{start,stop} + */ + #include "main.h" /* for getval() */ #include "usbhid-ups.h" #include "mge-hid.h" -#define MGE_HID_VERSION "MGE HID 1.27" +#define MGE_HID_VERSION "MGE HID 1.31" /* (prev. MGE Office Protection Systems, prev. MGE UPS SYSTEMS) */ /* Eaton */ @@ -38,6 +48,9 @@ /* Powerware */ #define POWERWARE_VENDORID 0x0592 +/* Hewlett Packard */ +#define HP_VENDORID 0x03f0 + #ifndef SHUT_MODE #include "usb-common.h" @@ -53,6 +66,14 @@ static usb_device_id_t mge_usb_device_table[] = { /* PW 9140 */ { USB_DEVICE(POWERWARE_VENDORID, 0x0004), NULL }, + /* R/T3000 */ + { USB_DEVICE(HP_VENDORID, 0x1fe5), NULL }, + /* R/T3000 */ + { USB_DEVICE(HP_VENDORID, 0x1fe6), NULL }, + /* various models */ + { USB_DEVICE(HP_VENDORID, 0x1fe7), NULL }, + { USB_DEVICE(HP_VENDORID, 0x1fe8), NULL }, + /* Terminating entry */ { -1, -1, NULL } }; @@ -326,6 +347,53 @@ static info_lkp_t pegasus_threshold_info[] = { { 0, NULL, NULL } }; +/* allow limiting standard yes/no info (here, to enable ECO mode) to + * ups.model = Protection Station, Ellipse Eco and 3S (US 750 and AUS 700 only!) + * this allows to enable special flags used in hid_info_t entries (Ie RW) */ +static const char *pegasus_yes_no_info_fun(double value) +{ + switch (mge_type & 0xFF00) /* Ignore model byte */ + { + case MGE_PEGASUS: + break; + case MGE_3S: + /* Only consider non European models */ + if (country_code != COUNTRY_EUROPE) + break; + default: + return NULL; + } + + return (value == 0) ? "no" : "yes"; +} + +/* Conversion back of yes/no info */ +static double pegasus_yes_no_info_nuf(const char *value) +{ + switch (mge_type & 0xFF00) /* Ignore model byte */ + { + case MGE_PEGASUS: + break; + case MGE_3S: + /* Only consider non European models */ + if (country_code != COUNTRY_EUROPE) + break; + default: + return 0; + } + + if (!strncmp(value, "yes", 3)) + return 1; + else + return 0; +} + +info_lkp_t pegasus_yes_no_info[] = { + { 0, "no", pegasus_yes_no_info_fun, pegasus_yes_no_info_nuf }, + { 1, "yes", pegasus_yes_no_info_fun, pegasus_yes_no_info_nuf }, + { 0, NULL, NULL } +}; + /* Determine country using UPS.PowerSummary.Country. * If not present: * if PowerConverter.Output.Voltage >= 200 => "Europe" @@ -448,7 +516,7 @@ static info_lkp_t nominal_output_voltage_info[] = { /* Vendor-specific usage table */ /* --------------------------------------------------------------- */ -/* MGE UPS SYSTEMS usage table */ +/* Eaton / MGE HID usage table */ static usage_lkp_t mge_usage_lkp[] = { { "Undefined", 0xffff0000 }, { "STS", 0xffff0001 }, @@ -474,7 +542,7 @@ static usage_lkp_t mge_usage_lkp[] = { { "EventID", 0xffff001f }, { "CircuitBreaker", 0xffff0020 }, { "TransferForbidden", 0xffff0021 }, - { "OverallAlarm", 0xffff0022 }, + { "OverallAlarm", 0xffff0022 }, /* renamed to Alarm in Eaton SW! */ { "Dephasing", 0xffff0023 }, { "BypassBreaker", 0xffff0024 }, { "PowerModule", 0xffff0025 }, @@ -486,8 +554,9 @@ static usage_lkp_t mge_usage_lkp[] = { { "NotificationStatus", 0xffff002b }, { "ProtectionLost", 0xffff002c }, { "ConfigurationFailure", 0xffff002d }, + { "CompatibilityFailure", 0xffff002e }, /* 0xffff002e-0xffff003f => Reserved */ - { "SwitchType", 0xffff0040 }, + { "SwitchType", 0xffff0040 }, /* renamed to Type in Eaton SW! */ { "ConverterType", 0xffff0041 }, { "FrequencyConverterMode", 0xffff0042 }, { "AutomaticRestart", 0xffff0043 }, @@ -556,8 +625,12 @@ static usage_lkp_t mge_usage_lkp[] = { { "HighHumidity", 0xffff0082 }, { "LowTemperature", 0xffff0083 }, { "HighTemperature", 0xffff0084 }, - /* 0xffff0085-0xffff008f (minus 0xffff0086) => Reserved */ + { "ECOControl", 0xffff0085 }, { "Efficiency", 0xffff0086 }, + { "ABMEnable", 0xffff0087 }, + { "NegativeCurrent", 0xffff0088 }, + { "AutomaticStart", 0xffff0089 }, + /* 0xffff008a-0xffff008f => Reserved */ { "Count", 0xffff0090 }, { "Timer", 0xffff0091 }, { "Interval", 0xffff0092 }, @@ -569,16 +642,26 @@ static usage_lkp_t mge_usage_lkp[] = { { "Code", 0xffff0098 }, { "DataValid", 0xffff0099 }, { "ToggleTimer", 0xffff009a }, - /* 0xffff009b-0xffff009f => Reserved */ - { "PDU", 0xffff00a0 }, + { "BypassTransferDelay", 0xffff009b }, + { "HysteresysVoltageTransfer", 0xffff009c }, + { "SlewRate", 0xffff009d }, + /* 0xffff009e-0xffff009f => Reserved */ + { "PDU", 0xffff00a0 }, { "Breaker", 0xffff00a1 }, { "BreakerID", 0xffff00a2 }, - { "OverVoltage", 0xffff00a3 }, + { "OverVoltage", 0xffff00a3 }, { "Tripped", 0xffff00a4 }, { "OverEnergy", 0xffff00a5 }, - { "OverHumidity", 0xffff00a6 }, - { "LCDControl", 0xffff00a6 }, - /* 0xffff00a8-0xffff00df => Reserved */ + { "OverHumidity", 0xffff00a6 }, + { "ConfigurationReset", 0xffff00a7 }, /* renamed from LCDControl in Eaton SW! */ + { "Level", 0xffff00a8 }, + { "PDUType", 0xffff00a9 }, + { "ReactivePower", 0xffff00aa }, + { "Pole", 0xffff00ab }, + { "PoleID", 0xffff00ac }, + { "Reset", 0xffff00ad }, + { "WatchdogReset", 0xffff00ae }, + /* 0xffff00af-0xffff00df => Reserved */ { "COPIBridge", 0xffff00e0 }, /* 0xffff00e1-0xffff00ef => Reserved */ { "iModel", 0xffff00f0 }, @@ -586,7 +669,8 @@ static usage_lkp_t mge_usage_lkp[] = { { "iTechnicalLevel", 0xffff00f2 }, { "iPartNumber", 0xffff00f3 }, { "iReferenceNumber", 0xffff00f4 }, - /* 0xffff00f5-0xffff00ff => Reserved */ + { "iGang", 0xffff00f5 }, + /* 0xffff00f6-0xffff00ff => Reserved */ /* end of table */ { NULL, 0 } @@ -941,7 +1025,7 @@ static hid_info_t mge_hid2nut[] = { "outlet.power", 0, 0, "UPS.OutletSystem.Outlet.[1].ApparentPower", NULL, "%.0f", 0, NULL }, { "outlet.realpower", 0, 0, "UPS.OutletSystem.Outlet.[1].ActivePower", NULL, "%.0f", 0, NULL }, { "outlet.current", 0, 0, "UPS.OutletSystem.Outlet.[1].Current", NULL, "%.2f", 0, NULL }, - { "outlet.powerfactor", 0, 0, "UPS.OutletSystem.Outlet.[1].PowerFactor", NULL, "%.2f", 0, NULL }, // "%s", 0, mge_powerfactor_conversion }, + { "outlet.powerfactor", 0, 0, "UPS.OutletSystem.Outlet.[1].PowerFactor", NULL, "%.2f", 0, NULL }, /* "%s", 0, mge_powerfactor_conversion }, */ /* First outlet */ { "outlet.1.id", 0, 0, "UPS.OutletSystem.Outlet.[2].OutletID", NULL, "%.0f", HU_FLAG_STATIC, NULL }, @@ -950,18 +1034,22 @@ static hid_info_t mge_hid2nut[] = { "outlet.1.status", 0, 0, "UPS.OutletSystem.Outlet.[2].PresentStatus.SwitchOn/Off", NULL, "%s", 0, on_off_info }, /* For low end models, with 1 non backup'ed outlet */ { "outlet.1.status", 0, 0, "UPS.PowerSummary.PresentStatus.ACPresent", NULL, "%s", 0, on_off_info }, + /* FIXME: change to outlet.1.battery.charge.low, as in mge-xml.c?! */ { "outlet.1.autoswitch.charge.low", ST_FLAG_RW | ST_FLAG_STRING, 3, "UPS.OutletSystem.Outlet.[2].RemainingCapacityLimit", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "outlet.1.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.OutletSystem.Outlet.[2].ShutdownTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "outlet.1.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.OutletSystem.Outlet.[2].StartupTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "outlet.1.power", 0, 0, "UPS.OutletSystem.Outlet.[2].ApparentPower", NULL, "%.0f", 0, NULL }, { "outlet.1.realpower", 0, 0, "UPS.OutletSystem.Outlet.[2].ActivePower", NULL, "%.0f", 0, NULL }, { "outlet.1.current", 0, 0, "UPS.OutletSystem.Outlet.[2].Current", NULL, "%.2f", 0, NULL }, - { "outlet.1.powerfactor", 0, 0, "UPS.OutletSystem.Outlet.[2].PowerFactor", NULL, "%.2f", 0, NULL }, // "%s", 0, mge_powerfactor_conversion }, + { "outlet.1.powerfactor", 0, 0, "UPS.OutletSystem.Outlet.[2].PowerFactor", NULL, "%.2f", 0, NULL }, /* "%s", 0, mge_powerfactor_conversion }, */ /* Second outlet */ { "outlet.2.id", 0, 0, "UPS.OutletSystem.Outlet.[3].OutletID", NULL, "%.0f", HU_FLAG_STATIC, NULL }, { "outlet.2.desc", ST_FLAG_RW | ST_FLAG_STRING, 20, "UPS.OutletSystem.Outlet.[3].OutletID", NULL, "PowerShare Outlet 2", HU_FLAG_ABSENT, NULL }, - /* needed for Pegasus to enable master/slave mode */ - { "outlet.2.switchable", ST_FLAG_RW | ST_FLAG_STRING, 3, "UPS.OutletSystem.Outlet.[3].PresentStatus.Switchable", NULL, "%s", HU_FLAG_SEMI_STATIC, yes_no_info }, + /* needed for Pegasus to enable master/slave mode: + * FIXME: rename to something more suitable (outlet.?) */ + { "outlet.2.switchable", ST_FLAG_RW | ST_FLAG_STRING, 3, "UPS.OutletSystem.Outlet.[3].PresentStatus.Switchable", NULL, "%s", HU_FLAG_SEMI_STATIC, pegasus_yes_no_info }, + /* Generic version (RO) for other models */ + { "outlet.2.switchable", 0, 0, "UPS.OutletSystem.Outlet.[3].PresentStatus.Switchable", NULL, "%s", 0, yes_no_info }, { "outlet.2.status", 0, 0, "UPS.OutletSystem.Outlet.[3].PresentStatus.SwitchOn/Off", NULL, "%s", 0, on_off_info }, { "outlet.2.autoswitch.charge.low", ST_FLAG_RW | ST_FLAG_STRING, 3, "UPS.OutletSystem.Outlet.[3].RemainingCapacityLimit", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "outlet.2.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.OutletSystem.Outlet.[3].ShutdownTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, @@ -969,7 +1057,7 @@ static hid_info_t mge_hid2nut[] = { "outlet.2.power", 0, 0, "UPS.OutletSystem.Outlet.[3].ApparentPower", NULL, "%.0f", 0, NULL }, { "outlet.2.realpower", 0, 0, "UPS.OutletSystem.Outlet.[3].ActivePower", NULL, "%.0f", 0, NULL }, { "outlet.2.current", 0, 0, "UPS.OutletSystem.Outlet.[3].Current", NULL, "%.2f", 0, NULL }, - { "outlet.2.powerfactor", 0, 0, "UPS.OutletSystem.Outlet.[3].PowerFactor", NULL, "%.2f", 0, NULL }, // "%s", 0, mge_powerfactor_conversion }, + { "outlet.2.powerfactor", 0, 0, "UPS.OutletSystem.Outlet.[3].PowerFactor", NULL, "%.2f", 0, NULL }, /* "%s", 0, mge_powerfactor_conversion }, */ /* instant commands. */ /* splited into subset while waiting for extradata support @@ -1084,20 +1172,37 @@ static int mge_claim(HIDDevice_t *hd) { switch (status) { - case POSSIBLY_SUPPORTED: - /* by default, reject, unless the productid option is given */ - if (getval("productid")) { - return 1; - } - possibly_supported("Eaton / MGE", hd); - return 0; + case POSSIBLY_SUPPORTED: - case SUPPORTED: - return 1; + switch (hd->VendorID) + { + case HP_VENDORID: + case DELL_VENDORID: + /* by default, reject, unless the productid option is given */ + if (getval("productid")) { + return 1; + } - case NOT_SUPPORTED: - default: - return 0; + /* + * this vendor makes lots of USB devices that are + * not a UPS, so don't use possibly_supported here + */ + return 0; + default: /* Valid for Eaton */ + /* by default, reject, unless the productid option is given */ + if (getval("productid")) { + return 1; + } + possibly_supported("Eaton / MGE", hd); + return 0; + } + + case SUPPORTED: + return 1; + + case NOT_SUPPORTED: + default: + return 0; } #else return 1; diff --git a/drivers/mge-mib.c b/drivers/mge-mib.c index 8c8c59f..e19816b 100644 --- a/drivers/mge-mib.c +++ b/drivers/mge-mib.c @@ -1,11 +1,12 @@ /* mge-mib.c - data to monitor MGE UPS SYSTEMS SNMP devices with NUT * - * Copyright (C) 2002-2003 - * Arnaud Quette - * J.W. Hoogervorst + * Copyright (C) + * 2002-2012 Arnaud Quette + * 2002-2003 J.W. Hoogervorst * * Sponsored by MGE UPS SYSTEMS - * and MGE Office Protection Systems + * MGE Office Protection Systems + * Eaton * * 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 @@ -26,7 +27,7 @@ #include "mge-mib.h" -#define MGE_MIB_VERSION "0.4" +#define MGE_MIB_VERSION "0.5" /* TODO: * - MGE PDU MIB and sysOID (".1.3.6.1.4.1.705.2") */ @@ -72,6 +73,73 @@ static info_lkp_t mge_overload_info[] = { { 0, "NULL" } }; + +static info_lkp_t mge_replacebatt_info[] = { + { 1, "RB" }, + { 2, "" }, + { 0, "NULL" } +}; + +static info_lkp_t mge_output_util_off_info[] = { + { 1, "OFF" }, + { 2, "" }, + { 0, "NULL" } +}; + +static info_lkp_t mge_transfer_reason_info[] = { + { 1, "" }, + { 2, "input voltage out of range" }, + { 3, "input frequency out of range" }, + { 4, "utility off" }, + { 0, "NULL" } +}; + +static info_lkp_t ietf_test_result_info[] = { + { 1, "done and passed" }, + { 2, "done and warning" }, + { 3, "done and error" }, + { 4, "aborted" }, + { 5, "in progress" }, + { 6, "no test initiated" }, + { 0, "NULL" } +}; + +static info_lkp_t ietf_beeper_status_info[] = { + { 1, "disabled" }, + { 2, "enabled" }, + { 3, "muted" }, + { 0, "NULL" } +}; + +static info_lkp_t ietf_yes_no_info[] = { + { 1, "yes" }, + { 2, "no" }, + { 0, "NULL" } +}; + +/* FIXME: the below may introduce status redundancy, that needs to be + * adressed by the driver, as for usbhid-ups! */ +static info_lkp_t ietf_power_source_info[] = { + { 1, "" /* other */ }, + { 2, "OFF" /* none */ }, +#if 0 + { 3, "OL" /* normal */ }, +#endif + { 4, "BYPASS" /* bypass */ }, + { 5, "OB" /* battery */ }, + { 6, "BOOST" /* booster */ }, + { 7, "TRIM" /* reducer */ }, + { 0, "NULL" } +}; + +/* Parameters default values */ +#define STR_DEFAULT_ONDELAY "30" /* Delay between return of utility power */ + /* and powering up of load, in seconds */ + /* CAUTION: ondelay > offdelay */ +#define DEFAULT_ONDELAY 30 +#define STR_DEFAULT_OFFDELAY "20" /* Delay before power off, in seconds */ +#define DEFAULT_OFFDELAY 20 + #define MGE_NOTHING_VALUE 1 #define MGE_START_VALUE 2 #define MGE_STOP_VALUE 3 @@ -82,80 +150,122 @@ static info_lkp_t mge_overload_info[] = { static snmp_info_t mge_mib[] = { /* UPS page */ - { "ups.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "MGE UPS SYSTEMS", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, - { "ups.model", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".1.1.0", "Generic SNMP UPS", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, - { "ups.serial", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".1.7.0", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, - { "ups.firmware.aux", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".12.12.0", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, - { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".5.14.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_lowbatt_info }, - { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".5.16.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_lowbatt_info }, - { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".7.3.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_onbatt_info }, - { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".7.4.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_bypass_info }, - { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".7.8.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_boost_info }, - { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".7.10.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_overload_info }, - { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, MGE_BASE_OID ".7.12.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_trim_info }, - { "ups.load", 0, 1, MGE_BASE_OID ".7.2.1.4.1", "", SU_OUTPUT_1, NULL }, - { "ups.L1.load", 0, 1, MGE_BASE_OID ".7.2.1.4.1", "", SU_OUTPUT_3, NULL }, - { "ups.L2.load", 0, 1, MGE_BASE_OID ".7.2.1.4.2", "", SU_OUTPUT_3, NULL }, - { "ups.L3.load", 0, 1, MGE_BASE_OID ".7.2.1.4.3", "", SU_OUTPUT_3, NULL }, -/* { "ups.delay.shutdown", ST_FLAG_STRING | ST_FLAG_RW, 3, MGE_OID_GRACEDELAY, "", SU_FLAG_OK, NULL }, */ + { "ups.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "Eaton", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + { "ups.model", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.1.1.0", "Generic SNMP UPS", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, + { "ups.serial", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.1.7.0", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, + { "ups.firmware", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.1.4.0", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, + { "ups.firmware.aux", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.12.12.0", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, + { "ups.load", 0, 1, ".1.3.6.1.4.1.705.1.7.2.1.4.1", "", SU_OUTPUT_1, NULL }, + { "ups.beeper.status", ST_FLAG_STRING, SU_INFOSIZE, "1.3.6.1.2.1.33.1.9.8.0", "", 0, ietf_beeper_status_info }, + { "ups.L1.load", 0, 1, ".1.3.6.1.4.1.705.1.7.2.1.4.1", "", SU_OUTPUT_3, NULL }, + { "ups.L2.load", 0, 1, ".1.3.6.1.4.1.705.1.7.2.1.4.2", "", SU_OUTPUT_3, NULL }, + { "ups.L3.load", 0, 1, ".1.3.6.1.4.1.705.1.7.2.1.4.3", "", SU_OUTPUT_3, NULL }, + { "ups.test.result", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.2.1.33.1.7.3.0", "", 0, ietf_test_result_info }, + { "ups.delay.shutdown", ST_FLAG_STRING | ST_FLAG_RW, 6, "1.3.6.1.2.1.33.1.8.2.0", STR_DEFAULT_OFFDELAY, SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + { "ups.delay.start", ST_FLAG_STRING | ST_FLAG_RW, 6, "1.3.6.1.2.1.33.1.8.3.0", STR_DEFAULT_ONDELAY, SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + { "ups.timer.shutdown", 0, 1, "1.3.6.1.2.1.33.1.8.2.0", "", SU_FLAG_OK, NULL }, + { "ups.timer.start", 0, 1, "1.3.6.1.2.1.33.1.8.3.0", "", SU_FLAG_OK, NULL }, + { "ups.timer.reboot", 0, 1, "1.3.6.1.2.1.33.1.8.4.0", "", SU_FLAG_OK, NULL }, + { "ups.start.auto", ST_FLAG_RW, 1, "1.3.6.1.2.1.33.1.8.5.0", "", SU_FLAG_OK, ietf_yes_no_info }, + /* status data */ + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.5.11.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_replacebatt_info }, + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.5.14.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_lowbatt_info }, + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.5.16.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_lowbatt_info }, + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.7.3.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_onbatt_info }, + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.7.4.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_bypass_info }, + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.7.7.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_output_util_off_info }, + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.7.8.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_boost_info }, + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.7.10.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_overload_info }, + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.7.12.0", "", SU_FLAG_OK | SU_STATUS_BATT, mge_trim_info }, + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.2.1.33.1.4.1.0", "", SU_STATUS_PWR | SU_FLAG_OK, ietf_power_source_info }, + + /* FIXME: Alarms + * - upsmgBatteryChargerFault (.1.3.6.1.4.1.705.1.5.15.0), yes (1), no (2) + * => Battery charger fail! + * - upsmgBatteryFaultBattery (.1.3.6.1.4.1.705.1.5.9.0), yes (1), no (2) + * => "Battery fault!" or? + * - upsmgOutputOverTemp (.1.3.6.1.4.1.705.1.7.11.0), yes (1), no (2) + * => "Temperature too high!" + * - upsmgOutputInverterOff (.1.3.6.1.4.1.705.1.7.9.0), yes (1), no (2) + * => "??" + * - upsmgInputBadStatus (.1.3.6.1.4.1.705.1.6.3.0), yes (1), no (2) + * => "bad volt or bad freq" + */ /* Input page */ - { "input.phases", 0, 1.0, MGE_BASE_OID ".6.1.0", "", SU_FLAG_SETINT, NULL, &input_phases }, - { "input.voltage", 0, 0.1, MGE_BASE_OID ".6.2.1.2.1", "", SU_INPUT_1, NULL }, - { "input.L1-N.voltage", 0, 0.1, MGE_BASE_OID ".6.2.1.2.1", "", SU_INPUT_3, NULL }, - { "input.L2-N.voltage", 0, 0.1, MGE_BASE_OID ".6.2.1.2.2", "", SU_INPUT_3, NULL }, - { "input.L3-N.voltage", 0, 0.1, MGE_BASE_OID ".6.2.1.2.3", "", SU_INPUT_3, NULL }, - { "input.frequency", 0, 0.1, MGE_BASE_OID ".6.2.1.3.1", "", SU_INPUT_1, NULL }, - { "input.L1.frequency", 0, 0.1, MGE_BASE_OID ".6.2.1.3.1", "", SU_INPUT_3, NULL }, - { "input.L2.frequency", 0, 0.1, MGE_BASE_OID ".6.2.1.3.2", "", SU_INPUT_3, NULL }, - { "input.L3.frequency", 0, 0.1, MGE_BASE_OID ".6.2.1.3.3", "", SU_INPUT_3, NULL }, - { "input.voltage.minimum", 0, 0.1, MGE_BASE_OID ".6.2.1.4.1", "", SU_INPUT_1, NULL }, - { "input.L1-N.voltage.minimum", 0, 0.1, MGE_BASE_OID ".6.2.1.4.1", "", SU_INPUT_3, NULL }, - { "input.L2-N.voltage.minimum", 0, 0.1, MGE_BASE_OID ".6.2.1.4.2", "", SU_INPUT_3, NULL }, - { "input.L3-N.voltage.minimum", 0, 0.1, MGE_BASE_OID ".6.2.1.4.3", "", SU_INPUT_3, NULL }, - { "input.voltage.maximum", 0, 0.1, MGE_BASE_OID ".6.2.1.5.1", "", SU_INPUT_1, NULL }, - { "input.L1-N.voltage.maximum", 0, 0.1, MGE_BASE_OID ".6.2.1.5.1", "", SU_INPUT_3, NULL }, - { "input.L2-N.voltage.maximum", 0, 0.1, MGE_BASE_OID ".6.2.1.5.2", "", SU_INPUT_3, NULL }, - { "input.L3-N.voltage.maximum", 0, 0.1, MGE_BASE_OID ".6.2.1.5.3", "", SU_INPUT_3, NULL }, - { "input.current", 0, 0.1, MGE_BASE_OID ".6.2.1.6.1", "", SU_INPUT_1, NULL }, - { "input.L1.current", 0, 0.1, MGE_BASE_OID ".6.2.1.6.1", "", SU_INPUT_3, NULL }, - { "input.L2.current", 0, 0.1, MGE_BASE_OID ".6.2.1.6.2", "", SU_INPUT_3, NULL }, - { "input.L3.current", 0, 0.1, MGE_BASE_OID ".6.2.1.6.3", "", SU_INPUT_3, NULL }, + { "input.phases", 0, 1.0, ".1.3.6.1.4.1.705.1.6.1.0", "", SU_FLAG_SETINT, NULL, &input_phases }, + { "input.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.2.1", "", SU_INPUT_1, NULL }, + { "input.L1-N.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.2.1", "", SU_INPUT_3, NULL }, + { "input.L2-N.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.2.2", "", SU_INPUT_3, NULL }, + { "input.L3-N.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.2.3", "", SU_INPUT_3, NULL }, + { "input.frequency", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.3.1", "", SU_INPUT_1, NULL }, + { "input.L1.frequency", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.3.1", "", SU_INPUT_3, NULL }, + { "input.L2.frequency", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.3.2", "", SU_INPUT_3, NULL }, + { "input.L3.frequency", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.3.3", "", SU_INPUT_3, NULL }, + { "input.voltage.minimum", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.4.1", "", SU_INPUT_1, NULL }, + { "input.L1-N.voltage.minimum", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.4.1", "", SU_INPUT_3, NULL }, + { "input.L2-N.voltage.minimum", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.4.2", "", SU_INPUT_3, NULL }, + { "input.L3-N.voltage.minimum", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.4.3", "", SU_INPUT_3, NULL }, + { "input.voltage.maximum", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.5.1", "", SU_INPUT_1, NULL }, + { "input.L1-N.voltage.maximum", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.5.1", "", SU_INPUT_3, NULL }, + { "input.L2-N.voltage.maximum", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.5.2", "", SU_INPUT_3, NULL }, + { "input.L3-N.voltage.maximum", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.5.3", "", SU_INPUT_3, NULL }, + { "input.current", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.6.1", "", SU_INPUT_1, NULL }, + { "input.L1.current", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.6.1", "", SU_INPUT_3, NULL }, + { "input.L2.current", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.6.2", "", SU_INPUT_3, NULL }, + { "input.L3.current", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.6.3", "", SU_INPUT_3, NULL }, + { "input.transfer.reason", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.6.4.0", "", SU_FLAG_OK, mge_transfer_reason_info }, /* Output page */ - { "output.phases", 0, 1.0, MGE_BASE_OID ".7.1.0", "", SU_FLAG_SETINT, NULL, &output_phases }, - { "output.voltage", 0, 0.1, MGE_BASE_OID ".7.2.1.2.1", "", SU_OUTPUT_1, NULL }, - { "output.L1-N.voltage", 0, 0.1, MGE_BASE_OID ".7.2.1.2.1", "", SU_OUTPUT_3, NULL }, - { "output.L2-N.voltage", 0, 0.1, MGE_BASE_OID ".7.2.1.2.2", "", SU_OUTPUT_3, NULL }, - { "output.L3-N.voltage", 0, 0.1, MGE_BASE_OID ".7.2.1.2.3", "", SU_OUTPUT_3, NULL }, - { "output.frequency", 0, 0.1, MGE_BASE_OID ".7.2.1.3.1", "", SU_OUTPUT_1, NULL }, - { "output.L1.frequency", 0, 0.1, MGE_BASE_OID ".7.2.1.3.1", "", SU_OUTPUT_3, NULL }, - { "output.L2.frequency", 0, 0.1, MGE_BASE_OID ".7.2.1.3.2", "", SU_OUTPUT_3, NULL }, - { "output.L3.frequency", 0, 0.1, MGE_BASE_OID ".7.2.1.3.3", "", SU_OUTPUT_3, NULL }, - { "output.current", 0, 0.1, MGE_BASE_OID ".7.2.1.5.1", "", SU_OUTPUT_1, NULL }, - { "output.L1.current", 0, 0.1, MGE_BASE_OID ".7.2.1.5.1", "", SU_OUTPUT_3, NULL }, - { "output.L2.current", 0, 0.1, MGE_BASE_OID ".7.2.1.5.2", "", SU_OUTPUT_3, NULL }, - { "output.L3.current", 0, 0.1, MGE_BASE_OID ".7.2.1.5.3", "", SU_OUTPUT_3, NULL }, + { "output.phases", 0, 1.0, ".1.3.6.1.4.1.705.1.7.1.0", "", SU_FLAG_SETINT, NULL, &output_phases }, + { "output.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.2.1", "", SU_OUTPUT_1, NULL }, + { "output.L1-N.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.2.1", "", SU_OUTPUT_3, NULL }, + { "output.L2-N.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.2.2", "", SU_OUTPUT_3, NULL }, + { "output.L3-N.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.2.3", "", SU_OUTPUT_3, NULL }, + { "output.frequency", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.3.1", "", SU_OUTPUT_1, NULL }, + { "output.L1.frequency", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.3.1", "", SU_OUTPUT_3, NULL }, + { "output.L2.frequency", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.3.2", "", SU_OUTPUT_3, NULL }, + { "output.L3.frequency", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.3.3", "", SU_OUTPUT_3, NULL }, + { "output.current", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.5.1", "", SU_OUTPUT_1, NULL }, + { "output.L1.current", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.5.1", "", SU_OUTPUT_3, NULL }, + { "output.L2.current", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.5.2", "", SU_OUTPUT_3, NULL }, + { "output.L3.current", 0, 0.1, ".1.3.6.1.4.1.705.1.7.2.1.5.3", "", SU_OUTPUT_3, NULL }, /* Battery page */ - { "battery.charge", 0, 1, MGE_BASE_OID ".5.2.0", "", SU_FLAG_OK, NULL }, - { "battery.runtime", 0, 1, MGE_BASE_OID ".5.1.0", "", SU_FLAG_OK, NULL }, - { "battery.charge.low", ST_FLAG_STRING | ST_FLAG_RW, 2, MGE_BASE_OID ".4.8.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL }, - { "battery.voltage", 0, 0.1, MGE_BASE_OID ".5.5.0", "", SU_FLAG_OK, NULL }, + { "battery.charge", 0, 1, ".1.3.6.1.4.1.705.1.5.2.0", "", SU_FLAG_OK, NULL }, + { "battery.runtime", 0, 1, ".1.3.6.1.4.1.705.1.5.1.0", "", SU_FLAG_OK, NULL }, + { "battery.runtime.low", 0, 1, ".1.3.6.1.4.1.705.1.4.7.0", "", SU_FLAG_OK, NULL }, + { "battery.charge.low", ST_FLAG_STRING | ST_FLAG_RW, 2, ".1.3.6.1.4.1.705.1.4.8.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL }, + { "battery.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.5.5.0", "", SU_FLAG_OK, NULL }, /* Ambient page: Environment Sensor (ref 66 846) */ - { "ambient.temperature", 0, 0.1, MGE_BASE_OID ".8.1.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL }, - { "ambient.humidity", 0, 0.1, MGE_BASE_OID ".8.2.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL }, + { "ambient.temperature", 0, 0.1, ".1.3.6.1.4.1.705.1.8.1.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL }, + { "ambient.humidity", 0, 0.1, ".1.3.6.1.4.1.705.1.8.2.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL }, /* Outlet page */ { "outlet.id", 0, 1, NULL, "0", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, { "outlet.desc", ST_FLAG_RW | ST_FLAG_STRING, 20, NULL, "Main Outlet", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, /* instant commands. */ - { "test.battery.start", 0, MGE_START_VALUE, MGE_BASE_OID ".10.4.0", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, -/* { "load.off", 0, MGE_START_VALUE, MGE_BASE_OID ".9.1.1.6.1", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, */ -/* { "load.on", 0, MGE_START_VALUE, MGE_BASE_OID ".9.1.1.3.1", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, */ -/* { "shutdown.return", 0, MGE_START_VALUE, MGE_BASE_OID ".9.1.1.9.1", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, */ + { "test.battery.start", 0, MGE_START_VALUE, ".1.3.6.1.4.1.705.1.10.4.0", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, + /* Also use IETF OIDs + * { "test.battery.stop", 0, 0, "1.3.6.1.2.1.33.1.7.1.0", "1.3.6.1.2.1.33.1.7.7.2", SU_TYPE_CMD, NULL }, + * { "test.battery.start", 0, 0, "1.3.6.1.2.1.33.1.7.1.0", "1.3.6.1.2.1.33.1.7.7.3", SU_TYPE_CMD, NULL }, + * { "test.battery.start.quick", 0, 0, "1.3.6.1.2.1.33.1.7.1.0", "1.3.6.1.2.1.33.1.7.7.4", SU_TYPE_CMD, NULL }, + * { "test.battery.start.deep", 0, 0, "1.3.6.1.2.1.33.1.7.1.0", "1.3.6.1.2.1.33.1.7.7.5", SU_TYPE_CMD, NULL }, + */ + + /* { "load.off", 0, MGE_START_VALUE, ".1.3.6.1.4.1.705.1.9.1.1.6.1", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, + * { "load.on", 0, MGE_START_VALUE, ".1.3.6.1.4.1.705.1.9.1.1.3.1", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, + * { "shutdown.return", 0, MGE_START_VALUE, ".1.3.6.1.4.1.705.1.9.1.1.9.1", "", SU_TYPE_CMD | SU_FLAG_OK, NULL }, + */ + /* IETF MIB fallback */ + { "beeper.disable", 0, 1, "1.3.6.1.2.1.33.1.9.8.0", "", SU_TYPE_CMD, NULL }, + { "beeper.enable", 0, 2, "1.3.6.1.2.1.33.1.9.8.0", "", SU_TYPE_CMD, NULL }, + { "beeper.mute", 0, 3, "1.3.6.1.2.1.33.1.9.8.0", "", SU_TYPE_CMD, NULL }, + /* Use ST_FLAG_STRING to get default value from ->dfl instead of info_len */ + { "load.off.delay", 0, DEFAULT_OFFDELAY, "1.3.6.1.2.1.33.1.8.2.0", "", SU_TYPE_CMD, NULL }, + { "load.on.delay", 0, DEFAULT_ONDELAY, "1.3.6.1.2.1.33.1.8.3.0", "", SU_TYPE_CMD, NULL }, /* end of structure. */ { NULL, 0, 0, NULL, NULL, 0, NULL } diff --git a/drivers/mge-shut.c b/drivers/mge-shut.c index 1f9e519..06398ed 100644 --- a/drivers/mge-shut.c +++ b/drivers/mge-shut.c @@ -1,6 +1,6 @@ /* mge-shut.c - monitor MGE UPS for NUT with SHUT protocol * - * Copyright (C) 2002 - 2008 + * Copyright (C) 2002 - 2012 * Arnaud Quette * * Sponsored by MGE UPS SYSTEMS @@ -37,7 +37,7 @@ /* --------------------------------------------------------------- */ #define DRIVER_NAME "Eaton / SHUT driver" -#define DRIVER_VERSION "0.69" +#define DRIVER_VERSION "0.70" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -524,7 +524,7 @@ int shut_wait_ack (void) upsdebugx (2, "shut_wait_ack(): NACK received"); return -2; } - else if ((c[0] & SHUT_PKT_LAST) == SHUT_TYPE_NOTIFY) { + else if ((c[0] & 0x0f) == SHUT_TYPE_NOTIFY) { upsdebugx (2, "shut_wait_ack(): NOTIFY received"); return -3; } @@ -835,8 +835,11 @@ int shut_packet_recv (u_char *Buf, int datalen) shut_token_send(SHUT_OK); - if(Start[0]&SHUT_PKT_LAST) { - if ((Start[0]&SHUT_PKT_LAST) == SHUT_TYPE_NOTIFY) { + + /* Check if there are more data to receive */ + if((Start[0] & 0xf0) == SHUT_PKT_LAST) { + /* Check if it's a notification */ + if ((Start[0] & 0x0f) == SHUT_TYPE_NOTIFY) { /* TODO: process notification (dropped for now) */ upsdebugx (4, "=> notification"); datalen+=Pos; diff --git a/drivers/mge-utalk.c b/drivers/mge-utalk.c index 616e2ad..3139065 100644 --- a/drivers/mge-utalk.c +++ b/drivers/mge-utalk.c @@ -287,10 +287,9 @@ void upsdrv_initinfo(void) *p = '\0'; si_data1 = atoi(buf); v = p+1; + p = strchr(v, ' '); } - p = strchr(v, ' '); - if ( p != NULL ) { *p = '\0'; si_data2 = atoi(v); diff --git a/drivers/netvision-mib.c b/drivers/netvision-mib.c index 91e4d35..3b31e32 100644 --- a/drivers/netvision-mib.c +++ b/drivers/netvision-mib.c @@ -1,8 +1,9 @@ /* netvision-mib.c - data to monitor Socomec Sicon UPS equipped * with Netvision WEB/SNMP card/external box with NUT * - * Copyright (C) 2004 - * Thanos Chatziathanassiou + * Copyright (C) + * 2004 Thanos Chatziathanassiou + * 2012 Manuel Bouyer * * 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 @@ -23,7 +24,7 @@ #include "netvision-mib.h" -#define NETVISION_MIB_VERSION "0.1" +#define NETVISION_MIB_VERSION "0.3" #define NETVISION_SYSOID ".1.3.6.1.4.1.4555.1.1.1" @@ -37,11 +38,11 @@ /* UPS Battery */ #define NETVISION_OID_BATTERYSTATUS ".1.3.6.1.4.1.4555.1.1.1.1.2.1.0" static info_lkp_t netvision_batt_info[] = { - { 2, "" }, /* battery normal */ - { 3, "LB" }, /* battery low */ - { 4, "LB" }, /* battery depleted */ + { 2, "" }, /* battery normal */ + { 3, "LB" }, /* battery low */ + { 4, "LB" }, /* battery depleted */ { 5, "DISCHRG" }, /* battery discharging */ - { 6, "RB" }, /* battery failure */ + { 6, "RB" }, /* battery failure */ { 0, "NULL" } }; @@ -51,8 +52,12 @@ static info_lkp_t netvision_batt_info[] = { #define NETVISION_OID_BATT_VOLTS ".1.3.6.1.4.1.4555.1.1.1.1.2.5.0" #define NETVISION_OID_INPUT_NUM_LINES ".1.3.6.1.4.1.4555.1.1.1.1.3.1.0" /* 1phase or 3phase UPS input */ +#define NETVISION_OID_INPUT_FREQ ".1.3.6.1.4.1.4555.1.1.1.1.3.2.0" #define NETVISION_OID_OUTPUT_NUM_LINES ".1.3.6.1.4.1.4555.1.1.1.1.4.3.0" /* 1phase or 3phase UPS output */ +#define NETVISION_OID_OUTPUT_FREQ ".1.3.6.1.4.1.4555.1.1.1.1.4.2.0" +#define NETVISION_OID_BYPASS_FREQ ".1.3.6.1.4.1.4555.1.1.1.1.5.1.0" +#define NETVISION_OID_BYPASS_NUM_LINES ".1.3.6.1.4.1.4555.1.1.1.1.5.2.0" /* 1phase or 3phase UPS input */ /* three phase ups provide input/output/load for each phase in case of one-phase output, only _P1 should be used @@ -62,29 +67,41 @@ static info_lkp_t netvision_batt_info[] = { #define NETVISION_OID_OUT_CURRENT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.3.1" #define NETVISION_OID_OUT_LOAD_PCT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.4.1" #define NETVISION_OID_IN_VOLTAGE_P1 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.5.1" +#define NETVISION_OID_IN_CURRENT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.3.1" +#define NETVISION_OID_BY_VOLTAGE_P1 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.2.1" +#define NETVISION_OID_BY_CURRENT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.3.1" #define NETVISION_OID_OUT_VOLTAGE_P2 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.2.2" #define NETVISION_OID_OUT_CURRENT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.3.2" #define NETVISION_OID_OUT_LOAD_PCT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.4.2" #define NETVISION_OID_IN_VOLTAGE_P2 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.5.2" +#define NETVISION_OID_IN_CURRENT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.3.2" +#define NETVISION_OID_BY_VOLTAGE_P2 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.2.2" +#define NETVISION_OID_BY_CURRENT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.3.2" #define NETVISION_OID_OUT_VOLTAGE_P3 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.2.3" #define NETVISION_OID_OUT_CURRENT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.3.3" #define NETVISION_OID_OUT_LOAD_PCT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.4.3" #define NETVISION_OID_IN_VOLTAGE_P3 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.5.3" +#define NETVISION_OID_IN_CURRENT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.3.3" +#define NETVISION_OID_BY_VOLTAGE_P3 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.2.3" +#define NETVISION_OID_BY_CURRENT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.3.3" #define NETVISION_OID_OUTPUT_SOURCE ".1.3.6.1.4.1.4555.1.1.1.1.4.1.0" +#define NETVISION_OID_CONTROL_STATUS ".1.3.6.1.4.1.4555.1.1.1.1.8.1" +#define NETVISION_OID_CONTROL_SHUTDOWN_DELAY ".1.3.6.1.4.1.4555.1.1.1.1.8.2" + static info_lkp_t netvision_output_info[] = { - { 1, "" }, /* output source other */ - { 2, "" }, /* output source none */ - { 3, "OL" }, /* output source normal */ + { 1, "" }, /* output source other */ + { 2, "" }, /* output source none */ + { 3, "OL" }, /* output source normal */ { 4, "OL BYPASS" }, /* output source bypass */ - { 5, "OB" }, /* output source battery */ + { 5, "OB" }, /* output source battery */ { 6, "OL BOOST" }, /* output source booster */ { 7, "OL TRIM" }, /* output source reducer */ - { 8, "" }, /* output source standby */ - { 9, "" }, /* output source ecomode */ + { 8, "OL" }, /* output source standby */ + { 9, "" }, /* output source ecomode */ { 0, "NULL" } }; @@ -104,12 +121,45 @@ static snmp_info_t netvision_mib[] = { SU_FLAG_OK | SU_STATUS_PWR, &netvision_output_info[0] }, /* ups load */ - { "ups.load", 0, 1, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_FLAG_OK, NULL }, + { "ups.load", 0, 1, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_INPUT_1, NULL }, /*ups input,output voltage, output frquency phase 1 */ - { "input.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P1, 0, SU_FLAG_OK, NULL }, - { "output.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P1, 0, SU_FLAG_OK, NULL }, - { "output.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P1, 0, SU_FLAG_OK, NULL }, + { "input.phases", 0, 1.0, NETVISION_OID_INPUT_NUM_LINES, 0, SU_FLAG_SETINT, NULL, &input_phases }, + { "input.frequency", 0, 0.1, NETVISION_OID_INPUT_FREQ, 0, SU_FLAG_OK, NULL }, + { "input.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P1, 0, SU_INPUT_1, NULL }, + { "input.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P1, 0, SU_INPUT_1, NULL }, + { "input.L1-N.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P1, 0, SU_INPUT_3, NULL }, + { "input.L1.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P1, 0, SU_INPUT_3, NULL }, + { "input.L2-N.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P2, 0, SU_INPUT_3, NULL }, + { "input.L2.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P2, 0, SU_INPUT_3, NULL }, + { "input.L3-N.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P3, 0, SU_INPUT_3, NULL }, + { "input.L3.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P3, 0, SU_INPUT_3, NULL }, + + { "output.phases", 0, 1.0, NETVISION_OID_OUTPUT_NUM_LINES, 0, SU_FLAG_SETINT, NULL, &output_phases }, + { "output.frequency", 0, 0.1, NETVISION_OID_OUTPUT_FREQ, 0, SU_FLAG_OK, NULL }, + { "output.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P1, 0, SU_OUTPUT_1, NULL }, + { "output.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P1, 0, SU_OUTPUT_1, NULL }, + { "output.load", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_OUTPUT_1, NULL }, + { "output.L1-N.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P1, 0, SU_OUTPUT_3, NULL }, + { "output.L1.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P1, 0, SU_OUTPUT_3, NULL }, + { "output.L1.power.percent", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_OUTPUT_3, NULL }, + { "output.L2-N.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P2, 0, SU_OUTPUT_3, NULL }, + { "output.L2.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P2, 0, SU_OUTPUT_3, NULL }, + { "output.L2.power.percent", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P2, 0, SU_OUTPUT_3, NULL }, + { "output.L3-N.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P3, 0, SU_OUTPUT_3, NULL }, + { "output.L3.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P3, 0, SU_OUTPUT_3, NULL }, + { "output.L3.power.percent", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P3, 0, SU_OUTPUT_3, NULL }, + + { "input.bypass.phases", 0, 1.0, NETVISION_OID_BYPASS_NUM_LINES, 0, SU_FLAG_SETINT, NULL, &bypass_phases }, + { "input.bypass.frequency", 0, 0.1, NETVISION_OID_BYPASS_FREQ, 0, SU_FLAG_OK, NULL }, + { "input.bypass.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P1, 0, SU_BYPASS_1, NULL }, + { "input.bypass.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P1, 0, SU_BYPASS_1, NULL }, + { "input.bypass.L1-N.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P1, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L1.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P1, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L2-N.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P2, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L2.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P2, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L3-N.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P3, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L3.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P3, 0, SU_BYPASS_3, NULL }, /* battery info */ { "battery.charge", 0, 1, NETVISION_OID_BATT_CHARGE, "", SU_FLAG_OK, NULL }, diff --git a/drivers/oneac.c b/drivers/oneac.c index 22a73ab..55035f7 100644 --- a/drivers/oneac.c +++ b/drivers/oneac.c @@ -1,57 +1,118 @@ /*vim ts=4*/ - -/* - * NUT Oneac EG and ON model specific drivers for UPS units using - * the Oneac Advanced Interface. If your UPS is equipped with the - * Oneac Basic Interface, use the genericups driver -*/ - -/* - Copyright (C) 2003 by Eric Lawson - - 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 -*/ - -/* 28 November 2003. Eric Lawson +/* oneac.c - Driver for Oneac UPS using the Advanced Interface. + * + * Supported Oneac UPS families in this driver: + * EG (late 80s, early 90s, plug-in serial interface card) + * ON (early and mid-90s, plug-in serial interface card) + * OZ (mid-90s on, DB-25 std., interface slot) + * OB (early 2000's on, big cabinet, DB-25 std., interface slot) + * + * Copyright (C) + * 2003 by Eric Lawson + * 2012 by Bill Elliot + * + * This program was sponsored by MGE UPS SYSTEMS, and now Eaton + * + * 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 + * + * History: + * - 7 February 2012. Bill Elliot + * Enhancing the driver for additional capabilities and later units. + * + * - 28 November 2003. Eric Lawson * More or less complete re-write for NUT 1.5.9 * This was somewhat easier than trying to beat the old driver code * into submission -*/ + * + */ #include "main.h" #include "serial.h" #include "oneac.h" -#define DRIVER_NAME "Oneac EG/ON UPS driver" -#define DRIVER_VERSION "0.51" +/* Prototypes to allow setting pointer before function is defined */ +int setcmd(const char* varname, const char* setvalue); +int instcmd(const char *cmdname, const char *extra); + +#define DRIVER_NAME "Oneac EG/ON/OZ/OB UPS driver" +#define DRIVER_VERSION "0.80" /* driver description structure */ upsdrv_info_t upsdrv_info = { DRIVER_NAME, DRIVER_VERSION, + "Bill Elliot \n" "Eric Lawson ", - DRV_EXPERIMENTAL, + DRV_STABLE, { NULL } }; -#define SECS 2 /*wait time*/ -#define USEC 0 /*rest of wait time*/ +#define SECS 0 /* Serial function wait time*/ +#define USEC 500000 /* Rest of serial function wait time*/ + +#define COMM_TRIES 3 /* Serial retries before "stale" */ + +static char UpsFamily [3]; + +/**************************************************************** + * Below are functions used only in this oneac driver * + ***************************************************************/ + +/* Since an installed network card may delay responses from the UPS + * allow for a repeat of the get request. Also confirm that + * the correct number of characters are returned. + */ + +int OneacGetResponse (char* chBuff, const int BuffSize, int ExpectedCount) +{ + int Retries = 10; /* x/2 seconds max with 500000 USEC */ + int return_val; + + do + { + return_val = ser_get_line(upsfd, chBuff, BuffSize, ENDCHAR, IGNCHARS, + SECS, USEC); + + if (return_val == ExpectedCount) + break; + + upsdebugx (3,"!OneacGetResponse retry (%d, %d)...", return_val,Retries); + + } while (--Retries > 0); + + upsdebugx (4,"OneacGetResponse buffer: %s",chBuff); + + if (Retries == 0) + { + upsdebugx (2,"!!OneacGetResponse timeout..."); + return_val = 1; /* Comms error */ + } + else + { + if (Retries < 10) + upsdebugx (2,"OneacGetResponse recovered (%d)...", Retries); + + return_val = 0; /* Good comms */ + } + + return return_val; +} void do_battery_test(void) { - char buffer[256]; + char buffer[32]; if (getval("testtime") == NULL) snprintf(buffer, 3, "%s", DEFAULT_BAT_TEST_TIME); @@ -69,180 +130,420 @@ void do_battery_test(void) ser_send(upsfd,"%s%s%s",BAT_TEST_PREFIX,buffer,COMMAND_END); } - -/**************************************************************** - *below are the commands that are called by main (part of the * - *Above, are functions used only in this oneac driver * - ***************************************************************/ - -int instcmd(const char *cmdname, const char *extra) +int SetOutputAllow(const char* lowval, const char* highval) { - if (!strcasecmp(cmdname, "test.failure.start")) { - ser_send(upsfd,"%s%s",SIM_PWR_FAIL,COMMAND_END); - return STAT_INSTCMD_HANDLED; - } + char buffer[32]; - if (!strcasecmp(cmdname, "test.battery.start")) { - do_battery_test(); - return STAT_INSTCMD_HANDLED; - } + snprintf(buffer, 4, "%.3s", lowval); - if (!strcasecmp(cmdname, "test.battery.stop")) { - ser_send(upsfd,"%s00%s",BAT_TEST_PREFIX,COMMAND_END); - return STAT_INSTCMD_HANDLED; - } + /*the UPS wants this value to always be three characters long*/ + /*so put a zero in front of the string, if needed.... */ - if (!strcasecmp(cmdname, "reset.input.minmax")) { - ser_send(upsfd,"%c%s",RESET_MIN_MAX, COMMAND_END); - return STAT_INSTCMD_HANDLED; + if (strlen(buffer) < 3) + { + buffer[3] = '\0'; + buffer[2] = buffer[1]; + buffer[1] = buffer[0]; + buffer[0] = '0'; } + + upsdebugx (2,"SetOutputAllow sending %s%.3s,%.3s...", + SETX_OUT_ALLOW, buffer, highval); + + ser_send(upsfd,"%s%.3s,%.3s%s", SETX_OUT_ALLOW, buffer, highval, + COMMAND_END); + ser_get_line(upsfd,buffer,sizeof(buffer), ENDCHAR, IGNCHARS,SECS,USEC); + + if(buffer[0] == DONT_UNDERSTAND) + { + upsdebugx (2,"SetOutputAllow got asterisk back..."); - upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); - return STAT_INSTCMD_UNKNOWN; + return 1; /* Invalid command */ + } + + return 0; /* Valid command */ +} + +void EliminateLeadingZeroes (const char* buff1, int StringSize, char* buff2, + const int buff2size) +{ + int i = 0; + int j = 0; + + memset(buff2, '\0', buff2size); /* Fill with nulls */ + + /* Find first non-'0' */ + while ((buff1[i] == '0') && (i < (StringSize - 1))) + { + i++; + } + + while (i < StringSize) /* Move rest of string */ + { + buff2[j++] = buff1[i++]; + } } +/**************************************************************** + * Below are the commands that are called by main * + ***************************************************************/ + +void upsdrv_initups(void) +{ + upsfd = ser_open(device_path); + ser_set_speed(upsfd, device_path, B9600); + + /*get the UPS in the right frame of mind*/ + ser_send_pace(upsfd, 100, "%s", COMMAND_END); + ser_send_pace(upsfd, 100, "%s", COMMAND_END); + sleep (1); +} + void upsdrv_initinfo(void) { - int i; + int i,j, k; + int VRange=0; + int timevalue; + int RetValue; char buffer[256], buffer2[32]; + + /* All families should reply to this request so we can confirm that it is + * an ONEAC UPS + */ + ser_flush_in(upsfd,"",0); - ser_send(upsfd,"%c%s",GET_MFR,COMMAND_END); - ser_get_line(upsfd, buffer, sizeof(buffer),ENDCHAR,IGNCHARS,SECS,USEC); - if(strncmp(buffer,MFGR, sizeof(MFGR))) - fatalx(EXIT_FAILURE, "Unable to connect to ONEAC UPS on %s\n",device_path); - - dstate_setinfo("ups.mfr", "%s", buffer); - dstate_addcmd("test.battery.start"); - dstate_addcmd("test.battery.stop"); - dstate_addcmd("test.failure.start"); - dstate_addcmd("reset.input.minmax"); + ser_send(upsfd,"%c%s",GET_FAMILY,COMMAND_END); - - upsh.instcmd = instcmd; - - /*set some stuff that shouldn't change after initialization*/ - /*this stuff is common to both the EG and ON family of UPS */ - - /*firmware revision*/ - ser_send(upsfd,"%c%s", GET_VERSION, COMMAND_END); - ser_get_line(upsfd, buffer, sizeof(buffer),ENDCHAR,IGNCHARS,SECS,USEC); - dstate_setinfo("ups.firmware", "%.3s",buffer); - - /*nominal AC frequency setting --either 50 or 60*/ - ser_send(upsfd,"%c%s", GET_NOM_FREQ, COMMAND_END); - ser_get_line(upsfd,buffer,sizeof(buffer),ENDCHAR,IGNCHARS,SECS,USEC); - dstate_setinfo("input.frequency", "%.2s", buffer); - - - /*UPS Model (either ON, or EG series of UPS)*/ - - ser_send(upsfd,"%c%s", GET_FAMILY,COMMAND_END); - ser_get_line(upsfd,buffer,sizeof(buffer),ENDCHAR,IGNCHARS,SECS,USEC); - dstate_setinfo("ups.model", "%.2s",buffer); - printf("Found %.2s family of Oneac UPS\n", buffer); - - if ((strncmp(buffer,FAMILY_ON,2) != 0 && - strncmp(buffer,FAMILY_ON_EXT,2) != 0) || - strncmp(buffer,FAMILY_EG,2) == 0) - printf("Unknown family of UPS. Assuming EG capabilities.\n"); - - /*Get the actual model string for ON UPS reported as OZ family*/ - if (strncmp (dstate_getinfo("ups.model"), FAMILY_ON_EXT, 2) == 0) { - ser_flush_in(upsfd,"",0); - ser_send(upsfd,"%c%s",GET_ALL_EXT_2,COMMAND_END); - ser_get_line(upsfd, buffer, sizeof(buffer),ENDCHAR,IGNCHARS,SECS,USEC); - - /*UPS Model (full string)*/ - memset(buffer2, '\0', 32); - strncpy(buffer2,&buffer[5], 10); - for (i = 9; i >= 0 && buffer2[i] == ' '; --i) { - buffer2[i] = '\0'; + if(OneacGetResponse (buffer, sizeof(buffer), 2)) + { + fatalx(EXIT_FAILURE, "Serial timeout with ONEAC UPS on %s\n", + device_path); + } + else + { + if (strncmp(buffer,FAMILY_ON,FAMILY_SIZE) != 0 && + strncmp(buffer,FAMILY_OZ,FAMILY_SIZE) != 0 && + strncmp(buffer,FAMILY_OB,FAMILY_SIZE) != 0 && + strncmp(buffer,FAMILY_EG,FAMILY_SIZE) != 0) + { + fatalx(EXIT_FAILURE, "Did not find an ONEAC UPS on %s\n", + device_path); } - - dstate_setinfo("ups.model", "%s", buffer2); - printf("Found %.10s UPS\n", buffer2); } - /*The ON (OZ) series of UPS supports more stuff than does the EG. - *Take care of the ON (OZ) only stuff here - */ - if(strncmp (dstate_getinfo("ups.model"), FAMILY_ON, 2) == 0 || - strncmp (dstate_getinfo("ups.model"), FAMILY_ON_EXT, 2) == 0) { - /*now set the ON specific "static" parameters*/ + /* UPS Model (either EG, ON, OZ or OB series of UPS) */ + strncpy(UpsFamily, buffer, FAMILY_SIZE); + UpsFamily[2] = '\0'; + dstate_setinfo("device.model", "%s",UpsFamily); + printf("Found %s family of Oneac UPS\n", UpsFamily); - /*nominal input voltage*/ + dstate_setinfo("ups.type", "%s", "Line Interactive"); + + dstate_addcmd("test.battery.start.quick"); + dstate_addcmd("test.battery.stop"); + dstate_addcmd("test.failure.start"); + dstate_addcmd("shutdown.return"); + dstate_addcmd("shutdown.stop"); + dstate_addcmd("shutdown.reboot"); - ser_send(upsfd,"%c%s",GET_NOM_VOLTAGE,COMMAND_END); - ser_get_line(upsfd,buffer,sizeof(buffer),ENDCHAR,IGNCHARS,SECS,USEC); + upsh.setvar = setcmd; + upsh.instcmd = instcmd; - switch (buffer[0]) { + /* set some stuff that shouldn't change after initialization */ + /* this stuff is common to all families of UPS */ + + ser_send(upsfd,"%c%s",GET_ALL,COMMAND_END); + + if (strncmp(UpsFamily, FAMILY_EG, FAMILY_SIZE) == 0) + { + RetValue = OneacGetResponse (buffer, sizeof(buffer), + GETALL_EG_RESP_SIZE); + } + else + { + RetValue = OneacGetResponse (buffer, sizeof(buffer), GETALL_RESP_SIZE); + } + + if(RetValue) + { + fatalx(EXIT_FAILURE, "Serial timeout(2) with ONEAC UPS on %s\n", + device_path); + } + + /* Manufacturer */ + dstate_setinfo("device.mfr", "%.5s", buffer); + + /*firmware revision*/ + dstate_setinfo("ups.firmware", "%.3s",buffer+7); + + /*nominal AC frequency setting --either 50 or 60*/ + dstate_setinfo("input.frequency.nominal", "%.2s", buffer+20); + dstate_setinfo("output.frequency.nominal", "%.2s", buffer+20); + + /* Shutdown delay in seconds...can be changed by user */ + if (getval("offdelay") == NULL) + dstate_setinfo("ups.delay.shutdown", "0"); + else + dstate_setinfo("ups.delay.shutdown", "%s", getval("offdelay")); + + dstate_setflags("ups.delay.shutdown", ST_FLAG_STRING | ST_FLAG_RW); + dstate_setaux("ups.delay.shutdown", GET_SHUTDOWN_RESP_SIZE); + + /* Setup some ON/OZ/OB only stuff ... i.e. not EG */ + + if (strncmp(UpsFamily, FAMILY_EG, FAMILY_SIZE) != 0) + { + dstate_addcmd("reset.input.minmax"); + + /*nominal input voltage*/ + + VRange = buffer[26]; /* Keep for later use also */ + + switch (VRange) /* Will be '1' or '2' */ + { case V120AC: - dstate_setinfo("output.voltage.nominal", - "120"); + dstate_setinfo("input.voltage.nominal", "120"); + dstate_setinfo("output.voltage.nominal", "120"); break; case V230AC: - dstate_setinfo("output.voltage.nominal", - "240"); + dstate_setinfo("input.voltage.nominal", "230"); + dstate_setinfo("output.voltage.nominal", "230"); break; default: upslogx(LOG_INFO,"Oneac: " - "Invalid voltage parameter from UPS"); + "Invalid nom voltage parameter from UPS [%c]", VRange); + } + } + + /* Setup some OZ/OB only stuff */ + + if ((strncmp (UpsFamily, FAMILY_OZ, FAMILY_SIZE) == 0) || + (strncmp (UpsFamily, FAMILY_OB, FAMILY_SIZE) == 0)) + { + dstate_addcmd("test.panel.start"); + dstate_addcmd("test.battery.start.deep"); + dstate_addcmd("beeper.enable"); + dstate_addcmd("beeper.disable"); + dstate_addcmd("beeper.mute"); + + dstate_setaux("ups.delay.shutdown", GETX_SHUTDOWN_RESP_SIZE); + + ser_flush_in(upsfd,"",0); + ser_send(upsfd,"%c%s",GETX_ALL_2,COMMAND_END); + if(OneacGetResponse (buffer, sizeof(buffer), GETX_ALL2_RESP_SIZE)) + { + fatalx(EXIT_FAILURE, "Serial timeout(3) with ONEAC UPS on %s\n", + device_path); + } + + /* Low and high output trip points */ + EliminateLeadingZeroes (buffer+73, 3, buffer2, sizeof(buffer2)); + dstate_setinfo("input.transfer.low", "%s", buffer2); + dstate_setflags("input.transfer.low", ST_FLAG_STRING | ST_FLAG_RW ); + dstate_setaux("input.transfer.low", 3); + + EliminateLeadingZeroes (buffer+76, 3, buffer2, sizeof(buffer2)); + dstate_setinfo("input.transfer.high", "%s", buffer2); + dstate_setflags("input.transfer.high", ST_FLAG_STRING | ST_FLAG_RW); + dstate_setaux("input.transfer.high", 3); + + /* Restart delay */ + EliminateLeadingZeroes (buffer+84, 4, buffer2, sizeof(buffer2)); + dstate_setinfo("ups.delay.start", "%s", buffer2); + dstate_setflags("ups.delay.start", ST_FLAG_STRING | ST_FLAG_RW); + dstate_setaux("ups.delay.start", 4); + + /* Low Batt at time */ + strncpy(buffer2, buffer+82, 2); + buffer2[2]='\0'; + timevalue = atoi(buffer2) * 60; /* Change minutes to seconds */ + dstate_setinfo("battery.runtime.low", "%d",timevalue); + dstate_setflags("battery.runtime.low", ST_FLAG_STRING | ST_FLAG_RW); + dstate_setaux("battery.runtime.low", 2); + + /*Get the actual model string for ON UPS reported as OZ/OB family*/ + + /*UPS Model (full string)*/ + memset(buffer2, '\0', 32); + strncpy(buffer2, buffer+5, 10); + for (i = 9; i >= 0 && buffer2[i] == ' '; --i) + { + buffer2[i] = '\0'; + } + + dstate_setinfo("device.model", "%s", buffer2); + + /* Serial number */ + dstate_setinfo("device.serial", "%.4s-%.4s", buffer+18, buffer+22); + printf("Found %.10s UPS with serial number %.4s-%.4s\n", + buffer2, buffer+18, buffer+22); + + /* Manufacture Date */ + dstate_setinfo("ups.mfr.date", "%.6s (yymmdd)", buffer+38); + + /* Battery Replace Date */ + dstate_setinfo("battery.date", "%.6s (yymmdd)", buffer+44); + dstate_setflags("battery.date", ST_FLAG_STRING | ST_FLAG_RW); + dstate_setaux("battery.date", 6); + + /* Real power nominal */ + EliminateLeadingZeroes (buffer+55, 5, buffer2, sizeof(buffer2)); + dstate_setinfo("ups.realpower.nominal", "%s", buffer2); + + /* Set up ups.start.auto to be writable */ + dstate_setinfo("ups.start.auto", "yes"); + dstate_setflags("ups.start.auto", ST_FLAG_STRING | ST_FLAG_RW); + dstate_setaux("ups.start.auto", 3); + + /* Get output window min/max points from OB or OZ v1.9 or later */ + if ((strncmp (UpsFamily, FAMILY_OB, FAMILY_SIZE) == 0) || + (strcmp (dstate_getinfo("ups.firmware"), MIN_ALLOW_FW) >= 0 )) + { + upsdebugx (2,"Can get output window min/max! (%s)", + dstate_getinfo("ups.firmware")); + + ser_send(upsfd,"%s%s",GETX_ALLOW_RANGE,COMMAND_END); + if(OneacGetResponse (buffer, sizeof(buffer), GETX_RANGE_RESP_SIZE)) + { + fatalx(EXIT_FAILURE, + "Serial timeout(4) with ONEAC UPS on %s\n",device_path); + } + + strncpy(buffer2, buffer, 3); + buffer2[3]='\0'; + i = atoi(buffer2); /* Minimum voltage */ + + strncpy(buffer2, buffer+4, 3); + j = atoi(buffer2); /* Maximum voltage */ + + strncpy(buffer2, buffer+8, 2); + buffer2[2]='\0'; + k = atoi(buffer2); /* Spread between */ + + dstate_setinfo("input.transfer.low.min", "%3d", i); + dstate_setinfo("input.transfer.low.max", "%3d", j-k); + dstate_setinfo("input.transfer.high.min", "%3d", i+k); + dstate_setinfo("input.transfer.high.max", "%3d", j); + + } + else + { + /* Use default values from firmware */ + upsdebugx (2,"Using trip defaults (%s)...", + dstate_getinfo("ups.firmware")); + + switch (VRange) /* Held from initial use */ + { + case V120AC: + dstate_setinfo("input.transfer.low.min", "90"); + dstate_setinfo("input.transfer.low.max", "120"); + dstate_setinfo("input.transfer.high.min", "110"); + dstate_setinfo("input.transfer.high.max", "140"); + break; + + case V230AC: + dstate_setinfo("input.transfer.low.min", "172"); + dstate_setinfo("input.transfer.low.max", "228"); + dstate_setinfo("input.transfer.high.min", "212"); + dstate_setinfo("input.transfer.high.max", "268"); + break; + + default: + ; + + } } } } void upsdrv_updateinfo(void) { - char buffer[256]; - int ret_value; - + static int CommTry = COMM_TRIES; /* Comm loss counter */ + char buffer[256]; /* Main response buffer */ + char buffer2[32]; /* Conversion buffer */ + char s; + int RetValue; + int timevalue; + /* Start with EG/ON information */ ser_flush_in(upsfd,"",0); /*just in case*/ - ser_send (upsfd,"%c%s",GET_ALL,COMMAND_END); - ret_value = ser_get_line(upsfd,buffer,sizeof(buffer),ENDCHAR, - IGNCHARS,SECS,USEC); - - upsdebugx (2,"upsrecv_updateinfo: upsrecv returned: %s\n",buffer); - if (ret_value < 1) + ser_send (upsfd,"%c%s", GET_ALL, COMMAND_END); + + if (strncmp(UpsFamily, FAMILY_EG, FAMILY_SIZE) == 0) { - ser_comm_fail("Oneac UPS Comm failure on port %s",device_path); - dstate_datastale(); + RetValue = OneacGetResponse (buffer,sizeof(buffer),GETALL_EG_RESP_SIZE); } else { + RetValue = OneacGetResponse (buffer, sizeof(buffer), GETALL_RESP_SIZE); + } + + if ((RetValue != 0) && (CommTry == 0)) + { + ser_comm_fail("Oneac UPS Comm failure continues on port %s", + device_path); + } + else if (RetValue != 0) + { + if (--CommTry == 0) + { + ser_comm_fail("Oneac UPS Comm failure on port %s",device_path); + dstate_datastale(); + } + upsdebugx(2,"Oneac: Update serial comm retry value: %d", CommTry); + + return; + } + else + { + CommTry = COMM_TRIES; /* Reset serial retries */ + + s = buffer[12]; + status_init(); + alarm_init(); + /*take care of the UPS status information*/ - switch (buffer[12]) { - case NORMAL : - status_set("OL"); - break; - case ON_BAT_LOW_LINE : - case ON_BAT_HI_LINE : + if (s == '@') + { + status_set("OL"); + } + else + { + if (s & 0x01) /* On Battery */ + { status_set("OB"); - break; - case LO_BAT_LOW_LINE : - case LO_BAT_HI_LINE : - status_set("OB LB"); - break; - case TOO_HOT : - status_set("OVER OB LB"); - break; - case FIX_ME : - dstate_setinfo("ups.test.result","UPS Internal Failure"); - break; - case BAD_BAT : - status_set("RB"); - break; - default : /*cry for attention, fake a status*/ - /*Would another status be better?*/ - upslogx (LOG_ERR, "Oneac: Unknown UPS status"); + } + else + { status_set("OL"); + } + + if (s & 0x02) /* Low Battery */ + status_set("LB"); + + if (s & 0x04) /* General fault */ + { + dstate_setinfo("ups.test.result","UPS Internal Failure"); + } + else + { + dstate_setinfo("ups.test.result","Normal"); + } + + if (s & 0x08) /* Replace Battery */ + status_set("RB"); + +/* if (s & 0x10) */ /* High Line */ + + if (s & 0x20) /* Unit is hot */ + alarm_set("OVERHEAT"); } - /*take care of the reason why the UPS last transfered to battery*/ + /*take care of the reason why the UPS last transferred to battery*/ switch (buffer[13]) { case XFER_BLACKOUT : dstate_setinfo("input.transfer.reason", "Blackout"); @@ -261,61 +562,465 @@ void upsdrv_updateinfo(void) break; default : upslogx(LOG_INFO,"Oneac: Unknown reason for UPS battery" - " transfer"); + " transfer [%c]", buffer[13]); } - /* now update info for only the ON family of UPS*/ - if (strncmp(dstate_getinfo("ups.model"), FAMILY_ON, 2) == 0) { + /* now update info for only the non-EG families of UPS*/ + + if (strncmp(UpsFamily, FAMILY_EG, FAMILY_SIZE) != 0) + { dstate_setinfo("ups.load", "0%.2s",buffer+31); + /* Output ON or OFF? */ + if(buffer[27] == NO_VALUE_YET) + status_set("OFF"); + /*battery charge*/ if(buffer[10] == YES) dstate_setinfo("battery.charge", "0%.2s",buffer+33); - else dstate_setinfo("battery.charge", "100"); + else + dstate_setinfo("battery.charge", "100"); - dstate_setinfo("input.voltage", "%.3s",buffer+35); - dstate_setinfo("input.voltage.minimum", "%.3s",buffer+38); - dstate_setinfo("input.voltage.maximum", "%.3s",buffer+41); - dstate_setinfo("output.voltage", "%.3s",buffer+44); - if (buffer[47] == YES) status_set("BOOST"); + EliminateLeadingZeroes (buffer+35, 3, buffer2, sizeof(buffer2)); + dstate_setinfo("input.voltage", "%s",buffer2); + + EliminateLeadingZeroes (buffer+38, 3, buffer2, sizeof(buffer2)); + dstate_setinfo("input.voltage.minimum", "%s",buffer2); + + EliminateLeadingZeroes (buffer+41, 3, buffer2, sizeof(buffer2)); + dstate_setinfo("input.voltage.maximum", "%s",buffer2); + + EliminateLeadingZeroes (buffer+44, 3, buffer2, sizeof(buffer2)); + dstate_setinfo("output.voltage", "%s",buffer2); + + if (buffer[15] == NO_VALUE_YET) + { + dstate_delinfo("ups.timer.shutdown"); + } + else + { + /* A shutdown is underway! */ + status_set("FSD"); + + if(buffer[15] != HIGH_COUNT) + { + EliminateLeadingZeroes (buffer+15, 3, buffer2, + sizeof(buffer2)); + dstate_setinfo("ups.timer.shutdown", "%s", buffer2); + } + else + { + dstate_setinfo("ups.timer.shutdown", "999"); + } + } + + if (buffer[47] == YES) + status_set("BOOST"); } + + /* Now update info for only the OZ/OB families of UPS */ + + if ((strncmp(UpsFamily, FAMILY_OZ, FAMILY_SIZE) == 0) || + (strncmp(UpsFamily, FAMILY_OB, FAMILY_SIZE) == 0)) + { + ser_flush_in(upsfd,"",0); /*just in case*/ + ser_send (upsfd,"%c%s",GETX_ALL_1,COMMAND_END); + RetValue = OneacGetResponse (buffer, sizeof(buffer), + GETX_ALL1_RESP_SIZE); + + if(RetValue) + { + if (--CommTry == 0) + { + ser_comm_fail("Oneac (OZ) UPS Comm failure on port %s", + device_path); + dstate_datastale(); + } + + upsdebugx(2,"Oneac: " + "Update (OZ) serial comm retry value: %d", CommTry); + } + else + { + CommTry = COMM_TRIES; /* Reset count */ + + EliminateLeadingZeroes (buffer+57, 5, buffer2, sizeof(buffer2)); + dstate_setinfo("ups.realpower", "%s",buffer2); + + dstate_setinfo("input.frequency", "%.2s.%c", + buffer+42,buffer[44]); + dstate_setinfo("output.frequency", "%.2s.%c", + buffer+76, buffer[78]); + + EliminateLeadingZeroes (buffer+29, 3, buffer2, sizeof(buffer2)); + dstate_setinfo("battery.voltage", "%s.%c",buffer2, buffer[32]); + + dstate_setinfo("ups.temperature", "%.2s",buffer+13); + dstate_setinfo("ups.load", "%.3s",buffer+73); + + strncpy(buffer2, buffer+19, 4); + buffer2[4]='\0'; + timevalue = atoi(buffer2) * 60; /* Change mins to secs */ + dstate_setinfo("battery.runtime", "%d",timevalue); + + /* Now some individual requests... */ + + /* Battery replace date */ + ser_send (upsfd,"%c%s",GETX_BATT_REPLACED,COMMAND_END); + if(!OneacGetResponse (buffer, sizeof(buffer), + GETX_DATE_RESP_SIZE)) + dstate_setinfo("battery.date", "%.6s (yymmdd)", buffer); + + /* Low and high output trip points */ + ser_send (upsfd,"%c%s",GETX_LOW_OUT_ALLOW,COMMAND_END); + if(!OneacGetResponse (buffer, sizeof(buffer), + GETX_ALLOW_RESP_SIZE)) + { + EliminateLeadingZeroes (buffer, 3, buffer2,sizeof(buffer2)); + dstate_setinfo("input.transfer.low", "%s", buffer2); + } + + ser_send (upsfd,"%c%s",GETX_HI_OUT_ALLOW,COMMAND_END); + if(!OneacGetResponse (buffer, sizeof(buffer), + GETX_ALLOW_RESP_SIZE)) + dstate_setinfo("input.transfer.high", "%s", buffer); + + /* Restart delay */ + ser_send (upsfd,"%c%s",GETX_RESTART_DLY,COMMAND_END); + if(!OneacGetResponse (buffer, sizeof(buffer), + GETX_RSTRT_RESP_SIZE)) + { + EliminateLeadingZeroes (buffer, 4, buffer2, + sizeof(buffer2)); + dstate_setinfo("ups.delay.start", "%s", buffer2); + } + + /* Buzzer state */ + ser_send (upsfd,"%s%s",GETX_BUZZER_WHAT,COMMAND_END); + if(!OneacGetResponse (buffer, sizeof(buffer), 1)) + { + switch (buffer[0]) + { + case BUZZER_ENABLED : + dstate_setinfo("ups.beeper.status", "enabled"); + break; + case BUZZER_DISABLED : + dstate_setinfo("ups.beeper.status", "disabled"); + break; + case BUZZER_MUTED : + dstate_setinfo("ups.beeper.status", "muted"); + break; + default : + dstate_setinfo("ups.beeper.status", "enabled"); + } + } + + /* Auto start setting */ + ser_send (upsfd,"%s%s",GETX_AUTO_START,COMMAND_END); + if(!OneacGetResponse (buffer, sizeof(buffer), 1)) + { + if (buffer[0] == '0') + dstate_setinfo("ups.start.auto", "yes"); + else + dstate_setinfo("ups.start.auto", "no"); + } + + /* Low Batt at time */ + ser_send (upsfd,"%c%s",GETX_LOW_BATT_TIME,COMMAND_END); + if(!OneacGetResponse (buffer, sizeof(buffer), 2)) + { + strncpy(buffer2, buffer, 2); + buffer2[2]='\0'; + timevalue = atoi(buffer2) * 60; /* Mins to secs */ + dstate_setinfo("battery.runtime.low", "%d",timevalue); + } + + /* Shutdown timer */ + ser_send (upsfd,"%c%s",GETX_SHUTDOWN,COMMAND_END); + if(!OneacGetResponse (buffer, sizeof(buffer), + GETX_SHUTDOWN_RESP_SIZE)) + { + /* ON would have handled NO_VALUE_YET and setting FSD + * above so only deal with counter value here. + */ + if (buffer[0] != NO_VALUE_YET) + { + EliminateLeadingZeroes (buffer, 5, buffer2, + sizeof(buffer2)); + dstate_setinfo("ups.timer.shutdown", "%s", buffer2); + } + } + + /* Restart timer */ + ser_send (upsfd,"%s%s",GETX_RESTART_COUNT,COMMAND_END); + if(!OneacGetResponse (buffer, sizeof(buffer), + GETX_RSTRT_RESP_SIZE)) + { + if (atoi(buffer) == 0) + { + dstate_delinfo("ups.timer.start"); + } + else + { + EliminateLeadingZeroes (buffer, 4, buffer2, + sizeof(buffer2)); + dstate_setinfo("ups.timer.start", "%s", buffer2); + } + } + } + } + + alarm_commit(); status_commit(); - dstate_dataok(); - ser_comm_good(); + + /* If the comm retry counter is zero then datastale has been set. + * We don't want to set dataok or ser_comm_good if that is the case. + */ + + if (CommTry != 0) + { + dstate_dataok(); + ser_comm_good(); + } } } + void upsdrv_shutdown(void) { ser_send(upsfd,"%s",SHUTDOWN); } - void upsdrv_help(void) { printf("\n---------\nNOTE:\n"); - printf("You must set the UPS interface card DIP switch to 9600BPS\n"); -} - -void upsdrv_makevartable(void) -{ - addvar(VAR_VALUE,"testtime", - "Change battery test time from 2 minute default."); -} - -void upsdrv_initups(void) -{ - upsfd = ser_open(device_path); - ser_set_speed(upsfd, device_path, B9600); - -/*get the UPS in the right frame of mind*/ - - ser_send(upsfd,"%s", COMMAND_END); - sleep (1); - ser_send(upsfd,"%s", COMMAND_END); - sleep (1); + printf("You must set the UPS interface card DIP switch to 9600 BPS\n"); } void upsdrv_cleanup(void) { ser_close(upsfd, device_path); } + +void upsdrv_makevartable(void) +{ + addvar(VAR_VALUE,"testtime", + "Change battery test time from the 2 minute default."); + + addvar(VAR_VALUE,"offdelay", + "Change shutdown delay time from 0 second default."); +} + +int instcmd(const char *cmdname, const char *extra) +{ + int i; + + upsdebugx(2, "In instcmd with %s and extra %s.", cmdname, extra); + + if (!strcasecmp(cmdname, "test.failure.start")) { + ser_send(upsfd,"%s%s",SIM_PWR_FAIL,COMMAND_END); + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "shutdown.return")) { + + i = atoi(dstate_getinfo("ups.delay.shutdown")); + + if ((strncmp (UpsFamily, FAMILY_OZ, FAMILY_SIZE) == 0) || + (strncmp (UpsFamily, FAMILY_OB, FAMILY_SIZE) == 0)) + { + upsdebugx(3, "Shutdown using %c%d...", DELAYED_SHUTDOWN_PREFIX, i); + ser_send(upsfd,"%c%d%s",DELAYED_SHUTDOWN_PREFIX, i, COMMAND_END); + } + else + { + upsdebugx(3, "Shutdown using %c%03d...",DELAYED_SHUTDOWN_PREFIX, i); + ser_send(upsfd,"%c%03d%s",DELAYED_SHUTDOWN_PREFIX, i, COMMAND_END); + } + + return STAT_INSTCMD_HANDLED; + } + + if(!strcasecmp(cmdname, "shutdown.reboot")) { + ser_send(upsfd, "%s", SHUTDOWN); + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "shutdown.stop")) { + ser_send(upsfd,"%c%s",DELAYED_SHUTDOWN_PREFIX,COMMAND_END); + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "test.battery.start.quick")) { + do_battery_test(); + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "test.battery.start.deep")) { + ser_send(upsfd, "%s%s", TEST_BATT_DEEP, COMMAND_END); + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "test.battery.stop")) + { + if ((strncmp (UpsFamily, FAMILY_EG, FAMILY_SIZE) == 0) || + (strncmp (UpsFamily, FAMILY_ON, FAMILY_SIZE) == 0)) + { + ser_send(upsfd,"%s00%s",BAT_TEST_PREFIX,COMMAND_END); + } + else + { + ser_send(upsfd,"%c%s",TEST_ABORT,COMMAND_END); + } + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "reset.input.minmax")) { + ser_send(upsfd,"%c%s",RESET_MIN_MAX, COMMAND_END); + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "beeper.enable")) { + ser_send(upsfd,"%c%c%s",SETX_BUZZER_PREFIX, BUZZER_ENABLED,COMMAND_END); + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "beeper.disable")) { + ser_send(upsfd,"%c%c%s",SETX_BUZZER_PREFIX,BUZZER_DISABLED,COMMAND_END); + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "beeper.mute")) { + ser_send(upsfd,"%c%c%s",SETX_BUZZER_PREFIX, BUZZER_MUTED, COMMAND_END); + return STAT_INSTCMD_HANDLED; + } + + if (!strcasecmp(cmdname, "test.panel.start")) { + ser_send(upsfd,"%s%s",TEST_INDICATORS, COMMAND_END); + return STAT_INSTCMD_HANDLED; + } + + upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); + return STAT_INSTCMD_UNKNOWN; +} + + +int setcmd(const char* varname, const char* setvalue) +{ + upsdebugx(2, "In setcmd for %s with %s...", varname, setvalue); + + if (!strcasecmp(varname, "ups.delay.shutdown")) + { + if ((strncmp (UpsFamily, FAMILY_OZ, FAMILY_SIZE) == 0) || + (strncmp (UpsFamily, FAMILY_OB, FAMILY_SIZE) == 0)) + { + if (atoi(setvalue) > 65535) + { + upsdebugx(2, "Too big for OZ/OB (>65535)...(%s)", setvalue); + return STAT_SET_UNKNOWN; + } + } + else + { + if (atoi(setvalue) > 999) + { + upsdebugx(2, "Too big for EG/ON (>999)...(%s)", setvalue); + return STAT_SET_UNKNOWN; + } + } + + dstate_setinfo("ups.delay.shutdown", "%s", setvalue); + return STAT_SET_HANDLED; + } + + if (!strcasecmp(varname, "input.transfer.low")) + { + if (SetOutputAllow(setvalue, dstate_getinfo("input.transfer.high"))) + { + return STAT_SET_UNKNOWN; + } + else + { + dstate_setinfo("input.transfer.low" , "%s", setvalue); + return STAT_SET_HANDLED; + } + } + + if (!strcasecmp(varname, "input.transfer.high")) + { + if (SetOutputAllow(dstate_getinfo("input.transfer.low"), setvalue)) + { + return STAT_SET_UNKNOWN; + } + else + { + dstate_setinfo("input.transfer.high" , "%s", setvalue); + return STAT_SET_HANDLED; + } + } + + if (!strcasecmp(varname, "battery.date")) + { + if(strlen(setvalue) == GETX_DATE_RESP_SIZE) /* yymmdd (6 chars) */ + { + ser_send(upsfd, "%s%s%s", SETX_BATTERY_DATE, setvalue, COMMAND_END); + dstate_setinfo("battery.date", "%s (yymmdd)", setvalue); + return STAT_SET_HANDLED; + } + else + { + return STAT_SET_UNKNOWN; + } + } + + if (!strcasecmp(varname, "ups.delay.start")) + { + if (atoi(setvalue) <= 9999) + { + ser_send(upsfd,"%s%s%s",SETX_RESTART_DELAY, setvalue, COMMAND_END); + + dstate_setinfo("ups.delay.start", "%s", setvalue); + return STAT_SET_HANDLED; + } + else + { + return STAT_SET_UNKNOWN; + } + } + + if (!strcasecmp(varname, "battery.runtime.low")) + { + if (atoi(setvalue) <= 99) + { + ser_send(upsfd,"%s%s%s",SETX_LOWBATT_AT, setvalue, COMMAND_END); + + dstate_setinfo("battery.runtime.low", "%s", setvalue); + return STAT_SET_HANDLED; + } + else + { + return STAT_SET_UNKNOWN; + } + } + + if (!strcasecmp(varname, "ups.start.auto")) + { + if (!strcasecmp(setvalue, "yes")) + { + ser_send(upsfd,"%c0%s",SETX_AUTO_START, COMMAND_END); + dstate_setinfo("ups.start.auto", "yes"); + return STAT_SET_HANDLED; + } + else if (!strcasecmp(setvalue, "no")) + { + ser_send(upsfd,"%c1%s",SETX_AUTO_START, COMMAND_END); + dstate_setinfo("ups.start.auto", "no"); + return STAT_SET_HANDLED; + } + + return STAT_SET_UNKNOWN; + } + + upslogx(LOG_NOTICE, "setcmd: unknown command [%s]", varname); + + return STAT_SET_UNKNOWN; +} diff --git a/drivers/oneac.h b/drivers/oneac.h index c90d74b..9f1bae8 100644 --- a/drivers/oneac.h +++ b/drivers/oneac.h @@ -1,19 +1,25 @@ -/* -Copyright (C) 2002 Eric Lawson - - 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 +/* oneac.h - Driver for Oneac UPS using the Advanced Interface. + * + * Copyright (C) + * 2003 by Eric Lawson + * 2012 by Bill Elliot + * + * This program was sponsored by MGE UPS SYSTEMS, and now Eaton + * + * 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 + * */ /*misc stuff*/ @@ -22,22 +28,27 @@ Copyright (C) 2002 Eric Lawson #define COMMAND_END "\r\n" #define DEFAULT_BAT_TEST_TIME "02" -/*Information requests*/ +/*Information requests -- EG level */ -#define GET_ALL '%' -#define GET_ALL_EXT_2 '^' -#define GET_ALL_EXT_1 '&' -#define GET_MFR 'M' -#define GET_FAMILY 'F' -#define GET_VERSION 'N' -#define GET_ON_INVERTER 'G' -#define GET_BATLOW 'K' -#define GET_STATUS 'X' -#define GET_LAST_XFER 'W' +#define GET_ALL '%' +#define GETALL_EG_RESP_SIZE 22 +#define GETALL_RESP_SIZE 48 + +#define GET_MFR 'M' +#define GET_FAMILY 'F' +#define GET_VERSION 'N' +#define GET_ON_INVERTER 'G' +#define GET_BATLOW 'K' +#define GET_STATUS 'X' +#define GET_LAST_XFER 'W' #define GET_INVERTER_RDY 'I' -#define GET_TEST_TIME 'Q' -#define GET_NOM_FREQ 'H' -#define GET_NOM_VOLTAGE 'V' +#define GET_SHUTDOWN 'O' +#define GET_TEST_TIME 'Q' +#define GET_NOM_FREQ 'H' + +/*Information requests -- ON level (EG plus these) */ + +#define GET_NOM_VOLTAGE 'V' #define GET_DISPLAY_CODE 'D' #define GET_CONDITION_CODE 'C' #define GET_PERCENT_LOAD 'P' @@ -45,48 +56,124 @@ Copyright (C) 2002 Eric Lawson #define GET_INPUT_LINE_VOLT 'L' #define GET_MIN_INPUT_VOLT 'A' #define GET_MAX_INPUT_VOLT 'E' -#define GET_OUTPUT_VOLT 'S' -#define GET_BOOSTING 'B' +#define GET_OUTPUT_VOLT 'S' +#define GET_BOOSTING 'B' -/*Control functions*/ -#define SIM_PWR_FAIL "\x02\x15" /*^B^U 15 second battery test*/ -#define SHUTDOWN "\x0f\x06" /*^O^F (a letter O)*/ +#define GET_SHUTDOWN_RESP_SIZE 3 + +/*Information requests -- OZ/OB level (ON plus these) */ + +#define GETX_ALL_1 '&' +#define GETX_ALL1_RESP_SIZE 79 + +#define GETX_OUTSOURCE 'a' +#define GETX_FRONTDISP 'b' +#define GETX_INT_TEMP 'g' /* Degrees C */ +#define GETX_BATT_STAT 'h' /* Unknown(1), Normal, Low, Depleted */ +#define GETX_BATT_CHG_PERC 'i' /* 0 - 100 */ +#define GETX_EST_MIN_REM 'j' +#define GETX_ONBATT_TIME 'k' /* In seconds */ +#define GETX_BATT_VOLTS 'l' /* Read as xxx.x */ +#define GETX_INP_FREQ 'p' +#define GETX_MIN_IN_VOLTS 'q' +#define GETX_MAX_IN_VOLTS 'r' +#define GETX_IN_VOLTS 's' +#define GETX_IN_WATTS 'u' +#define GETX_OUT_VOLTS 'v' +#define GETX_OUT_WATTS 'x' +#define GETX_OUT_LOAD_PERC 'y' +#define GETX_OUT_FREQ 'z' + +#define GETX_ALL_2 '^' +#define GETX_ALL2_RESP_SIZE 92 + +#define GETX_MODEL 'J' +#define GETX_FW_REV 'U' /* Read as xx.x */ +#define GETX_SERIAL_NUM 'Y' + +#define GETX_MAN_DATE '$' /* yymmdd */ +#define GETX_BATT_REPLACED '+' /* yymmdd */ +#define GETX_DATE_RESP_SIZE 6 + +#define GETX_UNIT_KVA '''' /* Read as xxx.xx */ +#define GETX_UNIT_WATTS "''" /* 2-character string request */ +#define GETX_LOW_OUT_ALLOW '[' /* Tap up or inverter at this point */ +#define GETX_HI_OUT_ALLOW ']' /* Tap down or inverter at this point */ +#define GETX_NOTIFY_DELAY ',' /* Secs of delay for power fail alert */ +#define GETX_ALLOW_RESP_SIZE 3 + +#define GETX_LOW_BATT_TIME '"' /* Low batt alarm at xx minutes */ + +#define GETX_RESTART_DLY '_' /* Restart delay */ +#define GETX_RESTART_COUNT "_?" /* Returns actual counter value */ +#define GETX_RSTRT_RESP_SIZE 4 + +/*Other requests */ +#define GETX_SHUTDOWN '}' /* Shutdown counter (..... for none) */ +#define GETX_SHUTDOWN_RESP_SIZE 5 + +#define GETX_BATT_TEST_DAYS "\x02\x1A" /* Days between battery tests */ +#define GETX_BUZZER_WHAT "\x07?" /* What is buzzer state */ +#define GETX_AUTO_START " 999 on OZ */ +#define MIN_ALLOW_FW "1.9" /* At or above provides output allow range */ /*responses*/ -#define MFGR "ONEAC" -#define FAMILY_ON "ON" -#define FAMILY_ON_EXT "OZ" -#define FAMILY_EG "EG" -#define YES 'Y' -#define NO 'N' -#define NORMAL '@' -#define ON_BAT_LOW_LINE 'A' -#define ON_BAT_HI_LINE 'Q' -#define LO_BAT_LOW_LINE 'C' -#define LO_BAT_HI_LINE 'S' -#define TOO_HOT '`' -#define FIX_ME 'D' -#define BAD_BAT 'H' -#define V230AC '2' -#define V120AC '1' -#define XFER_BLACKOUT 'B' -#define XFER_LOW_VOLT 'L' -#define XFER_HI_VOLT 'H' +#define FAMILY_EG "EG" /* 3 tri-color LEDs and big ON/OFF on front */ +#define FAMILY_ON "ON" /* Serial port avail only on interface card */ +#define FAMILY_OZ "OZ" /* DB-25 std., plus interface slot */ +#define FAMILY_OB "OB" /* Lg. cab with removable modules */ +#define FAMILY_SIZE 2 +#define YES 'Y' +#define NO 'N' +#define V230AC '2' +#define V120AC '1' +#define XFER_BLACKOUT 'B' +#define XFER_LOW_VOLT 'L' +#define XFER_HI_VOLT 'H' +#define BUZZER_ENABLED '1' +#define BUZZER_DISABLED '0' +#define BUZZER_MUTED '2' /*front panel alarm codes*/ -#define CODE_BREAKER_OPEN "c1" /*input circuit breaker open*/ -#define CODE_BAT_FUSE_OPEN "c2" /*battery not connected. Open fuse?*/ -#define CODE_TOO_HOT "c3" /*UPS too hot*/ -#define CODE_CHARGING "c4" /*recharging battery pack*/ -#define CODE_LOW_BAT_CAP "c5" /*batteries getting too old*/ -#define CODE_OVERLOAD "c8" /*"slight" overload*/ -#define CODE_GROSS_OVLE "c9" /*gross overload 1 minute to power off*/ +#define CODE_BREAKER_OPEN "c1" /*input circuit breaker open*/ +#define CODE_BAT_FUSE_OPEN "c2" /*battery not connected. Open fuse?*/ +#define CODE_TOO_HOT "c3" /*UPS too hot*/ +#define CODE_CHARGING "c4" /*recharging battery pack*/ +#define CODE_LOW_BAT_CAP "c5" /*batteries getting too old*/ +#define CODE_OVERLOAD "c8" /*"slight" overload*/ +#define CODE_GROSS_OVLE "c9" /*gross overload 1 minute to power off*/ #define CODE_CHRGR_FUSE_OPEN "u1" /*battery charger fuse probably open*/ diff --git a/drivers/rhino.c b/drivers/rhino.c index 707432b..c43c411 100644 --- a/drivers/rhino.c +++ b/drivers/rhino.c @@ -540,13 +540,12 @@ static void getbaseinfo(void) unsigned char temp[256]; unsigned char Pacote[37]; int tam, i, j=0; - time_t *tmt; + time_t tmt; struct tm *now; const char *Model; - tmt = ( time_t * ) malloc( sizeof( time_t ) ); - time( tmt ); - now = localtime( tmt ); + time( &tmt ); + now = localtime( &tmt ); dian = now->tm_mday; mesn = now->tm_mon+1; anon = now->tm_year+1900; diff --git a/drivers/snmp-ups.c b/drivers/snmp-ups.c index 8e17c06..36fdfb8 100644 --- a/drivers/snmp-ups.c +++ b/drivers/snmp-ups.c @@ -3,7 +3,7 @@ * Based on NetSNMP API (Simple Network Management Protocol V1-2) * * Copyright (C) - * 2002 - 2011 Arnaud Quette + * 2002 - 2012 Arnaud Quette * 2002 - 2006 Dmitry Frolov * J.W. Hoogervorst * Niels Baggesen @@ -47,6 +47,11 @@ #include "cyberpower-mib.h" #include "ietf-mib.h" +/* Address API change */ +#ifndef usmAESPrivProtocol +#define usmAESPrivProtocol usmAES128PrivProtocol +#endif + static mib2nut_info_t *mib2nut[] = { &apc, &mge, @@ -70,6 +75,10 @@ static mib2nut_info_t *mib2nut[] = { NULL }; +struct snmp_session g_snmp_sess, *g_snmp_sess_p; +const char *OID_pwr_status; +int g_pwr_battery; +int pollfreq; /* polling frequency */ int input_phases, output_phases, bypass_phases; /* pointer to the Snmp2Nut lookup table */ @@ -82,7 +91,7 @@ const char *mibvers; static void disable_transfer_oids(void); #define DRIVER_NAME "Generic SNMP UPS driver" -#define DRIVER_VERSION "0.58" +#define DRIVER_VERSION "0.66" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -122,13 +131,18 @@ void upsdrv_initinfo(void) dstate_setinfo("driver.version.internal", "%s", version); /* add instant commands to the info database. - * outlet commands are processed during initial walk */ + * outlet commands are processed later, during initial walk */ for (su_info_p = &snmp_info[0]; su_info_p->info_type != NULL ; su_info_p++) { su_info_p->flags |= SU_FLAG_OK; if ((SU_TYPE(su_info_p) == SU_TYPE_CMD) - && !(su_info_p->flags & SU_OUTLET)) - dstate_addcmd(su_info_p->info_type); + && !(su_info_p->flags & SU_OUTLET)) { + /* first check that this OID actually exists */ + if (nut_snmp_get(su_info_p->OID) != NULL) { + dstate_addcmd(su_info_p->info_type); + upsdebugx(1, "upsdrv_initinfo(): adding command '%s'", su_info_p->info_type); + } + } } if (testvar("notransferoids")) @@ -150,7 +164,7 @@ void upsdrv_updateinfo(void) upsdebugx(1,"SNMP UPS driver : entering upsdrv_updateinfo()"); /* only update every pollfreq */ - /* FIXME: update status (SU_STATUS_*), à la usbhid-ups, in between */ + /* FIXME: only update status (SU_STATUS_*), à la usbhid-ups, in between */ if (time(NULL) > (lastpoll + pollfreq)) { status_init(); @@ -178,7 +192,28 @@ void upsdrv_shutdown(void) never send this command to the UPS. This is not an error, but a limitation of the interface used. */ - fatalx(EXIT_SUCCESS, "SNMP doesn't support shutdown in system halt script"); + + upsdebugx(1, "upsdrv_shutdown..."); + + /* Try to shutdown with delay */ + if (su_instcmd("shutdown.return", NULL) == STAT_INSTCMD_HANDLED) { + /* Shutdown successful */ + return; + } + + /* If the above doesn't work, try shutdown.reboot */ + if (su_instcmd("shutdown.reboot", NULL) == STAT_INSTCMD_HANDLED) { + /* Shutdown successful */ + return; + } + + /* If the above doesn't work, try load.off.delay */ + if (su_instcmd("load.off.delay", NULL) == STAT_INSTCMD_HANDLED) { + /* Shutdown successful */ + return; + } + + fatalx(EXIT_FAILURE, "Shutdown failed!"); } void upsdrv_help(void) @@ -251,6 +286,22 @@ void upsdrv_initups(void) else fatalx(EXIT_FAILURE, "%s MIB wasn't found on %s", mibs, g_snmp_sess.peername); /* FIXME: "No supported device detected" */ + + if (su_find_info("load.off.delay")) { + /* Adds default with a delay value of '0' (= immediate) */ + dstate_addcmd("load.off"); + } + + if (su_find_info("load.on.delay")) { + /* Adds default with a delay value of '0' (= immediate) */ + dstate_addcmd("load.on"); + } + + if (su_find_info("load.off.delay") && su_find_info("load.on.delay")) { + /* Add composite instcmds (require setting multiple OID values) */ + dstate_addcmd("shutdown.return"); + dstate_addcmd("shutdown.stayoff"); + } } void upsdrv_cleanup(void) @@ -811,8 +862,9 @@ mib2nut_info_t *match_sysoid() } } /* Yell all to call for user report */ - upslogx(LOG_ERR, "No matching MIB found for sysOID '%s'! " \ - "Please report it to NUT developers, with the 'mib' paramater for your devices", + upslogx(LOG_ERR, "No matching MIB found for sysOID '%s'!\n" \ + "Please report it to NUT developers, with an 'upsc' output for your device.\n" \ + "Going back to the classic MIB detection method.", sysOID_buf); } else @@ -879,7 +931,7 @@ bool_t load_mib2nut(const char *mib) } /* find the OID value matching that INFO_* value */ -long su_find_valinfo(info_lkp_t *oid2info, char* value) +long su_find_valinfo(info_lkp_t *oid2info, const char* value) { info_lkp_t *info_lkp; @@ -1334,6 +1386,7 @@ int su_setvar(const char *varname, const char *val) snmp_info_t *su_info_p = NULL; bool_t status; int retval = STAT_SET_FAILED; + int value = -1; upsdebugx(2, "entering su_setvar(%s, %s)", varname, val); @@ -1410,7 +1463,15 @@ int su_setvar(const char *varname, const char *val) if (su_info_p->info_flags & ST_FLAG_STRING) { status = nut_snmp_set_str(su_info_p->OID, val); } else { - status = nut_snmp_set_int(su_info_p->OID, strtol(val, NULL, 0)); + /* non string data may imply a value lookup */ + if (su_info_p->oid2info) { + value = su_find_valinfo(su_info_p->oid2info, val); + } + else { + value = strtol(val, NULL, 0); + } + /* Actually apply the new value */ + status = nut_snmp_set_int(su_info_p->OID, value); } if (status == FALSE) @@ -1486,7 +1547,50 @@ int su_instcmd(const char *cmdname, const char *extradata) } } + /* Sanity check */ if (!su_info_p || !su_info_p->info_type || !(su_info_p->flags & SU_FLAG_OK)) { + + /* Check for composite commands */ + if (!strcasecmp(cmdname, "load.on")) { + return su_instcmd("load.on.delay", "0"); + } + + if (!strcasecmp(cmdname, "load.off")) { + return su_instcmd("load.off.delay", "0"); + } + + if (!strcasecmp(cmdname, "shutdown.return")) { + int ret; + + /* Ensure "ups.start.auto" is set to "yes", if supported */ + if (dstate_getinfo("ups.start.auto")) { + su_setvar("ups.start.auto", "yes"); + } + + ret = su_instcmd("load.on.delay", dstate_getinfo("ups.delay.start")); + if (ret != STAT_INSTCMD_HANDLED) { + return ret; + } + + return su_instcmd("load.off.delay", dstate_getinfo("ups.delay.shutdown")); + } + + if (!strcasecmp(cmdname, "shutdown.stayoff")) { + int ret; + + /* Ensure "ups.start.auto" is set to "no", if supported */ + if (dstate_getinfo("ups.start.auto")) { + su_setvar("ups.start.auto", "no"); + } + + ret = su_instcmd("load.on.delay", "-1"); + if (ret != STAT_INSTCMD_HANDLED) { + return ret; + } + + return su_instcmd("load.off.delay", dstate_getinfo("ups.delay.shutdown")); + } + upsdebugx(2, "su_instcmd: %s unavailable", cmdname); if (!strncmp(cmdname, "outlet", 6)) @@ -1495,7 +1599,7 @@ int su_instcmd(const char *cmdname, const char *extradata) return STAT_INSTCMD_UNKNOWN; } - /* set value. */ + /* set value, using the provided one, or the default one otherwise */ if (su_info_p->info_flags & ST_FLAG_STRING) { status = nut_snmp_set_str(su_info_p->OID, extradata ? extradata : su_info_p->dfl); } else { @@ -1515,54 +1619,6 @@ int su_instcmd(const char *cmdname, const char *extradata) return retval; } -/* TODO: complete rewrite */ -void su_shutdown_ups(void) -{ - int sdtype = 0; - long pwr_status; - - if (nut_snmp_get_int(OID_pwr_status, &pwr_status) == FALSE) - fatalx(EXIT_FAILURE, "cannot determine UPS status"); - - if (testvar(SU_VAR_SDTYPE)) - sdtype = atoi(getval(SU_VAR_SDTYPE)); - - /* logic from newapc.c */ - switch (sdtype) { - case 3: /* shutdown with grace period */ - upslogx(LOG_INFO, "sending delayed power off command to UPS"); - su_instcmd("shutdown.stayoff", "0"); - break; - case 2: /* instant shutdown */ - upslogx(LOG_INFO, "sending power off command to UPS"); - su_instcmd("load.off", "0"); - break; - case 1: - /* Send a combined set of shutdown commands which can work better */ - /* if the UPS gets power during shutdown process */ - /* Specifically it sends both the soft shutdown 'S' */ - /* and the powerdown after grace period - '@000' commands */ -/* upslogx(LOG_INFO, "UPS - sending shutdown/powerdown"); - if (pwr_status == g_pwr_battery) - su_ups_instcmd(CMD_SOFTDOWN, 0, 0); - su_ups_instcmd(CMD_SDRET, 0, 0); - break; -*/ - default: - /* if on battery... */ -/* if (pwr_status == su_find_valinfo(info_lkp_t *oid2info, "OB")) { - upslogx(LOG_INFO, - "UPS is on battery, sending shutdown command..."); - su_ups_instcmd(CMD_SOFTDOWN, 0, 0); - } else { - upslogx(LOG_INFO, "UPS is online, sending shutdown+return command..."); - su_ups_instcmd(CMD_SDRET, 0, 0); - } -*/ - break; - } -} - /* FIXME: the below functions can be removed since these were for loading * the mib2nut information from a file instead of the .h definitions... */ /* return 1 if usable, 0 if not */ diff --git a/drivers/snmp-ups.h b/drivers/snmp-ups.h index d130428..72f93ce 100644 --- a/drivers/snmp-ups.h +++ b/drivers/snmp-ups.h @@ -78,7 +78,7 @@ for each OID request we made), instead of sending many small packets /* Force numeric OIDs by disabling MIB loading */ #define DISABLE_MIB_LOADING 1 - +/* Parameters default values */ #define DEFAULT_POLLFREQ 30 /* in seconds */ /* use explicit booleans */ @@ -171,7 +171,6 @@ typedef struct { #define SU_VAR_VERSION "snmp_version" #define SU_VAR_MIBS "mibs" #define SU_VAR_POLLFREQ "pollfreq" -#define SU_VAR_SDTYPE "sdtype" /* SNMP v3 related parameters */ #define SU_VAR_SECLEVEL "secLevel" #define SU_VAR_SECNAME "secName" @@ -234,7 +233,7 @@ bool_t su_ups_get(snmp_info_t *su_info_p); bool_t load_mib2nut(const char *mib); const char *su_find_infoval(info_lkp_t *oid2info, long value); -long su_find_valinfo(info_lkp_t *oid2info, char* value); +long su_find_valinfo(info_lkp_t *oid2info, const char* value); int su_setvar(const char *varname, const char *val); int su_instcmd(const char *cmdname, const char *extradata); @@ -242,10 +241,10 @@ void su_shutdown_ups(void); void read_mibconf(char *mib); -struct snmp_session g_snmp_sess, *g_snmp_sess_p; -const char *OID_pwr_status; -int g_pwr_battery; -int pollfreq; /* polling frequency */ +extern struct snmp_session g_snmp_sess, *g_snmp_sess_p; +extern const char *OID_pwr_status; +extern int g_pwr_battery; +extern int pollfreq; /* polling frequency */ extern int input_phases, output_phases, bypass_phases; #endif /* SNMP_UPS_H */ diff --git a/drivers/solis.c b/drivers/solis.c index 4cc2c88..78e83e0 100644 --- a/drivers/solis.c +++ b/drivers/solis.c @@ -792,11 +792,10 @@ static void getbaseinfo(void) unsigned char Pacote[25]; int i, i1=0, i2=0, j=0, tam, tpac=25; - time_t *tmt; + time_t tmt; struct tm *now; - tmt = ( time_t * ) malloc( sizeof( time_t ) ); - time( tmt ); - now = localtime( tmt ); + time( &tmt ); + now = localtime( &tmt ); dian = now->tm_mday; mesn = now->tm_mon+1; anon = now->tm_year+1900; @@ -956,11 +955,10 @@ static void getupdateinfo(void) int tam, isday, hourn, minn; /* time update and programable shutdown block */ - time_t *tmt; + time_t tmt; struct tm *now; - tmt = ( time_t * ) malloc( sizeof( time_t ) ); - time( tmt ); - now = localtime( tmt ); + time( &tmt ); + now = localtime( &tmt ); hourn = now->tm_hour; minn = now->tm_min; weekn = now->tm_wday; diff --git a/drivers/tripplite-hid.c b/drivers/tripplite-hid.c index 5fc88cd..5069164 100644 --- a/drivers/tripplite-hid.c +++ b/drivers/tripplite-hid.c @@ -1,7 +1,7 @@ /* tripplite-hid.c - data to monitor Tripp Lite USB/HID devices with NUT * * Copyright (C) - * 2003 - 2005 Arnaud Quette + * 2003 - 2012 Arnaud Quette * 2005 - 2006 Peter Selinger * 2008 - 2009 Arjen de Korte * @@ -29,7 +29,7 @@ #include "tripplite-hid.h" #include "usb-common.h" -#define TRIPPLITE_HID_VERSION "TrippLite HID 0.6" +#define TRIPPLITE_HID_VERSION "TrippLite HID 0.8" /* FIXME: experimental flag to be put in upsdrv_info */ @@ -109,6 +109,16 @@ static usb_device_id_t tripplite_usb_device_table[] = { { USB_DEVICE(TRIPPLITE_VENDORID, 0x4007), battery_scale_1dot0 }, { USB_DEVICE(TRIPPLITE_VENDORID, 0x4008), battery_scale_1dot0 }, + /* e.g. ? */ + { USB_DEVICE(HP_VENDORID, 0x0001), battery_scale_1dot0 }, + /* HP R1500 G2 and G3 INTL */ + { USB_DEVICE(HP_VENDORID, 0x1fe0), battery_scale_1dot0 }, + /* HP T750 G2 */ + { USB_DEVICE(HP_VENDORID, 0x1fe1), battery_scale_1dot0 }, + /* e.g. ? */ + { USB_DEVICE(HP_VENDORID, 0x1fe2), battery_scale_1dot0 }, + /* HP T1500 G3 */ + { USB_DEVICE(HP_VENDORID, 0x1fe3), battery_scale_1dot0 }, /* HP T750 INTL */ { USB_DEVICE(HP_VENDORID, 0x1f06), battery_scale_1dot0 }, /* HP T1000 INTL */ @@ -117,10 +127,6 @@ static usb_device_id_t tripplite_usb_device_table[] = { { USB_DEVICE(HP_VENDORID, 0x1f09), battery_scale_1dot0 }, /* HP R/T 2200 INTL (like SMART2200RMXL2U) */ { USB_DEVICE(HP_VENDORID, 0x1f0a), battery_scale_1dot0 }, - /* HP R1500 G2 INTL */ - { USB_DEVICE(HP_VENDORID, 0x1fe0), battery_scale_1dot0 }, - /* HP T750 G2 */ - { USB_DEVICE(HP_VENDORID, 0x1fe1), battery_scale_1dot0 }, /* Terminating entry */ { -1, -1, NULL } @@ -174,19 +180,41 @@ static info_lkp_t tripplite_battvolt[] = { /* TRIPPLITE usage table */ static usage_lkp_t tripplite_usage_lkp[] = { /* currently unknown: - ffff0010, 00ff0001, ffff007d, ffff00c0, ffff00c1, ffff00c2, + 00ff0001, ffff007d, ffff00c0, ffff00c1, ffff00c2, ffff00c3, ffff00c4, ffff00c5, ffff00d2, ffff0091, ffff00c7 */ + { "TLCustom", 0xffff0010 }, + { "TLDelayBeforeStartup", 0xffff0056 }, /* in minutes */ { "TLLowVoltageTransferMax", 0xffff0057 }, { "TLLowVoltageTransferMin", 0xffff0058 }, { "TLHighVoltageTransferMax", 0xffff0059 }, { "TLHighVoltageTransferMin", 0xffff005a }, + /* Outlet state: + * 1- On/Closed + * 2- Off/Open + * 3- On with pending off + * 4- Off with pending on + * 5- Unknown + * 6- Resolved/Unknown + * 7- Failed and Closed + * 8- Failed and Open */ + { "OutletState", 0xffff007a }, + { "OutletCount", 0xffff007b }, /* Number of load segments */ + { "UPSFirmwareVersion", 0xffff007c }, + { "CommunicationProtocolVersion", 0xffff007d }, /* HID protocol version */ + { "CommunicationVersion", 0xffff007e }, /* USB firmware version */ + { "iUPSPartNumber", 0xffff007f }, /* String index to Part Number */ + { "AutoOnDelay", 0xffff0080 }, /* '0' (no delay) to 'n' (delay in seconds) */ { "TLWatchdog", 0xffff0092 }, + { "TLOutletsAvailableMask", 0xffff0095 }, + { "TLOutletsStatusMask", 0xffff0096 }, /* it looks like Tripp Lite confused pages 0x84 and 0x85 for the following 4 items, on some OMNI1000LCD devices. */ { "TLCharging", 0x00840044 }, /* conflicts with HID spec! */ - { "TLDischarging", 0x00840045 }, /* conflicts with HID spec! */ + /* conflicts with HID spec (and HP implementation) for TrippLite! + * Refer to tripplite_discharging_info */ + { "TLDischarging", 0x00840045 }, { "TLNeedReplacement", 0x0084004b }, { "TLACPresent", 0x008400d0 }, { NULL, 0 } @@ -209,19 +237,19 @@ static hid_info_t tripplite_hid2nut[] = { /* unmapped variables - meaning unknown */ { "UPS.Flow.0xffff0097", 0, 0, "UPS.Flow.0xffff0097", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff0075", 0, 0, "UPS.0xffff0010.[1].0xffff0075", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff0076", 0, 0, "UPS.0xffff0010.[1].0xffff0076", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff007c", 0, 0, "UPS.0xffff0010.[1].0xffff007c", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff007d", 0, 0, "UPS.0xffff0010.[1].0xffff007d", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff00e0", 0, 0, "UPS.0xffff0010.[1].0xffff00e0", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff00e1", 0, 0, "UPS.0xffff0010.[1].0xffff00e1", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff00e2", 0, 0, "UPS.0xffff0010.[1].0xffff00e2", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff00e3", 0, 0, "UPS.0xffff0010.[1].0xffff00e3", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff00e4", 0, 0, "UPS.0xffff0010.[1].0xffff00e4", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff00e5", 0, 0, "UPS.0xffff0010.[1].0xffff00e5", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff00e6", 0, 0, "UPS.0xffff0010.[1].0xffff00e6", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff00e7", 0, 0, "UPS.0xffff0010.[1].0xffff00e7", NULL, "%.0f", 0, NULL }, - { "UPS.0xffff0010.[1].0xffff00e8", 0, 0, "UPS.0xffff0010.[1].0xffff00e8", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff0075", 0, 0, "UPS.TLCustom.[1].0xffff0075", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff0076", 0, 0, "UPS.TLCustom.[1].0xffff0076", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff007c", 0, 0, "UPS.TLCustom.[1].0xffff007c", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff007d", 0, 0, "UPS.TLCustom.[1].0xffff007d", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff00e0", 0, 0, "UPS.TLCustom.[1].0xffff00e0", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff00e1", 0, 0, "UPS.TLCustom.[1].0xffff00e1", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff00e2", 0, 0, "UPS.TLCustom.[1].0xffff00e2", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff00e3", 0, 0, "UPS.TLCustom.[1].0xffff00e3", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff00e4", 0, 0, "UPS.TLCustom.[1].0xffff00e4", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff00e5", 0, 0, "UPS.TLCustom.[1].0xffff00e5", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff00e6", 0, 0, "UPS.TLCustom.[1].0xffff00e6", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff00e7", 0, 0, "UPS.TLCustom.[1].0xffff00e7", NULL, "%.0f", 0, NULL }, + { "UPS.TLCustom.[1].0xffff00e8", 0, 0, "UPS.TLCustom.[1].0xffff00e8", NULL, "%.0f", 0, NULL }, { "UPS.0xffff0015.[1].0xffff00c0", 0, 0, "UPS.0xffff0015.[1].0xffff00c0", NULL, "%.0f", 0, NULL }, { "UPS.0xffff0015.[1].0xffff00c1", 0, 0, "UPS.0xffff0015.[1].0xffff00c1", NULL, "%.0f", 0, NULL }, { "UPS.0xffff0015.[1].0xffff00c2", 0, 0, "UPS.0xffff0015.[1].0xffff00c2", NULL, "%.0f", 0, NULL }, @@ -231,7 +259,6 @@ static hid_info_t tripplite_hid2nut[] = { { "UPS.0xffff0015.[1].0xffff00d2", 0, 0, "UPS.0xffff0015.[1].0xffff00d2", NULL, "%.0f", 0, NULL }, { "UPS.0xffff0015.[1].0xffff00d3", 0, 0, "UPS.0xffff0015.[1].0xffff00d3", NULL, "%.0f", 0, NULL }, { "UPS.0xffff0015.[1].0xffff00d6", 0, 0, "UPS.0xffff0015.[1].0xffff00d6", NULL, "%.0f", 0, NULL }, - { "UPS.OutletSystem.Outlet.0xffff0056", 0, 0, "UPS.OutletSystem.Outlet.0xffff0056", NULL, "%.0f", 0, NULL }, { "UPS.OutletSystem.Outlet.0xffff0081", 0, 0, "UPS.OutletSystem.Outlet.0xffff0081", NULL, "%.0f", 0, NULL }, { "UPS.OutletSystem.Outlet.0xffff0091", 0, 0, "UPS.OutletSystem.Outlet.0xffff0091", NULL, "%.0f", 0, NULL }, { "UPS.OutletSystem.Outlet.0xffff0093", 0, 0, "UPS.OutletSystem.Outlet.0xffff0093", NULL, "%.0f", 0, NULL }, @@ -249,6 +276,9 @@ static hid_info_t tripplite_hid2nut[] = { #endif /* USBHID_UPS_TRIPPLITE_DEBUG */ + /* Device page */ + { "device.part", 0, 0, "UPS.TLCustom.[1].iUPSPartNumber", NULL, "%.0f", 0, stringid_conversion }, + /* Battery page */ { "battery.charge", 0, 0, "UPS.PowerSummary.RemainingCapacity", NULL, "%.0f", 0, NULL }, { "battery.charge", 0, 0, "UPS.BatterySystem.Battery.RemainingCapacity", NULL, "%.0f", 0, NULL }, @@ -262,8 +292,16 @@ static hid_info_t tripplite_hid2nut[] = { /* UPS page */ { "ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.OutletSystem.Outlet.DelayBeforeStartup", NULL, DEFAULT_ONDELAY, HU_FLAG_ABSENT, NULL}, + { "ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.OutletSystem.Outlet.TLDelayBeforeStartup", NULL, DEFAULT_ONDELAY, HU_FLAG_ABSENT, NULL}, + /* FIXME + { "ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 6, "UPS.TLCustom.[1].TLDelayBeforeStartup", NULL, DEFAULT_ONDELAY, HU_FLAG_ABSENT, NULL}, + { "ups.timer.start", 0, 0, "UPS.TLCustom.[1].DelayBeforeStartup", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL}, + - what's the right notion behind this one? + { "ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 6, "UPS.TLCustom.[1].AutoOnDelay", NULL, DEFAULT_ONDELAY, 0, NULL}, + */ { "ups.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.OutletSystem.Outlet.DelayBeforeShutdown", NULL, DEFAULT_OFFDELAY, HU_FLAG_ABSENT, NULL}, { "ups.timer.start", 0, 0, "UPS.OutletSystem.Outlet.DelayBeforeStartup", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL}, + { "ups.timer.start", 0, 0, "UPS.OutletSystem.Outlet.TLDelayBeforeStartup", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL}, { "ups.timer.shutdown", 0, 0, "UPS.OutletSystem.Outlet.DelayBeforeShutdown", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL}, { "ups.timer.reboot", 0, 0, "UPS.OutletSystem.Outlet.DelayBeforeReboot", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL }, { "ups.test.result", 0, 0, "UPS.BatterySystem.Test", NULL, "%s", 0, test_read_info }, @@ -272,6 +310,10 @@ static hid_info_t tripplite_hid2nut[] = { { "ups.power", 0, 0, "UPS.OutletSystem.Outlet.ActivePower", NULL, "%.1f", 0, NULL }, { "ups.power", 0, 0, "UPS.PowerConverter.Output.ActivePower", NULL, "%.1f", 0, NULL }, { "ups.load", 0, 0, "UPS.OutletSystem.Outlet.PercentLoad", NULL, "%.0f", 0, NULL }, + /* FIXME: what is the conversion format for this one? + * Example on HP T1500 G3 + * UPS.TLCustom.[1].UPSFirmwareVersion, Type: Feature, ReportID: 0x0f, Offset: 0, Size: 16, Value: 262 */ + { "ups.firmware", 0, 0, "UPS.TLCustom.[1].UPSFirmwareVersion", NULL, "%.0f", HU_FLAG_STATIC, NULL }, /* Number of seconds left before the watchdog reboots the UPS (0 = disabled) */ { "ups.watchdog.status", 0, 0, "UPS.OutletSystem.Outlet.TLWatchdog", NULL, "%.0f", 0, NULL }, @@ -288,10 +330,16 @@ static hid_info_t tripplite_hid2nut[] = { { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.NeedReplacement", NULL, NULL, 0, replacebatt_info }, /* repeat some of the above for faulty usage codes (seen on OMNI1000LCD, untested) */ { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.TLACPresent", NULL, NULL, HU_FLAG_QUICK_POLL, online_info }, + /* "Redundant" definition to deal with the conflict between + * TrippLite units, wrongly defining 0x00840045 as "TLDischarging" + * and HP which uses the standard 0x00840045 (as ConfigPercentLoad). + * Note that this path should not exist on HP devices. */ { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.TLDischarging", NULL, NULL, HU_FLAG_QUICK_POLL, discharging_info }, + /* Otherwise, define the version for HP devices */ + { "ups.load.nominal", 0, 0, "UPS.Flow.ConfigPercentLoad", NULL, "%.0f", 0, NULL }, + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.TLCharging", NULL, NULL, HU_FLAG_QUICK_POLL, charging_info }, { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.TLNeedReplacement", NULL, NULL, 0, replacebatt_info }, - { "BOOL", 0, 0, "UPS.PowerConverter.PresentStatus.VoltageOutOfRange", NULL, NULL, 0, vrange_info }, { "BOOL", 0, 0, "UPS.PowerConverter.PresentStatus.Buck", NULL, NULL, 0, trim_info }, { "BOOL", 0, 0, "UPS.PowerConverter.PresentStatus.Boost", NULL, NULL, 0, boost_info }, @@ -338,6 +386,7 @@ static hid_info_t tripplite_hid2nut[] = { { "load.off.delay", 0, 0, "UPS.OutletSystem.Outlet.DelayBeforeShutdown", NULL, DEFAULT_OFFDELAY, HU_TYPE_CMD, NULL }, { "load.on.delay", 0, 0, "UPS.OutletSystem.Outlet.DelayBeforeStartup", NULL, DEFAULT_ONDELAY, HU_TYPE_CMD, NULL }, + { "load.on.delay", 0, 0, "UPS.OutletSystem.Outlet.TLDelayBeforeStartup", NULL, DEFAULT_ONDELAY, HU_TYPE_CMD, NULL }, { "shutdown.stop", 0, 0, "UPS.OutletSystem.Outlet.DelayBeforeShutdown", NULL, "-1", HU_TYPE_CMD, NULL }, { "shutdown.reboot", 0, 0, "UPS.OutletSystem.Outlet.DelayBeforeReboot", NULL, "10", HU_TYPE_CMD, NULL }, @@ -354,6 +403,18 @@ static hid_info_t tripplite_hid2nut[] = { { "beeper.enable", 0, 0, "UPS.PowerSummary.AudibleAlarmControl", NULL, "2", HU_TYPE_CMD, NULL }, { "beeper.mute", 0, 0, "UPS.PowerSummary.AudibleAlarmControl", NULL, "3", HU_TYPE_CMD, NULL }, + /* FIXME (to be tested): HP specific (may conflict or differ from TL implementation!) + * { "outlet.count", 0, 0, "UPS.TLCustom.[1].OutletCount", NULL, "%.0f", HU_FLAG_STATIC, NULL }, + * { "outlet.status", 0, 0, "UPS.TLCustom.[1].OutletState", NULL, "%.0f", HU_FLAG_STATIC, NULL }, + 0.284486 Path: UPS.TLCustom.[1].ffff00ff, Type: Feature, ReportID: 0xff, Offset: 0, Size: 8, Value: 255 + 0.285276 Path: UPS.TLCustom.[1].OutletCount, Type: Feature, ReportID: 0x6d, Offset: 0, Size: 8, Value: 1 + 0.286260 Path: UPS.TLCustom.[1].OutletState, Type: Feature, ReportID: 0x70, Offset: 0, Size: 8, Value: 1 + 0.287248 Path: UPS.TLCustom.[1].CommunicationVersion, Type: Feature, ReportID: 0x0e, Offset: 0, Size: 16, Value: 262 + 0.288901 Path: UPS.TLCustom.[1].CommunicationProtocolVersion, Type: Feature, ReportID: 0x6c, Offset: 0, Size: 16, Value: 2560 + 0.289903 Path: UPS.TLCustom.[1].TLDelayBeforeStartup, Type: Feature, ReportID: 0x71, Offset: 0, Size: 16, Value: 65535 + 0.290854 Path: UPS.TLCustom.[1].AutoOnDelay, Type: Feature, ReportID: 0x72, Offset: 0, Size: 16, Value: 65535 + */ + /* end of structure. */ { NULL, 0, 0, NULL, NULL, NULL, 0, NULL } }; diff --git a/drivers/tripplite_usb.c b/drivers/tripplite_usb.c index 56061a7..1a4765f 100644 --- a/drivers/tripplite_usb.c +++ b/drivers/tripplite_usb.c @@ -130,7 +130,7 @@ POD ("Plain Old Documentation") - run through pod2html or perldoc. See perlpod(1) for more information. -pod2man --name='TRIPPLITE_USB' --section=8 --release='$Rev: 2598 $' --center='Network UPS Tools (NUT)' tripplite_usb.c +pod2man --name='TRIPPLITE_USB' --section=8 --release='$Rev: 3555 $' --center='Network UPS Tools (NUT)' tripplite_usb.c =head1 NAME @@ -504,24 +504,30 @@ static int hex2d(const unsigned char *start, unsigned int len) static const char *hexascdump(unsigned char *msg, size_t len) { size_t i; - static unsigned char buf[256], *bufp; + static unsigned char buf[256]; + unsigned char *bufp, *end; bufp = buf; + end = bufp + sizeof(buf); buf[0] = 0; /* Dump each byte in hex: */ - for(i=0; i=3; i++) { bufp += sprintf((char *)bufp, "%02x ", msg[i]); } /* Dump single-quoted string with printable version of each byte: */ - *bufp++ = '\''; - for(i=0; i 0) *bufp++ = '\''; + + for(i=0; i0; i++) { *bufp++ = toprint(msg[i]); } - *bufp++ = '\''; + if (end-bufp > 0) *bufp++ = '\''; - *bufp++ = '\0'; + if (end-bufp > 0) + *bufp = '\0'; + else + *--end='\0'; return (char *)buf; } diff --git a/drivers/upscode2.c b/drivers/upscode2.c index 5f2e0b4..78a4718 100644 --- a/drivers/upscode2.c +++ b/drivers/upscode2.c @@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - $Id: upscode2.c 2391 2010-03-04 15:35:09Z adkorte-guest $ + $Id: upscode2.c 3597 2012-05-15 11:22:06Z aquette $ */ /* @@ -45,7 +45,7 @@ #include #define DRIVER_NAME "UPScode II UPS driver" -#define DRIVER_VERSION "0.87" +#define DRIVER_VERSION "0.88" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -309,9 +309,9 @@ static simple_t simple[] = { { "MOIL1", t_value, "output.current" }, { "MOIL2", t_value, "output.L2.current" }, { "MOIL3", t_value, "output.L3.current" }, - { "MOIP1", t_value, "output.peakcurrent" }, - { "MOIP2", t_value, "output.L2.peakcurrent" }, - { "MOIP3", t_value, "output.L3.peakcurrent" }, + { "MOIP1", t_value, "output.current.peak" }, + { "MOIP2", t_value, "output.L2.current.peak" }, + { "MOIP3", t_value, "output.L3.current.peak" }, { "MOPL1", t_value, "output.realpower", 0, &kilo_to_unity }, { "MOPL2", t_value, "output.L2.realpower", 0, &kilo_to_unity }, { "MOPL3", t_value, "output.L3.realpower", 0, &kilo_to_unity }, @@ -780,7 +780,7 @@ void upsdrv_updateinfo(void) change_name(simple, "output.current", "output.L1.current"); change_name(simple, - "output.peakcurrent", "output.L1.peakcurrent"); + "output.current.peak", "output.L1.current.peak"); change_name(simple, "output.realpower", "output.L1.realpower"); change_name(simple, diff --git a/drivers/upshandler.h b/drivers/upshandler.h index b7539a0..ca9a349 100644 --- a/drivers/upshandler.h +++ b/drivers/upshandler.h @@ -25,12 +25,12 @@ enum { STAT_INSTCMD_HANDLED = 0, /* completed successfully */ STAT_INSTCMD_UNKNOWN, /* unspecified error */ STAT_INSTCMD_INVALID, /* invalid command */ - STAT_INSTCMD_FAILED /* command failed */ + STAT_INSTCMD_FAILED /* command failed */ }; /* return values for setvar */ enum { - STAT_SET_HANDLED = 0, /* completed successfully */ + STAT_SET_HANDLED = 0, /* completed successfully */ STAT_SET_UNKNOWN, /* unspecified error */ STAT_SET_INVALID, /* not writeable */ STAT_SET_FAILED /* writing failed */ diff --git a/drivers/usbhid-ups.c b/drivers/usbhid-ups.c index c925a81..6899d2f 100644 --- a/drivers/usbhid-ups.c +++ b/drivers/usbhid-ups.c @@ -1,7 +1,7 @@ /* usbhid-ups.c - Driver for USB and serial (MGE SHUT) HID UPS units * * Copyright (C) - * 2003-2009 Arnaud Quette + * 2003-2012 Arnaud Quette * 2005 John Stamp * 2005-2006 Peter Selinger * 2007-2009 Arjen de Korte @@ -27,7 +27,7 @@ */ #define DRIVER_NAME "Generic HID driver" -#define DRIVER_VERSION "0.35" +#define DRIVER_VERSION "0.37" #include "main.h" #include "libhid.h" @@ -480,7 +480,17 @@ static const char *kelvin_celsius_conversion_fun(double value) { static char buf[20]; - snprintf(buf, sizeof(buf), "%.1f", value - 273.15); + /* check if the value is in the Kelvin range, to + * detect buggy value (already expressed in °C), as found + * on some HP implementation */ + if ((value >= 273) && (value <= 373)) { + /* the value is indeed in °K */ + snprintf(buf, sizeof(buf), "%.1f", value - 273.15); + } + else { + /* else, this is actually °C, not °K! */ + snprintf(buf, sizeof(buf), "%.1f", value); + } return buf; } @@ -556,6 +566,11 @@ int instcmd(const char *cmdname, const char *extradata) if (!strcasecmp(cmdname, "shutdown.return")) { int ret; + /* Ensure "ups.start.auto" is set to "yes", if supported */ + if (dstate_getinfo("ups.start.auto")) { + setvar("ups.start.auto", "yes"); + } + ret = instcmd("load.on.delay", dstate_getinfo("ups.delay.start")); if (ret != STAT_INSTCMD_HANDLED) { return ret; @@ -567,6 +582,11 @@ int instcmd(const char *cmdname, const char *extradata) if (!strcasecmp(cmdname, "shutdown.stayoff")) { int ret; + /* Ensure "ups.start.auto" is set to "no", if supported */ + if (dstate_getinfo("ups.start.auto")) { + setvar("ups.start.auto", "no"); + } + ret = instcmd("load.on.delay", "-1"); if (ret != STAT_INSTCMD_HANDLED) { return ret; diff --git a/include/Makefile.am b/include/Makefile.am index d599ac0..5ed42d9 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -26,3 +26,9 @@ nut_version.h: FORCE -rm -f _nut_version.h FORCE: + +# counter part of BUILT_SOURCES: since nut_version is not a direct +# deps of a local target, we must clean it by ourself before the +# distribution +dist-hook: + rm -f $(distdir)/nut_version.h diff --git a/include/Makefile.in b/include/Makefile.in index 678a6e2..324c600 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -149,6 +149,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -162,6 +163,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -169,6 +171,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -343,6 +346,9 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am @@ -445,9 +451,9 @@ uninstall-am: .MAKE: all check install install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-hdr distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ + dist-hook distclean distclean-generic distclean-hdr \ + distclean-libtool distdir 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 \ @@ -479,6 +485,12 @@ nut_version.h: FORCE FORCE: +# counter part of BUILT_SOURCES: since nut_version is not a direct +# deps of a local target, we must clean it by ourself before the +# distribution +dist-hook: + rm -f $(distdir)/nut_version.h + # 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. .NOEXPORT: diff --git a/include/common.h b/include/common.h index 431751c..d044d52 100644 --- a/include/common.h +++ b/include/common.h @@ -112,6 +112,7 @@ void *xrealloc(void *ptr, size_t size); char *xstrdup(const char *string); char *rtrim(char *in, const char sep); +char* ltrim(char *in, const char sep); int select_read(const int fd, void *buf, const size_t buflen, const long d_sec, const long d_usec); int select_write(const int fd, const void *buf, const size_t buflen, const long d_sec, const long d_usec); diff --git a/include/config.h.in b/include/config.h.in index ad12ff1..2d9c06d 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -291,6 +291,9 @@ /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O +/* NUT network protocol version */ +#undef NUT_NETVERSION + /* Name of package */ #undef PACKAGE @@ -324,6 +327,9 @@ /* User to switch to if started as root */ #undef RUN_AS_USER +/* Default path for system executables */ +#undef SBINDIR + /* Path for UPS driver state files */ #undef STATEPATH diff --git a/include/extstate.h b/include/extstate.h index cb178c3..e54e8e9 100644 --- a/include/extstate.h +++ b/include/extstate.h @@ -17,6 +17,13 @@ typedef struct enum_s { struct enum_s *next; } enum_t; +/* RANGE boundaries */ +typedef struct range_s { + int min; + int max; + struct range_s *next; +} range_t; + /* list of instant commands */ typedef struct cmdlist_s { char *name; diff --git a/include/nut_version.h b/include/nut_version.h deleted file mode 100644 index 9db8b19..0000000 --- a/include/nut_version.h +++ /dev/null @@ -1,3 +0,0 @@ -/* Autogenerated file. Do not change. */ -/* This file was generated by "make". */ -#define NUT_VERSION_MACRO "2.6.3-3369:3371" diff --git a/include/state.h b/include/state.h index cb1814e..5b1e713 100644 --- a/include/state.h +++ b/include/state.h @@ -1,6 +1,8 @@ /* state.h - Network UPS Tools common state management functions - Copyright (C) 2003 Russell Kroll + Copyright (C) + 2003 Russell Kroll + 2012 Arnaud Quette 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 @@ -38,6 +40,7 @@ typedef struct st_tree_s { int aux; struct enum_s *enum_list; + struct range_s *range_list; struct st_tree_s *left; struct st_tree_s *right; @@ -45,11 +48,13 @@ typedef struct st_tree_s { int state_setinfo(st_tree_t **nptr, const char *var, const char *val); int state_addenum(st_tree_t *root, const char *var, const char *val); +int state_addrange(st_tree_t *root, const char *var, const int min, const int max); int state_setaux(st_tree_t *root, const char *var, const char *auxs); const char *state_getinfo(st_tree_t *root, const char *var); int state_getflags(st_tree_t *root, const char *var); int state_getaux(st_tree_t *root, const char *var); const enum_t *state_getenumlist(st_tree_t *root, const char *var); +const range_t *state_getrangelist(st_tree_t *root, const char *var); void state_setflags(st_tree_t *root, const char *var, int numflags, char **flags); int state_addcmd(cmdlist_t **list, const char *cmd); void state_infofree(st_tree_t *node); @@ -57,6 +62,7 @@ void state_cmdfree(cmdlist_t *list); int state_delcmd(cmdlist_t **list, const char *cmd); int state_delinfo(st_tree_t **root, const char *var); int state_delenum(st_tree_t *root, const char *var, const char *val); +int state_delrange(st_tree_t *root, const char *var, const int min, const int max); st_tree_t *state_tree_find(st_tree_t *node, const char *var); #endif /* STATE_H_SEEN */ diff --git a/lib/Makefile.in b/lib/Makefile.in index fb06b28..36945ba 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -178,6 +178,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -191,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -198,6 +200,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 2e0ed23..f38649c 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -7,6 +7,7 @@ HP-UX/nut-upsd \ HP-UX/nut-upsd.sh \ HP-UX/nut-upsmon \ HP-UX/nut-upsmon.sh \ +logrotate/nutlogd \ misc/nut.bash_completion \ misc/osd-notify \ perl/Nut.pm \ @@ -19,6 +20,7 @@ RedHat/upsmon \ RedHat/upsmon.in \ Solaris8/S99upsmon \ subdriver/path-to-subdriver.sh \ +ufw/README \ upower/95-upower-hid.rules \ Windows/halt.c \ Windows/Makefile diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 35ef1f9..156e00a 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -188,6 +188,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -201,6 +202,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -208,6 +210,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -290,6 +293,7 @@ HP-UX/nut-upsd \ HP-UX/nut-upsd.sh \ HP-UX/nut-upsmon \ HP-UX/nut-upsmon.sh \ +logrotate/nutlogd \ misc/nut.bash_completion \ misc/osd-notify \ perl/Nut.pm \ @@ -302,6 +306,7 @@ RedHat/upsmon \ RedHat/upsmon.in \ Solaris8/S99upsmon \ subdriver/path-to-subdriver.sh \ +ufw/README \ upower/95-upower-hid.rules \ Windows/halt.c \ Windows/Makefile diff --git a/scripts/augeas/Makefile.am b/scripts/augeas/Makefile.am index c387541..5ef4c1e 100644 --- a/scripts/augeas/Makefile.am +++ b/scripts/augeas/Makefile.am @@ -5,7 +5,7 @@ EXTRA_DIST = gen-nutupsconf-aug.py nutupsconf.aug.tpl \ # only call the script to generate Augeas ups.conf lens upon "make dist", # and if Python is present dist-hook: - @if python -c pass; then \ + @if python -c "import re,glob,codecs"; then \ echo "Regenerating Augeas ups.conf lens."; \ $(distdir)/gen-nutupsconf-aug.py $(distdir)/; \ else \ diff --git a/scripts/augeas/Makefile.in b/scripts/augeas/Makefile.in index 6cb69c7..22d5f63 100644 --- a/scripts/augeas/Makefile.in +++ b/scripts/augeas/Makefile.in @@ -155,6 +155,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -168,6 +169,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -175,6 +177,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -459,7 +462,7 @@ uninstall-am: # only call the script to generate Augeas ups.conf lens upon "make dist", # and if Python is present dist-hook: - @if python -c pass; then \ + @if python -c "import re,glob,codecs"; then \ echo "Regenerating Augeas ups.conf lens."; \ $(distdir)/gen-nutupsconf-aug.py $(distdir)/; \ else \ diff --git a/scripts/augeas/nutupsconf.aug.in b/scripts/augeas/nutupsconf.aug.in index d3199bc..5e53fc0 100644 --- a/scripts/augeas/nutupsconf.aug.in +++ b/scripts/augeas/nutupsconf.aug.in @@ -58,6 +58,7 @@ let ups_fields = "driver" | "awd" | "batteryPercentage" | "battext" + | "battvoltmult" | "baud_rate" | "baudrate" | "bus" diff --git a/scripts/hal/Makefile.in b/scripts/hal/Makefile.in index e8125fd..4f9f7cd 100644 --- a/scripts/hal/Makefile.in +++ b/scripts/hal/Makefile.in @@ -173,6 +173,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -186,6 +187,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -193,6 +195,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/scripts/hal/ups-nut-device.fdi.in b/scripts/hal/ups-nut-device.fdi.in index 45294b0..d35c5d4 100644 --- a/scripts/hal/ups-nut-device.fdi.in +++ b/scripts/hal/ups-nut-device.fdi.in @@ -14,6 +14,13 @@ + + + battery + battery + hald-addon-usbhid-ups + ups + battery @@ -56,7 +63,7 @@ hald-addon-usbhid-ups ups - + battery battery @@ -70,6 +77,48 @@ hald-addon-usbhid-ups ups + + + battery + battery + hald-addon-usbhid-ups + ups + + + + battery + battery + hald-addon-usbhid-ups + ups + + + + battery + battery + hald-addon-usbhid-ups + ups + + + + battery + battery + hald-addon-usbhid-ups + ups + + + + battery + battery + hald-addon-usbhid-ups + ups + + + + battery + battery + hald-addon-usbhid-ups + ups + @@ -222,13 +271,13 @@ - + - + battery battery - hald-addon-bcmxcp_usb + hald-addon-blazer_usb ups @@ -238,6 +287,27 @@ hald-addon-blazer_usb ups + + + battery + battery + hald-addon-blazer_usb + ups + + + + battery + battery + hald-addon-blazer_usb + ups + + + + battery + battery + hald-addon-blazer_usb + ups + battery @@ -274,7 +344,7 @@ hald-addon-usbhid-ups ups - + battery battery diff --git a/scripts/hotplug/Makefile.in b/scripts/hotplug/Makefile.in index 62bc680..8aeb214 100644 --- a/scripts/hotplug/Makefile.in +++ b/scripts/hotplug/Makefile.in @@ -178,6 +178,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -191,6 +192,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -198,6 +200,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/scripts/hotplug/libhid.usermap b/scripts/hotplug/libhid.usermap index 53c1519..40c07e2 100644 --- a/scripts/hotplug/libhid.usermap +++ b/scripts/hotplug/libhid.usermap @@ -8,6 +8,8 @@ libhidups 0x0003 0x0001 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Hewlett Packard +# e.g. ? +libhidups 0x0003 0x03f0 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # T500 libhidups 0x0003 0x03f0 0x1f01 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # T750 @@ -20,10 +22,22 @@ libhidups 0x0003 0x03f0 0x1f08 0x0000 0x0000 0x00 libhidups 0x0003 0x03f0 0x1f09 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # HP R/T 2200 INTL (like SMART2200RMXL2U) libhidups 0x0003 0x03f0 0x1f0a 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# HP R1500 G2 INTL +# HP R1500 G2 and G3 INTL libhidups 0x0003 0x03f0 0x1fe0 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # HP T750 G2 libhidups 0x0003 0x03f0 0x1fe1 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# e.g. ? +libhidups 0x0003 0x03f0 0x1fe2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# HP T1500 G3 +libhidups 0x0003 0x03f0 0x1fe3 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# R/T3000 +libhidups 0x0003 0x03f0 0x1fe5 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# R/T3000 +libhidups 0x0003 0x03f0 0x1fe6 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# various models +libhidups 0x0003 0x03f0 0x1fe7 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# various models +libhidups 0x0003 0x03f0 0x1fe8 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Eaton # various models @@ -71,11 +85,17 @@ libhidups 0x0003 0x05b8 0x0000 0x0000 0x0000 0x00 # Belkin F6C1200-UNV libhidups 0x0003 0x0665 0x5161 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# Phoenixtec -# various models +# Phoenixtec Power Co., Ltd +# Online Yunto YQ450 libhidups 0x0003 0x06da 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Mustek Powermust libhidups 0x0003 0x06da 0x0003 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Phoenixtec Innova 3/1 T +libhidups 0x0003 0x06da 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Phoenixtec Innova RT +libhidups 0x0003 0x06da 0x0005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Phoenixtec Innova T +libhidups 0x0003 0x06da 0x0201 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # various models libhidups 0x0003 0x06da 0xffff 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 @@ -88,7 +108,7 @@ libhidups 0x0003 0x075d 0x0300 0x0000 0x0000 0x00 libhidups 0x0003 0x0764 0x0005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Dynex DX-800U? libhidups 0x0003 0x0764 0x0501 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# OR2200LCDRM2U +# OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U libhidups 0x0003 0x0764 0x0601 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Sweex 1000VA libhidups 0x0003 0x0925 0x1234 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 diff --git a/scripts/java/Makefile.in b/scripts/java/Makefile.in index a10e01e..7afd226 100644 --- a/scripts/java/Makefile.in +++ b/scripts/java/Makefile.in @@ -150,6 +150,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -163,6 +164,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -170,6 +172,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java index 07c7c37..fce6b0b 100644 --- a/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java +++ b/scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java @@ -116,5 +116,5 @@ public class Variable { } } - // TODO Add query for type and enum values + // TODO Add query for type, enum and range values } diff --git a/scripts/logrotate/nutlogd b/scripts/logrotate/nutlogd new file mode 100644 index 0000000..b230e3b --- /dev/null +++ b/scripts/logrotate/nutlogd @@ -0,0 +1,24 @@ +# Log rotation configuration for NUT: +# Rotate NUT log file(s) either monthly or when exceeding 5 Mb +# +# For more information, refer to logrotate(8) manual page: +# http://linuxcommand.org/man_pages/logrotate8.html +# +# To install this file, use: +# $ cp nutlogd /etc/logrotate.d/ +# $ chmod 644 /etc/logrotate.d/nutlogd +# $ chown root.root /etc/logrotate.d/nutlogd +# +# Log files must have "nut-" prefix and ".log" suffix + +/var/log/nut-*.log { + missingok + notifempty + size=5M + rotate 12 + monthly + postrotate + /usr/bin/killall -HUP upslog + endscript +} + diff --git a/scripts/python/Makefile.in b/scripts/python/Makefile.in index 4f89ab1..1f354b0 100644 --- a/scripts/python/Makefile.in +++ b/scripts/python/Makefile.in @@ -150,6 +150,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -163,6 +164,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -170,6 +172,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/scripts/python/module/PyNUT.py b/scripts/python/module/PyNUT.py index af09fac..98c9114 100644 --- a/scripts/python/module/PyNUT.py +++ b/scripts/python/module/PyNUT.py @@ -28,6 +28,13 @@ # 2010-07-23 David Goncalves - Version 1.2 # Changed GetRWVars function that fails is the UPS is not # providing such vars. +# +# 2011-07-05 René Martín Rodríguez - Version 1.2.1 +# Added support for FSD, HELP and VER commands +# +# 2012-02-07 René Martín Rodríguez - Version 1.2.2 +# Added support for LIST CLIENTS command +# import telnetlib @@ -42,8 +49,8 @@ class PyNUTClient : __timeout = None __srv_handler = None - __version = "1.2" - __release = "2010-07-23" + __version = "1.2.2" + __release = "2012-02-07" def __init__( self, host="127.0.0.1", port=3493, login=None, password=None, debug=False, timeout=5 ) : @@ -247,3 +254,78 @@ Returns OK on success or raises an error return( "OK" ) else : raise Exception, result.replace( "\n", "" ) + + def FSD( self, ups="") : + """ Send FSD command + +Returns OK on success or raises an error + """ + + if self.__debug : + print( "[DEBUG] MASTER called..." ) + + self.__srv_handler.write( "MASTER %s\n" % ups ) + result = self.__srv_handler.read_until( "\n" ) + if ( result != "OK MASTER-GRANTED\n" ) : + raise Exception, ( "Master level function are not available", "" ) + + if self.__debug : + print( "[DEBUG] FSD called..." ) + self.__srv_handler.write( "FSD %s\n" % ups ) + result = self.__srv_handler.read_until( "\n" ) + if ( result == "OK FSD-SET\n" ) : + return( "OK" ) + else : + raise Exception, result.replace( "\n", "" ) + + def help(self) : + """ Send HELP command + """ + + if self.__debug : + print( "[DEBUG] HELP called..." ) + + self.__srv_handler.write( "HELP\n") + return self.__srv_handler.read_until( "\n" ) + + def ver(self) : + """ Send VER command + """ + + if self.__debug : + print( "[DEBUG] VER called..." ) + + self.__srv_handler.write( "VER\n") + return self.__srv_handler.read_until( "\n" ) + + def ListClients( self, ups = None ) : + """ Returns the list of connected clients from the NUT server + +The result is a dictionary containing 'key->val' pairs of 'UPSName' and a list of clients + """ + if self.__debug : + print( "[DEBUG] ListClients from server" ) + + if ups and (ups not in self.GetUPSList()): + raise Exception, "%s is not a valid UPS" % ups + + if ups: + self.__srv_handler.write( "LIST CLIENTS %s\n" % ups) + else: + self.__srv_handler.write( "LIST CLIENTS\n" ) + result = self.__srv_handler.read_until( "\n" ) + if result != "BEGIN LIST CLIENTS\n" : + raise Exception, result.replace( "\n", "" ) + + result = self.__srv_handler.read_until( "END LIST CLIENTS\n" ) + ups_list = {} + + for line in result.split( "\n" ): + if line[:6] == "CLIENT" : + host, ups = line[7:].split(' ') + ups.replace(' ', '') + if not ups in ups_list: + ups_list[ups] = [] + ups_list[ups].append(host) + + return( ups_list ) diff --git a/scripts/systemd/Makefile.am b/scripts/systemd/Makefile.am index bc88503..b62796d 100644 --- a/scripts/systemd/Makefile.am +++ b/scripts/systemd/Makefile.am @@ -1,11 +1,6 @@ EXTRA_DIST = README if HAVE_SYSTEMD -%.service: %.service.in - sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ - -nutshutdown: nutshutdown.in - sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ systemdsystemunit_DATA = \ nut-driver.service \ diff --git a/scripts/systemd/Makefile.in b/scripts/systemd/Makefile.in index 28dc04a..8c2bc3d 100644 --- a/scripts/systemd/Makefile.in +++ b/scripts/systemd/Makefile.in @@ -40,7 +40,10 @@ target_triplet = @target@ @HAVE_SYSTEMD_FALSE@ nut-server.service.in nutshutdown.in subdir = scripts/systemd -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/nut-driver.service.in \ + $(srcdir)/nut-monitor.service.in \ + $(srcdir)/nut-server.service.in $(srcdir)/nutshutdown.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 \ @@ -68,7 +71,8 @@ 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 = +CONFIG_CLEAN_FILES = nut-driver.service nut-monitor.service \ + nut-server.service nutshutdown CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -178,6 +182,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -191,6 +196,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -198,6 +204,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -311,6 +318,14 @@ $(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): +nut-driver.service: $(top_builddir)/config.status $(srcdir)/nut-driver.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +nut-monitor.service: $(top_builddir)/config.status $(srcdir)/nut-monitor.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +nut-server.service: $(top_builddir)/config.status $(srcdir)/nut-server.service.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +nutshutdown: $(top_builddir)/config.status $(srcdir)/nutshutdown.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-systemdsystemshutdownSCRIPTS: $(systemdsystemshutdown_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(systemdsystemshutdowndir)" || $(MKDIR_P) "$(DESTDIR)$(systemdsystemshutdowndir)" @@ -526,12 +541,6 @@ uninstall-am: uninstall-systemdsystemshutdownSCRIPTS \ uninstall-systemdsystemunitDATA -@HAVE_SYSTEMD_TRUE@%.service: %.service.in -@HAVE_SYSTEMD_TRUE@ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ - -@HAVE_SYSTEMD_TRUE@nutshutdown: nutshutdown.in -@HAVE_SYSTEMD_TRUE@ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ - # 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. .NOEXPORT: diff --git a/scripts/systemd/nut-driver.service.in b/scripts/systemd/nut-driver.service.in index eef3480..f81ac69 100644 --- a/scripts/systemd/nut-driver.service.in +++ b/scripts/systemd/nut-driver.service.in @@ -4,7 +4,7 @@ After=local-fs.target network.target StopWhenUnneeded=yes [Service] -ExecStart=/sbin/upsdrvctl start -ExecStop=/sbin/upsdrvctl stop +ExecStart=@SBINDIR@/upsdrvctl start +ExecStop=@SBINDIR@/upsdrvctl stop Type=forking diff --git a/scripts/systemd/nut-monitor.service.in b/scripts/systemd/nut-monitor.service.in index 8a7f3b2..8429bf2 100644 --- a/scripts/systemd/nut-monitor.service.in +++ b/scripts/systemd/nut-monitor.service.in @@ -3,8 +3,8 @@ Description=Network UPS Tools - power device monitor and shutdown controller After=local-fs.target network.target nut-server.service [Service] -ExecStart=/usr/sbin/upsmon -PIDFile=/var/run/nut/upsmon.pid +ExecStart=@SBINDIR@/upsmon +PIDFile=@PIDPATH@/upsmon.pid Type=forking [Install] diff --git a/scripts/systemd/nut-server.service.in b/scripts/systemd/nut-server.service.in index 38b1322..edcaf10 100644 --- a/scripts/systemd/nut-server.service.in +++ b/scripts/systemd/nut-server.service.in @@ -5,7 +5,7 @@ Requires=nut-driver.service Before=nut-monitor.service [Service] -ExecStart=/usr/sbin/upsd +ExecStart=@SBINDIR@/upsd Type=forking [Install] diff --git a/scripts/systemd/nutshutdown.in b/scripts/systemd/nutshutdown.in index 3406592..1b97fa2 100644 --- a/scripts/systemd/nutshutdown.in +++ b/scripts/systemd/nutshutdown.in @@ -1,2 +1,2 @@ #!/bin/sh -upsmon -K >/dev/null 2>&1 && upsdrvctl shutdown +@SBINDIR@/upsmon -K >/dev/null 2>&1 && @SBINDIR@/upsdrvctl shutdown diff --git a/scripts/udev/Makefile.in b/scripts/udev/Makefile.in index be711f3..00d19d5 100644 --- a/scripts/udev/Makefile.in +++ b/scripts/udev/Makefile.in @@ -175,6 +175,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -188,6 +189,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -195,6 +197,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/scripts/udev/nut-usbups.rules.in b/scripts/udev/nut-usbups.rules.in index 2faf9a2..6aa3166 100644 --- a/scripts/udev/nut-usbups.rules.in +++ b/scripts/udev/nut-usbups.rules.in @@ -10,6 +10,8 @@ LABEL="nut-usbups_rules_real" ATTR{idVendor}=="0001", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" # Hewlett Packard +# e.g. ? - usbhid-ups +ATTR{idVendor}=="03f0", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" # T500 - bcmxcp_usb ATTR{idVendor}=="03f0", ATTR{idProduct}=="1f01", MODE="664", GROUP="@RUN_AS_GROUP@" # T750 - bcmxcp_usb @@ -22,10 +24,22 @@ ATTR{idVendor}=="03f0", ATTR{idProduct}=="1f08", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="03f0", ATTR{idProduct}=="1f09", MODE="664", GROUP="@RUN_AS_GROUP@" # HP R/T 2200 INTL (like SMART2200RMXL2U) - usbhid-ups ATTR{idVendor}=="03f0", ATTR{idProduct}=="1f0a", MODE="664", GROUP="@RUN_AS_GROUP@" -# HP R1500 G2 INTL - usbhid-ups +# HP R1500 G2 and G3 INTL - usbhid-ups ATTR{idVendor}=="03f0", ATTR{idProduct}=="1fe0", MODE="664", GROUP="@RUN_AS_GROUP@" # HP T750 G2 - usbhid-ups ATTR{idVendor}=="03f0", ATTR{idProduct}=="1fe1", MODE="664", GROUP="@RUN_AS_GROUP@" +# e.g. ? - usbhid-ups +ATTR{idVendor}=="03f0", ATTR{idProduct}=="1fe2", MODE="664", GROUP="@RUN_AS_GROUP@" +# HP T1500 G3 - usbhid-ups +ATTR{idVendor}=="03f0", ATTR{idProduct}=="1fe3", MODE="664", GROUP="@RUN_AS_GROUP@" +# R/T3000 - usbhid-ups +ATTR{idVendor}=="03f0", ATTR{idProduct}=="1fe5", MODE="664", GROUP="@RUN_AS_GROUP@" +# R/T3000 - usbhid-ups +ATTR{idVendor}=="03f0", ATTR{idProduct}=="1fe6", MODE="664", GROUP="@RUN_AS_GROUP@" +# various models - usbhid-ups +ATTR{idVendor}=="03f0", ATTR{idProduct}=="1fe7", MODE="664", GROUP="@RUN_AS_GROUP@" +# various models - usbhid-ups +ATTR{idVendor}=="03f0", ATTR{idProduct}=="1fe8", MODE="664", GROUP="@RUN_AS_GROUP@" # Eaton # various models - usbhid-ups @@ -73,11 +87,17 @@ ATTR{idVendor}=="05b8", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROU # Belkin F6C1200-UNV - blazer_usb ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="@RUN_AS_GROUP@" -# Phoenixtec -# various models - bcmxcp_usb +# Phoenixtec Power Co., Ltd +# Online Yunto YQ450 - blazer_usb ATTR{idVendor}=="06da", ATTR{idProduct}=="0002", MODE="664", GROUP="@RUN_AS_GROUP@" # Mustek Powermust - blazer_usb ATTR{idVendor}=="06da", ATTR{idProduct}=="0003", MODE="664", GROUP="@RUN_AS_GROUP@" +# Phoenixtec Innova 3/1 T - blazer_usb +ATTR{idVendor}=="06da", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" +# Phoenixtec Innova RT - blazer_usb +ATTR{idVendor}=="06da", ATTR{idProduct}=="0005", MODE="664", GROUP="@RUN_AS_GROUP@" +# Phoenixtec Innova T - blazer_usb +ATTR{idVendor}=="06da", ATTR{idProduct}=="0201", MODE="664", GROUP="@RUN_AS_GROUP@" # various models - usbhid-ups ATTR{idVendor}=="06da", ATTR{idProduct}=="ffff", MODE="664", GROUP="@RUN_AS_GROUP@" @@ -90,7 +110,7 @@ ATTR{idVendor}=="075d", ATTR{idProduct}=="0300", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="0764", ATTR{idProduct}=="0005", MODE="664", GROUP="@RUN_AS_GROUP@" # Dynex DX-800U? - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664", GROUP="@RUN_AS_GROUP@" -# OR2200LCDRM2U - usbhid-ups +# OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0601", MODE="664", GROUP="@RUN_AS_GROUP@" # Sweex 1000VA - richcomm_usb ATTR{idVendor}=="0925", ATTR{idProduct}=="1234", MODE="664", GROUP="@RUN_AS_GROUP@" diff --git a/scripts/ufw/README b/scripts/ufw/README new file mode 100644 index 0000000..701f323 --- /dev/null +++ b/scripts/ufw/README @@ -0,0 +1,30 @@ +Uncomplicated Firewall (UFW) support +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +NUT can tightly integrate with +link:http://en.wikipedia.org/wiki/Uncomplicated_Firewall[Uncomplicated Firewall] +using the provided profile (nut.ufw.profile). + +You must first install the profile on your system: + + $ cp nut.ufw.profile /etc/ufw/applications.d/ + +To enable outside access to your local upsd, use: + + $ ufw allow NUT + +To restrict access to the network '192.168.X.Y', use: + + $ ufw allow from 192.168.0.0/16 to any app NUT + +You can also use graphical frontends, such as gui-ufw (gufw), ufw-kde +or ufw-frontends. + +For more information, refer to: + + - link:http://gufw.tuxfamily.org/[UFW homepage], + - link:https://launchpad.net/ufw[UFW project page], + - link:https://wiki.ubuntu.com/UncomplicatedFirewall[UFW wiki], + - UFW manual page, section APPLICATION INTEGRATION + + diff --git a/scripts/ufw/nut.ufw.profile.in b/scripts/ufw/nut.ufw.profile.in new file mode 100644 index 0000000..df9202d --- /dev/null +++ b/scripts/ufw/nut.ufw.profile.in @@ -0,0 +1,4 @@ +[NUT] +title=NUT - Network UPS Tools server +description=NUT is a client - server system with support for UPS, PDU and PSU. +ports=@PORT@/tcp diff --git a/scripts/upower/95-upower-hid.rules b/scripts/upower/95-upower-hid.rules index dd9d899..a9e18fe 100644 --- a/scripts/upower/95-upower-hid.rules +++ b/scripts/upower/95-upower-hid.rules @@ -18,7 +18,7 @@ ATTRS{idVendor}=="047c", ENV{UPOWER_VENDOR}="Dell" ATTRS{idVendor}=="050d", ENV{UPOWER_VENDOR}="Belkin" ATTRS{idVendor}=="051d", ENV{UPOWER_VENDOR}="APC" ATTRS{idVendor}=="0592", ENV{UPOWER_VENDOR}="Powerware" -ATTRS{idVendor}=="06da", ENV{UPOWER_VENDOR}="Phoenixtec" +ATTRS{idVendor}=="06da", ENV{UPOWER_VENDOR}="Phoenixtec Power Co., Ltd" ATTRS{idVendor}=="075d", ENV{UPOWER_VENDOR}="iDowell" ATTRS{idVendor}=="0764", ENV{UPOWER_VENDOR}="Cyber Power Systems" ATTRS{idVendor}=="09ae", ENV{UPOWER_VENDOR}="TrippLite" @@ -26,12 +26,19 @@ ATTRS{idVendor}=="0d9f", ENV{UPOWER_VENDOR}="PowerCOM" ATTRS{idVendor}=="10af", ENV{UPOWER_VENDOR}="Liebert" # Hewlett Packard +ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0001", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1f06", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1f08", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1f09", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1f0a", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1fe0", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1fe1", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1fe2", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1fe3", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1fe5", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1fe6", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1fe7", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1fe8", ENV{UPOWER_BATTERY_TYPE}="ups" # Eaton ATTRS{idVendor}=="0463", ATTRS{idProduct}=="0001", ENV{UPOWER_BATTERY_TYPE}="ups" @@ -58,7 +65,7 @@ ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0003", ENV{UPOWER_BATTERY_TYPE}="ups # Powerware ATTRS{idVendor}=="0592", ATTRS{idProduct}=="0004", ENV{UPOWER_BATTERY_TYPE}="ups" -# Phoenixtec +# Phoenixtec Power Co., Ltd ATTRS{idVendor}=="06da", ATTRS{idProduct}=="ffff", ENV{UPOWER_BATTERY_TYPE}="ups" # iDowell diff --git a/server/Makefile.in b/server/Makefile.in index 0c32dea..dd63712 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -192,6 +192,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -205,6 +206,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -212,6 +214,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ diff --git a/server/netcmds.h b/server/netcmds.h index 30f5124..c0b5225 100644 --- a/server/netcmds.h +++ b/server/netcmds.h @@ -35,6 +35,7 @@ struct { int flags; } netcmds[] = { { "VER", net_ver, 0 }, + { "NETVER", net_netver, 0 }, { "HELP", net_help, 0 }, { "STARTTLS", net_starttls, 0 }, diff --git a/server/netget.c b/server/netget.c index 43e7370..9d6cf08 100644 --- a/server/netget.c +++ b/server/netget.c @@ -56,9 +56,6 @@ static void get_upsdesc(nut_ctype_t *client, const char *upsname) return; } - if (!ups_available(ups, client)) - return; - if (ups->desc) { pconf_encode(ups->desc, esc, sizeof(esc)); sendback(client, "UPSDESC %s \"%s\"\n", upsname, esc); @@ -149,6 +146,11 @@ static void get_type(nut_ctype_t *client, const char *upsname, const char *var) return; } + if (node->range_list) { + sendback(client, "%s RANGE\n", buf); + return; + } + if (node->flags & ST_FLAG_STRING) { sendback(client, "%s STRING:%d\n", buf, node->aux); return; diff --git a/server/netlist.c b/server/netlist.c index ea6ee4c..91f7831 100644 --- a/server/netlist.c +++ b/server/netlist.c @@ -1,6 +1,8 @@ /* netlist.c - LIST handlers for upsd - Copyright (C) 2003 Russell Kroll + Copyright (C) + 2003 Russell Kroll + 2012 Arnaud Quette 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 @@ -26,7 +28,8 @@ #include "netlist.h" - extern upstype_t *firstups; /* for list_ups */ +extern upstype_t *firstups; /* for list_ups */ +extern nut_ctype_t *firstclient; /* for list_clients */ static int tree_dump(st_tree_t *node, nut_ctype_t *client, const char *ups, int rw, int fsd) @@ -185,6 +188,41 @@ static void list_enum(nut_ctype_t *client, const char *upsname, const char *var) sendback(client, "END LIST ENUM %s %s\n", upsname, var); } +static void list_range(nut_ctype_t *client, const char *upsname, const char *var) +{ + const upstype_t *ups; + const st_tree_t *node; + const range_t *rtmp; + + ups = get_ups_ptr(upsname); + + if (!ups) { + send_err(client, NUT_ERR_UNKNOWN_UPS); + return; + } + + if (!ups_available(ups, client)) + return; + + node = sstate_getnode(ups, var); + + if (!node) { + send_err(client, NUT_ERR_VAR_NOT_SUPPORTED); + return; + } + + if (!sendback(client, "BEGIN LIST RANGE %s %s\n", upsname, var)) + return; + + for (rtmp = node->range_list; rtmp != NULL; rtmp = rtmp->next) { + if (!sendback(client, "RANGE %s %s \"%i\" \"%i\"\n", + upsname, var, rtmp->min, rtmp->max)) + return; + } + + sendback(client, "END LIST ENUM %s %s\n", upsname, var); +} + static void list_ups(nut_ctype_t *client) { upstype_t *utmp; @@ -217,6 +255,36 @@ static void list_ups(nut_ctype_t *client) sendback(client, "END LIST UPS\n"); } +static void list_clients(nut_ctype_t *client, const char *upsname) +{ + const upstype_t *ups; + nut_ctype_t *c, *cnext; + + ups = get_ups_ptr(upsname); + + if (!ups) { + send_err(client, NUT_ERR_UNKNOWN_UPS); + return; + } + + if (!sendback(client, "BEGIN LIST CLIENT %s\n", upsname)) + return; + + if (firstclient) { + int ret; + /* show connected clients */ + for (c = firstclient; c; c = cnext) { + if (c->loginups && (!ups || !strcasecmp(c->loginups, ups->name))) { + ret = sendback(client, "CLIENT %s %s\n", c->loginups, c->addr); + if (!ret) + return; + } + cnext = c->next; + } + } + sendback(client, "END LIST CLIENT %s\n", upsname); +} + void net_list(nut_ctype_t *client, int numarg, const char **arg) { if (numarg < 1) { @@ -253,6 +321,12 @@ void net_list(nut_ctype_t *client, int numarg, const char **arg) return; } + /* LIST CLIENT UPS */ + if (!strcasecmp(arg[0], "CLIENT")) { + list_clients(client, arg[1]); + return; + } + if (numarg < 3) { send_err(client, NUT_ERR_INVALID_ARGUMENT); return; @@ -264,5 +338,11 @@ void net_list(nut_ctype_t *client, int numarg, const char **arg) return; } + /* LIST RANGE UPS VARNAME */ + if (!strcasecmp(arg[0], "RANGE")) { + list_range(client, arg[1], arg[2]); + return; + } + send_err(client, NUT_ERR_INVALID_ARGUMENT); } diff --git a/server/netmisc.c b/server/netmisc.c index cbfb1ca..3863ae5 100644 --- a/server/netmisc.c +++ b/server/netmisc.c @@ -1,6 +1,8 @@ /* netmisc.c - miscellaneous network handlers for upsd (VER, HELP, FSD) - Copyright (C) 2003 Russell Kroll + Copyright (C) + 2003 Russell Kroll + 2012 Arnaud Quette 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 @@ -38,6 +40,16 @@ void net_ver(nut_ctype_t *client, int numarg, const char **arg) UPS_VERSION); } +void net_netver(nut_ctype_t *client, int numarg, const char **arg) +{ + if (numarg != 0) { + send_err(client, NUT_ERR_INVALID_ARGUMENT); + return; + } + + sendback(client, "%s\n", NUT_NETVERSION); +} + void net_help(nut_ctype_t *client, int numarg, const char **arg) { if (numarg != 0) { diff --git a/server/netmisc.h b/server/netmisc.h index e1899df..e48f6f4 100644 --- a/server/netmisc.h +++ b/server/netmisc.h @@ -1,3 +1,4 @@ void net_ver(nut_ctype_t *client, int numarg, const char **arg); +void net_netver(nut_ctype_t *client, int numarg, const char **arg); void net_help(nut_ctype_t *client, int numarg, const char **arg); void net_fsd(nut_ctype_t *client, int numarg, const char **arg); diff --git a/server/netset.c b/server/netset.c index 145bd2f..b88bb40 100644 --- a/server/netset.c +++ b/server/netset.c @@ -33,6 +33,7 @@ static void set_var(nut_ctype_t *client, const char *upsname, const char *var, upstype_t *ups; const char *val; const enum_t *etmp; + const range_t *rtmp; char cmd[SMALLBUF], esc[SMALLBUF]; ups = get_ups_ptr(upsname); @@ -108,6 +109,29 @@ static void set_var(nut_ctype_t *client, const char *upsname, const char *var, } } + /* or if it's within a range */ + + rtmp = sstate_getrangelist(ups, var); + + if (rtmp) { + int found = 0; + int inewval = atoi(newval); + + while (rtmp) { + if ((inewval >= rtmp->min) && (inewval <= rtmp->max)) { + found = 1; + break; + } + + rtmp = rtmp->next; + } + + if (!found) { + send_err(client, NUT_ERR_INVALID_VALUE); + return; + } + } + /* must be OK now */ upslogx(LOG_INFO, "Set variable: %s@%s set %s on %s to %s", diff --git a/server/sstate.c b/server/sstate.c index dfbc2b6..15d2c14 100644 --- a/server/sstate.c +++ b/server/sstate.c @@ -3,6 +3,7 @@ Copyright (C) 2003 Russell Kroll 2008 Arjen de Korte + 2012 Arnaud Quette 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 @@ -63,6 +64,7 @@ static int parse_args(upstype_t *ups, int numargs, char **arg) if (numargs < 2) return 0; + /* FIXME: all these should return their state_...() value! */ /* ADDCMD */ if (!strcasecmp(arg[0], "ADDCMD")) { state_addcmd(&ups->cmdlist, arg[1]); @@ -88,7 +90,7 @@ static int parse_args(upstype_t *ups, int numargs, char **arg) if (!strcasecmp(arg[0], "SETFLAGS")) { state_setflags(ups->inforoot, arg[1], numargs - 2, &arg[2]); return 1; - } + } /* SETINFO */ if (!strcasecmp(arg[0], "SETINFO")) { @@ -102,12 +104,24 @@ static int parse_args(upstype_t *ups, int numargs, char **arg) return 1; } + /* ADDRANGE */ + if (!strcasecmp(arg[0], "ADDRANGE")) { + state_addrange(ups->inforoot, arg[1], atoi(arg[2]), atoi(arg[3])); + return 1; + } + /* DELENUM */ if (!strcasecmp(arg[0], "DELENUM")) { state_delenum(ups->inforoot, arg[1], arg[2]); return 1; } + /* DELRANGE */ + if (!strcasecmp(arg[0], "DELRANGE")) { + state_delrange(ups->inforoot, arg[1], atoi(arg[2]), atoi(arg[3])); + return 1; + } + /* SETAUX */ if (!strcasecmp(arg[0], "SETAUX")) { state_setaux(ups->inforoot, arg[1], arg[2]); @@ -301,6 +315,11 @@ const enum_t *sstate_getenumlist(const upstype_t *ups, const char *var) return state_getenumlist(ups->inforoot, var); } +const range_t *sstate_getrangelist(const upstype_t *ups, const char *var) +{ + return state_getrangelist(ups->inforoot, var); +} + const cmdlist_t *sstate_getcmdlist(const upstype_t *ups) { return ups->cmdlist; diff --git a/server/sstate.h b/server/sstate.h index 622b848..bfb5ae6 100644 --- a/server/sstate.h +++ b/server/sstate.h @@ -3,6 +3,7 @@ Copyright (C) 2003 Russell Kroll 2008 Arjen de Korte + 2012 Arnaud Quette 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 @@ -35,6 +36,7 @@ const char *sstate_getinfo(const upstype_t *ups, const char *var); int sstate_getflags(const upstype_t *ups, const char *var); int sstate_getaux(const upstype_t *ups, const char *var); const enum_t *sstate_getenumlist(const upstype_t *ups, const char *var); +const range_t *sstate_getrangelist(const upstype_t *ups, const char *var); const cmdlist_t *sstate_getcmdlist(const upstype_t *ups); void sstate_makeinfolist(const upstype_t *ups, char *buf, size_t bufsize); void sstate_makerwlist(const upstype_t *ups, char *buf, size_t bufsize); diff --git a/server/upsd.c b/server/upsd.c index db200aa..1bb6c27 100644 --- a/server/upsd.c +++ b/server/upsd.c @@ -1,9 +1,9 @@ /* upsd.c - watches ups state files and answers queries Copyright (C) - 1999 Russell Kroll - 2008 Arjen de Korte - 2011 Arnaud Quette + 1999 Russell Kroll + 2008 Arjen de Korte + 2011 - 2012 Arnaud Quette 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 @@ -65,7 +65,7 @@ int deny_severity = LOG_WARNING; /* everything else */ const char *progname; -static nut_ctype_t *firstclient = NULL; +nut_ctype_t *firstclient = NULL; /* static nut_ctype_t *lastclient = NULL; */ /* default is to listen on all local interfaces */ @@ -955,6 +955,15 @@ int main(int argc, char **argv) exit(EXIT_SUCCESS); } + /* otherwise, we are being asked to start. + * so check if a previous instance is running by sending signal '0' + * (Ie 'kill 0') */ + if (sendsignalfn(pidfn, 0) == 0) { + printf("Fatal error: A previous upsd instance is already running!\n"); + printf("Either stop the previous instance first, or use the 'reload' command.\n"); + exit(EXIT_FAILURE); + } + argc -= optind; argv += optind; diff --git a/server/upsd.h b/server/upsd.h index 85985fe..2df9fc0 100644 --- a/server/upsd.h +++ b/server/upsd.h @@ -67,6 +67,7 @@ void check_perms(const char *fn); extern int maxage, maxconn; extern char *statepath, *datapath; extern upstype_t *firstups; +extern nut_ctype_t *firstclient; /* map commands onto signals */ diff --git a/server/user.c b/server/user.c index e443eee..8eff8a0 100644 --- a/server/user.c +++ b/server/user.c @@ -111,6 +111,9 @@ static void user_add_instcmd(const char *cmd) } } + upsdebugx(2, "user_add_instcmd: adding '%s' for %s", + cmd, curr_user->username); + tmp = xcalloc(1, sizeof(*tmp)); tmp->cmd = xstrdup(cmd); @@ -155,6 +158,9 @@ static void user_add_action(const char *act) return; } + upsdebugx(2, "user_add_action: adding '%s' for %s", + act, curr_user->username); + curr_user->firstaction = addaction(curr_user->firstaction, act); } diff --git a/tools/Makefile.am b/tools/Makefile.am index 0d9828b..ed280a9 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,13 +1,29 @@ # TODO: remove redundancies! -# Force build in ./ before nut-scanner, to have nutscan-{usb,snmp}.h -# built before going into the nut-scanner sub-directory +# XXX this does not work with Automake!!! +# +# In fact the very concept is entirely antithetical to Automake. +# +# SUBDIRS are explicitly a listing of all the directories that make +# must recurse into BEFORE processing the current directory. +# +# These python scripts must be moved into a sub-directory, and _only_ +# executed IF they need to be, and all the nut-scanner sources need +# to be moved out of a sub-directory into this directory. +# +# Anyway, for the time being, we force build in ./ before nut-scanner, +# to have nutscan-{usb,snmp}.h built before going into the nut-scanner +# sub-directory SUBDIRS = . nut-scanner -EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py device-recorder.sh svn2cl.authors nut-snmpinfo.py +EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py nut-recorder.sh svn2cl.authors nut-snmpinfo.py all: nut-scanner-deps +# XXX these rules are all bogus! They cause un-named target files to +# always be rebuilt! None of that is ever the right way to use make, +# and especially not Automake. Explicit filenames and their exact +# dependencies need to be properly listed. nut-scanner-deps: @if python -c 1; then \ echo "Regenerating the SNMP helper files."; \ diff --git a/tools/Makefile.in b/tools/Makefile.in index 66f35e8..70c7439 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -190,6 +190,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -203,6 +204,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -210,6 +212,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -284,10 +287,22 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -# Force build in ./ before nut-scanner, to have nutscan-{usb,snmp}.h -# built before going into the nut-scanner sub-directory +# XXX this does not work with Automake!!! +# +# In fact the very concept is entirely antithetical to Automake. +# +# SUBDIRS are explicitly a listing of all the directories that make +# must recurse into BEFORE processing the current directory. +# +# These python scripts must be moved into a sub-directory, and _only_ +# executed IF they need to be, and all the nut-scanner sources need +# to be moved out of a sub-directory into this directory. +# +# Anyway, for the time being, we force build in ./ before nut-scanner, +# to have nutscan-{usb,snmp}.h built before going into the nut-scanner +# sub-directory SUBDIRS = . nut-scanner -EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py device-recorder.sh svn2cl.authors nut-snmpinfo.py +EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py nut-recorder.sh svn2cl.authors nut-snmpinfo.py all: all-recursive .SUFFIXES: @@ -640,6 +655,10 @@ uninstall-am: all: nut-scanner-deps +# XXX these rules are all bogus! They cause un-named target files to +# always be rebuilt! None of that is ever the right way to use make, +# and especially not Automake. Explicit filenames and their exact +# dependencies need to be properly listed. nut-scanner-deps: @if python -c 1; then \ echo "Regenerating the SNMP helper files."; \ diff --git a/tools/device-recorder.sh b/tools/nut-recorder.sh similarity index 80% rename from tools/device-recorder.sh rename to tools/nut-recorder.sh index 5b55a99..e2785c0 100755 --- a/tools/device-recorder.sh +++ b/tools/nut-recorder.sh @@ -1,16 +1,20 @@ #!/bin/sh ################################################################################ # -# device-recorder.sh -# A script to record device running sequence and dump it in a .seq format -# The .seq file can then be used by dummy-ups to replay the sequence. +# nut-recorder +# An utility to record device running sequence (Ie power failures or any +# other change) and dump it in a .seq format +# The .seq file can then be used by the 'dummy-ups driver to replay the +# sequence. # ################################################################################ # FIXME: -# - implement PAUSE / RESUME (do not increment TIMER) on pressing space +# - implement PAUSE / RESUME (do not increment TIMER) on pressing space (?) +# - implement support for creating either .dev (static dump) or .seq +# - implement dump of instcmd and upsrw ################################################################################ -strUsage="Usage: dummy-recorder.sh [output-file] [interval]" +strUsage="Usage: nut-recorder [output-file] [interval]" # log data each 5 seconds DEFAULT_INTERVAL=5 @@ -18,7 +22,7 @@ DEFAULT_INTERVAL=5 # temporary files location TEMP_DIR="/tmp" -# output to dummy-device.dev by default +# output this file by default DEFAULT_OUTPUT="dummy-device.seq" # Process command line parameters diff --git a/tools/nut-scanner/Makefile.am b/tools/nut-scanner/Makefile.am index 0656e49..d4066d2 100644 --- a/tools/nut-scanner/Makefile.am +++ b/tools/nut-scanner/Makefile.am @@ -11,7 +11,7 @@ endif libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \ nutscan-device.c nutscan-ip.c nutscan-display.c nutscan-init.c \ scan_usb.c scan_snmp.c scan_xml_http.c scan_avahi.c -libnutscan_la_LIBADD = ../../clients/libupsclient.la $(NETLIBS) $(LIBLTDL_LIBS) +libnutscan_la_LIBADD = $(NETLIBS) $(LIBLTDL_LIBS) libnutscan_la_LDFLAGS = -version-info 1:0:0 libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include $(LIBLTDL_CFLAGS) diff --git a/tools/nut-scanner/Makefile.in b/tools/nut-scanner/Makefile.in index cf53410..9396c58 100644 --- a/tools/nut-scanner/Makefile.in +++ b/tools/nut-scanner/Makefile.in @@ -105,9 +105,8 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = @WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -libnutscan_la_DEPENDENCIES = ../../clients/libupsclient.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_2) +libnutscan_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_libnutscan_la_OBJECTS = libnutscan_la-scan_nut.lo \ libnutscan_la-scan_ipmi.lo libnutscan_la-nutscan-device.lo \ libnutscan_la-nutscan-ip.lo libnutscan_la-nutscan-display.lo \ @@ -229,6 +228,7 @@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_NAME = @OS_NAME@ @@ -242,6 +242,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -249,6 +250,7 @@ PORT = @PORT@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ @@ -328,8 +330,7 @@ libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \ nutscan-device.c nutscan-ip.c nutscan-display.c nutscan-init.c \ scan_usb.c scan_snmp.c scan_xml_http.c scan_avahi.c -libnutscan_la_LIBADD = ../../clients/libupsclient.la $(NETLIBS) \ - $(LIBLTDL_LIBS) $(am__append_2) +libnutscan_la_LIBADD = $(NETLIBS) $(LIBLTDL_LIBS) $(am__append_2) libnutscan_la_LDFLAGS = -version-info 1:0:0 libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include \ $(LIBLTDL_CFLAGS) $(am__append_1) $(am__append_3) \ diff --git a/tools/nut-scanner/nut-scanner.c b/tools/nut-scanner/nut-scanner.c index 2114674..b6cd221 100644 --- a/tools/nut-scanner/nut-scanner.c +++ b/tools/nut-scanner/nut-scanner.c @@ -470,5 +470,8 @@ display_help: display_func(dev[TYPE_IPMI]); nutscan_free_device(dev[TYPE_IPMI]); + + nutscan_free(); + return EXIT_SUCCESS; } diff --git a/tools/nut-scanner/nutscan-init.c b/tools/nut-scanner/nutscan-init.c index f668546..16ea760 100644 --- a/tools/nut-scanner/nutscan-init.c +++ b/tools/nut-scanner/nutscan-init.c @@ -18,10 +18,11 @@ */ #include "common.h" +#include int nutscan_avail_avahi = 0; int nutscan_avail_ipmi = 0; -int nutscan_avail_nut = 1; +int nutscan_avail_nut = 0; int nutscan_avail_snmp = 0; int nutscan_avail_usb = 0; int nutscan_avail_xml_http = 0; @@ -31,6 +32,7 @@ int nutscan_load_snmp_library(void); int nutscan_load_neon_library(void); int nutscan_load_avahi_library(void); int nutscan_load_ipmi_library(void); +int nutscan_load_upsclient_library(void); void nutscan_init(void) { @@ -49,4 +51,27 @@ void nutscan_init(void) #ifdef WITH_FREEIPMI nutscan_avail_ipmi = nutscan_load_ipmi_library(); #endif + nutscan_avail_nut = nutscan_load_upsclient_library(); +} + +void nutscan_free(void) +{ + if( nutscan_avail_usb ) { + lt_dlexit(); + } + if( nutscan_avail_snmp ) { + lt_dlexit(); + } + if( nutscan_avail_xml_http ) { + lt_dlexit(); + } + if( nutscan_avail_avahi ) { + lt_dlexit(); + } + if( nutscan_avail_ipmi ) { + lt_dlexit(); + } + if( nutscan_avail_nut ) { + lt_dlexit(); + } } diff --git a/tools/nut-scanner/nutscan-init.h b/tools/nut-scanner/nutscan-init.h index e952e6c..f72e14e 100644 --- a/tools/nut-scanner/nutscan-init.h +++ b/tools/nut-scanner/nutscan-init.h @@ -27,4 +27,5 @@ extern int nutscan_avail_usb; extern int nutscan_avail_xml_http; void nutscan_init(void); +void nutscan_free(void); #endif diff --git a/tools/nut-scanner/nutscan-snmp.h b/tools/nut-scanner/nutscan-snmp.h index 7af6cef..069da20 100644 --- a/tools/nut-scanner/nutscan-snmp.h +++ b/tools/nut-scanner/nutscan-snmp.h @@ -38,7 +38,7 @@ static snmp_device_id_t snmp_device_table[] = { { ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" , "apcc", NULL}, { ".1.3.6.1.4.1.4779.1.3.5.2.1.24.1" , "baytech", NULL}, { ".1.3.6.1.4.1.3808.1.1.1.1.1.1.0" , "cyberpower", ".1.3.6.1.4.1.3808"}, - { "1.3.6.1.4.1.232.165.3.1.1.0" , "cpqpower", NULL}, + { ".1.3.6.1.4.1.232.165.3.1.1.0" , "cpqpower", ".1.3.6.1.4.1.232.165.3"}, { ".1.3.6.1.4.1.4555.1.1.1.1.1.1.0" , "netvision", ".1.3.6.1.4.1.4555.1.1.1"}, /* Terminating entry */ { NULL, NULL, NULL} diff --git a/tools/nut-scanner/nutscan-usb.h b/tools/nut-scanner/nutscan-usb.h index 89a39fc..a20fdb7 100644 --- a/tools/nut-scanner/nutscan-usb.h +++ b/tools/nut-scanner/nutscan-usb.h @@ -32,6 +32,7 @@ typedef struct { static usb_device_id_t usb_device_table[] = { { 0x0001, 0x0000, "blazer_usb" }, + { 0x03f0, 0x0001, "usbhid-ups" }, { 0x03f0, 0x1f01, "bcmxcp_usb" }, { 0x03f0, 0x1f02, "bcmxcp_usb" }, { 0x03f0, 0x1f06, "usbhid-ups" }, @@ -40,6 +41,12 @@ static usb_device_id_t usb_device_table[] = { { 0x03f0, 0x1f0a, "usbhid-ups" }, { 0x03f0, 0x1fe0, "usbhid-ups" }, { 0x03f0, 0x1fe1, "usbhid-ups" }, + { 0x03f0, 0x1fe2, "usbhid-ups" }, + { 0x03f0, 0x1fe3, "usbhid-ups" }, + { 0x03f0, 0x1fe5, "usbhid-ups" }, + { 0x03f0, 0x1fe6, "usbhid-ups" }, + { 0x03f0, 0x1fe7, "usbhid-ups" }, + { 0x03f0, 0x1fe8, "usbhid-ups" }, { 0x0463, 0x0001, "usbhid-ups" }, { 0x0463, 0xffff, "usbhid-ups" }, { 0x047c, 0xffff, "usbhid-ups" }, @@ -58,8 +65,11 @@ static usb_device_id_t usb_device_table[] = { { 0x0592, 0x0004, "usbhid-ups" }, { 0x05b8, 0x0000, "blazer_usb" }, { 0x0665, 0x5161, "blazer_usb" }, - { 0x06da, 0x0002, "bcmxcp_usb" }, + { 0x06da, 0x0002, "blazer_usb" }, { 0x06da, 0x0003, "blazer_usb" }, + { 0x06da, 0x0004, "blazer_usb" }, + { 0x06da, 0x0005, "blazer_usb" }, + { 0x06da, 0x0201, "blazer_usb" }, { 0x06da, 0xffff, "usbhid-ups" }, { 0x075d, 0x0300, "usbhid-ups" }, { 0x0764, 0x0005, "usbhid-ups" }, diff --git a/tools/nut-scanner/scan_avahi.c b/tools/nut-scanner/scan_avahi.c index 7763b36..6e33724 100644 --- a/tools/nut-scanner/scan_avahi.c +++ b/tools/nut-scanner/scan_avahi.c @@ -36,6 +36,7 @@ #include /* dynamic link library stuff */ +static char * libname = "libavahi-client"; static lt_dlhandle dl_handle = NULL; static const char *dl_error = NULL; @@ -98,7 +99,7 @@ int nutscan_load_avahi_library() return 0; } - dl_handle = lt_dlopenext("libavahi-client"); + dl_handle = lt_dlopenext(libname); if (!dl_handle) { dl_error = lt_dlerror(); goto err; @@ -196,8 +197,10 @@ int nutscan_load_avahi_library() return 1; err: - fprintf(stderr, "%s\n", dl_error); + fprintf(stderr, "Cannot load AVAHI library (%s) : %s. AVAHI search disabled.\n", libname, dl_error); + dl_handle = (void *)1; + lt_dlexit(); return 0; } /* end of dynamic link library stuff */ diff --git a/tools/nut-scanner/scan_ipmi.c b/tools/nut-scanner/scan_ipmi.c index eac17c3..d47ee52 100644 --- a/tools/nut-scanner/scan_ipmi.c +++ b/tools/nut-scanner/scan_ipmi.c @@ -29,6 +29,7 @@ #define NUT_IPMI_DRV_NAME "nut-ipmipsu" /* dynamic link library stuff */ +static char * libname = "libfreeipmi"; static lt_dlhandle dl_handle = NULL; static const char *dl_error = NULL; @@ -77,7 +78,7 @@ int nutscan_load_ipmi_library() return 0; } - dl_handle = lt_dlopenext("libfreeipmi"); + dl_handle = lt_dlopenext(libname); if (!dl_handle) { dl_error = lt_dlerror(); goto err; @@ -163,8 +164,9 @@ int nutscan_load_ipmi_library() return 1; err: - fprintf(stderr, "%s\n", dl_error); + fprintf(stderr, "Cannot load IPMI library (%s) : %s. IPMI search disabled.\n", libname, dl_error); dl_handle = (void *)1; + lt_dlexit(); return 0; } /* end of dynamic link library stuff */ diff --git a/tools/nut-scanner/scan_nut.c b/tools/nut-scanner/scan_nut.c index 5fb8b70..55df68c 100644 --- a/tools/nut-scanner/scan_nut.c +++ b/tools/nut-scanner/scan_nut.c @@ -23,7 +23,20 @@ #ifdef HAVE_PTHREAD #include #endif +#include +/* dynamic link library stuff */ +static char * libname = "libupsclient"; +static lt_dlhandle dl_handle = NULL; +static const char *dl_error = NULL; + +static int (*nut_upscli_splitaddr)(const char *buf,char **hostname, int *port); +static int (*nut_upscli_tryconnect)(UPSCONN_t *ups, const char *host, int port, + int flags,struct timeval * timeout); +static int (*nut_upscli_list_start)(UPSCONN_t *ups, unsigned int numq, + const char **query); +static int (*nut_upscli_list_next)(UPSCONN_t *ups, unsigned int numq, + const char **query,unsigned int *numa, char ***answer); static nutscan_device_t * dev_ret = NULL; #ifdef HAVE_PTHREAD @@ -35,6 +48,64 @@ struct scan_nut_arg { long timeout; }; +/* return 0 on error */ +int nutscan_load_upsclient_library() +{ + + if( dl_handle != NULL ) { + /* if previous init failed */ + if( dl_handle == (void *)1 ) { + return 0; + } + /* init has already been done */ + return 1; + } + + if( lt_dlinit() != 0 ) { + fprintf(stderr, "Error initializing lt_init\n"); + return 0; + } + + dl_handle = lt_dlopenext(libname); + if (!dl_handle) { + dl_error = lt_dlerror(); + goto err; + } + + lt_dlerror(); /* Clear any existing error */ + + *(void **) (&nut_upscli_splitaddr) = lt_dlsym(dl_handle, + "upscli_splitaddr"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_upscli_tryconnect) = lt_dlsym(dl_handle, + "upscli_tryconnect"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_upscli_list_start) = lt_dlsym(dl_handle, + "upscli_list_start"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + *(void **) (&nut_upscli_list_next) = lt_dlsym(dl_handle, + "upscli_list_next"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + + return 1; +err: + fprintf(stderr, "Cannot load NUT library (%s) : %s. NUT search disabled.\n", libname, dl_error); + dl_handle = (void *)1; + lt_dlexit(); + return 0; +} + /* FIXME: SSL support */ static void * list_nut_devices(void * arg) { @@ -56,28 +127,32 @@ static void * list_nut_devices(void * arg) query[0] = "UPS"; numq = 1; - if (upscli_splitaddr(target_hostname, &hostname, &port) != 0) { + if ((*nut_upscli_splitaddr)(target_hostname, &hostname, &port) != 0) { free(target_hostname); free(nut_arg); + free(ups); return NULL; } - if (upscli_tryconnect(ups, hostname, port,UPSCLI_CONN_TRYSSL,&tv) < 0) { + if ((*nut_upscli_tryconnect)(ups, hostname, port,UPSCLI_CONN_TRYSSL,&tv) < 0) { free(target_hostname); free(nut_arg); + free(ups); return NULL; } - if(upscli_list_start(ups, numq, query) < 0) { + if((*nut_upscli_list_start)(ups, numq, query) < 0) { free(target_hostname); free(nut_arg); + free(ups); return NULL; } - while (upscli_list_next(ups, numq, query, &numa, &answer) == 1) { + while ((*nut_upscli_list_next)(ups,numq, query, &numa, &answer) == 1) { /* UPS */ if (numa < 3) { free(target_hostname); free(nut_arg); + free(ups); return NULL; } /* FIXME: check for duplication by getting driver.port and device.serial @@ -109,6 +184,7 @@ static void * list_nut_devices(void * arg) free(target_hostname); free(nut_arg); + free(ups); return NULL; } diff --git a/tools/nut-scanner/scan_snmp.c b/tools/nut-scanner/scan_snmp.c index 32b2b1f..cba4c46 100644 --- a/tools/nut-scanner/scan_snmp.c +++ b/tools/nut-scanner/scan_snmp.c @@ -56,19 +56,25 @@ #endif #include "nutscan-snmp.h" +/* Address API change */ +#ifndef usmAESPrivProtocol +#define USMAESPRIVPROTOCOL "usmAES128PrivProtocol" +#else +#define USMAESPRIVPROTOCOL "usmAESPrivProtocol" +#endif #define SysOID ".1.3.6.1.2.1.1.2.0" static nutscan_device_t * dev_ret = NULL; #ifdef HAVE_PTHREAD static pthread_mutex_t dev_mutex; -static pthread_mutex_t lib_mutex; static pthread_t * thread_array = NULL; static int thread_count = 0; #endif long g_usec_timeout ; /* dynamic link library stuff */ +static char * libname = "libnetsnmp"; static lt_dlhandle dl_handle = NULL; static const char *dl_error = NULL; @@ -99,10 +105,6 @@ static oid * (*nut_usmDESPrivProtocol); /* return 0 on error */ int nutscan_load_snmp_library() { -#ifdef HAVE_PTHREAD - pthread_mutex_lock(&lib_mutex); -#endif - if( dl_handle != NULL ) { /* if previous init failed */ if( dl_handle == (void *)1 ) { @@ -117,7 +119,7 @@ int nutscan_load_snmp_library() return 0; } - dl_handle = lt_dlopenext("libnetsnmp"); + dl_handle = lt_dlopenext(libname); if (!dl_handle) { dl_error = lt_dlerror(); goto err; @@ -205,7 +207,7 @@ int nutscan_load_snmp_library() } *(void **) (&nut_usmAESPrivProtocol) = lt_dlsym(dl_handle, - "usmAESPrivProtocol"); + USMAESPRIVPROTOCOL); if ((dl_error = lt_dlerror()) != NULL) { goto err; } @@ -228,16 +230,11 @@ int nutscan_load_snmp_library() goto err; } -#ifdef HAVE_PTHREAD - pthread_mutex_unlock(&dev_mutex); -#endif return 1; err: - fprintf(stderr, "%s\n", dl_error); + fprintf(stderr, "Cannot load SNMP library (%s) : %s. SNMP search disabled.\n", libname, dl_error); dl_handle = (void *)1; -#ifdef HAVE_PTHREAD - pthread_mutex_unlock(&dev_mutex); -#endif + lt_dlexit(); return 0; } /* end of dynamic link library stuff */ @@ -660,7 +657,6 @@ nutscan_device_t * nutscan_scan_snmp(const char * start_ip, const char * stop_ip pthread_t thread; pthread_mutex_init(&dev_mutex,NULL); - pthread_mutex_init(&lib_mutex,NULL); #endif if( !nutscan_avail_snmp ) { diff --git a/tools/nut-scanner/scan_usb.c b/tools/nut-scanner/scan_usb.c index 3fac8a6..d6e1e4e 100644 --- a/tools/nut-scanner/scan_usb.c +++ b/tools/nut-scanner/scan_usb.c @@ -28,6 +28,7 @@ #include /* dynamic link library stuff */ +static char * libname = "libusb"; static lt_dlhandle dl_handle = NULL; static const char *dl_error = NULL; static int (*nut_usb_close)(usb_dev_handle *dev); @@ -57,7 +58,7 @@ int nutscan_load_usb_library() return 0; } - dl_handle = lt_dlopenext("libusb"); + dl_handle = lt_dlopenext(libname); if (!dl_handle) { dl_error = lt_dlerror(); goto err; @@ -106,8 +107,9 @@ int nutscan_load_usb_library() return 1; err: - fprintf(stderr, "%s\n", dl_error); + fprintf(stderr, "Cannot load USB library (%s) : %s. USB search disabled.\n", libname, dl_error); dl_handle = (void *)1; + lt_dlexit(); return 0; } /* end of dynamic link library stuff */ diff --git a/tools/nut-scanner/scan_xml_http.c b/tools/nut-scanner/scan_xml_http.c index b66f42f..d4bd220 100644 --- a/tools/nut-scanner/scan_xml_http.c +++ b/tools/nut-scanner/scan_xml_http.c @@ -33,6 +33,7 @@ #include /* dynamic link library stuff */ +static char * libname = "libneon"; static lt_dlhandle dl_handle = NULL; static const char *dl_error = NULL; @@ -63,7 +64,7 @@ int nutscan_load_neon_library() return 0; } - dl_handle = lt_dlopenext("libneon"); + dl_handle = lt_dlopenext(libname); if (!dl_handle) { dl_error = lt_dlerror(); goto err; @@ -93,8 +94,9 @@ int nutscan_load_neon_library() return 1; err: - fprintf(stderr, "%s\n", dl_error); + fprintf(stderr, "Cannot load XML library (%s) : %s. XML search disabled.\n", libname, dl_error); dl_handle = (void *)1; + lt_dlexit(); return 0; } @@ -210,7 +212,7 @@ nutscan_device_t * nutscan_scan_xml_http(long usec_timeout) ne_xml_parser *parser = (*nut_ne_xml_create)(); (*nut_ne_xml_push_handler)(parser, startelm_cb, NULL, NULL, nut_dev); - (*nut_ne_xml_parse)(parser, buf, strlen(buf)); + (*nut_ne_xml_parse)(parser, buf, recv_size); (*nut_ne_xml_destroy)(parser); nut_dev->driver = strdup("netxml-ups"); diff --git a/tools/nut-usbinfo.pl b/tools/nut-usbinfo.pl index 7833086..bd80000 100755 --- a/tools/nut-usbinfo.pl +++ b/tools/nut-usbinfo.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# Current Version : 1.1 -# Copyright (C) 2008 - 2011 +# Current Version : 1.2 +# Copyright (C) 2008 - 2012 # Arnaud Quette # dloic (loic.dardant AT gmail DOT com) # @@ -20,7 +20,11 @@ # 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 - + +# TODO list: +# - rewrite using glob, as in other helper scripts +# - manage deps in Makefile.am + use File::Find; use strict; @@ -211,7 +215,8 @@ sub gen_usb_files sub find_usbdevs { - return $File::Find::prune = 1 if $_ eq '.svn'; + # maybe there's an option to turn off all .* files, but anyway this is stupid + return $File::Find::prune = 1 if ($_ eq '.svn') || ($_ =~ /^\.#/); my $nameFile=$_; my $lastComment=""; diff --git a/tools/svn2cl.authors b/tools/svn2cl.authors index 99086b3..660317e 100644 --- a/tools/svn2cl.authors +++ b/tools/svn2cl.authors @@ -11,3 +11,11 @@ fbohe-guest:Frederic Bohe aquette:Arnaud Quette clepple-guest:Charles Lepple adkorte-guest:Arjen de Korte +selinger-guest:Peter Selinger +carlosefr-guest:Carlos Rodrigues +nba-guest:Niels Baggesen +lyrgard-guest:Jonathan Dion +jongough-guest:Jon Gough +mihl-guest:Michal Hlavinka +acolombier-guest:Antoine Colombier + From 848fe6dc7451760dd2fa195c9b9992b4c9311cab Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Mon, 4 Jun 2012 11:35:54 +0200 Subject: [PATCH 079/300] Start packaging 2.6.4-1, closing #671444 + NMU #613643 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index c4d4f6b..ed29e52 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nut (2.6.4-1) UNRELEASED; urgency=low + + * New upstream release (Closes: #671444) + * acknowledges NMU (Closes: #613643) + + -- Arnaud Quette Fri, 01 Jun 2012 16:15:20 +0200 + nut (2.6.3-2) unstable; urgency=low * debian/nut-server.init: rewrite to match upsd / drivers startup scope From 112d9a7c99cfe815b0e281b10d471550e0b21acb Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Mon, 4 Jun 2012 11:38:04 +0200 Subject: [PATCH 080/300] Fix nut-client init script (Closes: #675619) Fix action "start" and use of log_*_*msg LSB log functions. Patch from Laurent Bigonville (Closes: #675619) --- debian/changelog | 2 ++ debian/nut-client.init | 30 ++++++++++++++---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index ed29e52..3a66c0f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ nut (2.6.4-1) UNRELEASED; urgency=low * New upstream release (Closes: #671444) * acknowledges NMU (Closes: #613643) + * debian/nut-client.init: fix action "start" and use of log_*_*msg + LSB log functions (Closes: #675619) -- Arnaud Quette Fri, 01 Jun 2012 16:15:20 +0200 diff --git a/debian/nut-client.init b/debian/nut-client.init index ade3ffe..8524dd2 100755 --- a/debian/nut-client.init +++ b/debian/nut-client.init @@ -78,8 +78,8 @@ start_stop_client () { -- $UPSMON_OPTIONS >/dev/null 2>&1 && return 0 || return 1 ;; stop) - start-stop-daemon -K -o -q -p $upsmon_pid -n upsmon >/dev/null 2>&1 && - log_progress_msg "upsmon" || log_progress_msg "(upsmon failed)" + start-stop-daemon -K -o -q -p $upsmon_pid -n upsmon >/dev/null 2>&1 \ + && return 0 || return 1 ;; esac ;; @@ -92,23 +92,22 @@ start_stop_client () { case "$1" in start) - log_daemon_msg "Starting $DESC" + log_daemon_msg "Starting $DESC" "$NAME" check_var_directory - start_stop_client start && log_progress_msg "upsmon" - || log_progress_msg "upsmon (failed)" - log_end_msg 0 + start_stop_client start + log_end_msg $? ;; stop) - log_daemon_msg "Stopping $DESC" - start_stop_client stop && log_progress_msg "upsmon" - || log_progress_msg "upsmon (failed)" - log_end_msg 0 + log_daemon_msg "Stopping $DESC" "$NAME" + start_stop_client stop + log_end_msg $? ;; reload) - log_daemon_msg "Reloading $DESC" + log_daemon_msg "Reloading $DESC" "$NAME" $upsmon -c reload >/dev/null 2>&1 + log_end_msg $? ;; restart|force-reload) @@ -118,15 +117,14 @@ case "$1" in # - stop nut-client # - restart (Ie stop+start) nut-server # - start nut-client - log_daemon_msg "Restarting $DESC" - start_stop_client stop || log_progress_msg "upsmon (failed)" + log_daemon_msg "Restarting $DESC" "$NAME" + start_stop_client stop || true # should then 'start_stop_server stop', Ie /etc/init.d/nut-server stop #sleep 5 check_var_directory # should first 'start_stop_server start', Ie /etc/init.d/nut-server start - start_stop_client start && log_progress_msg "upsmon" - || log_progress_msg "upsmon (failed)" - log_end_msg 0 + start_stop_client start + log_end_msg $? ;; status) From 39a7ae33fbf64919c6703e213d0e415fa3e947d2 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Wed, 6 Jun 2012 21:06:03 +0200 Subject: [PATCH 081/300] Fix bug #660072 (obsolete udev rules left in /etc) --- debian/changelog | 8 ++++++-- debian/nut-server.preinst | 17 ++++------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3a66c0f..a66b5f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,15 @@ -nut (2.6.4-1) UNRELEASED; urgency=low +nut (2.6.4-1) unstable; urgency=high * New upstream release (Closes: #671444) * acknowledges NMU (Closes: #613643) * debian/nut-client.init: fix action "start" and use of log_*_*msg LSB log functions (Closes: #675619) + * debian/nut-server.preinst: remove obsolete file(s) left in + /etc/udev/rules.d and related processing: udev files are now located + in /lib/udev/rules, and there is no reason to modify the dedicated + USB UPS rules (52-nut-usbups.rules) (Closes: #660072) - -- Arnaud Quette Fri, 01 Jun 2012 16:15:20 +0200 + -- Arnaud Quette Wed, 06 Jun 2012 21:03:50 +0200 nut (2.6.3-2) unstable; urgency=low diff --git a/debian/nut-server.preinst b/debian/nut-server.preinst index 9999abe..587c150 100644 --- a/debian/nut-server.preinst +++ b/debian/nut-server.preinst @@ -1,19 +1,10 @@ #!/bin/sh -e if [ "$1" = upgrade ]; then - # remove the obsolete udev file - [ -f /etc/udev/rules.d/025_nut-usbups.rules ] && rm -f /etc/udev/rules.d/025_nut-usbups.rules - - # Remove previous rules if unchanged, otherwise move to new filename. - if [ -e "/etc/udev/rules.d/52_nut-usbups.rules" ]; then - if [ "`md5sum \"/etc/udev/rules.d/52_nut-usbups.rules\" | sed -e \"s/ .*//\"`" = \ - "`dpkg-query -W -f='${Conffiles}' nut | sed -n -e \"\\\\' /etc/udev/rules.d/52_nut-usbups.rules's/.* //p\"`" ] - then - rm -f "/etc/udev/rules.d/52_nut-usbups.rules" - else - mv "/etc/udev/rules.d/52_nut-usbups.rules" "/etc/udev/rules.d/52-nut-usbups.rules" - fi - fi + # remove the obsolete udev file(s) + [ -f /etc/udev/rules.d/025_nut-usbups.rules ] && rm -f /etc/udev/rules.d/025_nut-usbups.rules + [ -f /etc/udev/rules.d/52_nut-usbups.rules ] && rm -f /etc/udev/rules.d/52_nut-usbups.rules + [ -f /etc/udev/rules.d/52-nut-usbups.rules ] && rm -f /etc/udev/rules.d/52-nut-usbups.rules # migrate /etc/default/nut to /etc/nut/nut.conf (part #1) # we need to do this before default gets trashed From ca0de194e261ace3dd882c8dbc5b9e62a8ede86a Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Fri, 8 Jun 2012 23:27:10 +0200 Subject: [PATCH 082/300] Create IPMI support package --- debian/changelog | 7 +++++++ debian/control | 22 ++++++++++++++++++++-- debian/nut-ipmi.install | 1 + debian/nut-ipmi.manpages | 1 + 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 debian/nut-ipmi.install create mode 100644 debian/nut-ipmi.manpages diff --git a/debian/changelog b/debian/changelog index a66b5f5..1c7fd72 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nut (2.6.4-2) unstable; urgency=low + + * debian/control, debian/nut-ipmi.{install,manpages}: create IPMI + support package + + -- Arnaud Quette Fri, 08 Jun 2012 23:23:03 +0200 + nut (2.6.4-1) unstable; urgency=high * New upstream release (Closes: #671444) diff --git a/debian/control b/debian/control index dbf99d7..9b55e05 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,9 @@ Build-Depends: debhelper (>= 8), libneon27-gnutls-dev | libneon27-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6), - python (>= 2.6.6-3~) + python (>= 2.6.6-3~), + libfreeipmi-dev (>= 0.8.5), + libipmimonitoring-dev (>= 0.8.5) Build-Depends-Indep: asciidoc (>= 8.6.3), docbook-xsl, dblatex (>= 0.2.5), @@ -37,7 +39,7 @@ Description: network UPS tools - metapackage Package: nut-server Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev}, nut-client (= ${binary:Version}) -Suggests: nut-cgi, nut-snmp, nut-dev, nut-xml +Suggests: nut-cgi, nut-snmp, nut-ipmi, nut-xml, nut-dev Provides: nut-usb Conflicts: nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) Replaces: nut (<< 2.6.1-2~) @@ -102,6 +104,22 @@ Description: network UPS tools - SNMP driver supports various MIBs including IETF, MGE, and APC. It adds an SNMP Manager interface to the core NUT system. +Package: nut-impi +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 1.4.1-pre1) +Conflicts: nut (<= 1.4.0) +Description: network UPS tools - IPMI driver + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package currently provides nut-ipmipsu, a driver which allows + to monitor IPMI power supply units (PSU) found in servers of + popular brands, such as Dell, HP, IBM. It adds an IPMI interface + to the core NUT system. + Package: nut-xml Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 2.2.2) diff --git a/debian/nut-ipmi.install b/debian/nut-ipmi.install new file mode 100644 index 0000000..4823952 --- /dev/null +++ b/debian/nut-ipmi.install @@ -0,0 +1 @@ +debian/tmp/lib/nut/nut-ipmipsu diff --git a/debian/nut-ipmi.manpages b/debian/nut-ipmi.manpages new file mode 100644 index 0000000..5da576f --- /dev/null +++ b/debian/nut-ipmi.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/nut-ipmipsu.8 From 82fda8eb40da49eb299756f9f1ac993a6a1e9202 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Mon, 11 Jun 2012 20:27:04 +0200 Subject: [PATCH 083/300] Split udev rules files between nut-server and nut-ipmi --- debian/changelog | 1 + debian/control | 2 +- debian/nut-ipmi.install | 1 + debian/nut-server.install | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1c7fd72..a7d2a88 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ nut (2.6.4-2) unstable; urgency=low * debian/control, debian/nut-ipmi.{install,manpages}: create IPMI support package + * debian/nut-server.install: only install USB udev rules -- Arnaud Quette Fri, 08 Jun 2012 23:23:03 +0200 diff --git a/debian/control b/debian/control index 9b55e05..ef2b59a 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,7 @@ Build-Depends: debhelper (>= 8), libwrap0-dev (>= 7.6), python (>= 2.6.6-3~), libfreeipmi-dev (>= 0.8.5), - libipmimonitoring-dev (>= 0.8.5) + libipmimonitoring-dev (>= 1.1.5-2) Build-Depends-Indep: asciidoc (>= 8.6.3), docbook-xsl, dblatex (>= 0.2.5), diff --git a/debian/nut-ipmi.install b/debian/nut-ipmi.install index 4823952..2d9854d 100644 --- a/debian/nut-ipmi.install +++ b/debian/nut-ipmi.install @@ -1 +1,2 @@ debian/tmp/lib/nut/nut-ipmipsu +debian/tmp/*/udev/rules.d/52-nut-ipmipsu.rules diff --git a/debian/nut-server.install b/debian/nut-server.install index 9486e8a..1c22483 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -1,7 +1,7 @@ debian/tmp/sbin/upsd debian/tmp/usr/share/nut/cmdvartab debian/tmp/usr/share/nut/driver.list -debian/tmp/*/udev/ +debian/tmp/*/udev/rules.d/52-nut-usbups.rules debian/tmp/etc/avahi/services/nut.service debian/tmp/etc/nut/ups.conf debian/tmp/etc/nut/upsd.conf From 357d77d1f2552d514865128bf4d3ed6d3f817559 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Tue, 12 Jun 2012 14:34:34 +0200 Subject: [PATCH 084/300] Fix typo error on nut-ipmi package name --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index ef2b59a..0c7eebe 100644 --- a/debian/control +++ b/debian/control @@ -104,7 +104,7 @@ Description: network UPS tools - SNMP driver supports various MIBs including IETF, MGE, and APC. It adds an SNMP Manager interface to the core NUT system. -Package: nut-impi +Package: nut-ipmi Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 1.4.1-pre1) Conflicts: nut (<= 1.4.0) From f50e2690169d0ec9af2563ed48813dc517911b48 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 9 Aug 2012 10:36:09 +0200 Subject: [PATCH 085/300] debian/rules: Stop the nut-client before nut-server on systems using static boot ordering (Closes: #679451) --- debian/changelog | 7 +++++++ debian/rules | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a7d2a88..08b58c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nut (2.6.4-3) UNRELEASED; urgency=low + + * debian/rules: Stop the nut-client before nut-server on systems using static + boot ordering (Closes: #679451) + + -- Laurent Bigonville Thu, 09 Aug 2012 10:31:05 +0200 + nut (2.6.4-2) unstable; urgency=low * debian/control, debian/nut-ipmi.{install,manpages}: create IPMI diff --git a/debian/rules b/debian/rules index b9eef15..b0745bb 100755 --- a/debian/rules +++ b/debian/rules @@ -76,8 +76,8 @@ common-install-indep:: binary-install/nut-monitor:: dh_python2 -pnut-monitor -DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut-server -- start 50 2 3 4 5 . stop 50 0 1 6 . -DEB_DH_INSTALLINIT_ARGS_nut-client := --init-script=nut-client -- start 51 2 3 4 5 . stop 51 0 1 6 . +DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut-server -- start 50 2 3 4 5 . stop 51 0 1 6 . +DEB_DH_INSTALLINIT_ARGS_nut-client := --init-script=nut-client -- start 51 2 3 4 5 . stop 50 0 1 6 . DEB_DH_COMPRESS_ARGS_nut-doc := -X.pdf ifeq (linux,$(DEB_HOST_ARCH_OS)) From 51c7f9422f070dc2bb8b109caf81e296e694ebc2 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 9 Aug 2012 11:05:51 +0200 Subject: [PATCH 086/300] debian/nut-server.maintscript: Remove /etc/init.d/nut on upgrade (Closes: #677822) --- debian/changelog | 4 +++- debian/control | 3 ++- debian/nut-server.maintscript | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 debian/nut-server.maintscript diff --git a/debian/changelog b/debian/changelog index 08b58c2..2f50b3f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ nut (2.6.4-3) UNRELEASED; urgency=low * debian/rules: Stop the nut-client before nut-server on systems using static boot ordering (Closes: #679451) + * debian/nut-server.maintscript: Remove /etc/init.d/nut on upgrade + (Closes: #677822) - -- Laurent Bigonville Thu, 09 Aug 2012 10:31:05 +0200 + -- Laurent Bigonville Thu, 09 Aug 2012 11:04:51 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/control b/debian/control index 0c7eebe..e9ff6a4 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Arnaud Quette Uploaders: Laurent Bigonville -Build-Depends: debhelper (>= 8), +Build-Depends: debhelper (>= 8.1.0~), cdbs (>= 0.4.90~), libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, @@ -44,6 +44,7 @@ Provides: nut-usb Conflicts: nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) Replaces: nut (<< 2.6.1-2~) Breaks: nut (<< 2.6.1-2~) +Pre-Depends: ${misc:Pre-Depends} Description: network UPS tools - core system Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and diff --git a/debian/nut-server.maintscript b/debian/nut-server.maintscript new file mode 100644 index 0000000..1d202d4 --- /dev/null +++ b/debian/nut-server.maintscript @@ -0,0 +1,3 @@ +#Removing obsolete init script. +#The file is gone in 2.6.3-2 but was not removed on upgrades. +rm_conffile /etc/init.d/nut 2.6.4-3~ From a9f5fa9b6f1ac755593bce9f818a43664c5926f5 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 9 Aug 2012 11:20:54 +0200 Subject: [PATCH 087/300] Rename nut-server.lintian-overrides to nut-client.lintian-overrides and adjust overrides now that ups-monitor is shipped in nut-client package (Closes: #677947) --- debian/changelog | 5 ++++- debian/nut-client.lintian-overrides | 1 + debian/nut-server.lintian-overrides | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 debian/nut-client.lintian-overrides delete mode 100644 debian/nut-server.lintian-overrides diff --git a/debian/changelog b/debian/changelog index 2f50b3f..3d891a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,11 @@ nut (2.6.4-3) UNRELEASED; urgency=low boot ordering (Closes: #679451) * debian/nut-server.maintscript: Remove /etc/init.d/nut on upgrade (Closes: #677822) + * Rename nut-server.lintian-overrides to nut-client.lintian-overrides and + adjust overrides now that ups-monitor is shipped in nut-client package + (Closes: #677947) - -- Laurent Bigonville Thu, 09 Aug 2012 11:04:51 +0200 + -- Laurent Bigonville Thu, 09 Aug 2012 11:20:06 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/nut-client.lintian-overrides b/debian/nut-client.lintian-overrides new file mode 100644 index 0000000..4651289 --- /dev/null +++ b/debian/nut-client.lintian-overrides @@ -0,0 +1 @@ +nut-client: script-in-etc-init.d-not-registered-via-update-rc.d diff --git a/debian/nut-server.lintian-overrides b/debian/nut-server.lintian-overrides deleted file mode 100644 index 9618794..0000000 --- a/debian/nut-server.lintian-overrides +++ /dev/null @@ -1,2 +0,0 @@ -nut-server: script-in-etc-init.d-not-registered-via-update-rc.d -nut-server: init.d-script-does-not-provide-itself etc/init.d/ups-monitor From dbeaea56b06b396f5d9ca9fea36f26672d40f6f1 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 9 Aug 2012 11:39:46 +0200 Subject: [PATCH 088/300] Add debian/patches/0001-fix-upsmon-regression.patch: Fix upsmon/upssched regression (Taken from upstream) (Closes: #679513) --- debian/changelog | 4 +++- debian/patches/0001-fix-upsmon-regression.patch | 15 +++++++++++++++ debian/patches/series | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0001-fix-upsmon-regression.patch diff --git a/debian/changelog b/debian/changelog index 3d891a2..c52ef13 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,10 @@ nut (2.6.4-3) UNRELEASED; urgency=low * Rename nut-server.lintian-overrides to nut-client.lintian-overrides and adjust overrides now that ups-monitor is shipped in nut-client package (Closes: #677947) + * Add debian/patches/0001-fix-upsmon-regression.patch: Fix upsmon/upssched + regression (Taken from upstream) (Closes: #679513) - -- Laurent Bigonville Thu, 09 Aug 2012 11:20:06 +0200 + -- Laurent Bigonville Thu, 09 Aug 2012 11:36:41 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/patches/0001-fix-upsmon-regression.patch b/debian/patches/0001-fix-upsmon-regression.patch new file mode 100644 index 0000000..aa8c13e --- /dev/null +++ b/debian/patches/0001-fix-upsmon-regression.patch @@ -0,0 +1,15 @@ +Description: Fix upsmon/upssched regression +Origin: upstream, http://trac.networkupstools.org/projects/nut/changeset/3670 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679513 + +Index: /trunk/clients/upssched.c +=================================================================== +--- a/clients/upssched.c (revision 3555) ++++ b/clients/upssched.c (revision 3670) +@@ -695,5 +695,5 @@ + pconf_encode(arg2, enc, sizeof(enc))); + +- snprintfcat(enc, sizeof(enc), "%s\n", buf); ++ snprintf(enc, sizeof(enc), "%s\n", buf); + + /* see if the parent needs to be started (and maybe start it) */ diff --git a/debian/patches/series b/debian/patches/series index 2024d93..f80396c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ +0001-fix-upsmon-regression.patch 0002-nut-monitor-paths.patch From 1cd02baa2d0423925be31e54b3dfd398ae7ba730 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 9 Aug 2012 11:50:35 +0200 Subject: [PATCH 089/300] Move nut metapackage to Section: metapackages --- debian/changelog | 3 ++- debian/control | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c52ef13..2a9b7f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,9 @@ nut (2.6.4-3) UNRELEASED; urgency=low (Closes: #677947) * Add debian/patches/0001-fix-upsmon-regression.patch: Fix upsmon/upssched regression (Taken from upstream) (Closes: #679513) + * Move nut metapackage to Section: metapackages - -- Laurent Bigonville Thu, 09 Aug 2012 11:36:41 +0200 + -- Laurent Bigonville Thu, 09 Aug 2012 11:50:08 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/control b/debian/control index e9ff6a4..b99fe5a 100644 --- a/debian/control +++ b/debian/control @@ -26,6 +26,7 @@ X-Python-Version: >= 2.5 Package: nut Architecture: all +Section: metapackages Depends: ${misc:Depends}, nut-server, nut-client Description: network UPS tools - metapackage Network UPS Tools (NUT) is a client/server monitoring system that From a6634bc58eb5f436a9a81532e4231230df43ee50 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 9 Aug 2012 21:21:03 +0200 Subject: [PATCH 090/300] Also create nut user when installing nut-client package and do not delete it on purge anymore (Closes: #682000) --- debian/changelog | 4 ++- debian/nut-client.postinst | 60 ++++++++++++++++++++++++++++++++++++++ debian/nut-server.postinst | 2 +- debian/nut-server.postrm | 6 ---- 4 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 debian/nut-client.postinst diff --git a/debian/changelog b/debian/changelog index 2a9b7f1..b6331fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,10 @@ nut (2.6.4-3) UNRELEASED; urgency=low * Add debian/patches/0001-fix-upsmon-regression.patch: Fix upsmon/upssched regression (Taken from upstream) (Closes: #679513) * Move nut metapackage to Section: metapackages + * Also create nut user when installing nut-client package and do not delete + it on purge anymore (Closes: #682000) - -- Laurent Bigonville Thu, 09 Aug 2012 11:50:08 +0200 + -- Laurent Bigonville Thu, 09 Aug 2012 21:18:03 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/nut-client.postinst b/debian/nut-client.postinst new file mode 100644 index 0000000..fbcf657 --- /dev/null +++ b/debian/nut-client.postinst @@ -0,0 +1,60 @@ +#!/bin/sh -e + +case "$1" in + + configure) + + # make sure the nut user exists and has correct memberships + if ! getent group nut >/dev/null; then + addgroup --quiet --system nut + fi + if ! getent passwd nut >/dev/null; then + adduser --quiet --system --ingroup nut --home /var/lib/nut --no-create-home nut + elif ! groups nut | grep -qw nut; then + adduser nut nut + fi +# for Ubuntu, while waiting for a proper debconf +# if ! groups nut | grep -qw dialout; then +# adduser nut dialout +# fi + + # make sure that conffiles are secured and have the correct ownerships + if [ -d /etc/nut/ ] ; then + chown root:nut /etc/nut/ + fi + for file in nut.conf upsmon.conf upssched.conf ; do + if [ -f /etc/nut/$file ] ; then + chown root:nut /etc/nut/$file + chmod 640 /etc/nut/$file + fi + done + + # make sure that /var/run/nut exists and has the correct ownerships + if [ ! -d /var/run/nut ] ; then + mkdir -p /var/run/nut + fi + if [ -d /var/run/nut ] ; then + chown root:nut /var/run/nut + chmod 770 /var/run/nut + fi + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index a91caab..193676f 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -22,7 +22,7 @@ case "$1" in if [ -d /etc/nut/ ] ; then chown root:nut /etc/nut/ fi - for file in nut.conf ups.conf upsd.conf upsmon.conf upsd.users upssched.conf ; do + for file in ups.conf upsd.conf upsd.users ; do if [ -f /etc/nut/$file ] ; then chown root:nut /etc/nut/$file chmod 640 /etc/nut/$file diff --git a/debian/nut-server.postrm b/debian/nut-server.postrm index 38b8d52..1ca0437 100644 --- a/debian/nut-server.postrm +++ b/debian/nut-server.postrm @@ -14,12 +14,6 @@ case "$1" in rm -f /etc/udev/rules.d/025_nut-usbups.rules rm -f /etc/udev/rules.d/52_nut-usbups.rules rm -f /etc/udev/rules.d/52-nut-usbups.rules - # remove the nut user - if [ -x "$(command -v deluser)" ]; then - deluser --quiet --system nut > /dev/null || true - else - echo >&2 "not removing nut system account because deluser command was not found" - fi # handle a dpkg bug [ -d /etc/nut ] && rmdir --ignore-fail-on-non-empty /etc/nut >/dev/null 2>&1 ;; From 0429bb5294efa09086bf10b2984b9cf3708b990c Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 9 Aug 2012 21:40:24 +0200 Subject: [PATCH 091/300] =?UTF-8?q?Drop=20/etc/default/nut=20=E2=86=92=20/?= =?UTF-8?q?etc/nut/nut.conf=20migration=20code,=20migration=20happends=20b?= =?UTF-8?q?efore=20squeeze=20release=20(Closes:=20#684392)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 4 ++- debian/nut-server.postinst | 63 -------------------------------------- debian/nut-server.preinst | 7 ----- 3 files changed, 3 insertions(+), 71 deletions(-) diff --git a/debian/changelog b/debian/changelog index b6331fb..75093d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,8 +12,10 @@ nut (2.6.4-3) UNRELEASED; urgency=low * Move nut metapackage to Section: metapackages * Also create nut user when installing nut-client package and do not delete it on purge anymore (Closes: #682000) + * Drop /etc/default/nut → /etc/nut/nut.conf migration code, migration + happends before squeeze release (Closes: #684392) - -- Laurent Bigonville Thu, 09 Aug 2012 21:18:03 +0200 + -- Laurent Bigonville Thu, 09 Aug 2012 21:32:09 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index 193676f..c2574b8 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -49,69 +49,6 @@ case "$1" in && udevadm trigger --subsystem-match=usb --action=change # 557178 udevadm trigger --subsystem-match=usb - - # migrate /etc/default/nut to /etc/nut/nut.conf (part #2) - if dpkg --compare-versions "$2" lt-nl "2.4.1-2" ; then - # source the temporary /etc/default/nut.bak file - if [ -f /etc/default/nut.bak ] ; then - . /etc/default/nut.bak - - # FIXME: use a template (and debconf to output?) - echo "migrating /etc/default/nut to /etc/nut/nut.conf" - - # pre process the config - case "$START_UPSD" in - y|Y|yes|YES|Yes) - START_UPSD=yes - ;; - *) - START_UPSD=no - ;; - esac - case "$START_UPSMON" in - y|Y|yes|YES|Yes) - START_UPSMON=yes - ;; - *) - START_UPSMON=no - ;; - esac - - # now process the result - if [ "x$START_UPSD" = "xyes" ] ; then - if [ "x$START_UPSMON" = "xyes" ] ; then - # can also be netserver - NUT_MODE=standalone - #else not processed since it should be an error! - fi - else - if [ "x$START_UPSMON" = "xyes" ] ; then - NUT_MODE=netclient - else - NUT_MODE=none - fi - fi - - # output back the MODE to nut.conf - sed "s/^MODE\(.*\)/MODE=$NUT_MODE/" /etc/nut/nut.conf > /etc/nut/nut.conf.new - - # append the content of default, removing START_* / start... - grep -iv 'START' /etc/default/nut.bak >> /etc/nut/nut.conf.new - # move back to nut.conf - mv /etc/nut/nut.conf.new /etc/nut/nut.conf - # and to init.d/nut - #if [ -f /etc/init.d/nut ] ; then - # sed "s/^UPSD_OPTIONS\(.*\)/UPSD_OPTIONS=\"$UPSD_OPTIONS\"/" /etc/init.d/nut > /etc/init.d/nut.new - # sed "s/^UPSMON_OPTIONS\(.*\)/UPSMON_OPTIONS=\"$UPSMON_OPTIONS\"/" /etc/init.d/nut.new > /etc/init.d/nut - #fi - rm -f /etc/default/nut.bak /etc/default/nut - fi - else - # re process nut.conf MODE so that it can be sourced - NUT_MODE=`grep -e '^ *MODE' /etc/nut/nut.conf | tr -d " "` - sed "s/^ *MODE.*/$NUT_MODE/" /etc/nut/nut.conf > /etc/nut/nut.conf.new - mv /etc/nut/nut.conf.new /etc/nut/nut.conf - fi ;; abort-upgrade) diff --git a/debian/nut-server.preinst b/debian/nut-server.preinst index 587c150..72370d5 100644 --- a/debian/nut-server.preinst +++ b/debian/nut-server.preinst @@ -5,13 +5,6 @@ if [ "$1" = upgrade ]; then [ -f /etc/udev/rules.d/025_nut-usbups.rules ] && rm -f /etc/udev/rules.d/025_nut-usbups.rules [ -f /etc/udev/rules.d/52_nut-usbups.rules ] && rm -f /etc/udev/rules.d/52_nut-usbups.rules [ -f /etc/udev/rules.d/52-nut-usbups.rules ] && rm -f /etc/udev/rules.d/52-nut-usbups.rules - - # migrate /etc/default/nut to /etc/nut/nut.conf (part #1) - # we need to do this before default gets trashed - if [ -f /etc/default/nut ] ; then - # backup /etc/default/nut - cp /etc/default/nut /etc/default/nut.bak - fi fi #DEBHELPER# From 04703f7239bae389cd5138801914af98c9050852 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 10 Aug 2012 21:06:18 +0200 Subject: [PATCH 092/300] Fix changelog entry --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 75093d1..99ad325 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,7 +13,8 @@ nut (2.6.4-3) UNRELEASED; urgency=low * Also create nut user when installing nut-client package and do not delete it on purge anymore (Closes: #682000) * Drop /etc/default/nut → /etc/nut/nut.conf migration code, migration - happends before squeeze release (Closes: #684392) + happends before squeeze release and this was against policy to have a + maintainer script modifying a conffile in the first place (Closes: #684392) -- Laurent Bigonville Thu, 09 Aug 2012 21:32:09 +0200 From 5d4e219ae8386040ad2c8b0c67af3bd0b57e1c88 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 11 Aug 2012 17:07:22 +0200 Subject: [PATCH 093/300] Add dependency against adduser and lsb-base on nut-client package --- debian/changelog | 3 ++- debian/control | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 99ad325..54fc67e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,8 +15,9 @@ nut (2.6.4-3) UNRELEASED; urgency=low * Drop /etc/default/nut → /etc/nut/nut.conf migration code, migration happends before squeeze release and this was against policy to have a maintainer script modifying a conffile in the first place (Closes: #684392) + * Add dependency against adduser and lsb-base on nut-client package - -- Laurent Bigonville Thu, 09 Aug 2012 21:32:09 +0200 + -- Laurent Bigonville Sat, 11 Aug 2012 17:06:27 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/control b/debian/control index b99fe5a..cd6b27e 100644 --- a/debian/control +++ b/debian/control @@ -59,7 +59,7 @@ Description: network UPS tools - core system Package: nut-client Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6) Provides: ups-monitor Conflicts: ups-monitor, nut-server (<< 2.6.3-1) Recommends: bash-completion From 6c856783433e9dfb4880f05521f61ab4c93b0714 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 11 Aug 2012 17:15:13 +0200 Subject: [PATCH 094/300] Fix typo in debian/nut-client.postinst --- debian/nut-client.postinst | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/nut-client.postinst b/debian/nut-client.postinst index fbcf657..9d5cad3 100644 --- a/debian/nut-client.postinst +++ b/debian/nut-client.postinst @@ -37,6 +37,7 @@ case "$1" in chown root:nut /var/run/nut chmod 770 /var/run/nut fi + ;; abort-upgrade) # do nothing From a7e6c2affcca412e5f9d8fb02725ec41866109a3 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 11 Aug 2012 17:21:01 +0200 Subject: [PATCH 095/300] Do not use dpkg-maintscript-helper to remove /etc/init.d/nut --- debian/changelog | 2 +- debian/control | 3 +-- debian/nut-server.maintscript | 3 --- debian/nut-server.postinst | 5 +++++ 4 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 debian/nut-server.maintscript diff --git a/debian/changelog b/debian/changelog index 54fc67e..9642eba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ nut (2.6.4-3) UNRELEASED; urgency=low * debian/rules: Stop the nut-client before nut-server on systems using static boot ordering (Closes: #679451) - * debian/nut-server.maintscript: Remove /etc/init.d/nut on upgrade + * debian/nut-server.postinst: Remove /etc/init.d/nut on upgrade (Closes: #677822) * Rename nut-server.lintian-overrides to nut-client.lintian-overrides and adjust overrides now that ups-monitor is shipped in nut-client package diff --git a/debian/control b/debian/control index cd6b27e..684855a 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Arnaud Quette Uploaders: Laurent Bigonville -Build-Depends: debhelper (>= 8.1.0~), +Build-Depends: debhelper (>= 8), cdbs (>= 0.4.90~), libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, @@ -45,7 +45,6 @@ Provides: nut-usb Conflicts: nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) Replaces: nut (<< 2.6.1-2~) Breaks: nut (<< 2.6.1-2~) -Pre-Depends: ${misc:Pre-Depends} Description: network UPS tools - core system Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and diff --git a/debian/nut-server.maintscript b/debian/nut-server.maintscript deleted file mode 100644 index 1d202d4..0000000 --- a/debian/nut-server.maintscript +++ /dev/null @@ -1,3 +0,0 @@ -#Removing obsolete init script. -#The file is gone in 2.6.3-2 but was not removed on upgrades. -rm_conffile /etc/init.d/nut 2.6.4-3~ diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index c2574b8..7952552 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -49,6 +49,11 @@ case "$1" in && udevadm trigger --subsystem-match=usb --action=change # 557178 udevadm trigger --subsystem-match=usb + + if dpkg --compare-versions "$2" le "2.6.4-2~" ; then + rm -f /etc/init.d/nut + update-rc.d nut remove >/dev/null + fi ;; abort-upgrade) From fa2376d331459513fa68b53c01e5a68fa5544493 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 11 Aug 2012 18:04:03 +0200 Subject: [PATCH 096/300] Be sure that client is stopped before the server also when using dependencies based boot --- debian/changelog | 4 +++- debian/nut-server.init | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9642eba..038abcf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,10 @@ nut (2.6.4-3) UNRELEASED; urgency=low happends before squeeze release and this was against policy to have a maintainer script modifying a conffile in the first place (Closes: #684392) * Add dependency against adduser and lsb-base on nut-client package + * Be sure that client is stopped before the server also when using + dependencies based boot - -- Laurent Bigonville Sat, 11 Aug 2012 17:06:27 +0200 + -- Laurent Bigonville Sat, 11 Aug 2012 18:02:59 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/nut-server.init b/debian/nut-server.init index 5505be4..a606b72 100644 --- a/debian/nut-server.init +++ b/debian/nut-server.init @@ -2,7 +2,7 @@ ### BEGIN INIT INFO # Provides: nut-server upsd # Required-Start: $local_fs $syslog $network $remote_fs udev -# Required-Stop: $local_fs $syslog $network $remote_fs udev nut-client +# Required-Stop: $local_fs $syslog $network $remote_fs udev # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Network UPS Tools initscript From b13692c4ba7c813641014d37bf5d37904d23524d Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 11 Aug 2012 19:36:11 +0200 Subject: [PATCH 097/300] Fix package descriptions (Closes: #678068) --- debian/changelog | 3 ++- debian/control | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 038abcf..a72c338 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,8 +18,9 @@ nut (2.6.4-3) UNRELEASED; urgency=low * Add dependency against adduser and lsb-base on nut-client package * Be sure that client is stopped before the server also when using dependencies based boot + * Fix package descriptions (Closes: #678068) - -- Laurent Bigonville Sat, 11 Aug 2012 18:02:59 +0200 + -- Laurent Bigonville Sat, 11 Aug 2012 19:35:49 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/control b/debian/control index 684855a..701d80a 100644 --- a/debian/control +++ b/debian/control @@ -35,7 +35,8 @@ Description: network UPS tools - metapackage through the server, and are notified whenever the power status changes. . - This package is a metapackage that install both nut-server and nut-client + This package is a metapackage that install both nut-server and nut-client, + in most cases it is sufficient for a basic UPS monitoring system. Package: nut-server Architecture: any @@ -53,8 +54,7 @@ Description: network UPS tools - core system changes. . This package provides NUT's core system, and the serial and USB UPS - drivers. In most cases it is sufficient for a basic UPS monitoring - system. + drivers. Package: nut-client Architecture: any From 37fc9173250e8d7920b5ecc0b954e5dd7ca3ffb3 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 11 Aug 2012 20:04:57 +0200 Subject: [PATCH 098/300] Also install /bin/upssched-cmd in nut-client package as this script is referenced in default upssched.conf config file --- debian/changelog | 4 +++- debian/nut-client.install | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a72c338..8ae5bba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,8 +19,10 @@ nut (2.6.4-3) UNRELEASED; urgency=low * Be sure that client is stopped before the server also when using dependencies based boot * Fix package descriptions (Closes: #678068) + * Also install /bin/upssched-cmd in nut-client package as this script is + referenced in default upssched.conf config file - -- Laurent Bigonville Sat, 11 Aug 2012 19:35:49 +0200 + -- Laurent Bigonville Sat, 11 Aug 2012 20:03:56 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/nut-client.install b/debian/nut-client.install index cde4bd7..b4b7d7f 100644 --- a/debian/nut-client.install +++ b/debian/nut-client.install @@ -4,6 +4,7 @@ debian/tmp/bin/upsrw debian/tmp/bin/upscmd debian/tmp/sbin/upsmon debian/tmp/sbin/upssched +debian/tmp/bin/upssched-cmd debian/tmp/etc/bash_completion.d/nut debian/tmp/etc/nut/nut.conf debian/tmp/etc/nut/upsmon.conf From d634a9971d9663abe10c6512ff85267cebd7fbfd Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 11 Aug 2012 21:02:26 +0200 Subject: [PATCH 099/300] debian/watch: Update watch file --- debian/changelog | 3 ++- debian/watch | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8ae5bba..87d600a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,8 +21,9 @@ nut (2.6.4-3) UNRELEASED; urgency=low * Fix package descriptions (Closes: #678068) * Also install /bin/upssched-cmd in nut-client package as this script is referenced in default upssched.conf config file + * debian/watch: Update watch file - -- Laurent Bigonville Sat, 11 Aug 2012 20:03:56 +0200 + -- Laurent Bigonville Sat, 11 Aug 2012 21:02:05 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/watch b/debian/watch index cfb143e..fd44637 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,2 @@ version=3 -http://www.networkupstools.org/source/2.4/nut-(.*)\.tar\.gz debian uupdate +http://www.networkupstools.org/source/([0-9.]+)/nut-(.*)\.tar\.gz From d518f66985b360d482d60ee239d0f3703e4ab139 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 12 Aug 2012 00:08:16 +0200 Subject: [PATCH 100/300] Be sure that all maintainer scripts are returning 0 at their end --- debian/changelog | 3 ++- debian/nut-cgi.postrm | 1 + debian/nut-client.postinst | 2 ++ debian/nut-server.postinst | 2 ++ debian/nut-server.postrm | 1 + debian/nut-server.preinst | 2 ++ 6 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 87d600a..d1952f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,8 +22,9 @@ nut (2.6.4-3) UNRELEASED; urgency=low * Also install /bin/upssched-cmd in nut-client package as this script is referenced in default upssched.conf config file * debian/watch: Update watch file + * Be sure that all maintainer scripts are returning 0 at their end - -- Laurent Bigonville Sat, 11 Aug 2012 21:02:05 +0200 + -- Laurent Bigonville Sun, 12 Aug 2012 00:07:46 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/nut-cgi.postrm b/debian/nut-cgi.postrm index bdfecf0..91be66d 100644 --- a/debian/nut-cgi.postrm +++ b/debian/nut-cgi.postrm @@ -44,3 +44,4 @@ esac #DEBHELPER# +exit 0 diff --git a/debian/nut-client.postinst b/debian/nut-client.postinst index 9d5cad3..8546a95 100644 --- a/debian/nut-client.postinst +++ b/debian/nut-client.postinst @@ -59,3 +59,5 @@ case "$1" in esac #DEBHELPER# + +exit 0 diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index 7952552..d0ec14b 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -76,3 +76,5 @@ case "$1" in esac #DEBHELPER# + +exit 0 diff --git a/debian/nut-server.postrm b/debian/nut-server.postrm index 1ca0437..b95b26f 100644 --- a/debian/nut-server.postrm +++ b/debian/nut-server.postrm @@ -47,3 +47,4 @@ esac #DEBHELPER# +exit 0 diff --git a/debian/nut-server.preinst b/debian/nut-server.preinst index 72370d5..f3e949f 100644 --- a/debian/nut-server.preinst +++ b/debian/nut-server.preinst @@ -8,3 +8,5 @@ if [ "$1" = upgrade ]; then fi #DEBHELPER# + +exit 0 From e25bc18d9646e83c2e278d4a0808797dd7e4fba0 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 12 Aug 2012 20:39:01 +0200 Subject: [PATCH 101/300] Release to unstable (2.6.4-2) --- debian/changelog | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index d1952f3..11dc6d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,13 @@ nut (2.6.4-3) UNRELEASED; urgency=low + * debian/control, debian/nut-ipmi.{install,manpages}: create IPMI + support package + * debian/nut-server.install: only install USB udev rules + + -- Arnaud Quette Fri, 08 Jun 2012 23:23:03 +0200 + +nut (2.6.4-2) unstable; urgency=low + * debian/rules: Stop the nut-client before nut-server on systems using static boot ordering (Closes: #679451) * debian/nut-server.postinst: Remove /etc/init.d/nut on upgrade @@ -24,15 +32,7 @@ nut (2.6.4-3) UNRELEASED; urgency=low * debian/watch: Update watch file * Be sure that all maintainer scripts are returning 0 at their end - -- Laurent Bigonville Sun, 12 Aug 2012 00:07:46 +0200 - -nut (2.6.4-2) unstable; urgency=low - - * debian/control, debian/nut-ipmi.{install,manpages}: create IPMI - support package - * debian/nut-server.install: only install USB udev rules - - -- Arnaud Quette Fri, 08 Jun 2012 23:23:03 +0200 + -- Laurent Bigonville Sun, 12 Aug 2012 20:38:52 +0200 nut (2.6.4-1) unstable; urgency=high From 8141cb729782a9dc5f01b07678252aa7aad97d3f Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 12 Aug 2012 22:18:54 +0200 Subject: [PATCH 102/300] Follow multi-arch policy --- debian/changelog | 6 +++++- debian/control | 6 ++++-- debian/libupsclient1-dev.install | 9 +++++---- debian/libupsclient1-dev.links | 1 - debian/libupsclient1.install | 2 +- debian/rules | 9 +++++++-- 6 files changed, 22 insertions(+), 11 deletions(-) delete mode 100644 debian/libupsclient1-dev.links diff --git a/debian/changelog b/debian/changelog index 11dc6d6..8918061 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,14 @@ nut (2.6.4-3) UNRELEASED; urgency=low + [ Arnaud Quette ] * debian/control, debian/nut-ipmi.{install,manpages}: create IPMI support package * debian/nut-server.install: only install USB udev rules - -- Arnaud Quette Fri, 08 Jun 2012 23:23:03 +0200 + [ Laurent Bigonville ] + * Follow multi-arch policy + + -- Laurent Bigonville Sun, 12 Aug 2012 22:18:36 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/control b/debian/control index 701d80a..431767f 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,8 @@ Section: admin Priority: optional Maintainer: Arnaud Quette Uploaders: Laurent Bigonville -Build-Depends: debhelper (>= 8), - cdbs (>= 0.4.90~), +Build-Depends: debhelper (>= 8.1.3), + cdbs (>= 0.4.93~), libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), @@ -166,6 +166,8 @@ Description: network UPS tools - documentation Package: libupsclient1 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same Description: network UPS tools - client library Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and diff --git a/debian/libupsclient1-dev.install b/debian/libupsclient1-dev.install index 3d6b952..144903a 100644 --- a/debian/libupsclient1-dev.install +++ b/debian/libupsclient1-dev.install @@ -1,4 +1,5 @@ -debian/tmp/lib/libupsclient.so -debian/tmp/lib/libupsclient.a -debian/tmp/usr/lib/pkgconfig/ -debian/tmp/usr/include +lib/*/libupsclient.so +usr/lib/*/libupsclient.so +lib/*/libupsclient.a +usr/lib/*/pkgconfig/ +usr/include diff --git a/debian/libupsclient1-dev.links b/debian/libupsclient1-dev.links deleted file mode 100644 index 0ac64c7..0000000 --- a/debian/libupsclient1-dev.links +++ /dev/null @@ -1 +0,0 @@ -/lib/libupsclient.so.1.1.0 /usr/lib/libupsclient.so diff --git a/debian/libupsclient1.install b/debian/libupsclient1.install index 7ba3ff0..132d81a 100644 --- a/debian/libupsclient1.install +++ b/debian/libupsclient1.install @@ -1 +1 @@ -debian/tmp/lib/libupsclient.so.* +lib/*/libupsclient.so.* diff --git a/debian/rules b/debian/rules index b0745bb..3dae758 100755 --- a/debian/rules +++ b/debian/rules @@ -14,7 +14,8 @@ DEB_CONFIGURE_PREFIX := DEB_CONFIGURE_SYSCONFDIR := /etc/nut DEB_CONFIGURE_INCLUDEDIR := /usr/include DEB_CONFIGURE_MANDIR := /usr/share/man -DEB_CONFIGURE_EXTRA_FLAGS := --without-ssl \ +DEB_CONFIGURE_EXTRA_FLAGS := --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ + --without-ssl \ --with-cgi \ --with-dev \ --enable-static \ @@ -25,7 +26,7 @@ DEB_CONFIGURE_EXTRA_FLAGS := --without-ssl \ --with-htmlpath=/usr/share/nut/www \ --with-pidpath=/var/run/nut \ --datadir=/usr/share/nut \ - --with-pkgconfig-dir=/usr/lib/pkgconfig \ + --with-pkgconfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \ --with-user=nut --with-group=nut ifeq (linux,$(DEB_HOST_ARCH_OS)) @@ -61,6 +62,10 @@ common-install-arch:: mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \ done + # Create -dev symlink under /usr + ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.1.1.0 \ + $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so + common-install-indep:: #install documentation mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf From 0d1e4a2dcc05c3457234635bf51319e87025a7f9 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 12 Aug 2012 23:14:24 +0200 Subject: [PATCH 103/300] Install systemd .service files (Closes: #679450) --- debian/changelog | 3 ++- debian/rules | 14 +++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8918061..464e9b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,9 @@ nut (2.6.4-3) UNRELEASED; urgency=low [ Laurent Bigonville ] * Follow multi-arch policy + * Install systemd .service files (Closes: #679450) - -- Laurent Bigonville Sun, 12 Aug 2012 22:18:36 +0200 + -- Laurent Bigonville Sun, 12 Aug 2012 23:14:05 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/rules b/debian/rules index 3dae758..42ddca7 100755 --- a/debian/rules +++ b/debian/rules @@ -30,7 +30,7 @@ DEB_CONFIGURE_EXTRA_FLAGS := --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --with-user=nut --with-group=nut ifeq (linux,$(DEB_HOST_ARCH_OS)) - DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev + DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev --with-systemdsystemunitdir=/lib/systemd/system endif # only build documentation if asciidoc is installed @@ -66,6 +66,18 @@ common-install-arch:: ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.1.1.0 \ $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so + # Install systemd files only on systems where it's supported +ifeq (linux,$(DEB_HOST_ARCH_OS)) + install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-monitor.service \ + $(CURDIR)/debian/nut-client/lib/systemd/system/nut-monitor.service + install -D $(CURDIR)/debian/tmp/lib/systemd/system-shutdown/nutshutdown \ + $(CURDIR)/debian/nut-server/lib/systemd/system-shutdown/nutshutdown + install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-driver.service \ + $(CURDIR)/debian/nut-server/lib/systemd/system/nut-driver.service + install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-server.service \ + $(CURDIR)/debian/nut-server/lib/systemd/system/nut-server.service +endif + common-install-indep:: #install documentation mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf From a1fa151fc70a843f2a17a2412633c8a979162724 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 12 Aug 2012 23:39:31 +0200 Subject: [PATCH 104/300] Imported Upstream version 2.6.5 --- ChangeLog | 315 ++ Makefile.am | 2 +- Makefile.in | 9 +- NEWS | 53 +- UPGRADING | 10 +- clients/Makefile.in | 7 + clients/upssched.c | 2 +- common/Makefile.in | 7 + conf/Makefile.in | 7 + configure | 4629 ++++++++++++++++++++++- configure.in | 46 +- data/Makefile.in | 7 + data/driver.list.in | 154 +- data/html/Makefile.in | 7 + docs/Makefile.am | 2 +- docs/Makefile.in | 9 +- docs/configure.txt | 10 +- docs/documentation.txt | 1 + docs/download.txt | 13 +- docs/images/eaton-logo.png | Bin 7998 -> 0 bytes docs/images/hostedby.png | Bin 0 -> 4006 bytes docs/images/simple.png | Bin 16662 -> 15992 bytes docs/man/Makefile.am | 16 +- docs/man/Makefile.in | 20 +- docs/man/apcsmart-old.8 | 4 +- docs/man/apcsmart.8 | 4 +- docs/man/bcmxcp.8 | 4 +- docs/man/bcmxcp_usb.8 | 4 +- docs/man/belkin.8 | 4 +- docs/man/belkinunv.8 | 6 +- docs/man/belkinunv.txt | 2 - docs/man/bestfcom.8 | 4 +- docs/man/bestfortress.8 | 4 +- docs/man/bestuferrups.8 | 4 +- docs/man/bestups.8 | 4 +- docs/man/blazer.8 | 4 +- docs/man/clone.8 | 4 +- docs/man/dummy-ups.8 | 4 +- docs/man/etapro.8 | 4 +- docs/man/everups.8 | 4 +- docs/man/gamatronic.8 | 4 +- docs/man/genericups.8 | 4 +- docs/man/hosts.conf.5 | 4 +- docs/man/isbmex.8 | 4 +- docs/man/ivtscd.8 | 4 +- docs/man/libupsclient-config.1 | 4 +- docs/man/liebert-esp2.8 | 4 +- docs/man/liebert.8 | 4 +- docs/man/macosx-ups.8 | 81 + docs/man/macosx-ups.txt | 104 + docs/man/masterguard.8 | 4 +- docs/man/metasys.8 | 4 +- docs/man/mge-shut.8 | 21 +- docs/man/mge-shut.txt | 7 +- docs/man/mge-utalk.8 | 4 +- docs/man/microdowell.8 | 4 +- docs/man/netxml-ups.8 | 4 +- docs/man/nut-ipmipsu.8 | 8 +- docs/man/nut-ipmipsu.txt | 4 +- docs/man/nut-recorder.8 | 4 +- docs/man/nut-scanner.8 | 6 +- docs/man/nut-scanner.txt | 10 +- docs/man/nut.conf.5 | 4 +- docs/man/nutscan.3 | 16 +- docs/man/nutscan.txt | 29 +- docs/man/nutscan_add_device_to_device.3 | 4 +- docs/man/nutscan_add_option_to_device.3 | 4 +- docs/man/nutscan_cidr_to_ip.3 | 4 +- docs/man/nutscan_display_parsable.3 | 4 +- docs/man/nutscan_display_ups_conf.3 | 4 +- docs/man/nutscan_free_device.3 | 4 +- docs/man/nutscan_init.3 | 4 +- docs/man/nutscan_new_device.3 | 4 +- docs/man/nutscan_scan_avahi.3 | 14 +- docs/man/nutscan_scan_avahi.txt | 15 +- docs/man/nutscan_scan_ipmi.3 | 4 +- docs/man/nutscan_scan_nut.3 | 4 +- docs/man/nutscan_scan_snmp.3 | 4 +- docs/man/nutscan_scan_usb.3 | 4 +- docs/man/nutscan_scan_xml_http.3 | 4 +- docs/man/nutupsdrv.8 | 4 +- docs/man/oneac.8 | 4 +- docs/man/optiups.8 | 4 +- docs/man/powercom.8 | 10 +- docs/man/powercom.txt | 12 +- docs/man/powerman-pdu.8 | 4 +- docs/man/powerpanel.8 | 4 +- docs/man/rhino.8 | 4 +- docs/man/richcomm_usb.8 | 4 +- docs/man/safenet.8 | 4 +- docs/man/skel.txt | 10 + docs/man/snmp-ups.8 | 4 +- docs/man/solis.8 | 4 +- docs/man/tripplite.8 | 4 +- docs/man/tripplite_usb.8 | 4 +- docs/man/tripplitesu.8 | 4 +- docs/man/ups.conf.5 | 4 +- docs/man/upsc.8 | 4 +- docs/man/upscli_connect.3 | 4 +- docs/man/upscli_disconnect.3 | 4 +- docs/man/upscli_fd.3 | 4 +- docs/man/upscli_get.3 | 4 +- docs/man/upscli_list_next.3 | 4 +- docs/man/upscli_list_start.3 | 4 +- docs/man/upscli_readline.3 | 4 +- docs/man/upscli_sendline.3 | 4 +- docs/man/upscli_splitaddr.3 | 4 +- docs/man/upscli_splitname.3 | 4 +- docs/man/upscli_ssl.3 | 4 +- docs/man/upscli_strerror.3 | 4 +- docs/man/upscli_upserror.3 | 4 +- docs/man/upsclient.3 | 4 +- docs/man/upscmd.8 | 4 +- docs/man/upscode2.8 | 4 +- docs/man/upsd.8 | 4 +- docs/man/upsd.conf.5 | 4 +- docs/man/upsd.users.5 | 4 +- docs/man/upsdrvctl.8 | 4 +- docs/man/upsimage.cgi.8 | 4 +- docs/man/upslog.8 | 4 +- docs/man/upsmon.8 | 4 +- docs/man/upsmon.conf.5 | 4 +- docs/man/upsrw.8 | 4 +- docs/man/upssched.8 | 4 +- docs/man/upssched.conf.5 | 4 +- docs/man/upsset.cgi.8 | 4 +- docs/man/upsset.conf.5 | 4 +- docs/man/upsstats.cgi.8 | 4 +- docs/man/upsstats.html.5 | 4 +- docs/man/usbhid-ups.8 | 4 +- docs/man/victronups.8 | 4 +- docs/new-clients.txt | 6 +- docs/new-drivers.txt | 2 +- docs/nut-names.txt | 45 +- docs/website/Makefile.am | 2 +- docs/website/Makefile.in | 9 +- docs/website/css/web-layout.css | 5 + docs/website/news.txt | 4 + docs/website/projects.txt | 16 +- docs/website/web-layout.conf | 20 +- drivers/Makefile.am | 21 +- drivers/Makefile.in | 258 +- drivers/apc-mib.c | 56 +- drivers/apcsmart.c | 193 +- drivers/belkinunv.c | 1 - drivers/blazer_usb.c | 3 +- drivers/eaton-mib.c | 114 +- drivers/eaton-mib.h | 2 + drivers/macosx-ups.c | 440 +++ drivers/main.c | 2 +- drivers/masterguard.c | 2 - drivers/metasys.c | 2 - drivers/mge-utalk.c | 1 - drivers/microdowell.c | 2 - drivers/netxml-ups.c | 4 +- drivers/nut-ipmipsu.c | 8 +- drivers/nut-libfreeipmi.c | 215 +- drivers/oneac.h | 4 + drivers/powercom-hid.c | 2 +- drivers/safenet.c | 2 - drivers/skel.c | 5 +- drivers/snmp-ups.c | 67 +- drivers/snmp-ups.h | 7 +- drivers/tripplitesu.c | 1 - drivers/usbhid-ups.c | 15 +- drivers/usbhid-ups.h | 2 + include/Makefile.in | 7 + include/config.h.in | 6 + lib/Makefile.in | 7 + m4/nut_check_libfreeipmi.m4 | 8 + m4/nut_check_libltdl.m4 | 30 + scripts/Makefile.in | 7 + scripts/augeas/Makefile.in | 7 + scripts/hal/Makefile.in | 7 + scripts/hal/ups-nut-device.fdi.in | 9 +- scripts/hotplug/Makefile.in | 7 + scripts/hotplug/libhid.usermap | 4 +- scripts/java/Makefile.in | 7 + scripts/python/Makefile.in | 7 + scripts/systemd/Makefile.in | 7 + scripts/systemd/nut-driver.service.in | 4 +- scripts/systemd/nutshutdown.in | 2 +- scripts/udev/Makefile.in | 7 + scripts/udev/nut-usbups.rules.in | 4 +- server/Makefile.am | 4 +- server/Makefile.in | 19 +- server/conf.c | 2 +- server/netcmds.h | 2 +- server/{ssl.c => netssl.c} | 4 +- server/{ssl.h => netssl.h} | 2 +- server/upsd.c | 2 +- tests/Makefile.am | 21 + tests/Makefile.in | 698 ++++ tests/cpputest.cpp | 44 + tests/example.cpp | 62 + tools/Makefile.in | 7 + tools/nut-scanner/Makefile.in | 7 + tools/nut-scanner/nut-scanner.c | 31 +- tools/nut-scanner/nutscan-snmp.h | 3 + tools/nut-scanner/nutscan-usb.h | 1 + tools/nut-scanner/scan_ipmi.c | 58 +- 201 files changed, 7974 insertions(+), 709 deletions(-) delete mode 100644 docs/images/eaton-logo.png create mode 100644 docs/images/hostedby.png create mode 100644 docs/man/macosx-ups.8 create mode 100644 docs/man/macosx-ups.txt create mode 100644 drivers/macosx-ups.c rename server/{ssl.c => netssl.c} (98%) rename server/{ssl.h => netssl.h} (96%) create mode 100644 tests/Makefile.am create mode 100644 tests/Makefile.in create mode 100644 tests/cpputest.cpp create mode 100644 tests/example.cpp diff --git a/ChangeLog b/ChangeLog index 398ebcc..79f040f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,318 @@ +2012-08-08 Arnaud Quette + + * [r3712] NEWS, UPGRADING, configure.in, docs/website/news.txt: + Final update for 2.6.5 release + * [r3711] drivers: Subversion ignored files completion + + Mark oldmge-shut binary as Subversion ignored (no functional + changes) + * [r3710] docs/configure.txt, m4/nut_check_libltdl.m4: Complete + libltdl configuration options + + Add configure options to add specific cflags + (--with-libltdl-includes) and libs (--with-libltdl-libs) for + libltdl. This serves at least to point at non standard location, + as on FreeBSD (reported by David Durieux) + +2012-08-06 Arnaud Quette + + * [r3708] docs/documentation.txt: Add a Wikipedia reference on + Solar controller + * [r3707] docs/Makefile.am, docs/images/eaton-logo.png, + docs/images/hostedby.png, docs/website/Makefile.am, + docs/website/css/web-layout.css, docs/website/web-layout.conf: + Free NUT from Eaton website hosting + + NUT is no more hosted by Eaton. Arnaud Quette (NUT project + leader) has taken over NUT hosting on his own, to give NUT back + some independance. 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 (http://arnaud.quette.fr) on Gandi servers, + using PaaS. This will allow more flexibility and automation of + the release process + +2012-08-06 Charles Lepple + + * [r3704] configure.in, docs/man/Makefile.am, + docs/man/macosx-ups.txt, drivers/Makefile.am, + drivers/macosx-ups.c: macosx-ups: new OS X Power Sources + meta-driver + + Mac OS X provides UPS status information in a format similar to + what is shown for laptop batteries. This driver will convert that + information into a format compatible with NUT. + +2012-08-05 Charles Lepple + + * [r3703] drivers/skel.c: Update comments in skel.c + + Fixed a typo, and added fatalx() as an alternative to + fatal_with_errno() + * [r3702] docs/man/skel.txt: Update skeleton driver man page. + +2012-08-03 Charles Lepple + + * [r3701] docs/man/nutscan.txt, docs/man/nutscan_scan_avahi.txt: + nutscan documentation: editing + +2012-07-31 Arnaud Quette + + * [r3699] docs/images/simple.png: Remove extraneous text + * [r3698] data/driver.list.in: Add support for UNITEK Alpha650ipF + and Alpha650ipE + + Add UNITEK Alpha650ipF and Alpha650ipE (USB ID 0x0f03:0x0001) to + the list of blazer_usb supported models (reported by Pascal + MIRALLES) + * [r3697] docs/website/projects.txt: Reference Buffalo NAS in + Related projects + + Add a reference in the Related projects, on Buffalo TerraStation + (Business-class) NAS range, which uses NUT for power protection + +2012-07-30 Arnaud Quette + + * [r3696] docs/download.txt, docs/website/news.txt: First NUT + virtualization package (VMware ESXI 5.0) + + Add the reference to the first NUT virtualization package. This + one is currently an external effort to add VMware NUT client for + ESXI 5.0. But this support will be part of NUT in the long run + +2012-07-24 Charles Lepple + + * [r3692] data/driver.list.in, docs/man/powercom.txt, + drivers/powercom-hid.c: Synchronize Powercom USB documentation + and code comments. + + Apparently, there are at least two different models with the USB + VID:PID of 0d9f:0004. This update is based on the following + report by Gordon Longland: + + http://lists.alioth.debian.org/pipermail/nut-upsuser/2012-July/007748.html + +2012-07-23 Charles Lepple + + * [r3689] docs/man/powercom.txt: powercom: Mention this driver is + serial only + +2012-07-20 Frederic Bohe + + * [r3688] data/driver.list.in, drivers/Makefile.am: Switch mge-shut + to oldmge-shut and newmge-shut to mge-shut + * [r3687] docs/man/mge-shut.txt: Update mge-shut man page for + notification argument. + * [r3686] drivers/usbhid-ups.c: Add a "notification" parameter to + newmge-shut driver. + + It is only here for compatibility with mge-shut driver. It is + ignored since we are always using SHUT_SYNC_OFF in libshut.c. + +2012-07-19 Frederic Bohe + + * [r3683] docs/man/mge-shut.txt: Add a note in man page about + ondelay parameter unit discrepency between newmge-shut and + mge-shut driver. + + mge-shut use a ten seconds unit for ondelay whereas newmge-shut + uses seconds. + * [r3682] drivers/usbhid-ups.c, drivers/usbhid-ups.h: Add a lowbatt + setting to newmge-shut in order to mimic mge-shut setting + +2012-07-19 Emilien Kia + + * [r3681] server/Makefile.am, server/conf.c, server/netcmds.h, + server/netssl.c, server/netssl.h, server/ssl.c, server/ssl.h, + server/upsd.c: Replace server/ssl.[h|c] by server/netssl.[h|c] in + order to prepare nss branch merging. + +2012-07-17 Arnaud Quette + + * [r3678] drivers/apc-mib.c: APC SNMP MIB update and completion + + Add available high precision values, new variables + (input.transfer.reason, battery.current.total and ups.test.date), + and move ambient.{temperature,humidity}.{high,low} to + ambient.1.*, since they relate to alarm threshold of external + probe 1 (patch from Hong-Gunn Chew) + * [r3677] docs/nut-names.txt: Clarify the use of multiple ambient + sensors + + Multiple sensors can be exposed using the indexed notation. + 'ambient.*', without index or using '0', relates to the embedded + sensor. For example: 'ambient.temperature' represent the embedded + sensor temperature. Other sensors (external, communication card, + ...) can use indexes from '1' to 'n'. For example: + 'ambient.1.temperature' for the first external sensor + temperature. + * [r3676] docs/nut-names.txt: NUT namespace completion + + Add two new variables 'ups.test.date' and + 'battery.current.total'. Also add a note on the 'ambient' + collection for supporting multiple sensors + +2012-07-16 Arnaud Quette + + * [r3675] drivers/nut-ipmipsu.c, drivers/nut-libfreeipmi.c, + m4/nut_check_libfreeipmi.m4, tools/nut-scanner/nut-scanner.c, + tools/nut-scanner/scan_ipmi.c: Support for FreeIPMI 1.1.x and + 1.2.x + + Prepare for supporting API changes in FreeIPMI 1.1.x and 1.2.x. + This is mostly related to SDR API simplifications. A 2nd + iteration will probably address code redundancy, whenever + possible + +2012-07-10 Arnaud Quette + + * [r3674] data/driver.list.in, drivers/eaton-mib.c, + drivers/eaton-mib.h, drivers/snmp-ups.c, drivers/snmp-ups.h: Add + support for Eaton ePDU Switched (Pulizzi) + + Implement support for older Eaton / Powerware ePDU Switched. + These were once sold as Pulizzi, and have now been replaced by + newer model (Eaton Marlin implementation and others) + +2012-07-09 Emilien Kia + + * [r3672] configure.in: Fix CppUnit detection. + + Fix inconsistent test for CppUnit install (using pkg-config) to + really enable unit tests. + +2012-07-05 Arnaud Quette + + * [r3671] docs/man/nut-ipmipsu.txt: Fix an error on possible power + supplies status + +2012-07-04 Arnaud Quette + + * [r3670] clients/upssched.c: Fix upssched regression + + Coverity branch merge r3555 introduced a regression: 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 (patch from Oliver Schonefeld) + * [r3669] Makefile.am, configure.in, tests, tests/Makefile.am: Add + basic infrastructure for unit tests + + Merge eki-unittests branch, with some adjustments, to add a basic + initial infrastructure for unit tests, using CppUnit (v1.9.6+) + (from Emilien Kia, from Eaton) + +2012-07-03 Arnaud Quette + + * [r3668] scripts/systemd/nut-driver.service.in, + scripts/systemd/nutshutdown.in: Fix upsdrvctl call path + + upsdrvctl is located in @driverexecdir@, not @SBINDIR@ (reported + by Michal Hlavinka, from Redhat) + +2012-06-15 Arnaud Quette + + * [r3666] configure.in: Adapt systemd installation directory #2 + + Complete commit r3665, by also adapting paths for service files + +2012-06-14 Arnaud Quette + + * [r3665] configure.in: Adapt systemd installation directory + + Adapt systemd installation directory for the shutdown script, so + that it does not try to install it in the actual system + directory, but to the pointed build directory, including a sub + directory prefix + * [r3664] docs/new-clients.txt: Fix broken link to upscli_*(3) HTML + manual pages + +2012-06-12 Arnaud Quette + + * [r3662] docs/new-drivers.txt: Forgotten mention + + upsdrv_info_t->name is also published as "driver.name" variable + * [r3661] docs/man/belkinunv.txt, drivers/belkinunv.c, + drivers/main.c, drivers/masterguard.c, drivers/metasys.c, + drivers/mge-utalk.c, drivers/microdowell.c, + drivers/nut-ipmipsu.c, drivers/safenet.c, drivers/tripplitesu.c, + drivers/usbhid-ups.c: Remove redundant driver.version.internal + publication + * [r3660] configure.in, docs/configure.txt, + docs/man/nut-scanner.txt: Add missing references to libltdl for + nut-scanner + + nut-scanner requires libltdl (Libtool dlopen abstraction) since + NUT 2.6.3. Documentations have been completed, and nut-scanner + build status is now exposed in the build configuration summary + * [r3659] drivers/snmp-ups.c: Fix publication of + driver.version.data + + Publish the MIB name and version in driver.version.data, rather + than merged into driver.version.internal + * [r3658] drivers/netxml-ups.c: Fix publication of + driver.version.data + + netxml-ups subdriver version is to be tracked in + driver.version.data, not in driver.version.internal + * [r3657] docs/nut-names.txt: Add missing variable + driver.version.data + + Add variable driver.version.data, to track version of the + internal data mapping, for generic drivers (reported by Luiz + Angelo Daros de Luca) + * [r3656] docs/nut-names.txt: Fix comment for + driver.version.internal + + Drivers internal version are always tracked separately, and + stored in driver.version.internal + +2012-06-11 Michal Soltys + + * [r3655] drivers/apcsmart.c: apcsmart: tcsetattr/tcgetattr + addendum + + This small patch moves the comparison sequence into separate + function. No functional changes. + + Also minor retab! run on defines. + +2012-06-11 Arnaud Quette + + * [r3654] data/driver.list.in: Add support for REDi Blazer + + Add REDi Blazer 400VA / 600VA / 800VA to the list of blazer_ser + supported models (reported by Marius Gavrilescu) + * [r3653] docs/nut-names.txt: Fix a typo error on power.minimum + description + + power.minimum is really the minimum seen apparent power in VA + (reported by Luiz Angelo Daros de Luca) + +2012-06-07 Arnaud Quette + + * [r3652] data/driver.list.in, drivers/blazer_usb.c: Add support + for Online Zinto A + + Add Online Zinto A (USB ID 0x06da:0x0601) to the list of + blazer_usb supported models (reported by Carsten Burkhardt) + +2012-06-07 Charles Lepple + + * [r3651] drivers/oneac.h: Remove unused constants to fix LLVM + compilation error. + +2012-06-05 Arnaud Quette + + * [r3650] docs/website/news.txt, docs/website/projects.txt: WMNut + updates + + Update WMNut release (0.64) and hosting URL + +2012-06-04 Arnaud Quette + + * [r3647] docs/download.txt, docs/website/news.txt: Update Windows + package publications for 2.6.4-1 + 2012-05-31 Arnaud Quette * [r3643] NEWS, UPGRADING, configure.in, docs/website/news.txt: diff --git a/Makefile.am b/Makefile.am index f9e3cd9..4e95530 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I m4 # subdirectories to build and distribute. The order matters, as # several subdirectories depend on stuff in "common" or tools being built first SUBDIRS = include common clients conf data tools docs drivers \ - lib scripts server + lib scripts server tests # COPYING is included automatically. EXTRA_DIST = LICENSE-GPL2 LICENSE-GPL3 MAINTAINERS UPGRADING diff --git a/Makefile.in b/Makefile.in index ac24401..ded4605 100644 --- a/Makefile.in +++ b/Makefile.in @@ -145,6 +145,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -248,6 +254,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -312,7 +319,7 @@ ACLOCAL_AMFLAGS = -I m4 # subdirectories to build and distribute. The order matters, as # several subdirectories depend on stuff in "common" or tools being built first SUBDIRS = include common clients conf data tools docs drivers \ - lib scripts server + lib scripts server tests # COPYING is included automatically. diff --git a/NEWS b/NEWS index 0fd98a7..606d0c2 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,55 @@ If you're upgrading from an earlier version, see the UPGRADING file. For a complete list of changes, please refer to the ChangeLog file. +--------------------------------------------------------------------------- +Release notes for NUT 2.6.5 - what's new since 2.6.4: + + - This release Fix 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. + Arnaud Quette (NUT project leader) has taken over NUT hosting on his own, + to give NUT back some independance. + 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 + (http://arnaud.quette.fr) on Gandi servers, using PaaS. This will allow + more flexibility and automation of the release process + + - macosx-ups: new OS X Power Sources meta-driver + Mac OS X provides UPS status information in a format similar to + what is shown for laptop batteries. This driver will convert that + information into a format compatible with NUT (Charles Lepple). + + - support for new devices: + Eaton ePDU Switched + Online Zinto A (USB ID 0x06da:0x0601) + REDi Blazer 400VA / 600VA / 800VA + UNITEK Alpha650ipF and Alpha650ipE (USB ID 0x0f03:0x0001) + + - mge-shut driver has been replaced by a new implementation (newmge-shut). + In case of issue with this new version, users can revert to oldmge-shut. + + - First NUT virtualization package: NUT now supports integration with + VMware ESXI 5.0, through a native VIB package. This is, for the time + being, an external effort from René Garcia (refer to the Download section + on NUT website). But work is underway to improve this integration, and + include it in the NUT source tree + + - IPMI support (nut-ipmipsu driver and nut-scanner): prepare for supporting + API changes in upcoming FreeIPMI versions 1.1.x and 1.2.x. + + - snmp-ups now supports high precision values for APC, and more variables + + - the NUT variables and commands namespace has been fixed and + completed, with the known and used variables that were missing. + + - more bugfixes, cleanup and improvements, on both source code and + documentation. + --------------------------------------------------------------------------- Release notes for NUT 2.6.4 - what's new since 2.6.3: @@ -168,10 +217,10 @@ Release notes for NUT 2.6.3 - what's new since 2.6.2: progress. - Compilation on IBM Aix has been fixed (namespace conflict with ctypes). - + - more bugfixes, cleanup and improvements, on both source code and documentation. - + --------------------------------------------------------------------------- Release notes for NUT 2.6.2 - what's new since 2.6.1: diff --git a/UPGRADING b/UPGRADING index d00143d..d748583 100644 --- a/UPGRADING +++ b/UPGRADING @@ -7,11 +7,19 @@ 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.4 to 2.6.5 +--------------------------- + +- users are encouraged to update to NUT 2.6.5, to fix a regression in +upssched. +- mge-shut driver has been replaced by a new implementation (newmge-shut). +In case of issue with this new version, users can revert to oldmge-shut. + Changes from 2.6.3 to 2.6.4 --------------------------- - users are encouraged to update to NUT 2.6.4, to fix upsd vulnerability -(CVE-2012-2944: upsd can be remotely crashed) +(CVE-2012-2944: upsd can be remotely crashed). - users of the bestups driver are encouraged to switch to blazer_ser, since bestups will soon be deprecated. diff --git a/clients/Makefile.in b/clients/Makefile.in index 48e0dae..65fd3f2 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -204,6 +204,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -307,6 +313,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/clients/upssched.c b/clients/upssched.c index 675a3d0..97b3ed4 100644 --- a/clients/upssched.c +++ b/clients/upssched.c @@ -694,7 +694,7 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2) snprintfcat(buf, sizeof(buf), " \"%s\"", pconf_encode(arg2, enc, sizeof(enc))); - snprintfcat(enc, sizeof(enc), "%s\n", buf); + snprintf(enc, sizeof(enc), "%s\n", buf); /* see if the parent needs to be started (and maybe start it) */ diff --git a/common/Makefile.in b/common/Makefile.in index 9ccd162..541366c 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -110,6 +110,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -213,6 +219,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/conf/Makefile.in b/conf/Makefile.in index be4cd06..41bd2ed 100644 --- a/conf/Makefile.in +++ b/conf/Makefile.in @@ -115,6 +115,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -218,6 +224,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/configure b/configure index 68b465c..cb2801d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for nut 2.6.4. +# Generated by GNU Autoconf 2.68 for nut 2.6.5. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nut' PACKAGE_TARNAME='nut' -PACKAGE_VERSION='2.6.4' -PACKAGE_STRING='nut 2.6.4' +PACKAGE_VERSION='2.6.5' +PACKAGE_STRING='nut 2.6.5' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -674,15 +674,13 @@ WITH_HOTPLUG_FALSE WITH_HOTPLUG_TRUE HAVE_SYSTEMD_FALSE HAVE_SYSTEMD_TRUE -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG WITH_PKG_CONFIG_FALSE WITH_PKG_CONFIG_TRUE SOME_DRIVERS_FALSE SOME_DRIVERS_TRUE WITH_DEV_FALSE WITH_DEV_TRUE +CXXCPP OTOOL64 OTOOL LIPO @@ -717,6 +715,8 @@ WITH_WRAP_FALSE WITH_WRAP_TRUE WITH_SSL_FALSE WITH_SSL_TRUE +WITH_MACOSX_FALSE +WITH_MACOSX_TRUE WITH_FREEIPMI_FALSE WITH_FREEIPMI_TRUE WITH_IPMI_FALSE @@ -733,9 +733,22 @@ WITH_USB_FALSE WITH_USB_TRUE WITH_SERIAL_FALSE WITH_SERIAL_TRUE +HAVE_CPPUNIT_FALSE +HAVE_CPPUNIT_TRUE +CPPUNIT_LIBS +CPPUNIT_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG LIBOBJS RANLIB AR +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE @@ -866,11 +879,14 @@ with_ipmi with_freeipmi with_freeipmi_includes with_freeipmi_libs +with_macosx_ups with_ssl with_ssl_includes with_ssl_libs with_wrap with_libltdl +with_libltdl_includes +with_libltdl_libs with_cgi with_gd_includes with_gd_libs @@ -907,9 +923,15 @@ LDFLAGS LIBS CPPFLAGS CPP +CXX +CXXFLAGS +CCC PKG_CONFIG PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR' +PKG_CONFIG_LIBDIR +CPPUNIT_CFLAGS +CPPUNIT_LIBS +CXXCPP' # Initialize some variables set by options. @@ -1452,7 +1474,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nut 2.6.4 to adapt to many kinds of systems. +\`configure' configures nut 2.6.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1523,7 +1545,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nut 2.6.4:";; + short | recursive ) echo "Configuration of nut 2.6.5:";; esac cat <<\_ACEOF @@ -1589,6 +1611,8 @@ Optional Packages: include flags for the FreeIPMI library [--with-freeipmi-libs=LIBS] linker flags for the FreeIPMI library + --with-macosx_ups build and install Mac OS X Power Sources meta-driver + (auto) --with-ssl enable SSL development code (auto) [--with-ssl-includes=CFLAGS] include flags for the OpenSSL library @@ -1596,6 +1620,10 @@ Optional Packages: --with-wrap enable libwrap (tcp-wrappers) support (auto) --with-libltdl enable libltdl (Libtool dlopen abstraction) support (auto) + [--with-libltdl-includes=CFLAGS] + include flags for the libltdl library + [--with-libltdl-libs=LIBS] + linker flags for the libltdl library --with-cgi build and install the CGI programs (no) [--with-gd-includes=CFLAGS] include flags for the gd library @@ -1637,11 +1665,18 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path + CPPUNIT_CFLAGS + C compiler flags for CPPUNIT, overriding pkg-config + CPPUNIT_LIBS + linker flags for CPPUNIT, overriding pkg-config + CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1709,7 +1744,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nut configure 2.6.4 +nut configure 2.6.5 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1958,6 +1993,44 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_compile +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -2170,11 +2243,94 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nut $as_me 2.6.4, which was +It was created by nut $as_me 2.6.5, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3244,7 +3400,7 @@ fi # Define the identity of the package. PACKAGE='nut' - VERSION='2.6.4' + VERSION='2.6.5' cat >>confdefs.h <<_ACEOF @@ -5734,6 +5890,390 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # 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'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + 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. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } @@ -6530,6 +7070,212 @@ fi + + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPPUNIT" >&5 +$as_echo_n "checking for CPPUNIT... " >&6; } + +if test -n "$CPPUNIT_CFLAGS"; then + pkg_cv_CPPUNIT_CFLAGS="$CPPUNIT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cppunit") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CPPUNIT_LIBS"; then + pkg_cv_CPPUNIT_LIBS="$CPPUNIT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cppunit") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cppunit" 2>&1` + else + CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cppunit" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CPPUNIT_PKG_ERRORS" >&5 + + have_cppunit=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_cppunit=no +else + CPPUNIT_CFLAGS=$pkg_cv_CPPUNIT_CFLAGS + CPPUNIT_LIBS=$pkg_cv_CPPUNIT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_cppunit=yes +fi +if test "${have_cppunit}" != "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcppunit not found." >&5 +$as_echo "$as_me: WARNING: libcppunit not found." >&2;} +fi + if test "${have_cppunit}" = "yes"; then + HAVE_CPPUNIT_TRUE= + HAVE_CPPUNIT_FALSE='#' +else + HAVE_CPPUNIT_TRUE='#' + HAVE_CPPUNIT_FALSE= +fi + + if ( test "${GCC}" = "yes" ) then CFLAGS="${CFLAGS} -Wall -Wsign-compare" @@ -8740,6 +9486,121 @@ else fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_sdr_cache_ctx_destroy" >&5 +$as_echo_n "checking for library containing ipmi_sdr_cache_ctx_destroy... " >&6; } +if ${ac_cv_search_ipmi_sdr_cache_ctx_destroy+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_sdr_cache_ctx_destroy (); +int +main () +{ +return ipmi_sdr_cache_ctx_destroy (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_sdr_cache_ctx_destroy=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_ipmi_sdr_cache_ctx_destroy+:} false; then : + break +fi +done +if ${ac_cv_search_ipmi_sdr_cache_ctx_destroy+:} false; then : + +else + ac_cv_search_ipmi_sdr_cache_ctx_destroy=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_sdr_cache_ctx_destroy" >&5 +$as_echo "$ac_cv_search_ipmi_sdr_cache_ctx_destroy" >&6; } +ac_res=$ac_cv_search_ipmi_sdr_cache_ctx_destroy +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + nut_have_freeipmi_11x_12x=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_sdr_ctx_destroy" >&5 +$as_echo_n "checking for library containing ipmi_sdr_ctx_destroy... " >&6; } +if ${ac_cv_search_ipmi_sdr_ctx_destroy+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_sdr_ctx_destroy (); +int +main () +{ +return ipmi_sdr_ctx_destroy (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_sdr_ctx_destroy=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_ipmi_sdr_ctx_destroy+:} false; then : + break +fi +done +if ${ac_cv_search_ipmi_sdr_ctx_destroy+:} false; then : + +else + ac_cv_search_ipmi_sdr_ctx_destroy=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_sdr_ctx_destroy" >&5 +$as_echo "$ac_cv_search_ipmi_sdr_ctx_destroy" >&6; } +ac_res=$ac_cv_search_ipmi_sdr_ctx_destroy +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + nut_have_freeipmi_11x_12x=yes +else + nut_have_freeipmi_11x_12x=no +fi + + if test "${nut_have_freeipmi}" = "yes"; then nut_with_ipmi="yes" nut_ipmi_lib="(FreeIPMI)" @@ -8751,6 +9612,12 @@ $as_echo "#define HAVE_FREEIPMI 1" >>confdefs.h LIBIPMI_LIBS="${LIBS}" fi + if test "${nut_have_freeipmi_11x_12x}" = "yes"; then + +$as_echo "#define HAVE_FREEIPMI_11X_12X 1" >>confdefs.h + + fi + if test "${nut_have_freeipmi_monitoring}" = "yes"; then $as_echo "#define HAVE_FREEIPMI_MONITORING 1" >>confdefs.h @@ -9149,6 +10016,121 @@ else fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_sdr_cache_ctx_destroy" >&5 +$as_echo_n "checking for library containing ipmi_sdr_cache_ctx_destroy... " >&6; } +if ${ac_cv_search_ipmi_sdr_cache_ctx_destroy+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_sdr_cache_ctx_destroy (); +int +main () +{ +return ipmi_sdr_cache_ctx_destroy (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_sdr_cache_ctx_destroy=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_ipmi_sdr_cache_ctx_destroy+:} false; then : + break +fi +done +if ${ac_cv_search_ipmi_sdr_cache_ctx_destroy+:} false; then : + +else + ac_cv_search_ipmi_sdr_cache_ctx_destroy=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_sdr_cache_ctx_destroy" >&5 +$as_echo "$ac_cv_search_ipmi_sdr_cache_ctx_destroy" >&6; } +ac_res=$ac_cv_search_ipmi_sdr_cache_ctx_destroy +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + nut_have_freeipmi_11x_12x=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ipmi_sdr_ctx_destroy" >&5 +$as_echo_n "checking for library containing ipmi_sdr_ctx_destroy... " >&6; } +if ${ac_cv_search_ipmi_sdr_ctx_destroy+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ipmi_sdr_ctx_destroy (); +int +main () +{ +return ipmi_sdr_ctx_destroy (); + ; + return 0; +} +_ACEOF +for ac_lib in '' freeipmi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ipmi_sdr_ctx_destroy=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_ipmi_sdr_ctx_destroy+:} false; then : + break +fi +done +if ${ac_cv_search_ipmi_sdr_ctx_destroy+:} false; then : + +else + ac_cv_search_ipmi_sdr_ctx_destroy=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ipmi_sdr_ctx_destroy" >&5 +$as_echo "$ac_cv_search_ipmi_sdr_ctx_destroy" >&6; } +ac_res=$ac_cv_search_ipmi_sdr_ctx_destroy +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + nut_have_freeipmi_11x_12x=yes +else + nut_have_freeipmi_11x_12x=no +fi + + if test "${nut_have_freeipmi}" = "yes"; then nut_with_ipmi="yes" nut_ipmi_lib="(FreeIPMI)" @@ -9160,6 +10142,12 @@ $as_echo "#define HAVE_FREEIPMI 1" >>confdefs.h LIBIPMI_LIBS="${LIBS}" fi + if test "${nut_have_freeipmi_11x_12x}" = "yes"; then + +$as_echo "#define HAVE_FREEIPMI_11X_12X 1" >>confdefs.h + + fi + if test "${nut_have_freeipmi_monitoring}" = "yes"; then $as_echo "#define HAVE_FREEIPMI_MONITORING 1" >>confdefs.h @@ -9230,6 +10218,57 @@ fi +# Check whether --with-macosx_ups was given. +if test "${with_macosx_ups+set}" = set; then : + withval=$with_macosx_ups; nut_with_macosx_ups="${withval}" +else + nut_with_macosx_ups="auto" + +fi + + +if test "${nut_with_macosx_ups}" != no; then + if test -d /System/Library/Frameworks/IOKit.framework/ ; then + nut_with_macosx_ups="yes" + else + nut_with_macosx_ups="no" + fi +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Mac OS X meta-driver" >&5 +$as_echo_n "checking whether to build Mac OS X meta-driver... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_macosx_ups} ${nut_macosx_ups_lib}" >&5 +$as_echo "${nut_with_macosx_ups} ${nut_macosx_ups_lib}" >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature + fi + echo "build Mac OS X meta-driver: ${nut_with_macosx_ups} ${nut_macosx_ups_lib}" >> conf_nut_report_feature + + + if test "${nut_with_macosx_ups}" = "yes"; then + WITH_MACOSX_TRUE= + WITH_MACOSX_FALSE='#' +else + WITH_MACOSX_TRUE='#' + WITH_MACOSX_FALSE= +fi + + if test "${nut_with_macosx_ups}" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define WITH_MACOSX 1 +_ACEOF + + fi + + + + # Check whether --with-ssl was given. if test "${with_ssl+set}" = set; then : withval=$with_ssl; nut_with_ssl="${withval}" @@ -9610,6 +10649,46 @@ if test -z "${nut_have_libltdl_seen}"; then LIBS_ORIG="${LIBS}" LIBS="" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libltdl cflags" >&5 +$as_echo_n "checking for libltdl cflags... " >&6; } + +# Check whether --with-libltdl-includes was given. +if test "${with_libltdl_includes+set}" = set; then : + withval=$with_libltdl_includes; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-libltdl-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libltdl ldflags" >&5 +$as_echo_n "checking for libltdl ldflags... " >&6; } + +# Check whether --with-libltdl-libs was given. +if test "${with_libltdl_libs+set}" = set; then : + withval=$with_libltdl_libs; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-libltdl-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } + for ac_header in ltdl.h do : ac_fn_c_check_header_compile "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default @@ -9737,6 +10816,16 @@ _ACEOF fi + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature + fi + echo "build nut-scanner: ${nut_with_libltdl}" >> conf_nut_report_feature + + # Check whether --with-cgi was given. @@ -13594,6 +14683,17 @@ done +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + + + # Set options @@ -17571,6 +18671,3212 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec_CXX='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + + + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_CXX='' + fi + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + + else + ld_shlibs_CXX=no + fi + + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + + gnu*) + ;; + + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_CXX=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + ld_shlibs_CXX=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -18218,9 +22524,10 @@ if test "${with_systemdsystemunitdir+set}" = set; then : fi if test -n "${systemdsystemunitdir}"; then - systemdsystemshutdowndir="/lib/systemd/system-shutdown" + systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${systemdsystemunitdir}" >&5 $as_echo "using ${systemdsystemunitdir}" >&6; } + systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -18513,7 +22820,7 @@ _ACEOF -ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutscan.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf scripts/java/Makefile 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/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile Makefile" +ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile docs/website/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutscan.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/hal/Makefile scripts/hal/ups-nut-device.fdi scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf scripts/java/Makefile 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/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile tests/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18648,7 +22955,15 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_CPPUNIT_TRUE}" && test -z "${HAVE_CPPUNIT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CPPUNIT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_SERIAL_TRUE}" && test -z "${WITH_SERIAL_FALSE}"; then as_fn_error $? "conditional \"WITH_SERIAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -18681,6 +22996,10 @@ if test -z "${WITH_FREEIPMI_TRUE}" && test -z "${WITH_FREEIPMI_FALSE}"; then as_fn_error $? "conditional \"WITH_FREEIPMI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WITH_MACOSX_TRUE}" && test -z "${WITH_MACOSX_FALSE}"; then + as_fn_error $? "conditional \"WITH_MACOSX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_SSL_TRUE}" && test -z "${WITH_SSL_FALSE}"; then as_fn_error $? "conditional \"WITH_SSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -19154,7 +23473,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nut $as_me 2.6.4, which was +This file was extended by nut $as_me 2.6.5, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19220,7 +23539,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nut config.status 2.6.4 +nut config.status 2.6.5 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -19479,6 +23798,61 @@ enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_sub enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' @@ -19557,7 +23931,39 @@ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ -striplib; do +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +reload_flag_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_flag_spec_ld_CXX \ +hardcode_libdir_separator_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" @@ -19587,7 +23993,18 @@ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do +sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX \ +postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" @@ -19618,6 +24035,8 @@ fi + + _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -19676,6 +24095,7 @@ do "server/Makefile") CONFIG_FILES="$CONFIG_FILES server/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "tools/nut-scanner/Makefile") CONFIG_FILES="$CONFIG_FILES tools/nut-scanner/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -20417,7 +24837,7 @@ $as_echo X"$file" | # The names of the tagged configurations supported by this script. -available_tags="" +available_tags="CXX " # ### BEGIN LIBTOOL CONFIG @@ -20805,6 +25225,20 @@ file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + # ### END LIBTOOL CONFIG _LT_EOF @@ -20997,6 +25431,163 @@ fi (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + ;; esac diff --git a/configure.in b/configure.in index 2bcf7df..ed2d3e8 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ 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.4) +AC_INIT(nut, 2.6.5) AC_CONFIG_SRCDIR(server/upsd.c) AC_CONFIG_MACRO_DIR([m4]) echo "Network UPS Tools version ${PACKAGE_VERSION}" @@ -89,6 +89,7 @@ AC_PROG_CC dnl Needed for per-target flags AM_PROG_CC_C_O AC_PROG_CPP +AC_PROG_CXX AC_PROG_INSTALL AC_PROG_EGREP AC_PATH_PROG(AR, ar) @@ -113,6 +114,19 @@ AC_CHECK_FUNCS(vsnprintf snprintf, [], [ AC_REPLACE_FUNCS(setenv strerror atexit) + +dnl +dnl Tests for CppUnit availability and usability +dnl Using CppUnit implies C++ support! +dnl Theoretically, libcppunit-dev will pull up to g++, through libstdc++... +dnl AM_PATH_CPPUNIT(1.9.6) + +PKG_CHECK_MODULES(CPPUNIT, cppunit, have_cppunit=yes, have_cppunit=no) +if test "${have_cppunit}" != "yes" ; then + AC_MSG_WARN([libcppunit not found.]) +fi +AM_CONDITIONAL(HAVE_CPPUNIT, test "${have_cppunit}" = "yes") + dnl dnl Only use these when compiling with gcc dnl @@ -415,6 +429,25 @@ AM_CONDITIONAL(WITH_FREEIPMI, test "${nut_with_freeipmi}" = "yes") dnl AM_CONDITIONAL(WITH_OPENIPMI, test "${nut_with_openipmi}" = "yes") +dnl ---------------------------------------------------------------------- +dnl The Mac OS X meta-driver looks at IOKit Power Sources keys managed by +dnl the internal USB UPS driver. +dnl +dnl FIXME: be slightly more clever here: + +NUT_ARG_WITH([macosx_ups], [build and install Mac OS X Power Sources meta-driver], [auto]) +if test "${nut_with_macosx_ups}" != no; then + if test -d /System/Library/Frameworks/IOKit.framework/ ; then + nut_with_macosx_ups="yes" + else + nut_with_macosx_ups="no" + fi +fi + +NUT_REPORT_FEATURE([build Mac OS X meta-driver], + [${nut_with_macosx_ups}], [${nut_macosx_ups_lib}], + [WITH_MACOSX], [Define to enable Mac OS X meta-driver]) + dnl ---------------------------------------------------------------------- dnl Check for --with-ssl @@ -482,6 +515,10 @@ fi NUT_REPORT_FEATURE([enable libltdl (Libtool dlopen abstraction) support], [${nut_with_libltdl}], [], [WITH_LIBLTDL], [Define to enable libltdl (Libtool dlopen abstraction) support]) +dnl Explicitely report if we are building nut-scanner or not +dnl since it requires libltdl +NUT_REPORT([build nut-scanner], [${nut_with_libltdl}]) + dnl ---------------------------------------------------------------------- dnl checks related to --with-cgi @@ -945,9 +982,13 @@ AC_ARG_WITH([systemdsystemunitdir], ;; esac ], []) +dnl Override installation directory, with the local installation +dnl prefix. This is needed for 'distcheck*' targets, otherwise +dnl files will try to get intalled to the actual system directories if test -n "${systemdsystemunitdir}"; then - systemdsystemshutdowndir="/lib/systemd/system-shutdown" + systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" AC_MSG_RESULT(using ${systemdsystemunitdir}) + systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`" else AC_MSG_RESULT(no) fi @@ -1143,6 +1184,7 @@ AC_OUTPUT([ server/Makefile tools/Makefile tools/nut-scanner/Makefile + tests/Makefile Makefile ]) diff --git a/data/Makefile.in b/data/Makefile.in index 0bd3feb..345e102 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -151,6 +151,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -254,6 +260,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/data/driver.list.in b/data/driver.list.in index b305b92..64d1815 100644 --- a/data/driver.list.in +++ b/data/driver.list.in @@ -199,16 +199,16 @@ "Cyclades" "pdu" "1" "PM8" "8 outlets" "powerman-pdu (experimental)" "Cyclades" "pdu" "1" "PM10" "10 outlets" "powerman-pdu (experimental)" -"Dell" "ups" "5" "Tower 500W LV / HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 1500W LV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 2300W LV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "Serial port" "newmge-shut" -"Dell" "ups" "5" "Rack 5600W HV" "Serial port" "newmge-shut" +"Dell" "ups" "5" "Tower 500W LV / HV" "Serial port" "mge-shut" +"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "Serial port" "mge-shut" +"Dell" "ups" "5" "Rack/Tower 1500W LV" "Serial port" "mge-shut" +"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "Serial port" "mge-shut" +"Dell" "ups" "5" "Rack/Tower 2300W LV" "Serial port" "mge-shut" +"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "Serial port" "mge-shut" +"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, Serial port" "mge-shut" +"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "Serial port" "mge-shut" +"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "Serial port" "mge-shut" +"Dell" "ups" "5" "Rack 5600W HV" "Serial port" "mge-shut" "Dell" "ups" "5" "Tower 500W LV / HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack/Tower 1500W LV" "USB port" "usbhid-ups" @@ -251,17 +251,17 @@ "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" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "EX 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "5 PX" "Serial port" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" -"Eaton" "ups" "5" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" +"Eaton" "ups" "5" "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" +"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "EX 700/1000/1500 VA" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or oldmge-shut" +"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" "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" @@ -273,7 +273,8 @@ "Eaton" "ups" "5" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" "Eaton" "ups" "5" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)" "Eaton" "ups" "5" "various models (serial mode)" "Management Card Contact (ref 66104)" "mge-shut or mge-utalk" -"Eaton" "pdu" "5" "ePDU Managed" "" "snmp-ups (experimental)" +"Eaton" "pdu" "5" "ePDU Managed" "" "snmp-ups" +"Eaton" "pdu" "5" "ePDU Switched" "" "snmp-ups" "Eaton" "pdu" "5" "ePDU Monitored" "" "snmp-ups or netxml-ups" "Eaton" "ups" "5" "Powerware 9130" "" "bcmxcp or usbhid-ups" "Eaton" "ups" "5" "Powerware 9140" "" "bcmxcp or usbhid-ups" @@ -353,8 +354,8 @@ "HP" "ups" "4" "R3000 XR" "" "bcmxcp" "HP" "ups" "4" "R5500 XR" "" "bcmxcp" "HP" "ups" "3" "T500 / T750" "older models, USB port" "bcmxcp_usb" -"HP" "ups" "3" "R/T3000" "Serial port" "mge-shut or newmge-shut" -"HP" "ups" "3" "R5000 / R7000" "Serial port" "mge-shut or newmge-shut" +"HP" "ups" "3" "R/T3000" "Serial port" "mge-shut or oldmge-shut" +"HP" "ups" "3" "R5000 / R7000" "Serial port" "mge-shut or oldmge-shut" "HP" "ups" "3" "T750 INTL" "" "usbhid-ups" "HP" "ups" "3" "T1000 INTL" "" "usbhid-ups" "HP" "ups" "3" "T1500 INTL" "" "usbhid-ups" @@ -492,15 +493,15 @@ "MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups" "MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups" "MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "ups" "5" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut" -"MGE Office Protection Systems" "ups" "5" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut" +"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or oldmge-shut" "MGE Office Protection Systems" "ups" "5" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" "MGE Office Protection Systems" "ups" "5" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" "MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" @@ -548,45 +549,45 @@ "MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "USB" "usbhid-ups" "MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "USB" "usbhid-ups" "MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups" -"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 Serial" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 Serial" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse S" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium S" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "Serial cable" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C / EX RT" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Esprit" "" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "Serial port" "mge-shut or newmge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "Serial port" "mge-shut or newmge-shut or mge-utalk" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C" "" "mge-shut or newmge-shut or mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 Serial" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 Serial" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse S" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium S" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C / EX RT" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Esprit" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "Serial port" "mge-shut or oldmge-shut or mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C" "" "mge-shut or oldmge-shut or mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Pulsar ES+" "" "mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV+" "" "mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Pulsar SV" "" "mge-utalk" @@ -598,7 +599,7 @@ "MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme" "" "mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Comet EXtreme" "" "mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk" -"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or newmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or oldmge-shut" "MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)" "MGE UPS SYSTEMS" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" "MGE UPS SYSTEMS" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" @@ -677,6 +678,7 @@ "Oneac" "ups" "1" "ON2000XIU" "advanced interface" "oneac" "Online" "ups" "1" "P-Series" "" "genericups upstype=14" +"Online" "ups" "2" "Zinto A" "" "blazer_usb" "Online" "ups" "1" "Zinto D" "" "optiups" "Online" "ups" "2" "Yunto YQ450" "" "blazer_usb" @@ -704,7 +706,7 @@ "Powercom" "ups" "4" "Imperial" "" "powercom" "Powercom" "ups" "5" "Imperial" "USB (2009 models, product id: 00a2)" "usbhid-ups (experimental)" "Powercom" "ups" "4" "Vanguard" "" "blazer_ser" -"Powercom" "ups" "5" "Vanguard" "USB (2009 models, product id: 00a5)" "usbhid-ups (experimental)" +"Powercom" "ups" "5" "Vanguard" "USB (2009 models, product id: 0004 or 00a5)" "usbhid-ups (experimental)" "Powercom" "ups" "4" "WOW" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" "Powercom" "ups" "5" "WOW" "USB (2009 models, product id: 00a4)" "usbhid-ups (experimental)" "Powercom" "ups" "4" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" @@ -767,6 +769,8 @@ "Raritan" "pdu" "3" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)" "Raritan" "pdu" "3" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)" +"REDi" "ups" "2" "Blazer 400VA / 600VA / 800VA" "" "blazer_ser" + "Repotec" "ups" "1" "RPF525/625/800/1000" "" "safenet" "Repotec" "ups" "1" "RPT-800A" "" "genericups upstype=13" "Repotec" "ups" "1" "RPT-162A" "" "genericups upstype=13" @@ -852,6 +856,8 @@ "UNITEK" "ups" "2" "Alpha 1000is" "" "blazer_ser" "UNITEK" "ups" "2" "Alpha 500" "" "blazer_ser" "UNITEK" "ups" "2" "Alpha 500 ipE" "" "blazer_ser" +"UNITEK" "ups" "2" "Alpha650ipF" "USB" "blazer_usb" +"UNITEK" "ups" "2" "Alpha650ipE" "USB" "blazer_usb" "UNITEK" "ups" "2" "Alpha 2600" "" "blazer_ser" "UNITEK" "ups" "2" "Alpha 1200Sx" "USB" "blazer_usb" "UNITEK" "ups" "2" "Alpha 1250xD" "USB" "blazer_usb" diff --git a/data/html/Makefile.in b/data/html/Makefile.in index 49fc9f7..a0d4b60 100644 --- a/data/html/Makefile.in +++ b/data/html/Makefile.in @@ -110,6 +110,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -213,6 +219,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/docs/Makefile.am b/docs/Makefile.am index 6521b3b..e4948fd 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,5 +1,5 @@ IMAGE_FILES = images/asciidoc.png \ - images/eaton-logo.png \ + images/hostedby.png \ images/nut_layering.png \ images/nut-logo.png \ images/note.png \ diff --git a/docs/Makefile.in b/docs/Makefile.in index 5f04658..aa3b75c 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -124,6 +124,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -227,6 +233,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -285,7 +292,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ IMAGE_FILES = images/asciidoc.png \ - images/eaton-logo.png \ + images/hostedby.png \ images/nut_layering.png \ images/nut-logo.png \ images/note.png \ diff --git a/docs/configure.txt b/docs/configure.txt index 1450ce5..bb3b02d 100644 --- a/docs/configure.txt +++ b/docs/configure.txt @@ -122,6 +122,10 @@ and use HAL support. Build and install Avahi support, to publish NUT server availability using mDNS protocol. + --with-libltdl (default: auto-detect) + +Enable libltdl (Libtool dlopen abstraction) support. +This is required to build nut-scanner. Other configuration options --------------------------- @@ -331,14 +335,16 @@ or higher installed properly. The gdlib-config script will be detected and used by default in that situation. --with-ssl-includes, --with-usb-includes, --with-snmp-includes, - --with-neon-includes, --with-powerman-includes="-I/foo/bar" + --with-neon-includes, --with-libltdl-includes, + --with-powerman-includes="-I/foo/bar" If your system doesn't have pkg-config and support for any of the above libraries isn't found (but you know it is installed), you must specify the compiler flags that are needed. --with-ssl-libs, --with-usb-libs, --with-snmp-libs, - --with-neon-libs, --with-powerman-libs="-L/foo/bar -labcd -lxyz" + --with-neon-libs, --with-libltdl-libs + --with-powerman-libs="-L/foo/bar -labcd -lxyz" If your system doesn't have pkg-config and support for any of the above libraries isn't found (but you know it is installed), you must specify the diff --git a/docs/documentation.txt b/docs/documentation.txt index 8e84b4d..280f945 100644 --- a/docs/documentation.txt +++ b/docs/documentation.txt @@ -46,6 +46,7 @@ These are general information about UPS and PDU. - link:http://tldp.org/HOWTO/UPS-HOWTO/[UPS HOWTO] (The Linux Documentation Project) - link:http://en.wikipedia.org/wiki/Uninterruptible_power_supply[UPS on Wikipedia] - link:http://en.wikipedia.org/wiki/Power_distribution_unit[PDU on Wikipedia] +- link:http://en.wikipedia.org/wiki/Solar_controller[Solar controller on Wikipedia] - link:http://www.pcguide.com/ref/power/ext/ups/over.htm[UPS on The PC Guide] These are writeups by users of the software. diff --git a/docs/download.txt b/docs/download.txt index 33c6edf..306bf2a 100644 --- a/docs/download.txt +++ b/docs/download.txt @@ -115,7 +115,7 @@ 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.3-3.msi[Windows MSI installer 2.6.3-3] +link:http://www.networkupstools.org/source/2.6/NUT-Installer-2.6.4-1.msi[Windows MSI installer 2.6.4-1] Java packages @@ -126,3 +126,14 @@ link:http://www.networkupstools.org/package/java/jNut-0.2-SNAPSHOT.tar.gz[jNUT 0 - NUT Java Web support (client side using REST, Beta) link:http://www.networkupstools.org/package/java/jNutWebAPI-0.2-SNAPSHOT-src.tar.gz[jNutWebAPI 0.2-SNAPSHOT (sources)] + +Virtualization packages +----------------------- + +VMware +~~~~~~ + +- 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] diff --git a/docs/images/eaton-logo.png b/docs/images/eaton-logo.png deleted file mode 100644 index f297295a89ac54e7c6368c0198b175cc83e67bf0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7998 zcmaKxRZJX!lg4+E#ht~y#fxhx?!{e-yR%4fTih2YrMMO?ZpGc9xKrHSU9Y*PyX5}& zFf+-Q%+pLJlkXR)q9lWXN`eXi05CqwN~-;K2pQD6cjuGJ#|Bw#Ia|FF*$WtBiQDp`NMSdbs+QFOvzv4SxZg#PfxYhegHj;%V%JQfGv7AVam8RgY7!5e@mpfBB0-W`GG111_hUTXNx0!b0NYRW8 zeX2I8AxU-ZEohaH-`;KfQeN|}9vE+F?Supb-NmXuJMDRcC8t7N>(T(?;r*S*e3(E; zaxTF_3ks1-e5p`w_2!3d{{~D{cL+315QmB^MS(7b--hZ;&?7+UzTd&|1m2ZCt3 z`SS_++^%0@7D=KWWv4WEqEx(m;=3|zokQbV!PQ^pCv6lJ6@&Jy9UTd7ZH^XbxEZQi zQGG>2|MvHmolnj)&=a8-x*4KAQXX z6E?F;2J$ml)Xa$)9)e%P2vIq}P;nN(xGmE`*3|XN`~k;^McY-D1=r z_&S5lZw@-GXgSViIqCb<#JZBWbQDYZ6qRgV zF+wR6lN`x5fRey_?HE99XUUO*L)F4DajI*f?g{KC$?k+%5kO12X3T~y8sI!Zw_)pD zpA}9Z?oioy!vod~fU6CGEVv^0S4*fVY?$lGWE>4ESNyh>mYLCU8kRaX^J7^#5bbm)N$+q|3fK{anI>7}dhwx&D8cA7FM{w}$rL5;Ghu@^+LN?tKG#Q5*{ zE-4;2^^5uamUsT%-<@DlOIV3k0wwg>f+t$Ss9|Uvn7Z3bS4C7?TOK}N?bMm{PN{<< z5)xAnTj)fLLYUQoWcoMg_@`@doLI{99HC$AIQF}i_XT1jiFkK@{NkF^_$4Z}0PnfN~y^P>&Y z-kw%^pw9Iq7D_xW@ufW8nM1KPZ5f2H+z4B;ze&cV0WIO-%Q&KrIV(X!9%pELOmREOs_!(FQJ8RGO^M;;n&^YMB$nB*u6&*%dR)~MNM zXWjG+bT}|kq7;E=6NVEiT0>M5>OgU4Nzsm6<6;&WNS?cD?)&29QI#xbz%lRqpK^#K z5kfxbSGYRI8v&r3Z<$ZUKB??J{Thwb{N50m8PUsZphrgi@ z#XT?X$m)azIt|6Gb%j0YD{F?)!w{3QDW@n8f2xSzM^sk;dRZ(!2-l31uieYY^px?n z!;3f=CUuxUX=DiRHh)%=+xXGZfz{sj6jbu+ zBCniEhsRk)eU%;j+OX;@73g^}d15g2Z#NS|7KTp0-m@oWi$wRewBrm_bL-~phifFW zRbFaJoadm3zZwDFUz{~g?yI&|q~5X5CBJKH-oJ!Aj;A4Y1=AyE{p6yh-{P>};B1gV zmEDnJ_>=(ZZ#FIRlf*Cf3BL``0ZLRU{Xqu_5m23e#}BqMFagbMXSfC%#)d&t7y{EK zv9X6U9tNzbeedgu9mRyE!_t^Er02tL@6v^hR8+JXiUSllgBZI`ynit_19-e-GCYtk zVOMpG>XX5`MCjh8=$jQPX32$T_M@UrG>Wr4gIn3s%r>^Jjl z4WRgijLDKxgTK1}Wk{7qF*IX2xzm9Xsiv0fh)%=eWvIdqW?8z5qSt zbzf0tKl^tw6>p>*LgH`$2M5EoBy{4Qwjj>zRnjWmiYoTo3R>Y~7SDr(3MXYOyKfII z^xvR(-$EvI59HuFmyYY+)kZH2PF55Q+_?*|Ck$6ArUveqM0;HGM@h+jdpQZn5#YnP z(=?bsN5rRCUfHr8cPvuSW%sm(>zdL(or1V{_@hrI?tVN;h44_==6^@(5L1r#>Dyrz zmm>+-!&5qw8iLDS?MVpw3~k`zzGi@`5YPtPu`(>QY=o5yg(F?ydHVX5*a3!K-I;rr zFNu2+)7V;FMn(^a*BHkCpiJbmgj=Hx(mzb4&0RGXHlVcKyj3-N{u?8oGeLKgOiboHeK2 zB-(O$sTEQ|T0ioeF9eZCX(?Z3O5?A?!QzE|CB)a)VLhdk!DW#4!!Jf&NDdLHUZe

    ORZxA?NldtLPo3^-!A@E~$s+dVy345)Tx7dFwS9Chp~12;HSa&KHB{=1C| z#scwtjT0VC+Iqb@(n+V7D33G4n;4RI^OeU3Ftb~z;}5z=dji7zL?v#zc1#$x z)vaFrfX~?Wuc$FEwAh4YkC-EOWa@Y67*qhO_)YV#jrW9QGj7I{*Agh>>?5C}7Mlb>dPR(H z*%I(E^z|oA3YQrekSNZ+Owpia>3tE_-pV^3amQF<+`@<}B(a+Ls@EHtik9fXzwo@<(9Y zE=&qnJL{6`*E1x^sg%xAB@V4yCY*ZWzJ42Lp5k0)XuQugJEL~(rATrp471LoVF$?) z)Ji39-_sy_5w zjKvUe%pDjXnc)d!h|3w$nlp&bE@lUrt3^R|pw8n?_W>=9*Ksdu&z?*LbG_D;i%+%J zOeVDVW1V6Lf6t7%t?9y%nu?HCMh@O~5u25AbyC2X{qYz*eX#SToPMlA_r)v4H+z+b zX~~*w(|06_Q&$xXTR{(gYGc&W^lWeO_u6>t`&{IJot zU9ceB0~k^5`)f_q%-LtvoWGMTuwwO{MVU7u2Hzg_2D#Fg+?SUD5lTWJs9x z8-8brVTR^dxO1z@Hq-&!LMwuG2Ibr~P)1-A0v)G9@QOUjzJQW7bZCA%vZ=OTd&KZE~HI)qY#HF%`BrVVsP-`&~T7QH@Xia`M za7{GxhU~M?16>$%80T^@<>Xy`u)&mWXKML5wc67(?y^_E$QZ3_jwQFe`#!yToP(iw zltzZ2Jl7edZTor(PO`dhC`B%>WC%GC3FPo0SqZ=AW>xqH0P-ab|bHT2h0pX8b|D2(gB;PrHOf88308)su>C0I4iNKa=jDKA$< z#>5mp+1fJ0L`8)w*Yd%$tX@Wy`zWJ7(SFy8^?R-3{7QX!f9E^1XI6G-Hf-ZUazz|3 zXJt4_vVp&y>D#gI2tMO`QAggVhs#$C&(7I)87ST`ykE{JT(Qto zrajw=MgGT(ut(%YirGMnU8q@$>j*ZaTS%FQ*QOLb;# z4ZIwHy<>T-I6&)MQX^oBd(G2xs_P8SgiUM=nqf_^-$`Q^4He#?G+Q$6NOaMWTHRhg zZU#Sc#^q+3>mOfoV>m-mSz0j2xjq;{Nl=O&!74Y`V%(5c0%~B^4pGSX4`@s)pxn`^Yfge#5+bA zh=mjujc0j!ylE2}cIZ3W<-$8MW)UEBM}aH$PrsabhK#PQ=&E|PoNE0(t1=&A^m@55 z+o;`_pEiNW%47KfKuw%T;T!^BVALOFrq@&5Rzspwqh9IzXhS2)M*o*&v{A$G7g5fA zqJ=a+D$7U9;!kUFBg&Z}cPbK!tAJI@!by1if`JVlS!V`OhAunu{&9GRn0t0);xxwA zt<0&JB&%@o%^v2l0zWR!nwdkkxYSzmVJvi@fs!D4+a4OL-zbf5*u}j%{Es^uL6M+O zuamOE{$upZad!S#Kj=_2_TC2@nG1_}53M0qx|*&)8ZQ&^9)y@%KdyDOvnJj>aXeYu z4i}xhSp_N;-GvsfRRjq$4m3$rvIKoI+nPWleklB9u};3LBdp29hsMU3_gFC;CCwft zy2iM+>81zZB;-qDHiC{nirjz3bIHFiV;eHBxw5gbK^w~!p*)ry2gV}W0tc)G-~1B_ zF*>hA`p&S{_XzJZmmlDsS$obX;|(`oB^uv^UN8eMR!h{2Hs{K8Yb9wCxHU92CvW1g z*#9WqS?S(^gq)etv3N6>Nt;jJKI=T7h*S8E`+WZ8V zW=svW8cWRxkGoAQfyAWgzl+fswqcGl5_HB^O2}hpW`=4dezr5K@S5%OGoJrR>{AD!P%oZkE%EKyS_cuBXoYCvBfKR1ZtT6E99~9Xst=h86iIY(^O)X%Cm`b`HbXhK{yymN4N;EOVb_z)YwT zH#-)PC-W0Gf6{tbI)2eh)8F1XGf}oje(iDg^h#5S!jwCj{+iD32AC#AW((V4og!> zyVz9yf?0H;de~OlALZLT$`OFWU(_2#!O-m0wm_8M>vd1sTte~|5Vt>tgbd^!XoIey zP$dl()N*nuv&8PNJUP@3$xfSxU#1Oy(D=g0l!yw(zdK?Gp2Zq}0|c}H0+=oHslI3w z|3*AT3xVzru}RE$t_MHvIUSq{VLpC~dlBMqqWeJCQQRmUr7wc)`!0%#<|DaWT^k2wBjH1pm|3wf~gYE!hJMBC-fdZ)?p$#13X6-acmF~< zgeWl5=Ks0>?yG_T>Pi)u^zYo~BC1InM$O_~BO`Bau{v1?TIo7*7IJV;)us*fyDCDj zLvPZM>BcKR$BO6oMh=QM`qO}5Jpiw}q?A->esM9o@t5b$j4LhfK_0JQD)(W6;?ZcC zky3a!Q7&$+#~{_c$gWGox*Co=B)9}7{nihn^hc?&V$Ro++jo1WUCQZ*JP$8H!9JQ^ zpb%YJ-6zw@krZ|nNcRE_jPm!n^8NAy86*I%-iGl$L^T@*D;4!&VoFcss( zEgc>i3E(pyjGs+`NYHo(=}5ZjO-&Wc1q-za^8+T_}-u-`x-aJ)$M&DSU?QZ)l1T< zjU;LG3U6u&4mcpsx(hS%<$bT+{D$;T@DQ9Tl)p&PP(yb?_1(t4k2S;B%kPQdL4We&7OcZhXYR;UuRW z2NgwE=94#$$Vv894k!I*(*}l8dDMK}bZsFt;f2A+VQc=&ez|q?T2-5iP0?yqxHCcn z5FOh2MbZ5ChgVJYtCE@{#N1B=fJq1UjXytLj<3aX{`h6ZnxbT`SW{Z&WV6QtJ;Rq zPs))+^IO6ktE;p9*C_T`J$=zt_IPi5=i|BoD>~S9 z#$&o``$@GtJ1ym}Ys2|H7xX7*(DO$~&uE5iIy zP3ZFaa#dz1)vD-$zgei|@A(q4JE*6y_tbB`@9%?NNDk%{h?4Q)6G8W4;*>@yTnkTX zar=hwIEu~YxpFP!nQ4;Ut`0IRDn>~3Z6+kyQ1O$0AJo*A!=r(J*9%oPx#24YJ`L;z&~QUH9O8ib1g000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyn- z3knC+?eHN0000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000jGNklty|il@a&d$#K@y8!! z=Id4ml6ko*t;g6qbfHn>`T!_%RfM022B4vFeR?`}Dd9;^9%mvms7+7Dt|($|0+5#a zkf8k$xOqChQf|PYp4$2^%eHy1eT5uvUr*xB^<=G_j7OP7pN+-R+KhJA=31{eHEW8E zoz)xF*MkQSaB*=aH#diR_3Bk$!|wDy0zgid5=G2Sd{#~*<54C{X88lqpkX~ylkRil zY64@YeN5Q#DE4m;rk%ApX{iq}s3X&QRZf^K@j(nghf{#%ar4jk(2)MPpFr zs+c=zH91*I+F6?u5qzOserc%>k+0mV<&m6_#@J~e6A^qt%U2O|lc0TP7(L13jp`~T zB?T83XFNU4dG^fmwdJbC;;Bbp8~nDja_Y zX=iPYsaaD1P9OaRfHNneEA-f?h**@lDx%LSG#$;%ghq|)W7nq>`?m*^lcmJjz4sf@ z#l?#k88EbF*gCrYJ^^993=|-Rf%C{;u}iiBDqx_F(pJ4+g-~%LP+&6IRXJ z#_j7#FUk(G*Lrno(tUhqZe;TzUq(;zAYj8`Vj|-C;qF52x`ht3wnM8;uQ*Wit8iO!unhr7EQ+qMnE-Mu3P1!}fz`4xpCu>6Wu z8Fk9d$rEqICyKc_d7>za;^T+U#9Q%+CCc22PZVQ+y&*n+_^ibJdx`1dt@uRoUSj$y z@?O68_~A1#_SYM)$Ssy#eE(K_;wxR$dDlwN1tlKiGLpZww)BmdCV18`fSy9&c6#GAt9oH zflS=HdxTh&zf@Egt`G&apZMN;EyZKUj#X$_T>!Np)WqQa1cr`sX6Ptq?e*WK$MEoQ zJchWldA&13T-zYz=bU2kgoOMfZAL^yFw|o(8&>qg!_^$2AP@EPv~K+`eDdk1NF>s7 zWoQ>qRq3%kdh}qf&pfiTv)R3S7Yi3IptVICJUxe3xks+{^TXV{HH()lp|eewH?F71 z$VfZ}yR+K2JHrOGL|u@Fj*bK!iIj&KDh?mL!G)N>O7V~s8@4JEK*L6jaByo))p78<54vts#j-m~pWE7KNCoic@s7cbJQr#(Ho+o2W&&YnGsthOHG$BjcR2>AK= zA*-#&^&2>eY1V+=-s{Jy^STEm_&ws09I8Z9N9Lx?*i*MMvun6c!bg;3liB zhf1a5=FJ;;3>i$l`t{4?QW;s5NeYF6p+nqRInRcVU0a~e&qK&pYCU%IwkwFD1pkfx z?AQ@N{PpV;snxI5Yn2;Ttro~tD)~L_cXsaB0f2ey)~E%6MGF@&f1VFrY;9TS`yH1r zU*?1N2jbx9$W?`cw6rurLqh;K8*v7;AaL@;ajZIYpsl4P0Rh`ty7)W1Cr)Iv*BF*9 zStx~EPN9u`Jt8yl`F6kNJ^ zi3`!ud^Kyfrv9#7WM^kHeaaNA{6hy0;x%Th<|nRh-551`3}xw{Z$Agkh|;hTefv2u zY2t)3xoq9Cr9xR1Vfxf5+_`;+@BIx3kNlmk*7fLW-GI&=>LHWqp(D|yX@gq04KTs| zgH}jt)kaw$!Ew+&a&mIYY_H1aSo@wmnZL*veSH~5Mn;%4Yo=Xc*3zwoAin5@Mb96= z%-o!gojUR3?p?%Py-GmfZYF;@0iSQ@pjNAKb03Ua5XjET#>~td{~vw;ATu))BO@cN zyao-7DtvYkv0N_2=TIsm>vfp$XMD8w%efstz>il`ywYQ?RMO%v00w21$k(``F zSZFA*u?jvN?#aOe2efTVq|yrci6Rwpsf?`hQah^-%$>iG%W>EF^@@V+fxBsAVZq@3 z4bhhtA{44LsUV*`rHT>bLr6@O;=g$-B06RAem)edtIT6XQG9LtbLRRWlj#$5^a#Nx zkK^Jxh($}5Vrcjd9}XJCvcb-k-&9XpUph6<3K@=z|5EwP<0=HB2 zICS(V4UCLl+oq0OE*G8MJ*YwT!NzrK`Q^ADdzZ9AM_LO>Ej`re@%j8aTu-jezMqa^ z+Op+q>z_V)SmUup>YB(?b%7uV?Aj5){7(%u-m0sns7SzjX##PH`s_J$7?b8LDzup{ zKz>1CwRy00t5&do&n^T(VCA}v^z763tuTnSc?%o|zR!luub#P@G=2;bp&?vP`n^Iq zXF@}e6r|(W$q1o9g}O-K%hmU}k|1N}zWp?9*1S^o(ipa|`WQCg2RY46TQc>l*;ur< zs#e@8_BOFhzQtj_$~?>N9ozZTQHofgqEIa|ZDS@^lIyZLa5qg`m{wXJ&po#2jXv;` zjK_TMJD)hk6?D*{Q&(H&ELcq4QU|f@-)##(V!~afdVdZ;_g=k8yLS&AiG;mDr^#2T zIC5Yw#||ApU#5?<>qoc`8;;DtfIOx0wRy!D^FJO4YBd1|j&kMVuYBqC8H0ul<6GaQ z>$E`;Fe9;_3Fcir50@~{kJf4!dR?3+u-%ZBxX(+OH9;xrhhY!Mva?L zs8;jS!F_DqxQ;KT%|u5cLB3`cI#MZvJx7$Arwu&xABcRdAL;4oL`D9rIiYYNiu}St z&P9Y_-o^rxmaXt#yNaDZY~sVgL+RATmZJyua^lEg4uohbz@9(`_tL}g9VuULDd1{)GuCe1Mx&-C|Fw;D0Sb%W>~_cFlaaKs zY)|Z^7_ME>9C3M&p8iU^ox62^zPD|l{odZXBQAr7QOxtyu_GvRbMafe@Ws4zIv7_E z&vNsM(aT`~^0j`PKX;axsPnXK-+{ZgZV(@Lm1~MvKKtBT(@xM)nl^92^lukv!kld_ z@&05ONA~Y6lUMPOTUey#=dcjkShiz?m*yaT_^FemrX-cCXO$|ClShAIzmFla19FIa zXv(V1TQO>6{HN^mk3^o9%$>!Rm}tgL{y%KG*)e<4_!4o=vf@3(dGFM#SE5{QZVo2R zTk!S5r2yn)XHoZgney_A(YRT2+E}(Hf`C+4 z7qL`Ko0nourFp%~TPl$viZApkkw_~1y*51f1f5$KvGt_DwMVU3u}Mz-zYxv(M-H>y zijPB2uQvKJ8K;9ZXNU_63My4sDwUSF?(H~$`)R*(>B4yuZr^17jLAfV1Xq|>LWa{o z;uWz-BvQKA^}y!6?p%w#Osm!wv@~!1TvmS`q^GfV=_0~T2C;tmcj(JxxD56vlUE7( z{Rfi#+g-M9Sk0~<{7Fgrt-|LFJ#mc0v?AgknXzKyR_Zq}`b#?hM-H=%pE`qGTQ>2Z z@0ap{y9dTinv$B5^rvKfHueizwQfW3k%Qb%OJjiRM~t2@xx&1c(Wn0ac5GUYRmYCV z3=HUI-;47RVf5`k@WmqQ%W3HA%QzPnLe$R@^mgdagqgE3e5Y=O9Nj%fpvuc5wY9a&wBBUrTXeNvrh0~VQ}cf8zZBZn+KbQF5B5x;3|GCKj1HCdJI_MpwfB*mh M07*qoM6N<$g3xc{zyJUM literal 0 HcmV?d00001 diff --git a/docs/images/simple.png b/docs/images/simple.png index ab1acad8079e54a9b2d9a254a2c6e97f4855807f..62ad84016e6bf3571d51f490685fb112a0c07571 100644 GIT binary patch literal 15992 zcmX9_1yoyIv&9MSQk>#a+$rus8{FNYxD=;YTM86+C=w_ZiWGM!Qi@B8yERBC5}cRs ze=FW4fW`rn4C$eACE9K`n5&{n}-#bzX@kf8e8 zhKGW}grcFWU=X}~(j8PlZyb(zmYsXM7TW5X*!;J~O@q%jUE61n_&Zn0UUV!RMMvw9 zb+<%1mNDAky>`O1y<)>hg0`R?KGPP*8WTrw=HhHiXKQP&3e&VJ-G4+7q6hJjox-Fcq#$5=9HbFk*q| zl_)PBFl)g4n-QECvB5xR^aE&EFNO(fY?L^Pc@#%}(Q$&0G zW{R^c19(e+2lxU4?qz`9aXDH6bA#wOta&N%K5i-R4>I26gB~G8%f!N$v*vwrXxZqb zQzQs}c^){=W_<>TKUsP|pyyLBelXfi=<{Cnj>HzCb>m&H|5~;tTL74x^9%5$B@PV**k8Um9vVR57)TFqmKlQDz+@cmwp7N1LE$QXS68#s*;I? z*cC$~mU>3iQxAHDY6(sMQTPeg(eB%B!MTgqE)#mqT7UoGZ16Z%Xfpuy`Mc!~jbxc! z>%Pftv^-Vin%dgt=h-!$=c8~NXvquD-09BLSmvf%VYVJkpQ7T-(rimktZ+T-NQS_2 zDn2^WP*;Gp28RR!T&XLB@Ri*1*hRI`y+xTVV!cJR+t9WE%yfOK05yQEyCRQUUe=p$ zpNY#eSW(@S`@a>6YK?0LA&iyb{UjP2+*G)}sdr3Gw>Hce@<80Rzx;wS@c#zj3rV z5yl_m;7PMaU7h0w`hh=U!Yua=o)%E>7yd8&yIkan8RL#3+JgfA{%d^#`1qD10{H%e zeFFaY;l~}e)Q1tYgYYcH!^4gs2JMT*fHiZfyl-vk6r5}nKrXg7pbm&K@Q52+4*J#N zd0(U@cK_7+a73E`6APoS6!{cqw=9A`lIaVyV@M`1zP`!Z;jYDtkHJt}Z2j_u#*sNZeY{w(sG$5GW4n+M##pfTXdEbw>v8&L|7zcHLG( zyRQ=i@)!&=ERB%zO-omoJOtz zcr6D>(})UW5+KQ986W`j;qfs(+8pWARefX`rpRL0_79l$#6+U?#a|vOUTYuKUp~Kn zK0ZG7gGzWUp?n<>eP8;@O^L>D?%XvmjLe`DDZIcrN>RlbT$B1vH-eWyj1$IAsI-afyS1AGN04G|U)~OGV`>|4;oT%<&2Fi*i@HWK{EPPc!{qZ*Nb8j|~3(uGXga z+^^NN+9PXJ?a)=|0d_WE7^k}d?6ZE1=s-;k5V{e^v3tRF4zrVXm()Q*k8g66*0d=eRHY@G&5=EoHnBVE(BvS*HCrW8{ zi#9G_!}xk~OixaB8<*HXV+hm@nZL2t%`WFtv~~?}Et-V)3Iip?P0dCkCCst%E(3E| zu|`dN(;{ASAKnC5>1^2IXqPclKF@iD!&dOtpP$@=ptm7I-@z~=dY5ERUDh>L<$QHn z(RlyrMrCcL8|8l~!t~Y99QCKa?Jv5A56=o8y4bilUwV^c1Voe500Hki;G^~LGztFf zr1#W{a8GJM0|fmaKX^4OZng1E$=%bPo6xBNjUW~pOD!_b3I3_cF+1EDFcnUVqnGp= zO3l$(Sx(ny8@l7Qrk7V&Bq`!n0a^gBoc(udysEz(K~*BrHc=JBs>O#13EmR56K?LE z@iDvWc+6%|hJE@^Hicw_%*rVIC&B5UUoxL}4&HTv?vrQFxS;WSbSn^`g=FrKW2rx* z(swTPAOQkf5KbLo#CnVyfYYDpTY2T*Y;qh-98AISufoSF)cz$dEh5)9ULRwebxO&T zVP9$0m`(PAjBdjiRsy~0R>tWCCaRs@7;dRt-5Ru>th8o32&t6l$#?L@mpG^Vl&&r@ zm`g3NfkG@_KMzpi&kePBioJdmxqV1I=O@Q4^!q|}E7K>tN!1s@JanK#`caA~nC=5T z8rKF>?2Ya->>#RF&W*@;&KI(yNecbRwX&lw^@FCa;>)Ri5b2yN;4^bCC|wi5C7q`s z5_=@YqsB$bmVa_2^v)QR#`J9I0Ar$WvoG!hF3(mxR|`AZE>>%E6SB&p*ScqyHq9&TUX&g-jj=a$YL!!UYK z!*sY7P`jwwN_{^QZyPFpNWo#=H(thLUgwI<;g7vBXC9(^zQ>LwUc|p{1u#P>6c0sV zS;X5w=Ak9U594vfX9(~;3j7Vznf3i^=An@|V)utLLFOTA0P|CEqz4&1s82=l!;ikC zV0$uR#pc_C@O0t0MhRDtjDKZON9(c~~-5)6f%ZCh*M zVoaJsH11KZF#apMzgF47Hy@kn^d>H#O2cr0zrj!2gH*b!3GN2-LG(~ibSeK_t z69~7SXx9Amn>tz=2oH(fZl^&)6Pn-J*A*o_O-&}F^m@n`+oG*M;oJA zqsiho8(-rw%bvP3750@Wet2vBzIU*9e@8y%3^f_`RWL=&`c@D|3Yr&&EQW#VODptM z3=6CWba?9=q5!`PKKPBa(xNDuMy7k$aEC5DVW%&@I$eT>uZw3_sgv9{+sy9!0{Y9+_xPD|PoUyYuS;!Tfp;$h2pG-~>|$XK z$BlZZ1pOuJ1KDuEr~1wwll%WoA*jDAa0M7oG-RVTMb$(@(Z^$n`7aPM+ty9j2;D0} zLL3EAhrb!)bJYjcS$)_(J@hT;US>j!x#+q&FYQ@BHSd5ROQyqfA?2`bI?>8PT~2Fo z@%2s+nt35{+|PpxDz6BcjmN*)xBJFVsA^5zx2Piy4o4&bo)`O52TRVyYz!$W>o!~; zV+ZJzJTT}sU-c36Nk`WMn6uDLwg-^s!lwE-jU#9!@kE6qi1q{1lg>B z8>%nc;HwT>5H3TQD}6AX$dGtDyN?557nioK`AfI*-ZBx3z4!kHTn$H-XTHGmIJW3l z`hDomFv;v60vG;-Hu2hfgvS|6eOAO%Z!Q+r0b(S} zqUG32=|R`k_TH?j8t_y587ADz?nc>`XHz5PmVy%EMd@2#YZ4vAVsf&6#y5<4@Q~c2M;JuRGXWE1D zM5kAUa-m{vc81CKvxe2LjCeb+>r-#a{Xsig{V~*OgV7tM{>x~HO?sp!)axGDwOx!3 ztU7rL=+P_l344*V_~s>8%RSF3V>XEsQ*oIb5A#yq#Wz3aXe@}8u&YWsv23d^f8E-^ zmyOztU<(s+$=cYRwX$Mp+;R$SlqRR=<7YI+)6^xV&j_n*&u zYukgL8Z8L4ZqW_>9-1UjHPPV(v~^*5d+x*-cycv{50B~%D{*?x%JY-aYYN9`tKSbr zZR^~=sFmCgN`GK<9L~hl2YNzGH$uLLvVyhnv@RUh<-+AXraQ548a1pp>nl>#=o z*omg->9N-@XV)&cxC-)AlZ{g0HY1s7T`&$v{$_VZtAWS>HzZY6kKe-kXL9MnmlN z-=zwH+IHQEM%rEHtX*4v@nN0HB6tv!YOb>!325*>Nm>^ol zXYkXV1Fss-Asa?C9Dk7)`=U2W1xkj|+=da(;eU0dx%GF$pP5$}@Y9!q&;ON!8GfM>3F%W`)#*8AktA5=t4<7lVRj)pYL3G&i_J-6jQ3i`LO(r2|VAsu{_SZ$9Zd&f7Y>sIs|v|889T z%l*hG9cvWcj>cqR;jim&~%A82Su^jS*XW3>S=8U-a{5fQC^ zg@ubFkgfB6pFSB~Z~|WT8=QI|*e&&UZdz#9<%n*}j2poEd>+~uCNv36mYxZy105kQ zUxuaUM;fX7cox>FZK3iUh(QBt(93@-Q4euszBDu{|20SCz8K5o5XB~PXHykhZ`@?)fU}_U{ zLa51zJDLba-hKead$Y=tZ=??{A7xem$y|MJ+xk-ddq-S9Mtx(w*^;@n;nFTa|Kdc zFp1X#?q;qcuQ5W}0gzC$4YDKMv^RU5pmmhI7hgg_N2eX@QB>MW08cF(PxiZ`>Y6y8 z02X|u`uWIOvYzBY_ArGz4R#c>cJE~}hAMVqD@MkI;*b9If3AAEA@`1JU1s;6s?R(> zX?32*+4)UjKc5lVjCciy@e+?#F%vDv=M5)b|5 z-QNp8iDBCLi_!C21_{-z-<#8^1+Pte(^u-;q~q5G51JpKLeUWg^W5Fjgwz$L;r)h! z=B-w^R&GF^2%U2M zuyx@H0Y!mPzfuU8?H8DkZOVe*YFUD*q>^`n!Sg&~UDj7l73eO*_^4EQy1^4rYHm`i z{DKpC+2Z`)8}D~I4)csS9t6WtfzlAjEdr(6pO=*xacG4(~LAS z)p7c~W~iINof)lFKGRZ7Y;k!;C&aY}sN17+V}At~MntcreCR>mXFaxJdhVkQ69%y&`xIdRWj za;v-C-9@MyMu&B&SqEu}pkvjwZ*YwImvBJp|2DPT@@^qjbO*GPZr8U4Awg~iat5`c`_0-Aj-bYPo z3ks)CcTxAi-Pjj#A`L=s2QI!1RD2S`47o7Smc!%CDGg7vH}HVFFlXwpq4h`AW^z{e z>V}RKmZhljS&UR=RY+wB!goF%gNH+|JJ~BZ?KsHe!fgKq`TF-%lW7Kz_^5woRmbP} z{)mH9WrSyFAL*eT_{I^7kjrvlOQ7lCcS(2MNsjRk8Hp87hkq4$oznn25XYj>=9ykg z+F1S&>&aj+xV)x^dQ)t(ILD52^n5r$?neBUKm2HX@{i#8q^oYQIiop-67=eg-@Tr} zJLc+_R&z;X7l$KD=R0I?*%j_$iF*vVn;gfT#Jtu&@3bwr7K1aMJlK8xxexQ+ZB#Dr zccjTP^}*_U^6>a1o`*fTPPckCThY6~7CvHey&U3hOA=%t=FUmWsVJ9W| z_*+)C26=hT?daYpmh?d(z0sI>`-}_kwsGUo#Gf7xRs-)n!=5gRi<^_GsCJIqF4JBV z{j1ezkr7@)C996h7AsWwThTBQ7`6o}t#3nfM#*dsIxge6+U&Vp`q(A3JhLo|G1(`2 z91;4Ky>~CTPsB=QQ8IS$h_EVuf$qk)D%SOebc3VmE%gGfSRS#}2km(+L~R$>f(2AX zDq>j(4I1!9-p@}M#wSrcxkOLhF*)p9wD)i^sRRuOJpMB_M_c5ywT^&Iyn;%5gB@qdBI_LF1%DLXIpehPcd(B`(?eyby(f_ThgzharW-o^P(CrKP#9Q)2?(-yH3Lzw8K47}!RIlZKf_HSLFy&A&F%r(EYE+o>X%9R1(zhFn!JlGXYH zHi}QbYI94?vR4Y7z7Egn%4z?5<+Y`pe@Qm&O>y|@+r!+q?Ur2EiA4+LW1t?J`qOdw zU67XjF~Oq6eKRs<=6Y6G@Ri+WdQ`r=HE;+5!!paRJp-Tt8sd{m6P7=FEO4cXOFVvZ zVwaJ>Cm;uW@ne0bmg>jKW=t|lx4B&x+4o}a*Lfz~yv0K%N82RbL61v8Bo&@^ghK@1 zCDZlpkF!50<>}mdWO`e;^$h=qw2QD0h^;;QWP-v+UmGwt;=SNx=vf6jFbt#gXzI1S z?QZ4cAASO8uq%V?7QguL$~imq62}@sX4UEj@Y<1>WKIqH9E(sJf9KXSM1eKIGsS$s z`LAUtfV|N`pKoPX)AU#oHFbjY6|3tQexu9ItDzkq;7_}~*B^I)H{ti!495g{0z@t3 z5gH({{9V!S7g}{c9AS$%u~V7(L5+t`JD{Q2@FU?(r{U_ZExdY+(`lLwPM5G9g_Xp^ zags%gs3eizGmE^9AW)LrE2)jPuZvLTW2vnfH8y01??X>D5!=lxO_QlJkP;c-bEi?V6X973YWrP*WVr;&&RG1;0l87N!WHw;pg7noB^H zsdre&)?kz3;9gLUgZDB%V1NEx&?nHstHs10g70w7*Su*CuPA+s>c8oz{{y;hY-pDn zIiW$COk0Lb6WECXdfc~u*2}kZ@z6YdMSkb$HBv=M08}*y7b8AIH5}BEbn>SyS=v4= z^bKd^5s}~3CogWZ0^YiC-S-)>cD4ibYs$2f10n?fZqdM?kDvziDuYrBZqVq#yIrD4 z>P)ymm<3LxKz)~dRE8CMszJnwx9KY+0Bp6KC=b5D!6)K!w%Nv;y{Y_)*`GiD=oEQD zy7|*}8E@0PPoLu`RE`ce4w)QETz#~dw9RO8`K7>#J;7BXsd5Rz>dqM+Wf$;^p{|O! zoc)G^hZRFMTq@n7U1g$7KV&M-wPXn$j~t2{K3FCR*T(l z`uT)I?y3Ld$3a~#>dc{YJOme;3{iK+`gi%NFA-{Ab*@e7*W_AQ@F4QBQ@OQ!jWNw~ zC}DTy3s$0@Ow_mvvq4Xkx*(i-@({@ctI5)>5aqx`7w~IU$;2XE+uZ~~;TY;Ah347A zXA*o291L`Tw*5l2u(~^D9@T`i5$qj4{`E!V`nk^2QKI$kT=6qq@9l#2>bsGX1^fIw zb3I&-ks`q{9?cZuM&Dwt`?IbSi9fj>6Z5|BOZod3%5hpL5IGVR<&wMuJVy)jSwN$Y zR)u3qA?-s&8HnMVqUL1U%J{wkW%m%6fp#{1`Qu0m*!k)MW20j?Ierph)*JA#Pj`j}& z0BWSSvIr2ZTdVPAc)+A*>C_<@pp92(W|rE~>P$BtNU1(FJN|W~`ukOW#p7Dvl&+IX zMM+7CxPdTs$1g_u0e2mori`B;6%po{%$T=SBzvzz1mi|I1chQ;kZ=E3;F~>y@Adhg z9r90@fjw=76Z{@dE;do#B8p19s`mP1w8ih@Yc}Ajwenvu6FUX9{rneAn7uumRY}8z z>I`qs+KgVkvD{g^4!8Jeml}QZ`sqr>YrBy!u{8@4yV5K3Vrx%B?M9Bqz{9uf#Ae}b zmi9~!#>2$elNVM@f3%In>pL3CSuIID+UZ~K&;sL`2;;p4Gh&SRzAl+Ihta&smUoCJ zu8J6?kF0cOBL3P?^|4~#DK9V25LRo{TGeif^llYQTD;OK(2<*G{rNp0O#N?j0|Ap8iMRZ6^WXRqe2nJcd zOg(&rxv%GAw(Yg{_UZv|HJ}0f0hZ!MeAz@xB*vYu5A%1WD|s${B~igQ!DnL0m;aLL zURZVV4qU*Bzrq}t9}Zm@1AdP}*sJaXu!Oa+QBdfQ|I-45fkV+U5clxKA-$K@@9Q`K9KlLF?rL{n*PFyA*GTSfaU7paXGdMgw>ihx3t*gQFcJ= z^Y#-f90>s>o+&?fU}ZChElB1h8wd{BxHt`(_%nACUt^7sfU8DXuU+OhWf&Cu`_%h; zR33ey_Z23gCo{Nf5b7y4ZFam5z8SGTu;Ll$il(XvvluCaX9{+M7&@U}ebaTww=&m= z%&6r?{NRsHx8w`kgQ=;Fmejo%oGcpG@~x1_St`KtG6+&J0IXxe<^p~5*z z4*g~+>A7h>V09`32!>{j?-`Bw5dQrlP44*v)MwYFW6hV;!(KR66ca2F=eLSe&utaR zR{6+5KXN|cyHgOD={dL7_NzTpN>E3}wz*Wam#jHvF;G)`_Nn*$mtirfdgUB84Q>9X z;K6r9YuLoNGxPJisqJ7DG4WQZq=}>!M>CZ<5nm&w96{|SYiQD|y1G{|?eS&D?2{e~ zS?K-2*-caRP{)2=Z%0{84Q!zyo->cwBulhM>^%-$lSrRjn4x^#r{m)oG&Mu3`Dw{m^5{Bcv-Khdtpiwz@ywpTR zpuwKcwoIHq?PT0cCK?tcI$_H@o_9&ZG5Vu7_gEbr-O!FvqL(wwt}E2q()?>bi&A?1kBfPhp#VM$6##3l!j(Y)-_Ot8 zeOy1@^^_|U7+z)Iwh_Ai2q}A&lx&WNYedUSwR&Mn**OqQGFp^W2f75MKMjoY≩FumBogWzR;|2?GdP{^Xz7CUbn0IldV&EzmBx>LcjtnHsj$5)*Ip_ z2Y<6!wsE^2DJtD^fdGS!PHw{@BEZXM&9U`b^G7RitGW<{{=m_ETi^BOtFN@(Wp{MWT%eDgMXfr9ylnqKo5UXMhTeh`6|}M8xiX zJqh=&3(Td`gg2?T?_@)T$9br%nT_eIR3kY$+_(G!#*!dd{9@32jZl++7ve{ z&v*()t=)Q5Zd4MHkmR*Y&#Rz{mfd6^*&Mfi{M&mX!!Wh=y)Y02^uj+^5IWH@sUmL=He#&*j^@|oqE$+Twzkj|k%(lME zeL>nuVp0TT=l|^>Ohu0OQ<(fWKcz3hpb`#Ava(5&6Tv}IC?SO91r1GkXJ@_^`@|DE zHfOfy*;>}8?CUdZjDx~R*(^u+Lj{$Kd%j8pLU^~hLlY~G6N^MLIz)l%YS4P)vZna= zu6Pd;3c*As`mj~w)gT3}HV`)t4?4b#PuLkX4BvTof{LFX4#?Cp;j_ilPbRnJj5Ll65ntB&+_Ee!cUuM>ec)=0A?3hr*>CYC=$=5IstMh-^Gk>T@M6}=bJ_e>t zL&ou@dgYs$ha30C)jxm!GU4d@_H9K~)yLE!z^@;ITIox#UX|;+`nL1>?fd&oF8{c^ zy!;-dTMuhHt(S71db&)I^*+%QzO`Pzf&{7Hk9YKT*X^vD)GBbYxw^R6?ET7AE_*{m zOZ!~!Xu9e*)t!5S-! z+4wK;tlePqa#~gS%+kzcfu!Hj{K^;H#agQ*2y8VRv39)Pl(4?e;52orjKi7fK^era z07ybsyS2u58`K!trtL`q7_M$_`}wk$I_rtFU6AXUv`LXp;(M`+2+-Y~2avSBZiSZh zQ-!KdIBxpsUv$E0BveiI?tHDgGic*-wTU)J2hscL)ave_&a-Kf_VBFIgwuPt+R#5> zf|)XLhS;5nCW#a`!Nt|}?cu4_17q*=qi6AYizn>)@n%Hssgore?&eSVyKL%u%=u64 z&aT>XG`e_8kbl>SUP_{J8Skg$iFXpyXO-MAsnoo1AlI)wAtc&REYV{N=F4X*)Y0dq zA{`+oOZ z*tEq?GWi5PfX7cvn2;-4lj+SVFP4AM7mbdg#JpI0&i%zJV(T60N8675$+Gq;k`s z7y0)iqg?M%JI;#$u-$o6cP9c_lt@+2L3)?j`T3#uad>T;4;Q(j?vw;GoLP=zlsEQx&S-&r5#$UtO0;3Tw>d z2YkMt2>rDC7{;e2l>4$!Cw0Q9VcgMw&;~gd*U5w(RQxYVlNuc_D2q-`z~BJM1BgsQ z7_%;t5?QiHmV4MDS(aWgZ3vURRV?z5RnzZEjgRNN^`O+A!%1Mlh*4OUmO7N1o=Vq! zts+3@v{f31EP^P$Ol2z6A;FJtvsqKw^)(ff>BNcM+)i91N%=`l!>|qRk<9>!h>5-# zrQpogJnWb}o(u%#;>V!JIQU5}OD~)H?dP6I2c5QU)izDuL7S$m?jKD(J*^+6u_1Nw z!Tj%T*@`I@AM}7#jzXp{NmRu09ifv9EuNvNONI1ZS9M-nT^Exzl7oy)lKkPv_)-|*j}G5 zDT&ar7Xq<^j{ltZCnrz#wm;EsJpBMC5?O|xSQEX5!_np1FK40aFsXJ%9yb25J>L*E zA~~9*v~jAN{nj3(x#x#89_s+i3##8EKJ@s5@^eER(SxjA1`)E4%10}+%b)z|v9RKE zgew!HqtVH6F_G>j#xq+3EPT9vLU3Fx?j@_Oopk)CJtkGz4pdoKi+7`s>*vJ(bfFcv zNd$rM(QB|02dDEPeGQqHM>#XiPag}q5%$8#X{3qubl)GIopGe9>v3mtQQ#rnVp)dW zUbSJ@zcgb~_YbA6G(l_O;?BhZlt@ij_%5S2Jt`DkfjFxTBkIP&y$%iEP< zb-P$^i4TsL0IV25Nh-C*S68W+n3&(Wb4ZOzS)>gym?>97xU(tUhErM7U3jIncQkLI z=DTP9?ZrMxqNsp~#E@>}oiNhyO}gDEka;h_(%yl!AMTAdH$Cb&_xkRzEOzjXl+^Ok zv4`RulTBV5XqGxf78AMn@*6WICGKXcHM~@`;HU_`SfE_5#uBTyFP1L1T4UU4@(l>-LI@q zB6^=?R`dRimXTU%gRh`Iq}xcv>NL~$&8hQ>~Lz!u4fN+MQ&{65LkR8op%e7vc|Cm{GTbue~-hm^8fg;b^32xvt< zqnuYr925r0=8Jo&&SA`W$DXPra%PQlmdqe#HSzKB-@mUI#w-Zfrzu)%#$mJk6!-Gv zyIOb3VH51#qr!XhH_eCg*-1-Ao#Omi0Nt-a92Zx~~Vmnn?9t`}~@ zwyw6kT@+YpJPAyU1dKTyVj<5Fd;d=Pr#`?H^)O!Uc=DK5y%AReeEl*Wdg1>9tI7b^ z5^CDxAxVUE&^e{iH&vbXAFR7Zbu(Q*90cwo}|X&n+cdvErkn&ssKFwj{^2RVDuv^D*N!D-t4L1={dmlxA9 zL}?TICP-iXFy?Npd2qax0aOt>!tX>JZ}mN)e`bvj%MTZnk?GW6C8d)fW~WT?yI%fb zlBL34_%c&V@Xy8+-jvJ;9FCNE(ToISxaR$|5x4E6k2U5h+ZNG#?~;cUGx z9*mDBMh_O87qkMgEtKE2>_`FR;`E^YtDo$30eR+T!9FWuEgoxHtfX7}8xL6H&25*B zl;T&t=QN$njDQQXxkfKc*Z5Q4G zxnhnY3thxETU)Y{z8@a4x-*=bw%#3nd3jt>SC^E09XKfk<3&0i)hZK*V3!>+9&3%6b`3-0);@yto=w50w+A(3GS`>K%&F?%gEp-4wv%ct8VWdyEs(*OEX#FE zg0B;CN$UBbEFa5uoF|APN!6so0q6NbuGePHFJHY<*dk(ytqtPf<;9;Ocb8M2H3EoZ zaqz=jmUbpfR#szEGgqn zQj~pO)8l;DlkcOU%1R&ADEC4pGDtV8IU`!=qJ-XFYs@$iV95~q&>-mA?iD_69(=uY zAmEQYPEOT2Ti;>XarS5z2|Au?b-H&_YU(@gni_(4sM5z+D_nh!z}eruXI{SC5=d2# z)#Dtxf^Nt+_a{nMf?OFwk9{a#nJFXE-ezQYtRQJ-=|K2jo_gd$_50~)JlzyZ1sJ8m z^;qkOYiTh>CKg`5gfuIIbomboL&cD}--5dl835y*?S&KQh@2;@o{1cvG)45g&yHVn zvq%}O6u}Ij#5)Hx#-2T)&zH3%_&vtBXWLOZn_p$4#6H^-_b2I*R$j1uK}iYo^767t zS1>A&OH2mAOH~lbha>@!sORwL$QE(RfOLF<+UfpMKf4h!@~;^*e0!ji+m)ff4}iV*N->VIiE9AYs zcULS@x5=G75pmN2gVg9I`JzqtMm~cpY(crrFVn}qXeED{*!!NQ@vB9fiP~mn`)!s# zzal_EZ3Nu){T5TPA0>H*IAx^$_}@5jN59_7ewN4^bfmPKH%BfdtHQ~yfiv{_62zA& zDIlO8gs?*i2}PW*;_*)}NaknqWc#hRAN*VO%kMhM#`IWgAu#UP^_4`v)Qf%o%_@%K zuibS?dYq%jl1)bi!ueqh%Iy~H#r#Yn3YwZcP14e)J3deMwl~!X*v~uy4^XHV$eV1bBsC(BU?9Ia|4;EsR`p) zXb*;*o)K$AtIr#i1Hxh`VjjVN2b!i#Lv`)#=cMEf$~y~QI%MfozIdUL{KBFs@)^nM zBkO7FGTrHf11~b+3_D~Wm6`K3p4al%FXM|BtAgylPy<(85BDAY_9uQe@*<5=5clUx z=US`7h9(>mQ##fBs5K8S{uuO-Hl;S=cCbY#*5*SV{+d8FOg6DNWP>r(5{X zs7NFaPFl*~bCB|yw-ih+HO)j>uumXiQ%7g#N9C8zNE%Soi!Tn8`y>;()ak_!_&Lj_ zX&O3dhV*5s?G^(9uike|#!*?m{;TwFB-foYZ(DHEr2W15+xAS~hQ1=1(8H58&323Z zBLZDRnY|h$I63g=x!u)iZ0arE>Q_)Dm2C$ny5{LH5o^UOr5;FiZ1<{zL2@B?M+BAS zdZa%-@;`^~Oj&ObCl%dq#t>QPk5awt*PFKd5u*L+?`NU)RUh2Aw9Meg!@#3##2a-z ztHTL*bNx;$Zs1;8i~GT(DjP+U(~s-g&cjmcv!$kccgFiaBeMa^g(keFZE);DzmBJ~ zV@bK#E;? z%{yWj7mZ410OqYd>YQ|?f(*{cW!Kn_hKyLz6*$L@6BXK1bF1@1zcP9LLvKVxWPtb& zsw@iU@2aZtW6r+ndv??nwD=hM(dsUK62#r_So0sQhbzU&pG=DCzd3g-yh+?2X7@DG zgdxpyqO+^6DP4;_W?F==3$ADtu$M{xXkc98YDmfr{?p+|8x!+r;k|`9L~FPE4-*R; z+ttlYc`kq<1g?O5)|yF)7#o2oN7L7rn}fV&T_3Km36XsouBKLnH#05-vjGDBQzaEJ ztagj!?$FSsAMW$(Sb&5WmgtH>*C)p=|j6}LuP z^aO4?C2Azff&J#^EZ8Af)B3Ohk7_L6|J+^_i z+tPgbboq)|(kFx}$K^}DB*#q4IDbb;8)NMbMa<02De3B_KyLvG5~Tm(eW{uxmBegf zK>VnqaQP!O;?z=F1D`0BPUFk?K5E=sY9V64?m!7VxnjRU`nL_-J!tKn^YhVl7!1k0 zX*77OcY*ukZ^HekeizUEng2aH3MkS0V%&SDdzdF4q-ENaIwXKt_hWQltlcm0n;aI= z4m@4fDAB8^>n4~Jc^5K>1q72K(U*zUE~tNj&~n?D-s-V7OA~)yrI@p`eqK}RT{DcVMz(he z5>WD61gqG09qqrnI1rD0`36+Qii|UUladLEi*+n?ACZ7%bnjoeFxR$Ey`KFPUrO_u zCe_^Hay-OcnS}%yM{zRVxBGQItX{4mn+&!j2=gioo94JN#Ql@}rL?(oSqp)wKz0q* zcn!96q*SzcHBabO4K;3jsM6MSjFH5{Rp@DtyZ+j$y#u5(RY&Ce)!RJ=Bbw<)XW=;)l_X^{z* zK;F}I>3HH&?gkzVMh#YVHnnQUSrKjh3dhXB5^rlxx+kSSpCc}kvEN3PK4ttTu5?L@ z=zkx1R4{k-5z>C)4MxI-nc3xE?+yy5ep1yb&56V(B!p*%QT>+<-s$VZI<_=DQ#J|C zsUbUGG{EkoCsljMBzfh!)KZZQNnsPlDPa%vAKI%*z#s2VyAO)e^RyH#0A0AjSZ$VE zdvujB8u=KITe;4SR5ETB-`}UJ)%J_^*P(BzZWa5-RlHo8i~039gIk(xsSN{OGo+BY ze%Q`9p$T2N$Vx#9b2#QCAeQfJ1z*h(Vh+aidwYj-l0Np2<$wc;XTvdWj5oz>xYo-V zYcfG`JKiS*eN-8s)P8l>zZu^5d{;O`v&k4$d0xTPOXc^0w)F43ws}haUg&9az!4^tD^iM3jCi*+SeZcb(^EHOW`$dXbfHYl<6RxD~O?+ z{P~Mcr7E^KUUUiVTTVI}oP>dV#ga{avZG5Podw<>u7FeKFvM6HPqLUTuUA&@CPuy_l?QF~)F#d`ndpf+}x` zHa6mq>#sQ^52WQ*Zsv|%z1@AEeEHyQx|i9vAcXHGJ9u66L>nM5;tBrJR3!WaqpPXWn#yxbkS)A%lN zy%yi6%r!SefP8(OIO!SE06vFB9-F$&eVsDSeg4&2X^s9s`yKZWfdx~n3yRedSyL%` zCJK%^IOA0;wcO$EOXi`nzLz#+-aWc5aA(o$txfH@g`MJiC3!r7-U{u~Wldy@aEXoi z8Kl$As%wq`*_|01oZzK-h7l4?#03t-VMZ2;v8XS>&l~guRmh9I^2UaL@xlr-12oKW z1Yu6yJw*ld9C_mrUp)dS+Vp~!7v7A_v>ec8g2psjurom57ez`JI3codixZy+fDR|J zZhsO3tm=BUMBJC)3>y6BF{P3r&AK`bk9w8S5on{ya&H^|^ynUkO#}t~nk?trf_>Y$ zj5g}UM0PWCgwZ2Ak^MdIH8@}re|pM%o{+QkZAT(~t+h_~#;Z#DN)3q-j7CpbAU7#AHNn(!kF*A{BMZusb4)rVni$MnUOZ&caEI^0Elc0N6}ExQHChm Gy#GI>YP`n) literal 16662 zcmXwB1yCDp*Tr3e6n85QrMNeEaHqHyD{jG|cq#5)Bv7QGNO3RjTHGZ_arZy(H}hv^ zvy+|O%|3STIp^NHF&b(LxL6ce2nYzcN{X^t@ck2fv&TS#f72kSWx#hR9zZ1>4EQGi z!#W!N8`D+sqX+!_`TsUVAZrd7evsT#&cIXK<&&q6g}V)ckB<+xy|bf-m4&Mfw~M=N z&WSh$0so-`7{kM%C3UrzM7;4;6;Vu`AZvE4(P5L3a1q;b*8+ zD*H@3%03uUNaZM$VQhsgEW|krA^roa$u>rMb;BTzpAe_IndSD|+;!U9@qeG^DyqJ= z7tA}FHWv89#skJLb7A6gtPo-1Z~!gp7f^Zdb>l0p0sac^)7$SM48JJvBDL5V!<&fj zSj~|dk%ibHJM=DsVdSIcOW#$`+unzII5zMg=^@Z>aCPZzux;>!1``5%&lO)dU9r!2 zUVPtYcH^kgeY2V!9|M)+0;6X_XAmd{5tKuukYETh1N)}`oe&SuPCMH!^yWMxqVFZy zXz!Xx)AHSz2#M$le6iisTyaE$pY^Uw2eSZ;L139Bv2yVR^Nh_rOY1NS7%eCL_Ke+} z`xok6kEYZy&L`fm;vOB{2d6FpU^M>2eAU^l?%8)O2bnQ%v^yX1@)u!VO7PV_tq)pM zn9<8^!(zAjnc=*bJ_7fKUAEpdKUdf-rA?|9TN_>=h9Vop9aP?y%Etp46^l>dA&HIX zHD|ayPk8n^Kncntr$UZqGd$qhpbb$*jIoV=wEa$gCvc_@DkoJixnvQ46HI=_bmsF? z;D|PW8QioDMK3w(Fk~<1fJlex5FUU4bO;gB-=#57SOGRD4blr37TBR2;Vd7NAg-EC zST@M@=Sd#)LsOYJXDcUk)bycYX950G(g?n!CNoLnvh9-suR!{H#s_dm%+B?G1p4exOU^uX7Z8w)A|M=vT(a7QL9KiCMuZ_!qie)eBV2TqFY{0*&;Pf zTd)wt5PU4TI*EBmk8wAUddoRY)FT`Z95$@gW`5jPLy-5u_;yG&8$QoY94Z|W@<#X+ zl2#qSl#a3zw1pwmsSh$tSqtrI6HKBX&O=7rHiG2$3xA= zmOh+1{8FYr$~^v!5UH7mGq*;W-QV@Ej6LJ0TQ@b zni_F~QrD#tE^}|EJ5jZMGvW?4k-bR=sF6p+vQUS!7GbNSzYFi0MTso6z=$ZvR53BP zM^c{u6~4o0J6>4)6BR-X#8_Hh4(loj55CM^=3t<(p9BTAn3E5go~-D+0| z3jL%&f_nC}v|{QRlnBgmNyQV z=U|B%F!i|sj_Q2i@5#s6o?6aNV-6yZqji5@2*I$Lm!fKoREgp|o=xgj_Ngf5HXoG- z!w{W{mUS@~a3_Ta7vr*3)0o3@@lxVTyZp*B!570@z_^m@|_QKv*|?BKUB0qwIB8?&T=h%nIXepKJa z1X*K5{aLC?Pp=dSKWzsTVH%){AEO`Tx?<2Hft?3(Qnga94v0*p@DoAh&jb6u!@p6+gW4^Ys9wbe*e47std8o0LcU=G2!^*d%Vm~y8~w=Z%7qRZ_7`XJA-M5 ztiJ*aLp)7zWF}~yW#S?twQv)OnvUrU2?CN+wcu*vRajV zCB?LAiB`ftCYBih*@qy3mN-nYm>7ZZAyEzmHbUkc>H|JseXV3VauT3mkC3QxN#$fh zO!zHb_}M3f@GcybUr*{?Sm2ou#1XUjryUQG&&&NYa>R6e3eOtb(%OfEGS)K(ILOGD zqN01|WN0-8x%Zc_%h?%q+Bq3a`l1vnM|5X|j*?UdWJv^Ly=Hlgb5Z)G%y~p zH3N(mc=1-jI41>0zrxIx5uUhQLjjgtu0*Dvk$}-8ovV$Q^f{Ej1!hU#ffV?J~*IUE85hq`a4zbi!Rkf;k8=j|>pi*Uz}y^b$6r$-i$*^JOAg*XWy0ctG(O~BZczJ0pgEJD7WOsHc!R5Z7(tH zW1cSH#czXye^n%nn>~n8*pOQ-7e86bd_{gV1Gdh4B?Rp&_FT0>?{>3c~-UID-WDuWPG$Aas+gBJq~H}d=|e-2(~aJPjyKFwkf zDpmZ_1@gx7OI>cH(5&L)QE z9D1AuYF;!5kXb2g`WI4{s+UZyii!1CZ2I0}u+>gfnpQ)>hg+`~h|qRiT(@@hn@O=n zH;9fYh8xT5`j(O@&Vglm4V@W+z zO!yK1^Tp}$1FVCD=iatJ%ONVbpqjVJEr6PZz%eA1@29<=CP=7=7{gwhlXw!j@O+?` zi12nF7fj?s!niEXhrCu&9h%J1O~&$Dhzq6!UgowUQ()PwoN*{h2BE0TRFT)I7cy!l zj>P?*h_MGf_>C6r_H6zljSa}%uwC$V%Y9yz_8IfWQje2on?t_3J6d++&beyRa-gNj zLZrFM$Z?E!`DuUDo&7A+^(?TAx7XEY}oNQ^S-BOCfD=D)Un1(eFQN zDNRzvBY?Uo@KjkbE zCLpToj;*OXqHtzlml^r4M_A|rCE*_HRC%qKXDiHh)M~YrTkgF|{_5&je`~P5h)6fT zdE^<774bzx>UN8~WWgVPWV>v6$vlb=^%W>K;uorxU6cx31%n|zV2YmEPgpvtl-eJT z`D?Y!S?*5`B)8@xU8^B6X{ zmRc-e&CBtFNZ_}U&XL=!M<3Z1&2-2BG1CLaP%ta<+Sw&Frm^ZJVenlqzv|3oLk>f8 zxkOn@??g*+afwU)OdNrHi(wD;%$7;;xhdMi!@_xy5Fc*j7sX)EL^l4CNw+}zy%z4HC@OCk3L2V7oDYtQWz5!-RI^!cX6Y9mUJNr$jU?-~*7Y!v4 zq_1*B!Tm5f$%`7LGr=JfH8tZ=e2hRuc{WRiyq45sW6)EnRi4c><8Kzla%*>xaQeA; z4$xs)UTt#^&aI9UoAUaZd~lm4cZVkQnwz+lEmI&8Cey7kehfX*LoONpgRzwYN@C~G zvJpA(%?5lzuOtbxbe!g zAobgll^Pg96p}1+{~a#0W1zoZ9HH|y7gq#NjDhS7Tt+|1U(E=ZrNEU-+ZX`-TavX)w%PjpMjbDUmCZ+zA1Eq3prF%0l6qflBCvvq*!-jzMOjGR1Pz<4ui37&3McRB94)jrv z<7Ah zC3DZwDw2a3I+uVJ)>&ezGj1z{z-arCBq_M+AwulXH5mollB35zsV5Ir$Niy6XgaI} z+r(!+jyU$B$#(I&Vrsiu^-@^P{_64bOmvfCKQi)2_h4&?4Qie2~DwPVs&p9f22})|BNVC_6;t-|6r93MeZpGrnSYv*9|=tHf;;w z@?1R=KL+$!U7ILur>TLld9s~;cRr(;Q~zOusQHqWE?WI1lq~S=BQnLL9&l^ZIlQw1 zOC62rAlu1@hhX#cj@1o^CBMOx5*7D0XrF)$MD{vlM{c+5XA8>Q+4tCn%vIE551T}{ zjHt9xdGS#8C@@YrkMKRes|@*k_(mNZ6YoiNrUYf5ao5HSrG^uS?i?~ZdpohJ^+R?J3JZiXJ&mq+mT z)Mzf%49@yF05S7wd3gi>Y(3X%KFWq;D;1->2z|cI zYGfe0htxuQ^u8neqfbGXt>~Vsi4ZkbWF%&RYSEjzrcliHp`HHwFz@23;;!_X%^dBAA&rOa{yZSI(_pEf`%^wtmDE(ue{A~&@RZQH`- z(!8vYBL{@xA&c~jrvBcKrluzvb_?0@2l!4qD0&a&cYo&{P+AI#3|j~b-*rskv1Wi6 zC7#*m9p{9f$$MyJ!b4mT2MgCjE3j-;MN1kh9CpxDgWp`+x9%iaFK!ppmG<*x*Z zmNS(SWQsNq#6+M^499CJGEb#N0*e4vC;`r2hE;%p zh~FKy7bWt1laN=94gOcmBMu5Vx%$w(>2^zFZVJiY}mB=hM+&uFs3L zaA~#DrT~%}BtRr$jMY+l@+kXgtWSu60=`VscVF{`sm=Rj3LJ+|{6ZJSnNxWV)qD#w5KdKXok3?5jA05;sUc%u#7_K!Ref(wq65b!h_@Pi^ zqtxu_%kpVc9#8Q7$acQfVV|%VPse`dD)IMY4pO4PF&p8)AESYcc;#B8C(3429x=Rz zQ-+dgd>(IF*Pr$?iPQ)(`;QbpAE_Ae{$)ch&(Wp5b1x6Kzaw0KTjxwRha;E`SR>8} zacH*PP1Er(Aw9Tr9>Fl4mqUz;i>nelHD0o9wAdG=EC`JEm=HlXnO|)7Af5OOj*N&U zO;oZaCnK|deF@|jXxtFu=hC$`N9y5#+?~X&TbY}OpknVOh@1%HWql@rw27!Vyia09 z1^ErI#Mnr>ZqP~Hb>rV}piA=Z8O%}`#Ff$re?1i-G(-WGA<{(!;TG3*uu`tnAc7bU zGdxBlYA-S+C*0)u`G+I4#{i~>db){eBQ|@Up5KH|TA*fLKL6aW-YuWMiuJT|!-N;m zO}EBdPl|N7;V9J&GD7XMCfDsU-@e%T3Dy+l^yQL);={@Z`BVrs7;F!yPAmoK|u$eSTqUDjK_#Z=Vctfb>8 z8CnpP-TL*pnb?~SxcF5QPo53sh!sEwQ@n_0fGL8Y42dFx5z92)iG$nxOh?9T@SIX&5>lH8@#e6mSTgSWY1i@Wt%zcI6p98=+piP`h;n z9$;^LlK)3ErO#N^j6fOF`8?OV9t1Mn=U^2T%8k+|!bh-}0MG;)^elUm&%3#;)RagO zFPhA^;vodntPWq*JlFWUO^5M<0fFD6%u5q~InJ=4l-gSwlBAQlUp?7_Ir|_iwGWON_$$$xT$Y;DDa%jCG-;sJ4pu&e`peH(Wc{_ z)Rh>har!*a@3q2~vXT>Vkr9+x*`>U{xMOX9;)_+nM2t=3e8gnvgH~#vI6=yq21@-Z z2Z9jpY9#?BCyEoq`8YQ%3@gUFnB-fB=m2yOm=aT3ftax#(HY0?vA(tvP0&+ml=HdN zhHgfnrbwWb+VtToas79M4s7wjHX7&bcVt)*4j93Mz8fhth9Xg#<3()fg;e}y;d{hW z%H&s;6pT4tqt{j?epAYSkT}V3;$!4|KIdrFL|eLBtu|Tvm`uD<^MLyqJEau>-{jq> zGpzZBHZ~B-cK}(VtcdUNf^KGL^D=$!V(8L(&xvl?m?f~=Q%w!N>nL_I3a8Kb4v>u? z{PI`$N8J4;`t0LIn%m2hTX2Q_7pQ$;w+2RX$9W?-83cw*j)+{jli5P`Ffe#ioEF)szzbjk;L!2M=~k*S{(NI+%wONNV-!IY^GhgJ18?(%2w-LBv#P#GJrp=y# z7yFO#tMZIZg0B*dxv@NU(FtD&;o1D#!@^SRZu4I}WO(|Gy7Xh=p-Ulp<3zvSqqy;g z#}-o6yCaT`7wyj2HKQ=R4^g}Zp4<&kpduk2Qc~F2eJ&|1)D)O-@TR1ow4o!L9dF$L zuGXqp7$V}Byd}fZR65ta|CY4VQRB>4tIpDtx}H>2e(nDMxd6JhP_oBQ$`FQwQkyC) z5ra?R>5+F$YXX)OmH%6DOVTd~(gI3d^{Wnvmx?p!^KS2x zTz@=Bd3wl<4tZN(#B34+Ae;;ZUp^zHohUH-7lQ4!r#-)?kH)F0R+N_yIoW-#Rprp& z!)-S=46U-yMh5<3)FWNiAWd-MN&`v6$QC`y=m*nbyB?jsxOSvo)IpC-|Ft+*8FSM% z&_lg_SrylXP0Bg+Jij>|_5y;0mu&s^g;_WT&*iA> z`jkT436eYjq09(8NUxr4w0qz#?|+`cgh}9;q#wZejn(xknt~29KPIGZy6fv}$*dgv ze1X`#Jr;t63K9iiM8HEDWgRt1 zrTr{(3oD<61O_y!CN(03e%oGf0@~q@jj8faWXl;ja&(&~O8DRW^7kP%F)^up z-7V;JQ)&OQc7M|-f&E0@6});SrED_r3@q32vuZYW_NIa*qBWOG>&AIouGH)8PM@t; zNG$f1WcKrE^A>`5Dhp!1r}nr}xfnX9PC;v3YDx9&{cHVIh_p5$dL80U5xKC=*1-oA zX6cG$Gw4T0lwZM{ol$Y-tgZ|7L~$E~neSQJoq57;4_nKW1to)F3D% z^izn-vC*W#-~HbBw!rM#RyW4$dM?<@RzYFl$jVETpZ*u8qo*?pQKq0!msIEBgel4k z;f8|L{bIm!gOnL3@wzd0#&X;1MG_{huI^)BrXX>C^@}X8YKjKyH?3Me1*xCTiQ7bL zKG|7=ZY+6fbv~z({7hMJk8SdKRHU`|_(ykGl|7EtN2^!cxrT&Sx(@6n+PZ5(iw3<0 zslb(jE#a+g+UKJuulZouW_tQxj)w>N2byr8#UZ8m(8|gzCuL6dKX72X(?`8--fzZq zWGXqOzLUJ8T=2nArz~x5)M39a(JFsF4PN(8_{}fsOdhuW+Hrf*cUkf@dE4SSzLv=E$r3;zwC!`^6fohtWnf?4wT~cDV%%mHF$QFI&U3b!h?d$gFO|_h_ z$K?SmUbRjilC_LBr|UYf%^lxPkQ8O97QO4LxLujgg6I%d zP`-IJ`)66G4dhm?Uv}I+)1|0YCxOs7XDSl!nP>QgCLHWPR%8BbHDJFfnK{V6?L2LN zYbkjhUV`yDX%_gM^p5Fl==6C*ijsQyzE!LI>Lfr?sx$f6hfn8X5^l~+p?)8_y$5qF z+|T7fg?^x^Pgt8Qd`a?rQ+j*`!df-|&I=|N=M_x&hbJc|>wOoy2@DTxC!B3vT@zt~ zlFF%ZgdBih8dz242xL%kD^Jcs@XZ_HDHbY)P0{4!;z6$oiZOG8S`Z8jh4fB!BX`&+T?#m4b+wbmp~ zkwlCofJiBzk*fjMLy1C!+BVhq#`DB{cCBHfIYOsur5lv)r_cB&$bYx{M4xtQmAOS- z>nD7kafQ%AAQ8ZqQ5`-ni^4=RZSD-xDBvc`2w%MpUtdpOtig11re(RTwl>kGM)ayl zE27*;m7dDX1^d&iz_tTgU%L_8_4NiGO)rJGG?SQgUdo?ofpU94f_=o3H;5fCV=ga8 z^gx{i-1r5%w~#B#X#7okAp*7UQ_g5J(f+5wzX+-;CV;`s2nOJD=8XJikAc_})8+Mb z7f!PpOZLXBqu@2Pfb;xEn!AK~6TfrPQuobkp%nvsPIcxKm~Cy=<=2QUd#pWD?B0dMOs1Q(Kx&GYgHfKGhWA*i; z44tr#7wYR=VL;-r=v-+hJ<#)=kkIRct+sDJe$ZLiaVh!T;N-^S?j^~nF5F;;MQELW zcb^MOw|ROQF?+cnh?1DRJ{Z{G+qAgO!Ci6oTAfO7Bbbqn) zHPLDB(s%lRzhRcEf%~kC_sJf z+1Gd5PXk?ge^sFy8ZC{-_Z^07CAYMQ>OqZ__$eSA9WSqj>3!|DYZ;3*+kK8wPn-C` zmy{p019k0C@hz%cNz(0>0Gi3 zbKFgX-ri`Ia_ia`onN1>9Xw57`Ti#s6Kn0BK0fdKy~RM%<<@mg9+*HoegOeXLzV=o z8?sRD6lpp|87m_1=FyI42|HkMO-+90o2`v*WZ7cP?3|nrcJQl-esOX)ndh;E-(=uR zK6Uv^oe!y>9<0^D_Fx6eO^&sv4NV>g1wxIZqGi>M8J2}z_LX{5Q}3b-IOR>M;_diB ztW-tio^G7}@mCX>x%E6IcL_nw_ zlZuhQ7<~HCQc;o7txa_={dSxZ=%%F&{O0Q+Hn{6ftjzp?_7Ed~WDxjpz-d%NHQ>F_ z=KCHl;C!sh#*9L;uJgsC5m)3Twj872vARzm<4IJ+nSSR(6Nh`f5U+gN9poufTx`WX z<(iq->hr!5lC@VV4}$Qa8AqW18PMl3ftKQG&G=v_tjB)z&kp#MW{|B zod4i>6KnQwt&UW6CR(=V-_q~c$VfC2PU9|LSpEonMgEADui=aZ7It0ij$~6(P&hyK zkak@4!KI?gSK+jEi!Z)lk)MR7?-)1Lb;YkXkWWxaJHEn|r|TXP;bndk3z&5Vd8 znQpemjFJ7~DJsWHw$iw1sqYeX3O`J6Pto|CO z2Q;+I<#$mgkNyTL&6$52^bD5`7k@jF8VR|4GUFd^@q*2)E%nT(S1TajoUD%IOSJwc zT*2?-$^EgX8CJzSEt!Lij!$QzBuvF*N~?eo*Rf`L5rH%|7RPDa1W)z)aC5w>%umIV z2SWEbS-GETXt?R@IEkbTwmR6dnm4{I>_C6L+nC_)xQn}ORy!#J4aK@Q=bE1XNsuqz zxj^l>Ts@sSlj_{Mm^Xnp{L;-B9iDN?fBta;1CuB1R9#B%K~O-5(Il#)195Nk;CuBc zT?8;xpmN@P*+%OC$NvT#`h2-JR#sS;pV#Wmmr7=DP*pDxck=K)6KyoB{chs@Vuyn9 zyoqS4BHh_nZutBotgbHOrs#7srW#<$8=qXBA9)FUJUBjPPEyohPh)$7eRXqFlxn$K zq1$#-G*4I=TVzk+v+jX!o9~8J?)mlku~i9@e07750Em}8SX%8naMXJrd?Mc9v_7t3 z8SN?@ZG(z|7KTxnLjb@ zoO13j_XuL=-c3q%O$5J~)i?aE@tb4M&dwod>7Ug20uR@h7AB39`u?jKz=$e_BaP{` zwUE*eUHop45=k1{@4+Eb&OxD}p&ue6BctVud$-&yYlLAxTSHpxbd*^LPu;2BemiA6 z??P_8MaaktyjlFjPto4raNJm?J)|4I&EEp$DDv_`Sn*qSN(I>zC1J?OV3z1;4|fJF z%(%yraKgRB!vmT@`zHZ)$s~vd>)C^l@pzuk>XW?Z)2{1)B7;ZN8vVN@1n*=83>6T7w&x*Bh5he%04(C$Zqs0TfGprJhs!Y+3%QQ^WNPy4J4FIj10 zV**$v*JE5HgUhJlyZskCVIZtXj(Ef-b#mYLfcfF!;ll@+XQXlAK->wZrSN3#K48+{ zzj~JEWbNqwTh%YF}A4J76G&mPimF2=G?OdE7%{4Lok$x{{ zQOlSSKorgt4c^`sY_qXLfwB}82u4H?+%Cu{4Lw{R4Z&*vt#=lzw%%&6zlr%fM-bZ= zJ+RGb)bYhtSXMNTJ`KdjFWhy*Wkg1{&zLa;eq-CgSBo_RztU;L?==hnZ2ea&)FD~G z(G%6RSmy8J095@L=(+8dYO(w_VgE@&kJs zoTR4n7>$SFO9(UA({&s{8$}zm-Kbzq!t|r&hfOb$l(uPK`vhWSw|++eEu6}Aj9DPL z)EEYZ=DdS1&l0)5f3rA^8ophQOGI5C6~Hr?(%z37$XK#QO!B+mQ~9jNro{MB@|`2+(f#<7vFK*gxBLkKPy1pXt_Z2rN5NLbfqKj=W+ueMz(3U zv9phli@RfoFnNec;?Y0y^j)`jTWYe(C!O;~aw;KX|6{39I3f3#Ik>8f?dv({vvf-W z6wTFgYPWEkn3#fLJrUU8)gv=?#}Uq+Op0R{1fEOj|1L_FMBP8~NM#?jh@bav zGp@L=-^cr$t$0jW?NdZNxxOHw&NV0~->Hb^tu$}P?fVz>rtuh+bZdi{8gj~ZlJ{N;{_)382zoH>t`ZLuRzOw9Xa=Q_g- zZk}Oq0#@ue;S5NGCp?g-wD z=mW6OVg?Qun$CT*vni%<^IGh}HH1~lty4z!*hokI{aYS#G`nOk8p$X+ovj%WjIfOH zWKnIC9PjEv;Ns%qG;KqG5a;9v$HUiN4jc@ec87U-dDYmelfunkW~q{B-d4vWEfY-w zQS5-o>ld$*6gI7LrpMcp-NhG4LgX;(I&!M{ZvLO{bbx>O5i&=%6M2u@{-^D*zeLYD z@sZ~ZjUBs`ov+WwuWu*$996wenKo;9sD-;ugM27AHNtU^=B<|3JhxPZ;zl1chpg|$ zeL7^69kCN6ZdkKM2kE|_GX)fCXf%Jm*`7D`KUT3%B??(XM&}m9O#w}PRbi3g6Ok3n z_yb~LTNVs850Q%%`#9Z3S;)!Bvv{ZPd+Ou5kIn8P@Gcjekm?-b=;ZuwdN)lo zXN(YFMr8>FBf@jbnSOF{g#$l)n#fXp%w61xWrll&`vAm3%RV^4#d+zibo~G`sGArV!pMy~Qmf z#FO>j1x|d=@3s@*MJOUpbM~|I1DI%E+Ro!#tnKVDR)6iEN+`Z|(Us*jd{q&Qa$5ek z_B%y|poU+HpYY0*#fQ2-+`1ujbythU3?Ls9`&c?)f+Epkv_( z;Lvcu^I6bA*{!Cc#@cL-kF)BDUpZ@<^3sV(>tUMCX!hL7?~^asL2&6V-zD%+yCD0o z!3H@Mg)#~EljdV?{HvJ18u~qufQ`Ajeg8M-p)pWg4@PR@ImQ2hm1?UwZsL8Jl_1;} zSk}l26MmTCZ}Il2=`4$~QO=lLSyADquvl&&#f*@d9oYW2I3p*hZ$4KsGsz!n(y&;6 zfJ#A0VbJW3+NTu*2kA)NfGN8Y(Fq<%Z_NlsApu^*FC-F(WfC$v-Xz==!HGN`m2imG zS2(^~$ykABL))38S{5p@XH^jfz@xr}g&!`msI;2NA`j4zyLIRYmk9A>UC4)7TvqPj z{ne?Hfd6j$KrqaZ|F4i;U3T_qzL?7zgzNa&nvXoZ)a~UScG)t*Q?}pQf~8uStijd? zxA6z3r@L*J6O5*$j2S$W>+9+=G7{O)%QG2#f_Pa2uO)kwFhtG~I5c}1Eb5E3b8`CA zFp`BWr~c|tzxxk{HYQsZJK)arwu(1_Tx>8k5KumuNU8216=Z+*Vjo1NIR zCeam)(5LnAsS09lL(n~y7Q1183P zLw!xqKlu{*pbno?Q>+LEU^Ky+eGM3A=GWlE4)n*KOc-WlB;i~Zoe4ahvi71-(N3L? ztXZtI558iff`uBOGaLYTu2OfnL7VHQ&GmVt(cV~r8R=J9I1>r)u^1OU;^a1HjEDQ- zavg?@k(BY0=z(_GIFnY1X>V>56=e_X7AQfSEO;yCttQsq`0-ib%xyLA_Iqj%*d|DcJEOR~IqN?z02c(J zO6_s*@E+Ljom*ON60elCk6JdBof0;@&dH$LiAoU1!Q=AXaviMYn@_FbEWcDLsj#B( zBEzNz;#@bPZr6R_viF4q6&5i1GISns0?CIJQu_Oc>{uY~cQrPzL16HIW0CsHQxoO_ zmvnD$7U6;qDONs@pEl8bKq#=AQj9WEQ+HtdTsWzPRc#SU?&AOVqOcIDwB#JO2&xw&dO0&4{s=My=!u@Wtx`-aEi@>KGewLCyvgddJ0De#<0kYt2bG=%wy z@gjsGfZb-y(+9M96{ZeEA24cg7SO7+K@#r{7v6?;BEQhO3c#yx#ZA%AU8E837|t{| z+@+D%zRa_&V6EUhz5PW2#{Z?qcFjWHD}_LcMB9Bt*Ab(SU*T+6e--P= z`V&nMns$Hs^W!54m%$m7dbv@e&1(dE>f#3yV`SloT?zLaJoH91hAE>xCRo5}r{IgY z{}-BDFawMShNO;wL2nxI){6(#87@T|VCL*IvdYQrlgu%ll6i?eC#YOv65JJD}*Nz!gYzQr=bcWutv zR?JQD8W^bk+-P=U>X7msUESt|BUtiI}B-J-V~&vx=DlDCB?4}Utt>Y36d zgqLc6as^pLp27dcEd;Qo_0IG+-s!@@)~n0uzmLVyMF@WJgbZKJ^5`&01e3lCe%T_m zWHcrGn*(3h%PgmMoU@lg#uFsba{#KIgo3TY6v)WxLnNKfIN&k8urHq;T^7Z~Z>`#O2 zh;W$uAbngO>^ZMfHj8?lFA#bx+~fTT=Uwu zJ0T)Z=b51hhMsqvREOGVO|7DR3WZ5mv$f|rS^AZ1T*isVx2}w?GaPrs%!&kPdXCu9 z-cfgXO}lj}XZza9_nReGUNL-RZdBD`I`<_ zQ6`3tWSU2u^41PysIVT=IQ-=S{{OufAZhsq-)d7z$>oLo7m@I!B0onLru*-xm8A(} zq0q7&C}ORRaRCXajqPi^rhZ6Vw1J)va#`rl=zXDWQbpPq()*5A)J!xqg7c57>MvRS z4}$__ISX;ocZK7~)eKwKM|C -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "APCSMART\-OLD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "APCSMART\-OLD" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/apcsmart.8 b/docs/man/apcsmart.8 index 692e2ba..1319553 100644 --- a/docs/man/apcsmart.8 +++ b/docs/man/apcsmart.8 @@ -2,12 +2,12 @@ .\" Title: apcsmart .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "APCSMART" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "APCSMART" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bcmxcp.8 b/docs/man/bcmxcp.8 index bee2f2c..924f293 100644 --- a/docs/man/bcmxcp.8 +++ b/docs/man/bcmxcp.8 @@ -2,12 +2,12 @@ .\" Title: bcmxcp .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BCMXCP" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "BCMXCP" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.8 index 0f31d4f..372672c 100644 --- a/docs/man/bcmxcp_usb.8 +++ b/docs/man/bcmxcp_usb.8 @@ -2,12 +2,12 @@ .\" Title: bcmxcp_usb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BCMXCP_USB" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "BCMXCP_USB" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkin.8 b/docs/man/belkin.8 index 2b9862f..d8d2e38 100644 --- a/docs/man/belkin.8 +++ b/docs/man/belkin.8 @@ -2,12 +2,12 @@ .\" Title: belkin .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BELKIN" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "BELKIN" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkinunv.8 b/docs/man/belkinunv.8 index 626e5ca..a01de36 100644 --- a/docs/man/belkinunv.8 +++ b/docs/man/belkinunv.8 @@ -2,12 +2,12 @@ .\" Title: belkinunv .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BELKINUNV" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "BELKINUNV" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -111,7 +111,7 @@ option is given, each status update is written on a new line\&. not supported by all hardware\&. .RE .PP -\fBbattery\&.voltage\fR, \fBbattery\&.voltage\&.nominal\fR, \fBdriver\&.version\&.internal\fR, \fBinput\&.frequency\fR, \fBinput\&.frequency\&.nominal\fR +\fBbattery\&.voltage\fR, \fBbattery\&.voltage\&.nominal\fR, \fBinput\&.frequency\fR, \fBinput\&.frequency\&.nominal\fR .RS 4 e\&.g\&. 60 for 60Hz .RE diff --git a/docs/man/belkinunv.txt b/docs/man/belkinunv.txt index 9f7b6af..cc8bb99 100644 --- a/docs/man/belkinunv.txt +++ b/docs/man/belkinunv.txt @@ -131,8 +131,6 @@ not supported by all hardware. *battery.voltage.nominal*:: -*driver.version.internal*:: - *input.frequency*:: *input.frequency.nominal*:: diff --git a/docs/man/bestfcom.8 b/docs/man/bestfcom.8 index dd57320..646a250 100644 --- a/docs/man/bestfcom.8 +++ b/docs/man/bestfcom.8 @@ -2,12 +2,12 @@ .\" Title: bestfcom .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTFCOM" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "BESTFCOM" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestfortress.8 b/docs/man/bestfortress.8 index e26767f..ad999d2 100644 --- a/docs/man/bestfortress.8 +++ b/docs/man/bestfortress.8 @@ -2,12 +2,12 @@ .\" Title: bestfortress .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTFORTRESS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "BESTFORTRESS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestuferrups.8 b/docs/man/bestuferrups.8 index 03319a1..0c62876 100644 --- a/docs/man/bestuferrups.8 +++ b/docs/man/bestuferrups.8 @@ -2,12 +2,12 @@ .\" Title: bestuferrups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTUFERRUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "BESTUFERRUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestups.8 b/docs/man/bestups.8 index 0f2f6af..0f7f491 100644 --- a/docs/man/bestups.8 +++ b/docs/man/bestups.8 @@ -2,12 +2,12 @@ .\" Title: bestups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BESTUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "BESTUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/blazer.8 b/docs/man/blazer.8 index 67d718a..1c53569 100644 --- a/docs/man/blazer.8 +++ b/docs/man/blazer.8 @@ -2,12 +2,12 @@ .\" Title: blazer .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "BLAZER" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "BLAZER" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/clone.8 b/docs/man/clone.8 index a19e23c..a2454bf 100644 --- a/docs/man/clone.8 +++ b/docs/man/clone.8 @@ -2,12 +2,12 @@ .\" Title: clone .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "CLONE" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "CLONE" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/dummy-ups.8 b/docs/man/dummy-ups.8 index fd0bc6f..732da10 100644 --- a/docs/man/dummy-ups.8 +++ b/docs/man/dummy-ups.8 @@ -2,12 +2,12 @@ .\" Title: dummy-ups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "DUMMY\-UPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "DUMMY\-UPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/etapro.8 b/docs/man/etapro.8 index 121131b..ea19eb9 100644 --- a/docs/man/etapro.8 +++ b/docs/man/etapro.8 @@ -2,12 +2,12 @@ .\" Title: etapro .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "ETAPRO" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "ETAPRO" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/everups.8 b/docs/man/everups.8 index de926f2..aa25297 100644 --- a/docs/man/everups.8 +++ b/docs/man/everups.8 @@ -2,12 +2,12 @@ .\" Title: everups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "EVERUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "EVERUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/gamatronic.8 b/docs/man/gamatronic.8 index ed1a1b0..4dde67d 100644 --- a/docs/man/gamatronic.8 +++ b/docs/man/gamatronic.8 @@ -2,12 +2,12 @@ .\" Title: gamatronic .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "GAMATRONIC" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "GAMATRONIC" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/genericups.8 b/docs/man/genericups.8 index 4d77ca4..17e70ea 100644 --- a/docs/man/genericups.8 +++ b/docs/man/genericups.8 @@ -2,12 +2,12 @@ .\" Title: genericups .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "GENERICUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "GENERICUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/hosts.conf.5 b/docs/man/hosts.conf.5 index dafb543..2fc59b0 100644 --- a/docs/man/hosts.conf.5 +++ b/docs/man/hosts.conf.5 @@ -2,12 +2,12 @@ .\" Title: hosts.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "HOSTS\&.CONF" "5" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "HOSTS\&.CONF" "5" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/isbmex.8 b/docs/man/isbmex.8 index 04a46d4..766f102 100644 --- a/docs/man/isbmex.8 +++ b/docs/man/isbmex.8 @@ -2,12 +2,12 @@ .\" Title: isbmex .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "ISBMEX" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "ISBMEX" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ivtscd.8 b/docs/man/ivtscd.8 index 66b5ae9..d28fd9f 100644 --- a/docs/man/ivtscd.8 +++ b/docs/man/ivtscd.8 @@ -2,12 +2,12 @@ .\" Title: ivtscd .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "IVTSCD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "IVTSCD" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libupsclient-config.1 b/docs/man/libupsclient-config.1 index e6d281e..6c8d717 100644 --- a/docs/man/libupsclient-config.1 +++ b/docs/man/libupsclient-config.1 @@ -2,12 +2,12 @@ .\" Title: libupsclient-config .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "LIBUPSCLIENT\-CONFIG" "1" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "LIBUPSCLIENT\-CONFIG" "1" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert-esp2.8 b/docs/man/liebert-esp2.8 index db12ebc..79a7b1c 100644 --- a/docs/man/liebert-esp2.8 +++ b/docs/man/liebert-esp2.8 @@ -2,12 +2,12 @@ .\" Title: liebert-esp2 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "LIEBERT\-ESP2" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "LIEBERT\-ESP2" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert.8 b/docs/man/liebert.8 index cc4ab97..26edf5c 100644 --- a/docs/man/liebert.8 +++ b/docs/man/liebert.8 @@ -2,12 +2,12 @@ .\" Title: liebert .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "LIEBERT" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "LIEBERT" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/macosx-ups.8 b/docs/man/macosx-ups.8 new file mode 100644 index 0000000..dd01029 --- /dev/null +++ b/docs/man/macosx-ups.8 @@ -0,0 +1,81 @@ +'\" t +.\" Title: macosx-ups +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.75.2 +.\" Date: 08/08/2012 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools +.\" Language: English +.\" +.TH "MACOSX\-UPS" "8" "08/08/2012" "Network UPS Tools" "NUT Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +macosx-ups \- monitor for Mac OS X built\-in UPS and battery driver +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the \fBmacosx\-ups\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +\fBmacosx\-ups\fR supports any USB HID Power Device Class (PDC) UPS which is matched by the Mac OS X built\-in drivers\&. It also can monitor a laptop internal battery as though it were an UPS\&. +.sp +If the UPS is visible in the Energy Saver preferences pane of System Preferences, this driver should be able to monitor it\&. +.SH "EXTRA ARGUMENTS" +.PP +\fBport\fR=\fIregex\fR +.RS 4 +The +\fBport\fR +parameter in the configuration file can be a case\-insensitive extended regular expression (see +\fBregex\fR(3) for details) to match against specific UPS and battery names\&. +.sp +The traditional NUT auto\-detection value of "auto" will be changed to "/UPS"\&. To test this driver against the internal battery of a laptop, a value such as "battery" can be used\&. +.RE +.PP +\fBmodel\fR=\fIregex\fR +.RS 4 +Likewise, if you have more than one UPS, it may be necessary to specify a +\fBmodel\fR +name to match against\&. This parameter is also a case\-insensitive extended regular expression\&. +.RE +.SH "DIAGNOSTICS" +.sp +If the driver cannot find an UPS, first open System Preferences and see if there is an "UPS" tab on the Energy Saver panel\&. If so, re\-run the driver with the \fB\-D\fR flag to list the names of the power sources found\&. +.SH "KNOWN ISSUES AND BUGS" +.sp +This driver is a monitoring\-only driver, and cannot shut down an UPS on its own\&. However, this should not be a problem in practice: it is monitoring the built\-in Mac OS X UPS driver, which has configuration options for several shutdown scenarios\&. Consult the Energy Saver control panel or \fBpmset\fR(8) for more information\&. +.sp +The default distribution of \fBapcupsd\fR installs a kernel extension which prevents Mac OS X from attaching to the UPS\&. In order to use this driver after installing apcupsd, you must first run the apcupsd\-uninstall script and reboot\&. +.sp +Note that other UPS monitoring solutions may show more detail than what is provided by the built\-in Mac OS X driver\&. In particular, voltages other than the battery voltage, as well as current and frequency, are typically not shown\&. It may be possible to monitor these values with \fBapcupsd\fR (for APC hardware only) or \fBusbhid-ups\fR(8)\&. +.SH "AUTHORS" +.sp +Charles Lepple +.SH "SEE ALSO" +.sp +\fBusbhid-ups\fR(8), \fBpmset\fR(8), \fBregex\fR(3) +.SS "The core driver:" +.sp +\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/ diff --git a/docs/man/macosx-ups.txt b/docs/man/macosx-ups.txt new file mode 100644 index 0000000..9202f5b --- /dev/null +++ b/docs/man/macosx-ups.txt @@ -0,0 +1,104 @@ +MACOSX-UPS(8) +============= + +NAME +---- +macosx-ups - monitor for Mac OS X built-in UPS and battery driver + +NOTE +---- +This man page only documents the hardware-specific features of the +*macosx-ups* driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +*macosx-ups* supports any USB HID Power Device Class (PDC) UPS which is +matched by the Mac OS X built-in drivers. It also can monitor a laptop +internal battery as though it were an UPS. + +If the UPS is visible in the Energy Saver preferences pane of System +Preferences, this driver should be able to monitor it. + + +EXTRA ARGUMENTS +---------------- +*port*='regex':: +The *port* parameter in the configuration file can be a case-insensitive +extended regular expression (see *regex*(3) for details) to match against +specific UPS and battery names. ++ +The traditional NUT auto-detection value of "auto" will be changed to "/UPS". +To test this driver against the internal battery of a laptop, a value such as +"battery" can be used. + +*model*='regex':: +Likewise, if you have more than one UPS, it may be necessary to specify a +*model* name to match against. This parameter is also a case-insensitive +extended regular expression. + +////////////////////////////////////////// +This driver also supports the following optional settings: + +*option1*='num':: +Set the value of ... to 'num'. Contrast with *option2*. + +*option2*='string':: +Some other option. +////////////////////////////////////////// + +////////////////////////////////////////// +Optional: list supported instant commands here: + +INSTANT COMMANDS +---------------- + +*instcmd1*:: +Command 1. +////////////////////////////////////////// + +DIAGNOSTICS +----------- + +If the driver cannot find an UPS, first open System Preferences and see if +there is an "UPS" tab on the Energy Saver panel. If so, re-run the driver with +the *-D* flag to list the names of the power sources found. + +KNOWN ISSUES AND BUGS +--------------------- + +This driver is a monitoring-only driver, and cannot shut down an UPS on its +own. However, this should not be a problem in practice: it is monitoring the +built-in Mac OS X UPS driver, which has configuration options for several +shutdown scenarios. Consult the Energy Saver control panel or *pmset*(8) for +more information. + +The default distribution of *apcupsd* installs a kernel extension which +prevents Mac OS X from attaching to the UPS. In order to use this driver after +installing apcupsd, you must first run the `apcupsd-uninstall` script and +reboot. + +Note that other UPS monitoring solutions may show more detail than what is +provided by the built-in Mac OS X driver. In particular, voltages other than +the battery voltage, as well as current and frequency, are typically not +shown. It may be possible to monitor these values with *apcupsd* (for APC +hardware only) or linkman:usbhid-ups[8]. + +AUTHORS +------- +Charles Lepple + +SEE ALSO +-------- + +linkman:usbhid-ups[8], *pmset*(8), *regex*(3) + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + +The apcupsd home page: http://www.apcupsd.org/ diff --git a/docs/man/masterguard.8 b/docs/man/masterguard.8 index 4dd5aca..e04c066 100644 --- a/docs/man/masterguard.8 +++ b/docs/man/masterguard.8 @@ -2,12 +2,12 @@ .\" Title: masterguard .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MASTERGUARD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "MASTERGUARD" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/metasys.8 b/docs/man/metasys.8 index 4bcbaf0..4d306cf 100644 --- a/docs/man/metasys.8 +++ b/docs/man/metasys.8 @@ -2,12 +2,12 @@ .\" Title: metasys .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "METASYS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "METASYS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/mge-shut.8 b/docs/man/mge-shut.8 index a2188cd..7f4c40d 100644 --- a/docs/man/mge-shut.8 +++ b/docs/man/mge-shut.8 @@ -2,12 +2,12 @@ .\" Title: mge-shut .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MGE\-SHUT" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "MGE\-SHUT" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -94,13 +94,28 @@ warn you upon startup if it isn\(cqt\&. Some UPS\(cqes will restart no matter wh in \fBups\&.conf\fR helps\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +ondelay parameter was set in ten seconds unit in the legacy mge\-shut driver ( 3 for 30 seconds) \&. It is now set in seconds ( 30 for 30 seconds)\&. Make sure you use the correct unit in your configuration\&. +.sp .5v +.RE .RE .PP \fBnotification\fR=\fInum\fR .RS 4 Set notification type to 1 (no), 2 (light) or 3 (yes)\&. .sp -The default value is 3 (yes) because of some early Ellipse models which need it\&. +This argument is ignored\&. It is only here for backward compatibility\&. .RE .SH "KNOWN ISSUES" .SS "Repetitive timeout and staleness" diff --git a/docs/man/mge-shut.txt b/docs/man/mge-shut.txt index 76a9241..d8e19c3 100644 --- a/docs/man/mge-shut.txt +++ b/docs/man/mge-shut.txt @@ -56,12 +56,15 @@ than offdelay, but the driver will *not* warn you upon startup if it isn't. Some UPS'es will restart no matter what, even if the power is (still) out at the moment this timer elapses. In that case, you could try if setting 'ondelay = -1' in *ups.conf* helps. ++ +WARNING: ondelay parameter was set in ten seconds unit in the legacy mge-shut +driver ( 3 for 30 seconds) . It is now set in seconds ( 30 for 30 seconds). +Make sure you use the correct unit in your configuration. *notification*='num':: Set notification type to 1 (no), 2 (light) or 3 (yes). + -The default value is 3 (yes) because of some early Ellipse models which -need it. +This argument is ignored. It is only here for backward compatibility. KNOWN ISSUES ------------ diff --git a/docs/man/mge-utalk.8 b/docs/man/mge-utalk.8 index 670c4be..d94ab38 100644 --- a/docs/man/mge-utalk.8 +++ b/docs/man/mge-utalk.8 @@ -2,12 +2,12 @@ .\" Title: mge-utalk .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MGE\-UTALK" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "MGE\-UTALK" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/microdowell.8 b/docs/man/microdowell.8 index f888340..587e4b7 100644 --- a/docs/man/microdowell.8 +++ b/docs/man/microdowell.8 @@ -2,12 +2,12 @@ .\" Title: microdowell .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "MICRODOWELL" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "MICRODOWELL" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/netxml-ups.8 b/docs/man/netxml-ups.8 index 69df2fe..abee892 100644 --- a/docs/man/netxml-ups.8 +++ b/docs/man/netxml-ups.8 @@ -2,12 +2,12 @@ .\" Title: netxml-ups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NETXML\-UPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "NETXML\-UPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nut-ipmipsu.8 b/docs/man/nut-ipmipsu.8 index 9ff396a..9a2beed 100644 --- a/docs/man/nut-ipmipsu.8 +++ b/docs/man/nut-ipmipsu.8 @@ -2,12 +2,12 @@ .\" Title: nut-ipmipsu .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUT\-IPMIPSU" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "NUT\-IPMIPSU" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -167,7 +167,7 @@ means that the PSU is present and providing power, .IP \(bu 2.3 .\} -\fIOB\fR +\fIOFF\fR means that the PSU is present but not providing power (power cable removed), .RE .sp @@ -181,7 +181,7 @@ means that the PSU is present but not providing power (power cable removed), .\} \fIstale\fR -means that the PSU is not present (ie physically removed)\&. +(no data) means that the PSU is not present (ie physically removed)\&. .RE .RE .sp diff --git a/docs/man/nut-ipmipsu.txt b/docs/man/nut-ipmipsu.txt index cef3a14..11c4f5c 100644 --- a/docs/man/nut-ipmipsu.txt +++ b/docs/man/nut-ipmipsu.txt @@ -70,8 +70,8 @@ This driver will report various information related to a PSU, including: - status of the PSU: * 'OL' means that the PSU is present and providing power, - * 'OB' means that the PSU is present but not providing power (power cable removed), - * 'stale' means that the PSU is not present (ie physically removed). + * 'OFF' means that the PSU is present but not providing power (power cable removed), + * 'stale' (no data) means that the PSU is not present (ie physically removed). Here is an example output for a Dell r610 server: diff --git a/docs/man/nut-recorder.8 b/docs/man/nut-recorder.8 index de8969d..6e93400 100644 --- a/docs/man/nut-recorder.8 +++ b/docs/man/nut-recorder.8 @@ -2,12 +2,12 @@ .\" Title: nut-recorder .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUT\-RECORDER" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "NUT\-RECORDER" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nut-scanner.8 b/docs/man/nut-scanner.8 index 04e926c..d3caaa7 100644 --- a/docs/man/nut-scanner.8 +++ b/docs/man/nut-scanner.8 @@ -2,12 +2,12 @@ .\" Title: nut-scanner .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUT\-SCANNER" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "NUT\-SCANNER" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -39,7 +39,7 @@ nut-scanner \- scan communication buses for NUT devices \fBnut\-scanner\fR scans available communication buses and displays any NUT\-compatible devices it has found\&. .SH "INSTALLATION" .sp -\fBnut\-scanner\fR is always built by default\&. However, available options (USB, SNMP, IPMI, \&...) will vary according to the available compile time and runtime dependencies\&. For example, if Net\-SNMP is installed, thus providing libsnmp (\&.so or \&.dll) and headers, both during compilation and runtime, then SNMP discovery will be available\&. +\fBnut\-scanner\fR is only built if libltdl (part of libtool development suite) is available\&. Available options (USB, SNMP, IPMI, \&...) will vary according to the available compile time and runtime dependencies\&. For example, if Net\-SNMP is installed, thus providing libsnmp (\&.so or \&.dll) and headers, both during compilation and runtime, then SNMP discovery will be available\&. .SH "OPTIONS" .PP \fB\-h\fR diff --git a/docs/man/nut-scanner.txt b/docs/man/nut-scanner.txt index 2f517ee..6948449 100644 --- a/docs/man/nut-scanner.txt +++ b/docs/man/nut-scanner.txt @@ -21,11 +21,11 @@ NUT-compatible devices it has found. INSTALLATION ------------ -*nut-scanner* is always built by default. However, available options -(USB, SNMP, IPMI, ...) will vary according to the available compile time -and runtime dependencies. For example, if Net-SNMP is installed, thus -providing libsnmp (.so or .dll) and headers, both during compilation -and runtime, then SNMP discovery will be available. +*nut-scanner* is only built if libltdl (part of libtool development suite) +is available. Available options (USB, SNMP, IPMI, ...) will vary according +to the available compile time and runtime dependencies. For example, if +Net-SNMP is installed, thus providing libsnmp (.so or .dll) and headers, +both during compilation and runtime, then SNMP discovery will be available. OPTIONS ------- diff --git a/docs/man/nut.conf.5 b/docs/man/nut.conf.5 index 4231178..fac56d5 100644 --- a/docs/man/nut.conf.5 +++ b/docs/man/nut.conf.5 @@ -2,12 +2,12 @@ .\" Title: nut.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUT\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "NUT\&.CONF" "5" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan.3 b/docs/man/nutscan.3 index 022ede7..3edfcf2 100644 --- a/docs/man/nutscan.3 +++ b/docs/man/nutscan.3 @@ -2,12 +2,12 @@ .\" Title: nutscan .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,10 +33,10 @@ nutscan \- Network UPS Tools (NUT) device discovery library .sp The Network UPS Tools (NUT) \fBnutscan\fR library provides the same discovery related features that are also offered by \fBnut-scanner\fR(8)\&. .sp -It allows to discover supported NUT devices (USB, SNMP, Eaton XML/HTTP and IPMI) and NUT servers (using Avahi or the classic connection method)\&. +It enables the discovery of supported NUT devices (USB, SNMP, Eaton XML/HTTP and IPMI) and NUT servers (using Avahi, or the classic connection method)\&. .SH "DISCOVERY FUNCTIONS" .sp -First, include the needed header file: +First, include the required header file: .sp .if n \{\ .RS 4 @@ -128,9 +128,9 @@ for NUT servers (upsd), using the mDNS (Avahi) method, for supported IPMI PSU\&. .RE .sp -All these functions return a list of devices found, using the nutscan_device_t structure\&. This one is described in \fBnutscan_add_device_to_device\fR(3)\&. +All of these functions return a list of devices found, using the nutscan_device_t structure\&. This structure is described in \fBnutscan_add_device_to_device\fR(3)\&. .sp -Helper functions are also provided to output data using standard format: +Helper functions are also provided to output data using standard formats: .sp .RS 4 .ie n \{\ @@ -159,7 +159,7 @@ for ups\&.conf style\&. .RE .SH "ERROR HANDLING" .sp -There is currently no specific mechanism around error handling\&. +There is currently no specific mechanism for error handling\&. .SH "SEE ALSO" .sp -\fBnut-scanner\fR(8), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_snmp\fR(3) \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3) \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3) \fBnutscan_display_parsable\fR(3), \fBnutscan_display_ups_conf\fR(3) \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3) \fBnutscan_add_device_to_device\fR(3), \fBnutscan_add_option_to_device\fR(3) \fBnutscan_cidr_to_ip\fR(3) +\fBnut-scanner\fR(8), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3), http://avahi\&.org/ diff --git a/docs/man/nutscan.txt b/docs/man/nutscan.txt index 030a910..90ac366 100644 --- a/docs/man/nutscan.txt +++ b/docs/man/nutscan.txt @@ -12,14 +12,14 @@ DESCRIPTION The Network UPS Tools (NUT) *nutscan* library provides the same discovery related features that are also offered by linkman:nut-scanner[8]. -It allows to discover supported NUT devices (USB, SNMP, Eaton XML/HTTP and IPMI) -and NUT servers (using Avahi or the classic connection method). +It enables the discovery of supported NUT devices (USB, SNMP, Eaton XML/HTTP +and IPMI) and NUT servers (using Avahi, or the classic connection method). DISCOVERY FUNCTIONS ------------------- -First, include the needed header file: +First, include the required header file: #include @@ -33,10 +33,10 @@ Then, to discover new devices, use the appropriate function: - linkman:nutscan_scan_ipmi[3] for supported IPMI PSU. -All these functions return a list of devices found, using the nutscan_device_t -structure. This one is described in linkman:nutscan_add_device_to_device[3]. +All of these functions return a list of devices found, using the nutscan_device_t +structure. This structure is described in linkman:nutscan_add_device_to_device[3]. -Helper functions are also provided to output data using standard format: +Helper functions are also provided to output data using standard formats: - linkman:nutscan_display_parsable[3] for parsable output, - linkman:nutscan_display_ups_conf[3] for ups.conf style. @@ -44,16 +44,17 @@ Helper functions are also provided to output data using standard format: ERROR HANDLING -------------- -There is currently no specific mechanism around error handling. +There is currently no specific mechanism for error handling. SEE ALSO -------- linkman:nut-scanner[8], -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_snmp[3] -linkman:nutscan_scan_xml_http[3], linkman:nutscan_scan_nut[3] -linkman:nutscan_scan_avahi[3], linkman:nutscan_scan_ipmi[3] -linkman:nutscan_display_parsable[3], linkman:nutscan_display_ups_conf[3] -linkman:nutscan_new_device[3], linkman:nutscan_free_device[3] -linkman:nutscan_add_device_to_device[3], linkman:nutscan_add_option_to_device[3] -linkman:nutscan_cidr_to_ip[3] +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_scan_xml_http[3], linkman:nutscan_scan_nut[3], +linkman:nutscan_scan_avahi[3], linkman:nutscan_scan_ipmi[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], +linkman:nutscan_add_device_to_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_cidr_to_ip[3], +http://avahi.org/ diff --git a/docs/man/nutscan_add_device_to_device.3 b/docs/man/nutscan_add_device_to_device.3 index 91c0153..703f525 100644 --- a/docs/man/nutscan_add_device_to_device.3 +++ b/docs/man/nutscan_add_device_to_device.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_add_device_to_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_ADD_DEVICE_T" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_ADD_DEVICE_T" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_add_option_to_device.3 b/docs/man/nutscan_add_option_to_device.3 index 4075e39..3080806 100644 --- a/docs/man/nutscan_add_option_to_device.3 +++ b/docs/man/nutscan_add_option_to_device.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_add_option_to_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_ADD_OPTION_T" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_ADD_OPTION_T" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_cidr_to_ip.3 b/docs/man/nutscan_cidr_to_ip.3 index 56a6454..776047a 100644 --- a/docs/man/nutscan_cidr_to_ip.3 +++ b/docs/man/nutscan_cidr_to_ip.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_cidr_to_ip .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_CIDR_TO_IP" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_CIDR_TO_IP" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_display_parsable.3 b/docs/man/nutscan_display_parsable.3 index aee3034..8562486 100644 --- a/docs/man/nutscan_display_parsable.3 +++ b/docs/man/nutscan_display_parsable.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_display_parsable .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_PARS" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_DISPLAY_PARS" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_display_ups_conf.3 b/docs/man/nutscan_display_ups_conf.3 index cc8d242..1b9017d 100644 --- a/docs/man/nutscan_display_ups_conf.3 +++ b/docs/man/nutscan_display_ups_conf.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_display_ups_conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_UPS_" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_DISPLAY_UPS_" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_free_device.3 b/docs/man/nutscan_free_device.3 index d3d462c..616cef6 100644 --- a/docs/man/nutscan_free_device.3 +++ b/docs/man/nutscan_free_device.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_free_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_FREE_DEVICE" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_FREE_DEVICE" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_init.3 b/docs/man/nutscan_init.3 index 24c62ba..644033e 100644 --- a/docs/man/nutscan_init.3 +++ b/docs/man/nutscan_init.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_init .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_INIT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_INIT" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_new_device.3 b/docs/man/nutscan_new_device.3 index 028b201..fda0bf4 100644 --- a/docs/man/nutscan_new_device.3 +++ b/docs/man/nutscan_new_device.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_new_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_NEW_DEVICE" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_NEW_DEVICE" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_avahi.3 b/docs/man/nutscan_scan_avahi.3 index 2bf5d71..6ebc0a9 100644 --- a/docs/man/nutscan_scan_avahi.3 +++ b/docs/man/nutscan_scan_avahi.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_avahi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_AVAHI" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_AVAHI" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -nutscan_scan_avahi \- Scan network for NUT services via AVAHI\&. +nutscan_scan_avahi \- Scan network for NUT services via mDNS .SH "SYNOPSIS" .sp .nf @@ -40,14 +40,14 @@ nutscan_device_t * nutscan_scan_avahi(long usec_timeout); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_scan_avahi()\fR function try to detect NUT service and its associated devcies\&. It uses the AVAHI library to do so\&. +The \fBnutscan_scan_avahi()\fR function tries to detect the NUT service via mDNS, and its associated devices\&. It uses the Avahi library to do so\&. .sp You MUST call \fBnutscan_init\fR(3) before using this function\&. .sp -This function waits up to \fIusec_timeout\fR microseconds before considering an IP address does not respond\&. +This function waits up to \fIusec_timeout\fR microseconds before considering an IP address to be unresponsive\&. .SH "RETURN VALUE" .sp -The \fBnutscan_scan_avahi()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. +The \fBnutscan_scan_avahi()\fR function returns a pointer to a nutscan_device_t structure containing all found devices\&. It returns NULL if an error occurs, or if no device is found\&. .SH "SEE ALSO" .sp -\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) +\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3), http://avahi\&.org/ diff --git a/docs/man/nutscan_scan_avahi.txt b/docs/man/nutscan_scan_avahi.txt index 15ccbb2..32c39e7 100644 --- a/docs/man/nutscan_scan_avahi.txt +++ b/docs/man/nutscan_scan_avahi.txt @@ -4,7 +4,7 @@ NUTSCAN_SCAN_AVAHI(3) NAME ---- -nutscan_scan_avahi - Scan network for NUT services via AVAHI. +nutscan_scan_avahi - Scan network for NUT services via mDNS SYNOPSIS -------- @@ -16,16 +16,20 @@ SYNOPSIS DESCRIPTION ----------- -The *nutscan_scan_avahi()* function try to detect NUT service and its associated devcies. It uses the AVAHI library to do so. +The *nutscan_scan_avahi()* function tries to detect the NUT service via mDNS, +and its associated devices. It uses the Avahi library to do so. You MUST call linkman:nutscan_init[3] before using this function. -This function waits up to 'usec_timeout' microseconds before considering an IP address does not respond. +This function waits up to 'usec_timeout' microseconds before considering an IP +address to be unresponsive. RETURN VALUE ------------ -The *nutscan_scan_avahi()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. +The *nutscan_scan_avahi()* function returns a pointer to a `nutscan_device_t` +structure containing all found devices. It returns NULL if an error occurs, or +if no device is found. SEE ALSO -------- @@ -35,4 +39,5 @@ linkman:nutscan_scan_nut[3], linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], -linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] +linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3], +http://avahi.org/ diff --git a/docs/man/nutscan_scan_ipmi.3 b/docs/man/nutscan_scan_ipmi.3 index 890c96c..ec9e33c 100644 --- a/docs/man/nutscan_scan_ipmi.3 +++ b/docs/man/nutscan_scan_ipmi.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_ipmi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_IPMI" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_IPMI" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_nut.3 b/docs/man/nutscan_scan_nut.3 index d40b690..c846181 100644 --- a/docs/man/nutscan_scan_nut.3 +++ b/docs/man/nutscan_scan_nut.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_nut .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_NUT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_NUT" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_snmp.3 b/docs/man/nutscan_scan_snmp.3 index dcdaa04..3838bd6 100644 --- a/docs/man/nutscan_scan_snmp.3 +++ b/docs/man/nutscan_scan_snmp.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_snmp .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_SNMP" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_SNMP" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_usb.3 b/docs/man/nutscan_scan_usb.3 index 40968c0..ac976e6 100644 --- a/docs/man/nutscan_scan_usb.3 +++ b/docs/man/nutscan_scan_usb.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_usb .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_USB" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_USB" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_xml_http.3 b/docs/man/nutscan_scan_xml_http.3 index d3c42cd..bc0bae8 100644 --- a/docs/man/nutscan_scan_xml_http.3 +++ b/docs/man/nutscan_scan_xml_http.3 @@ -2,12 +2,12 @@ .\" Title: nutscan_scan_xml_http .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTSCAN_SCAN_XML_HTT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTSCAN_SCAN_XML_HTT" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutupsdrv.8 b/docs/man/nutupsdrv.8 index 262ddbc..d4eb941 100644 --- a/docs/man/nutupsdrv.8 +++ b/docs/man/nutupsdrv.8 @@ -2,12 +2,12 @@ .\" Title: nutupsdrv .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "NUTUPSDRV" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "NUTUPSDRV" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/oneac.8 b/docs/man/oneac.8 index b468b38..7625522 100644 --- a/docs/man/oneac.8 +++ b/docs/man/oneac.8 @@ -2,12 +2,12 @@ .\" Title: oneac .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "ONEAC" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "ONEAC" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/optiups.8 b/docs/man/optiups.8 index 7e48a29..df63076 100644 --- a/docs/man/optiups.8 +++ b/docs/man/optiups.8 @@ -2,12 +2,12 @@ .\" Title: optiups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "OPTIUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "OPTIUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powercom.8 b/docs/man/powercom.8 index 24f1c05..f93c6b2 100644 --- a/docs/man/powercom.8 +++ b/docs/man/powercom.8 @@ -2,12 +2,12 @@ .\" Title: powercom .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "POWERCOM" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "POWERCOM" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,13 +28,15 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -powercom \- UPS driver for Powercom/Trust/Advice UPS equipment +powercom \- UPS driver for serial Powercom/Trust/Advice UPS equipment .SH "NOTE" .sp This man page only documents the hardware\-specific features of the powercom driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "SUPPORTED HARDWARE" .sp -This driver supports many similar kinds of UPS hardware\&. The most common ones are the Trust 425/625, Powercom, and Advice Partner/King PR750\&. Others using the same protocol may also work\&. +This driver supports many similar kinds of serial UPS hardware (as well as a few USB UPS models with USB\-to\-serial adapters)\&. The most common ones are the Trust 425/625, Powercom, and Advice Partner/King PR750\&. Others using the same protocol may also work\&. For USB connections, you might need \fBusbhid-ups\fR(8)\&. +.sp +For more specific guidance on which driver is applicable for a USB connection, see the NUT Hardware Compatibility List (HCL)\&. .SH "EXTRA ARGUMENTS" .sp This driver supports the following optional settings in the \fBups.conf\fR(5) file: diff --git a/docs/man/powercom.txt b/docs/man/powercom.txt index f01bd9a..b7516ff 100644 --- a/docs/man/powercom.txt +++ b/docs/man/powercom.txt @@ -4,7 +4,7 @@ POWERCOM(8) NAME ---- -powercom - UPS driver for Powercom/Trust/Advice UPS equipment +powercom - UPS driver for serial Powercom/Trust/Advice UPS equipment NOTE ---- @@ -14,9 +14,13 @@ linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ -This driver supports many similar kinds of UPS hardware. The most common -ones are the Trust 425/625, Powercom, and Advice Partner/King PR750. -Others using the same protocol may also work. +This driver supports many similar kinds of serial UPS hardware (as well as a +few USB UPS models with USB-to-serial adapters). The most common ones are the +Trust 425/625, Powercom, and Advice Partner/King PR750. Others using the same +protocol may also work. For USB connections, you might need linkman:usbhid-ups[8]. + +For more specific guidance on which driver is applicable for a USB connection, +see the NUT Hardware Compatibility List (HCL). EXTRA ARGUMENTS --------------- diff --git a/docs/man/powerman-pdu.8 b/docs/man/powerman-pdu.8 index d8f4bc3..a58f181 100644 --- a/docs/man/powerman-pdu.8 +++ b/docs/man/powerman-pdu.8 @@ -2,12 +2,12 @@ .\" Title: powerman-pdu .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "POWERMAN\-PDU" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "POWERMAN\-PDU" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powerpanel.8 b/docs/man/powerpanel.8 index 53f5d5e..d96339f 100644 --- a/docs/man/powerpanel.8 +++ b/docs/man/powerpanel.8 @@ -2,12 +2,12 @@ .\" Title: powerpanel .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "POWERPANEL" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "POWERPANEL" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/rhino.8 b/docs/man/rhino.8 index c92c25c..cd2fdc9 100644 --- a/docs/man/rhino.8 +++ b/docs/man/rhino.8 @@ -2,12 +2,12 @@ .\" Title: rhino .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "RHINO" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "RHINO" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/richcomm_usb.8 b/docs/man/richcomm_usb.8 index ab5f191..c92e918 100644 --- a/docs/man/richcomm_usb.8 +++ b/docs/man/richcomm_usb.8 @@ -2,12 +2,12 @@ .\" Title: richcomm_usb .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "RICHCOMM_USB" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "RICHCOMM_USB" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/safenet.8 b/docs/man/safenet.8 index c21a244..9d8b67b 100644 --- a/docs/man/safenet.8 +++ b/docs/man/safenet.8 @@ -2,12 +2,12 @@ .\" Title: safenet .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "SAFENET" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "SAFENET" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/skel.txt b/docs/man/skel.txt index f98cd2c..8bf885f 100644 --- a/docs/man/skel.txt +++ b/docs/man/skel.txt @@ -43,6 +43,7 @@ CABLING ////////////////////////////////////////// EXTRA ARGUMENTS +--------------- This driver also supports the following optional settings: *option1*='num':: @@ -70,6 +71,15 @@ INSTALLATION ////////////////////////////////////////// +////////////////////////////////////////// +Optional: use DIAGNOSTICS to describe troubleshooting techniques that are +longer than what can be conveniently described in the driver error messages. + +DIAGNOSTICS +----------- + +////////////////////////////////////////// + ////////////////////////////////////////// You may leave this as "none known at this time", or describe any trouble encountered when implementing the protocol for your UPS. diff --git a/docs/man/snmp-ups.8 b/docs/man/snmp-ups.8 index d431961..9db1748 100644 --- a/docs/man/snmp-ups.8 +++ b/docs/man/snmp-ups.8 @@ -2,12 +2,12 @@ .\" Title: snmp-ups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "SNMP\-UPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "SNMP\-UPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/solis.8 b/docs/man/solis.8 index da4d0e9..6c213d0 100644 --- a/docs/man/solis.8 +++ b/docs/man/solis.8 @@ -2,12 +2,12 @@ .\" Title: solis .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "SOLIS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "SOLIS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplite.8 b/docs/man/tripplite.8 index a74c0cf..d9a9c04 100644 --- a/docs/man/tripplite.8 +++ b/docs/man/tripplite.8 @@ -2,12 +2,12 @@ .\" Title: tripplite .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "TRIPPLITE" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "TRIPPLITE" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplite_usb.8 b/docs/man/tripplite_usb.8 index 5a71c35..424f93f 100644 --- a/docs/man/tripplite_usb.8 +++ b/docs/man/tripplite_usb.8 @@ -2,12 +2,12 @@ .\" Title: tripplite_usb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "TRIPPLITE_USB" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "TRIPPLITE_USB" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplitesu.8 b/docs/man/tripplitesu.8 index 366af7c..cd212ad 100644 --- a/docs/man/tripplitesu.8 +++ b/docs/man/tripplitesu.8 @@ -2,12 +2,12 @@ .\" Title: tripplitesu .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "TRIPPLITESU" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "TRIPPLITESU" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ups.conf.5 b/docs/man/ups.conf.5 index 0abc9a1..5db9e12 100644 --- a/docs/man/ups.conf.5 +++ b/docs/man/ups.conf.5 @@ -2,12 +2,12 @@ .\" Title: ups.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPS\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPS\&.CONF" "5" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsc.8 b/docs/man/upsc.8 index 115da0e..8b90ae1 100644 --- a/docs/man/upsc.8 +++ b/docs/man/upsc.8 @@ -2,12 +2,12 @@ .\" Title: upsc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSC" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSC" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_connect.3 b/docs/man/upscli_connect.3 index f696834..44d7b8f 100644 --- a/docs/man/upscli_connect.3 +++ b/docs/man/upscli_connect.3 @@ -2,12 +2,12 @@ .\" Title: upscli_connect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_CONNECT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_CONNECT" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_disconnect.3 b/docs/man/upscli_disconnect.3 index b51af56..daa9ab8 100644 --- a/docs/man/upscli_disconnect.3 +++ b/docs/man/upscli_disconnect.3 @@ -2,12 +2,12 @@ .\" Title: upscli_disconnect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_DISCONNECT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_DISCONNECT" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_fd.3 b/docs/man/upscli_fd.3 index 4c22874..3876e72 100644 --- a/docs/man/upscli_fd.3 +++ b/docs/man/upscli_fd.3 @@ -2,12 +2,12 @@ .\" Title: upscli_fd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_FD" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_FD" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_get.3 b/docs/man/upscli_get.3 index 5fa3550..4c6c501 100644 --- a/docs/man/upscli_get.3 +++ b/docs/man/upscli_get.3 @@ -2,12 +2,12 @@ .\" Title: upscli_get .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_GET" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_GET" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_list_next.3 b/docs/man/upscli_list_next.3 index 028df71..2a1687f 100644 --- a/docs/man/upscli_list_next.3 +++ b/docs/man/upscli_list_next.3 @@ -2,12 +2,12 @@ .\" Title: upscli_list_next .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_LIST_NEXT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_LIST_NEXT" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_list_start.3 b/docs/man/upscli_list_start.3 index 9f7134b..ba5c0a8 100644 --- a/docs/man/upscli_list_start.3 +++ b/docs/man/upscli_list_start.3 @@ -2,12 +2,12 @@ .\" Title: upscli_list_start .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/31/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_LIST_START" "3" "05/31/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_LIST_START" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_readline.3 b/docs/man/upscli_readline.3 index 6f5be4a..fd7d5fa 100644 --- a/docs/man/upscli_readline.3 +++ b/docs/man/upscli_readline.3 @@ -2,12 +2,12 @@ .\" Title: upscli_readline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_READLINE" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_READLINE" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_sendline.3 b/docs/man/upscli_sendline.3 index 29d31db..448da95 100644 --- a/docs/man/upscli_sendline.3 +++ b/docs/man/upscli_sendline.3 @@ -2,12 +2,12 @@ .\" Title: upscli_sendline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SENDLINE" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SENDLINE" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitaddr.3 b/docs/man/upscli_splitaddr.3 index 17ed111..99a71b4 100644 --- a/docs/man/upscli_splitaddr.3 +++ b/docs/man/upscli_splitaddr.3 @@ -2,12 +2,12 @@ .\" Title: upscli_splitaddr .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SPLITADDR" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SPLITADDR" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitname.3 b/docs/man/upscli_splitname.3 index 166dd0f..39440f4 100644 --- a/docs/man/upscli_splitname.3 +++ b/docs/man/upscli_splitname.3 @@ -2,12 +2,12 @@ .\" Title: upscli_splitname .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SPLITNAME" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SPLITNAME" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_ssl.3 b/docs/man/upscli_ssl.3 index 87da86c..2e81a8c 100644 --- a/docs/man/upscli_ssl.3 +++ b/docs/man/upscli_ssl.3 @@ -2,12 +2,12 @@ .\" Title: upscli_ssl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_SSL" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_SSL" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_strerror.3 b/docs/man/upscli_strerror.3 index a5549ff..85b41a5 100644 --- a/docs/man/upscli_strerror.3 +++ b/docs/man/upscli_strerror.3 @@ -2,12 +2,12 @@ .\" Title: upscli_strerror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_STRERROR" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_STRERROR" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_upserror.3 b/docs/man/upscli_upserror.3 index 4aebd4f..ec7f7b6 100644 --- a/docs/man/upscli_upserror.3 +++ b/docs/man/upscli_upserror.3 @@ -2,12 +2,12 @@ .\" Title: upscli_upserror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLI_UPSERROR" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLI_UPSERROR" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsclient.3 b/docs/man/upsclient.3 index 00f57f3..fa877c4 100644 --- a/docs/man/upsclient.3 +++ b/docs/man/upsclient.3 @@ -2,12 +2,12 @@ .\" Title: upsclient .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCLIENT" "3" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCLIENT" "3" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscmd.8 b/docs/man/upscmd.8 index 1bcdded..56c714e 100644 --- a/docs/man/upscmd.8 +++ b/docs/man/upscmd.8 @@ -2,12 +2,12 @@ .\" Title: upscmd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCMD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCMD" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscode2.8 b/docs/man/upscode2.8 index 3cf38d9..27237d2 100644 --- a/docs/man/upscode2.8 +++ b/docs/man/upscode2.8 @@ -2,12 +2,12 @@ .\" Title: upscode2 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSCODE2" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSCODE2" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.8 b/docs/man/upsd.8 index 746253e..fc8d312 100644 --- a/docs/man/upsd.8 +++ b/docs/man/upsd.8 @@ -2,12 +2,12 @@ .\" Title: upsd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSD" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSD" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.conf.5 b/docs/man/upsd.conf.5 index c3f95cb..5e19b76 100644 --- a/docs/man/upsd.conf.5 +++ b/docs/man/upsd.conf.5 @@ -2,12 +2,12 @@ .\" Title: upsd.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSD\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSD\&.CONF" "5" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.users.5 b/docs/man/upsd.users.5 index 73fe1b5..04d756e 100644 --- a/docs/man/upsd.users.5 +++ b/docs/man/upsd.users.5 @@ -2,12 +2,12 @@ .\" Title: upsd.users .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/25/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSD\&.USERS" "5" "05/25/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSD\&.USERS" "5" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsdrvctl.8 b/docs/man/upsdrvctl.8 index 909d855..dba092d 100644 --- a/docs/man/upsdrvctl.8 +++ b/docs/man/upsdrvctl.8 @@ -2,12 +2,12 @@ .\" Title: upsdrvctl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSDRVCTL" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSDRVCTL" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsimage.cgi.8 b/docs/man/upsimage.cgi.8 index ab3f1ee..45f6dd3 100644 --- a/docs/man/upsimage.cgi.8 +++ b/docs/man/upsimage.cgi.8 @@ -2,12 +2,12 @@ .\" Title: upsimage.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSIMAGE\&.CGI" "8" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSIMAGE\&.CGI" "8" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upslog.8 b/docs/man/upslog.8 index 2eb6121..539cdd0 100644 --- a/docs/man/upslog.8 +++ b/docs/man/upslog.8 @@ -2,12 +2,12 @@ .\" Title: upslog .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSLOG" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSLOG" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsmon.8 b/docs/man/upsmon.8 index 08bf7aa..e8b5883 100644 --- a/docs/man/upsmon.8 +++ b/docs/man/upsmon.8 @@ -2,12 +2,12 @@ .\" Title: upsmon .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSMON" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSMON" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsmon.conf.5 b/docs/man/upsmon.conf.5 index f2079f3..e348a6e 100644 --- a/docs/man/upsmon.conf.5 +++ b/docs/man/upsmon.conf.5 @@ -2,12 +2,12 @@ .\" Title: upsmon.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSMON\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSMON\&.CONF" "5" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsrw.8 b/docs/man/upsrw.8 index 6a885bc..878e0e1 100644 --- a/docs/man/upsrw.8 +++ b/docs/man/upsrw.8 @@ -2,12 +2,12 @@ .\" Title: upsrw .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/24/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSRW" "8" "05/24/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSRW" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.8 b/docs/man/upssched.8 index 0695d66..511b9e4 100644 --- a/docs/man/upssched.8 +++ b/docs/man/upssched.8 @@ -2,12 +2,12 @@ .\" Title: upssched .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSCHED" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSSCHED" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.conf.5 b/docs/man/upssched.conf.5 index 7ed2fb5..a2e0e43 100644 --- a/docs/man/upssched.conf.5 +++ b/docs/man/upssched.conf.5 @@ -2,12 +2,12 @@ .\" Title: upssched.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSCHED\&.CONF" "5" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSSCHED\&.CONF" "5" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.cgi.8 b/docs/man/upsset.cgi.8 index d89ece6..30f5b21 100644 --- a/docs/man/upsset.cgi.8 +++ b/docs/man/upsset.cgi.8 @@ -2,12 +2,12 @@ .\" Title: upsset.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSET\&.CGI" "8" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSSET\&.CGI" "8" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.conf.5 b/docs/man/upsset.conf.5 index 931c821..e89a858 100644 --- a/docs/man/upsset.conf.5 +++ b/docs/man/upsset.conf.5 @@ -2,12 +2,12 @@ .\" Title: upsset.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSET\&.CONF" "5" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSSET\&.CONF" "5" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.8 index 7ffbc0e..ed9bc01 100644 --- a/docs/man/upsstats.cgi.8 +++ b/docs/man/upsstats.cgi.8 @@ -2,12 +2,12 @@ .\" Title: upsstats.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSTATS\&.CGI" "8" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSSTATS\&.CGI" "8" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.html.5 b/docs/man/upsstats.html.5 index b305592..1952eea 100644 --- a/docs/man/upsstats.html.5 +++ b/docs/man/upsstats.html.5 @@ -2,12 +2,12 @@ .\" Title: upsstats.html .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/22/2012 +.\" Date: 08/08/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "UPSSTATS\&.HTML" "5" "05/22/2012" "Network UPS Tools" "NUT Manual" +.TH "UPSSTATS\&.HTML" "5" "08/08/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/usbhid-ups.8 b/docs/man/usbhid-ups.8 index 207bfb1..a4b9e6f 100644 --- a/docs/man/usbhid-ups.8 +++ b/docs/man/usbhid-ups.8 @@ -2,12 +2,12 @@ .\" Title: usbhid-ups .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "USBHID\-UPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "USBHID\-UPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/victronups.8 b/docs/man/victronups.8 index 412f19a..6ed84e9 100644 --- a/docs/man/victronups.8 +++ b/docs/man/victronups.8 @@ -2,12 +2,12 @@ .\" Title: victronups .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 05/21/2012 +.\" Date: 08/07/2012 .\" Manual: NUT Manual .\" Source: Network UPS Tools .\" Language: English .\" -.TH "VICTRONUPS" "8" "05/21/2012" "Network UPS Tools" "NUT Manual" +.TH "VICTRONUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/new-clients.txt b/docs/new-clients.txt index 41c9804..fa02074 100644 --- a/docs/new-clients.txt +++ b/docs/new-clients.txt @@ -33,9 +33,9 @@ with `make` and `make install` as usual. This must be done before building other (non-NUT) programs which depend on them. For more information, refer to the linkman:upsclient[3], -manual page and the various -link:man/index.html#Developer_man[upscli_*(3)] functions documentation -referenced in the same file. +manual page and the various link:../man/index.html#devclient[upscli_*(3)] +functions documentation referenced in the same file. + Configuration helpers ~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/new-drivers.txt b/docs/new-drivers.txt index 40a887f..21d4a09 100644 --- a/docs/new-drivers.txt +++ b/docs/new-drivers.txt @@ -54,7 +54,7 @@ upsdrv_info_t This structure tracks several description information about the driver: - * *name*: the driver full name, for banner printing. + * *name*: the driver full name, for banner printing and "driver.name" variable. * *version*: the driver's own version. For sub driver information, refer below to sub_upsdrv_info. This value has the form "X.YZ", and is published by main as "driver.version.internal". diff --git a/docs/nut-names.txt b/docs/nut-names.txt index e2563ab..10a431a 100644 --- a/docs/nut-names.txt +++ b/docs/nut-names.txt @@ -87,6 +87,8 @@ ups: General unit information (seconds) | 1209600 (two weeks) | ups.test.result | Results of last self test (opaque string) | Bad battery pack +| ups.test.date | Date of last self test + (opaque string) | 07/17/12 | ups.display.language | Language to use on front panel (*** opaque) | E | ups.contacts | UPS external contact sensors @@ -256,10 +258,10 @@ Valid with/without context (ie. per phase or aggregated/averaged) | voltage.minimum | Minimum seen voltage (V) | power | Apparent power (VA) | power.maximum | Maximum seen apparent power (VA) -| power.minimum | Maximum seen apparent power (VA) +| power.minimum | Minimum seen apparent power (VA) | power.percent | Percentage of apparent power related to maximum load -| power.maximum.percent | Max seen percentage of apparent power -| power.minimum.percent | Min seen percentage of apparent power +| power.maximum.percent | Maximum seen percentage of apparent power +| power.minimum.percent | Minimum seen percentage of apparent power | realpower | Real power (W) | powerfactor | Power Factor (dimensionless value between 0.00 and 1.00) | crestfactor | Crest Factor (dimensionless value greater or equal to 1) @@ -320,6 +322,7 @@ battery: Any battery details (Ie battery.charge = 100) | 26,9 | battery.capacity | Battery capacity (Ah) | 7.2 | battery.current | Battery current (A) | 1.19 +| battery.current.total | Total battery current (A) | 1.19 | battery.temperature | Battery temperature (degrees C) | 050.7 | battery.runtime | Battery runtime (seconds) | 1080 | battery.runtime.low | Remaining battery runtime when @@ -344,32 +347,39 @@ battery: Any battery details ambient: Conditions from external probe equipment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +NOTE: multiple sensors can be exposed using the indexed notation. +'ambient.*', without index or using '0', relates to the embedded sensor. +For example: 'ambient.temperature' represent the embedded sensor temperature. +Other sensors (external, communication card, ...) can use indexes +from '1' to 'n'. For example: 'ambient.1.temperature' for the first external +sensor temperature. + [options="header"] |=============================================================================== | Name | Description | Example value -| ambient.temperature | Ambient temperature +| ambient.n.temperature | Ambient temperature (degrees C) | 25.40 -| ambient.temperature.alarm | Temperature alarm +| ambient.n.temperature.alarm | Temperature alarm (enabled/disabled) | enabled -| ambient.temperature.high | Temperature threshold high +| ambient.n.temperature.high | Temperature threshold high (degrees C) | 40 -| ambient.temperature.low | Temperature threshold low +| ambient.n.temperature.low | Temperature threshold low (degrees C) | 5 -| ambient.temperature.maximum | Maximum temperature seen +| ambient.n.temperature.maximum | Maximum temperature seen (degrees C) | 37.6 -| ambient.temperature.minimum | Minimum temperature seen +| ambient.n.temperature.minimum | Minimum temperature seen (degrees C) | 18.1 -| ambient.humidity | Ambient relative humidity +| ambient.n.humidity | Ambient relative humidity (percent) | 038.8 -| ambient.humidity.alarm | Relative humidity alarm +| ambient.n.humidity.alarm | Relative humidity alarm (enabled/disabled) | enabled -| ambient.humidity.high | Relative humidity +| ambient.n.humidity.high | Relative humidity threshold high (percent) | 80 -| ambient.humidity.low | Relative humidity +| ambient.n.humidity.low | Relative humidity threshold high (percent) | 10 -| ambient.humidity.maximum | Maximum relative humidity +| ambient.n.humidity.maximum | Maximum relative humidity seen (percent) | 60 -| ambient.humidity.minimum | Minimum relative humidity +| ambient.n.humidity.minimum | Minimum relative humidity seen (percent) | 13 |=============================================================================== @@ -433,8 +443,9 @@ driver: Internal driver information | Name | Description | Example value | driver.name | Driver name | usbhid-ups | driver.version | Driver version (NUT release) | X.Y.Z -| driver.version.internal | Internal driver version - (if tracked separately) | 1.23.45 +| driver.version.internal | Internal driver version | 1.23.45 +| driver.version.data | Version of the internal data + mapping, for generic drivers | Eaton HID 1.31 | driver.parameter.xxx | Parameter xxx (ups.conf or cmdline -x) setting | (varies) | driver.flag.xxx | Flag xxx (ups.conf or diff --git a/docs/website/Makefile.am b/docs/website/Makefile.am index 0308139..bcf59b5 100644 --- a/docs/website/Makefile.am +++ b/docs/website/Makefile.am @@ -6,7 +6,7 @@ EXTRA_DIST = news.txt projects.txt website.txt \ $(FAVICON_FILES) IMAGE_FILES = images/asciidoc.png \ - images/eaton-logo.png \ + images/hostedby.png \ images/blue-arrow.png \ images/simple.png \ images/advanced.png \ diff --git a/docs/website/Makefile.in b/docs/website/Makefile.in index fc22885..3929fc3 100644 --- a/docs/website/Makefile.in +++ b/docs/website/Makefile.in @@ -84,6 +84,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -187,6 +193,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -253,7 +260,7 @@ EXTRA_DIST = news.txt projects.txt website.txt \ $(FAVICON_FILES) IMAGE_FILES = images/asciidoc.png \ - images/eaton-logo.png \ + images/hostedby.png \ images/blue-arrow.png \ images/simple.png \ images/advanced.png \ diff --git a/docs/website/css/web-layout.css b/docs/website/css/web-layout.css index 1edc014..c8580bc 100644 --- a/docs/website/css/web-layout.css +++ b/docs/website/css/web-layout.css @@ -139,3 +139,8 @@ td#driver-col { width: 30%; } #support-level-legend dd { margin: 0; padding: 0; width: 85%; float: left; } /*.support-level-descr { margin-left: 20px; float: right; }*/ + +/* Remove text underscores on href */ +div#footer-badges a:link, #layout-menu a:visited, #layout-menu a:hover { + text-decoration: none; +} diff --git a/docs/website/news.txt b/docs/website/news.txt index e8f4f9e..5e2acb9 100644 --- a/docs/website/news.txt +++ b/docs/website/news.txt @@ -1,3 +1,7 @@ +- August 8, 2012: 2.6.5 released +- June 27, 2012: link:download.html#_virtualization_packages[VMware NUT client for ESXI 5.0] +- June 5, 2012: link:http://wmnut.networkupstools.org[WMNut] 0.64 released, and move hosting +- June 4, 2012: link:download.html#_binary_packages[Beta NUT 2.6.4-1 package for Windows released] - May 31, 2012: 2.6.4 released, including link:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2944[CVE-2012-2944] fix - May 10, 2012: link:http://wmnut.mgeops.org[WMNut] 0.63 released - May 9, 2012: Official publication of Riello communication protocols diff --git a/docs/website/projects.txt b/docs/website/projects.txt index 5968036..59eeb88 100644 --- a/docs/website/projects.txt +++ b/docs/website/projects.txt @@ -55,11 +55,11 @@ NOTE: WinNUT is currently being replaced by a full port to Windows, part of the official NUT distribution. link:download.html#_binary_packages[MSI packages] are available too. -link:http://wmnut.mgeops.org/[WMNUT] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +link:http://wmnut.networkupstools.org[WMNUT] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -WMNut is a program to monitor multiple UPSs statistics through the NUT (Network -UPS Tools) framework on Linux and other systems. +WMNut is a dockapp program to monitor multiple UPSs statistics through the NUT +(Network UPS Tools) framework on Linux and other systems. Network Management Systems (NMS) integration -------------------------------------------- @@ -157,6 +157,8 @@ NOTE: UPS::Nut is part of NUT since version NUT 2.6.1. Hardware projects involving NUT ------------------------------- +This is an incomplete list of the hardware known to embed NUT. + link:http://www.dell.com/us/business/p/powervault-nx3500/pd[Dell PowerVault NX3500] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -198,6 +200,12 @@ link:http://www.thecus.com[Thecus NAS] Thecus NAS firmware includes NUT for UPS support. The link:http://www.thecus.com/Downloads/Compatible_List/UPS_List_v1.0_ALL.pdf[following list of devices] is known to be supported. + +link:http://www.buffalotech.com[Buffalo NAS] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Buffalo TeraStation NAS (Business-class) include NUT for UPS support. + link:http://www.webbastards.com/projects/[lcd-nut] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/website/web-layout.conf b/docs/website/web-layout.conf index 18af913..9072e1b 100644 --- a/docs/website/web-layout.conf +++ b/docs/website/web-layout.conf @@ -83,9 +83,9 @@ endif::hcl[]

  • Support
  • Alioth Forge
  • - +
    @@ -142,22 +142,22 @@ ifndef::textonly[] Powered by AsciiDoc + alt="Powered by AsciiDoc"/> Valid XHTML 1.1 + alt="Valid XHTML 1.1"/> Valid CSS! + alt="Valid CSS!"/> - - Firefox Download Button + + Hoster endif::textonly[]
    diff --git a/drivers/Makefile.am b/drivers/Makefile.am index 72630d9..45eff04 100644 --- a/drivers/Makefile.am +++ b/drivers/Makefile.am @@ -36,7 +36,7 @@ endif SERIAL_DRIVERLIST = bcmxcp belkin belkinunv bestfcom \ bestfortress bestuferrups bestups dummy-ups etapro everups \ gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \ - mge-shut mge-utalk microdowell newmge-shut oneac optiups powercom rhino \ + oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino \ safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel \ blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old SNMP_DRIVERLIST = snmp-ups @@ -46,9 +46,10 @@ USB_DRIVERLIST = $(USB_LIBUSB_DRIVERLIST) HAL_DRIVERLIST = hald-addon-usbhid-ups hald-addon-bcmxcp_usb \ hald-addon-tripplite_usb hald-addon-blazer_usb NEONXML_DRIVERLIST = netxml-ups +MACOSX_DRIVERLIST = macosx-ups # distribute all drivers, even ones that are not built by default -EXTRA_PROGRAMS = $(SERIAL_DRIVERLIST) $(SNMP_DRIVERLIST) $(USB_DRIVERLIST) $(NEONXML_DRIVERLIST) +EXTRA_PROGRAMS = $(SERIAL_DRIVERLIST) $(SNMP_DRIVERLIST) $(USB_DRIVERLIST) $(NEONXML_DRIVERLIST) $(MACOSX_DRIVERLIST) # construct the list of drivers to build if SOME_DRIVERS @@ -77,6 +78,9 @@ endif if WITH_IPMI driverexec_PROGRAMS += nut-ipmipsu endif +if WITH_MACOSX + driverexec_PROGRAMS += $(MACOSX_DRIVERLIST) +endif else driverexec_PROGRAMS += skel endif @@ -114,7 +118,7 @@ liebert_SOURCES = liebert.c liebert_esp2_SOURCES = liebert-esp2.c masterguard_SOURCES = masterguard.c metasys_SOURCES = metasys.c -mge_shut_SOURCES = mge-shut.c hidparser.c +oldmge_shut_SOURCES = mge-shut.c hidparser.c mge_utalk_SOURCES = mge-utalk.c microdowell_SOURCES = microdowell.c oneac_SOURCES = oneac.c @@ -174,10 +178,10 @@ richcomm_usb_SOURCES = richcomm_usb.c usb-common.c richcomm_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) # HID-over-serial -newmge_shut_SOURCES = usbhid-ups.c libshut.c libhid.c hidparser.c mge-hid.c +mge_shut_SOURCES = usbhid-ups.c libshut.c libhid.c hidparser.c mge-hid.c # per-target CFLAGS are necessary here -newmge_shut_CFLAGS = $(AM_CFLAGS) -DSHUT_MODE -newmge_shut_LDADD = $(LDADD) +mge_shut_CFLAGS = $(AM_CFLAGS) -DSHUT_MODE +mge_shut_LDADD = $(LDADD) # SNMP snmp_ups_SOURCES = snmp-ups.c apc-mib.c baytech-mib.c compaq-mib.c eaton-mib.c \ @@ -214,6 +218,11 @@ if WITH_FREEIPMI endif nut_ipmipsu_LDADD = $(LDADD) $(LIBIPMI_LIBS) +# Mac OS X metadriver +macosx_ups_LDADD = $(LDADD_DRIVERS) +macosx_ups_LDFLAGS = $(LDFLAGS) -framework IOKit -framework CoreFoundation +macosx_ups_SOURCES = macosx-ups.c + # ---------------------------------------------------------------------- # List of header files. The purpose of this list is not dependency # tracking (which is automatic), but to ensure these files are diff --git a/drivers/Makefile.in b/drivers/Makefile.in index 8b2c02e..eda7250 100644 --- a/drivers/Makefile.in +++ b/drivers/Makefile.in @@ -45,27 +45,30 @@ target_triplet = @target@ @WITH_LIBPOWERMAN_TRUE@am__append_5 = $(LIBPOWERMAN_CFLAGS) @WITH_IPMI_TRUE@am__append_6 = $(LIBIPMI_CFLAGS) EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4) \ - $(am__EXEEXT_5) -@SOME_DRIVERS_FALSE@driverexec_PROGRAMS = $(am__EXEEXT_6) \ -@SOME_DRIVERS_FALSE@ $(am__EXEEXT_7) $(am__EXEEXT_8) \ -@SOME_DRIVERS_FALSE@ $(am__EXEEXT_9) $(am__EXEEXT_10) \ -@SOME_DRIVERS_FALSE@ $(am__EXEEXT_11) upsdrvctl$(EXEEXT) + $(am__EXEEXT_5) $(am__EXEEXT_6) +@SOME_DRIVERS_FALSE@driverexec_PROGRAMS = $(am__EXEEXT_7) \ +@SOME_DRIVERS_FALSE@ $(am__EXEEXT_8) $(am__EXEEXT_9) \ +@SOME_DRIVERS_FALSE@ $(am__EXEEXT_10) $(am__EXEEXT_11) \ +@SOME_DRIVERS_FALSE@ $(am__EXEEXT_12) $(am__EXEEXT_13) \ +@SOME_DRIVERS_FALSE@ upsdrvctl$(EXEEXT) @SOME_DRIVERS_TRUE@driverexec_PROGRAMS = $(DRIVER_BUILD_LIST) \ -@SOME_DRIVERS_TRUE@ $(am__EXEEXT_6) $(am__EXEEXT_7) \ -@SOME_DRIVERS_TRUE@ $(am__EXEEXT_8) $(am__EXEEXT_9) \ -@SOME_DRIVERS_TRUE@ $(am__EXEEXT_10) $(am__EXEEXT_11) \ -@SOME_DRIVERS_TRUE@ skel$(EXEEXT) upsdrvctl$(EXEEXT) +@SOME_DRIVERS_TRUE@ $(am__EXEEXT_7) $(am__EXEEXT_8) \ +@SOME_DRIVERS_TRUE@ $(am__EXEEXT_9) $(am__EXEEXT_10) \ +@SOME_DRIVERS_TRUE@ $(am__EXEEXT_11) $(am__EXEEXT_12) \ +@SOME_DRIVERS_TRUE@ $(am__EXEEXT_13) skel$(EXEEXT) \ +@SOME_DRIVERS_TRUE@ upsdrvctl$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_7 = $(SERIAL_DRIVERLIST) @SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_8 = $(SNMP_DRIVERLIST) @SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_9 = $(USB_LIBUSB_DRIVERLIST) @SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@halexec_PROGRAMS = \ -@SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@ $(am__EXEEXT_12) +@SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@ $(am__EXEEXT_14) @SOME_DRIVERS_FALSE@@WITH_NEON_TRUE@am__append_10 = $(NEONXML_DRIVERLIST) @SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_11 = powerman-pdu @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_12 = nut-ipmipsu -@WITH_SSL_TRUE@am__append_13 = $(LIBSSL_CFLAGS) -@WITH_SSL_TRUE@am__append_14 = $(LIBSSL_LIBS) -@WITH_FREEIPMI_TRUE@am__append_15 = nut-libfreeipmi.c +@SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__append_13 = $(MACOSX_DRIVERLIST) +@WITH_SSL_TRUE@am__append_14 = $(LIBSSL_CFLAGS) +@WITH_SSL_TRUE@am__append_15 = $(LIBSSL_LIBS) +@WITH_FREEIPMI_TRUE@am__append_16 = nut-libfreeipmi.c subdir = drivers DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -114,8 +117,8 @@ am__EXEEXT_1 = bcmxcp$(EXEEXT) belkin$(EXEEXT) belkinunv$(EXEEXT) \ bestups$(EXEEXT) dummy-ups$(EXEEXT) etapro$(EXEEXT) \ everups$(EXEEXT) gamatronic$(EXEEXT) genericups$(EXEEXT) \ isbmex$(EXEEXT) liebert$(EXEEXT) liebert-esp2$(EXEEXT) \ - masterguard$(EXEEXT) metasys$(EXEEXT) mge-shut$(EXEEXT) \ - mge-utalk$(EXEEXT) microdowell$(EXEEXT) newmge-shut$(EXEEXT) \ + masterguard$(EXEEXT) metasys$(EXEEXT) oldmge-shut$(EXEEXT) \ + mge-utalk$(EXEEXT) microdowell$(EXEEXT) mge-shut$(EXEEXT) \ oneac$(EXEEXT) optiups$(EXEEXT) powercom$(EXEEXT) \ rhino$(EXEEXT) safenet$(EXEEXT) skel$(EXEEXT) solis$(EXEEXT) \ tripplite$(EXEEXT) tripplitesu$(EXEEXT) upscode2$(EXEEXT) \ @@ -128,16 +131,18 @@ am__EXEEXT_3 = usbhid-ups$(EXEEXT) bcmxcp_usb$(EXEEXT) \ richcomm_usb$(EXEEXT) am__EXEEXT_4 = $(am__EXEEXT_3) am__EXEEXT_5 = netxml-ups$(EXEEXT) -@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__EXEEXT_6 = $(am__EXEEXT_1) -@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__EXEEXT_7 = $(am__EXEEXT_2) -@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__EXEEXT_8 = $(am__EXEEXT_3) -@SOME_DRIVERS_FALSE@@WITH_NEON_TRUE@am__EXEEXT_9 = $(am__EXEEXT_5) -@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__EXEEXT_10 = powerman-pdu$(EXEEXT) -@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__EXEEXT_11 = \ +am__EXEEXT_6 = macosx-ups$(EXEEXT) +@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__EXEEXT_7 = $(am__EXEEXT_1) +@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__EXEEXT_8 = $(am__EXEEXT_2) +@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__EXEEXT_9 = $(am__EXEEXT_3) +@SOME_DRIVERS_FALSE@@WITH_NEON_TRUE@am__EXEEXT_10 = $(am__EXEEXT_5) +@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__EXEEXT_11 = powerman-pdu$(EXEEXT) +@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__EXEEXT_12 = \ @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@ nut-ipmipsu$(EXEEXT) +@SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__EXEEXT_13 = $(am__EXEEXT_6) am__installdirs = "$(DESTDIR)$(driverexecdir)" \ "$(DESTDIR)$(halexecdir)" -am__EXEEXT_12 = hald-addon-usbhid-ups$(EXEEXT) \ +am__EXEEXT_14 = hald-addon-usbhid-ups$(EXEEXT) \ hald-addon-bcmxcp_usb$(EXEEXT) \ hald-addon-tripplite_usb$(EXEEXT) \ hald-addon-blazer_usb$(EXEEXT) @@ -264,6 +269,12 @@ am_liebert_esp2_OBJECTS = liebert-esp2.$(OBJEXT) liebert_esp2_OBJECTS = $(am_liebert_esp2_OBJECTS) liebert_esp2_LDADD = $(LDADD) liebert_esp2_DEPENDENCIES = $(am__DEPENDENCIES_2) +am_macosx_ups_OBJECTS = macosx-ups.$(OBJEXT) +macosx_ups_OBJECTS = $(am_macosx_ups_OBJECTS) +macosx_ups_DEPENDENCIES = $(LDADD_DRIVERS) +macosx_ups_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(macosx_ups_LDFLAGS) $(LDFLAGS) -o $@ am_masterguard_OBJECTS = masterguard.$(OBJEXT) masterguard_OBJECTS = $(am_masterguard_OBJECTS) masterguard_LDADD = $(LDADD) @@ -272,10 +283,14 @@ am_metasys_OBJECTS = metasys.$(OBJEXT) metasys_OBJECTS = $(am_metasys_OBJECTS) metasys_LDADD = $(LDADD) metasys_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_mge_shut_OBJECTS = mge-shut.$(OBJEXT) hidparser.$(OBJEXT) +am_mge_shut_OBJECTS = mge_shut-usbhid-ups.$(OBJEXT) \ + mge_shut-libshut.$(OBJEXT) mge_shut-libhid.$(OBJEXT) \ + mge_shut-hidparser.$(OBJEXT) mge_shut-mge-hid.$(OBJEXT) mge_shut_OBJECTS = $(am_mge_shut_OBJECTS) -mge_shut_LDADD = $(LDADD) -mge_shut_DEPENDENCIES = $(am__DEPENDENCIES_2) +mge_shut_DEPENDENCIES = $(am__DEPENDENCIES_3) +mge_shut_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(mge_shut_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ am_mge_utalk_OBJECTS = mge-utalk.$(OBJEXT) mge_utalk_OBJECTS = $(am_mge_utalk_OBJECTS) mge_utalk_LDADD = $(LDADD) @@ -287,19 +302,15 @@ microdowell_DEPENDENCIES = $(am__DEPENDENCIES_2) am_netxml_ups_OBJECTS = netxml-ups.$(OBJEXT) mge-xml.$(OBJEXT) netxml_ups_OBJECTS = $(am_netxml_ups_OBJECTS) netxml_ups_DEPENDENCIES = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) -am_newmge_shut_OBJECTS = newmge_shut-usbhid-ups.$(OBJEXT) \ - newmge_shut-libshut.$(OBJEXT) newmge_shut-libhid.$(OBJEXT) \ - newmge_shut-hidparser.$(OBJEXT) newmge_shut-mge-hid.$(OBJEXT) -newmge_shut_OBJECTS = $(am_newmge_shut_OBJECTS) -newmge_shut_DEPENDENCIES = $(am__DEPENDENCIES_3) -newmge_shut_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(newmge_shut_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__nut_ipmipsu_SOURCES_DIST = nut-ipmipsu.c nut-libfreeipmi.c @WITH_FREEIPMI_TRUE@am__objects_2 = nut-libfreeipmi.$(OBJEXT) am_nut_ipmipsu_OBJECTS = nut-ipmipsu.$(OBJEXT) $(am__objects_2) nut_ipmipsu_OBJECTS = $(am_nut_ipmipsu_OBJECTS) nut_ipmipsu_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) +am_oldmge_shut_OBJECTS = mge-shut.$(OBJEXT) hidparser.$(OBJEXT) +oldmge_shut_OBJECTS = $(am_oldmge_shut_OBJECTS) +oldmge_shut_LDADD = $(LDADD) +oldmge_shut_DEPENDENCIES = $(am__DEPENDENCIES_2) am_oneac_OBJECTS = oneac.$(OBJEXT) oneac_OBJECTS = $(am_oneac_OBJECTS) oneac_LDADD = $(LDADD) @@ -394,11 +405,11 @@ SOURCES = $(libdummy_a_SOURCES) $(libnuthalmain_a_SOURCES) \ $(hald_addon_tripplite_usb_SOURCES) \ $(hald_addon_usbhid_ups_SOURCES) $(isbmex_SOURCES) \ $(ivtscd_SOURCES) $(liebert_SOURCES) $(liebert_esp2_SOURCES) \ - $(masterguard_SOURCES) $(metasys_SOURCES) $(mge_shut_SOURCES) \ - $(mge_utalk_SOURCES) $(microdowell_SOURCES) \ - $(netxml_ups_SOURCES) $(newmge_shut_SOURCES) \ - $(nut_ipmipsu_SOURCES) $(oneac_SOURCES) $(optiups_SOURCES) \ - $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ + $(macosx_ups_SOURCES) $(masterguard_SOURCES) \ + $(metasys_SOURCES) $(mge_shut_SOURCES) $(mge_utalk_SOURCES) \ + $(microdowell_SOURCES) $(netxml_ups_SOURCES) \ + $(nut_ipmipsu_SOURCES) $(oldmge_shut_SOURCES) $(oneac_SOURCES) \ + $(optiups_SOURCES) $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ $(powerpanel_SOURCES) $(rhino_SOURCES) $(richcomm_usb_SOURCES) \ $(safenet_SOURCES) $(skel_SOURCES) $(snmp_ups_SOURCES) \ $(solis_SOURCES) $(tripplite_SOURCES) $(tripplite_usb_SOURCES) \ @@ -417,16 +428,16 @@ DIST_SOURCES = $(libdummy_a_SOURCES) $(libnuthalmain_a_SOURCES) \ $(hald_addon_tripplite_usb_SOURCES) \ $(hald_addon_usbhid_ups_SOURCES) $(isbmex_SOURCES) \ $(ivtscd_SOURCES) $(liebert_SOURCES) $(liebert_esp2_SOURCES) \ - $(masterguard_SOURCES) $(metasys_SOURCES) $(mge_shut_SOURCES) \ - $(mge_utalk_SOURCES) $(microdowell_SOURCES) \ - $(netxml_ups_SOURCES) $(newmge_shut_SOURCES) \ - $(am__nut_ipmipsu_SOURCES_DIST) $(oneac_SOURCES) \ - $(optiups_SOURCES) $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ - $(powerpanel_SOURCES) $(rhino_SOURCES) $(richcomm_usb_SOURCES) \ - $(safenet_SOURCES) $(skel_SOURCES) $(snmp_ups_SOURCES) \ - $(solis_SOURCES) $(tripplite_SOURCES) $(tripplite_usb_SOURCES) \ - $(tripplitesu_SOURCES) $(upscode2_SOURCES) \ - $(upsdrvctl_SOURCES) $(usbhid_ups_SOURCES) \ + $(macosx_ups_SOURCES) $(masterguard_SOURCES) \ + $(metasys_SOURCES) $(mge_shut_SOURCES) $(mge_utalk_SOURCES) \ + $(microdowell_SOURCES) $(netxml_ups_SOURCES) \ + $(am__nut_ipmipsu_SOURCES_DIST) $(oldmge_shut_SOURCES) \ + $(oneac_SOURCES) $(optiups_SOURCES) $(powercom_SOURCES) \ + $(powerman_pdu_SOURCES) $(powerpanel_SOURCES) $(rhino_SOURCES) \ + $(richcomm_usb_SOURCES) $(safenet_SOURCES) $(skel_SOURCES) \ + $(snmp_ups_SOURCES) $(solis_SOURCES) $(tripplite_SOURCES) \ + $(tripplite_usb_SOURCES) $(tripplitesu_SOURCES) \ + $(upscode2_SOURCES) $(upsdrvctl_SOURCES) $(usbhid_ups_SOURCES) \ $(victronups_SOURCES) HEADERS = $(dist_noinst_HEADERS) ETAGS = etags @@ -448,6 +459,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -551,6 +568,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -628,7 +646,7 @@ AM_CFLAGS = -I$(top_srcdir)/include $(am__append_1) $(am__append_2) \ SERIAL_DRIVERLIST = bcmxcp belkin belkinunv bestfcom \ bestfortress bestuferrups bestups dummy-ups etapro everups \ gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \ - mge-shut mge-utalk microdowell newmge-shut oneac optiups powercom rhino \ + oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino \ safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel \ blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old @@ -641,6 +659,7 @@ HAL_DRIVERLIST = hald-addon-usbhid-ups hald-addon-bcmxcp_usb \ hald-addon-tripplite_usb hald-addon-blazer_usb NEONXML_DRIVERLIST = netxml-ups +MACOSX_DRIVERLIST = macosx-ups @SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@halexecdir = $(HAL_CALLOUTS_PATH) # ========================================================================== @@ -673,7 +692,7 @@ liebert_SOURCES = liebert.c liebert_esp2_SOURCES = liebert-esp2.c masterguard_SOURCES = masterguard.c metasys_SOURCES = metasys.c -mge_shut_SOURCES = mge-shut.c hidparser.c +oldmge_shut_SOURCES = mge-shut.c hidparser.c mge_utalk_SOURCES = mge-utalk.c microdowell_SOURCES = microdowell.c oneac_SOURCES = oneac.c @@ -698,9 +717,9 @@ victronups_SOURCES = victronups.c # dummy dummy_ups_SOURCES = dummy-ups.c dummy_ups_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/clients \ - $(am__append_13) -dummy_ups_LDADD = $(LDADD_DRIVERS) ../clients/libupsclient.la \ $(am__append_14) +dummy_ups_LDADD = $(LDADD_DRIVERS) ../clients/libupsclient.la \ + $(am__append_15) # Clone drivers clone_SOURCES = clone.c @@ -728,10 +747,10 @@ richcomm_usb_SOURCES = richcomm_usb.c usb-common.c richcomm_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) # HID-over-serial -newmge_shut_SOURCES = usbhid-ups.c libshut.c libhid.c hidparser.c mge-hid.c +mge_shut_SOURCES = usbhid-ups.c libshut.c libhid.c hidparser.c mge-hid.c # per-target CFLAGS are necessary here -newmge_shut_CFLAGS = $(AM_CFLAGS) -DSHUT_MODE -newmge_shut_LDADD = $(LDADD) +mge_shut_CFLAGS = $(AM_CFLAGS) -DSHUT_MODE +mge_shut_LDADD = $(LDADD) # SNMP snmp_ups_SOURCES = snmp-ups.c apc-mib.c baytech-mib.c compaq-mib.c eaton-mib.c \ @@ -761,9 +780,14 @@ powerman_pdu_SOURCES = powerman-pdu.c powerman_pdu_LDADD = $(LDADD) $(LIBPOWERMAN_LIBS) # IPMI PSU -nut_ipmipsu_SOURCES = nut-ipmipsu.c $(am__append_15) +nut_ipmipsu_SOURCES = nut-ipmipsu.c $(am__append_16) nut_ipmipsu_LDADD = $(LDADD) $(LIBIPMI_LIBS) +# Mac OS X metadriver +macosx_ups_LDADD = $(LDADD_DRIVERS) +macosx_ups_LDFLAGS = $(LDFLAGS) -framework IOKit -framework CoreFoundation +macosx_ups_SOURCES = macosx-ups.c + # ---------------------------------------------------------------------- # List of header files. The purpose of this list is not dependency # tracking (which is automatic), but to ensure these files are @@ -1001,6 +1025,9 @@ liebert$(EXEEXT): $(liebert_OBJECTS) $(liebert_DEPENDENCIES) liebert-esp2$(EXEEXT): $(liebert_esp2_OBJECTS) $(liebert_esp2_DEPENDENCIES) @rm -f liebert-esp2$(EXEEXT) $(LINK) $(liebert_esp2_OBJECTS) $(liebert_esp2_LDADD) $(LIBS) +macosx-ups$(EXEEXT): $(macosx_ups_OBJECTS) $(macosx_ups_DEPENDENCIES) + @rm -f macosx-ups$(EXEEXT) + $(macosx_ups_LINK) $(macosx_ups_OBJECTS) $(macosx_ups_LDADD) $(LIBS) masterguard$(EXEEXT): $(masterguard_OBJECTS) $(masterguard_DEPENDENCIES) @rm -f masterguard$(EXEEXT) $(LINK) $(masterguard_OBJECTS) $(masterguard_LDADD) $(LIBS) @@ -1009,7 +1036,7 @@ metasys$(EXEEXT): $(metasys_OBJECTS) $(metasys_DEPENDENCIES) $(LINK) $(metasys_OBJECTS) $(metasys_LDADD) $(LIBS) mge-shut$(EXEEXT): $(mge_shut_OBJECTS) $(mge_shut_DEPENDENCIES) @rm -f mge-shut$(EXEEXT) - $(LINK) $(mge_shut_OBJECTS) $(mge_shut_LDADD) $(LIBS) + $(mge_shut_LINK) $(mge_shut_OBJECTS) $(mge_shut_LDADD) $(LIBS) mge-utalk$(EXEEXT): $(mge_utalk_OBJECTS) $(mge_utalk_DEPENDENCIES) @rm -f mge-utalk$(EXEEXT) $(LINK) $(mge_utalk_OBJECTS) $(mge_utalk_LDADD) $(LIBS) @@ -1019,12 +1046,12 @@ microdowell$(EXEEXT): $(microdowell_OBJECTS) $(microdowell_DEPENDENCIES) netxml-ups$(EXEEXT): $(netxml_ups_OBJECTS) $(netxml_ups_DEPENDENCIES) @rm -f netxml-ups$(EXEEXT) $(LINK) $(netxml_ups_OBJECTS) $(netxml_ups_LDADD) $(LIBS) -newmge-shut$(EXEEXT): $(newmge_shut_OBJECTS) $(newmge_shut_DEPENDENCIES) - @rm -f newmge-shut$(EXEEXT) - $(newmge_shut_LINK) $(newmge_shut_OBJECTS) $(newmge_shut_LDADD) $(LIBS) nut-ipmipsu$(EXEEXT): $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_DEPENDENCIES) @rm -f nut-ipmipsu$(EXEEXT) $(LINK) $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_LDADD) $(LIBS) +oldmge-shut$(EXEEXT): $(oldmge_shut_OBJECTS) $(oldmge_shut_DEPENDENCIES) + @rm -f oldmge-shut$(EXEEXT) + $(LINK) $(oldmge_shut_OBJECTS) $(oldmge_shut_LDADD) $(LIBS) oneac$(EXEEXT): $(oneac_OBJECTS) $(oneac_DEPENDENCIES) @rm -f oneac$(EXEEXT) $(LINK) $(oneac_OBJECTS) $(oneac_LDADD) $(LIBS) @@ -1130,6 +1157,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liebert-esp2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liebert-hid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liebert.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macosx-ups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main-hal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/masterguard.Po@am__quote@ @@ -1139,14 +1167,14 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mge-shut.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mge-utalk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mge-xml.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mge_shut-hidparser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mge_shut-libhid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mge_shut-libshut.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mge_shut-mge-hid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mge_shut-usbhid-ups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/microdowell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netvision-mib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netxml-ups.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newmge_shut-hidparser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newmge_shut-libhid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newmge_shut-libshut.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newmge_shut-mge-hid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newmge_shut-usbhid-ups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nut-ipmipsu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nut-libfreeipmi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oneac.Po@am__quote@ @@ -1211,75 +1239,75 @@ dummy_ups-dummy-ups.obj: dummy-ups.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` -newmge_shut-usbhid-ups.o: usbhid-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-usbhid-ups.o -MD -MP -MF $(DEPDIR)/newmge_shut-usbhid-ups.Tpo -c -o newmge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-usbhid-ups.Tpo $(DEPDIR)/newmge_shut-usbhid-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usbhid-ups.c' object='newmge_shut-usbhid-ups.o' libtool=no @AMDEPBACKSLASH@ +mge_shut-usbhid-ups.o: usbhid-ups.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.o -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usbhid-ups.c' object='mge_shut-usbhid-ups.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c -newmge_shut-usbhid-ups.obj: usbhid-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-usbhid-ups.obj -MD -MP -MF $(DEPDIR)/newmge_shut-usbhid-ups.Tpo -c -o newmge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-usbhid-ups.Tpo $(DEPDIR)/newmge_shut-usbhid-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usbhid-ups.c' object='newmge_shut-usbhid-ups.obj' libtool=no @AMDEPBACKSLASH@ +mge_shut-usbhid-ups.obj: usbhid-ups.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.obj -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usbhid-ups.c' object='mge_shut-usbhid-ups.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` -newmge_shut-libshut.o: libshut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-libshut.o -MD -MP -MF $(DEPDIR)/newmge_shut-libshut.Tpo -c -o newmge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-libshut.Tpo $(DEPDIR)/newmge_shut-libshut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libshut.c' object='newmge_shut-libshut.o' libtool=no @AMDEPBACKSLASH@ +mge_shut-libshut.o: libshut.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.o -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libshut.c' object='mge_shut-libshut.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c -newmge_shut-libshut.obj: libshut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-libshut.obj -MD -MP -MF $(DEPDIR)/newmge_shut-libshut.Tpo -c -o newmge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-libshut.Tpo $(DEPDIR)/newmge_shut-libshut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libshut.c' object='newmge_shut-libshut.obj' libtool=no @AMDEPBACKSLASH@ +mge_shut-libshut.obj: libshut.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.obj -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libshut.c' object='mge_shut-libshut.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` -newmge_shut-libhid.o: libhid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-libhid.o -MD -MP -MF $(DEPDIR)/newmge_shut-libhid.Tpo -c -o newmge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-libhid.Tpo $(DEPDIR)/newmge_shut-libhid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhid.c' object='newmge_shut-libhid.o' libtool=no @AMDEPBACKSLASH@ +mge_shut-libhid.o: libhid.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.o -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhid.c' object='mge_shut-libhid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c -newmge_shut-libhid.obj: libhid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-libhid.obj -MD -MP -MF $(DEPDIR)/newmge_shut-libhid.Tpo -c -o newmge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-libhid.Tpo $(DEPDIR)/newmge_shut-libhid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhid.c' object='newmge_shut-libhid.obj' libtool=no @AMDEPBACKSLASH@ +mge_shut-libhid.obj: libhid.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.obj -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhid.c' object='mge_shut-libhid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` -newmge_shut-hidparser.o: hidparser.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-hidparser.o -MD -MP -MF $(DEPDIR)/newmge_shut-hidparser.Tpo -c -o newmge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-hidparser.Tpo $(DEPDIR)/newmge_shut-hidparser.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hidparser.c' object='newmge_shut-hidparser.o' libtool=no @AMDEPBACKSLASH@ +mge_shut-hidparser.o: hidparser.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.o -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hidparser.c' object='mge_shut-hidparser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c -newmge_shut-hidparser.obj: hidparser.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-hidparser.obj -MD -MP -MF $(DEPDIR)/newmge_shut-hidparser.Tpo -c -o newmge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-hidparser.Tpo $(DEPDIR)/newmge_shut-hidparser.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hidparser.c' object='newmge_shut-hidparser.obj' libtool=no @AMDEPBACKSLASH@ +mge_shut-hidparser.obj: hidparser.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.obj -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hidparser.c' object='mge_shut-hidparser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` -newmge_shut-mge-hid.o: mge-hid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-mge-hid.o -MD -MP -MF $(DEPDIR)/newmge_shut-mge-hid.Tpo -c -o newmge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-mge-hid.Tpo $(DEPDIR)/newmge_shut-mge-hid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mge-hid.c' object='newmge_shut-mge-hid.o' libtool=no @AMDEPBACKSLASH@ +mge_shut-mge-hid.o: mge-hid.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.o -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mge-hid.c' object='mge_shut-mge-hid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c -newmge_shut-mge-hid.obj: mge-hid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -MT newmge_shut-mge-hid.obj -MD -MP -MF $(DEPDIR)/newmge_shut-mge-hid.Tpo -c -o newmge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/newmge_shut-mge-hid.Tpo $(DEPDIR)/newmge_shut-mge-hid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mge-hid.c' object='newmge_shut-mge-hid.obj' libtool=no @AMDEPBACKSLASH@ +mge_shut-mge-hid.obj: mge-hid.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.obj -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mge-hid.c' object='mge_shut-mge-hid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(newmge_shut_CFLAGS) $(CFLAGS) -c -o newmge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` mostlyclean-libtool: -rm -f *.lo diff --git a/drivers/apc-mib.c b/drivers/apc-mib.c index 368504c..8851a6f 100644 --- a/drivers/apc-mib.c +++ b/drivers/apc-mib.c @@ -1,8 +1,9 @@ /* apc-mib.c - data to monitor APC SNMP devices (Powernet MIB) with NUT * - * Copyright (C) 2002-2003 - * Dmitry Frolov - * Arnaud Quette + * Copyright (C) + * 2002-2003 - Dmitry Frolov + * 2002-2012 - Arnaud Quette + * 2012 - Chew Hong Gunn (high precision values) * * Sponsored by MGE UPS SYSTEMS * @@ -25,7 +26,7 @@ #include "apc-mib.h" -#define APCC_MIB_VERSION "1.1" +#define APCC_MIB_VERSION "1.2" /* Other APC sysOID: * @@ -45,6 +46,15 @@ /* TODO: find the right sysOID for this MIB * Ie ".1.3.6.1.4.1.318.1.1.1" or ".1.3.6.1.4.1.318" or? */ +/* .1.3.6.1.4.1.318.1.1.1 + * enterprise^ + * apc ---------^ + * products ------^ + * hardware --------^ + * ups ---------------^ + * ref: ftp://ftp.apc.com/apc/public/software/pnetmib/mib/404/powernet404.mib + */ + /* info elements */ #define APCC_OID_BATT_STATUS ".1.3.6.1.4.1.318.1.1.1.2.1.1.0" @@ -107,6 +117,19 @@ static info_lkp_t apcc_sensitivity_modes[] = { { 0, "NULL" } }; +#define APCC_OID_TRANSFERREASON "1.3.6.1.4.1.318.1.1.1.3.2.5.0" +static info_lkp_t apcc_transfer_reasons[] = { + { 1, "noTransfer" }, + { 2, "highLineVoltage" }, + { 3, "brownout" }, + { 4, "blackout" }, + { 5, "smallMomentarySag" }, + { 6, "deepMomentarySag" }, + { 7, "smallMomentarySpike" }, + { 8, "largeMomentarySpike" }, + { 9, "selfTest" }, + { 10, "rateOfVoltageChange" } +}; /* --- */ @@ -130,7 +153,12 @@ static snmp_info_t apcc_mib[] = { { "ups.model", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.1.1.1.1.0", "Generic Powernet SNMP device", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, { "ups.serial", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.1.1.2.3.0", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, { "ups.mfr.date", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.318.1.1.1.1.2.2.0", "", SU_FLAG_OK | SU_FLAG_STATIC, NULL }, + { "input.voltage", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.3.3.1.0", "", SU_FLAG_OK | SU_FLAG_NEGINVALID | SU_FLAG_UNIQUE, NULL }, + { "input.voltage.maximum", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.3.3.2.0", "", SU_FLAG_OK | SU_FLAG_NEGINVALID | SU_FLAG_UNIQUE, NULL }, + { "input.voltage.minimum", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.3.3.3.0", "", SU_FLAG_OK | SU_FLAG_NEGINVALID | SU_FLAG_UNIQUE, NULL }, { "input.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.1.3.2.1.0", "", SU_FLAG_OK, NULL }, + { "input.voltage.maximum", 0, 1, ".1.3.6.1.4.1.318.1.1.1.3.2.2.0", "", SU_FLAG_OK, NULL }, + { "input.voltage.minimum", 0, 1, ".1.3.6.1.4.1.318.1.1.1.3.2.3.0", "", SU_FLAG_OK, NULL }, { "input.phases", ST_FLAG_STRING, 2, ".1.3.6.1.4.1.318.1.1.1.9.2.2.1.2.1", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, { "input.L1-L2.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.1.9.2.3.1.3.1.1.1", "", SU_FLAG_OK|SU_FLAG_NEGINVALID, NULL }, { "input.L2-L3.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.1.9.2.3.1.3.1.1.2", "", SU_FLAG_OK|SU_FLAG_NEGINVALID, NULL }, @@ -151,9 +179,11 @@ static snmp_info_t apcc_mib[] = { { "input.L2.current.minimum", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.9.2.3.1.8.1.1.2", "", SU_FLAG_OK|SU_FLAG_NEGINVALID, NULL }, { "input.L3.current.minimum", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.9.2.3.1.8.1.1.3", "", SU_FLAG_OK|SU_FLAG_NEGINVALID, NULL }, { "input.frequency", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.9.2.2.1.4.1", "", SU_FLAG_OK|SU_FLAG_NEGINVALID|SU_FLAG_UNIQUE, NULL }, + { "input.frequency", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.3.3.4.0", "", SU_FLAG_OK|SU_FLAG_NEGINVALID|SU_FLAG_UNIQUE, NULL }, { "input.frequency", 0, 1, ".1.3.6.1.4.1.318.1.1.1.3.2.4.0", "", SU_FLAG_OK, NULL }, { "input.transfer.low", ST_FLAG_STRING | ST_FLAG_RW, 3, ".1.3.6.1.4.1.318.1.1.1.5.2.3.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL }, { "input.transfer.high", ST_FLAG_STRING | ST_FLAG_RW, 3, ".1.3.6.1.4.1.318.1.1.1.5.2.2.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL }, + { "input.transfer.reason", ST_FLAG_STRING, 1, APCC_OID_TRANSFERREASON, "", SU_TYPE_INT | SU_FLAG_OK, apcc_transfer_reasons }, { "input.sensitivity", ST_FLAG_STRING | ST_FLAG_RW, 1, APCC_OID_SENSITIVITY, "", SU_TYPE_INT | SU_FLAG_OK, apcc_sensitivity_modes }, { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, APCC_OID_POWER_STATUS, "OFF", SU_FLAG_OK | SU_STATUS_PWR, apcc_pwr_info }, @@ -163,27 +193,37 @@ static snmp_info_t apcc_mib[] = { SU_FLAG_OK | SU_STATUS_CAL, apcc_cal_info }, { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, APCC_OID_NEEDREPLBATT, "", SU_FLAG_OK | SU_STATUS_RB, apcc_battrepl_info }, + { "ups.temperature", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.2.3.2.0", "", SU_FLAG_OK|SU_FLAG_UNIQUE, NULL }, { "ups.temperature", 0, 1, ".1.3.6.1.4.1.318.1.1.1.2.2.2.0", "", SU_FLAG_OK, NULL }, + { "ups.load", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.4.3.3.0", "", SU_FLAG_OK|SU_FLAG_NEGINVALID|SU_FLAG_UNIQUE, NULL }, { "ups.load", 0, 1, ".1.3.6.1.4.1.318.1.1.1.4.2.3.0", "", SU_FLAG_OK, NULL }, { "ups.firmware", ST_FLAG_STRING, 16, ".1.3.6.1.4.1.318.1.1.1.1.2.1.0", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, { "ups.delay.shutdown", ST_FLAG_STRING | ST_FLAG_RW, 3, ".1.3.6.1.4.1.318.1.1.1.5.2.10.0", "", SU_FLAG_OK, NULL }, { "ups.delay.start", ST_FLAG_STRING | ST_FLAG_RW, 3, ".1.3.6.1.4.1.318.1.1.1.5.2.9.0", "", SU_FLAG_OK, NULL }, + { "battery.charge", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.2.3.1.0", "", SU_FLAG_OK|SU_FLAG_NEGINVALID|SU_FLAG_UNIQUE, NULL }, { "battery.charge", 0, 1, ".1.3.6.1.4.1.318.1.1.1.2.2.1.0", "", SU_FLAG_OK, NULL }, { "battery.charge.restart", ST_FLAG_STRING | ST_FLAG_RW, 3, ".1.3.6.1.4.1.318.1.1.1.5.2.6.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL }, { "battery.runtime", 0, 1, ".1.3.6.1.4.1.318.1.1.1.2.2.3.0", "", SU_FLAG_OK, NULL }, { "battery.runtime.low", ST_FLAG_STRING | ST_FLAG_RW, 3, ".1.3.6.1.4.1.318.1.1.1.5.2.8.0", "", SU_FLAG_OK, NULL }, + { "battery.voltage", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.2.3.4.0", "", SU_FLAG_OK|SU_FLAG_NEGINVALID|SU_FLAG_UNIQUE, NULL }, { "battery.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.1.2.2.8.0", "", SU_FLAG_OK, NULL }, { "battery.voltage.nominal", 0, 1, ".1.3.6.1.4.1.318.1.1.1.2.2.7.0", "", SU_FLAG_OK, NULL }, + { "battery.current", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.2.3.5.0", "", SU_FLAG_OK|SU_FLAG_UNIQUE, NULL }, { "battery.current", 0, 1, ".1.3.6.1.4.1.318.1.1.1.2.2.9.0", "", SU_FLAG_OK, NULL }, + { "battery.current.total", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.2.3.6.0", "", SU_FLAG_OK, NULL }, { "battery.packs", 0, 1, ".1.3.6.1.4.1.318.1.1.1.2.2.5.0", "", SU_FLAG_OK, NULL }, { "battery.packs.bad", 0, 1, ".1.3.6.1.4.1.318.1.1.1.2.2.6.0", "", SU_FLAG_OK, NULL }, { "battery.date", ST_FLAG_STRING | ST_FLAG_RW, 8, ".1.3.6.1.4.1.318.1.1.1.2.1.3.0", "", SU_FLAG_OK | SU_FLAG_STATIC | SU_TYPE_STRING, NULL }, { "ups.id", ST_FLAG_STRING | ST_FLAG_RW, 8, ".1.3.6.1.4.1.318.1.1.1.1.1.2.0", "", SU_FLAG_OK | SU_FLAG_STATIC | SU_TYPE_STRING, NULL }, { "ups.test.result", ST_FLAG_STRING, SU_INFOSIZE, APCC_OID_TESTDIAGRESULTS, "", SU_FLAG_OK, apcc_testdiag_results }, + { "ups.test.date", ST_FLAG_STRING | ST_FLAG_RW, 8, ".1.3.6.1.4.1.318.1.1.1.7.2.4.0", "", SU_FLAG_OK | SU_FLAG_STATIC | SU_TYPE_STRING, NULL }, + { "output.voltage", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.4.3.1.0", "", SU_FLAG_OK | SU_FLAG_UNIQUE, NULL }, { "output.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.1.4.2.1.0", "", SU_FLAG_OK, NULL }, { "output.phases", ST_FLAG_STRING, 2, ".1.3.6.1.4.1.318.1.1.1.9.3.2.1.2.1", "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, { "output.frequency", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.9.3.2.1.4.1", "", SU_FLAG_OK|SU_FLAG_NEGINVALID|SU_FLAG_UNIQUE, NULL }, + { "output.frequency", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.4.3.2.0", "", SU_FLAG_OK|SU_FLAG_NEGINVALID|SU_FLAG_UNIQUE, NULL }, { "output.frequency", 0, 1, ".1.3.6.1.4.1.318.1.1.1.4.2.2.0", "", SU_FLAG_OK, NULL }, + { "output.current", 0, 0.1, ".1.3.6.1.4.1.318.1.1.1.4.3.4.0", "", SU_FLAG_OK|SU_FLAG_NEGINVALID|SU_FLAG_UNIQUE, NULL }, { "output.current", 0, 1, ".1.3.6.1.4.1.318.1.1.1.4.2.4.0", "", SU_FLAG_OK, NULL }, { "output.L1-L2.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.1.9.3.3.1.3.1.1.1", "", SU_FLAG_OK|SU_FLAG_NEGINVALID, NULL }, { "output.L2-L3.voltage", 0, 1, ".1.3.6.1.4.1.318.1.1.1.9.3.3.1.3.1.1.2", "", SU_FLAG_OK|SU_FLAG_NEGINVALID, NULL }, @@ -220,11 +260,11 @@ static snmp_info_t apcc_mib[] = { /* Measure-UPS ambient variables */ /* Environmental sensors (AP9612TH and others) */ { "ambient.temperature", 0, 1, ".1.3.6.1.4.1.318.1.1.2.1.1.0", "", SU_FLAG_OK, NULL }, - { "ambient.temperature.high", 0, 1, ".1.3.6.1.4.1.318.1.1.10.1.2.2.1.3.1", "", SU_FLAG_OK, NULL }, - { "ambient.temperature.low", 0, 1, ".1.3.6.1.4.1.318.1.1.10.1.2.2.1.4.1", "", SU_FLAG_OK, NULL }, + { "ambient.1.temperature.alarm.high", 0, 1, ".1.3.6.1.4.1.318.1.1.10.1.2.2.1.3.1", "", SU_FLAG_OK, NULL }, + { "ambient.1.temperature.alarm.low", 0, 1, ".1.3.6.1.4.1.318.1.1.10.1.2.2.1.4.1", "", SU_FLAG_OK, NULL }, { "ambient.humidity", 0, 1, ".1.3.6.1.4.1.318.1.1.2.1.2.0", "", SU_FLAG_OK, NULL }, - { "ambient.humidity.high", 0, 1, ".1.3.6.1.4.1.318.1.1.10.1.2.2.1.6.1", "", SU_FLAG_OK, NULL }, - { "ambient.humidity.low", 0, 1, ".1.3.6.1.4.1.318.1.1.10.1.2.2.1.7.1", "", SU_FLAG_OK, NULL }, + { "ambient.1.humidity.alarm.high", 0, 1, ".1.3.6.1.4.1.318.1.1.10.1.2.2.1.6.1", "", SU_FLAG_OK, NULL }, + { "ambient.1.humidity.alarm.low", 0, 1, ".1.3.6.1.4.1.318.1.1.10.1.2.2.1.7.1", "", SU_FLAG_OK, NULL }, /* IEM ambient variables */ /* IEM: integrated environment monitor probe */ diff --git a/drivers/apcsmart.c b/drivers/apcsmart.c index 1f5ab12..cb1d4f5 100644 --- a/drivers/apcsmart.c +++ b/drivers/apcsmart.c @@ -56,11 +56,10 @@ static int ups_status = 0; #define VDISCARD VDISCRD #endif /* VDISCRD && !VDISCARD */ - #ifndef CTRL -#define CONTROL(x) (x&037) +#define CONTROL(x) (x&037) #else -#define CONTROL CTRL +#define CONTROL CTRL #endif /* @@ -71,55 +70,54 @@ static int ups_status = 0; #define CDISCARD CONTROL('O') #endif #ifndef CDSUSP -#define CDSUSP CONTROL('Y') +#define CDSUSP CONTROL('Y') #endif #ifndef CEOF -#define CEOF CONTROL('D') +#define CEOF CONTROL('D') #endif #ifndef CEOL #define CEOL 0xff /* was 0 */ #endif #ifndef CERASE -#define CERASE 0177 +#define CERASE 0177 #endif #ifndef CINTR -#define CINTR CONTROL('C') +#define CINTR CONTROL('C') #endif #ifndef CKILL #define CKILL CONTROL('U') /* was '@' */ #endif #ifndef CLNEXT -#define CLNEXT CONTROL('V') +#define CLNEXT CONTROL('V') #endif #ifndef CMIN -#define CMIN CEOF +#define CMIN CEOF #endif #ifndef CQUIT -#define CQUIT CONTROL('\\') +#define CQUIT CONTROL('\\') #endif #ifndef CRPRNT -#define CRPRNT CONTROL('R') +#define CRPRNT CONTROL('R') #endif #ifndef CREPRINT #define CREPRINT CRPRNT #endif #ifndef CSTART -#define CSTART CONTROL('Q') +#define CSTART CONTROL('Q') #endif #ifndef CSTOP -#define CSTOP CONTROL('S') +#define CSTOP CONTROL('S') #endif #ifndef CSUSP -#define CSUSP CONTROL('Z') +#define CSUSP CONTROL('Z') #endif #ifndef CTIME -#define CTIME CEOL +#define CTIME CEOL #endif #ifndef CWERASE #define CWERASE CONTROL('W') #endif - /* some forwards */ static int sdcmd_S(const void *); @@ -141,7 +139,7 @@ static int (*sdlist[])(const void *) = { #define SDIDX_K 2 #define SDIDX_Z 3 #define SDIDX_CS 4 -#define SDCNT ((int)(sizeof(sdlist)/sizeof(sdlist[0]))) +#define SDCNT ((int)(sizeof(sdlist)/sizeof(sdlist[0]))) static apc_vartab_t *vartab_lookup_char(char cmdchar) { @@ -241,6 +239,84 @@ static const char *convert_data(apc_vartab_t *cmd_entry, const char *upsval) return temp; } +/* report differences if tcsetattr != tcgetattr, return otherwise */ +static void apc_ser_diff(struct termios *tioset, struct termios *tioget) +{ + size_t i; + const char dir[] = { 's', 'g' }; + struct termios *tio[] = { tioset, tioget }; + struct cchar { + const char *name; + int sub; + u_char def; + }; + const struct cchar cchars1[] = { +#ifdef VDISCARD + { "discard", VDISCARD, CDISCARD }, +#endif +#ifdef VDSUSP + { "dsusp", VDSUSP, CDSUSP }, +#endif + { "eof", VEOF, CEOF }, + { "eol", VEOL, CEOL }, + { "eol2", VEOL2, CEOL }, + { "erase", VERASE, CERASE }, +#ifdef VINTR + { "intr", VINTR, CINTR }, +#endif + { "kill", VKILL, CKILL }, + { "lnext", VLNEXT, CLNEXT }, + { "min", VMIN, CMIN }, + { "quit", VQUIT, CQUIT }, +#ifdef VREPRINT + { "reprint", VREPRINT, CREPRINT }, +#endif + { "start", VSTART, CSTART }, +#ifdef VSTATUS + { "status", VSTATUS, CSTATUS }, +#endif + { "stop", VSTOP, CSTOP }, + { "susp", VSUSP, CSUSP }, + { "time", VTIME, CTIME }, + { "werase", VWERASE, CWERASE }, + { NULL }, + }, *cp; + + /* clear status flags so that they don't affect our binary compare */ +#if defined(PENDIN) || defined(FLUSHO) + for (i = 0; i < sizeof(tio)/sizeof(tio[0]); i++) { +#ifdef PENDIN + tio[i]->c_lflag &= ~PENDIN; +#endif +#ifdef FLUSHO + tio[i]->c_lflag &= ~FLUSHO; +#endif + } +#endif /* defined(PENDIN) || defined(FLUSHO) */ + + if (!memcmp(tio[0], tio[1], sizeof(*tio[0]))) + return; + + upslogx(LOG_NOTICE, "%s: device reports different attributes than what were set", device_path); + + /* + * According to the manual the most common problem is mis-matched + * combinations of input and output baud rates. If the combination is + * not supported then neither are changed. This should not be a + * problem here since we set them both to the same extremely common + * rate of 2400. + */ + + for (i = 0; i < sizeof(tio)/sizeof(tio[0]); i++) { + upsdebugx(1, "tc%cetattr(): gfmt1:cflag=%x:iflag=%x:lflag=%x:oflag=%x:", dir[i], + (unsigned int) tio[i]->c_cflag, (unsigned int) tio[i]->c_iflag, + (unsigned int) tio[i]->c_lflag, (unsigned int) tio[i]->c_oflag); + for (cp = cchars1; cp->name; ++cp) + upsdebugx(1, "\t%s=%x:", cp->name, tio[i]->c_cc[cp->sub]); + upsdebugx(1, "\tispeed=%d:ospeed=%d", (int) cfgetispeed(tio[i]), (int) cfgetospeed(tio[i])); + } +} + static void apc_ser_set(void) { struct termios tio, tio_chk; @@ -298,92 +374,11 @@ static void apc_ser_set(void) if (tcsetattr(upsfd, TCSANOW, &tio)) fatal_with_errno(EXIT_FAILURE, "tcsetattr(%s)", device_path); - /* clear status flags so that they don't affect our binary compare */ -#ifdef PENDIN - tio.c_lflag &= ~PENDIN; -#endif -#ifdef FLUSHO - tio.c_lflag &= ~FLUSHO; -#endif - memset(&tio_chk, 0, sizeof(tio_chk)); if (tcgetattr(upsfd, &tio_chk)) fatal_with_errno(EXIT_FAILURE, "tcgetattr(%s)", device_path); - /* clear status flags so that they don't affect our binary compare */ -#ifdef PENDIN - tio_chk.c_lflag &= ~PENDIN; -#endif -#ifdef FLUSHO - tio_chk.c_lflag &= ~FLUSHO; -#endif - - if (memcmp(&tio_chk, &tio, sizeof(tio))) { - struct cchar { - const char *name; - int sub; - u_char def; - }; - const struct cchar cchars1[] = { -#ifdef VDISCARD - { "discard", VDISCARD, CDISCARD }, -#endif -#ifdef VDSUSP - { "dsusp", VDSUSP, CDSUSP }, -#endif - { "eof", VEOF, CEOF }, - { "eol", VEOL, CEOL }, - { "eol2", VEOL2, CEOL }, - { "erase", VERASE, CERASE }, -#ifdef VINTR - { "intr", VINTR, CINTR }, -#endif - { "kill", VKILL, CKILL }, - { "lnext", VLNEXT, CLNEXT }, - { "min", VMIN, CMIN }, - { "quit", VQUIT, CQUIT }, -#ifdef VREPRINT - { "reprint", VREPRINT, CREPRINT }, -#endif - { "start", VSTART, CSTART }, -#ifdef VSTATUS - { "status", VSTATUS, CSTATUS }, -#endif - { "stop", VSTOP, CSTOP }, - { "susp", VSUSP, CSUSP }, - { "time", VTIME, CTIME }, - { "werase", VWERASE, CWERASE }, - { .name = NULL }, - }; - const struct cchar *cp; - struct termios *tp; - - upslogx(LOG_NOTICE, "%s: device reports different attributes than what were set", device_path); - - /* - * According to the manual the most common problem is - * mis-matched combinations of input and output baud rates. If - * the combination is not supported then neither are changed. - * This should not be a problem here since we set them both to - * the same extremely common rate of 2400. - */ - - tp = &tio; - upsdebugx(1, "tcsetattr(): gfmt1:cflag=%x:iflag=%x:lflag=%x:oflag=%x:", - (unsigned int) tp->c_cflag, (unsigned int) tp->c_iflag, - (unsigned int) tp->c_lflag, (unsigned int) tp->c_oflag); - for (cp = cchars1; cp->name; ++cp) - upsdebugx(1, "\t%s=%x:", cp->name, tp->c_cc[cp->sub]); - upsdebugx(1, "\tispeed=%d:ospeed=%d", (int) cfgetispeed(tp), (int) cfgetospeed(tp)); - - tp = &tio_chk; - upsdebugx(1, "tcgetattr(): gfmt1:cflag=%x:iflag=%x:lflag=%x:oflag=%x:", - (unsigned int) tp->c_cflag, (unsigned int) tp->c_iflag, - (unsigned int) tp->c_lflag, (unsigned int) tp->c_oflag); - for (cp = cchars1; cp->name; ++cp) - upsdebugx(1, "\t%s=%x:", cp->name, tp->c_cc[cp->sub]); - upsdebugx(1, "\tispeed=%d:ospeed=%d", (int) cfgetispeed(tp), (int) cfgetospeed(tp)); - } + apc_ser_diff(&tio, &tio_chk); cable = getval("cable"); if (cable && !strcasecmp(cable, ALT_CABLE_1)) { diff --git a/drivers/belkinunv.c b/drivers/belkinunv.c index 5698313..c5abda2 100644 --- a/drivers/belkinunv.c +++ b/drivers/belkinunv.c @@ -36,7 +36,6 @@ battery.runtime battery.voltage battery.voltage.nominal - driver.version.internal input.frequency input.frequency.nominal e.g. 60 for 60Hz input.sensitivity (RW) normal/medium/low diff --git a/drivers/blazer_usb.c b/drivers/blazer_usb.c index 1104071..0651eea 100644 --- a/drivers/blazer_usb.c +++ b/drivers/blazer_usb.c @@ -28,7 +28,7 @@ #include "blazer.h" #define DRIVER_NAME "Megatec/Q1 protocol USB driver" -#define DRIVER_VERSION "0.08" +#define DRIVER_VERSION "0.09" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -351,6 +351,7 @@ static usb_device_id_t blazer_usb_id[] = { { USB_DEVICE(0x06da, 0x0004), &cypress_subdriver }, /* Phoenixtec Innova 3/1 T */ { USB_DEVICE(0x06da, 0x0005), &cypress_subdriver }, /* Phoenixtec Innova RT */ { USB_DEVICE(0x06da, 0x0201), &cypress_subdriver }, /* Phoenixtec Innova T */ + { USB_DEVICE(0x06da, 0x0601), &phoenix_subdriver }, /* Online Zinto A */ { USB_DEVICE(0x0f03, 0x0001), &cypress_subdriver }, /* Unitek Alpha 1200Sx */ { USB_DEVICE(0x14f0, 0x00c9), &phoenix_subdriver }, /* GE EP series */ /* end of list */ diff --git a/drivers/eaton-mib.c b/drivers/eaton-mib.c index 6da265b..b06006e 100644 --- a/drivers/eaton-mib.c +++ b/drivers/eaton-mib.c @@ -1,10 +1,11 @@ /* eaton-mib.c - data to monitor Eaton Aphel PDUs (Basic and Complex) * - * Copyright (C) 2008 - 2010 - * Arnaud Quette + * Copyright (C) 2008 - 2012 + * Arnaud Quette + * Arnaud Quette * - * Sponsored by Eaton - * and MGE Office Protection Systems + * Supported by Eaton + * and previously MGE Office Protection Systems * * 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 @@ -348,7 +349,112 @@ static snmp_info_t eaton_marlin_mib[] = { { NULL, 0, 0, NULL, NULL, 0, NULL, NULL } }; +/* Pulizzi Monitored ePDU (Basic model, SNMP only) + * FIXME: to be completed + * + * Warning: there are 2 versions: + * - SA built MI.mib (old MIB) + * #define PULIZZI1_OID_MIB ".1.3.6.1.4.1.20677.3.1.1" + * #define PULIZZI1_OID_MODEL_NAME ".1.3.6.1.4.1.20677.3.1.1.1.2.0" + * - Eaton-Powerware-Monitored-ePDU_1.0.E.mib (new MIB) Vertical SW + */ + + +/* Pulizzi Switched ePDU */ + +#define EATON_PULIZZI_SW_MIB_VERSION "0.1" + +#define PULIZZI_SW_OID_MIB ".1.3.6.1.4.1.20677.3.1.1" +#define PULIZZI_SW_OID_MODEL_NAME ".1.3.6.1.4.1.20677.2.1.1.0" + +/* Some buggy FW also report sysOID = ".1.3.6.1.4.1.20677.1" */ +#define EATON_PULIZZI_SWITCHED1_SYSOID ".1.3.6.1.4.1.20677.1" +#define EATON_PULIZZI_SWITCHED2_SYSOID ".1.3.6.1.4.1.20677.2" + + +static info_lkp_t pulizzi_sw_outlet_status_info[] = { + { 1, "on" }, + { 2, "off" }, + { 0, NULL } +}; + +/* simply remap the above status to "yes" */ +static info_lkp_t pulizzi_sw_outlet_switchability_info[] = { + { 1, "yes" }, + { 2, "yes" }, + { 0, NULL } +}; + +/* Snmp2NUT lookup table for Eaton Pulizzi Switched ePDU MIB */ +static snmp_info_t eaton_pulizzi_switched_mib[] = { + /* Device page */ + { "device.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "EATON | Powerware", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, + { "device.model", ST_FLAG_STRING, SU_INFOSIZE, PULIZZI_SW_OID_MODEL_NAME, + "Switched ePDU", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + { "device.type", ST_FLAG_STRING, SU_INFOSIZE, NULL, "pdu", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, + + /* UPS page */ + { "ups.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "EATON", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, + { "ups.model", ST_FLAG_STRING, SU_INFOSIZE, PULIZZI_SW_OID_MODEL_NAME, + "Switched ePDU", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + /* FIXME: to be moved to the device collection! */ + { "ups.date", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.20677.2.1.4.0", + "", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + { "ups.time", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.20677.2.1.3.0", + "", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, + { "ups.macaddr", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.20677.2.2.6.0", + "unknown", 0, NULL, NULL }, + + /* Outlet page */ + /* Note: outlet.count is deduced, with guestimate_outlet_count() */ + { "outlet.id", 0, 1, NULL, "0", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + { "outlet.desc", ST_FLAG_RW | ST_FLAG_STRING, 20, NULL, "All outlets", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + + { "outlet.current", 0, 1.0, ".1.3.6.1.4.1.20677.2.8.6.4.2.0", NULL, 0, NULL, NULL }, + { "outlet.voltage", 0, 1.0, ".1.3.6.1.4.1.20677.2.8.6.4.1.0", NULL, 0, NULL, NULL }, + { "outlet.power", 0, 1.0, ".1.3.6.1.4.1.20677.2.8.6.4.3.0", NULL, 0, NULL, NULL }, + + /* outlet template definition + * Notes: + * - indexes start from 1, ie outlet.1 => .1 + * - the first definition is used to determine the base index (ie 0 or 1) + * - outlet.count is estimated, based on the below OID iteration capabilities */ + { "outlet.%i.desc", ST_FLAG_RW | ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.20677.2.6.1.%i.1.0", NULL, SU_FLAG_STATIC | SU_FLAG_OK | SU_OUTLET, NULL, NULL }, + { "outlet.%i.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.20677.2.6.3.%i.0", + NULL, SU_FLAG_OK | SU_OUTLET, &pulizzi_sw_outlet_status_info[0], NULL }, + { "outlet.%i.id", 0, 1, NULL, "%i", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK | SU_OUTLET, NULL, NULL }, + /* we use the same OID as outlet.n.status..., to expose switchability */ + { "outlet.%i.switchable", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.20677.2.6.3.%i.0", "yes", SU_FLAG_STATIC | SU_FLAG_OK | SU_OUTLET, &pulizzi_sw_outlet_switchability_info[0], NULL }, + /* FIXME: need to be added to the namespace! */ + { "outlet.%i.delay.reboot", ST_FLAG_RW, SU_INFOSIZE, ".1.3.6.1.4.1.20677.2.6.1.%i.5.0", NULL, SU_OUTLET, NULL, NULL }, + /* "outlet1SequenceTime" is used for global sequence */ + { "outlet.%i.delay.start", ST_FLAG_RW, SU_INFOSIZE, ".1.3.6.1.4.1.20677.2.6.1.%i.4.0", NULL, SU_OUTLET, NULL, NULL }, + + /* instant commands. */ + /* FIXME: not exposed as "outlet.load...", or otherwise specific processing applies (template instanciation) */ + { "load.on", 0, 1, ".1.3.6.1.4.1.20677.2.6.2.1.0", NULL, SU_TYPE_CMD, NULL, NULL }, + { "load.off", 0, 2, ".1.3.6.1.4.1.20677.2.6.2.1.0", NULL, SU_TYPE_CMD, NULL, NULL }, + { "load.on.delay", 0, 3, ".1.3.6.1.4.1.20677.2.6.2.1.0", NULL, SU_TYPE_CMD, NULL, NULL }, + { "load.off.delay", 0, 4, ".1.3.6.1.4.1.20677.2.6.2.1.0", NULL, SU_TYPE_CMD, NULL, NULL }, + + /* WARNING: outlet 1 => index 2! */ + { "outlet.%i.load.on", 0, 1, ".1.3.6.1.4.1.20677.2.6.2.%i.0", NULL, SU_TYPE_CMD | SU_OUTLET | SU_CMD_OFFSET, NULL, NULL }, + { "outlet.%i.load.off", 0, 2, ".1.3.6.1.4.1.20677.2.6.2.%i.0", NULL, SU_TYPE_CMD | SU_OUTLET | SU_CMD_OFFSET, NULL, NULL }, + { "outlet.%i.load.cycle", 0, 3, ".1.3.6.1.4.1.20677.2.6.2.%i.0", NULL, SU_TYPE_CMD | SU_OUTLET | SU_CMD_OFFSET, NULL, NULL }, + + /* end of structure. */ + { NULL, 0, 0, NULL, NULL, 0, NULL, NULL } +}; + + mib2nut_info_t aphel_genesisII = { "aphel_genesisII", EATON_APHEL_MIB_VERSION, "", APHEL1_OID_MODEL_NAME, eaton_aphel_genesisII_mib, APHEL1_SYSOID }; mib2nut_info_t aphel_revelation = { "aphel_revelation", EATON_APHEL_MIB_VERSION, "", APHEL2_OID_MODEL_NAME, eaton_aphel_revelation_mib, APHEL2_SYSOID }; mib2nut_info_t eaton_marlin = { "eaton_epdu", EATON_MARLIN_MIB_VERSION, "", EATON_MARLIN_OID_MODEL_NAME, eaton_marlin_mib, EATON_MARLIN_SYSOID }; +/*mib2nut_info_t pulizzi_monitored = { "pulizzi_monitored", EATON_PULIZZI_MIB_VERSION, "", PULIZZI1_OID_MODEL_NAME, eaton_pulizzi_monitored_mib, PULIZZI1_OID_MIB };*/ +mib2nut_info_t pulizzi_switched1 = { "pulizzi_switched1", EATON_PULIZZI_SW_MIB_VERSION, "", EATON_PULIZZI_SWITCHED1_SYSOID, eaton_pulizzi_switched_mib, EATON_PULIZZI_SWITCHED1_SYSOID }; +mib2nut_info_t pulizzi_switched2 = { "pulizzi_switched2", EATON_PULIZZI_SW_MIB_VERSION, "", EATON_PULIZZI_SWITCHED1_SYSOID, eaton_pulizzi_switched_mib, EATON_PULIZZI_SWITCHED2_SYSOID }; diff --git a/drivers/eaton-mib.h b/drivers/eaton-mib.h index 4997066..d5223e6 100644 --- a/drivers/eaton-mib.h +++ b/drivers/eaton-mib.h @@ -7,5 +7,7 @@ extern mib2nut_info_t aphel_genesisII; extern mib2nut_info_t aphel_revelation; extern mib2nut_info_t eaton_marlin; +extern mib2nut_info_t pulizzi_switched1; +extern mib2nut_info_t pulizzi_switched2; #endif /* EATON_MIB_H */ diff --git a/drivers/macosx-ups.c b/drivers/macosx-ups.c new file mode 100644 index 0000000..11ed475 --- /dev/null +++ b/drivers/macosx-ups.c @@ -0,0 +1,440 @@ +/* Bridge driver to read Mac OS X UPS status (as displayed in Energy Saver control panel) + * + * Copyright (C) 2011-2012 Charles Lepple + * + * 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 + * + */ + +#include "main.h" + +#include + +#include "CoreFoundation/CoreFoundation.h" +#include "IOKit/ps/IOPowerSources.h" +#include "IOKit/ps/IOPSKeys.h" + +#define DRIVER_NAME "Mac OS X UPS meta-driver" +#define DRIVER_VERSION "1.0" + +/* driver description structure */ +upsdrv_info_t upsdrv_info = { + DRIVER_NAME, + DRIVER_VERSION, + "Charles Lepple ", + DRV_EXPERIMENTAL, + { NULL } +}; + +#if 0 +#define CFRelease(ref) do { upsdebugx(3, "%s:%d: CFRelease(%p)", __FILE__, __LINE__, ref); CFRelease(ref); } while(0) +#endif + +static CFStringRef g_power_key = NULL; +static double max_capacity_value = 100.0; + +/*! Copy the current power dictionary. + * + * Caller must release power dictionary when finished with it. + */ +static CFDictionaryRef copy_power_dictionary(CFTypeRef power_key) +{ + CFTypeRef power_blob; + CFDictionaryRef power_dictionary; + + power_blob = IOPSCopyPowerSourcesInfo(); + + assert(power_blob); + upsdebugx(6, "%s: Got power_blob:", __func__); + if(nut_debug_level >= 6) CFShow(power_blob); + + upsdebugx(5, "power_key = "); + if(nut_debug_level >= 5) CFShow(power_key); + upsdebugx(6, "end power_key"); + + power_dictionary = IOPSGetPowerSourceDescription(power_blob, power_key); + + upsdebugx(5, "Asserting 'power_dictionary': %p", power_dictionary); + assert(power_dictionary); + upsdebugx(5, "CFShowing 'power_dictionary'"); + if(nut_debug_level >= 5) CFShow(power_dictionary); + + CFRetain(power_dictionary); + + /* Get a new power_blob next time: */ + CFRelease(power_blob); + + return power_dictionary; +} + +void upsdrv_initinfo(void) +{ + /* try to detect the UPS here - call fatal_with_errno(EXIT_FAILURE, ) if it fails */ + + char device_name[80] = ""; + CFStringRef device_type_cfstr, device_name_cfstr; + CFPropertyListRef power_dictionary; + CFNumberRef max_capacity; + + upsdebugx(1, "upsdrv_initinfo()"); + + dstate_setinfo("device.mfr", "(unknown)"); + + power_dictionary = copy_power_dictionary(g_power_key); + + device_type_cfstr = CFDictionaryGetValue(power_dictionary, CFSTR(kIOPSTypeKey)); + if(device_type_cfstr && !CFStringCompare(device_type_cfstr, CFSTR(kIOPSInternalBatteryType), 0)) { + dstate_setinfo("device.type", "battery"); + } + + upsdebugx(2, "Getting 'Name' key"); + + device_name_cfstr = CFDictionaryGetValue(power_dictionary, CFSTR(kIOPSNameKey)); + + if (!device_name_cfstr) { + fatalx(EXIT_FAILURE, "Couldn't retrieve 'Name' key from power dictionary."); + } + + CFRetain(device_name_cfstr); + + CFStringGetCString(device_name_cfstr, device_name, sizeof(device_name), kCFStringEncodingUTF8); + upsdebugx(2, "Got name: %s", device_name); + + CFRelease(device_name_cfstr); + + dstate_setinfo("device.model", "%s", device_name); + + max_capacity = CFDictionaryGetValue(power_dictionary, CFSTR(kIOPSMaxCapacityKey)); + if(max_capacity) { + CFRetain(max_capacity); + + CFNumberGetValue(max_capacity, kCFNumberDoubleType, &max_capacity_value); + CFRelease(max_capacity); + + upsdebugx(3, "Max Capacity = %.f units (usually 100)", max_capacity_value); + if(max_capacity_value != 100) { + upsdebugx(1, "Max Capacity: %f != 100", max_capacity_value); + } + } + + /* upsh.instcmd = instcmd; */ + CFRelease(power_dictionary); +} + +void upsdrv_updateinfo(void) +{ + CFPropertyListRef power_dictionary; + CFStringRef power_source_state; + CFNumberRef battery_voltage, battery_runtime; + CFNumberRef current_capacity; + CFBooleanRef is_charging; + double max_capacity_value = 100.0, current_capacity_value; + + upsdebugx(1, "upsdrv_updateinfo()"); + + power_dictionary = copy_power_dictionary( g_power_key ); + assert(power_dictionary); /* TODO: call dstate_datastale()? */ + + status_init(); + + /* Retrieve OL/OB state */ + power_source_state = CFDictionaryGetValue(power_dictionary, CFSTR(kIOPSPowerSourceStateKey)); + assert(power_source_state); + CFRetain(power_source_state); + + upsdebugx(3, "Power Source State:"); + if(nut_debug_level >= 3) CFShow(power_source_state); + + if(!CFStringCompare(power_source_state, CFSTR(kIOPSACPowerValue), 0)) { + status_set("OL"); + } else { + status_set("OB"); + } + + CFRelease(power_source_state); + + /* Retrieve CHRG state */ + is_charging = CFDictionaryGetValue(power_dictionary, CFSTR(kIOPSIsChargingKey)); + if(is_charging) { + Boolean is_charging_value; + + is_charging_value = CFBooleanGetValue(is_charging); + if(is_charging_value) { + status_set("CHRG"); + } + } + + status_commit(); + + /* Retrieve battery voltage */ + + battery_voltage = CFDictionaryGetValue(power_dictionary, CFSTR(kIOPSVoltageKey)); + if(battery_voltage) { + int battery_voltage_value; + + CFNumberGetValue(battery_voltage, kCFNumberIntType, &battery_voltage_value); + upsdebugx(2, "battery_voltage = %d mV", battery_voltage_value); + dstate_setinfo("battery.voltage", "%.3f", battery_voltage_value/1000.0); + } + + /* Retrieve battery runtime */ + battery_runtime = CFDictionaryGetValue(power_dictionary, CFSTR(kIOPSTimeToEmptyKey)); + if(battery_runtime) { + double battery_runtime_value; + + CFNumberGetValue(battery_runtime, kCFNumberDoubleType, &battery_runtime_value); + + upsdebugx(2, "battery_runtime = %.f minutes", battery_runtime_value); + if(battery_runtime_value > 0) { + dstate_setinfo("battery.runtime", "%d", (int)(battery_runtime_value*60)); + } else { + dstate_delinfo("battery.runtime"); + } + } else { + dstate_delinfo("battery.runtime"); + } + + /* Retrieve current capacity */ + current_capacity = CFDictionaryGetValue(power_dictionary, CFSTR(kIOPSCurrentCapacityKey)); + if(current_capacity) { + CFNumberGetValue(current_capacity, kCFNumberDoubleType, ¤t_capacity_value); + + upsdebugx(2, "Current Capacity = %.f/%.f units", current_capacity_value, max_capacity_value); + if(max_capacity_value > 0) { + dstate_setinfo("battery.charge", "%.f", 100.0 * current_capacity_value / max_capacity_value); + } + } + + /* TODO: it should be possible to set poll_interval (and maxage in the + * server) to an absurdly large value, and use notify(3) to get + * updates. + */ + + /* + * poll_interval = 2; + */ + + dstate_dataok(); + CFRelease(power_dictionary); +} + +void upsdrv_shutdown(void) +{ + /* tell the UPS to shut down, then return - DO NOT SLEEP HERE */ + + /* maybe try to detect the UPS here, but try a shutdown even if + it doesn't respond at first if possible */ + + /* NOTE: Mac OS X already has shutdown routines - this driver is more + for monitoring and notification purposes. Still, there is a key that + might be useful to set in SystemConfiguration land. */ + fatalx(EXIT_FAILURE, "shutdown not supported"); + + /* you may have to check the line status since the commands + for toggling power are frequently different for OL vs. OB */ + + /* OL: this must power cycle the load if possible */ + + /* OB: the load must remain off until the power returns */ +} + +/* +static int instcmd(const char *cmdname, const char *extra) +{ + if (!strcasecmp(cmdname, "test.battery.stop")) { + ser_send_buf(upsfd, ...); + return STAT_INSTCMD_HANDLED; + } + + upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); + return STAT_INSTCMD_UNKNOWN; +} +*/ + +/* TODO: + There is a configuration file here: + /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist + with several keys under UPSDefaultThresholds: + + * UPSShutdownAfterMinutes + * UPSShutdownAtLevel + * UPSShutdownAtMinutesLeft + + It is not likely that these keys can be written, but they might be good values for NUT variables. + + In conjunction with 'ignorelb' and a delta, this could be used to synthesize a + LB status right before the computer shuts down. +*/ + +/* +static int setvar(const char *varname, const char *val) +{ + if (!strcasecmp(varname, "ups.test.interval")) { + ser_send_buf(upsfd, ...); + return STAT_SET_HANDLED; + } + + upslogx(LOG_NOTICE, "setvar: unknown variable [%s]", varname); + return STAT_SET_UNKNOWN; +} +*/ + +void upsdrv_help(void) +{ +} + +/* list flags and values that you want to receive via -x */ +void upsdrv_makevartable(void) +{ + /* allow '-x xyzzy' */ + /* addvar(VAR_FLAG, "xyzzy", "Enable xyzzy mode"); */ + + /* allow '-x foo=' */ + /* addvar(VAR_VALUE, "foo", "Override foo setting"); */ + + addvar(VAR_VALUE, "model", "Regular Expression to match power source model name"); +} + +void upsdrv_initups(void) +{ + CFArrayRef power_source_key_list; + CFIndex num_keys, index; + CFDictionaryRef power_dictionary; + CFTypeRef power_blob; + CFStringRef potential_key, potential_model; + char *device_name = device_path, *model_name; /* regex(3) */ + char potential_device_name[80], potential_model_name[80]; + regex_t name_regex, model_regex; + int ret; + + upsdebugx(3, "upsdrv_initups(): Power Sources blob:"); + /* upsfd = ser_open(device_path); */ + /* ser_set_speed(upsfd, device_path, B1200); */ + power_blob = IOPSCopyPowerSourcesInfo(); + if(!power_blob) { + fatalx(EXIT_FAILURE, "Couldn't retrieve Power Sources blob"); + } + + if(nut_debug_level >= 3) CFShow(power_blob); + + if(!strcmp(device_name, "auto")) { + device_name = "/UPS"; + } + + upsdebugx(2, "Matching power supply key names against regex '%s'", device_name); + + ret = regcomp(&name_regex, device_name, REG_EXTENDED|REG_NOSUB|REG_ICASE); + + if(ret) { + fatalx(EXIT_FAILURE, + "Failed to compile regex from 'port' parameter: '%s'.", + device_name); + } + + if((model_name = getval("model"))) { + upsdebugx(2, "Matching power supply model names against regex '%s'", model_name); + ret = regcomp(&model_regex, model_name, REG_EXTENDED|REG_NOSUB|REG_ICASE); + + if(ret) { + fatalx(EXIT_FAILURE, + "Failed to compile regex from 'model' parameter: '%s'.", + model_name); + } + } + + power_source_key_list = IOPSCopyPowerSourcesList(power_blob); + + num_keys = CFArrayGetCount(power_source_key_list); + upsdebugx(1, "Number of power supplies found: %d", (int)num_keys); + + if(nut_debug_level >= 3) CFShow(power_source_key_list); + + if(num_keys < 1) { + /* bail */ + fatalx(EXIT_FAILURE, "Couldn't find any UPS or battery"); + } + + for(index=0; index < num_keys; index++) { + potential_key = CFArrayGetValueAtIndex(power_source_key_list, index); + CFStringGetCString(potential_key, potential_device_name, + sizeof(potential_device_name), kCFStringEncodingUTF8); + upsdebugx(1, " Power supply: %s", potential_device_name); + + ret = regexec(&name_regex, potential_device_name, 0,0,0); + + power_dictionary = copy_power_dictionary(potential_key); + + upsdebugx(2, "Getting 'Name' key (UPS model)"); + + potential_model = CFDictionaryGetValue(power_dictionary, CFSTR(kIOPSNameKey)); + CFStringGetCString(potential_model, potential_model_name, sizeof(potential_model_name), kCFStringEncodingUTF8); + upsdebugx(1, " model name: %s", potential_model_name); + + CFRelease(power_dictionary); + + /* Does key match? Check model: */ + if (!ret) { + if(model_name) { + ret = regexec(&model_regex, potential_model_name, 0,0,0); + if(!ret) { + upsdebugx(2, "Matched model name"); + break; + } + } else { + upsdebugx(2, "Matched key name"); + break; + } + } + } + + regfree(&name_regex); + if(model_name) { + regfree(&model_regex); + } + + if(ret) { + fatalx(EXIT_FAILURE, "Couldn't find UPS or battery matching both 'port' (%s) and 'model' (%s)", + device_name, model_name); + } + + g_power_key = potential_key; + CFRetain(g_power_key); + upsdebugx(2, "g_power_key = "); + if(nut_debug_level >= 2) CFShow(g_power_key); + upsdebugx(2, "end g_power_key."); + + power_dictionary = copy_power_dictionary(g_power_key); + assert(power_dictionary); + if(nut_debug_level >= 3) CFShow(power_dictionary); + + /* the upsh handlers can't be done here, as they get initialized + * shortly after upsdrv_initups returns to main. + */ + + /* don't try to detect the UPS here */ + + /* do stuff */ + + CFRelease(power_dictionary); +} + +void upsdrv_cleanup(void) +{ + upsdebugx(1, "Cleanup: release references"); + CFRelease(g_power_key); + + /* free(dynamic_mem); */ + /* ser_close(upsfd, device_path); */ +} diff --git a/drivers/main.c b/drivers/main.c index 66caa36..7c2fc55 100644 --- a/drivers/main.c +++ b/drivers/main.c @@ -623,7 +623,7 @@ int main(int argc, char **argv) * when its a pdu! */ dstate_setinfo("device.type", "ups"); - /* publish the top-level data: version number, driver name */ + /* publish the top-level data: version numbers, driver name */ dstate_setinfo("driver.version", "%s", UPS_VERSION); dstate_setinfo("driver.version.internal", "%s", upsdrv_info.version); dstate_setinfo("driver.name", "%s", progname); diff --git a/drivers/masterguard.c b/drivers/masterguard.c index f480ad3..7edc899 100644 --- a/drivers/masterguard.c +++ b/drivers/masterguard.c @@ -469,8 +469,6 @@ void upsdrv_initinfo(void) dstate_setinfo("ups.model", "%s", name); if( strlen( firmware ) > 0 ) dstate_setinfo("ups.firmware", "%s", firmware); - - dstate_setinfo("driver.version.internal", "%s", DRIVER_VERSION); } /******************************************************************** diff --git a/drivers/metasys.c b/drivers/metasys.c index d05e5ef..647de3c 100644 --- a/drivers/metasys.c +++ b/drivers/metasys.c @@ -316,8 +316,6 @@ void upsdrv_initinfo(void) dstate_setflags("ups.test.result", ST_FLAG_STRING | ST_FLAG_RW); dstate_setaux("ups.test.result", 20); - /* Fixed variables */ - dstate_setinfo("driver.version.internal", "%s", DRIVER_VERSION); /* UPS INFO READ */ res = command_read_sequence(UPS_INFO, my_answer); if (res < 0) fatal_with_errno(EXIT_FAILURE, "Could not communicate with the ups"); diff --git a/drivers/mge-utalk.c b/drivers/mge-utalk.c index 3139065..d4c9729 100644 --- a/drivers/mge-utalk.c +++ b/drivers/mge-utalk.c @@ -235,7 +235,6 @@ void upsdrv_initinfo(void) /* manufacturer -------------------------------------------- */ dstate_setinfo("ups.mfr", "MGE UPS SYSTEMS"); - dstate_setinfo("driver.version.internal", "%s", DRIVER_VERSION); /* loop until we have at status */ tries = 0; diff --git a/drivers/microdowell.c b/drivers/microdowell.c index 82bcd43..a1d6605 100644 --- a/drivers/microdowell.c +++ b/drivers/microdowell.c @@ -848,8 +848,6 @@ void upsdrv_initinfo(void) dstate_setinfo("ups.mfr.date", "%04d/%02d/%02d", ups.YearOfProd, ups.MonthOfProd, ups.DayOfProd) ; dstate_setinfo("battery.packs", "%d", ups.BatteryNumber) ; - dstate_setinfo("driver.version.internal", "%s", DRIVER_VERSION) ; - /* Register the available variables. */ dstate_setinfo("ups.delay.start", "%d", ups.WakeUpDelay); dstate_setflags("ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING); diff --git a/drivers/netxml-ups.c b/drivers/netxml-ups.c index 130d50f..ee55503 100644 --- a/drivers/netxml-ups.c +++ b/drivers/netxml-ups.c @@ -38,7 +38,7 @@ #include #define DRIVER_NAME "network XML UPS" -#define DRIVER_VERSION "0.30" +#define DRIVER_VERSION "0.31" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -92,7 +92,7 @@ void upsdrv_initinfo(void) continue; } - dstate_setinfo("driver.version.internal", "%s", subdriver->version); + dstate_setinfo("driver.version.data", "%s", subdriver->version); if (testvar("subscribe") && (netxml_alarm_subscribe(subdriver->subscribe) == NE_OK)) { extrafd = ne_sock_fd(sock); diff --git a/drivers/nut-ipmipsu.c b/drivers/nut-ipmipsu.c index 18cb355..b7382a8 100644 --- a/drivers/nut-ipmipsu.c +++ b/drivers/nut-ipmipsu.c @@ -1,6 +1,7 @@ /* nut-ipmipsu.c - Driver for IPMI Power Supply Units (PSU) * - * Copyright (C) 2011 - Arnaud Quette + * Copyright (C) + * 2011 - 2012 Arnaud Quette * * 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 @@ -26,7 +27,7 @@ #include "nut-ipmi.h" #define DRIVER_NAME "IPMI PSU driver" -#define DRIVER_VERSION "0.06" +#define DRIVER_VERSION "0.07" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -62,9 +63,6 @@ void upsdrv_initinfo(void) ipmi_dev.manufacturer ? ipmi_dev.manufacturer : "unknown", ipmi_dev.product ? ipmi_dev.product : "unknown"); - dstate_setinfo("driver.version.data", "%s", DRIVER_NAME); - dstate_setinfo("driver.version.internal", DRIVER_VERSION); - dstate_setinfo ("device.type", "psu"); /* Publish information from the IPMI structure */ diff --git a/drivers/nut-libfreeipmi.c b/drivers/nut-libfreeipmi.c index 0e3415d..1539e75 100644 --- a/drivers/nut-libfreeipmi.c +++ b/drivers/nut-libfreeipmi.c @@ -1,7 +1,7 @@ /* nut-libfreeipmi.c - NUT IPMI backend, using FreeIPMI * * Copyright (C) - * 2011 - Arnaud Quette + * 2011 - 2012 Arnaud Quette * 2011 - Albert Chu * * Based on the sample codes 'ipmi-fru-example.c', 'frulib.c' and @@ -58,10 +58,18 @@ /* FreeIPMI contexts and configuration*/ ipmi_ctx_t ipmi_ctx = NULL; ipmi_fru_parse_ctx_t fru_parse_ctx = NULL; -ipmi_sdr_cache_ctx_t sdr_cache_ctx = NULL; -ipmi_sdr_parse_ctx_t sdr_parse_ctx = NULL; ipmi_monitoring_ctx_t mon_ctx = NULL; struct ipmi_monitoring_ipmi_config ipmi_config; +/* SDR management API has changed with 1.1.X and later */ +#ifdef HAVE_FREEIPMI_11X_12X + ipmi_sdr_ctx_t sdr_ctx = NULL; +#else + ipmi_sdr_cache_ctx_t sdr_cache_ctx = NULL; + ipmi_sdr_parse_ctx_t sdr_parse_ctx = NULL; +#ifndef IPMI_SDR_MAX_RECORD_LENGTH + #define IPMI_SDR_MAX_RECORD_LENGTH IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH +#endif +#endif /* HAVE_FREEIPMI_11X_12X */ /* FIXME: freeipmi auto selects a cache based on the hostname you are * connecting too, but this is probably fine for you @@ -276,6 +284,11 @@ static void libfreeipmi_cleanup() ipmi_fru_parse_ctx_destroy (fru_parse_ctx); } +#ifdef HAVE_FREEIPMI_11X_12X + if (sdr_ctx) { + ipmi_sdr_ctx_destroy (sdr_ctx); + } +#else /* HAVE_FREEIPMI_11X_12X */ if (sdr_cache_ctx) { ipmi_sdr_cache_ctx_destroy (sdr_cache_ctx); } @@ -283,6 +296,7 @@ static void libfreeipmi_cleanup() if (sdr_parse_ctx) { ipmi_sdr_parse_ctx_destroy (sdr_parse_ctx); } +#endif /* HAVE_FREEIPMI_11X_12X */ if (ipmi_ctx) { ipmi_ctx_close (ipmi_ctx); @@ -467,7 +481,7 @@ static int libfreeipmi_get_board_info (const void *areabuf, * Return -1 on error, or the number of sensors found otherwise */ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) { - uint8_t sdr_record[IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH]; + uint8_t sdr_record[IPMI_SDR_MAX_RECORD_LENGTH]; uint8_t record_type, logical_physical_fru_device, logical_fru_device_device_slave_address; uint8_t tmp_entity_id, tmp_entity_instance; int sdr_record_len; @@ -484,6 +498,23 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) ipmi_dev->sensors_count = 0; memset(ipmi_dev->sensors_id_list, 0, sizeof(ipmi_dev->sensors_id_list)); +#ifdef HAVE_FREEIPMI_11X_12X + if (!(sdr_ctx = ipmi_sdr_ctx_create ())) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_ctx_create()"); + } + + if (ipmi_sdr_cache_open (sdr_ctx, ipmi_ctx, CACHE_LOCATION) < 0) + { + if (ipmi_sdr_ctx_errnum (sdr_ctx) != IPMI_SDR_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_cache_open: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + } + } +#else /* HAVE_FREEIPMI_11X_12X */ if (!(sdr_cache_ctx = ipmi_sdr_cache_ctx_create ())) { libfreeipmi_cleanup(); @@ -505,7 +536,32 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); } } +#endif /* HAVE_FREEIPMI_11X_12X */ +#ifdef HAVE_FREEIPMI_11X_12X + if (ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST) + { + if (ipmi_sdr_cache_create (sdr_ctx, + ipmi_ctx, CACHE_LOCATION, + IPMI_SDR_CACHE_CREATE_FLAGS_DEFAULT, + NULL, NULL) < 0) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_cache_create: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + } + if (ipmi_sdr_cache_open (sdr_ctx, + ipmi_ctx, CACHE_LOCATION) < 0) + { + if (ipmi_sdr_ctx_errnum (sdr_ctx) != IPMI_SDR_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST) + { + libfreeipmi_cleanup(); + fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_cache_open: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + } + } + } +#else /* HAVE_FREEIPMI_11X_12X */ if (ipmi_sdr_cache_ctx_errnum (sdr_cache_ctx) == IPMI_SDR_CACHE_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST) { if (ipmi_sdr_cache_create (sdr_cache_ctx, @@ -518,7 +574,6 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) fatal_with_errno(EXIT_FAILURE, "ipmi_sdr_cache_create: %s", ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); } - if (ipmi_sdr_cache_open (sdr_cache_ctx, ipmi_ctx, CACHE_LOCATION) < 0) { @@ -530,7 +585,16 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) } } } +#endif /* HAVE_FREEIPMI_11X_12X */ +#ifdef HAVE_FREEIPMI_11X_12X + if (ipmi_sdr_cache_record_count (sdr_ctx, &record_count) < 0) { + fprintf (stderr, + "ipmi_sdr_cache_record_count: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + goto cleanup; + } +#else if (ipmi_sdr_cache_record_count (sdr_cache_ctx, &record_count) < 0) { fprintf (stderr, @@ -538,19 +602,44 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); goto cleanup; } +#endif /* HAVE_FREEIPMI_11X_12X */ +#ifdef HAVE_FREEIPMI_11X_12X + for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (sdr_ctx)) + { + memset (sdr_record, '\0', IPMI_SDR_MAX_RECORD_LENGTH); + + if ((sdr_record_len = ipmi_sdr_cache_record_read (sdr_ctx, + sdr_record, + IPMI_SDR_MAX_RECORD_LENGTH)) < 0) + { + fprintf (stderr, "ipmi_sdr_cache_record_read: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + goto cleanup; + } + if (ipmi_sdr_parse_record_id_and_type (sdr_ctx, + sdr_record, + sdr_record_len, + NULL, + &record_type) < 0) + { + fprintf (stderr, "ipmi_sdr_parse_record_id_and_type: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + goto cleanup; + } +#else for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (sdr_cache_ctx)) { - memset (sdr_record, '\0', IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH); + memset (sdr_record, '\0', IPMI_SDR_MAX_RECORD_LENGTH); + if ((sdr_record_len = ipmi_sdr_cache_record_read (sdr_cache_ctx, sdr_record, - IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH)) < 0) + IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { fprintf (stderr, "ipmi_sdr_cache_record_read: %s", ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); goto cleanup; } - if (ipmi_sdr_parse_record_id_and_type (sdr_parse_ctx, sdr_record, sdr_record_len, @@ -561,10 +650,27 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); goto cleanup; } +#endif /* HAVE_FREEIPMI_11X_12X */ if (record_type != IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD) continue; +#ifdef HAVE_FREEIPMI_11X_12X + if (ipmi_sdr_parse_fru_device_locator_parameters (sdr_ctx, + sdr_record, + sdr_record_len, + NULL, + &logical_fru_device_device_slave_address, + NULL, + NULL, + &logical_physical_fru_device, + NULL) < 0) + { + fprintf (stderr, "ipmi_sdr_parse_fru_device_locator_parameters: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + goto cleanup; + } +#else /* HAVE_FREEIPMI_11X_12X */ if (ipmi_sdr_parse_fru_device_locator_parameters (sdr_parse_ctx, sdr_record, sdr_record_len, @@ -579,12 +685,26 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); goto cleanup; } +#endif /* HAVE_FREEIPMI_11X_12X */ if (logical_physical_fru_device && logical_fru_device_device_slave_address == ipmi_dev->ipmi_id) { found_device_id++; +#ifdef HAVE_FREEIPMI_11X_12X + if (ipmi_sdr_parse_fru_entity_id_and_instance (sdr_ctx, + sdr_record, + sdr_record_len, + &entity_id, + &entity_instance) < 0) + { + fprintf (stderr, + "ipmi_sdr_parse_fru_entity_id_and_instance: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + goto cleanup; + } +#else /* HAVE_FREEIPMI_11X_12X */ if (ipmi_sdr_parse_fru_entity_id_and_instance (sdr_parse_ctx, sdr_record, sdr_record_len, @@ -596,6 +716,7 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); goto cleanup; } +#endif /* HAVE_FREEIPMI_11X_12X */ break; } } @@ -608,23 +729,60 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) else upsdebugx(1, "Found device id %d", ipmi_dev->ipmi_id); +#ifdef HAVE_FREEIPMI_11X_12X + if (ipmi_sdr_cache_first (sdr_ctx) < 0) + { + fprintf (stderr, "ipmi_sdr_cache_first: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + goto cleanup; + } +#else /* HAVE_FREEIPMI_11X_12X */ if (ipmi_sdr_cache_first (sdr_cache_ctx) < 0) { fprintf (stderr, "ipmi_sdr_cache_first: %s", ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); goto cleanup; } +#endif /* HAVE_FREEIPMI_11X_12X */ +#ifdef HAVE_FREEIPMI_11X_12X + for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (sdr_ctx)) + { + /* uint8_t sdr_record[IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH]; + uint8_t record_type, tmp_entity_id, tmp_entity_instance; + int sdr_record_len; */ + + memset (sdr_record, '\0', IPMI_SDR_MAX_RECORD_LENGTH); + if ((sdr_record_len = ipmi_sdr_cache_record_read (sdr_ctx, + sdr_record, + IPMI_SDR_MAX_RECORD_LENGTH)) < 0) + { + fprintf (stderr, "ipmi_sdr_cache_record_read: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + goto cleanup; + } + + if (ipmi_sdr_parse_record_id_and_type (sdr_ctx, + sdr_record, + sdr_record_len, + &record_id, + &record_type) < 0) + { + fprintf (stderr, "ipmi_sdr_parse_record_id_and_type: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + goto cleanup; + } +#else /* HAVE_FREEIPMI_11X_12X */ for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (sdr_cache_ctx)) { /* uint8_t sdr_record[IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH]; uint8_t record_type, tmp_entity_id, tmp_entity_instance; int sdr_record_len; */ - memset (sdr_record, '\0', IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH); + memset (sdr_record, '\0', IPMI_SDR_MAX_RECORD_LENGTH); if ((sdr_record_len = ipmi_sdr_cache_record_read (sdr_cache_ctx, sdr_record, - IPMI_SDR_CACHE_MAX_SDR_RECORD_LENGTH)) < 0) + IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { fprintf (stderr, "ipmi_sdr_cache_record_read: %s", ipmi_sdr_cache_ctx_errormsg (sdr_cache_ctx)); @@ -641,6 +799,7 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); goto cleanup; } +#endif /* HAVE_FREEIPMI_11X_12X */ upsdebugx (5, "Checking record %i (/%i)", record_id, record_count); @@ -650,6 +809,19 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) continue; } +#ifdef HAVE_FREEIPMI_11X_12X + if (ipmi_sdr_parse_entity_id_instance_type (sdr_ctx, + sdr_record, + sdr_record_len, + &tmp_entity_id, + &tmp_entity_instance, + NULL) < 0) + { + fprintf (stderr, "ipmi_sdr_parse_entity_instance_type: %s", + ipmi_sdr_ctx_errormsg (sdr_ctx)); + goto cleanup; + } +#else /* HAVE_FREEIPMI_11X_12X */ if (ipmi_sdr_parse_entity_id_instance_type (sdr_parse_ctx, sdr_record, sdr_record_len, @@ -661,6 +833,7 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) ipmi_sdr_parse_ctx_errormsg (sdr_parse_ctx)); goto cleanup; } +#endif /* HAVE_FREEIPMI_11X_12X */ if (tmp_entity_id == entity_id && tmp_entity_instance == entity_instance) @@ -677,6 +850,11 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) cleanup: /* Cleanup */ +#ifdef HAVE_FREEIPMI_11X_12X + if (sdr_ctx) { + ipmi_sdr_ctx_destroy (sdr_ctx); + } +#else /* HAVE_FREEIPMI_11X_12X */ if (sdr_cache_ctx) { ipmi_sdr_cache_ctx_destroy (sdr_cache_ctx); } @@ -684,6 +862,7 @@ cleanup: if (sdr_parse_ctx) { ipmi_sdr_parse_ctx_destroy (sdr_parse_ctx); } +#endif /* HAVE_FREEIPMI_11X_12X */ return ipmi_dev->sensors_count; } @@ -775,6 +954,8 @@ int nut_ipmi_get_sensors_status(IPMIDevice_t *ipmi_dev) return -1; } + upsdebugx (1, "nut_ipmi_get_sensors_status: %i sensors to check", sensor_count); + for (i = 0; i < sensor_count; i++, ipmi_monitoring_sensor_iterator_next (mon_ctx)) { int record_id, sensor_type; @@ -797,6 +978,8 @@ int nut_ipmi_get_sensors_status(IPMIDevice_t *ipmi_dev) continue; } + upsdebugx (1, "checking sensor #%i, type %i", record_id, sensor_type); + /* should we consider this for ALARM? * IPMI_MONITORING_STATE_NOMINAL * IPMI_MONITORING_STATE_WARNING @@ -838,16 +1021,19 @@ int nut_ipmi_get_sensors_status(IPMIDevice_t *ipmi_dev) ipmi_dev->temperature = *((double *)sensor_reading); upsdebugx (3, "Temperature: %.2f", *((double *)sensor_reading)); dstate_setinfo("ambient.temperature", "%.2f", *((double *)sensor_reading)); + retval = 0; break; case IPMI_MONITORING_SENSOR_TYPE_VOLTAGE: ipmi_dev->voltage = *((double *)sensor_reading); upsdebugx (3, "Voltage: %.2f", *((double *)sensor_reading)); dstate_setinfo("input.voltage", "%.2f", *((double *)sensor_reading)); + retval = 0; break; case IPMI_MONITORING_SENSOR_TYPE_CURRENT: ipmi_dev->input_current = *((double *)sensor_reading); upsdebugx (3, "Current: %.2f", *((double *)sensor_reading)); dstate_setinfo("input.current", "%.2f", *((double *)sensor_reading)); + retval = 0; break; case IPMI_MONITORING_SENSOR_TYPE_POWER_SUPPLY: @@ -898,6 +1084,7 @@ int nut_ipmi_get_sensors_status(IPMIDevice_t *ipmi_dev) str_count++; } break; + /* Not sure of the values of these, so get as much as possible... */ case IPMI_MONITORING_SENSOR_TYPE_POWER_UNIT: upsdebugx (3, "Power Unit: status string"); @@ -938,6 +1125,7 @@ int nut_ipmi_get_sensors_status(IPMIDevice_t *ipmi_dev) { case PSU_PRESENT: status_set("OL"); + retval = 0; break; case PSU_ABSENT: status_set("OFF"); @@ -946,6 +1134,7 @@ int nut_ipmi_get_sensors_status(IPMIDevice_t *ipmi_dev) break; case PSU_POWER_FAILURE: status_set("OFF"); + retval = 0; break; } @@ -955,3 +1144,9 @@ int nut_ipmi_get_sensors_status(IPMIDevice_t *ipmi_dev) return retval; } + +/* +--chassis-control=CONTROL + Control the chassis. This command provides power-up, power-down, and reset control. Supported values: POWER-DOWN, POWER-UP, POWER-CYCLE, HARD-RESET, DIAGNOS‐ + TIC-INTERRUPT, SOFT-SHUTDOWN. +*/ diff --git a/drivers/oneac.h b/drivers/oneac.h index 9f1bae8..a85a505 100644 --- a/drivers/oneac.h +++ b/drivers/oneac.h @@ -95,8 +95,12 @@ #define GETX_BATT_REPLACED '+' /* yymmdd */ #define GETX_DATE_RESP_SIZE 6 +/* FIXME: Both of the following constants are unused, and the first is not + * valid C syntax (breaks LLVM). */ +#if 0 #define GETX_UNIT_KVA '''' /* Read as xxx.xx */ #define GETX_UNIT_WATTS "''" /* 2-character string request */ +#endif #define GETX_LOW_OUT_ALLOW '[' /* Tap up or inverter at this point */ #define GETX_HI_OUT_ALLOW ']' /* Tap down or inverter at this point */ #define GETX_NOTIFY_DELAY ',' /* Secs of delay for power fail alert */ diff --git a/drivers/powercom-hid.c b/drivers/powercom-hid.c index 7e1b7fd..d6a2a50 100644 --- a/drivers/powercom-hid.c +++ b/drivers/powercom-hid.c @@ -43,7 +43,7 @@ static usb_device_id_t powercom_usb_device_table[] = { { USB_DEVICE(POWERCOM_VENDORID, 0x00a5), NULL }, /* PowerCOM BNT - Black Knight Pro */ { USB_DEVICE(POWERCOM_VENDORID, 0x00a6), NULL }, - /* PowerCOM BNT-xxxAP */ + /* PowerCOM Vanguard and BNT-xxxAP */ { USB_DEVICE(POWERCOM_VENDORID, 0x0004), NULL }, /* Terminating entry */ diff --git a/drivers/safenet.c b/drivers/safenet.c index 392fa45..77170fb 100644 --- a/drivers/safenet.c +++ b/drivers/safenet.c @@ -297,8 +297,6 @@ void upsdrv_initinfo(void) int retry = 3; char *v; - dstate_setinfo("driver.version.internal", "%s", DRIVER_VERSION); - usleep(100000); /* diff --git a/drivers/skel.c b/drivers/skel.c index 4957bcd..5d4b930 100644 --- a/drivers/skel.c +++ b/drivers/skel.c @@ -33,7 +33,8 @@ upsdrv_info_t upsdrv_info = { void upsdrv_initinfo(void) { - /* try to detect the UPS here - call fatal_with_errno(EXIT_FAILURE, ) if it fails */ + /* try to detect the UPS here - call fatal_with_errno(EXIT_FAILURE, ...) + * or fatalx(EXIT_FAILURE, ...) if it fails */ /* dstate_setinfo("ups.mfr", "skel manufacturer"); */ /* dstate_setinfo("ups.model", "longrun 15000"); */ @@ -158,7 +159,7 @@ void upsdrv_initups(void) /* to get variables and flags from the command line, use this: * - * first populate with upsdrv_buildvartable above, then... + * first populate with upsdrv_makevartable() above, then... * * set flag foo : /bin/driver -x foo * set variable 'cable' to '1234' : /bin/driver -x cable=1234 diff --git a/drivers/snmp-ups.c b/drivers/snmp-ups.c index 36fdfb8..598b816 100644 --- a/drivers/snmp-ups.c +++ b/drivers/snmp-ups.c @@ -60,6 +60,8 @@ static mib2nut_info_t *mib2nut[] = { &aphel_genesisII, &aphel_revelation, &eaton_marlin, + &pulizzi_switched1, + &pulizzi_switched2, &raritan, &baytech, &compaq, @@ -91,7 +93,7 @@ const char *mibvers; static void disable_transfer_oids(void); #define DRIVER_NAME "Generic SNMP UPS driver" -#define DRIVER_VERSION "0.66" +#define DRIVER_VERSION "0.68" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -122,13 +124,10 @@ int outlet_index_base = -1; void upsdrv_initinfo(void) { snmp_info_t *su_info_p; - char version[128]; upsdebugx(1, "SNMP UPS driver : entering upsdrv_initinfo()"); - snprintf(version, sizeof version, "%s (mib: %s %s)", - DRIVER_VERSION, mibname, mibvers); - dstate_setinfo("driver.version.internal", "%s", version); + dstate_setinfo("driver.version.data", "%s MIB %s", mibname, mibvers); /* add instant commands to the info database. * outlet commands are processed later, during initial walk */ @@ -955,7 +954,7 @@ const char *su_find_infoval(info_lkp_t *oid2info, long value) info_lkp_t *info_lkp; for (info_lkp = oid2info; (info_lkp != NULL) && - (strcmp(info_lkp->info_value, "NULL")); info_lkp++) { + (strcmp(info_lkp->info_value, "NULL")) && (info_lkp->info_value != NULL); info_lkp++) { if (info_lkp->oid_value == value) { upsdebugx(1, "su_find_infoval: found %s (value: %ld)", @@ -1055,6 +1054,32 @@ int base_nut_outlet_offset(void) return (outlet_index_base==0)?1:0; } +/* try to determine the number of outlets, using a template definition, + * that we walk, until we can't get anymore values */ +static int guestimate_outlet_count(const char *OID_template) +{ + int base_index = 0; + char test_OID[SU_INFOSIZE]; + int base_count; + + upsdebugx(1, "guestimate_outlet_count(%s)", OID_template); + + /* Determine if OID index starts from 0 or 1? */ + sprintf(test_OID, OID_template, base_index); + if (nut_snmp_get(test_OID) == NULL) + base_index++; + + /* Now, actually iterate */ + for (base_count = 0 ; ; base_count++) { + sprintf(test_OID, OID_template, base_index + base_count); + if (nut_snmp_get(test_OID) == NULL) + break; + } + + upsdebugx(3, "guestimate_outlet_count: %i", base_count); + return base_count; +} + /* process a single data from a walk */ bool_t get_and_process_data(int mode, snmp_info_t *su_info_p) { @@ -1236,10 +1261,20 @@ bool_t snmp_ups_walk(int mode) if(dstate_getinfo("outlet.count") == NULL) { /* FIXME: should we disable it? - * su_info_p->flags &= ~SU_FLAG_OK; */ - continue; + * su_info_p->flags &= ~SU_FLAG_OK; + * or rely on guestimation? */ + if ((outlet_count = guestimate_outlet_count(su_info_p->OID)) == -1) { + /* Failed */ + continue; + } + else { + /* Publish the count estimation */ + dstate_setinfo("outlet.count", "%i", outlet_count); + } + } + else { + outlet_count = atoi(dstate_getinfo("outlet.count")); } - outlet_count = atoi(dstate_getinfo("outlet.count")); /* general init of data using the template */ instantiate_info(su_info_p, &cur_info_p); @@ -1495,11 +1530,14 @@ int su_instcmd(const char *cmdname, const char *extradata) snmp_info_t *su_info_p = NULL; int status; int retval = STAT_INSTCMD_FAILED; + int cmd_offset = 0; upsdebugx(2, "entering su_instcmd(%s, %s)", cmdname, extradata); - if (strncmp(cmdname, "outlet", 6)) + /* FIXME: this should only apply if strchr(%)! */ + if (strncmp(cmdname, "outlet", 6)) { su_info_p = su_find_info(cmdname); + } else { snmp_info_t *tmp_info_p; char *outlet_number_ptr = strchr(cmdname, '.'); @@ -1539,8 +1577,15 @@ int su_instcmd(const char *cmdname, const char *extradata) } /* adapt the OID */ if (su_info_p->OID != NULL) { + /* Workaround buggy Eaton Pulizzi implementation + * which have different offsets index for data & commands! */ + if (su_info_p->flags & SU_CMD_OFFSET) { + upsdebugx(3, "Adding command offset"); + cmd_offset++; + } + sprintf((char *)su_info_p->OID, tmp_info_p->OID, - outlet_number - base_nut_outlet_offset()); + outlet_number - base_nut_outlet_offset() + cmd_offset); } else { free_info(su_info_p); return STAT_INSTCMD_UNKNOWN; diff --git a/drivers/snmp-ups.h b/drivers/snmp-ups.h index 72f93ce..328963c 100644 --- a/drivers/snmp-ups.h +++ b/drivers/snmp-ups.h @@ -132,13 +132,18 @@ typedef struct { * disable the other providers */ #define SU_FLAG_SETINT (1 << 6) /* save value */ #define SU_OUTLET (1 << 7) /* outlet template definition */ +#define SU_CMD_OFFSET (1 << 8) /* Add +1 to the OID index */ /* Notes on outlet templates usage: * - outlet.count MUST exist and MUST be declared before any outlet template + * Otherwise, the driver will try to determine it by itself... * - the first outlet template MUST NOT be a server side variable (ie MUST have * a valid OID) in order to detect the base SNMP index (0 or 1) */ -/* status string components */ +/* status string components + * FIXME: these should be removed, since there is no added value. + * Ie, this can be guessed from info->type! */ + #define SU_STATUS_PWR (0 << 8) /* indicates power status element */ #define SU_STATUS_BATT (1 << 8) /* indicates battery status element */ #define SU_STATUS_CAL (2 << 8) /* indicates calibration status element */ diff --git a/drivers/tripplitesu.c b/drivers/tripplitesu.c index 9c9049b..d0d0563 100644 --- a/drivers/tripplitesu.c +++ b/drivers/tripplitesu.c @@ -75,7 +75,6 @@ battery.temperature battery.voltage battery.voltage.nominal - driver.version.internal input.frequency input.sensitivity (RW) (1) input.transfer.high (RW) diff --git a/drivers/usbhid-ups.c b/drivers/usbhid-ups.c index 6899d2f..d2c276c 100644 --- a/drivers/usbhid-ups.c +++ b/drivers/usbhid-ups.c @@ -717,6 +717,10 @@ void upsdrv_makevartable(void) upsdebugx(1, "upsdrv_makevartable..."); + snprintf(temp, sizeof(temp), "Set low battery level, in %% (default=%s).", DEFAULT_LOWBATT); + addvar (VAR_VALUE, HU_VAR_LOWBATT, temp); + + snprintf(temp, sizeof(temp), "Set shutdown delay, in seconds (default=%s)", DEFAULT_OFFDELAY); addvar(VAR_VALUE, HU_VAR_OFFDELAY, temp); @@ -738,6 +742,8 @@ void upsdrv_makevartable(void) addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); addvar(VAR_FLAG, "explore", "Diagnostic matching of unsupported UPS"); +#else + addvar(VAR_VALUE, "notification", "Set notification type, (ignored, only for backward compatibility)"); #endif } @@ -855,7 +861,6 @@ void upsdrv_initinfo(void) upsdebugx(1, "upsdrv_initinfo..."); dstate_setinfo("driver.version.data", "%s", subdriver->name); - dstate_setinfo("driver.version.internal", DRIVER_VERSION); /* init polling frequency */ val = getval(HU_VAR_POLLFREQ); @@ -939,6 +944,14 @@ void upsdrv_initups(void) fatalx(EXIT_FAILURE, "Can't initialize data from HID UPS"); } + if (dstate_getinfo("battery.charge.low")) { + /* Retrieve user defined battery settings */ + val = getval(HU_VAR_LOWBATT); + if (val) { + dstate_setinfo("battery.charge.low", "%ld", strtol(val, NULL, 10)); + } + } + if (dstate_getinfo("ups.delay.start")) { /* Retrieve user defined delay settings */ val = getval(HU_VAR_ONDELAY); diff --git a/drivers/usbhid-ups.h b/drivers/usbhid-ups.h index 96bce48..4f4b3c3 100644 --- a/drivers/usbhid-ups.h +++ b/drivers/usbhid-ups.h @@ -37,11 +37,13 @@ extern hid_dev_handle_t udev; extern bool_t use_interrupt_pipe; /* Set to FALSE if interrupt reports should not be used */ /* Driver's parameters */ +#define HU_VAR_LOWBATT "lowbatt" #define HU_VAR_ONDELAY "ondelay" #define HU_VAR_OFFDELAY "offdelay" #define HU_VAR_POLLFREQ "pollfreq" /* Parameters default values */ +#define DEFAULT_LOWBATT "30" /* percentage of battery charge to consider the UPS in low battery state */ #define DEFAULT_ONDELAY "30" /* Delay between return of utility power */ /* and powering up of load, in seconds */ /* CAUTION: ondelay > offdelay */ diff --git a/include/Makefile.in b/include/Makefile.in index 324c600..e21f5a6 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -85,6 +85,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -188,6 +194,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/include/config.h.in b/include/config.h.in index 2d9c06d..7fa10b0 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -92,6 +92,9 @@ /* Define if FreeIPMI support is available */ #undef HAVE_FREEIPMI +/* Define if FreeIPMI 1.1.X / 1.2.X support is available */ +#undef HAVE_FREEIPMI_11X_12X + /* Define to 1 if you have the header file. */ #undef HAVE_FREEIPMI_FREEIPMI_H @@ -397,6 +400,9 @@ /* Define to enable Powerman PDU support */ #undef WITH_LIBPOWERMAN +/* Define to enable Mac OS X meta-driver */ +#undef WITH_MACOSX + /* Define to enable Neon HTTP support */ #undef WITH_NEON diff --git a/lib/Makefile.in b/lib/Makefile.in index 36945ba..d974132 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -114,6 +114,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -217,6 +223,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/m4/nut_check_libfreeipmi.m4 b/m4/nut_check_libfreeipmi.m4 index c6d4163..72e7819 100644 --- a/m4/nut_check_libfreeipmi.m4 +++ b/m4/nut_check_libfreeipmi.m4 @@ -71,6 +71,10 @@ if test -z "${nut_have_libfreeipmi_seen}"; then AC_SEARCH_LIBS([ipmi_monitoring_init], [ipmimonitoring], [nut_have_freeipmi_monitoring=yes], [nut_have_freeipmi_monitoring=no]) AC_SEARCH_LIBS([ipmi_monitoring_sensor_read_record_id], [ipmimonitoring], [], [nut_have_freeipmi_monitoring=no]) + dnl Check for FreeIPMI 1.1.X / 1.2.X which implies API changes! + AC_SEARCH_LIBS([ipmi_sdr_cache_ctx_destroy], [freeipmi], [nut_have_freeipmi_11x_12x=no], []) + AC_SEARCH_LIBS([ipmi_sdr_ctx_destroy], [freeipmi], [nut_have_freeipmi_11x_12x=yes], [nut_have_freeipmi_11x_12x=no]) + if test "${nut_have_freeipmi}" = "yes"; then nut_with_ipmi="yes" nut_ipmi_lib="(FreeIPMI)" @@ -80,6 +84,10 @@ if test -z "${nut_have_libfreeipmi_seen}"; then LIBIPMI_LIBS="${LIBS}" fi + if test "${nut_have_freeipmi_11x_12x}" = "yes"; then + AC_DEFINE(HAVE_FREEIPMI_11X_12X, 1, [Define if FreeIPMI 1.1.X / 1.2.X support is available]) + fi + if test "${nut_have_freeipmi_monitoring}" = "yes"; then AC_DEFINE(HAVE_FREEIPMI_MONITORING, 1, [Define if FreeIPMI monitoring support is available]) fi diff --git a/m4/nut_check_libltdl.m4 b/m4/nut_check_libltdl.m4 index e1058bb..4c5f6e7 100644 --- a/m4/nut_check_libltdl.m4 +++ b/m4/nut_check_libltdl.m4 @@ -12,6 +12,36 @@ if test -z "${nut_have_libltdl_seen}"; then LIBS_ORIG="${LIBS}" LIBS="" + AC_MSG_CHECKING(for libltdl cflags) + AC_ARG_WITH(libltdl-includes, + AS_HELP_STRING([@<:@--with-libltdl-includes=CFLAGS@:>@], [include flags for the libltdl library]), + [ + case "${withval}" in + yes|no) + AC_MSG_ERROR(invalid option --with(out)-libltdl-includes - see docs/configure.txt) + ;; + *) + CFLAGS="${withval}" + ;; + esac + ], []) + AC_MSG_RESULT([${CFLAGS}]) + + AC_MSG_CHECKING(for libltdl ldflags) + AC_ARG_WITH(libltdl-libs, + AS_HELP_STRING([@<:@--with-libltdl-libs=LIBS@:>@], [linker flags for the libltdl library]), + [ + case "${withval}" in + yes|no) + AC_MSG_ERROR(invalid option --with(out)-libltdl-libs - see docs/configure.txt) + ;; + *) + LIBS="${withval}" + ;; + esac + ], []) + AC_MSG_RESULT([${LIBS}]) + AC_CHECK_HEADERS(ltdl.h, [nut_have_libltdl=yes], [nut_have_libltdl=no], [AC_INCLUDES_DEFAULT]) AC_SEARCH_LIBS(lt_dlinit, ltdl, [], [nut_have_libltdl=no]) diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 156e00a..92b7f73 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -124,6 +124,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -227,6 +233,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/scripts/augeas/Makefile.in b/scripts/augeas/Makefile.in index 22d5f63..ebeb554 100644 --- a/scripts/augeas/Makefile.in +++ b/scripts/augeas/Makefile.in @@ -91,6 +91,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -194,6 +200,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/scripts/hal/Makefile.in b/scripts/hal/Makefile.in index 4f9f7cd..f07c0e3 100644 --- a/scripts/hal/Makefile.in +++ b/scripts/hal/Makefile.in @@ -109,6 +109,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -212,6 +218,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/scripts/hal/ups-nut-device.fdi.in b/scripts/hal/ups-nut-device.fdi.in index d35c5d4..5587fd4 100644 --- a/scripts/hal/ups-nut-device.fdi.in +++ b/scripts/hal/ups-nut-device.fdi.in @@ -308,6 +308,13 @@ hald-addon-blazer_usb ups + + + battery + battery + hald-addon-blazer_usb + ups + battery @@ -585,7 +592,7 @@ - + battery battery diff --git a/scripts/hotplug/Makefile.in b/scripts/hotplug/Makefile.in index 8aeb214..124320a 100644 --- a/scripts/hotplug/Makefile.in +++ b/scripts/hotplug/Makefile.in @@ -114,6 +114,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -217,6 +223,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/scripts/hotplug/libhid.usermap b/scripts/hotplug/libhid.usermap index 40c07e2..9fab6ec 100644 --- a/scripts/hotplug/libhid.usermap +++ b/scripts/hotplug/libhid.usermap @@ -96,6 +96,8 @@ libhidups 0x0003 0x06da 0x0004 0x0000 0x0000 0x00 libhidups 0x0003 0x06da 0x0005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Phoenixtec Innova T libhidups 0x0003 0x06da 0x0201 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Online Zinto A +libhidups 0x0003 0x06da 0x0601 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # various models libhidups 0x0003 0x06da 0xffff 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 @@ -178,7 +180,7 @@ libhidups 0x0003 0x09ae 0x4007 0x0000 0x0000 0x00 libhidups 0x0003 0x09ae 0x4008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PowerCOM -# PowerCOM BNT-xxxAP +# PowerCOM Vanguard and BNT-xxxAP libhidups 0x0003 0x0d9f 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PowerCOM IMP - IMPERIAL Series libhidups 0x0003 0x0d9f 0x00a2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 diff --git a/scripts/java/Makefile.in b/scripts/java/Makefile.in index 7afd226..e1f7ac1 100644 --- a/scripts/java/Makefile.in +++ b/scripts/java/Makefile.in @@ -86,6 +86,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -189,6 +195,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/scripts/python/Makefile.in b/scripts/python/Makefile.in index 1f354b0..8758850 100644 --- a/scripts/python/Makefile.in +++ b/scripts/python/Makefile.in @@ -86,6 +86,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -189,6 +195,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/scripts/systemd/Makefile.in b/scripts/systemd/Makefile.in index 8c2bc3d..108ab16 100644 --- a/scripts/systemd/Makefile.in +++ b/scripts/systemd/Makefile.in @@ -118,6 +118,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -221,6 +227,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/scripts/systemd/nut-driver.service.in b/scripts/systemd/nut-driver.service.in index f81ac69..ec31ee2 100644 --- a/scripts/systemd/nut-driver.service.in +++ b/scripts/systemd/nut-driver.service.in @@ -4,7 +4,7 @@ After=local-fs.target network.target StopWhenUnneeded=yes [Service] -ExecStart=@SBINDIR@/upsdrvctl start -ExecStop=@SBINDIR@/upsdrvctl stop +ExecStart=@driverexecdir@/upsdrvctl start +ExecStop=@driverexecdir@/upsdrvctl stop Type=forking diff --git a/scripts/systemd/nutshutdown.in b/scripts/systemd/nutshutdown.in index 1b97fa2..2caac4b 100644 --- a/scripts/systemd/nutshutdown.in +++ b/scripts/systemd/nutshutdown.in @@ -1,2 +1,2 @@ #!/bin/sh -@SBINDIR@/upsmon -K >/dev/null 2>&1 && @SBINDIR@/upsdrvctl shutdown +@SBINDIR@/upsmon -K >/dev/null 2>&1 && @driverexecdir@/upsdrvctl shutdown diff --git a/scripts/udev/Makefile.in b/scripts/udev/Makefile.in index 00d19d5..190f882 100644 --- a/scripts/udev/Makefile.in +++ b/scripts/udev/Makefile.in @@ -111,6 +111,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -214,6 +220,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/scripts/udev/nut-usbups.rules.in b/scripts/udev/nut-usbups.rules.in index 6aa3166..cfa2e88 100644 --- a/scripts/udev/nut-usbups.rules.in +++ b/scripts/udev/nut-usbups.rules.in @@ -98,6 +98,8 @@ ATTR{idVendor}=="06da", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="06da", ATTR{idProduct}=="0005", MODE="664", GROUP="@RUN_AS_GROUP@" # Phoenixtec Innova T - blazer_usb ATTR{idVendor}=="06da", ATTR{idProduct}=="0201", MODE="664", GROUP="@RUN_AS_GROUP@" +# Online Zinto A - blazer_usb +ATTR{idVendor}=="06da", ATTR{idProduct}=="0601", MODE="664", GROUP="@RUN_AS_GROUP@" # various models - usbhid-ups ATTR{idVendor}=="06da", ATTR{idProduct}=="ffff", MODE="664", GROUP="@RUN_AS_GROUP@" @@ -180,7 +182,7 @@ ATTR{idVendor}=="09ae", ATTR{idProduct}=="4007", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="09ae", ATTR{idProduct}=="4008", MODE="664", GROUP="@RUN_AS_GROUP@" # PowerCOM -# PowerCOM BNT-xxxAP - usbhid-ups +# PowerCOM Vanguard and BNT-xxxAP - usbhid-ups ATTR{idVendor}=="0d9f", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" # PowerCOM IMP - IMPERIAL Series - usbhid-ups ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a2", MODE="664", GROUP="@RUN_AS_GROUP@" diff --git a/server/Makefile.am b/server/Makefile.am index 5f2f679..8146568 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -21,10 +21,10 @@ endif sbin_PROGRAMS = upsd EXTRA_PROGRAMS = sockdebug -upsd_SOURCES = upsd.c user.c conf.c ssl.c sstate.c desc.c \ +upsd_SOURCES = upsd.c user.c conf.c netssl.c sstate.c desc.c \ netget.c netmisc.c netlist.c netuser.c netset.c netinstcmd.c \ conf.h nut_ctype.h desc.h netcmds.h neterr.h netget.h netinstcmd.h \ - netlist.h netmisc.h netset.h netuser.h ssl.h sstate.h stype.h upsd.h \ + netlist.h netmisc.h netset.h netuser.h netssl.h sstate.h stype.h upsd.h \ upstype.h user-data.h user.h sockdebug_SOURCES = sockdebug.c diff --git a/server/Makefile.in b/server/Makefile.in index dd63712..a633c0d 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -86,9 +86,9 @@ sockdebug_DEPENDENCIES = ../common/libcommon.la \ ../common/libparseconf.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) am_upsd_OBJECTS = upsd.$(OBJEXT) user.$(OBJEXT) conf.$(OBJEXT) \ - ssl.$(OBJEXT) sstate.$(OBJEXT) desc.$(OBJEXT) netget.$(OBJEXT) \ - netmisc.$(OBJEXT) netlist.$(OBJEXT) netuser.$(OBJEXT) \ - netset.$(OBJEXT) netinstcmd.$(OBJEXT) + netssl.$(OBJEXT) sstate.$(OBJEXT) desc.$(OBJEXT) \ + netget.$(OBJEXT) netmisc.$(OBJEXT) netlist.$(OBJEXT) \ + netuser.$(OBJEXT) netset.$(OBJEXT) netinstcmd.$(OBJEXT) upsd_OBJECTS = $(am_upsd_OBJECTS) upsd_LDADD = $(LDADD) upsd_DEPENDENCIES = ../common/libcommon.la ../common/libparseconf.la \ @@ -128,6 +128,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -231,6 +237,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -295,10 +302,10 @@ udevdir = @udevdir@ AM_CFLAGS = -I$(top_srcdir)/include $(am__append_1) $(am__append_2) LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS) \ $(am__append_3) $(am__append_4) -upsd_SOURCES = upsd.c user.c conf.c ssl.c sstate.c desc.c \ +upsd_SOURCES = upsd.c user.c conf.c netssl.c sstate.c desc.c \ netget.c netmisc.c netlist.c netuser.c netset.c netinstcmd.c \ conf.h nut_ctype.h desc.h netcmds.h neterr.h netget.h netinstcmd.h \ - netlist.h netmisc.h netset.h netuser.h ssl.h sstate.h stype.h upsd.h \ + netlist.h netmisc.h netset.h netuser.h netssl.h sstate.h stype.h upsd.h \ upstype.h user-data.h user.h sockdebug_SOURCES = sockdebug.c @@ -399,9 +406,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netmisc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netssl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netuser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockdebug.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user.Po@am__quote@ diff --git a/server/conf.c b/server/conf.c index 3e348e2..c4d52fc 100644 --- a/server/conf.c +++ b/server/conf.c @@ -22,7 +22,7 @@ #include "upsconf.h" #include "sstate.h" #include "user.h" -#include "ssl.h" +#include "netssl.h" ups_t *upstable = NULL; int num_ups = 0; diff --git a/server/netcmds.h b/server/netcmds.h index c0b5225..613ef44 100644 --- a/server/netcmds.h +++ b/server/netcmds.h @@ -19,7 +19,7 @@ #include "nut_ctype.h" -#include "ssl.h" +#include "netssl.h" #include "netget.h" #include "netset.h" #include "netlist.h" diff --git a/server/ssl.c b/server/netssl.c similarity index 98% rename from server/ssl.c rename to server/netssl.c index bb95dca..ff3fd4e 100644 --- a/server/ssl.c +++ b/server/netssl.c @@ -1,4 +1,4 @@ -/* ssl.c - Interface to OpenSSL for upsd +/* netssl.c - Interface to OpenSSL for upsd Copyright (C) 2002 Russell Kroll @@ -29,7 +29,7 @@ #include "upsd.h" #include "neterr.h" -#include "ssl.h" +#include "netssl.h" char *certfile = NULL; diff --git a/server/ssl.h b/server/netssl.h similarity index 96% rename from server/ssl.h rename to server/netssl.h index 7f4009c..2d6224e 100644 --- a/server/ssl.h +++ b/server/netssl.h @@ -1,4 +1,4 @@ -/* ssl.h - ssl support prototypes for upsd +/* netssl.h - ssl support prototypes for upsd Copyright (C) 2002 Russell Kroll diff --git a/server/upsd.c b/server/upsd.c index 1bb6c27..f8d9c7e 100644 --- a/server/upsd.c +++ b/server/upsd.c @@ -35,7 +35,7 @@ #include "user.h" #include "nut_ctype.h" #include "stype.h" -#include "ssl.h" +#include "netssl.h" #include "sstate.h" #include "desc.h" #include "neterr.h" diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..3960ad8 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,21 @@ +# Network UPS Tools: tests + +if HAVE_CPPUNIT + +TESTS = cppunittest + +check_PROGRAMS = $(TESTS) + +cppunittest_CXXFLAGS = $(CPPUNIT_CFLAGS) +cppunittest_LDFLAGS = $(CPPUNIT_LIBS) + +# List of src files for CppUnit tests +CPPUNITTESTSRC = example.cpp + +cppunittest_SOURCES = $(CPPUNITTESTSRC) cpputest.cpp + +else !HAVE_CPPUNIT + +EXTRA_DIST = example.cpp cpputest.cpp + +endif !HAVE_CPPUNIT diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 0000000..4530104 --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,698 @@ +# Makefile.in generated by automake 1.11.1 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. +# 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Network UPS Tools: tests +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@HAVE_CPPUNIT_TRUE@TESTS = cppunittest$(EXEEXT) +@HAVE_CPPUNIT_TRUE@check_PROGRAMS = $(am__EXEEXT_1) +subdir = tests +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.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 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nut_arg_with.m4 \ + $(top_srcdir)/m4/nut_check_asciidoc.m4 \ + $(top_srcdir)/m4/nut_check_libavahi.m4 \ + $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ + $(top_srcdir)/m4/nut_check_libgd.m4 \ + $(top_srcdir)/m4/nut_check_libhal.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_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 \ + $(top_srcdir)/m4/nut_config_libhal.m4 \ + $(top_srcdir)/m4/nut_report_feature.m4 \ + $(top_srcdir)/m4/nut_type_socklen_t.m4 \ + $(top_srcdir)/configure.in +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 = +CONFIG_CLEAN_VPATH_FILES = +@HAVE_CPPUNIT_TRUE@am__EXEEXT_1 = cppunittest$(EXEEXT) +am__cppunittest_SOURCES_DIST = example.cpp cpputest.cpp +@HAVE_CPPUNIT_TRUE@am__objects_1 = cppunittest-example.$(OBJEXT) +@HAVE_CPPUNIT_TRUE@am_cppunittest_OBJECTS = $(am__objects_1) \ +@HAVE_CPPUNIT_TRUE@ cppunittest-cpputest.$(OBJEXT) +cppunittest_OBJECTS = $(am_cppunittest_OBJECTS) +cppunittest_LDADD = $(LDADD) +cppunittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(cppunittest_CXXFLAGS) \ + $(CXXFLAGS) $(cppunittest_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +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 = $(cppunittest_SOURCES) +DIST_SOURCES = $(am__cppunittest_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +A2X = @A2X@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +ASCIIDOC = @ASCIIDOC@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFPATH = @CONFPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBLATEX = @DBLATEX@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_BUILD_LIST = @DOC_BUILD_LIST@ +DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ +DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ +DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ +HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ +HAL_FDI_PATH = @HAL_FDI_PATH@ +HAL_USER = @HAL_USER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ +LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBGD_CFLAGS = @LIBGD_CFLAGS@ +LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ +LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ +LIBHAL_LIBS = @LIBHAL_LIBS@ +LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ +LIBIPMI_LIBS = @LIBIPMI_LIBS@ +LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ +LIBLTDL_LIBS = @LIBLTDL_LIBS@ +LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ +LIBNEON_LIBS = @LIBNEON_LIBS@ +LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ +LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ +LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ +LIBS = @LIBS@ +LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ +LIBSSL_LIBS = @LIBSSL_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ +LIBWRAP_LIBS = @LIBWRAP_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NETLIBS = @NETLIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NUT_NETVERSION = @NUT_NETVERSION@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OS_NAME = @OS_NAME@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIDPATH = @PIDPATH@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PORT = @PORT@ +RANLIB = @RANLIB@ +RUN_AS_GROUP = @RUN_AS_GROUP@ +RUN_AS_USER = @RUN_AS_USER@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SERLIBS = @SERLIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STATEPATH = @STATEPATH@ +STRIP = @STRIP@ +SUN_LIBUSB = @SUN_LIBUSB@ +TREE_VERSION = @TREE_VERSION@ +VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cgiexecdir = @cgiexecdir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverexecdir = @driverexecdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +hotplugdir = @hotplugdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +udevdir = @udevdir@ +@HAVE_CPPUNIT_TRUE@cppunittest_CXXFLAGS = $(CPPUNIT_CFLAGS) +@HAVE_CPPUNIT_TRUE@cppunittest_LDFLAGS = $(CPPUNIT_LIBS) + +# List of src files for CppUnit tests +@HAVE_CPPUNIT_TRUE@CPPUNITTESTSRC = example.cpp +@HAVE_CPPUNIT_TRUE@cppunittest_SOURCES = $(CPPUNITTESTSRC) cpputest.cpp +@HAVE_CPPUNIT_FALSE@EXTRA_DIST = example.cpp cpputest.cpp +all: all-am + +.SUFFIXES: +.SUFFIXES: .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 \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +cppunittest$(EXEEXT): $(cppunittest_OBJECTS) $(cppunittest_DEPENDENCIES) + @rm -f cppunittest$(EXEEXT) + $(cppunittest_LINK) $(cppunittest_OBJECTS) $(cppunittest_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppunittest-cpputest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppunittest-example.Po@am__quote@ + +.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 $@ $< + +cppunittest-example.o: example.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.o -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='example.cpp' object='cppunittest-example.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp + +cppunittest-example.obj: example.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.obj -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='example.cpp' object='cppunittest-example.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` + +cppunittest-cpputest.o: cpputest.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.o -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cpputest.cpp' object='cppunittest-cpputest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp + +cppunittest-cpputest.obj: cpputest.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.obj -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cpputest.cpp' object='cppunittest-cpputest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-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 +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir 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 maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +# 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. +.NOEXPORT: diff --git a/tests/cpputest.cpp b/tests/cpputest.cpp new file mode 100644 index 0000000..448dd5b --- /dev/null +++ b/tests/cpputest.cpp @@ -0,0 +1,44 @@ +/* cpputest - basic runner for unit tests + + Copyright (C) + 2012 Emilien Kia + + 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 +*/ + +#include +#include +#include + + +int main(int argc, char* argv[]) +{ + /* Get the top level suite from the registry */ + CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); + + /* Adds the test to the list of test to run */ + CppUnit::TextUi::TestRunner runner; + runner.addTest( suite ); + + /* Change the default outputter to a compiler error format outputter */ + runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(), + std::cerr ) ); + /* Run the tests. */ + bool wasSucessful = runner.run(); + + /* Return error code 1 if the one of test failed. */ + return wasSucessful ? 0 : 1; +} + diff --git a/tests/example.cpp b/tests/example.cpp new file mode 100644 index 0000000..28ea52e --- /dev/null +++ b/tests/example.cpp @@ -0,0 +1,62 @@ +/* example - CppUnit unit test example + + Copyright (C) + 2012 Emilien Kia + + 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 +*/ +#include + +class ExampleTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE( ExampleTest ); + CPPUNIT_TEST( testOne ); + CPPUNIT_TEST_SUITE_END(); + +public: + void setUp(); + void tearDown(); + + void testOne(); +}; + +// Registers the fixture into the 'registry' +CPPUNIT_TEST_SUITE_REGISTRATION( ExampleTest ); + + +void ExampleTest::setUp() +{ +} + + +void ExampleTest::tearDown() +{ +} + + +void ExampleTest::testOne() +{ + // Set up + int i = 1; + float f = 1.0; + + // Process + int cast = (int)f; + + // Check + CPPUNIT_ASSERT_EQUAL( i, cast ); +} + + diff --git a/tools/Makefile.in b/tools/Makefile.in index 70c7439..3229321 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -126,6 +126,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -229,6 +235,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/tools/nut-scanner/Makefile.in b/tools/nut-scanner/Makefile.in index 9396c58..5c91916 100644 --- a/tools/nut-scanner/Makefile.in +++ b/tools/nut-scanner/Makefile.in @@ -164,6 +164,12 @@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBLATEX = @DBLATEX@ DEFS = @DEFS@ @@ -267,6 +273,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ diff --git a/tools/nut-scanner/nut-scanner.c b/tools/nut-scanner/nut-scanner.c index b6cd221..db582be 100644 --- a/tools/nut-scanner/nut-scanner.c +++ b/tools/nut-scanner/nut-scanner.c @@ -1,6 +1,7 @@ /* nut-scanner.c: a tool to detect NUT supported devices * - * Copyright (C) 2011 - Arnaud Quette + * Copyright (C) + * 2011 - 2012 Arnaud Quette * * 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 @@ -122,16 +123,16 @@ static int printq(int quiet,const char *fmt, ...) return 0; } - va_start(ap, fmt); - ret = vprintf(fmt, ap); - va_end(ap); + va_start(ap, fmt); + ret = vprintf(fmt, ap); + va_end(ap); return ret; } int main(int argc, char *argv[]) { - nutscan_snmp_t sec; + nutscan_snmp_t snmp_sec; int opt_ret; char * cidr = NULL; int allow_all = 0; @@ -145,7 +146,7 @@ int main(int argc, char *argv[]) void (*display_func)(nutscan_device_t * device); int ret_code = EXIT_SUCCESS; - memset(&sec,0,sizeof(sec)); + memset(&snmp_sec, 0, sizeof(snmp_sec)); nutscan_init(); @@ -175,43 +176,43 @@ int main(int argc, char *argv[]) if(!nutscan_avail_snmp) { goto display_help; } - sec.community = strdup(optarg); + snmp_sec.community = strdup(optarg); break; case 'l': if(!nutscan_avail_snmp) { goto display_help; } - sec.secLevel = strdup(optarg); + snmp_sec.secLevel = strdup(optarg); break; case 'u': if(!nutscan_avail_snmp) { goto display_help; } - sec.secName = strdup(optarg); + snmp_sec.secName = strdup(optarg); break; case 'W': if(!nutscan_avail_snmp) { goto display_help; } - sec.authPassword = strdup(optarg); + snmp_sec.authPassword = strdup(optarg); break; case 'X': if(!nutscan_avail_snmp) { goto display_help; } - sec.privPassword = strdup(optarg); + snmp_sec.privPassword = strdup(optarg); break; case 'w': if(!nutscan_avail_snmp) { goto display_help; } - sec.authProtocol = strdup(optarg); + snmp_sec.authProtocol = strdup(optarg); break; case 'x': if(!nutscan_avail_snmp) { goto display_help; } - sec.privProtocol = strdup(optarg); + snmp_sec.privProtocol = strdup(optarg); break; case 'S': if(!nutscan_avail_snmp) { @@ -374,11 +375,11 @@ display_help: else { printq(quiet,"Scanning SNMP bus.\n"); #ifdef HAVE_PTHREAD - if( pthread_create(&thread[TYPE_SNMP],NULL,run_snmp,&sec)) { + if( pthread_create(&thread[TYPE_SNMP],NULL,run_snmp,&snmp_sec)) { nutscan_avail_snmp = 0; } #else - dev[TYPE_SNMP] = nutscan_scan_snmp(start_ip,end_ip,timeout,&sec); + dev[TYPE_SNMP] = nutscan_scan_snmp(start_ip,end_ip,timeout,&snmp_sec); #endif /* HAVE_PTHREAD */ } } diff --git a/tools/nut-scanner/nutscan-snmp.h b/tools/nut-scanner/nutscan-snmp.h index 069da20..eda7958 100644 --- a/tools/nut-scanner/nutscan-snmp.h +++ b/tools/nut-scanner/nutscan-snmp.h @@ -33,6 +33,9 @@ static snmp_device_id_t snmp_device_table[] = { { ".1.3.6.1.4.1.17373.3.1.1.0" , "aphel_genesisII", ".1.3.6.1.4.1.17373"}, { ".1.3.6.1.4.1.534.6.6.6.1.1.12.0" , "aphel_revelation", ".1.3.6.1.4.1.534.6.6.6"}, { ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.0" , "eaton_epdu", ".1.3.6.1.4.1.534.6.6.7"}, + { "" , "pulizzi_monitored", NULL}, + { ".1.3.6.1.4.1.20677.1" , "pulizzi_switched1", ".1.3.6.1.4.1.20677.1"}, + { ".1.3.6.1.4.1.20677.1" , "pulizzi_switched2", ".1.3.6.1.4.1.20677.2"}, { "1.3.6.1.4.1.534.1.1.2.0" , "pw", ".1.3.6.1.4.1.534.1"}, { ".1.3.6.1.4.1.705.1.1.1.0" , "mge", ".1.3.6.1.4.1.705.1"}, { ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" , "apcc", NULL}, diff --git a/tools/nut-scanner/nutscan-usb.h b/tools/nut-scanner/nutscan-usb.h index a20fdb7..e030c8a 100644 --- a/tools/nut-scanner/nutscan-usb.h +++ b/tools/nut-scanner/nutscan-usb.h @@ -70,6 +70,7 @@ static usb_device_id_t usb_device_table[] = { { 0x06da, 0x0004, "blazer_usb" }, { 0x06da, 0x0005, "blazer_usb" }, { 0x06da, 0x0201, "blazer_usb" }, + { 0x06da, 0x0601, "blazer_usb" }, { 0x06da, 0xffff, "usbhid-ups" }, { 0x075d, 0x0300, "usbhid-ups" }, { 0x0764, 0x0005, "usbhid-ups" }, diff --git a/tools/nut-scanner/scan_ipmi.c b/tools/nut-scanner/scan_ipmi.c index d47ee52..d650efa 100644 --- a/tools/nut-scanner/scan_ipmi.c +++ b/tools/nut-scanner/scan_ipmi.c @@ -1,6 +1,7 @@ /* scan_ipmi.c: detect NUT supported Power Supply Units * - * Copyright (C) 2011 - Arnaud Quette + * Copyright (C) + * 2011 - 2012 Arnaud Quette * * 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 @@ -35,8 +36,12 @@ static const char *dl_error = NULL; static int (*nut_ipmi_fru_parse_close_device_id) (ipmi_fru_parse_ctx_t ctx); static void (*nut_ipmi_fru_parse_ctx_destroy) (ipmi_fru_parse_ctx_t ctx); +#ifdef HAVE_FREEIPMI_11X_12X +static void (*nut_ipmi_sdr_ctx_destroy) (ipmi_sdr_ctx_t ctx); +#else /* HAVE_FREEIPMI_11X_12X */ static void (*nut_ipmi_sdr_cache_ctx_destroy) (ipmi_sdr_cache_ctx_t ctx); static void (*nut_ipmi_sdr_parse_ctx_destroy) (ipmi_sdr_parse_ctx_t ctx); +#endif /* HAVE_FREEIPMI_11X_12X */ static ipmi_fru_parse_ctx_t (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx_t ipmi_ctx); static int (*nut_ipmi_fru_parse_ctx_set_flags) (ipmi_fru_parse_ctx_t ctx, unsigned int flags); static int (*nut_ipmi_fru_parse_open_device_id) (ipmi_fru_parse_ctx_t ctx, uint8_t fru_device_id); @@ -97,6 +102,15 @@ int nutscan_load_ipmi_library() goto err; } +#ifdef HAVE_FREEIPMI_11X_12X + + *(void **) (&nut_ipmi_sdr_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_sdr_ctx_destroy"); + if ((dl_error = lt_dlerror()) != NULL) { + goto err; + } + +#else /* HAVE_FREEIPMI_11X_12X */ + *(void **) (&nut_ipmi_sdr_cache_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_sdr_cache_ctx_destroy"); if ((dl_error = lt_dlerror()) != NULL) { goto err; @@ -106,6 +120,7 @@ int nutscan_load_ipmi_library() if ((dl_error = lt_dlerror()) != NULL) { goto err; } +#endif /* HAVE_FREEIPMI_11X_12X */ *(void **) (&nut_ipmi_fru_parse_ctx_create) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_create"); if ((dl_error = lt_dlerror()) != NULL) { @@ -172,15 +187,28 @@ err: /* end of dynamic link library stuff */ /* Cleanup IPMI contexts */ +#ifdef HAVE_FREEIPMI_11X_12X +static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx, + ipmi_sdr_ctx_t sdr_ctx) +#else /* HAVE_FREEIPMI_11X_12X */ static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx, ipmi_sdr_cache_ctx_t sdr_cache_ctx, ipmi_sdr_parse_ctx_t sdr_parse_ctx) +#endif /* HAVE_FREEIPMI_11X_12X */ { if (fru_parse_ctx) { (*nut_ipmi_fru_parse_close_device_id) (fru_parse_ctx); (*nut_ipmi_fru_parse_ctx_destroy) (fru_parse_ctx); } +#ifdef HAVE_FREEIPMI_11X_12X + + if (sdr_ctx) { + (*nut_ipmi_sdr_ctx_destroy) (sdr_ctx); + } + +#else /* HAVE_FREEIPMI_11X_12X */ + if (sdr_cache_ctx) { (*nut_ipmi_sdr_cache_ctx_destroy) (sdr_cache_ctx); } @@ -188,6 +216,8 @@ static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx, if (sdr_parse_ctx) { (*nut_ipmi_sdr_parse_ctx_destroy) (sdr_parse_ctx); } + +#endif /* HAVE_FREEIPMI_11X_12X */ } /* Return 1 if supported, 0 otherwise */ @@ -198,8 +228,12 @@ int is_ipmi_device_supported(ipmi_ctx_t ipmi_ctx, int ipmi_id) unsigned int area_length = 0; uint8_t areabuf[IPMI_FRU_PARSE_AREA_SIZE_MAX+1]; ipmi_fru_parse_ctx_t fru_parse_ctx = NULL; +#ifdef HAVE_FREEIPMI_11X_12X + ipmi_sdr_ctx_t sdr_ctx = NULL; +#else /* HAVE_FREEIPMI_11X_12X */ ipmi_sdr_cache_ctx_t sdr_cache_ctx = NULL; ipmi_sdr_parse_ctx_t sdr_parse_ctx = NULL; +#endif /* HAVE_FREEIPMI_11X_12X */ /* Parse FRU information */ if (!(fru_parse_ctx = (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx))) @@ -211,13 +245,21 @@ int is_ipmi_device_supported(ipmi_ctx_t ipmi_ctx, int ipmi_id) /* lots of motherboards calculate checksums incorrectly */ if ((*nut_ipmi_fru_parse_ctx_set_flags) (fru_parse_ctx, IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS) < 0) { +#ifdef HAVE_FREEIPMI_11X_12X + nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx); +#else nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); +#endif /* HAVE_FREEIPMI_11X_12X */ return 0; } if ((*nut_ipmi_fru_parse_open_device_id) (fru_parse_ctx, ipmi_id) < 0) { +#ifdef HAVE_FREEIPMI_11X_12X + nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx); +#else nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); +#endif /* HAVE_FREEIPMI_11X_12X */ return 0; } @@ -235,7 +277,11 @@ int is_ipmi_device_supported(ipmi_ctx_t ipmi_ctx, int ipmi_id) areabuf, IPMI_FRU_PARSE_AREA_SIZE_MAX) < 0) { +#ifdef HAVE_FREEIPMI_11X_12X + nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx); +#else nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); +#endif /* HAVE_FREEIPMI_11X_12X */ return 0; } @@ -244,14 +290,22 @@ int is_ipmi_device_supported(ipmi_ctx_t ipmi_ctx, int ipmi_id) if (area_type == IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION) { /* Found a POWER_SUPPLY record */ +#ifdef HAVE_FREEIPMI_11X_12X + nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx); +#else nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); +#endif /* HAVE_FREEIPMI_11X_12X */ return 1; } } } while ((ret = (*nut_ipmi_fru_parse_next) (fru_parse_ctx)) == 1); /* No need for further errors checking */ +#ifdef HAVE_FREEIPMI_11X_12X + nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx); +#else nut_freeipmi_cleanup(fru_parse_ctx, sdr_cache_ctx, sdr_parse_ctx); +#endif /* HAVE_FREEIPMI_11X_12X */ return 0; } @@ -297,7 +351,7 @@ nutscan_device_t * nutscan_scan_ipmi() return NULL; } - /* Loop through all possible devices */ + /* Loop through all possible components */ for (ipmi_id = 0 ; ipmi_id <= IPMI_FRU_DEVICE_ID_MAX ; ipmi_id++) { if (is_ipmi_device_supported(ipmi_ctx, ipmi_id)) { From ce071bf6d9d6ee761a80a9687851979164588ef3 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 12 Aug 2012 23:40:20 +0200 Subject: [PATCH 105/300] New upstream release --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 464e9b2..75123ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.6.4-3) UNRELEASED; urgency=low +nut (2.6.5-1) UNRELEASED; urgency=low [ Arnaud Quette ] * debian/control, debian/nut-ipmi.{install,manpages}: create IPMI @@ -6,10 +6,11 @@ nut (2.6.4-3) UNRELEASED; urgency=low * debian/nut-server.install: only install USB udev rules [ Laurent Bigonville ] + * New upstream release * Follow multi-arch policy * Install systemd .service files (Closes: #679450) - -- Laurent Bigonville Sun, 12 Aug 2012 23:14:05 +0200 + -- Laurent Bigonville Sun, 12 Aug 2012 23:39:33 +0200 nut (2.6.4-2) unstable; urgency=low From b5e16725faeba13582e8f9a0bd1421b1b4a5e266 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 12 Aug 2012 23:43:25 +0200 Subject: [PATCH 106/300] Drop debian/patches/0001-fix-upsmon-regression.patch, applied upstream --- debian/changelog | 3 ++- debian/patches/0001-fix-upsmon-regression.patch | 15 --------------- debian/patches/series | 1 - 3 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 debian/patches/0001-fix-upsmon-regression.patch diff --git a/debian/changelog b/debian/changelog index 75123ce..fcbef96 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,10 +7,11 @@ nut (2.6.5-1) UNRELEASED; urgency=low [ Laurent Bigonville ] * New upstream release + - Drop debian/patches/0001-fix-upsmon-regression.patch, applied upstream * Follow multi-arch policy * Install systemd .service files (Closes: #679450) - -- Laurent Bigonville Sun, 12 Aug 2012 23:39:33 +0200 + -- Laurent Bigonville Sun, 12 Aug 2012 23:43:02 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/patches/0001-fix-upsmon-regression.patch b/debian/patches/0001-fix-upsmon-regression.patch deleted file mode 100644 index aa8c13e..0000000 --- a/debian/patches/0001-fix-upsmon-regression.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Fix upsmon/upssched regression -Origin: upstream, http://trac.networkupstools.org/projects/nut/changeset/3670 -Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679513 - -Index: /trunk/clients/upssched.c -=================================================================== ---- a/clients/upssched.c (revision 3555) -+++ b/clients/upssched.c (revision 3670) -@@ -695,5 +695,5 @@ - pconf_encode(arg2, enc, sizeof(enc))); - -- snprintfcat(enc, sizeof(enc), "%s\n", buf); -+ snprintf(enc, sizeof(enc), "%s\n", buf); - - /* see if the parent needs to be started (and maybe start it) */ diff --git a/debian/patches/series b/debian/patches/series index f80396c..2024d93 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ -0001-fix-upsmon-regression.patch 0002-nut-monitor-paths.patch From 4730afcab2ecc95e00fd4ac6f3e094bd0bbf3340 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 12 Aug 2012 23:49:47 +0200 Subject: [PATCH 107/300] Systemd units are now installed in multi-arch path --- debian/rules | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index 42ddca7..e647ddc 100755 --- a/debian/rules +++ b/debian/rules @@ -68,13 +68,13 @@ common-install-arch:: # Install systemd files only on systems where it's supported ifeq (linux,$(DEB_HOST_ARCH_OS)) - install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-monitor.service \ + install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-monitor.service \ $(CURDIR)/debian/nut-client/lib/systemd/system/nut-monitor.service - install -D $(CURDIR)/debian/tmp/lib/systemd/system-shutdown/nutshutdown \ + install -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system-shutdown/nutshutdown \ $(CURDIR)/debian/nut-server/lib/systemd/system-shutdown/nutshutdown - install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-driver.service \ + install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-driver.service \ $(CURDIR)/debian/nut-server/lib/systemd/system/nut-driver.service - install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-server.service \ + install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-server.service \ $(CURDIR)/debian/nut-server/lib/systemd/system/nut-server.service endif From 7903ed56c27ab293b109dc534dc4a4a8d02a1c6d Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 13 Aug 2012 00:19:04 +0200 Subject: [PATCH 108/300] debian/nut-server.install: Drop newmge-shut, renamed upstream to mge-shut and install the old implementation (oldmge-shut) instead --- debian/NEWS | 6 ++++++ debian/changelog | 4 +++- debian/nut-server.install | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 debian/NEWS diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 0000000..e42605c --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,6 @@ +nut (2.6.5-1) experimental; urgency=low + + mge-shut driver has been replaced by a new implementation (newmge-shut). + In case of issue with this new version, users can revert to oldmge-shut. + + -- Laurent Bigonville Mon, 13 Aug 2012 00:32:18 +0200 diff --git a/debian/changelog b/debian/changelog index fcbef96..17ace90 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,10 @@ nut (2.6.5-1) UNRELEASED; urgency=low - Drop debian/patches/0001-fix-upsmon-regression.patch, applied upstream * Follow multi-arch policy * Install systemd .service files (Closes: #679450) + * debian/nut-server.install: Drop newmge-shut, renamed upstream to mge-shut + and install the old implementation (oldmge-shut) instead - -- Laurent Bigonville Sun, 12 Aug 2012 23:43:02 +0200 + -- Laurent Bigonville Mon, 13 Aug 2012 00:23:00 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/nut-server.install b/debian/nut-server.install index 1c22483..ad36c03 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -26,7 +26,7 @@ debian/tmp/lib/nut/tripplite_usb debian/tmp/lib/nut/bcmxcp debian/tmp/lib/nut/bestuferrups debian/tmp/lib/nut/gamatronic -debian/tmp/lib/nut/newmge-shut +debian/tmp/lib/nut/oldmge-shut debian/tmp/lib/nut/safenet debian/tmp/lib/nut/isbmex debian/tmp/lib/nut/masterguard From b8b31887a5d31d7a8a04c4058ba56299c3664419 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 13 Aug 2012 00:58:16 +0200 Subject: [PATCH 109/300] debian/control: Drop ancient Conflicts/Provides/Replaces --- debian/changelog | 3 ++- debian/control | 14 ++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index 17ace90..7356843 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,8 +12,9 @@ nut (2.6.5-1) UNRELEASED; urgency=low * Install systemd .service files (Closes: #679450) * debian/nut-server.install: Drop newmge-shut, renamed upstream to mge-shut and install the old implementation (oldmge-shut) instead + * debian/control: Drop ancient Conflicts/Provides/Replaces - -- Laurent Bigonville Mon, 13 Aug 2012 00:23:00 +0200 + -- Laurent Bigonville Mon, 13 Aug 2012 00:56:42 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/control b/debian/control index 431767f..7b6c990 100644 --- a/debian/control +++ b/debian/control @@ -41,9 +41,8 @@ Description: network UPS tools - metapackage Package: nut-server Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev}, nut-client (= ${binary:Version}) -Suggests: nut-cgi, nut-snmp, nut-ipmi, nut-xml, nut-dev -Provides: nut-usb -Conflicts: nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) +Suggests: nut-cgi, nut-snmp, nut-ipmi, nut-xml, nut-monitor +Conflicts: nut-hal-drivers Replaces: nut (<< 2.6.1-2~) Breaks: nut (<< 2.6.1-2~) Description: network UPS tools - core system @@ -60,9 +59,9 @@ Package: nut-client Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6) Provides: ups-monitor -Conflicts: ups-monitor, nut-server (<< 2.6.3-1) +Conflicts: ups-monitor Recommends: bash-completion -Replaces: nut (<< 2.6.1-2~) +Replaces: ups-monitor, nut (<< 2.6.1-2~), nut-server (<< 2.6.3-1~) Breaks: nut (<< 2.6.1-2~), nut-server (<< 2.6.3-1~) Description: network UPS tools - clients Network UPS Tools (NUT) is a client/server monitoring system that @@ -79,7 +78,6 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser Recommends: apache2 | httpd-cgi Suggests: nut -Replaces: nut (<< 1.1.11) Description: network UPS tools - web interface Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and @@ -93,7 +91,6 @@ Description: network UPS tools - web interface Package: nut-snmp Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 1.4.1-pre1) -Conflicts: nut (<= 1.4.0) Description: network UPS tools - SNMP driver Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and @@ -108,7 +105,6 @@ Description: network UPS tools - SNMP driver Package: nut-ipmi Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 1.4.1-pre1) -Conflicts: nut (<= 1.4.0) Description: network UPS tools - IPMI driver Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and @@ -181,8 +177,6 @@ Package: libupsclient1-dev Section: libdevel Architecture: any Depends: libupsclient1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Provides: nut-dev -Conflicts: nut-dev (<< 2.2.2) Description: network UPS tools - development files Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and From 2904bfac3cc33bd7508bb91b68afebf134027b4c Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 13 Aug 2012 01:11:45 +0200 Subject: [PATCH 110/300] Install all development files under /usr --- debian/changelog | 3 ++- debian/libupsclient1-dev.dirs | 1 - debian/libupsclient1-dev.install | 5 ++--- .../0003-install-dev-files-in-usr.patch | 20 +++++++++++++++++++ debian/patches/series | 1 + debian/rules | 7 +++++-- 6 files changed, 30 insertions(+), 7 deletions(-) delete mode 100644 debian/libupsclient1-dev.dirs create mode 100644 debian/patches/0003-install-dev-files-in-usr.patch diff --git a/debian/changelog b/debian/changelog index 7356843..2f5a8ad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,8 +13,9 @@ nut (2.6.5-1) UNRELEASED; urgency=low * debian/nut-server.install: Drop newmge-shut, renamed upstream to mge-shut and install the old implementation (oldmge-shut) instead * debian/control: Drop ancient Conflicts/Provides/Replaces + * Install all development files under /usr - -- Laurent Bigonville Mon, 13 Aug 2012 00:56:42 +0200 + -- Laurent Bigonville Mon, 13 Aug 2012 01:11:26 +0200 nut (2.6.4-2) unstable; urgency=low diff --git a/debian/libupsclient1-dev.dirs b/debian/libupsclient1-dev.dirs deleted file mode 100644 index 502167f..0000000 --- a/debian/libupsclient1-dev.dirs +++ /dev/null @@ -1 +0,0 @@ -/lib diff --git a/debian/libupsclient1-dev.install b/debian/libupsclient1-dev.install index 144903a..5b3120a 100644 --- a/debian/libupsclient1-dev.install +++ b/debian/libupsclient1-dev.install @@ -1,5 +1,4 @@ -lib/*/libupsclient.so usr/lib/*/libupsclient.so -lib/*/libupsclient.a -usr/lib/*/pkgconfig/ +usr/lib/*/libupsclient.a +usr/lib/*/pkgconfig/libupsclient.pc usr/include diff --git a/debian/patches/0003-install-dev-files-in-usr.patch b/debian/patches/0003-install-dev-files-in-usr.patch new file mode 100644 index 0000000..73ea30b --- /dev/null +++ b/debian/patches/0003-install-dev-files-in-usr.patch @@ -0,0 +1,20 @@ +Description: Adjust .pc paths to install development files to /usr +Author: Laurent Bigonville +Forwarded: not-needed + +--- a/lib/libnutscan.pc.in ++++ b/lib/libnutscan.pc.in +@@ -1,4 +1,4 @@ +-prefix=@prefix@ ++prefix=/usr + exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ +--- a/lib/libupsclient.pc.in ++++ b/lib/libupsclient.pc.in +@@ -1,4 +1,4 @@ +-prefix=@prefix@ ++prefix=/usr + exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ diff --git a/debian/patches/series b/debian/patches/series index 2024d93..0b2897f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ +0003-install-dev-files-in-usr.patch 0002-nut-monitor-paths.patch diff --git a/debian/rules b/debian/rules index e647ddc..9104960 100755 --- a/debian/rules +++ b/debian/rules @@ -62,8 +62,11 @@ common-install-arch:: mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \ done - # Create -dev symlink under /usr - ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.1.1.0 \ + # Move -dev file to /usr + mv $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libupsclient.a \ + $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.a + rm -f $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so + ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.1 \ $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so # Install systemd files only on systems where it's supported From 3f5ae0e4fb66dc24065e4207b7ea7b3042d23b20 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 13 Aug 2012 01:59:26 +0200 Subject: [PATCH 111/300] Release to experimental --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2f5a8ad..6152411 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.6.5-1) UNRELEASED; urgency=low +nut (2.6.5-1) experimental; urgency=low [ Arnaud Quette ] * debian/control, debian/nut-ipmi.{install,manpages}: create IPMI @@ -15,7 +15,7 @@ nut (2.6.5-1) UNRELEASED; urgency=low * debian/control: Drop ancient Conflicts/Provides/Replaces * Install all development files under /usr - -- Laurent Bigonville Mon, 13 Aug 2012 01:11:26 +0200 + -- Laurent Bigonville Mon, 13 Aug 2012 01:59:18 +0200 nut (2.6.4-2) unstable; urgency=low From 5b99c93354906e83a65b00322f3eed432c3bc574 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 13 Aug 2012 10:46:13 +0200 Subject: [PATCH 112/300] debian/control: Move the nut-monitor Suggests from nut-server to nut-client --- debian/changelog | 7 +++++++ debian/control | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6152411..e97fa58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nut (2.6.5-2) UNRELEASED; urgency=low + + * debian/control: Move the nut-monitor Suggests from nut-server to + nut-client + + -- Laurent Bigonville Mon, 13 Aug 2012 10:45:03 +0200 + nut (2.6.5-1) experimental; urgency=low [ Arnaud Quette ] diff --git a/debian/control b/debian/control index 7b6c990..71ce684 100644 --- a/debian/control +++ b/debian/control @@ -41,7 +41,7 @@ Description: network UPS tools - metapackage Package: nut-server Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev}, nut-client (= ${binary:Version}) -Suggests: nut-cgi, nut-snmp, nut-ipmi, nut-xml, nut-monitor +Suggests: nut-cgi, nut-snmp, nut-ipmi, nut-xml Conflicts: nut-hal-drivers Replaces: nut (<< 2.6.1-2~) Breaks: nut (<< 2.6.1-2~) @@ -61,6 +61,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6) Provides: ups-monitor Conflicts: ups-monitor Recommends: bash-completion +Suggests: nut-monitor Replaces: ups-monitor, nut (<< 2.6.1-2~), nut-server (<< 2.6.3-1~) Breaks: nut (<< 2.6.1-2~), nut-server (<< 2.6.3-1~) Description: network UPS tools - clients From c79bcd71af2285eec15c642fa66dbc13b876dead Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 9 Oct 2012 23:38:43 +0200 Subject: [PATCH 113/300] Restore proper SELinux context for runtime created /var/run/nut directory --- debian/changelog | 3 ++- debian/nut-client.init | 3 ++- debian/nut-client.postinst | 1 + debian/nut-server.init | 3 ++- debian/nut-server.postinst | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index e97fa58..1651395 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ nut (2.6.5-2) UNRELEASED; urgency=low * debian/control: Move the nut-monitor Suggests from nut-server to nut-client + * Restore proper SELinux context for runtime created /var/run/nut directory - -- Laurent Bigonville Mon, 13 Aug 2012 10:45:03 +0200 + -- Laurent Bigonville Tue, 09 Oct 2012 23:38:10 +0200 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/nut-client.init b/debian/nut-client.init index 8524dd2..15a9f75 100755 --- a/debian/nut-client.init +++ b/debian/nut-client.init @@ -54,7 +54,8 @@ fi check_var_directory() { [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ && chown root:nut ${pid_dir} \ - && chmod 770 ${pid_dir} + && chmod 770 ${pid_dir} \ + && [ -x /sbin/restorecon ] && /sbin/restorecon ${pid_dir} } # check if the right components are running diff --git a/debian/nut-client.postinst b/debian/nut-client.postinst index 8546a95..5f61e55 100644 --- a/debian/nut-client.postinst +++ b/debian/nut-client.postinst @@ -36,6 +36,7 @@ case "$1" in if [ -d /var/run/nut ] ; then chown root:nut /var/run/nut chmod 770 /var/run/nut + [ -x /sbin/restorecon ] && /sbin/restorecon /var/run/nut fi ;; diff --git a/debian/nut-server.init b/debian/nut-server.init index a606b72..c539bd5 100644 --- a/debian/nut-server.init +++ b/debian/nut-server.init @@ -52,7 +52,8 @@ fi check_var_directory() { [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ && chown root:nut ${pid_dir} \ - && chmod 770 ${pid_dir} + && chmod 770 ${pid_dir} \ + && [ -x /sbin/restorecon ] && /sbin/restorecon ${pid_dir} } # check if the right components are running diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index d0ec14b..8523527 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -36,6 +36,7 @@ case "$1" in if [ -d /var/run/nut ] ; then chown root:nut /var/run/nut chmod 770 /var/run/nut + [ -x /sbin/restorecon ] && /sbin/restorecon /var/run/nut fi # make sure that /var/lib/nut has the correct permissions and ownerships From a80da4998d7254857d1d01d8fdd8bcfbf1ff68ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Tue, 27 Nov 2012 08:34:19 +0100 Subject: [PATCH 114/300] debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older versions of the postinst (Closes: #677054) --- debian/changelog | 5 +++++ debian/nut-client.preinst | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 debian/nut-client.preinst diff --git a/debian/changelog b/debian/changelog index 1651395..46f7e6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,14 @@ nut (2.6.5-2) UNRELEASED; urgency=low + [ Laurent Bigonville ] * debian/control: Move the nut-monitor Suggests from nut-server to nut-client * Restore proper SELinux context for runtime created /var/run/nut directory + [ Sébastien Villemot ] + * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older + versions of the postinst (Closes: #677054) + -- Laurent Bigonville Tue, 09 Oct 2012 23:38:10 +0200 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/nut-client.preinst b/debian/nut-client.preinst new file mode 100644 index 0000000..2107da1 --- /dev/null +++ b/debian/nut-client.preinst @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# Revert /etc/nut/nut.conf mangling done by older versions of the postinst +# See #677054 +if [ "$1" = "install" -o "$1" = "upgrade" ] \ + && dpkg --compare-versions "$2" lt "2.6.4-2" \ + && [ -f /etc/nut/nut.conf ] \ + && [ "`md5sum /etc/nut/nut.conf | cut -d ' ' -f 1`" = f9b571ae65952e3a761fac2202633478 ]; then + sed -i 's/^MODE=none$/MODE = none/' /etc/nut/nut.conf +fi + +#DEBHELPER# From caf09b3d5850a2f36fff35c5948d7ccaeb4fb14c Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 2 Dec 2012 13:08:38 +0100 Subject: [PATCH 115/300] debian/control: Fix typo in package description --- debian/changelog | 3 ++- debian/control | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 46f7e6b..a4d1a60 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,12 +4,13 @@ nut (2.6.5-2) UNRELEASED; urgency=low * debian/control: Move the nut-monitor Suggests from nut-server to nut-client * Restore proper SELinux context for runtime created /var/run/nut directory + * debian/control: Fix typo in package description [ Sébastien Villemot ] * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older versions of the postinst (Closes: #677054) - -- Laurent Bigonville Tue, 09 Oct 2012 23:38:10 +0200 + -- Laurent Bigonville Sun, 02 Dec 2012 13:07:51 +0100 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/control b/debian/control index 71ce684..81b21f6 100644 --- a/debian/control +++ b/debian/control @@ -35,7 +35,7 @@ Description: network UPS tools - metapackage through the server, and are notified whenever the power status changes. . - This package is a metapackage that install both nut-server and nut-client, + This package is a metapackage that installs both nut-server and nut-client, in most cases it is sufficient for a basic UPS monitoring system. Package: nut-server From 68adcbdb659141fcf9118f787922482be2ceadc5 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 2 Dec 2012 13:48:57 +0100 Subject: [PATCH 116/300] debian/watch: Update watch file URL (Thanks to Bart Martens) --- debian/changelog | 3 ++- debian/watch | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a4d1a60..72f7176 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,12 +5,13 @@ nut (2.6.5-2) UNRELEASED; urgency=low nut-client * Restore proper SELinux context for runtime created /var/run/nut directory * debian/control: Fix typo in package description + * debian/watch: Update watch file URL (Thanks to Bart Martens) [ Sébastien Villemot ] * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older versions of the postinst (Closes: #677054) - -- Laurent Bigonville Sun, 02 Dec 2012 13:07:51 +0100 + -- Laurent Bigonville Sun, 02 Dec 2012 13:48:20 +0100 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/watch b/debian/watch index fd44637..606e460 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,2 @@ version=3 -http://www.networkupstools.org/source/([0-9.]+)/nut-(.*)\.tar\.gz +http://www.networkupstools.org/download.html .*/nut-(.*)\.tar\.(?:gz|bz2|xz) From d54dd5484020cb893751942c476b90fdfad7f6f4 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 13 Jan 2013 17:31:58 +0100 Subject: [PATCH 117/300] Only fix permissions of configfiles on first install. --- debian/changelog | 5 ++++- debian/nut-client.postinst | 19 +++++++++++-------- debian/nut-server.postinst | 19 +++++++++++-------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index 72f7176..eaf9c73 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,7 +11,10 @@ nut (2.6.5-2) UNRELEASED; urgency=low * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older versions of the postinst (Closes: #677054) - -- Laurent Bigonville Sun, 02 Dec 2012 13:48:20 +0100 + [ Ivo De Decker ] + * Only fix permissions of configfiles on first install. + + -- Laurent Bigonville Sun, 13 Jan 2013 17:31:15 +0100 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/nut-client.postinst b/debian/nut-client.postinst index 5f61e55..e4743f5 100644 --- a/debian/nut-client.postinst +++ b/debian/nut-client.postinst @@ -19,15 +19,18 @@ case "$1" in # fi # make sure that conffiles are secured and have the correct ownerships - if [ -d /etc/nut/ ] ; then - chown root:nut /etc/nut/ - fi - for file in nut.conf upsmon.conf upssched.conf ; do - if [ -f /etc/nut/$file ] ; then - chown root:nut /etc/nut/$file - chmod 640 /etc/nut/$file + # on first install + if [ -z "$2" ] ; then + if [ -d /etc/nut/ ] ; then + chown root:nut /etc/nut/ fi - done + for file in nut.conf upsmon.conf upssched.conf ; do + if [ -f /etc/nut/$file ] ; then + chown root:nut /etc/nut/$file + chmod 640 /etc/nut/$file + fi + done + fi # make sure that /var/run/nut exists and has the correct ownerships if [ ! -d /var/run/nut ] ; then diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index 8523527..0c653da 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -19,15 +19,18 @@ case "$1" in # fi # make sure that conffiles are secured and have the correct ownerships - if [ -d /etc/nut/ ] ; then - chown root:nut /etc/nut/ - fi - for file in ups.conf upsd.conf upsd.users ; do - if [ -f /etc/nut/$file ] ; then - chown root:nut /etc/nut/$file - chmod 640 /etc/nut/$file + # on first install + if [ -z "$2" ] ; then + if [ -d /etc/nut/ ] ; then + chown root:nut /etc/nut/ fi - done + for file in ups.conf upsd.conf upsd.users ; do + if [ -f /etc/nut/$file ] ; then + chown root:nut /etc/nut/$file + chmod 640 /etc/nut/$file + fi + done + fi # make sure that /var/run/nut exists and has the correct ownerships if [ ! -d /var/run/nut ] ; then From 715368e54fdb4a4ccdc2e155a918eae23c479e45 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 13 Jan 2013 17:36:52 +0100 Subject: [PATCH 118/300] Only remove /etc/init.d/nut from previous versions of nut in nut-server postinst if there are no local changes. * Only remove /etc/init.d/nut from previous versions of nut in nut-server postinst if there are no local changes. * Also remove /etc/init.d/nut in nut-client postinst. Thanks to Laurent Bigonville for the hint. --- debian/changelog | 6 +++++- debian/nut-client.postinst | 10 ++++++++++ debian/nut-server.postinst | 9 +++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index eaf9c73..35237fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,8 +13,12 @@ nut (2.6.5-2) UNRELEASED; urgency=low [ Ivo De Decker ] * Only fix permissions of configfiles on first install. + * Only remove /etc/init.d/nut from previous versions of nut in nut-server + postinst if there are no local changes. + * Also remove /etc/init.d/nut in nut-client postinst. Thanks to + Laurent Bigonville for the hint. - -- Laurent Bigonville Sun, 13 Jan 2013 17:31:15 +0100 + -- Laurent Bigonville Sun, 13 Jan 2013 17:36:13 +0100 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/nut-client.postinst b/debian/nut-client.postinst index e4743f5..bac6721 100644 --- a/debian/nut-client.postinst +++ b/debian/nut-client.postinst @@ -41,6 +41,16 @@ case "$1" in chmod 770 /var/run/nut [ -x /sbin/restorecon ] && /sbin/restorecon /var/run/nut fi + + if dpkg --compare-versions "$2" le "2.6.4-2~" && + [ -f /etc/init.d/nut ] ; then + if [ "`md5sum /etc/init.d/nut | cut -d ' ' -f 1`" = 72f1dbc6b92cb4407f26605d05b12681 ]; then + rm -f /etc/init.d/nut + else + mv /etc/init.d/nut /etc/init.d/nut.dpkg-old + fi + update-rc.d nut remove >/dev/null + fi ;; abort-upgrade) diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index 0c653da..4a718aa 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -54,8 +54,13 @@ case "$1" in # 557178 udevadm trigger --subsystem-match=usb - if dpkg --compare-versions "$2" le "2.6.4-2~" ; then - rm -f /etc/init.d/nut + if dpkg --compare-versions "$2" le "2.6.4-2~" && + [ -f /etc/init.d/nut ] ; then + if [ "`md5sum /etc/init.d/nut | cut -d ' ' -f 1`" = 72f1dbc6b92cb4407f26605d05b12681 ]; then + rm -f /etc/init.d/nut + else + mv /etc/init.d/nut /etc/init.d/nut.dpkg-old + fi update-rc.d nut remove >/dev/null fi ;; From 853f3503ce848548eb092ee904db5208b1e570a8 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 25 Jan 2013 23:17:36 +0100 Subject: [PATCH 119/300] debian/rules: Alias systemd nut-monitor service file to nut-client to prevent it from running twice --- debian/changelog | 4 +++- debian/rules | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 35237fa..b7eeeaa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ nut (2.6.5-2) UNRELEASED; urgency=low * Restore proper SELinux context for runtime created /var/run/nut directory * debian/control: Fix typo in package description * debian/watch: Update watch file URL (Thanks to Bart Martens) + * debian/rules: Alias systemd nut-monitor service file to nut-client to + prevent it from running twice [ Sébastien Villemot ] * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older @@ -18,7 +20,7 @@ nut (2.6.5-2) UNRELEASED; urgency=low * Also remove /etc/init.d/nut in nut-client postinst. Thanks to Laurent Bigonville for the hint. - -- Laurent Bigonville Sun, 13 Jan 2013 17:36:13 +0100 + -- Laurent Bigonville Fri, 25 Jan 2013 23:13:51 +0100 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/rules b/debian/rules index 9104960..2d6ca9e 100755 --- a/debian/rules +++ b/debian/rules @@ -79,6 +79,11 @@ ifeq (linux,$(DEB_HOST_ARCH_OS)) $(CURDIR)/debian/nut-server/lib/systemd/system/nut-driver.service install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-server.service \ $(CURDIR)/debian/nut-server/lib/systemd/system/nut-server.service + + # This is needed to avoid services to be started twice (systemd and LSB) + mkdir -p $(CURDIR)/debian/nut-client/etc/systemd/system/ + ln -s /lib/systemd/system/nut-monitor.service \ + $(CURDIR)/debian/nut-client/etc/systemd/system/nut-client.service endif common-install-indep:: From 47044fe3b0fdc06b89c806eb2765f66a17d63ff0 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 26 Jan 2013 00:19:45 +0100 Subject: [PATCH 120/300] d/p/0004-fix-systemd-service.patch: Fix systemd service file for Debian --- debian/changelog | 3 +- debian/patches/0004-fix-systemd-service.patch | 28 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0004-fix-systemd-service.patch diff --git a/debian/changelog b/debian/changelog index b7eeeaa..1864def 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ nut (2.6.5-2) UNRELEASED; urgency=low * debian/watch: Update watch file URL (Thanks to Bart Martens) * debian/rules: Alias systemd nut-monitor service file to nut-client to prevent it from running twice + * d/p/0004-fix-systemd-service.patch: Fix systemd service file for Debian [ Sébastien Villemot ] * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older @@ -20,7 +21,7 @@ nut (2.6.5-2) UNRELEASED; urgency=low * Also remove /etc/init.d/nut in nut-client postinst. Thanks to Laurent Bigonville for the hint. - -- Laurent Bigonville Fri, 25 Jan 2013 23:13:51 +0100 + -- Laurent Bigonville Sat, 26 Jan 2013 00:15:43 +0100 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/patches/0004-fix-systemd-service.patch b/debian/patches/0004-fix-systemd-service.patch new file mode 100644 index 0000000..9465687 --- /dev/null +++ b/debian/patches/0004-fix-systemd-service.patch @@ -0,0 +1,28 @@ +Subject: Fix systemd service file for Debian +From: Laurent Bigonville +Forwarded: not-needed + +--- a/scripts/systemd/nut-driver.service.in ++++ b/scripts/systemd/nut-driver.service.in +@@ -1,10 +1,11 @@ + [Unit] + Description=Network UPS Tools - power device driver controller +-After=local-fs.target network.target ++After=local-fs.target network.target udev-settle.service ++Wants=udev-settle.service + StopWhenUnneeded=yes + + [Service] +-ExecStart=@driverexecdir@/upsdrvctl start +-ExecStop=@driverexecdir@/upsdrvctl stop ++ExecStart=@SBINDIR@/upsdrvctl start ++ExecStop=@SBINDIR@/upsdrvctl stop + Type=forking + +--- a/scripts/systemd/nut-monitor.service.in ++++ b/scripts/systemd/nut-monitor.service.in +@@ -9,3 +9,4 @@ Type=forking + + [Install] + WantedBy=multi-user.target ++Alias=nut-client.service diff --git a/debian/patches/series b/debian/patches/series index 0b2897f..540178d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0003-install-dev-files-in-usr.patch 0002-nut-monitor-paths.patch +0004-fix-systemd-service.patch From 11b7980da62ca4326d14cc3c1e461fe76cdc7486 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 26 Jan 2013 01:01:44 +0100 Subject: [PATCH 121/300] Install tmpfiles conf files to create /run/nut directory during boot --- debian/changelog | 3 ++- debian/nut-client.tmpfiles | 1 + debian/nut-server.tmpfiles | 1 + debian/rules | 6 ++++++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 debian/nut-client.tmpfiles create mode 100644 debian/nut-server.tmpfiles diff --git a/debian/changelog b/debian/changelog index 1864def..7fbb256 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ nut (2.6.5-2) UNRELEASED; urgency=low * debian/rules: Alias systemd nut-monitor service file to nut-client to prevent it from running twice * d/p/0004-fix-systemd-service.patch: Fix systemd service file for Debian + * Install tmpfiles conf files to create /run/nut directory during boot [ Sébastien Villemot ] * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older @@ -21,7 +22,7 @@ nut (2.6.5-2) UNRELEASED; urgency=low * Also remove /etc/init.d/nut in nut-client postinst. Thanks to Laurent Bigonville for the hint. - -- Laurent Bigonville Sat, 26 Jan 2013 00:15:43 +0100 + -- Laurent Bigonville Sat, 26 Jan 2013 00:59:10 +0100 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/nut-client.tmpfiles b/debian/nut-client.tmpfiles new file mode 100644 index 0000000..bf195cf --- /dev/null +++ b/debian/nut-client.tmpfiles @@ -0,0 +1 @@ +d /run/nut 0770 root nut - - diff --git a/debian/nut-server.tmpfiles b/debian/nut-server.tmpfiles new file mode 100644 index 0000000..bf195cf --- /dev/null +++ b/debian/nut-server.tmpfiles @@ -0,0 +1 @@ +d /run/nut 0770 root nut - - diff --git a/debian/rules b/debian/rules index 2d6ca9e..425a353 100755 --- a/debian/rules +++ b/debian/rules @@ -80,6 +80,12 @@ ifeq (linux,$(DEB_HOST_ARCH_OS)) install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-server.service \ $(CURDIR)/debian/nut-server/lib/systemd/system/nut-server.service + # Install tmpfiles config file to create /run/nut directory + install -m 644 -D $(CURDIR)/debian/nut-client.tmpfiles \ + $(CURDIR)/debian/nut-client/usr/lib/tmpfiles.d/nut-client.conf + install -m 644 -D $(CURDIR)/debian/nut-server.tmpfiles \ + $(CURDIR)/debian/nut-server/usr/lib/tmpfiles.d/nut-server.conf + # This is needed to avoid services to be started twice (systemd and LSB) mkdir -p $(CURDIR)/debian/nut-client/etc/systemd/system/ ln -s /lib/systemd/system/nut-monitor.service \ From 2f87baa5a4330ede008dda35e8dfdaad05ed8c12 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 26 Jan 2013 01:12:41 +0100 Subject: [PATCH 122/300] Do not hardcode full path to restorecon Use which command to detect if the executable is present or not --- debian/nut-client.postinst | 4 +++- debian/nut-server.postinst | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/nut-client.postinst b/debian/nut-client.postinst index bac6721..4b04850 100644 --- a/debian/nut-client.postinst +++ b/debian/nut-client.postinst @@ -39,7 +39,9 @@ case "$1" in if [ -d /var/run/nut ] ; then chown root:nut /var/run/nut chmod 770 /var/run/nut - [ -x /sbin/restorecon ] && /sbin/restorecon /var/run/nut + if which restorecon >/dev/null 2>&1; then + restorecon /var/run/nut + fi fi if dpkg --compare-versions "$2" le "2.6.4-2~" && diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index 4a718aa..3322126 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -39,7 +39,9 @@ case "$1" in if [ -d /var/run/nut ] ; then chown root:nut /var/run/nut chmod 770 /var/run/nut - [ -x /sbin/restorecon ] && /sbin/restorecon /var/run/nut + if which restorecon >/dev/null 2>&1; then + restorecon /var/run/nut + fi fi # make sure that /var/lib/nut has the correct permissions and ownerships From e8e497bcf43557ff8936587baab97a935f066c83 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 31 Jan 2013 21:51:37 +0100 Subject: [PATCH 123/300] Release to experimental --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7fbb256..91f6766 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.6.5-2) UNRELEASED; urgency=low +nut (2.6.5-2) experimental; urgency=low [ Laurent Bigonville ] * debian/control: Move the nut-monitor Suggests from nut-server to @@ -22,7 +22,7 @@ nut (2.6.5-2) UNRELEASED; urgency=low * Also remove /etc/init.d/nut in nut-client postinst. Thanks to Laurent Bigonville for the hint. - -- Laurent Bigonville Sat, 26 Jan 2013 00:59:10 +0100 + -- Laurent Bigonville Thu, 31 Jan 2013 21:51:31 +0100 nut (2.6.5-1) experimental; urgency=low From 623a7f2f699fa33ad150b9230fbe7a0f4c8aaf1a Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 14 May 2013 18:04:58 +0200 Subject: [PATCH 124/300] Move libupsclient1 package to libs Section * debian/control: - Move libupsclient1 package to libs Section --- debian/changelog | 7 +++++++ debian/control | 1 + 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 91f6766..01c2e19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nut (2.6.5-3) UNRELEASED; urgency=low + + * debian/control: + - Move libupsclient1 package to libs Section + + -- Laurent Bigonville Tue, 14 May 2013 18:04:04 +0200 + nut (2.6.5-2) experimental; urgency=low [ Laurent Bigonville ] diff --git a/debian/control b/debian/control index 81b21f6..097a738 100644 --- a/debian/control +++ b/debian/control @@ -161,6 +161,7 @@ Description: network UPS tools - documentation This package contains FAQ, user, developer and packager documentation. Package: libupsclient1 +Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} From 8e1c6bce0dd9d6fbac2d3c147c89c3f6c7c10ccf Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 14 May 2013 18:13:57 +0200 Subject: [PATCH 125/300] Add libgd-dev to the Build-Depends, keep the other alternatives to ease the backports --- debian/changelog | 2 ++ debian/control | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 01c2e19..0bb09b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ nut (2.6.5-3) UNRELEASED; urgency=low * debian/control: - Move libupsclient1 package to libs Section + - Add libgd-dev to the Build-Depends, keep the other alternatives to ease + the backports -- Laurent Bigonville Tue, 14 May 2013 18:04:04 +0200 diff --git a/debian/control b/debian/control index 097a738..0c84526 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: Arnaud Quette Uploaders: Laurent Bigonville Build-Depends: debhelper (>= 8.1.3), cdbs (>= 0.4.93~), - libgd2-xpm-dev | libgd2-noxpm-dev, + libgd-dev | libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libneon27-gnutls-dev | libneon27-dev, From fc374550b2985c8eb8b398ddd6bb04e4b498233a Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 18 Jun 2013 10:33:13 +0200 Subject: [PATCH 126/300] Bump Standards-Version to 3.9.4 (no further changes) --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0bb09b5..dfd730e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ nut (2.6.5-3) UNRELEASED; urgency=low - Move libupsclient1 package to libs Section - Add libgd-dev to the Build-Depends, keep the other alternatives to ease the backports + - Bump Standards-Version to 3.9.4 (no further changes) -- Laurent Bigonville Tue, 14 May 2013 18:04:04 +0200 diff --git a/debian/control b/debian/control index 0c84526..5107a95 100644 --- a/debian/control +++ b/debian/control @@ -18,7 +18,7 @@ Build-Depends-Indep: asciidoc (>= 8.6.3), docbook-xsl, dblatex (>= 0.2.5), libxml2-utils -Standards-Version: 3.9.3 +Standards-Version: 3.9.4 Homepage: http://www.networkupstools.org/ Vcs-Browser: http://git.debian.org/?p=collab-maint/nut.git;a=summary Vcs-Git: git://git.debian.org/git/collab-maint/nut.git From d5939980c129647e6e7d7c528247a771ab8abaf0 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 18 Jun 2013 10:35:08 +0200 Subject: [PATCH 127/300] Add autotools-dev to the build-dependencies so config.{guess,sub} are getting updated during build --- debian/changelog | 2 ++ debian/control | 1 + 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index dfd730e..77cf6ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ nut (2.6.5-3) UNRELEASED; urgency=low - Add libgd-dev to the Build-Depends, keep the other alternatives to ease the backports - Bump Standards-Version to 3.9.4 (no further changes) + - Add autotools-dev to the build-dependencies so config.{guess,sub} are + getting updated during build -- Laurent Bigonville Tue, 14 May 2013 18:04:04 +0200 diff --git a/debian/control b/debian/control index 5107a95..7fd2128 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Maintainer: Arnaud Quette Uploaders: Laurent Bigonville Build-Depends: debhelper (>= 8.1.3), cdbs (>= 0.4.93~), + autotools-dev, libgd-dev | libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), From c51fe5965ab7fb49e047995b4548df24df80d41d Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 18 Jun 2013 10:36:07 +0200 Subject: [PATCH 128/300] Use canonical URL for the VCS-* fields --- debian/changelog | 1 + debian/control | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 77cf6ca..4d5c627 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ nut (2.6.5-3) UNRELEASED; urgency=low - Bump Standards-Version to 3.9.4 (no further changes) - Add autotools-dev to the build-dependencies so config.{guess,sub} are getting updated during build + - Use canonical URL for the VCS-* fields -- Laurent Bigonville Tue, 14 May 2013 18:04:04 +0200 diff --git a/debian/control b/debian/control index 7fd2128..475f3eb 100644 --- a/debian/control +++ b/debian/control @@ -21,8 +21,8 @@ Build-Depends-Indep: asciidoc (>= 8.6.3), libxml2-utils Standards-Version: 3.9.4 Homepage: http://www.networkupstools.org/ -Vcs-Browser: http://git.debian.org/?p=collab-maint/nut.git;a=summary -Vcs-Git: git://git.debian.org/git/collab-maint/nut.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/nut.git;a=summary +Vcs-Git: git://anonscm.debian.org/collab-maint/nut.git X-Python-Version: >= 2.5 Package: nut From cc689212ad818533def33a61693d7a22040f444f Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 18 Jun 2013 21:21:00 +0200 Subject: [PATCH 129/300] debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done by postinst during upgrade from lenny to squeeze (Really closes: #677054) Thanks to Andreas Beckmann for the review. --- debian/changelog | 6 ++++++ debian/nut-client.preinst | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4d5c627..8f3daf2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ nut (2.6.5-3) UNRELEASED; urgency=low + [ Laurent Bigonville ] * debian/control: - Move libupsclient1 package to libs Section - Add libgd-dev to the Build-Depends, keep the other alternatives to ease @@ -9,6 +10,11 @@ nut (2.6.5-3) UNRELEASED; urgency=low getting updated during build - Use canonical URL for the VCS-* fields + [ Ivo De Decker ] + * debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done + by postinst during upgrade from lenny to squeeze (Really closes: #677054) + Thanks to Andreas Beckmann for the review. + -- Laurent Bigonville Tue, 14 May 2013 18:04:04 +0200 nut (2.6.5-2) experimental; urgency=low diff --git a/debian/nut-client.preinst b/debian/nut-client.preinst index 2107da1..fa1bd01 100644 --- a/debian/nut-client.preinst +++ b/debian/nut-client.preinst @@ -4,6 +4,15 @@ set -e # Revert /etc/nut/nut.conf mangling done by older versions of the postinst # See #677054 +# changed configfile created by a fresh install in lenny, upgraded to squeeze +if [ "$1" = "install" -o "$1" = "upgrade" ] \ + && dpkg --compare-versions "$2" lt "2.6.4-2" \ + && [ -f /etc/nut/nut.conf ] \ + && [ "`md5sum /etc/nut/nut.conf | cut -d ' ' -f 1`" = 331cca39153f451c2968f4b734c1cf3f ]; then + sed -i '29,$ d' /etc/nut/nut.conf +fi + +# changed configfile created by a fresh install in squeeze if [ "$1" = "install" -o "$1" = "upgrade" ] \ && dpkg --compare-versions "$2" lt "2.6.4-2" \ && [ -f /etc/nut/nut.conf ] \ From f313323738fd5bf05cd49c0b80b1f21783e8602b Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 18 Jun 2013 21:52:31 +0200 Subject: [PATCH 130/300] Added dep-8-tests to improve QA (from Ubuntu, closes: #708130) --- debian/changelog | 3 +- debian/tests/control | 3 + debian/tests/nut | 6 + debian/tests/test-nut.py | 422 ++++++++++++++ debian/tests/testlib.py | 1144 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 1577 insertions(+), 1 deletion(-) create mode 100644 debian/tests/control create mode 100644 debian/tests/nut create mode 100644 debian/tests/test-nut.py create mode 100644 debian/tests/testlib.py diff --git a/debian/changelog b/debian/changelog index 8f3daf2..411a8be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,13 +9,14 @@ nut (2.6.5-3) UNRELEASED; urgency=low - Add autotools-dev to the build-dependencies so config.{guess,sub} are getting updated during build - Use canonical URL for the VCS-* fields + * Added dep-8-tests to improve QA (from Ubuntu, closes: #708130) [ Ivo De Decker ] * debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done by postinst during upgrade from lenny to squeeze (Really closes: #677054) Thanks to Andreas Beckmann for the review. - -- Laurent Bigonville Tue, 14 May 2013 18:04:04 +0200 + -- Laurent Bigonville Tue, 18 Jun 2013 21:49:12 +0200 nut (2.6.5-2) experimental; urgency=low diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..b4bdda5 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: nut +Depends: python-unit, nut-server, nut-client +Restrictions: needs-root diff --git a/debian/tests/nut b/debian/tests/nut new file mode 100644 index 0000000..598cde8 --- /dev/null +++ b/debian/tests/nut @@ -0,0 +1,6 @@ +#!/bin/bash +#------------ +# Testing nut +#------------ +set -e +python `dirname $0`/test-nut.py 2>&1 diff --git a/debian/tests/test-nut.py b/debian/tests/test-nut.py new file mode 100644 index 0000000..c34256c --- /dev/null +++ b/debian/tests/test-nut.py @@ -0,0 +1,422 @@ +#!/usr/bin/python +# +# test-nut.py quality assurance test script +# Copyright (C) 2008-2011 Arnaud Quette +# Copyright (C) 2012 Jamie Strandboge +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3, +# as published by the Free Software Foundation. +# +# 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, see . +# + +''' + *** IMPORTANT *** + DO NOT RUN ON A PRODUCTION SERVER. + *** IMPORTANT *** + + How to run (up to natty): + $ sudo apt-get -y install python-unit nut + $ sudo ./test-nut.py -v + + How to run (oneiric+): + $ sudo apt-get -y install python-unit nut-server nut-client + $ sudo ./test-nut.py -v + + NOTE: + - NUT architecture (helps understanding): + http://www.networkupstools.org/docs/developer-guide.chunked/ar01s02.html#_the_layering + + - These tests only validate the NUT software framework itself (communication + between the drivers, server and client layers ; events propagation and + detection). The critical part of NUT, Ie the driver layer which + communicate with actual devices, can only be tested with real hardware! + + - These tests use the NUT simulation driver (dummy-ups) to emulate real + hardware behavior, and generate events (power failure, low battery, ...). + + TODO: + - improve test duration, by reworking NutTestCommon._setUp() and the way + daemons are started (ie, always) + - more events testing (upsmon / upssched) + - test syslog and wall output + - test UPS redundancy + - test Powerchain (once available!) + - test AppArmor (once available!) + - add hardware testing as Private tests? + - load a .dev file, and test a full output + + QA INFORMATION: + - NUT provides "make check" and "make distcheck" in its source distribution + - NUT provides Quality Assurance information, to track all efforts: + http://www.networkupstools.org/nut-qa.html +''' + +# QRT-Packages: python-unit netcat-openbsd +# QRT-Alternates: nut-server nut +# QRT-Alternates: nut-client nut +# nut-dev is needed for the dummy driver on hardy +# QRT-Alternates: nut-dev +# QRT-Privilege: root +# QRT-Depends: + + +import unittest, subprocess, sys, os, time +import tempfile +import testlib + +use_private = True +try: + from private.qrt.nut import PrivateNutTest +except ImportError: + class PrivateNutTest(object): + '''Empty class''' + print >>sys.stdout, "Skipping private tests" + + +class NutTestCommon(testlib.TestlibCase): + '''Common functions''' + + # FIXME: initscript will be splitted into nut-server and nut-client + # (Debian bug #634858) + initscript = "/etc/init.d/nut-server" + hosts_file = "/etc/hosts" + powerdownflag = "/etc/killpower" + shutdowncmd = "/tmp/shutdowncmd" + notifyscript = "/tmp/nutifyme" + notifylog = "/tmp/notify.log" + + def _setUp(self): + '''Set up prior to each test_* function''' + '''We generate a NUT config using the dummmy-ups driver + and standard settings for local monitoring + ''' + self.tmpdir = "" + self.rundir = "/var/run/nut" + testlib.cmd(['/bin/rm -f' + self.powerdownflag]) + + testlib.config_replace('/etc/nut/ups.conf', ''' +[dummy-dev1] + driver = dummy-ups + port = dummy.dev + desc = "simulation device" + ''') + + if self.lsb_release['Release'] <= 8.04: + testlib.config_replace('/etc/nut/upsd.conf', ''' +ACL dummy-net 127.0.0.1/8 +ACL dummy-net2 ::1/64 +ACL all 0.0.0.0/0 +ACCEPT dummy-net dummy-net2 +REJECT all + ''') + else: + testlib.config_replace('/etc/nut/upsd.conf', '''# just to touch the file''') + + extra_cfgs = '' + if self.lsb_release['Release'] <= 8.04: + extra_cfgs = ''' allowfrom = dummy-net dummy-net2 +''' + testlib.config_replace('/etc/nut/upsd.users', ''' +[admin] + password = dummypass + actions = SET + instcmds = ALL +%s +[monuser] + password = dummypass + upsmon master +%s ''' %(extra_cfgs, extra_cfgs)) + + testlib.config_replace('/etc/nut/upsmon.conf', ''' +MONITOR dummy-dev1@localhost 1 monuser dummy-pass master +MINSUPPLIES 1 +SHUTDOWNCMD "/usr/bin/touch ''' + self.shutdowncmd + '"\n' +'''POWERDOWNFLAG ''' + self.powerdownflag + '\n' +''' +NOTIFYCMD ''' + self.notifyscript + '\n' +''' +NOTIFYFLAG ONLINE SYSLOG+EXEC +NOTIFYFLAG ONBATT SYSLOG+EXEC +NOTIFYFLAG LOWBATT SYSLOG+EXEC +NOTIFYFLAG FSD SYSLOG+EXEC +# NOTIFYFLAG COMMOK SYSLOG+EXEC +# NOTIFYFLAG COMMBAD SYSLOG+EXEC +NOTIFYFLAG SHUTDOWN SYSLOG+EXEC +# NOTIFYFLAG REPLBATT SYSLOG+EXEC +# NOTIFYFLAG NOCOMM SYSLOG+EXEC +# NOTIFYFLAG NOPARENT SYSLOG+EXEC + +# Shorten test duration by: +# Speeding up polling frequency +POLLFREQ 2 +# And final wait delay +FINALDELAY 0 +''' +) + + testlib.create_fill(self.notifyscript, ''' +#! /bin/bash +echo "$*" > ''' + self.notifylog + '\n', mode=0755) + + # dummy-ups absolutely needs a data file, even if empty + testlib.config_replace('/etc/nut/dummy.dev', ''' +ups.mfr: Dummy Manufacturer +ups.model: Dummy UPS +ups.status: OL +# Set a big enough timer to avoid value reset, due to reading loop +TIMER 600 + ''') + + testlib.config_replace('/etc/nut/nut.conf', '''MODE=standalone''') + + # Add known friendly IP names for localhost v4 and v6 + # FIXME: find a way to determine if v4 / v6 are enabled, and a way to + # get v4 / v6 names + testlib.config_replace(self.hosts_file, '''# +127.0.0.1 localv4 +::1 localv6 +''', append=True) + + if self.lsb_release['Release'] <= 8.04: + testlib.config_replace('/etc/default/nut', '''# +START_UPSD=yes +UPSD_OPTIONS="" +START_UPSMON=yes +UPSMON_OPTIONS="" +''', append=False) + + # Start the framework + self._restart() + + def _tearDown(self): + '''Clean up after each test_* function''' + self._stop() + time.sleep(2) + os.unlink('/etc/nut/ups.conf') + os.unlink('/etc/nut/upsd.conf') + os.unlink('/etc/nut/upsd.users') + os.unlink('/etc/nut/upsmon.conf') + os.unlink('/etc/nut/dummy.dev') + os.unlink('/etc/nut/nut.conf') + testlib.config_restore('/etc/nut/ups.conf') + testlib.config_restore('/etc/nut/upsd.conf') + testlib.config_restore('/etc/nut/upsd.users') + testlib.config_restore('/etc/nut/upsmon.conf') + testlib.config_restore('/etc/nut/dummy.dev') + testlib.config_restore('/etc/nut/nut.conf') + if os.path.exists(self.notifyscript): + os.unlink(self.notifyscript) + if os.path.exists(self.shutdowncmd): + os.unlink(self.shutdowncmd) + testlib.config_restore(self.hosts_file) + if self.lsb_release['Release'] <= 8.04: + testlib.config_restore('/etc/default/nut') + + if os.path.exists(self.tmpdir): + testlib.recursive_rm(self.tmpdir) + + # this is needed because of the potentially hung upsd process in the + # CVE-2012-2944 test + testlib.cmd(['killall', 'upsd']) + testlib.cmd(['killall', '-9', 'upsd']) + + def _start(self): + '''Start NUT''' + rc, report = testlib.cmd([self.initscript, 'start']) + expected = 0 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + self.assertEquals(expected, rc, result + report) + time.sleep(2) + + def _stop(self): + '''Stop NUT''' + rc, report = testlib.cmd([self.initscript, 'stop']) + expected = 0 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + self.assertEquals(expected, rc, result + report) + + def _reload(self): + '''Reload NUT''' + rc, report = testlib.cmd([self.initscript, 'force-reload']) + expected = 0 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + self.assertEquals(expected, rc, result + report) + + def _restart(self): + '''Restart NUT''' + self._stop() + time.sleep(2) + self._start() + + def _status(self): + '''NUT Status''' + rc, report = testlib.cmd([self.initscript, 'status']) + expected = 0 + if self.lsb_release['Release'] <= 8.04: + self._skipped("init script does not support status command") + expected = 1 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + self.assertEquals(expected, rc, result + report) + + def _testDaemons(self, daemons): + '''Daemons running''' + for d in daemons: + # A note on the driver pid file: its name is + # -.pid + # ex: dummy-dev1-dummy-ups.pid + if d == 'dummy-ups' : + pidfile = os.path.join(self.rundir, 'dummy-ups-dummy-dev1.pid') + else : + pidfile = os.path.join(self.rundir, d + '.pid') + warning = "Could not find pidfile '" + pidfile + "'" + self.assertTrue(os.path.exists(pidfile), warning) + self.assertTrue(testlib.check_pidfile(d, pidfile), d + ' is not running') + + def _nut_setvar(self, var, value): + '''Test upsrw''' + rc, report = testlib.cmd(['/bin/upsrw', '-s', var + '=' + value, + '-u', 'admin' , '-p', 'dummypass', 'dummy-dev1@localhost']) + self.assertTrue(rc == 0, 'upsrw: ' + report) + return rc,report + + +class BasicTest(NutTestCommon, PrivateNutTest): + '''Test basic NUT functionalities''' + + def setUp(self): + '''Setup mechanisms''' + NutTestCommon._setUp(self) + + def tearDown(self): + '''Shutdown methods''' + NutTestCommon._tearDown(self) + + def test_daemons_service(self): + '''Test daemons using "service status"''' + self._status() + + def test_daemons_pid(self): + '''Test daemons using PID files''' + # upsmon does not work because ups-client is still missing + daemons = [ 'dummy-ups', 'upsd'] + self._testDaemons(daemons) + + def test_upsd_IPv4(self): + '''Test upsd IPv4 reachability''' + rc, report = testlib.cmd(['/bin/upsc', '-l', 'localv4']) + self.assertTrue('dummy-dev1' in report, 'dummy-dev1 should be present in device(s) listing: ' + report) + + def test_upsd_IPv6(self): + '''Test upsd IPv6 reachability''' + rc, report = testlib.cmd(['/bin/upsc', '-l', 'localv6']) + self.assertTrue('dummy-dev1' in report, 'dummy-dev1 should be present in device(s) listing: ' + report) + + def test_upsc_device_list(self): + '''Test NUT client interface (upsc): device(s) listing''' + rc, report = testlib.cmd(['/bin/upsc', '-L']) + self.assertTrue('dummy-dev1: simulation device' in report, 'dummy-dev1 should be present in device(s) listing: ' + report) + + def _test_upsc_status(self): + '''Test NUT client interface (upsc): data access''' + rc, report = testlib.cmd(['/bin/upsc', 'dummy-dev1', 'ups.status']) + self.assertTrue('OL' in report, 'UPS Status: ' + report + 'should be OL') + + #def test_upsc_powerchain(self): + # '''Test NUT client interface (upsc): Powerchain(s) listing''' + # rc, report = testlib.cmd(['/bin/upsc', '-p']) + # Result == Main ; dummy-dev1 ; $hostname + # self.assertTrue('dummy-dev1' in report, 'dummy-dev1 should be present in device(s) listing: ' + report) + + def test_upsrw(self): + '''Test upsrw''' + # Set ups.status to OB (On Battery)... + self._nut_setvar('ups.model', 'Test') + time.sleep(2) + # and check the result on the client side + rc, report = testlib.cmd(['/bin/upsc', 'dummy-dev1@localhost', 'ups.model']) + self.assertTrue('Test' in report, 'UPS Model: ' + report + 'should be Test') + + # FIXME: need a simulation counterpart, not yet implemented + #def test_upscmd(self): + # '''Test upscmd''' + + def test_upsmon_notif(self): + '''Test upsmon notifications''' + # Set ups.status to OB (On Battery)... + self._nut_setvar('ups.status', 'OB') + time.sleep(1) + # and check the result on the client side + rc, report = testlib.cmd(['/bin/upsc', 'dummy-dev1@localhost', 'ups.status']) + self.assertTrue('OB' in report, 'UPS Status: ' + report + 'should be OB') + + #def test_upsmon_shutdown(self): + # '''Test upsmon basic shutdown (single UPS, low battery status)''' + # self._nut_setvar('ups.status', 'OB LB') + # time.sleep(2) + # # and check the result on the client side + # rc, report = testlib.cmd(['/bin/upsc', 'dummy-dev1@localhost', 'ups.status']) + # self.assertTrue('OB LB' in report, 'UPS Status: ' + report + 'should be OB LB') + # # FIXME: improve with a 2 sec loop * 5 tries + # time.sleep(3) + # # Check for powerdownflag and shutdowncmd (needed for halt!) + # # FIXME: replace by a call to 'upsmon -K' + # self.assertTrue(os.path.exists(self.powerdownflag), 'POWERDOWNFLAG has not been set!') + # self.assertTrue(os.path.exists(self.shutdowncmd), 'SHUTDOWNCMD has not been executed!') + + def test_CVE_2012_2944(self): + '''Test CVE-2012-2944''' + self.tmpdir = tempfile.mkdtemp(dir='/tmp', prefix="testlib-") + # First send bad input. We need to do this in a script because python + # functions don't like our embedded NULs + script = os.path.join(self.tmpdir, 'script.sh') + contents = '''#!/bin/sh +printf '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\n' | nc -q 1 127.0.0.1 3493 +sleep 1 +dd if=/dev/urandom count=64 | nc -q 1 127.0.0.1 3493 +''' + testlib.create_fill(script, contents, mode=0755) + rc, report = testlib.cmd([script]) + + # It should not have crashed. Let's see if it did + self._testDaemons(['upsd']) + self.assertTrue('ERR UNKNOWN-COMMAND' in report, "Could not find 'ERR UNKNOWN-COMMAND' in:\n%s" % report) + + # This CVE may also result in a hung upsd. Try to kill it, if it is + # still around, it is hung + testlib.cmd(['killall', 'upsd']) + pidfile = os.path.join(self.rundir, 'upsd.pid') + self.assertFalse(os.path.exists(pidfile), "Found %s" % pidfile) + self.assertFalse(testlib.check_pidfile('upsd', pidfile), 'upsd is hung') + #subprocess.call(['bash']) + +# FIXME +#class AdvancedTest(NutTestCommon, PrivateNutTest): +# '''Test advanced NUT functionalities''' + +if __name__ == '__main__': + + suite = unittest.TestSuite() + # more configurable + if (len(sys.argv) == 1 or sys.argv[1] == '-v'): + suite.addTest(unittest.TestLoader().loadTestsFromTestCase(BasicTest)) + + # Pull in private tests + #if use_private: + # suite.addTest(unittest.TestLoader().loadTestsFromTestCase(MyPrivateTest)) + + else: + print '''Usage: + test-nut.py [-v] basic tests +''' + sys.exit(1) + rc = unittest.TextTestRunner(verbosity=2).run(suite) + if not rc.wasSuccessful(): + sys.exit(1) diff --git a/debian/tests/testlib.py b/debian/tests/testlib.py new file mode 100644 index 0000000..fe0a622 --- /dev/null +++ b/debian/tests/testlib.py @@ -0,0 +1,1144 @@ +# +# testlib.py quality assurance test script +# Copyright (C) 2008-2011 Canonical Ltd. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License. +# +# This library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this program. If not, see +# . +# + +'''Common classes and functions for package tests.''' + +import string, random, crypt, subprocess, pwd, grp, signal, time, unittest, tempfile, shutil, os, os.path, re, glob +import sys, socket, gzip +from stat import * +from encodings import string_escape + +import warnings +warnings.filterwarnings('ignore', message=r'.*apt_pkg\.TagFile.*', category=DeprecationWarning) +try: + import apt_pkg + apt_pkg.InitSystem(); +except: + # On non-Debian system, fall back to simple comparison without debianisms + class apt_pkg(object): + def VersionCompare(one, two): + list_one = one.split('.') + list_two = two.split('.') + while len(list_one)>0 and len(list_two)>0: + if list_one[0] > list_two[0]: + return 1 + if list_one[0] < list_two[0]: + return -1 + list_one.pop(0) + list_two.pop(0) + return 0 + +bogus_nxdomain = "208.69.32.132" + +# http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/2009-07-02-python-sigpipe.html +# This is needed so that the subprocesses that produce endless output +# actually quit when the reader goes away. +import signal +def subprocess_setup(): + # Python installs a SIGPIPE handler by default. This is usually not what + # non-Python subprocesses expect. + signal.signal(signal.SIGPIPE, signal.SIG_DFL) + +class TimedOutException(Exception): + def __init__(self, value = "Timed Out"): + self.value = value + def __str__(self): + return repr(self.value) + +def _restore_backup(path): + pathbackup = path + '.autotest' + if os.path.exists(pathbackup): + shutil.move(pathbackup, path) + +def _save_backup(path): + pathbackup = path + '.autotest' + if os.path.exists(path) and not os.path.exists(pathbackup): + shutil.copy2(path, pathbackup) + # copy2 does not copy ownership, so do it here. + # Reference: http://docs.python.org/library/shutil.html + a = os.stat(path) + os.chown(pathbackup, a[4], a[5]) + +def config_copydir(path): + if os.path.exists(path) and not os.path.isdir(path): + raise OSError, "'%s' is not a directory" % (path) + _restore_backup(path) + + pathbackup = path + '.autotest' + if os.path.exists(path): + shutil.copytree(path, pathbackup, symlinks=True) + +def config_replace(path,contents,append=False): + '''Replace (or append) to a config file''' + _restore_backup(path) + if os.path.exists(path): + _save_backup(path) + if append: + contents = file(path).read() + contents + open(path, 'w').write(contents) + +def config_comment(path, field): + _save_backup(path) + contents = "" + for line in file(path): + if re.search("^\s*%s\s*=" % (field), line): + line = "#" + line + contents += line + + open(path+'.new', 'w').write(contents) + os.rename(path+'.new', path) + +def config_set(path, field, value, spaces=True): + _save_backup(path) + contents = "" + if spaces==True: + setting = '%s = %s\n' % (field, value) + else: + setting = '%s=%s\n' % (field, value) + found = False + for line in file(path): + if re.search("^\s*%s\s*=" % (field), line): + found = True + line = setting + contents += line + if not found: + contents += setting + + open(path+'.new', 'w').write(contents) + os.rename(path+'.new', path) + +def config_patch(path, patch, depth=1): + '''Patch a config file''' + _restore_backup(path) + _save_backup(path) + + handle, name = mkstemp_fill(patch) + rc = subprocess.call(['/usr/bin/patch', '-p%s' %(depth), path], stdin=handle, stdout=subprocess.PIPE) + os.unlink(name) + if rc != 0: + raise Exception("Patch failed") + +def config_restore(path): + '''Rename a replaced config file back to its initial state''' + _restore_backup(path) + +def timeout(secs, f, *args): + def handler(signum, frame): + raise TimedOutException() + + old = signal.signal(signal.SIGALRM, handler) + result = None + signal.alarm(secs) + try: + result = f(*args) + finally: + signal.alarm(0) + signal.signal(signal.SIGALRM, old) + + return result + +def require_nonroot(): + if os.geteuid() == 0: + print >>sys.stderr, "This series of tests should be run as a regular user with sudo access, not as root." + sys.exit(1) + +def require_root(): + if os.geteuid() != 0: + print >>sys.stderr, "This series of tests should be run with root privileges (e.g. via sudo)." + sys.exit(1) + +def require_sudo(): + if os.geteuid() != 0 or os.environ.get('SUDO_USER', None) == None: + print >>sys.stderr, "This series of tests must be run under sudo." + sys.exit(1) + if os.environ['SUDO_USER'] == 'root': + print >>sys.stderr, 'Please run this test using sudo from a regular user. (You ran sudo from root.)' + sys.exit(1) + +def random_string(length,lower=False): + '''Return a random string, consisting of ASCII letters, with given + length.''' + + s = '' + selection = string.letters + if lower: + selection = string.lowercase + maxind = len(selection)-1 + for l in range(length): + s += selection[random.randint(0, maxind)] + return s + +def mkstemp_fill(contents,suffix='',prefix='testlib-',dir=None): + '''As tempfile.mkstemp does, return a (file, name) pair, but with + prefilled contents.''' + + handle, name = tempfile.mkstemp(suffix=suffix,prefix=prefix,dir=dir) + os.close(handle) + handle = file(name,"w+") + handle.write(contents) + handle.flush() + handle.seek(0) + + return handle, name + +def create_fill(path, contents, mode=0644): + '''Safely create a page''' + # make the temp file in the same dir as the destination file so we + # don't get invalid cross-device link errors when we rename + handle, name = mkstemp_fill(contents, dir=os.path.dirname(path)) + handle.close() + os.rename(name, path) + os.chmod(path, mode) + +def login_exists(login): + '''Checks whether the given login exists on the system.''' + + try: + pwd.getpwnam(login) + return True + except KeyError: + return False + +def group_exists(group): + '''Checks whether the given login exists on the system.''' + + try: + grp.getgrnam(group) + return True + except KeyError: + return False + +def recursive_rm(dirPath, contents_only=False): + '''recursively remove directory''' + names = os.listdir(dirPath) + for name in names: + path = os.path.join(dirPath, name) + if os.path.islink(path) or not os.path.isdir(path): + os.unlink(path) + else: + recursive_rm(path) + if contents_only == False: + os.rmdir(dirPath) + +def check_pidfile(exe, pidfile): + '''Checks if pid in pidfile is running''' + if not os.path.exists(pidfile): + return False + + # get the pid + try: + fd = open(pidfile, 'r') + pid = fd.readline().rstrip('\n') + fd.close() + except: + return False + + return check_pid(exe, pid) + +def check_pid(exe, pid): + '''Checks if pid is running''' + cmdline = "/proc/%s/cmdline" % (str(pid)) + if not os.path.exists(cmdline): + return False + + # get the command line + try: + fd = open(cmdline, 'r') + tmp = fd.readline().split('\0') + fd.close() + except: + return False + + # this allows us to match absolute paths or just the executable name + if re.match('^' + exe + '$', tmp[0]) or \ + re.match('.*/' + exe + '$', tmp[0]) or \ + re.match('^' + exe + ': ', tmp[0]) or \ + re.match('^\(' + exe + '\)', tmp[0]): + return True + + return False + +def check_port(port, proto, ver=4): + '''Check if something is listening on the specified port. + WARNING: for some reason this does not work with a bind mounted /proc + ''' + assert (port >= 1) + assert (port <= 65535) + assert (proto.lower() == "tcp" or proto.lower() == "udp") + assert (ver == 4 or ver == 6) + + fn = "/proc/net/%s" % (proto) + if ver == 6: + fn += str(ver) + + rc, report = cmd(['cat', fn]) + assert (rc == 0) + + hport = "%0.4x" % port + + if re.search(': [0-9a-f]{8}:%s [0-9a-f]' % str(hport).lower(), report.lower()): + return True + return False + +def get_arch(): + '''Get the current architecture''' + rc, report = cmd(['uname', '-m']) + assert (rc == 0) + return report.strip() + +def get_memory(): + '''Gets total ram and swap''' + meminfo = "/proc/meminfo" + memtotal = 0 + swaptotal = 0 + if not os.path.exists(meminfo): + return (False, False) + + try: + fd = open(meminfo, 'r') + for line in fd.readlines(): + splitline = line.split() + if splitline[0] == 'MemTotal:': + memtotal = int(splitline[1]) + elif splitline[0] == 'SwapTotal:': + swaptotal = int(splitline[1]) + fd.close() + except: + return (False, False) + + return (memtotal,swaptotal) + +def is_running_in_vm(): + '''Check if running under a VM''' + # add other virtualization environments here + for search in ['QEMU Virtual CPU']: + rc, report = cmd_pipe(['dmesg'], ['grep', search]) + if rc == 0: + return True + return False + +def ubuntu_release(): + '''Get the Ubuntu release''' + f = "/etc/lsb-release" + try: + size = os.stat(f)[ST_SIZE] + except: + return "UNKNOWN" + + if size > 1024*1024: + raise IOError, 'Could not open "%s" (too big)' % f + + try: + fh = open("/etc/lsb-release", 'r') + except: + raise + + lines = fh.readlines() + fh.close() + + pat = re.compile(r'DISTRIB_CODENAME') + for line in lines: + if pat.search(line): + return line.split('=')[1].rstrip('\n').rstrip('\r') + + return "UNKNOWN" + +def cmd(command, input = None, stderr = subprocess.STDOUT, stdout = subprocess.PIPE, stdin = None, timeout = None): + '''Try to execute given command (array) and return its stdout, or return + a textual error if it failed.''' + + try: + sp = subprocess.Popen(command, stdin=stdin, stdout=stdout, stderr=stderr, close_fds=True, preexec_fn=subprocess_setup) + except OSError, e: + return [127, str(e)] + + out, outerr = sp.communicate(input) + # Handle redirection of stdout + if out == None: + out = '' + # Handle redirection of stderr + if outerr == None: + outerr = '' + return [sp.returncode,out+outerr] + +def cmd_pipe(command1, command2, input = None, stderr = subprocess.STDOUT, stdin = None): + '''Try to pipe command1 into command2.''' + try: + sp1 = subprocess.Popen(command1, stdin=stdin, stdout=subprocess.PIPE, stderr=stderr, close_fds=True) + sp2 = subprocess.Popen(command2, stdin=sp1.stdout, stdout=subprocess.PIPE, stderr=stderr, close_fds=True) + except OSError, e: + return [127, str(e)] + + out = sp2.communicate(input)[0] + return [sp2.returncode,out] + +def cwd_has_enough_space(cdir, total_bytes): + '''Determine if the partition of the current working directory has 'bytes' + free.''' + rc, df_output = cmd(['df']) + result = 'Got exit code %d, expected %d\n' % (rc, 0) + if rc != 0: + return False + + kb = total_bytes / 1024 + + mounts = dict() + for line in df_output.splitlines(): + if '/' not in line: + continue + tmp = line.split() + mounts[tmp[5]] = int(tmp[3]) + + cdir = os.getcwd() + while cdir != '/': + if not mounts.has_key(cdir): + cdir = os.path.dirname(cdir) + continue + if kb < mounts[cdir]: + return True + else: + return False + + if kb < mounts['/']: + return True + + return False + +def get_md5(filename): + '''Gets the md5sum of the file specified''' + + (rc, report) = cmd(["/usr/bin/md5sum", "-b", filename]) + expected = 0 + assert (expected == rc) + + return report.split(' ')[0] + +def dpkg_compare_installed_version(pkg, check, version): + '''Gets the version for the installed package, and compares it to the + specified version. + ''' + (rc, report) = cmd(["/usr/bin/dpkg", "-s", pkg]) + assert (rc == 0) + assert ("Status: install ok installed" in report) + installed_version = "" + for line in report.splitlines(): + if line.startswith("Version: "): + installed_version = line.split()[1] + + assert (installed_version != "") + + (rc, report) = cmd(["/usr/bin/dpkg", "--compare-versions", installed_version, check, version]) + assert (rc == 0 or rc == 1) + if rc == 0: + return True + return False + +def prepare_source(source, builder, cached_src, build_src, patch_system): + '''Download and unpack source package, installing necessary build depends, + adjusting the permissions for the 'builder' user, and returning the + directory of the unpacked source. Patch system can be one of: + - cdbs + - dpatch + - quilt + - quiltv3 + - None (not the string) + + This is normally used like this: + + def setUp(self): + ... + self.topdir = os.getcwd() + self.cached_src = os.path.join(os.getcwd(), "source") + self.tmpdir = tempfile.mkdtemp(prefix='testlib', dir='/tmp') + self.builder = testlib.TestUser() + testlib.cmd(['chgrp', self.builder.login, self.tmpdir]) + os.chmod(self.tmpdir, 0775) + + def tearDown(self): + ... + self.builder = None + self.topdir = os.getcwd() + if os.path.exists(self.tmpdir): + testlib.recursive_rm(self.tmpdir) + + def test_suite_build(self): + ... + build_dir = testlib.prepare_source('foo', \ + self.builder, \ + self.cached_src, \ + os.path.join(self.tmpdir, \ + os.path.basename(self.cached_src)), + "quilt") + os.chdir(build_dir) + + # Example for typical build, adjust as necessary + print "" + print " make clean" + rc, report = testlib.cmd(['sudo', '-u', self.builder.login, 'make', 'clean']) + + print " configure" + rc, report = testlib.cmd(['sudo', '-u', self.builder.login, './configure', '--prefix=%s' % self.tmpdir, '--enable-debug']) + + print " make (will take a while)" + rc, report = testlib.cmd(['sudo', '-u', self.builder.login, 'make']) + + print " make check (will take a while)", + rc, report = testlib.cmd(['sudo', '-u', self.builder.login, 'make', 'check']) + expected = 0 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + self.assertEquals(expected, rc, result + report) + + def test_suite_cleanup(self): + ... + if os.path.exists(self.cached_src): + testlib.recursive_rm(self.cached_src) + + It is up to the caller to clean up cached_src and build_src (as in the + above example, often the build_src is in a tmpdir that is cleaned in + tearDown() and the cached_src is cleaned in a one time clean-up + operation (eg 'test_suite_cleanup()) which must be run after the build + suite test (obviously). + ''' + + # Make sure we have a clean slate + assert (os.path.exists(os.path.dirname(build_src))) + assert (not os.path.exists(build_src)) + + cdir = os.getcwd() + if os.path.exists(cached_src): + shutil.copytree(cached_src, build_src) + os.chdir(build_src) + else: + # Only install the build dependencies on the initial setup + rc, report = cmd(['apt-get','-y','--force-yes','build-dep',source]) + assert (rc == 0) + + os.makedirs(build_src) + os.chdir(build_src) + + # These are always needed + pkgs = ['build-essential', 'dpkg-dev', 'fakeroot'] + rc, report = cmd(['apt-get','-y','--force-yes','install'] + pkgs) + assert (rc == 0) + + rc, report = cmd(['apt-get','source',source]) + assert (rc == 0) + shutil.copytree(build_src, cached_src) + + unpacked_dir = os.path.join(build_src, glob.glob('%s-*' % source)[0]) + + # Now apply the patches. Do it here so that we don't mess up our cached + # sources. + os.chdir(unpacked_dir) + assert (patch_system in ['cdbs', 'dpatch', 'quilt', 'quiltv3', None]) + if patch_system != None and patch_system != "quiltv3": + if patch_system == "quilt": + os.environ.setdefault('QUILT_PATCHES','debian/patches') + rc, report = cmd(['quilt', 'push', '-a']) + assert (rc == 0) + elif patch_system == "cdbs": + rc, report = cmd(['./debian/rules', 'apply-patches']) + assert (rc == 0) + elif patch_system == "dpatch": + rc, report = cmd(['dpatch', 'apply-all']) + assert (rc == 0) + + cmd(['chown', '-R', '%s:%s' % (builder.uid, builder.gid), build_src]) + os.chdir(cdir) + + return unpacked_dir + +def _aa_status(): + '''Get aa-status output''' + exe = "/usr/sbin/aa-status" + assert (os.path.exists(exe)) + if os.geteuid() == 0: + return cmd([exe]) + return cmd(['sudo', exe]) + +def is_apparmor_loaded(path): + '''Check if profile is loaded''' + rc, report = _aa_status() + if rc != 0: + return False + + for line in report.splitlines(): + if line.endswith(path): + return True + return False + +def is_apparmor_confined(path): + '''Check if application is confined''' + rc, report = _aa_status() + if rc != 0: + return False + + for line in report.splitlines(): + if re.search('%s \(' % path, line): + return True + return False + +def check_apparmor(path, first_ubuntu_release, is_running=True): + '''Check if path is loaded and confined for everything higher than the + first Ubuntu release specified. + + Usage: + rc, report = testlib.check_apparmor('/usr/sbin/foo', 8.04, is_running=True) + if rc < 0: + return self._skipped(report) + + expected = 0 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + self.assertEquals(expected, rc, result + report) + ''' + global manager + rc = -1 + + if manager.lsb_release["Release"] < first_ubuntu_release: + return (rc, "Skipped apparmor check") + + if not os.path.exists('/sbin/apparmor_parser'): + return (rc, "Skipped (couldn't find apparmor_parser)") + + rc = 0 + msg = "" + if not is_apparmor_loaded(path): + rc = 1 + msg = "Profile not loaded for '%s'" % path + + # this check only makes sense it the 'path' is currently executing + if is_running and rc == 0 and not is_apparmor_confined(path): + rc = 1 + msg = "'%s' is not running in enforce mode" % path + + return (rc, msg) + +def get_gcc_version(gcc, full=True): + gcc_version = 'none' + if not gcc.startswith('/'): + gcc = '/usr/bin/%s' % (gcc) + if os.path.exists(gcc): + gcc_version = 'unknown' + lines = cmd([gcc,'-v'])[1].strip().splitlines() + version_lines = [x for x in lines if x.startswith('gcc version')] + if len(version_lines) == 1: + gcc_version = " ".join(version_lines[0].split()[2:]) + if not full: + return gcc_version.split()[0] + return gcc_version + +def is_kdeinit_running(): + '''Test if kdeinit is running''' + # applications that use kdeinit will spawn it if it isn't running in the + # test. This is a problem because it does not exit. This is a helper to + # check for it. + rc, report = cmd(['ps', 'x']) + if 'kdeinit4 Running' not in report: + print >>sys.stderr, ("kdeinit not running (you may start/stop any KDE application then run this script again)") + return False + return True + +def get_pkgconfig_flags(libs=[]): + '''Find pkg-config flags for libraries''' + assert (len(libs) > 0) + rc, pkg_config = cmd(['pkg-config', '--cflags', '--libs'] + libs) + expected = 0 + if rc != expected: + print >>sys.stderr, 'Got exit code %d, expected %d\n' % (rc, expected) + assert(rc == expected) + return pkg_config.split() + +class TestDaemon: + '''Helper class to manage daemons consistently''' + def __init__(self, init): + '''Setup daemon attributes''' + self.initscript = init + + def start(self): + '''Start daemon''' + rc, report = cmd([self.initscript, 'start']) + expected = 0 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + time.sleep(2) + if expected != rc: + return (False, result + report) + + if "fail" in report: + return (False, "Found 'fail' in report\n" + report) + + return (True, "") + + def stop(self): + '''Stop daemon''' + rc, report = cmd([self.initscript, 'stop']) + expected = 0 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + if expected != rc: + return (False, result + report) + + if "fail" in report: + return (False, "Found 'fail' in report\n" + report) + + return (True, "") + + def reload(self): + '''Reload daemon''' + rc, report = cmd([self.initscript, 'force-reload']) + expected = 0 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + if expected != rc: + return (False, result + report) + + if "fail" in report: + return (False, "Found 'fail' in report\n" + report) + + return (True, "") + + def restart(self): + '''Restart daemon''' + (res, str) = self.stop() + if not res: + return (res, str) + + (res, str) = self.start() + if not res: + return (res, str) + + return (True, "") + + def status(self): + '''Check daemon status''' + rc, report = cmd([self.initscript, 'status']) + expected = 0 + result = 'Got exit code %d, expected %d\n' % (rc, expected) + if expected != rc: + return (False, result + report) + + if "fail" in report: + return (False, "Found 'fail' in report\n" + report) + + return (True, "") + +class TestlibManager(object): + '''Singleton class used to set up per-test-run information''' + def __init__(self): + # Set glibc aborts to dump to stderr instead of the tty so test output + # is more sane. + os.environ.setdefault('LIBC_FATAL_STDERR_','1') + + # check verbosity + self.verbosity = False + if (len(sys.argv) > 1 and '-v' in sys.argv[1:]): + self.verbosity = True + + # Load LSB release file + self.lsb_release = dict() + if not os.path.exists('/usr/bin/lsb_release') and not os.path.exists('/bin/lsb_release'): + raise OSError, "Please install 'lsb-release'" + for line in subprocess.Popen(['lsb_release','-a'],stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()[0].splitlines(): + field, value = line.split(':',1) + value=value.strip() + field=field.strip() + # Convert numerics + try: + value = float(value) + except: + pass + self.lsb_release.setdefault(field,value) + + # FIXME: hack OEM releases into known-Ubuntu versions + if self.lsb_release['Distributor ID'] == "HP MIE (Mobile Internet Experience)": + if self.lsb_release['Release'] == 1.0: + self.lsb_release['Distributor ID'] = "Ubuntu" + self.lsb_release['Release'] = 8.04 + else: + raise OSError, "Unknown version of HP MIE" + + # FIXME: hack to assume a most-recent release if we're not + # running under Ubuntu. + if self.lsb_release['Distributor ID'] not in ["Ubuntu","Linaro"]: + self.lsb_release['Release'] = 10000 + # Adjust Linaro release to pretend to be Ubuntu + if self.lsb_release['Distributor ID'] in ["Linaro"]: + self.lsb_release['Distributor ID'] = "Ubuntu" + self.lsb_release['Release'] -= 0.01 + + # Load arch + if not os.path.exists('/usr/bin/dpkg'): + machine = cmd(['uname','-m'])[1].strip() + if machine.endswith('86'): + self.dpkg_arch = 'i386' + elif machine.endswith('_64'): + self.dpkg_arch = 'amd64' + elif machine.startswith('arm'): + self.dpkg_arch = 'armel' + else: + raise ValueError, "Unknown machine type '%s'" % (machine) + else: + self.dpkg_arch = cmd(['dpkg','--print-architecture'])[1].strip() + + # Find kernel version + self.kernel_is_ubuntu = False + self.kernel_version_signature = None + self.kernel_version = cmd(["uname","-r"])[1].strip() + versig = '/proc/version_signature' + if os.path.exists(versig): + self.kernel_is_ubuntu = True + self.kernel_version_signature = file(versig).read().strip() + self.kernel_version_ubuntu = self.kernel_version + elif os.path.exists('/usr/bin/dpkg'): + # this can easily be inaccurate but is only an issue for Dapper + rc, out = cmd(['dpkg','-l','linux-image-%s' % (self.kernel_version)]) + if rc == 0: + self.kernel_version_signature = out.strip().split('\n').pop().split()[2] + self.kernel_version_ubuntu = self.kernel_version_signature + if self.kernel_version_signature == None: + # Attempt to fall back to something for non-Debian-based + self.kernel_version_signature = self.kernel_version + self.kernel_version_ubuntu = self.kernel_version + # Build ubuntu version without hardware suffix + try: + self.kernel_version_ubuntu = "-".join([x for x in self.kernel_version_signature.split(' ')[1].split('-') if re.search('^[0-9]', x)]) + except: + pass + + # Find gcc version + self.gcc_version = get_gcc_version('gcc') + + # Find libc + self.path_libc = [x.split()[2] for x in cmd(['ldd','/bin/ls'])[1].splitlines() if x.startswith('\tlibc.so.')][0] + + # Report self + if self.verbosity: + kernel = self.kernel_version_ubuntu + if kernel != self.kernel_version_signature: + kernel += " (%s)" % (self.kernel_version_signature) + print >>sys.stdout, "Running test: '%s' distro: '%s %.2f' kernel: '%s' arch: '%s' uid: %d/%d SUDO_USER: '%s')" % ( \ + sys.argv[0], + self.lsb_release['Distributor ID'], + self.lsb_release['Release'], + kernel, + self.dpkg_arch, + os.geteuid(), os.getuid(), + os.environ.get('SUDO_USER', '')) + sys.stdout.flush() + + # Additional heuristics + #if os.environ.get('SUDO_USER', os.environ.get('USER', '')) in ['mdeslaur']: + # sys.stdout.write("Replying to Marc Deslauriers in http://launchpad.net/bugs/%d: " % random.randint(600000, 980000)) + # sys.stdout.flush() + # time.sleep(0.5) + # sys.stdout.write("destroyed\n") + # time.sleep(0.5) + + def hello(self, msg): + print >>sys.stderr, "Hello from %s" % (msg) +# The central instance +manager = TestlibManager() + +class TestlibCase(unittest.TestCase): + def __init__(self, *args): + '''This is called for each TestCase test instance, which isn't much better + than SetUp.''' + + unittest.TestCase.__init__(self, *args) + + # Attach to and duplicate dicts from manager singleton + self.manager = manager + #self.manager.hello(repr(self) + repr(*args)) + self.my_verbosity = self.manager.verbosity + self.lsb_release = self.manager.lsb_release + self.dpkg_arch = self.manager.dpkg_arch + self.kernel_version = self.manager.kernel_version + self.kernel_version_signature = self.manager.kernel_version_signature + self.kernel_version_ubuntu = self.manager.kernel_version_ubuntu + self.kernel_is_ubuntu = self.manager.kernel_is_ubuntu + self.gcc_version = self.manager.gcc_version + self.path_libc = self.manager.path_libc + + def version_compare(self, one, two): + return apt_pkg.VersionCompare(one,two) + + def assertFileType(self, filename, filetype): + '''Checks the file type of the file specified''' + + (rc, report, out) = self._testlib_shell_cmd(["/usr/bin/file", "-b", filename]) + out = out.strip() + expected = 0 + # Absolutely no idea why this happens on Hardy + if self.lsb_release['Release'] == 8.04 and rc == 255 and len(out) > 0: + rc = 0 + result = 'Got exit code %d, expected %d:\n%s\n' % (rc, expected, report) + self.assertEquals(expected, rc, result) + + filetype = '^%s$' % (filetype) + result = 'File type reported by file: [%s], expected regex: [%s]\n' % (out, filetype) + self.assertNotEquals(None, re.search(filetype, out), result) + + def yank_commonname_from_cert(self, certfile): + '''Extract the commonName from a given PEM''' + rc, out = cmd(['openssl','asn1parse','-in',certfile]) + if rc == 0: + ready = False + for line in out.splitlines(): + if ready: + return line.split(':')[-1] + if ':commonName' in line: + ready = True + return socket.getfqdn() + + def announce(self, text): + if self.my_verbosity: + print >>sys.stdout, "(%s) " % (text), + sys.stdout.flush() + + def make_clean(self): + rc, output = self.shell_cmd(['make','clean']) + self.assertEquals(rc, 0, output) + + def get_makefile_compiler(self): + # Find potential compiler name + compiler = 'gcc' + if os.path.exists('Makefile'): + for line in open('Makefile'): + if line.startswith('CC') and '=' in line: + items = [x.strip() for x in line.split('=')] + if items[0] == 'CC': + compiler = items[1] + break + return compiler + + def make_target(self, target, expected=0): + '''Compile a target and report output''' + + compiler = self.get_makefile_compiler() + rc, output = self.shell_cmd(['make',target]) + self.assertEquals(rc, expected, 'rc(%d)!=%d:\n' % (rc, expected) + output) + self.assertTrue('%s ' % (compiler) in output, 'Expected "%s":' % (compiler) + output) + return output + + # call as return testlib.skipped() + def _skipped(self, reason=""): + '''Provide a visible way to indicate that a test was skipped''' + if reason != "": + reason = ': %s' % (reason) + self.announce("skipped%s" % (reason)) + return False + + def _testlib_shell_cmd(self,args,stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT): + argstr = "'" + "', '".join(args).strip() + "'" + rc, out = cmd(args,stdin=stdin,stdout=stdout,stderr=stderr) + report = 'Command: ' + argstr + '\nOutput:\n' + out + return rc, report, out + + def shell_cmd(self, args, stdin=None): + return cmd(args,stdin=stdin) + + def assertShellExitEquals(self, expected, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg=""): + '''Test a shell command matches a specific exit code''' + rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) + result = 'Got exit code %d, expected %d\n' % (rc, expected) + self.assertEquals(expected, rc, msg + result + report) + + def assertShellExitNotEquals(self, unwanted, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg=""): + '''Test a shell command doesn't match a specific exit code''' + rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) + result = 'Got (unwanted) exit code %d\n' % rc + self.assertNotEquals(unwanted, rc, msg + result + report) + + def assertShellOutputContains(self, text, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg="", invert=False): + '''Test a shell command contains a specific output''' + rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) + result = 'Got exit code %d. Looking for text "%s"\n' % (rc, text) + if not invert: + self.assertTrue(text in out, msg + result + report) + else: + self.assertFalse(text in out, msg + result + report) + + def assertShellOutputEquals(self, text, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg="", invert=False, expected=None): + '''Test a shell command matches a specific output''' + rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) + result = 'Got exit code %d. Looking for exact text "%s" (%s)\n' % (rc, text, " ".join(args)) + if not invert: + self.assertEquals(text, out, msg + result + report) + else: + self.assertNotEquals(text, out, msg + result + report) + if expected != None: + result = 'Got exit code %d. Expected %d (%s)\n' % (rc, expected, " ".join(args)) + self.assertEquals(rc, expected, msg + result + report) + + def _word_find(self, report, content, invert=False): + '''Check for a specific string''' + if invert: + warning = 'Found "%s"\n' % content + self.assertTrue(content not in report, warning + report) + else: + warning = 'Could not find "%s"\n' % content + self.assertTrue(content in report, warning + report) + + def _test_sysctl_value(self, path, expected, msg=None, exists=True): + sysctl = '/proc/sys/%s' % (path) + self.assertEquals(exists, os.path.exists(sysctl), sysctl) + value = None + if exists: + value = int(file(sysctl).read()) + report = "%s is not %d: %d" % (sysctl, expected, value) + if msg: + report += " (%s)" % (msg) + self.assertEquals(value, expected, report) + return value + + def set_sysctl_value(self, path, desired): + sysctl = '/proc/sys/%s' % (path) + self.assertTrue(os.path.exists(sysctl),"%s does not exist" % (sysctl)) + file(sysctl,'w').write(str(desired)) + self._test_sysctl_value(path, desired) + + def kernel_at_least(self, introduced): + return self.version_compare(self.kernel_version_ubuntu, + introduced) >= 0 + + def kernel_claims_cve_fixed(self, cve): + changelog = "/usr/share/doc/linux-image-%s/changelog.Debian.gz" % (self.kernel_version) + if os.path.exists(changelog): + for line in gzip.open(changelog): + if cve in line and not "revert" in line and not "Revert" in line: + return True + return False + +class TestGroup: + '''Create a temporary test group and remove it again in the dtor.''' + + def __init__(self, group=None, lower=False): + '''Create a new group''' + + self.group = None + if group: + if group_exists(group): + raise ValueError, 'group name already exists' + else: + while(True): + group = random_string(7,lower=lower) + if not group_exists(group): + break + + assert subprocess.call(['groupadd',group]) == 0 + self.group = group + g = grp.getgrnam(self.group) + self.gid = g[2] + + def __del__(self): + '''Remove the created group.''' + + if self.group: + rc, report = cmd(['groupdel', self.group]) + assert rc == 0 + +class TestUser: + '''Create a temporary test user and remove it again in the dtor.''' + + def __init__(self, login=None, home=True, group=None, uidmin=None, lower=False, shell=None): + '''Create a new user account with a random password. + + By default, the login name is random, too, but can be explicitly + specified with 'login'. By default, a home directory is created, this + can be suppressed with 'home=False'.''' + + self.login = None + + if os.geteuid() != 0: + raise ValueError, "You must be root to run this test" + + if login: + if login_exists(login): + raise ValueError, 'login name already exists' + else: + while(True): + login = 't' + random_string(7,lower=lower) + if not login_exists(login): + break + + self.salt = random_string(2) + self.password = random_string(8,lower=lower) + self.crypted = crypt.crypt(self.password, self.salt) + + creation = ['useradd', '-p', self.crypted] + if home: + creation += ['-m'] + if group: + creation += ['-G',group] + if uidmin: + creation += ['-K','UID_MIN=%d'%uidmin] + if shell: + creation += ['-s',shell] + creation += [login] + assert subprocess.call(creation) == 0 + # Set GECOS + assert subprocess.call(['usermod','-c','Buddy %s' % (login),login]) == 0 + + self.login = login + p = pwd.getpwnam(self.login) + self.uid = p[2] + self.gid = p[3] + self.gecos = p[4] + self.home = p[5] + self.shell = p[6] + + def __del__(self): + '''Remove the created user account.''' + + if self.login: + # sanity check the login name so we don't accidentally wipe too much + if len(self.login)>3 and not '/' in self.login: + subprocess.call(['rm','-rf', '/home/'+self.login, '/var/mail/'+self.login]) + rc, report = cmd(['userdel', '-f', self.login]) + assert rc == 0 + + def add_to_group(self, group): + '''Add user to the specified group name''' + rc, report = cmd(['usermod', '-G', group, self.login]) + if rc != 0: + print report + assert rc == 0 + +# Timeout handler using alarm() from John P. Speno's Pythonic Avocado +class TimeoutFunctionException(Exception): + """Exception to raise on a timeout""" + pass +class TimeoutFunction: + def __init__(self, function, timeout): + self.timeout = timeout + self.function = function + + def handle_timeout(self, signum, frame): + raise TimeoutFunctionException() + + def __call__(self, *args, **kwargs): + old = signal.signal(signal.SIGALRM, self.handle_timeout) + signal.alarm(self.timeout) + try: + result = self.function(*args, **kwargs) + finally: + signal.signal(signal.SIGALRM, old) + signal.alarm(0) + return result + +def main(): + print "hi" + unittest.main() From 476bccbdb39457dc31ffa9a1ce3e98d030605b04 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 21 Jun 2013 17:29:14 +0200 Subject: [PATCH 131/300] debian/nut-monitor.menu, nut-monitor.xpm: Add Debian menu entry (Closes: #708813) --- debian/changelog | 2 + debian/nut-monitor.install | 1 + debian/nut-monitor.menu | 4 + debian/nut-monitor.xpm | 326 +++++++++++++++++++++++++++++++++++++ 4 files changed, 333 insertions(+) create mode 100644 debian/nut-monitor.menu create mode 100644 debian/nut-monitor.xpm diff --git a/debian/changelog b/debian/changelog index 411a8be..17d90e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ nut (2.6.5-3) UNRELEASED; urgency=low getting updated during build - Use canonical URL for the VCS-* fields * Added dep-8-tests to improve QA (from Ubuntu, closes: #708130) + * debian/nut-monitor.menu, nut-monitor.xpm: Add Debian menu entry (Closes: + #708813) [ Ivo De Decker ] * debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done diff --git a/debian/nut-monitor.install b/debian/nut-monitor.install index 612e8f3..6cbef89 100644 --- a/debian/nut-monitor.install +++ b/debian/nut-monitor.install @@ -4,3 +4,4 @@ scripts/python/app/gui-*.glade usr/share/nut-monitor/ scripts/python/app/locale/ usr/share/ scripts/python/app/nut-monitor.png usr/share/pixmaps/ scripts/python/app/pixmaps usr/share/nut-monitor/ +debian/nut-monitor.xpm usr/share/pixmaps/ diff --git a/debian/nut-monitor.menu b/debian/nut-monitor.menu new file mode 100644 index 0000000..2b849cb --- /dev/null +++ b/debian/nut-monitor.menu @@ -0,0 +1,4 @@ +?package(nut-monitor): needs="X11" section="Applications/System/Monitoring"\ + title="NUT Monitor" command="/usr/bin/NUT-Monitor"\ + icon="/usr/share/pixmaps/nut-monitor.xpm"\ + longtitle="Network UPS Tools GUI client" diff --git a/debian/nut-monitor.xpm b/debian/nut-monitor.xpm new file mode 100644 index 0000000..6bfa642 --- /dev/null +++ b/debian/nut-monitor.xpm @@ -0,0 +1,326 @@ +/* XPM */ +static char * nut_monitor_xpm[] = { +"32 32 291 2", +" c None", +". c #C7A509", +"+ c #D0B123", +"@ c #CEAF21", +"# c #CBAB15", +"$ c #C5A305", +"% c #C4A100", +"& c #CAAB1A", +"* c #E0C74E", +"= c #E0C949", +"- c #ECDA6F", +"; c #FCF6C6", +"> c #FDF7B5", +", c #E8D663", +"' c #CEAF0E", +") c #CAA915", +"! c #DFC858", +"~ c #D1B42E", +"{ c #C29E00", +"] c #D6BB34", +"^ c #FBEE92", +"/ c #FFF792", +"( c #FEF07A", +"_ c #F9E857", +": c #F6E558", +"< c #F5E55D", +"[ c #EED500", +"} c #D7B800", +"| c #CCAB00", +"1 c #CAA80A", +"2 c #EFDA59", +"3 c #EFDC69", +"4 c #F0E289", +"5 c #DBC350", +"6 c #C8A714", +"7 c #BE9700", +"8 c #FFFEAA", +"9 c #FCE955", +"0 c #FCED74", +"a c #FCF194", +"b c #FDF4AD", +"c c #F5E565", +"d c #EFD91D", +"e c #E6CA00", +"f c #D2B000", +"g c #D0B226", +"h c #EAD65F", +"i c #EDD852", +"j c #E9D037", +"k c #E6CC2E", +"l c #ECD856", +"m c #CDAF23", +"n c #BD9500", +"o c #FFFFD2", +"p c #FCED72", +"q c #FCEE7A", +"r c #FDF087", +"s c #FDF195", +"t c #FDF4AB", +"u c #FEF8C2", +"v c #FEF9C0", +"w c #FEF5AA", +"x c #FBEE8A", +"y c #F4E269", +"z c #F4E058", +"A c #F0DA49", +"B c #EDD851", +"C c #EBD96F", +"D c #CCAD23", +"E c #BC9400", +"F c #FFFFD9", +"G c #FDF5B0", +"H c #FDFAD9", +"I c #FDF9D4", +"J c #FEF9D8", +"K c #FEFBE3", +"L c #FFFDEA", +"M c #FFFCE4", +"N c #FEFAD4", +"O c #FBF3B8", +"P c #F5E99B", +"Q c #EBDA75", +"R c #E0CA52", +"S c #D8C03D", +"T c #D6BE48", +"U c #CCAC21", +"V c #FFFFD6", +"W c #FDF3A5", +"X c #FDF9D0", +"Y c #FCF4B9", +"Z c #F9F2AB", +"` c #F5E561", +" . c #F1DE3B", +".. c #EFD91C", +"+. c #E8CF1B", +"@. c #E0C61C", +"#. c #DBC01E", +"$. c #D9BD21", +"%. c #D6BA26", +"&. c #D5B729", +"*. c #D7BD43", +"=. c #FFFFD4", +"-. c #FCF3A2", +";. c #FDF9CE", +">. c #FBF4B9", +",. c #FAF2AA", +"'. c #F5E86D", +"). c #F3E14B", +"!. c #F0DC2D", +"~. c #EAD329", +"{. c #E1C927", +"]. c #DCC224", +"^. c #D9BD23", +"/. c #D5B921", +"(. c #D2B522", +"_. c #D3BA3E", +":. c #CBAC22", +"<. c #A68E1A", +"[. c #FFFCD8", +"}. c #FCF2A0", +"|. c #FEF8C9", +"1. c #FCF4B1", +"2. c #FAF1A2", +"3. c #F5E666", +"4. c #F2E045", +"5. c #F0DB28", +"6. c #E8D123", +"7. c #E1C720", +"8. c #DCC01D", +"9. c #D9BC1A", +"0. c #D7B916", +"a. c #D3B41A", +"b. c #C8B140", +"c. c #B6A34A", +"d. c #777B7D", +"e. c #EFF0ED", +"f. c #DCDECF", +"g. c #F0EEDC", +"h. c #F2ECC0", +"i. c #F4EDA6", +"j. c #F2E568", +"k. c #F2DF3E", +"l. c #F4DD12", +"m. c #EBD118", +"n. c #DDC420", +"o. c #D1BA27", +"p. c #C0AD37", +"q. c #A5994E", +"r. c #898464", +"s. c #7F8077", +"t. c #8F9396", +"u. c #72746E", +"v. c #D8DAD4", +"w. c #E7E8E5", +"x. c #E0E2E1", +"y. c #DBDDDE", +"z. c #CACDD3", +"A. c #C2C6CD", +"B. c #B7BBC8", +"C. c #A9AFB8", +"D. c #9CA0A7", +"E. c #8E9396", +"F. c #848888", +"G. c #7E7F7B", +"H. c #76786F", +"I. c #7B7C77", +"J. c #8C8E8A", +"K. c #676965", +"L. c #EFF1EE", +"M. c #D6D9D4", +"N. c #E4E5E3", +"O. c #DFE0DC", +"P. c #D9DCD7", +"Q. c #CCCEC8", +"R. c #C4C7BF", +"S. c #BABDB5", +"T. c #ADAFA7", +"U. c #9FA199", +"V. c #91938B", +"W. c #84877F", +"X. c #7B7D76", +"Y. c #71736E", +"Z. c #787975", +"`. c #858783", +" + c #5F615C", +".+ c #EFF0EE", +"++ c #D5D8D3", +"@+ c #E3E5E1", +"#+ c #DCDDDA", +"$+ c #D6D9D5", +"%+ c #C9CCC7", +"&+ c #C2C5BE", +"*+ c #B8BBB4", +"=+ c #ABAEA6", +"-+ c #9C9F97", +";+ c #8E9089", +">+ c #81847D", +",+ c #787A74", +"'+ c #6E716B", +")+ c #757772", +"!+ c #7E807C", +"~+ c #555752", +"{+ c #D5D7D3", +"]+ c #E0E2DE", +"^+ c #DADBD8", +"/+ c #D4D6D1", +"(+ c #C8CAC5", +"_+ c #C1C4BD", +":+ c #B6B9B3", +"<+ c #A9ACA4", +"[+ c #999C95", +"}+ c #8A8D85", +"|+ c #7F827B", +"1+ c #767771", +"2+ c #6D6F6A", +"3+ c #757773", +"4+ c #777975", +"5+ c #4B4E49", +"6+ c #F0F2EE", +"7+ c #D3D6D1", +"8+ c #DEE0DE", +"9+ c #D8D9D6", +"0+ c #D1D3CF", +"a+ c #C6C8C3", +"b+ c #BFC2BB", +"c+ c #B5B8B1", +"d+ c #A6A9A2", +"e+ c #989B93", +"f+ c #767773", +"g+ c #70726F", +"h+ c #434540", +"i+ c #D2D5D0", +"j+ c #DCDDDB", +"k+ c #D4D6D2", +"l+ c #CED0CB", +"m+ c #C5C7C2", +"n+ c #BEC1BA", +"o+ c #B4B7B0", +"p+ c #A7AAA2", +"q+ c #767874", +"r+ c #6A6C68", +"s+ c #424440", +"t+ c #EFF1ED", +"u+ c #D1D4CF", +"v+ c #DADCD8", +"w+ c #D3D5D0", +"x+ c #CCCFC9", +"y+ c #C4C7C1", +"z+ c #6A6B68", +"A+ c #41433F", +"B+ c #EDEFEC", +"C+ c #D2D5CF", +"D+ c #D9DAD7", +"E+ c #D2D4CF", +"F+ c #CBCEC8", +"G+ c #D7D9D5", +"H+ c #D1D3CE", +"I+ c #CBCDC8", +"J+ c #8A8C85", +"K+ c #7D8079", +"L+ c #696B65", +"M+ c #7F807C", +"N+ c #6A6C69", +"O+ c #81827E", +"P+ c #DEE0DD", +"Q+ c #F1F2EF", +"R+ c #DEE0DC", +"S+ c #CFD2CC", +"T+ c #C3C6C0", +"U+ c #BBBEB7", +"V+ c #ADB0A9", +"W+ c #A2A59D", +"X+ c #979A92", +"Y+ c #8F928A", +"Z+ c #92948F", +"`+ c #9D9E99", +" @ c #A9AAA6", +".@ c #868784", +"+@ c #4B4D49", +"@@ c #5E605B", +"#@ c #959794", +"$@ c #AEAFAC", +"%@ c #B6B8B5", +"&@ c #BABCB8", +"*@ c #BDBEBB", +"=@ c #B4B6B2", +"-@ c #AAABA7", +";@ c #9E9F9B", +">@ c #888986", +",@ c #686A66", +"'@ c #454743", +" ", +" ", +" ", +" ", +" ", +" ", +" . + @ # $ ", +" % & * = - ; > , ' ) ! ~ { ", +" ] ^ / ( _ : < [ } | 1 2 3 4 5 6 ", +" 7 8 9 0 a b c d e f g h i j k l m ", +" n o p q r s t u v w x y z A B C D ", +" E F G H I J K L M N O P Q R S T U ", +" E V W X Y Z ` ...+.@.#.$.%.&.*.U ", +" E =.-.;.>.,.'.).!.~.{.].^./.(._.:. ", +" <.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c. ", +" d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t. ", +" u.e.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J. ", +" K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. ", +" +.+++@+#+$+%+&+*+=+-+;+>+,+'+)+!+ ", +" ~+.+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+ ", +" 5+6+7+8+9+0+a+b+c+d+e+}+|+1+2+f+g+ ", +" h+6+i+j+k+l+m+n+o+p+e+}+|+1+2+q+r+ ", +" s+t+u+v+w+x+y+n+o+p+e+}+|+1+2+q+z+ ", +" A+B+C+D+E+F+y+n+o+p+e+}+|+1+2+4+z+ ", +" s+6+7+G+H+I+y+n+c+p+e+J+K+u.L+M+N+ ", +" O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@ ", +" A+@@#@$@%@&@*@=@-@;@>@,@'@ ", +" ", +" ", +" ", +" ", +" "}; From 65234e6c7b5eb087f662c60f51bbb69b4c5ce817 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 21 Jun 2013 17:37:48 +0200 Subject: [PATCH 132/300] debian/control: Add missing Testsuite field --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 475f3eb..f58e3a2 100644 --- a/debian/control +++ b/debian/control @@ -24,6 +24,7 @@ Homepage: http://www.networkupstools.org/ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/nut.git;a=summary Vcs-Git: git://anonscm.debian.org/collab-maint/nut.git X-Python-Version: >= 2.5 +XS-Testsuite: autopkgtest Package: nut Architecture: all From a60005575faaf44f3314b6659325d63b50af675d Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Wed, 26 Jun 2013 18:48:42 +0200 Subject: [PATCH 133/300] debian/rules: Drop manual creation of .service files symlink, this should be handled by dh_systemd now --- debian/changelog | 4 +++- debian/rules | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 17d90e1..6df125c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,13 +12,15 @@ nut (2.6.5-3) UNRELEASED; urgency=low * Added dep-8-tests to improve QA (from Ubuntu, closes: #708130) * debian/nut-monitor.menu, nut-monitor.xpm: Add Debian menu entry (Closes: #708813) + * debian/rules: Drop manual creation of .service files symlink, this should + be handled by dh_systemd now [ Ivo De Decker ] * debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done by postinst during upgrade from lenny to squeeze (Really closes: #677054) Thanks to Andreas Beckmann for the review. - -- Laurent Bigonville Tue, 18 Jun 2013 21:49:12 +0200 + -- Laurent Bigonville Wed, 26 Jun 2013 18:47:52 +0200 nut (2.6.5-2) experimental; urgency=low diff --git a/debian/rules b/debian/rules index 425a353..06213c6 100755 --- a/debian/rules +++ b/debian/rules @@ -85,11 +85,6 @@ ifeq (linux,$(DEB_HOST_ARCH_OS)) $(CURDIR)/debian/nut-client/usr/lib/tmpfiles.d/nut-client.conf install -m 644 -D $(CURDIR)/debian/nut-server.tmpfiles \ $(CURDIR)/debian/nut-server/usr/lib/tmpfiles.d/nut-server.conf - - # This is needed to avoid services to be started twice (systemd and LSB) - mkdir -p $(CURDIR)/debian/nut-client/etc/systemd/system/ - ln -s /lib/systemd/system/nut-monitor.service \ - $(CURDIR)/debian/nut-client/etc/systemd/system/nut-client.service endif common-install-indep:: From 38742dde537f22a2fd220d1d9f678569a08e8793 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 6 Jul 2013 16:26:58 +0200 Subject: [PATCH 134/300] Add build-dependency against dh-systemd and bump minimal cdbs version so systemd helpers are called during build. --- debian/changelog | 4 +++- debian/control | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6df125c..4f36d30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ nut (2.6.5-3) UNRELEASED; urgency=low - Add autotools-dev to the build-dependencies so config.{guess,sub} are getting updated during build - Use canonical URL for the VCS-* fields + - Add build-dependency against dh-systemd and bump minimal cdbs version so + systemd helpers are called during build. * Added dep-8-tests to improve QA (from Ubuntu, closes: #708130) * debian/nut-monitor.menu, nut-monitor.xpm: Add Debian menu entry (Closes: #708813) @@ -20,7 +22,7 @@ nut (2.6.5-3) UNRELEASED; urgency=low by postinst during upgrade from lenny to squeeze (Really closes: #677054) Thanks to Andreas Beckmann for the review. - -- Laurent Bigonville Wed, 26 Jun 2013 18:47:52 +0200 + -- Laurent Bigonville Sat, 06 Jul 2013 16:25:00 +0200 nut (2.6.5-2) experimental; urgency=low diff --git a/debian/control b/debian/control index f58e3a2..14f1fec 100644 --- a/debian/control +++ b/debian/control @@ -4,8 +4,9 @@ Priority: optional Maintainer: Arnaud Quette Uploaders: Laurent Bigonville Build-Depends: debhelper (>= 8.1.3), - cdbs (>= 0.4.93~), + cdbs (>= 0.4.122~), autotools-dev, + dh-systemd (>= 1.4), libgd-dev | libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), From fd9b4809ec28d45e69f825bda4233aef875331d1 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Wed, 10 Jul 2013 22:13:44 +0200 Subject: [PATCH 135/300] debian/patches/0004-fix-systemd-service.patch: Also add Wants/Before for systemd-udev-settle.service in the nut-driver.service as it got renamed after udev merge --- debian/changelog | 5 ++++- debian/patches/0004-fix-systemd-service.patch | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4f36d30..6c1bb63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,13 +16,16 @@ nut (2.6.5-3) UNRELEASED; urgency=low #708813) * debian/rules: Drop manual creation of .service files symlink, this should be handled by dh_systemd now + * debian/patches/0004-fix-systemd-service.patch: Also add Wants/Before for + systemd-udev-settle.service in the nut-driver.service as it got renamed + after udev merge [ Ivo De Decker ] * debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done by postinst during upgrade from lenny to squeeze (Really closes: #677054) Thanks to Andreas Beckmann for the review. - -- Laurent Bigonville Sat, 06 Jul 2013 16:25:00 +0200 + -- Laurent Bigonville Wed, 10 Jul 2013 22:12:22 +0200 nut (2.6.5-2) experimental; urgency=low diff --git a/debian/patches/0004-fix-systemd-service.patch b/debian/patches/0004-fix-systemd-service.patch index 9465687..02d4825 100644 --- a/debian/patches/0004-fix-systemd-service.patch +++ b/debian/patches/0004-fix-systemd-service.patch @@ -8,8 +8,8 @@ Forwarded: not-needed [Unit] Description=Network UPS Tools - power device driver controller -After=local-fs.target network.target -+After=local-fs.target network.target udev-settle.service -+Wants=udev-settle.service ++After=local-fs.target network.target udev-settle.service systemd-udev-settle.service ++Wants=udev-settle.service systemd-udev-settle.service StopWhenUnneeded=yes [Service] From 154f28c325d8b7c1efdfd61032b63b26d8fae645 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Wed, 10 Jul 2013 22:48:24 +0200 Subject: [PATCH 136/300] debian/patches/0004-fix-systemd-service.patch: Fix path for upsdrvctl in scripts/systemd/nutshutdown.in --- debian/changelog | 4 +++- debian/patches/0004-fix-systemd-service.patch | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6c1bb63..35ee448 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,13 +19,15 @@ nut (2.6.5-3) UNRELEASED; urgency=low * debian/patches/0004-fix-systemd-service.patch: Also add Wants/Before for systemd-udev-settle.service in the nut-driver.service as it got renamed after udev merge + * debian/patches/0004-fix-systemd-service.patch: Fix path for upsdrvctl in + scripts/systemd/nutshutdown.in [ Ivo De Decker ] * debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done by postinst during upgrade from lenny to squeeze (Really closes: #677054) Thanks to Andreas Beckmann for the review. - -- Laurent Bigonville Wed, 10 Jul 2013 22:12:22 +0200 + -- Laurent Bigonville Wed, 10 Jul 2013 22:47:23 +0200 nut (2.6.5-2) experimental; urgency=low diff --git a/debian/patches/0004-fix-systemd-service.patch b/debian/patches/0004-fix-systemd-service.patch index 02d4825..d33a250 100644 --- a/debian/patches/0004-fix-systemd-service.patch +++ b/debian/patches/0004-fix-systemd-service.patch @@ -26,3 +26,9 @@ Forwarded: not-needed [Install] WantedBy=multi-user.target +Alias=nut-client.service +--- a/scripts/systemd/nutshutdown.in ++++ b/scripts/systemd/nutshutdown.in +@@ -1,2 +1,2 @@ + #!/bin/sh +-@SBINDIR@/upsmon -K >/dev/null 2>&1 && @driverexecdir@/upsdrvctl shutdown ++@SBINDIR@/upsmon -K >/dev/null 2>&1 && @SBINDIR@/upsdrvctl shutdown From 4c61ee613e3fa30c78f53a08b6fd9d581f523955 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 11 Jul 2013 00:50:18 +0200 Subject: [PATCH 137/300] Release to unstable --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 35ee448..935da5e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.6.5-3) UNRELEASED; urgency=low +nut (2.6.5-3) unstable; urgency=low [ Laurent Bigonville ] * debian/control: @@ -27,7 +27,7 @@ nut (2.6.5-3) UNRELEASED; urgency=low by postinst during upgrade from lenny to squeeze (Really closes: #677054) Thanks to Andreas Beckmann for the review. - -- Laurent Bigonville Wed, 10 Jul 2013 22:47:23 +0200 + -- Laurent Bigonville Thu, 11 Jul 2013 00:50:06 +0200 nut (2.6.5-2) experimental; urgency=low From 8157c709a1894b0ccb8f23889defafb503d412f0 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 11 Jul 2013 12:13:31 +0200 Subject: [PATCH 138/300] debian/control: Do not build nut-ipmi on hurd-i386 as freeipmi is not available on that platform. --- debian/changelog | 7 +++++++ debian/control | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 935da5e..e9e8a6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nut (2.6.5-4) UNRELEASED; urgency=low + + * debian/control: Do not build nut-ipmi on hurd-i386 as freeipmi is not + available on that platform. + + -- Laurent Bigonville Thu, 11 Jul 2013 12:12:51 +0200 + nut (2.6.5-3) unstable; urgency=low [ Laurent Bigonville ] diff --git a/debian/control b/debian/control index 14f1fec..66a37a8 100644 --- a/debian/control +++ b/debian/control @@ -14,8 +14,8 @@ Build-Depends: debhelper (>= 8.1.3), libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6), python (>= 2.6.6-3~), - libfreeipmi-dev (>= 0.8.5), - libipmimonitoring-dev (>= 1.1.5-2) + libfreeipmi-dev (>= 0.8.5) [!hurd-i386], + libipmimonitoring-dev (>= 1.1.5-2) [!hurd-i386] Build-Depends-Indep: asciidoc (>= 8.6.3), docbook-xsl, dblatex (>= 0.2.5), @@ -107,7 +107,7 @@ Description: network UPS tools - SNMP driver Manager interface to the core NUT system. Package: nut-ipmi -Architecture: any +Architecture: linux-any kfreebsd-any Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 1.4.1-pre1) Description: network UPS tools - IPMI driver Network UPS Tools (NUT) is a client/server monitoring system that From 9b4acffd6cbf531ed84327b21e026b1e14ba8183 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 11 Jul 2013 12:30:04 +0200 Subject: [PATCH 139/300] Release to unstable --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e9e8a6f..976cbaa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -nut (2.6.5-4) UNRELEASED; urgency=low +nut (2.6.5-4) unstable; urgency=low * debian/control: Do not build nut-ipmi on hurd-i386 as freeipmi is not available on that platform. - -- Laurent Bigonville Thu, 11 Jul 2013 12:12:51 +0200 + -- Laurent Bigonville Thu, 11 Jul 2013 12:29:58 +0200 nut (2.6.5-3) unstable; urgency=low From 0121794af9f287cdd41161f64b85daaffdb54ae2 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 24 Nov 2013 16:00:12 +0100 Subject: [PATCH 140/300] Imported Upstream version 2.7.1 --- ChangeLog | 7047 ++++++++++------- MAINTAINERS | 4 + Makefile.am | 26 +- Makefile.in | 149 +- NEWS | 86 +- README | 7 +- UPGRADING | 22 + aclocal.m4 | 81 +- clients/Makefile.am | 12 +- clients/Makefile.in | 175 +- clients/cgilib.h | 12 + clients/nutclient.cpp | 1726 ++++ clients/nutclient.h | 963 +++ clients/status.h | 13 + clients/upsc.c | 9 + clients/upsclient.c | 680 +- clients/upsclient.h | 40 +- clients/upscmd.c | 9 + clients/upsimagearg.h | 13 + clients/upslog.c | 9 + clients/upslog.h | 13 + clients/upsmon.c | 94 +- clients/upsmon.h | 12 + clients/upsrw.c | 19 +- clients/upssched.h | 13 + clients/upsstats.h | 13 + common/Makefile.in | 50 +- common/common.c | 62 + conf/Makefile.am | 2 +- conf/Makefile.in | 79 +- conf/upsd.conf.sample | 47 +- conf/upsmon.conf.sample | 84 +- conf/upsmon.conf.sample.in | 377 + config.guess | 49 +- config.sub | 74 +- configure | 1296 +-- configure.in | 89 +- data/Makefile.in | 81 +- data/cmdvartab | 3 + data/driver.list.in | 254 +- data/html/Makefile.in | 70 +- depcomp | 190 +- docs/FAQ.txt | 20 +- docs/Makefile.am | 44 +- docs/Makefile.in | 98 +- docs/acknowledgements.txt | 22 +- docs/configure.txt | 9 +- docs/developers.txt | 300 +- docs/download.txt | 54 +- docs/hid-subdrivers.txt | 4 +- docs/macros.txt | 3 +- docs/man/Makefile.am | 120 +- docs/man/Makefile.in | 250 +- docs/man/al175.8 | 187 + docs/man/al175.txt | 73 + docs/man/apcsmart-old.8 | 8 +- docs/man/apcsmart.8 | 36 +- docs/man/apcsmart.txt | 24 + docs/man/apcupsd-ups.8 | 357 + docs/man/apcupsd-ups.txt | 107 + docs/man/asciidoc.conf | 21 - docs/man/bcmxcp.8 | 8 +- docs/man/bcmxcp_usb.8 | 8 +- docs/man/belkin.8 | 8 +- docs/man/belkinunv.8 | 8 +- docs/man/bestfcom.8 | 8 +- docs/man/bestfortress.8 | 8 +- docs/man/bestuferrups.8 | 8 +- docs/man/bestups.8 | 8 +- docs/man/{blazer.txt => blazer-common.txt} | 55 +- docs/man/blazer_ser.8 | 271 + docs/man/blazer_ser.txt | 10 + docs/man/{blazer.8 => blazer_usb.8} | 81 +- docs/man/blazer_usb.txt | 11 + docs/man/clone.8 | 8 +- docs/man/dummy-ups.8 | 8 +- docs/man/etapro.8 | 8 +- docs/man/everups.8 | 8 +- docs/man/gamatronic.8 | 8 +- docs/man/genericups.8 | 10 +- docs/man/genericups.txt | 3 +- docs/man/hosts.conf.5 | 8 +- docs/man/isbmex.8 | 8 +- docs/man/ivtscd.8 | 8 +- docs/man/libnutclient.3 | 55 + docs/man/libnutclient.txt | 52 + docs/man/libnutclient_commands.3 | 65 + docs/man/libnutclient_commands.txt | 47 + docs/man/libnutclient_devices.3 | 60 + docs/man/libnutclient_devices.txt | 43 + docs/man/libnutclient_general.3 | 67 + docs/man/libnutclient_general.txt | 45 + docs/man/libnutclient_misc.3 | 71 + docs/man/libnutclient_misc.txt | 52 + docs/man/libnutclient_tcp.3 | 73 + docs/man/libnutclient_tcp.txt | 54 + docs/man/libnutclient_variables.3 | 78 + docs/man/libnutclient_variables.txt | 64 + docs/man/libupsclient-config.1 | 8 +- docs/man/liebert-esp2.8 | 8 +- docs/man/liebert.8 | 8 +- docs/man/macosx-ups.8 | 8 +- docs/man/masterguard.8 | 8 +- docs/man/metasys.8 | 8 +- docs/man/mge-shut.8 | 8 +- docs/man/mge-utalk.8 | 8 +- docs/man/microdowell.8 | 8 +- docs/man/netxml-ups.8 | 25 +- docs/man/netxml-ups.txt | 14 + docs/man/nut-ipmipsu.8 | 8 +- docs/man/nut-recorder.8 | 12 +- docs/man/nut-recorder.txt | 8 +- docs/man/nut-scanner.8 | 262 +- docs/man/nut-scanner.txt | 129 +- docs/man/nut.conf.5 | 8 +- docs/man/nutclient_authenticate.3 | 1 + docs/man/nutclient_destroy.3 | 1 + docs/man/nutclient_device_forced_shutdown.3 | 1 + docs/man/nutclient_device_login.3 | 1 + docs/man/nutclient_device_master.3 | 1 + docs/man/nutclient_execute_device_command.3 | 1 + ...nutclient_get_device_command_description.3 | 1 + docs/man/nutclient_get_device_commands.3 | 1 + docs/man/nutclient_get_device_description.3 | 1 + docs/man/nutclient_get_device_num_logins.3 | 1 + docs/man/nutclient_get_device_rw_variables.3 | 1 + ...utclient_get_device_variable_description.3 | 1 + .../nutclient_get_device_variable_values.3 | 1 + docs/man/nutclient_get_device_variables.3 | 1 + docs/man/nutclient_get_devices.3 | 1 + docs/man/nutclient_has_device.3 | 1 + docs/man/nutclient_has_device_command.3 | 1 + docs/man/nutclient_has_device_variable.3 | 1 + docs/man/nutclient_logout.3 | 1 + .../man/nutclient_set_device_variable_value.3 | 1 + .../nutclient_set_device_variable_values.3 | 1 + docs/man/nutclient_tcp_create_client.3 | 1 + docs/man/nutclient_tcp_disconnect.3 | 1 + docs/man/nutclient_tcp_get_timeout.3 | 1 + docs/man/nutclient_tcp_is_connected.3 | 1 + docs/man/nutclient_tcp_reconnect.3 | 1 + docs/man/nutclient_tcp_set_timeout.3 | 1 + docs/man/nutdrv_qx.8 | 1383 ++++ docs/man/nutdrv_qx.txt | 646 ++ docs/man/nutscan.3 | 8 +- docs/man/nutscan_add_device_to_device.3 | 8 +- docs/man/nutscan_add_option_to_device.3 | 8 +- docs/man/nutscan_cidr_to_ip.3 | 8 +- docs/man/nutscan_display_parsable.3 | 8 +- docs/man/nutscan_display_ups_conf.3 | 8 +- docs/man/nutscan_free_device.3 | 8 +- docs/man/nutscan_get_serial_ports_list.3 | 95 + docs/man/nutscan_get_serial_ports_list.txt | 40 + docs/man/nutscan_init.3 | 8 +- docs/man/nutscan_new_device.3 | 8 +- docs/man/nutscan_scan_avahi.3 | 10 +- docs/man/nutscan_scan_avahi.txt | 1 + docs/man/nutscan_scan_eaton_serial.3 | 51 + docs/man/nutscan_scan_eaton_serial.txt | 40 + docs/man/nutscan_scan_ipmi.3 | 10 +- docs/man/nutscan_scan_ipmi.txt | 3 +- docs/man/nutscan_scan_nut.3 | 10 +- docs/man/nutscan_scan_nut.txt | 3 +- docs/man/nutscan_scan_snmp.3 | 10 +- docs/man/nutscan_scan_snmp.txt | 3 +- docs/man/nutscan_scan_usb.3 | 10 +- docs/man/nutscan_scan_usb.txt | 2 +- docs/man/nutscan_scan_xml_http.3 | 10 +- docs/man/nutscan_scan_xml_http.txt | 2 +- docs/man/nutupsdrv.8 | 10 +- docs/man/nutupsdrv.txt | 5 +- docs/man/oneac.8 | 8 +- docs/man/optiups.8 | 8 +- docs/man/powercom.8 | 8 +- docs/man/powerman-pdu.8 | 8 +- docs/man/powerpanel.8 | 8 +- docs/man/rhino.8 | 8 +- docs/man/richcomm_usb.8 | 8 +- docs/man/riello_ser.8 | 67 + docs/man/riello_ser.txt | 43 + docs/man/riello_usb.8 | 67 + docs/man/riello_usb.txt | 42 + docs/man/safenet.8 | 8 +- docs/man/snmp-ups.8 | 19 +- docs/man/snmp-ups.txt | 14 +- docs/man/solis.8 | 8 +- docs/man/tripplite.8 | 8 +- docs/man/tripplite_usb.8 | 8 +- docs/man/tripplitesu.8 | 8 +- docs/man/ups.conf.5 | 8 +- docs/man/upsc.8 | 11 +- docs/man/upsc.txt | 8 + docs/man/upscli_add_host_cert.3 | 52 + docs/man/upscli_add_host_cert.txt | 35 + docs/man/upscli_cleanup.3 | 49 + docs/man/upscli_cleanup.txt | 29 + docs/man/upscli_connect.3 | 8 +- docs/man/upscli_disconnect.3 | 8 +- docs/man/upscli_fd.3 | 8 +- docs/man/upscli_get.3 | 8 +- docs/man/upscli_init.3 | 58 + docs/man/upscli_init.txt | 48 + docs/man/upscli_list_next.3 | 8 +- docs/man/upscli_list_start.3 | 8 +- docs/man/upscli_readline.3 | 8 +- docs/man/upscli_sendline.3 | 8 +- docs/man/upscli_splitaddr.3 | 8 +- docs/man/upscli_splitname.3 | 8 +- docs/man/upscli_ssl.3 | 8 +- docs/man/upscli_strerror.3 | 8 +- docs/man/upscli_upserror.3 | 8 +- docs/man/upsclient.3 | 17 +- docs/man/upsclient.txt | 14 + docs/man/upscmd.8 | 10 +- docs/man/upscmd.txt | 3 + docs/man/upscode2.8 | 8 +- docs/man/upsd.8 | 8 +- docs/man/upsd.conf.5 | 65 +- docs/man/upsd.conf.txt | 26 +- docs/man/upsd.users.5 | 8 +- docs/man/upsdrvctl.8 | 8 +- docs/man/upsimage.cgi.8 | 8 +- docs/man/upslog.8 | 8 +- docs/man/upsmon.8 | 8 +- docs/man/upsmon.conf.5 | 56 +- docs/man/upsmon.conf.txt | 57 +- docs/man/upsrw.8 | 10 +- docs/man/upsrw.txt | 3 + docs/man/upssched.8 | 8 +- docs/man/upssched.conf.5 | 8 +- docs/man/upsset.cgi.8 | 8 +- docs/man/upsset.conf.5 | 8 +- docs/man/upsstats.cgi.8 | 8 +- docs/man/upsstats.html.5 | 8 +- docs/man/usbhid-ups.8 | 13 +- docs/man/usbhid-ups.txt | 5 + docs/man/victronups.8 | 8 +- docs/new-clients.txt | 65 +- docs/new-drivers.txt | 28 +- docs/nut-names.txt | 6 +- docs/nut-qa.txt | 22 +- docs/nut.dict | 55 + docs/nutdrv_qx-subdrivers.txt | 661 ++ docs/security.txt | 205 +- docs/snmp-subdrivers.txt | 287 + docs/stable-hcl.txt | 55 +- docs/website/Makefile.am | 8 +- docs/website/Makefile.in | 54 +- docs/website/css/web-layout.css | 92 +- docs/website/news.txt | 24 +- docs/website/old-news.txt | 63 + docs/website/projects.txt | 61 +- docs/website/scripts/nut_jquery.js | 983 ++- docs/website/web-layout.conf | 3 +- drivers/Makefile.am | 56 +- drivers/Makefile.in | 722 +- drivers/al175.c | 1292 +++ drivers/apc-hid.c | 38 +- drivers/apc-hid.h | 2 + drivers/apcsmart.c | 1431 ++-- drivers/apcsmart.h | 51 +- drivers/apcsmart_tabs.c | 90 +- drivers/apcsmart_tabs.h | 18 +- drivers/apcupsd-ups.c | 290 + drivers/apcupsd-ups.h | 137 + drivers/bcmxcp.c | 1139 +-- drivers/bcmxcp.h | 901 ++- drivers/bcmxcp_io.h | 2 +- drivers/bcmxcp_ser.c | 46 +- drivers/bcmxcp_usb.c | 68 +- drivers/belkin-hid.c | 2 +- drivers/bestfcom.c | 2 +- drivers/blazer.c | 64 +- drivers/blazer_ser.c | 5 +- drivers/blazer_usb.c | 16 +- drivers/cps-hid.c | 7 +- drivers/delta_ups-mib.c | 361 + drivers/delta_ups-mib.h | 29 + drivers/dstate-hal.c | 12 +- drivers/dstate-hal.h | 1 + drivers/idowell-hid.c | 4 +- drivers/ietf-mib.c | 24 +- drivers/libhid.c | 12 +- drivers/libshut.c | 4 +- drivers/libusb.c | 7 +- drivers/liebert-hid.c | 3 +- drivers/mge-hid.c | 23 +- drivers/mge-utalk.c | 16 +- drivers/mge-utalk.h | 2 +- drivers/mge-xml.c | 423 +- drivers/mge-xml.h | 37 + drivers/netxml-ups.c | 1118 ++- drivers/nut-ipmipsu.c | 15 +- drivers/nut-libfreeipmi.c | 381 +- drivers/nutdrv_qx.c | 2439 ++++++ drivers/nutdrv_qx.h | 172 + drivers/nutdrv_qx_blazer-common.c | 355 + drivers/nutdrv_qx_blazer-common.h | 41 + drivers/nutdrv_qx_mecer.c | 143 + drivers/nutdrv_qx_mecer.h | 29 + drivers/nutdrv_qx_megatec-old.c | 141 + drivers/nutdrv_qx_megatec-old.h | 29 + drivers/nutdrv_qx_megatec.c | 141 + drivers/nutdrv_qx_megatec.h | 29 + drivers/nutdrv_qx_mustek.c | 141 + drivers/nutdrv_qx_mustek.h | 29 + drivers/nutdrv_qx_voltronic.c | 4209 ++++++++++ drivers/nutdrv_qx_voltronic.h | 29 + drivers/nutdrv_qx_zinto.c | 141 + drivers/nutdrv_qx_zinto.h | 29 + drivers/openups-hid.c | 360 + drivers/openups-hid.h | 38 + drivers/powercom-hid.c | 16 +- drivers/powercom.c | 2 - drivers/powercom.h | 2 - drivers/powerman-pdu.c | 8 +- drivers/powerp-txt.c | 66 +- drivers/powerpanel.c | 5 +- drivers/powerware-mib.c | 16 +- drivers/richcomm_usb.c | 2 +- drivers/riello.c | 1016 +++ drivers/riello.h | 179 + drivers/riello_ser.c | 1055 +++ drivers/riello_usb.c | 1064 +++ drivers/serial.c | 40 +- drivers/serial.h | 2 + drivers/snmp-ups.c | 302 +- drivers/snmp-ups.h | 7 +- drivers/tripplite-hid.c | 11 +- drivers/tripplite_usb.c | 189 +- drivers/upscode2.c | 1 - drivers/usb-common.c | 8 +- drivers/usb-common.h | 4 +- drivers/usbhid-ups.c | 16 +- include/Makefile.am | 22 +- include/Makefile.in | 159 +- include/common.h | 13 + include/config.h.in | 17 +- include/extstate.h | 12 + include/nut_platform.h | 125 + include/proto.h | 12 + include/state.h | 12 + include/upsconf.h | 12 + install-sh | 29 +- lib/Makefile.am | 2 +- lib/Makefile.in | 81 +- lib/README | 1 + lib/libnutclient.pc.in | 13 + ltmain.sh | 95 +- m4/libtool.m4 | 302 +- m4/ltoptions.m4 | 19 +- m4/ltversion.m4 | 10 +- m4/nut_check_libfreeipmi.m4 | 1 - m4/nut_check_libnss.m4 | 75 + m4/nut_check_libopenssl.m4 | 76 + m4/nut_check_libssl.m4 | 72 - m4/nut_check_os.m4 | 4 +- missing | 53 +- scripts/HP-UX/Makefile | 51 - scripts/HP-UX/nut.psf.in | 312 +- scripts/HP-UX/postinstall.in | 81 + scripts/Makefile.am | 5 +- scripts/Makefile.in | 62 +- scripts/README | 1 - scripts/Solaris/Makefile.am | 17 + scripts/{java => Solaris}/Makefile.in | 99 +- scripts/Solaris/makelocal.sh | 5 + scripts/Solaris/nut.in | 63 + scripts/Solaris/pkginfo.in | 11 + scripts/Solaris/postinstall.in | 65 + scripts/Solaris/preremove.in | 8 + scripts/augeas/Makefile.in | 46 +- scripts/augeas/nutupsconf.aug.in | 27 +- scripts/hal/Makefile.in | 61 +- scripts/hal/ups-nut-device.fdi.in | 29 + scripts/hotplug/Makefile.in | 70 +- scripts/hotplug/libhid.usermap | 10 + scripts/java/Makefile.am | 15 - scripts/java/README | 19 - scripts/java/jNut/README | 77 - scripts/java/jNut/pom.xml | 40 - .../java/org/networkupstools/jnut/Client.java | 619 -- .../org/networkupstools/jnut/Command.java | 100 - .../java/org/networkupstools/jnut/Device.java | 279 - .../networkupstools/jnut/NutException.java | 107 - .../jnut/StringLineSocket.java | 137 - .../org/networkupstools/jnut/Variable.java | 120 - .../org/networkupstools/jnut/ClientTest.java | 113 - scripts/java/jNutList/README | 30 - scripts/java/jNutList/pom.xml | 62 - .../org/networkupstools/jnutlist/AppList.java | 112 - scripts/python/Makefile.am | 1 + scripts/python/Makefile.in | 47 +- scripts/python/app/NUT-Monitor | 2 +- scripts/python/app/gui-1.3.glade | 3 +- .../app/locale/it/LC_MESSAGES/NUT-Monitor.mo | Bin 0 -> 6462 bytes scripts/python/app/nut-monitor.desktop | 1 + ...o-subdriver.sh => gen-usbhid-subdriver.sh} | 14 +- scripts/systemd/Makefile.in | 70 +- scripts/systemd/nut-driver.service.in | 4 +- scripts/udev/Makefile.in | 61 +- scripts/udev/nut-usbups.rules.in | 10 + scripts/upower/95-upower-hid.rules | 5 + server/Makefile.in | 55 +- server/conf.c | 29 +- server/conf.h | 15 +- server/desc.h | 14 + server/netcmds.h | 13 + server/netget.h | 13 + server/netinstcmd.h | 13 + server/netlist.h | 13 + server/netmisc.h | 13 + server/netset.h | 13 + server/netssl.c | 458 +- server/netssl.h | 38 +- server/netuser.h | 13 + server/nut_ctype.h | 19 +- server/sstate.h | 12 + server/stype.h | 12 + server/upsd.c | 14 +- server/upsd.h | 12 + server/upstype.h | 12 + server/user-data.h | 13 + server/user.h | 13 + tests/Makefile.in | 61 +- tools/Makefile.am | 2 +- tools/Makefile.in | 59 +- tools/gitlog2changelog.py | 125 + tools/nut-hclinfo.py | 2 +- tools/nut-scanner/Makefile.am | 16 +- tools/nut-scanner/Makefile.in | 141 +- tools/nut-scanner/nut-scan.h | 56 +- tools/nut-scanner/nut-scanner.c | 118 +- tools/nut-scanner/nutscan-device.c | 75 +- tools/nut-scanner/nutscan-device.h | 38 +- tools/nut-scanner/nutscan-display.c | 18 +- tools/nut-scanner/nutscan-init.h | 13 + tools/nut-scanner/nutscan-ip.h | 13 + tools/nut-scanner/nutscan-serial.c | 196 + tools/nut-scanner/nutscan-serial.h | 24 + tools/nut-scanner/nutscan-snmp.h | 17 +- tools/nut-scanner/nutscan-usb.h | 3 + tools/nut-scanner/scan_avahi.c | 2 +- tools/nut-scanner/scan_eaton_serial.c | 439 + tools/nut-scanner/scan_ipmi.c | 322 +- tools/nut-scanner/scan_nut.c | 15 +- tools/nut-scanner/scan_snmp.c | 2 +- tools/nut-scanner/scan_usb.c | 8 +- tools/nut-scanner/scan_xml_http.c | 2 +- tools/nut-usbinfo.pl | 6 + tools/svn2cl.authors | 21 - 451 files changed, 41339 insertions(+), 10887 deletions(-) create mode 100644 clients/nutclient.cpp create mode 100644 clients/nutclient.h create mode 100644 conf/upsmon.conf.sample.in create mode 100644 docs/man/al175.8 create mode 100644 docs/man/al175.txt create mode 100644 docs/man/apcupsd-ups.8 create mode 100644 docs/man/apcupsd-ups.txt rename docs/man/{blazer.txt => blazer-common.txt} (94%) create mode 100644 docs/man/blazer_ser.8 create mode 100644 docs/man/blazer_ser.txt rename docs/man/{blazer.8 => blazer_usb.8} (90%) create mode 100644 docs/man/blazer_usb.txt create mode 100644 docs/man/libnutclient.3 create mode 100644 docs/man/libnutclient.txt create mode 100644 docs/man/libnutclient_commands.3 create mode 100644 docs/man/libnutclient_commands.txt create mode 100644 docs/man/libnutclient_devices.3 create mode 100644 docs/man/libnutclient_devices.txt create mode 100644 docs/man/libnutclient_general.3 create mode 100644 docs/man/libnutclient_general.txt create mode 100644 docs/man/libnutclient_misc.3 create mode 100644 docs/man/libnutclient_misc.txt create mode 100644 docs/man/libnutclient_tcp.3 create mode 100644 docs/man/libnutclient_tcp.txt create mode 100644 docs/man/libnutclient_variables.3 create mode 100644 docs/man/libnutclient_variables.txt create mode 100644 docs/man/nutclient_authenticate.3 create mode 100644 docs/man/nutclient_destroy.3 create mode 100644 docs/man/nutclient_device_forced_shutdown.3 create mode 100644 docs/man/nutclient_device_login.3 create mode 100644 docs/man/nutclient_device_master.3 create mode 100644 docs/man/nutclient_execute_device_command.3 create mode 100644 docs/man/nutclient_get_device_command_description.3 create mode 100644 docs/man/nutclient_get_device_commands.3 create mode 100644 docs/man/nutclient_get_device_description.3 create mode 100644 docs/man/nutclient_get_device_num_logins.3 create mode 100644 docs/man/nutclient_get_device_rw_variables.3 create mode 100644 docs/man/nutclient_get_device_variable_description.3 create mode 100644 docs/man/nutclient_get_device_variable_values.3 create mode 100644 docs/man/nutclient_get_device_variables.3 create mode 100644 docs/man/nutclient_get_devices.3 create mode 100644 docs/man/nutclient_has_device.3 create mode 100644 docs/man/nutclient_has_device_command.3 create mode 100644 docs/man/nutclient_has_device_variable.3 create mode 100644 docs/man/nutclient_logout.3 create mode 100644 docs/man/nutclient_set_device_variable_value.3 create mode 100644 docs/man/nutclient_set_device_variable_values.3 create mode 100644 docs/man/nutclient_tcp_create_client.3 create mode 100644 docs/man/nutclient_tcp_disconnect.3 create mode 100644 docs/man/nutclient_tcp_get_timeout.3 create mode 100644 docs/man/nutclient_tcp_is_connected.3 create mode 100644 docs/man/nutclient_tcp_reconnect.3 create mode 100644 docs/man/nutclient_tcp_set_timeout.3 create mode 100644 docs/man/nutdrv_qx.8 create mode 100644 docs/man/nutdrv_qx.txt create mode 100644 docs/man/nutscan_get_serial_ports_list.3 create mode 100644 docs/man/nutscan_get_serial_ports_list.txt create mode 100644 docs/man/nutscan_scan_eaton_serial.3 create mode 100644 docs/man/nutscan_scan_eaton_serial.txt create mode 100644 docs/man/riello_ser.8 create mode 100644 docs/man/riello_ser.txt create mode 100644 docs/man/riello_usb.8 create mode 100644 docs/man/riello_usb.txt create mode 100644 docs/man/upscli_add_host_cert.3 create mode 100644 docs/man/upscli_add_host_cert.txt create mode 100644 docs/man/upscli_cleanup.3 create mode 100644 docs/man/upscli_cleanup.txt create mode 100644 docs/man/upscli_init.3 create mode 100644 docs/man/upscli_init.txt create mode 100644 docs/nut.dict create mode 100644 docs/nutdrv_qx-subdrivers.txt create mode 100644 docs/snmp-subdrivers.txt create mode 100644 docs/website/old-news.txt create mode 100644 drivers/al175.c create mode 100644 drivers/apcupsd-ups.c create mode 100644 drivers/apcupsd-ups.h create mode 100644 drivers/delta_ups-mib.c create mode 100644 drivers/delta_ups-mib.h create mode 100644 drivers/nutdrv_qx.c create mode 100644 drivers/nutdrv_qx.h create mode 100644 drivers/nutdrv_qx_blazer-common.c create mode 100644 drivers/nutdrv_qx_blazer-common.h create mode 100644 drivers/nutdrv_qx_mecer.c create mode 100644 drivers/nutdrv_qx_mecer.h create mode 100644 drivers/nutdrv_qx_megatec-old.c create mode 100644 drivers/nutdrv_qx_megatec-old.h create mode 100644 drivers/nutdrv_qx_megatec.c create mode 100644 drivers/nutdrv_qx_megatec.h create mode 100644 drivers/nutdrv_qx_mustek.c create mode 100644 drivers/nutdrv_qx_mustek.h create mode 100644 drivers/nutdrv_qx_voltronic.c create mode 100644 drivers/nutdrv_qx_voltronic.h create mode 100644 drivers/nutdrv_qx_zinto.c create mode 100644 drivers/nutdrv_qx_zinto.h create mode 100644 drivers/openups-hid.c create mode 100644 drivers/openups-hid.h create mode 100644 drivers/riello.c create mode 100644 drivers/riello.h create mode 100644 drivers/riello_ser.c create mode 100644 drivers/riello_usb.c create mode 100644 include/nut_platform.h create mode 100644 lib/libnutclient.pc.in mode change 100755 => 100644 ltmain.sh create mode 100644 m4/nut_check_libnss.m4 create mode 100644 m4/nut_check_libopenssl.m4 delete mode 100644 m4/nut_check_libssl.m4 delete mode 100644 scripts/HP-UX/Makefile create mode 100644 scripts/HP-UX/postinstall.in create mode 100644 scripts/Solaris/Makefile.am rename scripts/{java => Solaris}/Makefile.in (80%) create mode 100755 scripts/Solaris/makelocal.sh create mode 100644 scripts/Solaris/nut.in create mode 100644 scripts/Solaris/pkginfo.in create mode 100644 scripts/Solaris/postinstall.in create mode 100644 scripts/Solaris/preremove.in delete mode 100644 scripts/java/Makefile.am delete mode 100644 scripts/java/README delete mode 100644 scripts/java/jNut/README delete mode 100644 scripts/java/jNut/pom.xml delete mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/Client.java delete mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/Command.java delete mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/Device.java delete mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/NutException.java delete mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/StringLineSocket.java delete mode 100644 scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java delete mode 100644 scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java delete mode 100644 scripts/java/jNutList/README delete mode 100644 scripts/java/jNutList/pom.xml delete mode 100644 scripts/java/jNutList/src/main/java/org/networkupstools/jnutlist/AppList.java create mode 100644 scripts/python/app/locale/it/LC_MESSAGES/NUT-Monitor.mo rename scripts/subdriver/{path-to-subdriver.sh => gen-usbhid-subdriver.sh} (95%) create mode 100755 tools/gitlog2changelog.py create mode 100644 tools/nut-scanner/nutscan-serial.c create mode 100644 tools/nut-scanner/nutscan-serial.h create mode 100644 tools/nut-scanner/scan_eaton_serial.c delete mode 100644 tools/svn2cl.authors diff --git a/ChangeLog b/ChangeLog index 79f040f..7188f00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,728 +1,2423 @@ +2013-11-19 Charles Lepple + + * configure.in: configure: update version to 2.7.1 + * docs/website/news.txt: news: add 2.7.1 release + * Makefile.am: ChangeLog: use full path to generator script + * docs/website/projects.txt: website: update related project links + +2013-11-18 Arnaud Quette + + * NEWS: Minor reordering of the news + +2013-11-18 Kirill Smelkov + + * MAINTAINERS, docs/man/.gitignore, docs/man/Makefile.am, + docs/man/al175.txt, docs/man/index.txt, docs/man/nutupsdrv.txt, + docs/new-drivers.txt, drivers/Makefile.am, drivers/al175.c: al175: + updated driver, please restore it Back in 2005 I was young and + idealistic, that's why you finally marked al175 as 'broken', but + now I understand your points (some) and that in NUT you need good + portability. So this time I've checked that al175 compiles with + CC="gcc -std=c89 -pedantic", and CC="gcc -std=c99 -pedantic" Also, + I've tried to clean-up the driver based on feedback from 2009, but + unfortunately I no longer have hardware to test and will not have + any in foreseable future, so the driver was reworked to meet the + project code quality criteria, without testing on real hardware. + Some bugs may have crept in. Changes since last posting in 2009: + - patch rebased on top of current master (v2.6.5-400-g214c442); - + added reference to COMLI communication protocol document; - status + decode errors go to log, instead of setting non-conformant status + like "?T", "?OOST", etc. For such errors new loglevel is + allocated; - "High Battery" status is back; - converted tracing + macros to direct use of upsdebugx and numbers 1,2,3,4 for loglevels + as requested (but now lines got longer because of explicit __func__ + usage); - lowered usage of other macros (e.g. REVERSE_BITS + inlined); - alarm(3) is not used anymore - instead whole I/O + transaction time budget is maintained manually; - man page + converted to asciidoc and supported variables list is merged into + it; - upsdebug_ascii moved to common.c and to separate patch. + ~~~~ Changes since al175 was removed from NUT tree in 2008: - + alloca was eliminated through the help of automatic variables - + debugging/tracing were reworked to (almost always) use NUT builtins + - al175 now uses 3 debug levels for (1=user-level info, 2=protocol + debugging, 3=I/O tracing) - rechecked + http://eu1.networkupstools.org/doc/2.2.0/developers.html and + applied where apporpiate Also > This driver does not support + upsdrv_shutdown(), which makes > it not very useful in a real world + application. This alone > warrants 'experimental' status, but for + the below mentioned > reasons (to name a few), it's flagged + 'broken' instead. Yes, at present shutdown is not supported, and + unfortunately now I don't have AL175 hardware at hand, so that I + can't write it and verify the implementation. I've marked the + driver as DRV_EXPERIMENTAL, although it was tested by us as part of + our systems to work OK for more than three years in production + environment on ships (and we don't need shutdown there -- in + critical situations the system has to operate as long as possible, + untill the battery is empty) Also, all of the previous issues + listed below are now fixed in this al175 version: - ‘return’ + with a value, in function returning void (2x) - anonymous variadic + macros were introduced in C99 - C++ style comments are not allowed + in ISO C90 - ISO C forbids braced-groups within expressions (5x) - + ISO C90 forbids specifying subobject to initialize (16x) - ISO C99 + requires rest arguments to be used (18x) Yes, "All the world is + not an x86 Linux box," and I've tried to make all the world happy. + Please apply. Thanks, Kirill. + * common/common.c, docs/developers.txt, include/common.h: common: + upsdebug_ascii() - to dump a message in ascii For debugging ASCII- + based protocols with control characters (e.g. COMLI) it is handy to + dump messages not in hex, but in ascii with human readable codes. + Add utility function to do it. + +2013-11-17 Charles Lepple + + * docs/man/.gitignore, drivers/.gitignore: apcupsd-ups: ignore + generated files + * drivers/apcupsd-ups.c: apcupsd-ups: fix cut-n-paste error + * drivers/apcupsd-ups.c: apcupsd-ups 0.04: use O_NONBLOCK instead of + FIONBIO + * NEWS, docs/man/index.txt: apcupsd-ups: add NEWS and man page link + * UPGRADING: Mention upsrw output change. + * docs/man/nut-recorder.txt: Reword nut-recorder man page + * UPGRADING: UPGRADING: link to man pages for changed drivers + * configure.in: Bump version to 2.7.1-pre2 + * NEWS, UPGRADING: Update NEWS and UPGRADING for 2.7.1 Closes: + networkupstools#37 + * data/driver.list.in: HCL: StarPower PCF-800VA Reported by Don. + Reference: http://news.gmane.org/find-root.php?message_id=%3cCAPO%2 + bLDnApF3ALNfp%5fwaVpHqSuJ9sajKCKXPXLLsAWUWww7Of%3dw%40mail.gmail.co + m%3e + * data/driver.list.in: HCL: Atlantis Land A03-P551(V1.2) supported by + blazer_usb Reported by Giovanni Panozzo. Reference: + http://news.gmane.org/find- + root.php?message_id=%3c51B76B0C.1080109%40panozzo.it%3e Note that + blazer_usb will eventually be replaced by nutdrv_qx. + * clients/nutclient.h, clients/upsclient.c, + conf/upsmon.conf.sample.in, configure.in, docs/FAQ.txt, + docs/man/libnutclient.txt, docs/man/libnutclient_general.txt, + docs/man/upsmon.conf.txt, docs/security.txt, drivers/powerman- + pdu.c, server/netssl.c: Replace 'connexion' with 'connection' in + English contexts Also reworded a few phrases surrounding the + replacements. + * docs/man/.gitignore: asciidoc: ignore all generated blazer*.html + files + * data/driver.list.in: HCL: update CyberPower entries, including + CP900AVR Reported by Craig Duttweiler Reference: + http://news.gmane.org/find- + root.php?message_id=%3c51295F86.4080601%40twistedsanity.net%3e + * docs/stable-hcl.txt: GitHub issues can also be used to report HCL + updates + * docs/website/projects.txt: Update links to related projects + * docs/download.txt: Update download page * Re-added link to + Buildbot snapshot generator * Updated a few links + +2013-11-13 Daniele Pezzini + + * docs/man/.gitignore, drivers/.gitignore: Add nutdrv_qx to + .gitignore files and remove voltronic from them + +2013-11-12 Charles Lepple + + * docs/man/Makefile.am: a2x: use --destination-dir This option seems + to work now. Previously, Asciidoc source files were copied to the + destination directory, but this did not account for included files. + +2013-11-12 Daniele Pezzini + + * docs/man/nutdrv_qx.txt: nutdrv_qx: fix cross links in manpage + Remove links to voltronic manuals. Fix links to blazer manuals. + +2013-11-12 Charles Lepple + + * .gitignore: git: ignore test-driver, and sort ignores list test- + driver is apparently part of automake, generated for libcpp unit + tests. + +2013-11-10 Charles Lepple + + * docs/man/Makefile.am: Include blazer-common.txt in built tarball + +2013-11-10 Daniele Pezzini + + * clients/upsrw.c: upsrw: publish also the maximum length of STRING + rw variables + +2013-11-09 Daniele Pezzini + + * docs/website/scripts/nut_jquery.js: HCL: Improve readability of + nut_jquery.js + * docs/website/scripts/nut_jquery.js: HCL: make support-level filter + show items with a 'higher or equal' level Reference: https://githu + b.com/networkupstools/nut/issues/48#issuecomment-28134135 + * data/driver.list.in: nutdrv_qx: readd HCL's items lost with the + revert of the voltronic merge + * data/driver.list.in: nutdrv_qx: remove superfluous indications from + the HCL + * data/driver.list.in, docs/Makefile.am, docs/blzr-subdrivers.txt, + docs/man/Makefile.am, docs/man/blzr.txt, docs/man/index.txt, + docs/man/nutdrv_qx.txt, docs/man/nutupsdrv.txt, docs/new- + drivers.txt, docs/nutdrv_qx-subdrivers.txt, drivers/Makefile.am, + drivers/blzr.c, drivers/blzr.h, drivers/blzr_blazer-common.c, + drivers/blzr_blazer-common.h, drivers/blzr_mecer.c, + drivers/blzr_mecer.h, drivers/blzr_megatec-old.c, drivers + /blzr_megatec-old.h, drivers/blzr_megatec.c, + drivers/blzr_megatec.h, drivers/blzr_mustek.c, + drivers/blzr_mustek.h, drivers/blzr_voltronic.c, + drivers/blzr_voltronic.h, drivers/blzr_zinto.c, + drivers/blzr_zinto.h, drivers/nutdrv_qx.c, drivers/nutdrv_qx.h, + drivers/nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer- + common.h, drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_mecer.h, + drivers/nutdrv_qx_megatec-old.c, drivers/nutdrv_qx_megatec-old.h, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_megatec.h, + drivers/nutdrv_qx_mustek.c, drivers/nutdrv_qx_mustek.h, + drivers/nutdrv_qx_voltronic.c, drivers/nutdrv_qx_voltronic.h, + drivers/nutdrv_qx_zinto.c, drivers/nutdrv_qx_zinto.h, tools/nut- + usbinfo.pl: nutdrv_qx: rename 'blzr' driver to 'nutdrv_qx' + Reference: http://lists.alioth.debian.org/pipermail/nut- + upsdev/2013-November/006555.html + * docs/stable-hcl.txt, docs/website/css/web-layout.css: Address Issue + #48 (text-based browsers) Reference: https://github.com/networkups + tools/nut/issues/48#issuecomment-28107101 + +2013-11-08 Arnaud Quette + + * docs/website/projects.txt: Cleanup NUT related projects + +2013-10-25 Daniele Pezzini + + * drivers/blazer.c: blazer: Support UPSes that reply '(ACK' when an + instant command succeeds + * drivers/blazer.c: blazer: Fix a discrepancy in the handling of + instant commands Check if the reply we got back from the UPS is + 'ACK' also for the commands stored in the array. + +2013-10-17 Daniele Pezzini + + * docs/man/blazer-common.txt: blazer: Cosmetic changes + * drivers/blazer_ser.c, drivers/blazer_usb.c: blazer: Fix + blazer_{ser,usb} + TESTING Those things are useless when TESTING + is defined + * docs/man/blazer-common.txt: blazer: Fix user manuals + {Serial,USB}-specific sections belong to 'Extra arguments' section + * drivers/blazer_ser.c, drivers/blazer_usb.c: blazer: Versioning + * drivers/blazer.c: blazer: Add more log infos in instcmd + +2013-10-16 Daniele Pezzini + + * docs/man/Makefile.am, docs/man/blazer-common.txt, + docs/man/blazer.txt, docs/man/blazer_ser.txt, + docs/man/blazer_usb.txt, docs/man/index.txt, + docs/man/nutupsdrv.txt: blazer: Fix {usb,ser} manual Split the old + blazer manual in two manuals named after their executables with a + common source. + * docs/man/blazer.txt: blazer: Fix user manual Fix minor errors Add + ranges Fix test.battery.start (i.e. minutes instead of seconds) + * drivers/blazer.c: blazer: Fix shutdown sequence Split stop pending + shutdown and shutdown itself so that if we have problems stopping + the shutdown (e.g. there's no shutdown pending and the UPS, because + of that, echoes back the command) we can still shutdown the UPS. + * drivers/blazer.c: blazer: Fix minor error in battery guesstimation + We need both battery.voltage.low and battery.voltage.high to + 'guesstimate' the battery charge + * drivers/blazer.c: blazer: Fix test.battery.start T00 doesn't make + any sense: the range should be 01-99 minutes + * drivers/blazer.c: blazer: Fix shutdown.return 'SnR0000' is meant + to put the UPS down and not return 'Sn' should be used instead when + ondelay is 0 + * drivers/blazer.c: blazer: Fix shutdown delay 'offdelay' as used by + this driver is meant to be in the .2-.9 (12..54 seconds) and 01-10 + (60..600 seconds) range. + +2013-11-03 Charles Lepple + + * data/driver.list.in, docs/man/.gitignore, docs/man/Makefile.am, + docs/man/index.txt, docs/man/voltronic_ser.txt, + docs/man/voltronic_usb.txt, drivers/Makefile.am, + drivers/voltronic.c, drivers/voltronic.h, drivers/voltronic_ser.c, + drivers/voltronic_usb.c, tools/nut-usbinfo.pl: Revert "Merge branch + 'voltronic-driver'" This reverts commit + de07fc7f5e7f68b91507b2bf3d4d3b92b774c3ed, reversing changes made to + a074844f88ca352780dd881b5fa3c435832d165e. The voltronic + funtionality will be a subdriver of the new blazer driver. + +2013-11-04 Daniele Pezzini + + * drivers/blzr_voltronic.c: blzr: Fix log message + * drivers/blzr_voltronic.c: blzr: Fix compile-time error Reference: + http://lists.alioth.debian.org/pipermail/nut- + upsdev/2013-November/006549.html + +2013-10-25 Daniele Pezzini + + * drivers/blzr.c: blzr: Cosmetic changes + * drivers/blzr_megatec-old.c, drivers/blzr_megatec.c, + drivers/blzr_mustek.c, drivers/blzr_zinto.c: blzr: Remove + duplicates in the testing struct + +2013-11-04 Daniele Pezzini + + * drivers/blzr_blazer-common.c, drivers/blzr_blazer-common.h: blzr: + Fix blzr_blazer-common.{c,h} header comments + +2013-10-25 Daniele Pezzini + + * docs/blzr-subdrivers.txt, docs/man/blzr.txt, drivers/Makefile.am, + drivers/blzr.c, drivers/blzr_mecer.c, drivers/blzr_mecer.h: blzr: + Add Mecer subdiver (blzr protocol=mecer) A subdriver covering an + idiom similar to the one used by the megatec subdriver, but with + these peculiarities: - if a command/query is rejected or invalid, + the UPS will reply '(NAK\r' - if a command succeeds, the UPS will + reply '(ACK\r' + +2013-10-17 Daniele Pezzini + + * docs/blzr-subdrivers.txt: blzr: Improve developer manual Add note + on how to group items in blzr2nut array. + * drivers/blzr_voltronic.c: blzr: Fix switch/case Forgot to break at + the end of the case + * docs/man/blzr.txt, drivers/blzr.c, drivers/blzr_voltronic.c: blzr: + Cosmetic changes + +2013-10-16 Daniele Pezzini + + * data/driver.list.in, docs/Makefile.am, docs/blzr-subdrivers.txt, + docs/man/Makefile.am, docs/man/blzr.txt, docs/man/index.txt, + docs/man/nutupsdrv.txt, docs/new-drivers.txt, drivers/Makefile.am, + drivers/blzr.c, drivers/blzr.h, drivers/blzr_blazer-common.c, + drivers/blzr_blazer-common.h, drivers/blzr_megatec-old.c, drivers + /blzr_megatec-old.h, drivers/blzr_megatec.c, + drivers/blzr_megatec.h, drivers/blzr_mustek.c, + drivers/blzr_mustek.h, drivers/blzr_voltronic.c, + drivers/blzr_voltronic.h, drivers/blzr_zinto.c, + drivers/blzr_zinto.h, drivers/dstate-hal.c, drivers/dstate-hal.h, + tools/nut-usbinfo.pl: blzr: New driver 'blzr' New driver for Q* + UPSes. Based on blazer, usbhid-ups and voltronic driver. This + might address Issue #25 + +2013-11-04 Charles Lepple + + * include/Makefile.am: nut_include.h: fail gracefully if git fails + Fix proposed by Jim Klimov. + +2013-11-03 Charles Lepple + + * docs/stable-hcl.txt: HCL: typos + * data/driver.list.in, docs/stable-hcl.txt: HCL: minor cleanup + Remove a duplicate Tripp Lite entry, and add a missing "a". + * docs/stable-hcl.txt: HCL documentation: reword + * data/driver.list.in, docs/acknowledgements.txt: HCL: incorporate + Tripp Lite test results Source: + http://article.gmane.org/gmane.comp.monitoring.nut.user/8173 + * docs/Makefile.am, docs/website/Makefile.am: HCL: additional + dependencies Apparently still not complete, though. + * docs/website/scripts/nut_jquery.js: HCL JavaScript: make key case- + insensitive Also special-case the spelling change for Tripp Lite. + TODO: make the value matching case-insensitive as well. + * docs/website/scripts/nut_jquery.js: HCL JavaScript: update the USB- + matching code Slightly more accurate, but later on we should + really track the connection type as a first-class attribute for + each entry in the HCL. Matching the driver name is brittle. + * docs/website/scripts/nut_jquery.js, tools/nut-hclinfo.py: HCL + generation: don't combine driver names The Python and JavaScript + code for generating the HCL was combining adjacent drivers even + when the support level was different. This clutters up the driver + list a bit, but presents a more accurate picture of support levels. + +2013-10-28 Michal Soltys + + * docs/man/apcsmart.txt: apcsmart: minor man update A short note + about availabilty of apcsmart-old. + * docs/man/apcsmart.txt, drivers/apcsmart.c, drivers/apcsmart.h: + apcsmart: string/comment/text trivial changes + +2013-10-27 Charles Lepple + + * tools/nut-scanner/nutscan-device.c: [nut-scanner] Remove unused + variable + +2013-10-18 Vaclav Krpec + + * tools/nut-scanner/nutscan-device.c, tools/nut-scanner/nutscan- + device.h, tools/nut-scanner/nutscan-display.c, tools/nut- + scanner/scan_nut.c: Nutscan fix and enhancement Closes #60 (GitHub + Pull Request via fbohe) + * docs/man/netxml-ups.txt, drivers/mge-xml.c, drivers/mge-xml.h, + drivers/netxml-ups.c: netxml: added RW access, fixed FSD/shutdown + duration bugs, etc. * Fixed bugs in resolution of FSD condition + and computation of shutdown duration. * Added System.* UPS + variables. * Enabled RW access to appropriate UPS variables. * + Added UPS veriables value convertors. * Added support for XML + protocol v3 {GET|SET}_OBJECT query implementing getvar and setvar + routines. * netxml driver man page updated to include info about + the driver-specific configuration parameters. Closes #59 (GitHub + pull request: "Enhancement for netxml driver") Pull request by: + Frédéric BOHE + * clients/upsc.c, clients/upscmd.c, clients/upslog.c, + clients/upsrw.c: Fix AIX linkage of do_upsconf_args() Closes #58 + (GitHub pull request "Fix AIX build") (cherry picked from commit + 5fc7518f97d2738d791c3c77f2257d05e3a9da3b) + +2013-10-26 Charles Lepple + + * configure.in: Define _REENTRANT for all Solaris and AIX platforms. + This is essentially the final commit in pull request #39. + +2013-10-24 Frédéric BOHE + + * drivers/mge-hid.c: Fix wrong OFF status reported when on battery. + UPS.BatterySystem.Charger.PresentStatus.Used is not related to UPS + outputs being on or off but rather to the charger being on or off. + +2013-10-16 Daniele Pezzini + + * scripts/python/Makefile.am, scripts/python/app/gui-1.3.glade, + .../app/locale/it/LC_MESSAGES/NUT-Monitor.mo, + scripts/python/app/locale/it/it.po, scripts/python/app/nut- + monitor.desktop: Add italian translation + * scripts/python/app/locale/fr/fr.po: Add source of french + translation + * scripts/python/app/gui-1.3.glade.h, scripts/python/app/locale/NUT- + Monitor.pot: Add translation sources + +2013-10-16 Frédéric BOHE + + * drivers/powerware-mib.c, drivers/snmp-ups.c, drivers/snmp-ups.h: + Fix Low Battery detection with ConnectUPS cards The low battery + OID itself cannot be read directly. Low battery alarms OID appears + in an alarm array. + +2013-10-02 Arnaud Quette + + * data/driver.list.in: [HCL] Add support for Eaton 5S Add Eaton 5S + (USB ID 0x0463:0xffff) to the list of usbhid-ups supported models + (reported by Matt Ivie) + +2013-10-02 Frédéric BOHE + + * data/driver.list.in: [HCL] update Eaton UPS + +2013-09-30 Frédéric BOHE + + * drivers/libshut.c: Increment driver revision + +2013-09-28 Alf Høgemark + + * drivers/bcmxcp.c: bcmxcp: Fix handling of date and time format The + date and time bytes are packed BCD, so it must be properly decoded. + The check for the Julian or Month:Day format was wrong Info on + format taken from http://old.networkupstools.org/protocols/eaton/XC + P_Rev_C1_Public_021309.pdf + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add mapping for some + more meters and one more command Add mapping for + PW_SET_TIME_AND_DATE command. Add mapping for input.bypass.voltage, + input.bypass.L1-N.voltage, input.bypass.L2-N.voltage, + input.bypass.L3-N.voltage. Add mapping for input.bypass.frequency. + Add mapping for ups.power.nominal if provided as meter, it was + previously only set on init. Change mapping for ups.realpower for + single phase. Tested on Eaton PW9130. + * drivers/bcmxcp.c: bcmxcp: Remove newline on debug output for + outlets + +2013-09-24 Frédéric BOHE + + * drivers/libshut.c, tools/nut-scanner/scan_eaton_serial.c: Change + RTS init level for PnP devices Setting RTS line to 1 disturbs + communication with some devices using serial plug and play feature. + So we need to initialize it to 0. + +2013-09-07 Arnaud Quette + + * data/driver.list.in: Add support for Forza FX-1500LCD Add Forza + FX-1500LCD (USB ID 0x0665:0x5161) to the list of blazer_usb + supported models (reported by Gabor Tjong A Hung) + * data/driver.list.in: Add Schneider APC AP9630 SNMP management card + Add Schneider APC AP9630 SNMP management card to the list of snmp- + ups supported models. Note that it requires the option + "privProtocol=AES" to work (reported by Tim Rice) + * drivers/.gitignore: Git ignore drivers/voltronic_{ser,usb} Add + drivers/voltronic_{ser,usb} to the list of Git ignored files + +2013-08-28 Charles Lepple + + * packaging/RedHat/.gitignore, packaging/debian/.gitignore, + packaging/mandriva/.gitignore, packaging/opensuse/.gitignore: + Remove .gitignore files from long-gone packaging directory. + +2013-08-28 Daniele Pezzini + + * docs/website/css/web-layout.css: Improve CSS readability + * docs/stable-hcl.txt, docs/website/css/web-layout.css: Address Issue + #48 Move legend out of filters' block. (HTML+CSS) + +2013-08-10 Alf Høgemark + + * drivers/bcmxcp.c: bcmxcp: Add instcmd for system test capabilities + based on what UPS support + +2013-08-09 Alf Høgemark + + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Code restructure, + declare variables at top of method After re-reading code style, + compiled with -pedantic, and got some warnings, so moved variable + declarations to the top of methods + * drivers/bcmxcp.c, drivers/bcmxcp_io.h, drivers/bcmxcp_ser.c, + drivers/bcmxcp_usb.c: bcmxcp: Reformat code, remove tabs in the + middle of lines. No code changes After re-reading the developer + code style guide, use spaces and not tabs in the middle of lines to + align text + * drivers/bcmxcp.h: bcmxcp: Reformat code, remove tabs in the middle + of lines. No code changes After re-reading the developer code + style guide, use spaces and not tabs in the middle of lines to + align text + * drivers/bcmxcp.c: bcmxcp: Refactor code, use if-else if rather than + 4 if statements + +2013-08-08 Alf Høgemark + + * drivers/bcmxcp.c: bcmxcp: Add parameter to nut_find_infoval to + control debug output We do not want debug output if + nut_find_infoval does not find a mapped value in all cases. For + example, when a command byte is not mapped to a instcmd, we do not + want debug output. + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Remove + PW_UPDATE_POWER_SOURCE_STATUS_COMMAND, it seems very unlikely to be + used + * drivers/bcmxcp.h: bcmxcp: Cosmetic changes constant definitions. No + code changes. + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Use command map to + control which instcmd are supported Use the command map info + retrieved from UPS to list all commands supported by the UPS at + debug level 2. Use the info from command map to set up which + instcmd the UPS supports. + * drivers/bcmxcp.c: bcmxcp: Use info_lkp_t structure for mapping + topology info Make code simpler by using the info_lkp_t structure + for mapping value from topology block to text presented to user as + ups.description + * drivers/bcmxcp.c: bcmxcp: Cosmetic commentary fixes and remove some + empty lines. No code changes + * drivers/bcmxcp.c: bcmxcp: Output unsupported alarms on debug level + 3, not level 2 The supported alarms in alarm map is outputted at + debug level 2. The unsupported alarms should be outputted at debug + level 3, it is not that interesting. Also remove debug outputted + empty line after table heading line for meter map and alarm map. + * drivers/bcmxcp.c: bcmxcp: Refactor code for setting which alarms + are supported, to avoid code duplication Refactor the code which + checks the alarm map for supported alarms, by making a new method + which checks the alarm bit to see if the alarm is supported. + * drivers/bcmxcp.c: bcmxcp: Only include ups.serial and device.part + if they have a value Only set info about ups.serial and + device.part if the UPS actually report useful info for these. + Remove the handling of space characters as meaning string + termination for ups.serial, this is not done for part number, and + according to bcmxcp spec are these both 16 byte ascii text + messages. Move Nominal output frequence handling up, placing it + just below Nominal output voltage + +2013-08-04 Charles Lepple + + * docs/man/index.txt, docs/man/voltronic_ser.txt, + docs/man/voltronic_usb.txt: voltronic* documentation updates - Add + to man page index - Reword a few sections - Fix typos - Comment out + USB section in voltronic_ser.txt Long-term, we should probably + figure out a better way to maintain two parallel driver pages like + this. The blazer man page is the same for both, with .so links for + the man pages, but then you have USB info in a serial driver page. + For now, voltronic_usb.txt is just a copy of voltronic_ser.txt with + a few _ser-to-_usb replacements. + +2013-08-01 Daniele Pezzini + + * drivers/voltronic.c: Get rid of 'god.knows' variables + +2013-07-26 Arnaud Quette + + * drivers/powercom-hid.c: Forgotten subdriver version bump + +2013-07-25 Arnaud Quette + + * docs/man/upsc.txt, docs/man/upscmd.txt, docs/man/upsrw.txt: + Complete upsclient commands usage note Add a note for scripting + usage, for upsc, upscmd and upsrw, to state the obvious: only + consider the output from stdout for data requested. stderr may + contain error messages, which can disrupt your script execution. + Address the second task and closes Github issue #30 + * clients/upsclient.c: Fix a minor regression in upsclient output + NSS support has introduced a minor regression in upsclient output. + Clients such as upsc, upscmd and upsrw were particularly affected. + This patch restores a default behavior similar to prior versions. + However, "-v" option remains to be implemented. Address the first + task of Github issue #30 + +2013-07-24 Charles Lepple + + * docs/website/web-layout.conf: Add GitHub link to website sidebar + +2013-07-24 Frédéric BOHE + + * configure.in: Fix wrong errno reported by connect on Solaris + Closes issue #43 + * clients/upsclient.c: Fix connect in multi-threaded environnement on + AIX Closes issue #42 + +2013-07-23 Frédéric BOHE + + * clients/upsclient.c: Fix nut-scanner crash on nut server scan, + upscli_sslinit calls upscli_readline which might calls + upscli_disconnect in case of error. upscli_disconnect frees + ups->host and set it to NULL, so it is illegal to use ups->host + after a call to upscli_sslinit. + +2013-07-23 Charles Lepple + + * clients/Makefile.am: Revert "Fix connect in multi-thread + environnement on Solaris" This reverts the previous commit. It + overwrites the CFLAGS which specifies one of the key include + directories. + +2013-07-23 Frédéric BOHE + + * clients/Makefile.am: Fix connect in multi-thread environnement on + Solaris + * tools/nut-scanner/nutscan-device.c, tools/nut-scanner/nutscan- + device.h, tools/nut-scanner/scan_avahi.c, tools/nut- + scanner/scan_eaton_serial.c, tools/nut-scanner/scan_ipmi.c, tools + /nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools/nut- + scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: [nut- + scanner] Make sure to return the first device of the list. + +2013-07-22 Charles Lepple + + * docs/download.txt: Download information: reference Git + * configure.in: Bump NUT version to 2.7.1-pre1 + +2013-07-21 Charles Lepple + + * include/Makefile.am: nut_version.h: trim tag characters through + first slash + +2013-04-27 Charles Lepple + + * include/Makefile.am: nut_version.h: remove SVN plumbing This + should eliminate the "Unversioned directory" message. The source of + the version information is also listed in nut_version.h Closes + Github issue #15 + +2013-07-16 Sven Putteneers + + * scripts/python/app/NUT-Monitor: NUT-Monitor: parse battery.runtime + as float Without this patch, I get a flood of "Invalid literal for + int with base 10: '28500.00" errors. http://news.gmane.org/find- + root.php?message_id=%3c51E54B99.9030908%40gmail.com%3e + +2013-07-10 Arnaud Quette + + * docs/website/news.txt, docs/website/projects.txt: Reference walNUT + Gnome Shell extension + +2013-07-09 Charles Lepple + + * drivers/riello_ser.c, drivers/riello_usb.c: riello: suppress some + warnings about %lu versus %u + +2013-07-09 Elio Parisi + + * drivers/riello.h, drivers/riello_ser.c, drivers/riello_usb.c: + riello: whitespace fixes, and read nominal values only once Bumped + driver versions to 0.02 + +2013-07-07 Alf Høgemark + + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add support for reading + topology map and setting ups.description based on it + * drivers/bcmxcp.c: bcmxcp: Initialize variables in + calculate_ups_load method + * drivers/bcmxcp.c: bcmxcp: Output more info hardware capabilities in + debug mode Add some more debug output on driver init, to let us + know what the hardware support. Outputs length of alarm history + log, topology block length and maximum supported command length. + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add mapping for + input.quality to meters + * drivers/bcmxcp.c: bcmxcp: Add Alf Høgemark as one of the authors + for the driver + * drivers/bcmxcp.c: bcmxcp: Only calculate ups.load if the UPS does + not report it directly If the UPS does not report a meter mapped + to ups.load, we try to calculate the ups.load, but we do not + calculate it if the UPS can report the ups.load directly + * drivers/bcmxcp.c: bcmxcp: Use defined constants in setvar, and + handle BCMXCP_RETURN_ACCEPTED_PARAMETER_ADJUST Use the defined + constants from header file, instead of magic numbers in setvar + method. Add handling of BCMXCP_RETURN_ACCEPTED_PARAMETER_ADJUST. + Report upsdrv_comm_good on successful execution of setvar to UPS. + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add handling of + BCMXCP_RETURN_ACCEPTED_PARAMETER_ADJUST and others in ACK block + Add support for handling more return statuses when exeucting + commands, the most important being + BCMXCP_RETURN_ACCEPTED_PARAMETER_ADJUST, which means the command + was executed. The others added all handles cases where command was + not executed, but you now get a more detailed entry in log as to + why it was not executed. + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add mapping for + output.L.power to meters Not tested on hardware, due to + lack of hardware supporting it + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add mapping for + battery.current.total to meters Not tested on hardware, due to + lack of hardware supporting it + +2013-07-06 Alf Høgemark + + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add mapping for + input.realpower to meters input.realpower is not listed in + http://www.networkupstools.org/docs/developer- + guide.chunked/apas01.html, but other drivers use it. Not tested on + hardware, due to lack of hardware supporting it + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add mapping for + ambient.1.temperature to meters Not tested on hardware, due to + lack of hardware supporting it + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add mapping for + input.power to meters input.power is not listed in + http://www.networkupstools.org/docs/developer- + guide.chunked/apas01.html, but other drivers use it. Not tested on + hardware, due to lack of hardware supporting it + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add mapping for + output.powerfactor and input.powerfactor to meters + input.powerfactor is not listed in + http://www.networkupstools.org/docs/developer- + guide.chunked/apas01.html, so a bit unsure if this should be added. + Not tested on hardware, due to lack of hardware supporting it + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add mapping for + output.L.power.percent to meters Not tested on hardware, + due to lack of hardware supporting it + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: map ups.date and + ups.time to meters. Not testes on hardware, due to lack of + hardware supporting it + * drivers/bcmxcp.h: bcmxcp: Comment which meter map constants are + mapped to nut variables + +2013-07-05 Alf Høgemark + + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Add constants for all + bcmxmp meter map, and replace magic numbers with constants Take + all the bcmxcp meter map defined in http://old.networkupstools.org/ + protocols/eaton/XCP_Meter_Map_021309.pdf and put them into the + bcmxcp.h file. Update the bcmxcp.c file, replacing magic numbers + for meter map by using the corresponding defined constant. + +2013-07-04 Alf Høgemark + + * drivers/bcmxcp.c: bcmxcp: Let decode_instcmd_exec also handle short + read from UPS + * drivers/bcmxcp.c: bcmxcp: Add test.panel.start instcmd support + * drivers/bcmxcp.c: bcmxcp: Use one fuction to decode command + execution status in all places To avoid duplicating the logic + which checks the status of command execution at UPS, add a new + function which contains the check, and use that function whenever + we send a command to UPS and get status back from UPS. + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: Define byte for + choosing which system test to run in header file + * drivers/bcmxcp.c: bcmxcp: Fix outlet number for + outlet.x.shutdown.return if more than 2 outlets + * drivers/bcmxcp.c: bcmxcp: Let upsdrv_shutdown call instcmd for + shutting down To avoid code duplication between upsdrv_shutdown + and instcmd, let the upsdrv_shutdown method first try to issue a + shutdown.return instcmd, and then proceed with shutdown.stayoff if + the shutdown.return failed. This seems to be in line with what the + usbhid driver does. + * drivers/bcmxcp.c: bcmxcp: report upsdrv_comm_good at successful + execution of instcmd + * drivers/bcmxcp.c: bcmxcp: Return more specific error codes from + instcmd Use the available STAT_INSTCMD_FAILED and + STAT_INSTCMD_INVALID as return value from the instcmd method when + applicable, instead of always returning STAT_INSTCMD_UNKNOWN or -1. + +2013-07-03 Alf Høgemark + + * drivers/bcmxcp.c, drivers/bcmxcp.h: bcmxcp: use command map if + supplied. If UPS supplies command map, use it to control what + commands we register with dstate_addcmd. If UPS does not supply + command map, we register default commands with dstate_addcmd + * data/cmdvartab, drivers/bcmxcp.c: bcmxcp: cosmetic: make changes by + Prachi Gandhi more coherent with rest of driver + * drivers/bcmxcp.c: bcmxcp: Fix method name outputted in debug + message Reference: + http://article.gmane.org/gmane.comp.monitoring.nut.devel/6458 + Whitespace was addressed in previous commit (clepple) + +2013-07-03 Charles Lepple + + * drivers/bcmxcp.c: bcmxcp: indentation fixes (no code changes) + +2013-07-03 Alf Høgemark + + * drivers/bcmxcp.c: bcmxcp: add ups.load and battery.voltage.low + Adapted slightly for bcmxcp branch (original patch was against + master). Bump driver version to 0.28 as well. (clepple) Reference: + http://article.gmane.org/gmane.comp.monitoring.nut.devel/6460 + +2013-06-18 Daniele Pezzini + + * drivers/voltronic.c: Add unknown/unused and commented capability + entries Might be useful for future versions. + * data/driver.list.in: Add devices to HCL + * drivers/voltronic.c, drivers/voltronic_ser.c, + drivers/voltronic_usb.c: Fix warning flag + versioning Some UPSes + seem to reply with a \0 just before the end of the warning flag + (obtained with QWS), as a consequence of that, the string in C is 1 + char shorter than expected (the \r is not within the string). -> + Fix voltronic_warning function. Increase driver versions. + * drivers/voltronic.c, drivers/voltronic_ser.c, + drivers/voltronic_usb.c: Fix shutdown.return + versioning Fix + shutdown.return when ondelay = 0 -> split between offdelay < 60 and + offdelay > 60. Increase driver versions. + +2013-06-17 Daniele Pezzini + + * docs/man/voltronic_ser.txt, docs/man/voltronic_usb.txt: Correct + typos @shutdown.{return,stayoff} + * drivers/voltronic.c, drivers/voltronic_ser.c, + drivers/voltronic_usb.c: Imrove shutdown sequence + versioning + Split shutdown and stopping of pending shutdowns so that if there's + no shutdown pending and the UPS doesn't accept a shutdown.stop in + this situation (i.e. it replies '(NAK') the shutdown procedure + doesn't get halted. Increase version number of drivers. + * data/driver.list.in: Correct typos & add software reference in HCL + * docs/man/voltronic_ser.txt, docs/man/voltronic_usb.txt: Improve + docs layout + * drivers/voltronic_usb.c: Add USBDevice_t structure + * drivers/voltronic_usb.c: Add comment so that autogen rules have the + right comment + * drivers/voltronic_ser.c, drivers/voltronic_usb.c: Correct manpage + references + +2013-05-14 Bo Kersey + + * drivers/bestfcom.c: bestfcom: Use fc.idealbvolts for calculating + percent charge 'I have a Best Ferrups 3.1KVA and I noticed that + the percent battery voltage reported from upsc never gets above + 69.9%. I believe there is a mistake in the driver. The battery + percentage is calculated based on the High Battery Alarm Setpoint + (59.6V) instead of the Ideal Voltage which is about 54V (4 + batteries x 13.6V). I examined the source code and found that the + variable fc.fullvolts is the result of querying parameter 67 from + the UPS. This parameter is defined per Ferrups Tip 503 as: "The + battery voltage at which the UPS sound a High Battery alarm" A + better value to use in determining the percent battery voltage + would be fc.idealbvolts which is calculated in the driver source... + I propose the following patch to fix the battery.charge (% battery + full) reading.' Ref: + http://article.gmane.org/gmane.comp.monitoring.nut.user/7891 + +2013-05-13 Michal Soltys + + * docs/nut-names.txt: Add device.uptime to nut-names.txt Also fix + one typo. + * docs/man/apcsmart.txt, drivers/apcsmart.c: apcsmart: allow users to + select non-canonical tty mode The main reason behind this addition + is windows compatibility, see + http://article.gmane.org/gmane.comp.monitoring.nut.user/7762 IGNCR + has been readded earlier in commit + 20c52bee77fa0b3ea3c7f8bec25afd103b7ff4a2 - this might be enough to + handle windows behavior, but if it's not the case - using non + canonical processing (same as is present in apcsmart-old) should + solve any pressing issues. + * drivers/apcsmart_tabs.c: apcsmart: add device.uptime to vartab + +2013-04-26 Michal Soltys + + * drivers/apcsmart.c, drivers/apcsmart_tabs.h: apcsmart: remove + APC_DEPR flag APC_{MULTI, PRESENT} are both sufficient for + handling 1:n and n:1 relations + +2013-04-22 Michal Soltys + + * drivers/apcsmart.c: apcsmart: expand APC_MULTI to apc:nut 1:n cases + +2013-04-15 Michal Soltys + + * drivers/apcsmart.c, drivers/apcsmart_tabs.c: apcsmart: change + approach to 2 digit compatibility entries As reported in + http://article.gmane.org/gmane.comp.monitoring.nut.user/7762 - 2 + digit values reported through 'b' are really >255V voltage values. + So we match whole 00 - FF set as single (fake) compat entry. + +2013-04-16 Michal Soltys + + * drivers/apcsmart.c: apcsmart: remove strchr() check from + legacy_verify() As vartab doesn't contain characters from + APC_UNR_CMDS. + +2013-04-15 Michal Soltys + + * drivers/apcsmart.h: apcsmart: re-add CR to ignore sets Despite + icanon mode, windows (supposedly) is uncapable of ignoring CR in + fashion analogous to IGNCR flag. See + http://article.gmane.org/gmane.comp.monitoring.nut.user/7762 for + rationale. + * drivers/apcsmart_tabs.c: apcsmart: add regex format to + ambient.0.temperature 'T' might (on older units) also mean "ups + uptime", so we want to distinguish that case gracefully. The + formats are: uptime: 000.0 temp: 00.00 + +2013-05-03 Andrew Avdeev + + * drivers/powercom-hid.c: PowerCOM BNT-1000AP HID instant commands + Adds a few vendor-specific HID mappings for PowerCOM. Instant + commands supported on UPS [pcm]: beeper.disable - Disable the UPS + beeper beeper.enable - Enable the UPS beeper beeper.toggle - Toggle + the UPS beeper load.off - Turn off the load immediately load.on - + Turn on the load immediately shutdown.return - Turn off the load + and return when power is back shutdown.stayoff - Turn off the load + and remain off test.battery.start.quick - Start a quick battery + test http://article.gmane.org/gmane.comp.monitoring.nut.devel/6435 + +2013-04-25 Christian Wiese + + * tools/nut-scanner/Makefile.am, tools/nut-scanner/scan_usb.c: nut- + scanner: fix scan_usb to remove trailing spaces from output strings + This patch uses rtrim() from libcommon to remove trailing spaces + from serialnumber, device_name and vendor_name. see: + https://github.com/networkupstools/nut/issues/26 + +2013-04-18 Arnaud Quette + + * docs/new-drivers.txt: Add a reference to the SNMP subdrivers + chapter + +2013-04-15 Michal Soltys + + * drivers/apcsmart.c, drivers/apcsmart.h, drivers/apcsmart_tabs.c, + drivers/apcsmart_tabs.h: apcsmart: move variable regex matching + into vartab This also allows us to properly validate (in near + future) cases when single apc variable can match multiple nut + variables. Other changes: - adjust rexhlp() to follow 0 for false + and non-0 for true, like in the rest of the functions - remove + valid_cmd() as rexhlp() can be used directly with formats in the + table; furthermore the warning (in case of failure) could be + confusing when we add nut:apc n:1 case + +2013-04-11 Arnaud Quette + + * drivers/libusb.c: Set USB timeout to 5 seconds Set the low level + USB timeout back to the standard 5 seconds. This was set to 4 + seconds, for performance reasons, but is now causing issues with + some devices (reported by Stefan "stevenbg", GitHub issue #23) + +2013-04-10 Charles Lepple + + * docs/man/.gitignore: Ignore voltronic_* generated documentation + * drivers/voltronic_usb.c: voltronic_usb: switch to new + is_usb_device_supported() syntax + * tools/nut-usbinfo.pl: Add voltronic_usb driver to USB info + extractor tool + +2013-04-10 Daniele Pezzini + + * data/driver.list.in, docs/man/Makefile.am, + docs/man/voltronic_ser.txt, docs/man/voltronic_usb.txt, + drivers/Makefile.am, drivers/voltronic.c, drivers/voltronic.h, + drivers/voltronic_ser.c, drivers/voltronic_usb.c: New drivers: + voltronic_ser/voltronic_usb Reference: + http://article.gmane.org/gmane.comp.monitoring.nut.devel/6418 + +2013-04-10 Elio Parisi + + * drivers/riello.c, drivers/riello.h, drivers/riello_ser.c, + drivers/riello_usb.c: Riello drivers: fix memset() arguments, and + use stdint.h Reference: + http://article.gmane.org/gmane.comp.monitoring.nut.devel/6417 + +2013-04-04 Émilien Kia + + * configure.in, docs/new-clients.txt, scripts/Makefile.am, + scripts/README, scripts/java/.gitignore, scripts/java/Makefile.am, + scripts/java/README, scripts/java/jNut/.gitignore, + scripts/java/jNut/README, scripts/java/jNut/pom.xml, + .../main/java/org/networkupstools/jnut/Client.java, + .../java/org/networkupstools/jnut/Command.java, + .../main/java/org/networkupstools/jnut/Device.java, + .../org/networkupstools/jnut/NutException.java, + .../java/org/networkupstools/jnut/Scanner.java, + .../org/networkupstools/jnut/StringLineSocket.java, + .../java/org/networkupstools/jnut/Variable.java, + .../java/org/networkupstools/jnut/ClientTest.java, + .../java/org/networkupstools/jnut/ScannerTest.java, + scripts/java/jNutList/README, scripts/java/jNutList/pom.xml, + .../java/org/networkupstools/jnutlist/AppList.java, + scripts/java/jNutWebAPI/README, scripts/java/jNutWebAPI/pom.xml, + .../jnutwebapi/NutRestProvider.java, + .../jnutwebapi/RestWSApplication.java, + .../jnutwebapi/ScannerProvider.java, .../jNutWebAPI/src/main/webapp + /WEB-INF/web.xml: Remove java related files (jNut) which will be + moved to a separated repository. See issues: - + https://github.com/networkupstools/nut/issues/2 - + https://github.com/networkupstools/nut/issues/22 + +2013-03-26 Alex Lov + + * drivers/ietf-mib.c: Fix OID for input.bypass.voltage in ietf-mib.c + Ooops, forgot fix one + * drivers/ietf-mib.c: Fix OIDs for bypass group in ietf-mib.c + Reference http://tools.ietf.org/html/rfc1628#page-12 For bypass + voltage, current and power + +2013-03-13 Arnaud Quette + + * docs/FAQ.txt: Add a FAQ entry for supported but not working USB UPS + +2013-03-10 Charles Lepple + + * scripts/upower/95-upower-hid.rules: upower: update generated rules + file + +2013-03-09 Charles Lepple + + * docs/download.txt: Update VMware ESXi package link (from René + Garcia) + +2013-02-28 Charles Lepple + + * Makefile.am, tools/gitlog2changelog.py: Issue #4: Specify starting + commit to gitlog2changelog.py + +2013-02-27 Michal Soltys + + * drivers/apcsmart_tabs.c: apcsmart: add old APC 600I compatibility + entry Though without 'T' - until we handle situations when single + nut variable is able to correspond to more than one apc var. + Testet-by: Markus Pruehs + +2013-02-26 Charles Lepple + + * tools/gitlog2changelog.py: git-changelog: really fixes #4 (missing + entries) The script was discarding any commits which happened to + include the word 'commit'. + * tools/gitlog2changelog.py: git-changelog: remove re.* calls for + simple string matching + +2013-02-25 Charles Lepple + + * Makefile.am, tools/Makefile.am: git-changelog: Fix list of + distributed files + * tools/gitlog2changelog.py: Fixes issue #4: ChangeLog now includes + single-file commits. + * Makefile.am, tools/gitlog2changelog.py: Issue #4: generate + ChangeLog from git logs This seems to generate long ChangeLog + entries in the format we had with svn2cl, but some commits appear + to be missing. + * tools/gitlog2changelog.py: Import gitlog2changelog.py (2008-12-27) + https://github.com/cryos/avogadro/commit/8be9957e5b3b5675701ef2ed00 + 2aa9e718d4146e#scripts/gitlog2changelog.py + +2013-02-25 Émilien Kia + + * clients/nutclient.cpp, clients/nutclient.h: Add comparison operator + for nut::Device class. Make std::set work and not + dropping devices anymore. + +2012-11-02 Charles Lepple + + * README, scripts/upower/95-upower-hid.rules: apcupsd-ups: link to + man page from README Patch by Arnaud: https://alioth.debian.org/tr + acker/index.php?func=detail&aid=313846&group_id=30602&atid=411544 + +2012-10-30 Charles Lepple + + * docs/man/apcupsd-ups.txt: apcupsd-ups: Update man page with + variables and units + +2012-09-28 Charles Lepple + + * drivers/apcupsd-ups.c, drivers/apcupsd-ups.h: apcupsd-ups: + Additional variables + * drivers/apcupsd-ups.c, drivers/apcupsd-ups.h: apcupsd-ups: Remove + multiplier from ups.load + +2012-09-27 Charles Lepple + + * docs/man/apcupsd-ups.txt, drivers/apcupsd-ups.c: apcupsd-ups: + miscellaneous cleanup + +2012-09-27 Andreas Steinmetz + + * docs/man/Makefile.am, docs/man/apcupsd-ups.txt, + drivers/Makefile.am, drivers/apcupsd-ups.c, drivers/apcupsd-ups.h: + apcupsd client driver https://alioth.debian.org/tracker/?func=det + ail&atid=411544&aid=313846&group_id=30602 + +2013-02-23 Charles Lepple + + * drivers/bcmxcp.c: bcmxcp: remove unused variable + +2013-02-16 Charles Lepple + + * docs/website/news.txt: News: Git conversion + * docs/developers.txt: Update developer documentation for Git + repository + +2013-02-21 Arnaud Quette + + * .gitignore, scripts/HP-UX/.gitignore: Git ignored files completion + +2013-02-21 Michal Soltys + + * drivers/apcsmart_tabs.c: apcsmart: minor fixups to compat. tables + * drivers/apcsmart.c: apcsmart: verify/setup fixups legacy_verify() + - check against commands we always ignore oldapcsetup() - extra + comments, minor flow change + +2013-02-17 Charles Lepple + + * tools/git-svn.authors, tools/svn2cl.authors: Remove obsolete + authors files. + +2013-02-16 Arnaud Quette + + * .gitignore: Git ignored files completion + +2013-02-06 Frederic Bohe + + * scripts/Solaris/nut.in, scripts/Solaris/postinstall.in: [Solaris] + Fix postinstall user/group, and service start * Fix postinstall + user/group detection/creation. * Fix service start depending on the + mode, and add poweroff command. + +2013-02-04 Emilien Kia + + * include/proto.h: Move __cplusplus/extern "C" begin block before to + fix a problem of ifdef when included in real C++ code. + +2013-02-01 Frederic Bohe + + * configure.in, scripts/HP-UX/makedepot.sh, scripts/HP-UX/nut.psf.in, + scripts/HP-UX/postinstall.in: [HP-UX] : add postinstal script for + installing services files. + +2013-02-01 Arnaud Quette + + * docs/man/snmp-ups.txt: Update SNMP driver documentation Mentioning + 'mib' is not needed anymore since NUT 2.6.2. Also mention 'v3' as + an allowed value for 'snmp_version' (reported by Tim Rice) + +2013-01-29 Michal Soltys + + * drivers/apcsmart.c, drivers/apcsmart.h, drivers/apcsmart_tabs.c, + drivers/apcsmart_tabs.h: apcsmart: implement #311678 (multiple + values per variable) This is a bit more general than the original + request. All variables that return multiple comma-separated + values, are added as *.N.* where 1 <= N <= APC_PACK_MAX; the + variables are stored with temporary name *.0.* in apcsmart_tabs.c, + but only at least 1 and at most 4 are added per update run + (superfluous - if any - are removed), with *.0.* placeholder being + ignored. We assume that the particular variables cannot belong to + the capability set at the same time (as reported by user) - + otherwise we will need a bit more complex handling, including + updates to all setvar functions. + * drivers/apcsmart.c, drivers/apcsmart.h: apcsmart: update logging + logic / apc_read() - logging This mostly adds few macros that + implicitly use or pass caller's name (and in case of hard errors, + line number). This allows removal of a few "failed" / "succeeded" + lines (which in practice don't really happen), for example there is + no need for: upslogx(LOG_ERR, "preread_data: apc_write failed"); + as any hard error will be reported by apc_write() internally, + providing the place and line number it was called at. Similarly, + some upslogx / upsdebugx calls were wrapped in analogous macros to + provide caller's name automatically. Debug levels (-D) were + adjusted to require only one letter. - apc_read() It's been a bit + more scrutinized: - filling up full caller's buffer is considered + an error; shouldn't happen unless the ups is somehow damaged or + some model is capable of returning more than 512 bytes in one read + (current max I witnessed is around 270 bytes during capability + read) - timeout reads (whether it's allowed or not) cannot really + have any non-0 count, though sanity check could theoretically be + useful in non-canonical mode; commented out code was added for + reference + * drivers/apcsmart.c: apcsmart: enhance prtchr() So it can handle 4 + returns with static pointers. + * drivers/apcsmart.c: apcsmart: allow timeout on read in smartmode() + As this function is used to "nudge" ups, we should expect it to + timeout. Also avoids extra log spam. + +2013-01-29 Frederic Bohe + + * scripts/Solaris/postinstall.in: Use variables to generate Solaris + postinstall script. + * scripts/Solaris/postinstall.in: Enhance the Solaris post install + script. + +2013-01-22 Arnaud Quette + + * docs/man/Makefile.am: Remove duplicate entries for Eaton serial + scan + * include/Makefile.am, tools/nut-scanner/Makefile.am: List missing + header files to be distributed nutscan-serial.h and nut_platform.h + were missing from the distribution + * scripts/Solaris/.gitignore: Subversion ignored files completion + Mark Solaris generated packaging files as Subversion ignored (no + functional changes) + * docs/man/.gitignore, docs/man/Makefile.am, docs/man/index.txt, + docs/man/nut-scanner.txt, + docs/man/nutscan_get_serial_ports_list.txt, + docs/man/nutscan_scan_avahi.txt, + docs/man/nutscan_scan_eaton_serial.txt, + docs/man/nutscan_scan_ipmi.txt, docs/man/nutscan_scan_nut.txt, + docs/man/nutscan_scan_snmp.txt, docs/man/nutscan_scan_usb.txt, + docs/man/nutscan_scan_xml_http.txt, include/nut_platform.h, tools + /nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, tools/nut- + scanner/nut-scanner.c, tools/nut-scanner/nutscan-device.h, tools + /nut-scanner/nutscan-display.c, tools/nut-scanner/nutscan-serial.c, + tools/nut-scanner/nutscan-serial.h, tools/nut- + scanner/scan_eaton_serial.c, tools/nut-scanner/scan_nut.c: Add nut- + scanner support for Eaton serial units nut-scanner and libnutscan + now provides respectively an option and functions to detect Eaton + serial devices. The following protocols are supported: SHUT, XCP + and Q1 (patch from Frederic Bohe, with parts from Arnaud Quette, + both for Eaton) + * configure.in: Fix for pthread on HP-UX pthread is compiled on a + stub when -lpthread is not explicitly added. This commit is a + duplicate of [[SVN:3801]], from Frederic Bohe (for Eaton) + * drivers/bcmxcp_ser.c: Change baud-rates ordering for auto-detection + * docs/new-drivers.txt, drivers/serial.c, drivers/serial.h: Add non- + fatal versions of ser_open / ser_set_speed + +2013-01-21 Frederic Bohe + + * scripts/Solaris/nut.in, scripts/Solaris/postinstall.in: Allow + start/stop of NUT from Solaris packages + +2013-01-13 Emilien Kia + + * clients/cgilib.h, clients/status.h, clients/upsimagearg.h, + clients/upslog.h, clients/upsmon.h, clients/upssched.h, + clients/upsstats.h, include/common.h, include/extstate.h, + include/proto.h, include/state.h, include/upsconf.h, server/conf.h, + server/desc.h, server/netcmds.h, server/netget.h, + server/netinstcmd.h, server/netlist.h, server/netmisc.h, + server/netset.h, server/netssl.h, server/netuser.h, + server/sstate.h, server/stype.h, server/upsd.h, server/upstype.h, + server/user-data.h, server/user.h, tools/nut-scanner/nut-scan.h, + tools/nut-scanner/nutscan-device.h, tools/nut-scanner/nutscan- + init.h, tools/nut-scanner/nutscan-ip.h: Protect header files for + C++ inclusion. + +2012-12-19 Arnaud Quette + + * data/driver.list.in: HCL: Add support for Lyonn CTB-1200 Add Lyonn + CTB-1200 (USB ID 0x0665:0x5161) to the list of blazer_usb supported + models (reported by Martin Sarsale) + * docs/stable-hcl.txt: Clarify expected report for shutdown testing + State explicitly that, for now, a statement that the user has + actually tested the shutdown procedure successfully is enough + (report from Martin Sarsale) + +2012-12-19 Frederic Bohe + + * scripts/HP-UX/makedepot.sh, scripts/HP-UX/nut.psf.in: Use installed + binaries to create package + +2012-12-18 Arnaud Quette + + * drivers/delta_ups-mib.c: Fix a typo error and current multiplier + factor + * data/driver.list.in, drivers/Makefile.am, drivers/delta_ups-mib.c, + drivers/delta_ups-mib.h, drivers/snmp-ups.c: Support for DeltaUPS + MIB and Socomec Netys RT 1/1 Add preliminary SNMP support for a + new MIB: DeltaUPS MIB, with sysOID ".1.3.6.1.4.1.2254.2.4". The + first known supported devices are Socomec Netys RT 1/1, equiped + with Netvision SNMP card + +2012-12-18 Michal Soltys + + * drivers/apcsmart.c: apcsmart: add update_info() No need for almost + identical update_info_normal() and update_info_all() + * drivers/apcsmart.c: apcsmart: two fixups In poll_data(): we are + not supposed to set variable after its (formally impossible) + removal In upsdrv_shutdown(): wrong comparison + +2012-12-14 Arnaud Quette + + * data/driver.list.in, drivers/powerp-txt.c, drivers/powerpanel.c: + Add support for CyberPower OL3000RMXL2U Add CyberPower + OL3000RMXL2U serial support to the powerpanel driver, text protocol + version (Alioth patch #313910, from Timothy Pearson) + +2012-12-13 Arnaud Quette + + * docs/Makefile.am, docs/new-drivers.txt, docs/snmp-subdrivers.txt, + scripts/subdriver/gen-snmp-subdriver.sh: Helper script to create + SNMP subdrivers stubs Created a new shell script + (scripts/subdriver/gen-snmp-subdriver.sh) to automatically create a + "stub" subdriver. This will make it a lot easier and quicker to + create subdrivers for snmp-ups. A new documentation chapter has + also been added ("How to make a new subdriver to support another + SNMP device") + * drivers/tripplite-hid.c: Add support for newer TrippLite + Smart1500LCD Add newer TrippLite Smart1500LCD (USB ID + 0x09ae:0x3016) to the list of usbhid-ups supported models (reported + by Steve Salier) + +2012-12-12 Frederic Bohe + + * drivers/mge-hid.c: Fix crash with debug level greater or equal to 2 + +2012-12-10 Michal Soltys + + * drivers/apcsmart.c: apcsmart: add prtchr() helper Add prtchr() + helper and simplify reporting when we check whether some APC + cmd/var character is or isn't printable. + * drivers/apcsmart_tabs.c: apcsmart: apc_cmdtab[] fixup Earlier + commit that adjusted regex checks, also changed cmd fields for all + instant commands handled by custom functions. We cannot do that, as + they are not detected as supported this way. + +2012-12-08 Arnaud Quette + + * drivers/mge-utalk.c, drivers/mge-utalk.h: Change Martin Loyer's + mail address As per Martin's request. + * drivers/mge-utalk.c: Improve mge-utalk general behavior Make two + adjustments to improve the general behavior: first, send the double + "Z" prior to "Si" command. Second, inter-commands delay has been + increased to comply with the specification + +2012-12-08 Michal Soltys + + * drivers/apcsmart.c: apcsmart: serial related stuff a bit more + strict Also: - apc_flush() now loops with >0 condition (otherwise + errored apc_read() might cause inf loop) - ser_comm_good/fail() + were kind of missing in write wrappers + * drivers/apcsmart.c, drivers/apcsmart.h: apcsmart: + sdlist/sdtype/advorder changes - verify 'advorder' with regex - + remove unused defines - as the user is directed towards man page + either way (and without it numbers are kind of meaningless), drop + SDMAX + * drivers/apcsmart.c: apcsmart: setup port after variable + sanitization in upsdrv_initups() + * drivers/apcsmart.c: apcsmart: cleanup dstate ok/stale calls + * drivers/apcsmart.c: apcsmart: getbaseinfo() fixup In extremely + unlikely case of failing write, report it up and act accordingly. + * drivers/apcsmart.c, drivers/apcsmart.h, drivers/apcsmart_tabs.c, + drivers/apcsmart_tabs.h: apcsmart: adjust regex logic A bit + simpler / tighter now. + * drivers/apcsmart.c: apcsmart: add var_string_setup() In theory + deprecate_vars() should also consider APC_STRING variables. In + practice - we don't have any variables that are both APC_MULTI and + APC_STRING - but it's more correct this way, so let's do it. + * drivers/apcsmart.c: apcsmart: cosmetics - code shuffling, + comments, flow - rename query_ups() -> legacy_verify() - add few + lines of help directing to man page + * drivers/apcsmart.c: apcsmart: simplify query_ups() / + proto_verification() Both functions rely now on common variable + verificaion function. + * drivers/apcsmart.c: apcsmart: add var_verify() The function will + be used in subsequent commit for common verification. + * drivers/apcsmart.c: apcsmart: shuffle two functions query_ups() + and oldapcsetup() + * drivers/apcsmart.c: apcsmart: simplify query_ups() This commit + changes query_ups() function and makes it rely on the same + deprecate_vars() logic that protocol_verify() requires. We can + shorten the code a bit now, and it allows us to do more + simplifications in subsequent commits. + * drivers/apcsmart.c: apcsmart: add functions informing about + [un]supported cmds/vars In unified fashion, instead of each + protocol-verification related function doing it on its own. + * drivers/apcsmart.c, drivers/apcsmart.h, drivers/apcsmart_tabs.c, + drivers/apcsmart_tabs.h: apcsmart: minor tidying up comments, + trivial changes, code shuffling ... + * drivers/apcsmart.c: apcsmart: remove unused field 'def' from cchar + In apc_ser_diff() reporting differences between + tcgetattr/tcsetattr, 'def' field was unused (along with related + defines). + +2012-12-06 Frederic Bohe + + * tools/nut-scanner/nut-scanner.c: Fix nut-scanner compilation + without pthread + +2012-12-02 Charles Lepple + + * drivers/riello_usb.c: riello_usb.c: eliminate uninitialized + variable + +2012-11-29 Arnaud Quette + + * conf/.gitignore: Subversion ignored files completion Mark + upsmon.conf.sample as Subversion ignored, since it is now generated + from a .in template file (no functional changes) + * conf/Makefile.am, conf/upsmon.conf.sample, + conf/upsmon.conf.sample.in, configure.in: Adapt upsmon.conf sample + to use configured values The sample upsmon.conf provided now + adapts RUN_AS_USER value, and NOTIFYCMD / POWERDOWNFLAG base path + to the user configured values + +2012-11-28 Arnaud Quette + + * drivers/riello.c, drivers/riello_ser.c, drivers/riello_usb.c: Minor + improvements to Riello drivers Fix ups.power.nominal name in + Riello drivers, and its value for GPSER protocol(riello_ser). + device.mfr was also changed in both drivers, and revisions were + bumped to 0.02 (patch from Elio Parisi, Riello) + * data/driver.list.in, drivers/Makefile.am, drivers/openups-hid.c, + drivers/openups-hid.h, drivers/usbhid-ups.c, scripts/upower/95 + -upower-hid.rules: Official support for Minibox openUPS Intelligent + UPS Add a new usbhid-ups subdriver to handle Minibox openUPS + Intelligent UPS (USB ID 0x04d8:0xd004) (patch from Nicu Pavel, + Mini-Box.Com) + +2012-11-28 Charles Lepple + + * conf/upsmon.conf.sample, docs/man/upsmon.conf.txt: Update + references to pager.txt + +2012-11-27 Frederic Bohe + + * data/driver.list.in, docs/man/genericups.txt: Add information about + Eaton Management Card Contact + +2012-11-25 Arnaud Quette + + * drivers/riello.c, drivers/riello.h, drivers/riello_ser.c, + drivers/riello_usb.c: Minor improvements to Riello drivers Fix + functions and variables names to use English language. Also fix + warnings reported by Mac OS X Buildbot and Charles Lepple (patch + from Elio Parisi, Riello) + +2012-11-21 Arnaud Quette + + * docs/acknowledgements.txt: Complete Acknowledgements with a Riello + entry Riello deserves a dedicated entry in the Supporting UPS + manufacturers, for having provided protocols information and + drivers implementations + * docs/man/.gitignore: Subversion ignored files completion Mark + riello_ser and riello_usb HTML manpages as Subversion ignored (no + functional changes) + * data/driver.list.in, docs/man/.gitignore, docs/man/Makefile.am, + docs/man/riello_ser.txt, docs/man/riello_usb.txt, + drivers/.gitignore, drivers/Makefile.am, drivers/riello.c, + drivers/riello.h, drivers/riello_ser.c, drivers/riello_usb.c, tools + /nut-usbinfo.pl: Official support for Riello serial and USB devices + Add two new drivers, riello_ser and riello_usb, to support the + whole ranges of Riello devices: IDG, IPG, WPG, NPW, NDG, DVT, DVR, + DVD, VST, VSD, SEP, SDH, SDL, SPW, SPT, MCT, MST, MCM, MCT, MHT, + MPT and MPM. This completes the official Riello protocols + publication, that happened in May 2012 (developed by Elio Parisi, + from Riello) + +2012-11-20 Arnaud Quette + + * clients/upsclient.h, server/nut_ctype.h: Fix NSS include directives + The current NSS include directives (nss/nss.h) were incorrect. + These were failing on Redhat systems, and working on some others + because of the default include path (reported by Michal Hlavinka, + from Redhat) + +2012-11-19 Arnaud Quette + + * data/driver.list.in: HCL: Add support for Aviem Power RT + 1000-3000VA Add Aviem Systems - Aviem Power RT 1000-3000VA to the + list of blazer_ser supported models (reported by Michael + Dobrovitsky) + +2012-11-19 Emilien Kia + + * tools/nut-scanner/nutscan-device.c: Fix a memory leak in scanner. + +2012-11-13 Arnaud Quette + + * docs/man/.gitignore: Complete the list of Subversion ignored files + Commit r3778 was missing generated HTML files (no functional + changes) + * docs/man/Makefile.am: Fix installation of libnutclient manual pages + Commit r3777 fixed the test target, but libnutclient manual pages + were not actually installed + * docs/man/.gitignore, lib/.gitignore: Complete the list of + Subversion ignored files The merge of NSS and libnutclient + branches have left some new generated files (no functional changes) + * docs/man/libnutclient_commands.txt, + docs/man/libnutclient_devices.txt, + docs/man/libnutclient_general.txt, docs/man/libnutclient_misc.txt, + docs/man/libnutclient_tcp.txt, docs/man/libnutclient_variables.txt: + Fix Buildbot failures on previous commit (man pages) The merge of + the libnutclient branch caused a failure of the 'distcheck-light' + test target. Manual pages documentation in this branch uses a + mechanism to generate multiple manpages from one source file. This + was however conflicting with a Makefile rule, that requires the + generated file to have the same name as the source file. Applies + the same principle by adding the content of the Header section to + the NAME commands list. Also fix a typo error in the Header section + of libnutclient_devices + +2012-11-13 Emilien Kia + + * clients/Makefile.am, clients/nutclient.cpp, clients/nutclient.h, + configure.in, docs/man/Makefile.am, docs/man/index.txt, + docs/man/libnutclient.txt, docs/man/libnutclient_commands.txt, + docs/man/libnutclient_devices.txt, + docs/man/libnutclient_general.txt, docs/man/libnutclient_misc.txt, + docs/man/libnutclient_tcp.txt, docs/man/libnutclient_variables.txt, + docs/new-clients.txt, lib/Makefile.am, lib/README, + lib/libnutclient.pc.in: Merge libnutclient (libcpp) branch Pull + Request #2: "High level C and C++ libnutclient" from + https://github.com/clepple/nut/pull/2 . Hand-merged into SVN trunk + from commit: 701cc571f4f8578e9c82b13c1e9eab509a41cd7f + +2012-11-08 Frederic Bohe + + * docs/man/usbhid-ups.txt, drivers/usbhid-ups.c: Add a command line + to usbhid-ups to activate the max_report tweak. + * drivers/apc-hid.c, drivers/libhid.c: Fix tweak for APC Back-UPS + since it seems to break Back-UPS 700 connectivity (reported by + Denis Serov). Adding some more comments on UPS which need and + which do not need the tweak. Refactored the detection code. + +2012-11-07 Arnaud Quette + + * scripts/subdriver/gen-usbhid-subdriver.sh: Fix USB HID subdriver + generation tool This tool has not been updated since timestamps + were added to driver debug traces. It was thus producing erroneous + results (reported by Nicu Pavel) + +2012-11-01 Arnaud Quette + + * drivers/snmp-ups.c: Fix a crash on outlets management snmp-ups was + crashing when the number of outlets was equal to zero + +2012-10-31 Arnaud Quette + + * docs/man/.gitignore, docs/man/blazer.txt: Fix blazer manual pages + generation to generate blazer, blazer_ser and blazer_usb manual + pages. The same manual page is now distributed and available under + these 3 names (warning to packagers) + * docs/man/Makefile.am, docs/man/asciidoc.conf: Fix manpage + refmiscinfo attributes and multiple NAME refmiscinfo attributes + were previously specified through asciidoc.conf. This approach + prevented from specifying and generating multiple manual pages from + a single source. Moreover, manversion (pointing NUT version) was + mistyped, and thus omitted. Makefile rules now directly define + refmiscinfo through attributes, and allow to solve the long + standing blazer / blazer_ser / blazer_usb related issue, and the + upcoming libnutclient one + +2012-10-19 Arnaud Quette + + * drivers/cps-hid.c, drivers/idowell-hid.c, scripts/subdriver/gen- + usbhid-subdriver.sh: Replace missing occurrences in previous commit + * docs/hid-subdrivers.txt, drivers/libhid.c, scripts/Makefile.am, + scripts/subdriver/gen-usbhid-subdriver.sh, scripts/subdriver/path- + to-subdriver.sh: Rename usbhid subdriver generation script This + script was previously named path-to-subdriver.sh, which was not + enough meaningful. The renaming to gen-usbhid-subdriver.sh also + makes sense with a potential gen-snmp-subdriver.sh + * data/driver.list.in: HCL: Add support for Apollo 850VA Add Apollo + 850VA (USB ID 0x0665:0x5161) to the list of blazer_usb supported + models (reported by Mike Raath) + +2012-10-15 Arnaud Quette + + * configure.in, scripts/systemd/nut-driver.service.in: Fix driver + path in systemd driver unit The driver path, in nut- + driver.service, was not expanded correctly (reported by Marc + Rechté) + +2012-10-15 Michal Soltys + + * data/driver.list.in: HCL: add info about new APC models Info about + new SMT, SMX and SURTD models which require additional card for + "legacy" smart protocol. + +2012-10-15 Arnaud Quette + + * configure.in: Only fail if SSL was explicitly requested + Configuration should not abort if neither OpenSSL nor Mozilla NSS + has been found, and if SSL was not explicitly requested by the + user. This fixes the Buildbot compilation failure on Aix (build + #206) + +2012-10-12 Charles Lepple + + * tools/git-svn.authors, tools/svn2cl.authors: Update Emilien Kia's + email address + +2012-10-11 Arnaud Quette + + * docs/Makefile.am: Fix Solaris compilation failure + +2012-10-10 Arnaud Quette + + * README: Spell check fix (test) + * .gitignore, configure.in, docs/.gitignore, docs/Makefile.am, docs + /nut-qa.txt, docs/nut.dict: Spell checking framework implementation + 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 dictionnary + is also available (docs/nut.dict), providing a glossary of terms + related to power devices and management + * drivers/tripplite_usb.c: Remove POD ("Plain Old Documentation") + With the approval of the author (Charles Lepple), remove POD + ("Plain Old Documentation"). This embedded documentation was + redundant, and is probably out of date, with respect to the + AsciiDoc version + * drivers/powercom.c, drivers/powercom.h, drivers/upscode2.c: Remove + unnecessary RCS $Id lines + +2012-10-05 Arnaud Quette + + * tools/nut-scanner/nut-scan.h: Fix compilation error Define + IPMI_PRIVILEGE_LEVEL_ADMIN value, in case FreeIPMI is not available + +2012-10-04 Arnaud Quette + + * docs/man/nut-scanner.txt, drivers/nut-ipmipsu.c, tools/nut-scanner + /nut-scan.h, tools/nut-scanner/nut-scanner.c, tools/nut- + scanner/scan_ipmi.c: 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 + +2012-10-03 Arnaud Quette + + * docs/acknowledgements.txt: Update acknowledgements + +2012-09-28 Charles Lepple + + * drivers/.gitignore: Cleanup of svn:ignore list in drivers/ (no code + change) + +2012-09-27 Charles Lepple + + * tools/git-svn.authors, tools/svn2cl.authors: Welcome, Václav! (SVN + username mappings) + +2012-09-21 Arnaud Quette + + * docs/nut-qa.txt: Update the link to the Ubuntu QRT script + +2012-09-19 Arnaud Quette + + * drivers/nut-libfreeipmi.c, m4/nut_check_libfreeipmi.m4, tools/nut- + scanner/scan_ipmi.c: Support for FreeIPMI 1.1.x and 1.2.x (#2) + Prepare for supporting API changes in FreeIPMI 1.1.x and 1.2.x. + This 2nd patch, which completes [[SVN:3675]], addresses FRU API + changes, and removes code redundancy. This code has been tested + with FreeIPMI 0.8.12 and the latest [[FreeIPMI SVN]] trunk r9505 + (reported as 1.2.0.beta2 by pkgconfig) + * docs/download.txt, docs/website/news.txt: Update Windows package + publications for 2.6.5-3 + +2012-09-17 Arnaud Quette + + * docs/download.txt, docs/website/news.txt: Update Windows package + publications for 2.6.5-2 + +2012-09-12 Arnaud Quette + + * drivers/bcmxcp_usb.c: Fix data reception loop The new data + reception algorithm was trying to get more data than it should + (patch from Rich Wrenn) + +2012-09-10 Frederic Bohe + + * drivers/apc-hid.c, drivers/apc-hid.h, drivers/libhid.c: Add a tweak + for APC Back UPS ES APC Back UPS ES have a buggy firmware which + overflows on ReportID 0x0c, i.e. + UPS.PowerSummary.RemainingCapacity. This results in battery.charge + not being exposed and endless reconnections on systems with libusb + reporting EOVERFLOW. And it results on a failure to init the driver + for systems with libusb not reporting EOVERFLOW but EIO (i.e. on + Windows). + * tools/nut-scanner/nut-scanner.c: [nut-scanner] Fix a crash when no + start IP is provided. + * drivers/apc-hid.c, drivers/bcmxcp_usb.c, drivers/belkin-hid.c, + drivers/blazer_usb.c, drivers/cps-hid.c, drivers/idowell-hid.c, + drivers/liebert-hid.c, drivers/mge-hid.c, drivers/powercom-hid.c, + drivers/richcomm_usb.c, drivers/tripplite-hid.c, + drivers/tripplite_usb.c, drivers/usb-common.c, drivers/usb- + common.h: Extend USB device support check (from Arnaud Quette) Use + USBDevice_t structure in is_usb_device_supported(), instead of + direct VendorID and ProductID. This allows to pass it to the + specific processing handler for broader check + +2012-09-07 Leo Arias + + * conf/nut.conf.sample: Update nut.conf.sample (grammar and + documentation) https://alioth.debian.org/tracker/?func=detail&ati + d=411544&aid=313762&group_id=30602 + +2012-08-14 Arnaud Quette + + * NEWS, UPGRADING, configure.in, data/driver.list.in, + docs/Makefile.am, docs/configure.txt, docs/documentation.txt, + docs/download.txt, docs/images/eaton-logo.png, + docs/images/hostedby.png, docs/images/simple.png, + docs/man/.gitignore, docs/man/Makefile.am, docs/man/index.txt, + docs/man/macosx-ups.txt, docs/man/mge-shut.txt, + docs/man/nutscan.txt, docs/man/nutscan_scan_avahi.txt, + docs/man/powercom.txt, docs/man/skel.txt, docs/nut-names.txt, + docs/website/.gitignore, docs/website/Makefile.am, docs/website/css + /web-layout.css, docs/website/news.txt, docs/website/old-news.txt, + docs/website/projects.txt, docs/website/web-layout.conf, + drivers/.gitignore, drivers/Makefile.am, drivers/macosx-ups.c, + drivers/mge-hid.c, drivers/powercom-hid.c, drivers/skel.c, drivers + /usbhid-ups.c, drivers/usbhid-ups.h, m4/nut_check_libltdl.m4: Merge + from trunk [[SVN:3679]] to [[SVN:3718]] to ssl-nss-port + +2012-08-09 Arnaud Quette + + * docs/website/.gitignore, docs/website/Makefile.am, + docs/website/news.txt, docs/website/old-news.txt: Integrate + archived news + * docs/nut-names.txt, drivers/mge-hid.c: Add shutdown ability switch + to Eaton units Eaton HID units (using usbhid-ups or [new,old]mge- + shut) were missing a data mapping to allow the change of the + shutdown ability switch. The result was that the UPS was not + powered off, even if all the protocol commands were sent (reported + by Daniel O'Connor) + * docs/download.txt, docs/website/news.txt: Update Windows package + publications for 2.6.5-1 + * docs/man/.gitignore, docs/man/index.txt: Added macosx-ups manual + page to the index Also add generated groff and HTML contents to + the list of Subversion ignored files + 2012-08-08 Arnaud Quette - * [r3712] NEWS, UPGRADING, configure.in, docs/website/news.txt: - Final update for 2.6.5 release - * [r3711] drivers: Subversion ignored files completion - - Mark oldmge-shut binary as Subversion ignored (no functional - changes) - * [r3710] docs/configure.txt, m4/nut_check_libltdl.m4: Complete - libltdl configuration options - - Add configure options to add specific cflags + * NEWS, UPGRADING, configure.in, docs/website/news.txt: Final update + for 2.6.5 release + * drivers/.gitignore: Subversion ignored files completion Mark + oldmge-shut binary as Subversion ignored (no functional changes) + * docs/configure.txt, m4/nut_check_libltdl.m4: Complete libltdl + configuration options Add configure options to add specific cflags (--with-libltdl-includes) and libs (--with-libltdl-libs) for - libltdl. This serves at least to point at non standard location, - as on FreeBSD (reported by David Durieux) + libltdl. This serves at least to point at non standard location, as + on FreeBSD (reported by David Durieux) 2012-08-06 Arnaud Quette - * [r3708] docs/documentation.txt: Add a Wikipedia reference on - Solar controller - * [r3707] docs/Makefile.am, docs/images/eaton-logo.png, + * docs/documentation.txt: Add a Wikipedia reference on Solar + controller + * docs/Makefile.am, docs/images/eaton-logo.png, docs/images/hostedby.png, docs/website/Makefile.am, - docs/website/css/web-layout.css, docs/website/web-layout.conf: - Free NUT from Eaton website hosting - - NUT is no more hosted by Eaton. Arnaud Quette (NUT project - leader) has taken over NUT hosting on his own, to give NUT back - some independance. 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 (http://arnaud.quette.fr) on Gandi servers, - using PaaS. This will allow more flexibility and automation of - the release process + docs/website/css/web-layout.css, docs/website/web-layout.conf: Free + NUT from Eaton website hosting NUT is no more hosted by Eaton. + Arnaud Quette (NUT project leader) has taken over NUT hosting on + his own, to give NUT back some independance. 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 + (http://arnaud.quette.fr) on Gandi servers, using PaaS. This will + allow more flexibility and automation of the release process 2012-08-06 Charles Lepple - * [r3704] configure.in, docs/man/Makefile.am, - docs/man/macosx-ups.txt, drivers/Makefile.am, - drivers/macosx-ups.c: macosx-ups: new OS X Power Sources - meta-driver - - Mac OS X provides UPS status information in a format similar to - what is shown for laptop batteries. This driver will convert that - information into a format compatible with NUT. + * configure.in, docs/man/Makefile.am, docs/man/macosx-ups.txt, + drivers/Makefile.am, drivers/macosx-ups.c: macosx-ups: new OS X + Power Sources meta-driver Mac OS X provides UPS status information + in a format similar to what is shown for laptop batteries. This + driver will convert that information into a format compatible with + NUT. 2012-08-05 Charles Lepple - * [r3703] drivers/skel.c: Update comments in skel.c - - Fixed a typo, and added fatalx() as an alternative to - fatal_with_errno() - * [r3702] docs/man/skel.txt: Update skeleton driver man page. + * drivers/skel.c: Update comments in skel.c Fixed a typo, and added + fatalx() as an alternative to fatal_with_errno() + * docs/man/skel.txt: Update skeleton driver man page. 2012-08-03 Charles Lepple - * [r3701] docs/man/nutscan.txt, docs/man/nutscan_scan_avahi.txt: - nutscan documentation: editing + * docs/man/nutscan.txt, docs/man/nutscan_scan_avahi.txt: nutscan + documentation: editing 2012-07-31 Arnaud Quette - * [r3699] docs/images/simple.png: Remove extraneous text - * [r3698] data/driver.list.in: Add support for UNITEK Alpha650ipF - and Alpha650ipE - - Add UNITEK Alpha650ipF and Alpha650ipE (USB ID 0x0f03:0x0001) to - the list of blazer_usb supported models (reported by Pascal - MIRALLES) - * [r3697] docs/website/projects.txt: Reference Buffalo NAS in - Related projects - - Add a reference in the Related projects, on Buffalo TerraStation - (Business-class) NAS range, which uses NUT for power protection + * docs/images/simple.png: Remove extraneous text + * data/driver.list.in: HCL: Add support for UNITEK Alpha650ipF and + Alpha650ipE Add UNITEK Alpha650ipF and Alpha650ipE (USB ID + 0x0f03:0x0001) to the list of blazer_usb supported models (reported + by Pascal MIRALLES) + * docs/website/projects.txt: Reference Buffalo NAS in Related + projects Add a reference in the Related projects, on Buffalo + TerraStation (Business-class) NAS range, which uses NUT for power + protection 2012-07-30 Arnaud Quette - * [r3696] docs/download.txt, docs/website/news.txt: First NUT - virtualization package (VMware ESXI 5.0) - - Add the reference to the first NUT virtualization package. This - one is currently an external effort to add VMware NUT client for - ESXI 5.0. But this support will be part of NUT in the long run + * docs/download.txt, docs/website/news.txt: First NUT virtualization + package (VMware ESXI 5.0) Add the reference to the first NUT + virtualization package. This one is currently an external effort to + add VMware NUT client for ESXI 5.0. But this support will be part + of NUT in the long run 2012-07-24 Charles Lepple - * [r3692] data/driver.list.in, docs/man/powercom.txt, - drivers/powercom-hid.c: Synchronize Powercom USB documentation - and code comments. - + * data/driver.list.in, docs/man/powercom.txt, drivers/powercom-hid.c: + Synchronize Powercom USB documentation and code comments. Apparently, there are at least two different models with the USB - VID:PID of 0d9f:0004. This update is based on the following - report by Gordon Longland: - - http://lists.alioth.debian.org/pipermail/nut-upsuser/2012-July/007748.html + VID:PID of 0d9f:0004. This update is based on the following report + by Gordon Longland: http://lists.alioth.debian.org/pipermail/nut- + upsuser/2012-July/007748.html 2012-07-23 Charles Lepple - * [r3689] docs/man/powercom.txt: powercom: Mention this driver is - serial only + * docs/man/powercom.txt: powercom: Mention this driver is serial only 2012-07-20 Frederic Bohe - * [r3688] data/driver.list.in, drivers/Makefile.am: Switch mge-shut - to oldmge-shut and newmge-shut to mge-shut - * [r3687] docs/man/mge-shut.txt: Update mge-shut man page for - notification argument. - * [r3686] drivers/usbhid-ups.c: Add a "notification" parameter to - newmge-shut driver. - - It is only here for compatibility with mge-shut driver. It is - ignored since we are always using SHUT_SYNC_OFF in libshut.c. + * data/driver.list.in, drivers/Makefile.am: Switch mge-shut to + oldmge-shut and newmge-shut to mge-shut + * docs/man/mge-shut.txt: Update mge-shut man page for notification + argument. + * drivers/usbhid-ups.c: Add a "notification" parameter to newmge-shut + driver. It is only here for compatibility with mge-shut driver. It + is ignored since we are always using SHUT_SYNC_OFF in libshut.c. + +2012-07-20 Emilien Kia + + * README, docs/Makefile.am, docs/config-notes.txt, docs/contact- + closure.txt, docs/macros.txt, docs/man/mge-shut.txt, + docs/man/upscli_connect.txt, docs/man/upscli_disconnect.txt, + docs/man/upscli_fd.txt, docs/man/upscli_get.txt, + docs/man/upscli_list_next.txt, docs/man/upscli_list_start.txt, + docs/man/upscli_readline.txt, docs/man/upscli_sendline.txt, + docs/man/upscli_ssl.txt, docs/man/upscli_strerror.txt, + docs/man/upscli_upserror.txt, docs/man/upsclient.txt, + docs/scheduling.txt, docs/security.txt: Fix trunk merge (pass 2). + Apply changes to doc to prepare merge to trunk. + +2012-07-19 Emilien Kia + + * clients/upsclient.c, server/netssl.c, server/netssl.h: Fix trunk + merge. Refactor and clean to prepare merge to trunk. 2012-07-19 Frederic Bohe - * [r3683] docs/man/mge-shut.txt: Add a note in man page about - ondelay parameter unit discrepency between newmge-shut and - mge-shut driver. - - mge-shut use a ten seconds unit for ondelay whereas newmge-shut - uses seconds. - * [r3682] drivers/usbhid-ups.c, drivers/usbhid-ups.h: Add a lowbatt - setting to newmge-shut in order to mimic mge-shut setting + * docs/man/mge-shut.txt: Document ondelay parameter unit discrepency + for SHUT drivers mge-shut uses a ten seconds unit for ondelay + whereas newmge-shut uses seconds. + * drivers/usbhid-ups.c, drivers/usbhid-ups.h: Add a lowbatt setting + to newmge-shut in order to mimic mge-shut setting -2012-07-19 Emilien Kia +2012-07-19 Emilien Kia - * [r3681] server/Makefile.am, server/conf.c, server/netcmds.h, + * server/Makefile.am, server/conf.c, server/netcmds.h, server/netssl.c, server/netssl.h, server/ssl.c, server/ssl.h, server/upsd.c: Replace server/ssl.[h|c] by server/netssl.[h|c] in order to prepare nss branch merging. +2012-07-18 Emilien Kia + + * .gitignore, INSTALL, MAINTAINERS, Makefile.am, NEWS, UPGRADING, + autogen.sh, clients/Makefile.am, clients/upsc.c, + clients/upsclient.c, clients/upsclient.h, clients/upsmon.c, + clients/upsmon.h, clients/upsrw.c, clients/upssched.c, + common/Makefile.am, common/common.c, common/parseconf.c, + common/state.c, common/upsconf.c, compile, conf/nut.conf.sample, + conf/upsd.conf.sample, configure.in, data/cmdvartab, + data/driver.list.in, docs/.gitignore, docs/FAQ.txt, + docs/Makefile.am, docs/acknowledgements.txt, docs/cables.txt, + docs/cables/apc.txt, docs/config-notes.txt, docs/configure.txt, + docs/design.txt, docs/developer-guide.txt, docs/developers.txt, + docs/documentation.txt, docs/download.txt, docs/features.txt, + docs/images/advanced.png, docs/images/bigbox.png, + docs/images/bizarre.png, docs/images/nut-logo.png, + docs/images/nut.svg, docs/images/simple.png, docs/macros.txt, docs + /maintainer-guide.txt, docs/man/.gitignore, docs/man/Makefile.am, + docs/man/apcsmart-old.txt, docs/man/apcsmart.txt, + docs/man/bcmxcp.txt, docs/man/belkinunv.txt, docs/man/blazer.txt, + docs/man/dummy-ups.txt, docs/man/index.txt, docs/man/metasys.txt, + docs/man/nut-ipmipsu.txt, docs/man/nut-recorder.txt, docs/man/nut- + scanner.txt, docs/man/nut.conf.txt, docs/man/nutscan.txt, + docs/man/nutscan_add_device_to_device.txt, + docs/man/nutscan_add_option_to_device.txt, + docs/man/nutscan_cidr_to_ip.txt, + docs/man/nutscan_display_parsable.txt, + docs/man/nutscan_display_ups_conf.txt, + docs/man/nutscan_free_device.txt, docs/man/nutscan_init.txt, + docs/man/nutscan_new_device.txt, docs/man/nutscan_scan_avahi.txt, + docs/man/nutscan_scan_ipmi.txt, docs/man/nutscan_scan_nut.txt, + docs/man/nutscan_scan_snmp.txt, docs/man/nutscan_scan_usb.txt, + docs/man/nutscan_scan_xml_http.txt, docs/man/nutupsdrv.txt, + docs/man/oneac.txt, docs/man/powercom.txt, docs/man/snmp-ups.txt, + docs/man/ups.conf.txt, docs/man/upsc.txt, + docs/man/upscli_list_start.txt, docs/man/upsd.users.txt, + docs/man/upsmon.txt, docs/man/upsrw.txt, docs/net-protocol.txt, + docs/new-clients.txt, docs/new-drivers.txt, docs/nut-names.txt, + docs/security.txt, docs/sock-protocol.txt, docs/stable-hcl.txt, + docs/support.txt, docs/website/Makefile.am, docs/website/css/web- + layout.css, docs/website/faviconut.ico, docs/website/faviconut.png, + docs/website/news.txt, docs/website/projects.txt, docs/website/ups- + protocols.txt, docs/website/web-layout.conf, drivers/.gitignore, + drivers/Makefile.am, drivers/apc-hid.c, drivers/apc-mib.c, drivers + /apcsmart-old.c, drivers/apcsmart-old.h, drivers/apcsmart.c, + drivers/apcsmart.h, drivers/apcsmart_tabs.c, + drivers/apcsmart_tabs.h, drivers/bcmxcp.c, drivers/bcmxcp.h, + drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c, drivers/belkin-hid.c, + drivers/belkinunv.c, drivers/bestfcom.c, drivers/bestfortress.c, + drivers/bestpower-mib.c, drivers/bestups.c, drivers/blazer.c, + drivers/blazer_ser.c, drivers/blazer_usb.c, drivers/compaq-mib.c, + drivers/cps-hid.c, drivers/cyberpower-mib.c, drivers/cyberpower- + mib.h, drivers/dstate.c, drivers/dstate.h, drivers/dummy-ups.c, + drivers/dummy-ups.h, drivers/eaton-mib.c, drivers/eaton-mib.h, + drivers/etapro.c, drivers/gamatronic.c, drivers/genericups.c, + drivers/ietf-mib.c, drivers/isbmex.c, drivers/libhid.c, + drivers/libshut.c, drivers/liebert-esp2.c, drivers/liebert-hid.c, + drivers/main.c, drivers/masterguard.c, drivers/metasys.c, drivers + /mge-hid.c, drivers/mge-mib.c, drivers/mge-shut.c, drivers/mge- + utalk.c, drivers/microdowell.c, drivers/netvision-mib.c, drivers + /netxml-ups.c, drivers/nut-ipmi.h, drivers/nut-ipmipsu.c, drivers + /nut-libfreeipmi.c, drivers/oneac.c, drivers/oneac.h, drivers + /powercom-hid.c, drivers/powercom.c, drivers/powercom.h, drivers + /powerware-mib.c, drivers/raritan-pdu-mib.c, drivers/rhino.c, + drivers/safenet.c, drivers/snmp-ups.c, drivers/snmp-ups.h, + drivers/solis.c, drivers/tripplite-hid.c, drivers/tripplite_usb.c, + drivers/tripplitesu.c, drivers/upscode2.c, drivers/upshandler.h, + drivers/usb-common.c, drivers/usbhid-ups.c, include/.gitignore, + include/Makefile.am, include/common.h, include/extstate.h, + include/nut_stdint.h, include/parseconf.h, include/state.h, + lib/.gitignore, lib/Makefile.am, lib/README, lib/libnutscan.pc.in, + lib/libupsclient-config.in, lib/libupsclient.pc.in, + m4/ax_create_stdint_h.m4, m4/nut_check_libavahi.m4, + m4/nut_check_libfreeipmi.m4, m4/nut_check_libltdl.m4, + m4/nut_check_libwrap.m4, m4/nut_check_os.m4, + m4/nut_report_feature.m4, scripts/HP-UX/.gitignore, scripts/HP- + UX/makedepot.sh, scripts/HP-UX/nut.psf.in, scripts/Makefile.am, + scripts/README, scripts/augeas/Makefile.am, scripts/augeas/README, + scripts/avahi/nut.service.in, scripts/java/Makefile.am, + scripts/java/README, scripts/java/jNut/README, + scripts/java/jNut/pom.xml, + .../main/java/org/networkupstools/jnut/Client.java, + .../java/org/networkupstools/jnut/Command.java, + .../main/java/org/networkupstools/jnut/Device.java, + .../org/networkupstools/jnut/NutException.java, + .../java/org/networkupstools/jnut/Scanner.java, + .../org/networkupstools/jnut/StringLineSocket.java, + .../java/org/networkupstools/jnut/Variable.java, + .../java/org/networkupstools/jnut/ClientTest.java, + .../java/org/networkupstools/jnut/ScannerTest.java, + scripts/java/jNutList/README, scripts/java/jNutList/pom.xml, + .../java/org/networkupstools/jnutlist/AppList.java, + scripts/java/jNutWebAPI/README, scripts/java/jNutWebAPI/pom.xml, + .../jnutwebapi/NutRestProvider.java, + .../jnutwebapi/RestWSApplication.java, + .../jnutwebapi/ScannerProvider.java, .../jNutWebAPI/src/main/webapp + /WEB-INF/web.xml, scripts/logrotate/nutlogd, + scripts/python/module/PyNUT.py, scripts/systemd/Makefile.am, + scripts/systemd/README, scripts/systemd/nut-driver.service.in, + scripts/systemd/nut-monitor.service.in, scripts/systemd/nut- + server.service.in, scripts/systemd/nutshutdown.in, + scripts/udev/.gitignore, scripts/udev/Makefile.am, + scripts/udev/README, scripts/udev/nut-ipmipsu.rules.in, + scripts/ufw/README, scripts/ufw/nut.ufw.profile.in, + scripts/upower/95-upower-hid.rules, server/Makefile.am, + server/ctype.h, server/netcmds.h, server/netget.c, server/netget.h, + server/netinstcmd.c, server/netinstcmd.h, server/netlist.c, + server/netlist.h, server/netmisc.c, server/netmisc.h, + server/netset.c, server/netset.h, server/netssl.c, server/netssl.h, + server/netuser.c, server/netuser.h, server/nut_ctype.h, + server/sstate.c, server/sstate.h, server/upsd.c, server/upsd.h, + server/user.c, tests/Makefile.am, tests/cpputest.cpp, + tests/example.cpp, tools/Makefile.am, tools/device-recorder.sh, + tools/git-svn.authors, tools/nut-hclinfo.py, tools/nut-recorder.sh, + tools/nut-scanner/Makefile.am, tools/nut-scanner/README, tools/nut- + scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, tools/nut- + scanner/nutscan-device.c, tools/nut-scanner/nutscan-device.h, tools + /nut-scanner/nutscan-display.c, tools/nut-scanner/nutscan-init.c, + tools/nut-scanner/nutscan-init.h, tools/nut-scanner/nutscan-ip.c, + tools/nut-scanner/nutscan-ip.h, tools/nut-scanner/scan_avahi.c, + tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, tools + /nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, tools/nut- + scanner/scan_xml_http.c, tools/nut-snmpinfo.py, tools/nut- + usbinfo.pl, tools/svn2cl.authors: Merge from trunk [[SVN:2848]] to + [[SVN:3679]] to ssl-nss-port. Note: a problem is occurring for + server/ssl.[h|c]: they have been moved to server/netssl.[h|c] but + consider them as removed. For the branch merging to trunk, + consider paying attention to the case of these files (removing them + by hand). + 2012-07-17 Arnaud Quette - * [r3678] drivers/apc-mib.c: APC SNMP MIB update and completion - - Add available high precision values, new variables + * drivers/apc-mib.c: APC SNMP MIB update and completion Add + available high precision values, new variables (input.transfer.reason, battery.current.total and ups.test.date), - and move ambient.{temperature,humidity}.{high,low} to - ambient.1.*, since they relate to alarm threshold of external - probe 1 (patch from Hong-Gunn Chew) - * [r3677] docs/nut-names.txt: Clarify the use of multiple ambient - sensors - + and move ambient.{temperature,humidity}.{high,low} to ambient.1.*, + since they relate to alarm threshold of external probe 1 (patch + from Hong-Gunn Chew) + * docs/nut-names.txt: Clarify the use of multiple ambient sensors Multiple sensors can be exposed using the indexed notation. 'ambient.*', without index or using '0', relates to the embedded sensor. For example: 'ambient.temperature' represent the embedded sensor temperature. Other sensors (external, communication card, ...) can use indexes from '1' to 'n'. For example: - 'ambient.1.temperature' for the first external sensor - temperature. - * [r3676] docs/nut-names.txt: NUT namespace completion - - Add two new variables 'ups.test.date' and - 'battery.current.total'. Also add a note on the 'ambient' - collection for supporting multiple sensors + 'ambient.1.temperature' for the first external sensor temperature. + * docs/nut-names.txt: NUT namespace completion Add two new variables + 'ups.test.date' and 'battery.current.total'. Also add a note on the + 'ambient' collection for supporting multiple sensors 2012-07-16 Arnaud Quette - * [r3675] drivers/nut-ipmipsu.c, drivers/nut-libfreeipmi.c, - m4/nut_check_libfreeipmi.m4, tools/nut-scanner/nut-scanner.c, - tools/nut-scanner/scan_ipmi.c: Support for FreeIPMI 1.1.x and - 1.2.x - + * drivers/nut-ipmipsu.c, drivers/nut-libfreeipmi.c, + m4/nut_check_libfreeipmi.m4, tools/nut-scanner/nut-scanner.c, tools + /nut-scanner/scan_ipmi.c: Support for FreeIPMI 1.1.x and 1.2.x Prepare for supporting API changes in FreeIPMI 1.1.x and 1.2.x. - This is mostly related to SDR API simplifications. A 2nd - iteration will probably address code redundancy, whenever - possible + This is mostly related to SDR API simplifications. A 2nd iteration + will probably address code redundancy, whenever possible 2012-07-10 Arnaud Quette - * [r3674] data/driver.list.in, drivers/eaton-mib.c, - drivers/eaton-mib.h, drivers/snmp-ups.c, drivers/snmp-ups.h: Add - support for Eaton ePDU Switched (Pulizzi) - - Implement support for older Eaton / Powerware ePDU Switched. - These were once sold as Pulizzi, and have now been replaced by - newer model (Eaton Marlin implementation and others) + * data/driver.list.in, drivers/eaton-mib.c, drivers/eaton-mib.h, + drivers/snmp-ups.c, drivers/snmp-ups.h: Add support for Eaton ePDU + Switched (Pulizzi) Implement support for older Eaton / Powerware + ePDU Switched. These were once sold as Pulizzi, and have now been + replaced by newer model (Eaton Marlin implementation and others) -2012-07-09 Emilien Kia +2012-07-09 Emilien Kia - * [r3672] configure.in: Fix CppUnit detection. - - Fix inconsistent test for CppUnit install (using pkg-config) to - really enable unit tests. + * configure.in: Fix CppUnit detection. Fix inconsistent test for + CppUnit install (using pkg-config) to really enable unit tests. 2012-07-05 Arnaud Quette - * [r3671] docs/man/nut-ipmipsu.txt: Fix an error on possible power - supplies status + * docs/man/nut-ipmipsu.txt: Fix an error on possible power supplies + status 2012-07-04 Arnaud Quette - * [r3670] clients/upssched.c: Fix upssched regression - - Coverity branch merge r3555 introduced a regression: 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 (patch from Oliver Schonefeld) - * [r3669] Makefile.am, configure.in, tests, tests/Makefile.am: Add - basic infrastructure for unit tests - - Merge eki-unittests branch, with some adjustments, to add a basic - initial infrastructure for unit tests, using CppUnit (v1.9.6+) - (from Emilien Kia, from Eaton) + * clients/upssched.c: Fix upssched regression Coverity branch merge + [[SVN:3555]] introduced a regression: 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 (patch from + Oliver Schonefeld) + * Makefile.am, configure.in, tests/.gitignore, tests/Makefile.am, + tests/cpputest.cpp, tests/example.cpp: Add basic infrastructure for + unit tests Merge eki-unittests branch, with some adjustments, to + add a basic initial infrastructure for unit tests, using CppUnit + (v1.9.6+) (from Emilien Kia, from Eaton) 2012-07-03 Arnaud Quette - * [r3668] scripts/systemd/nut-driver.service.in, - scripts/systemd/nutshutdown.in: Fix upsdrvctl call path - - upsdrvctl is located in @driverexecdir@, not @SBINDIR@ (reported - by Michal Hlavinka, from Redhat) + * scripts/systemd/nut-driver.service.in, + scripts/systemd/nutshutdown.in: Fix upsdrvctl call path upsdrvctl + is located in @driverexecdir@, not @SBINDIR@ (reported by Michal + Hlavinka, from Redhat) 2012-06-15 Arnaud Quette - * [r3666] configure.in: Adapt systemd installation directory #2 - - Complete commit r3665, by also adapting paths for service files + * configure.in: Adapt systemd installation directory #2 Complete + previous commit by also adapting paths for service files 2012-06-14 Arnaud Quette - * [r3665] configure.in: Adapt systemd installation directory - - Adapt systemd installation directory for the shutdown script, so - that it does not try to install it in the actual system - directory, but to the pointed build directory, including a sub - directory prefix - * [r3664] docs/new-clients.txt: Fix broken link to upscli_*(3) HTML - manual pages + * configure.in: Adapt systemd installation directory Adapt systemd + installation directory for the shutdown script, so that it does not + try to install it in the actual system directory, but to the + pointed build directory, including a sub directory prefix + * docs/new-clients.txt: Fix broken link to upscli_*(3) HTML manual + pages 2012-06-12 Arnaud Quette - * [r3662] docs/new-drivers.txt: Forgotten mention - - upsdrv_info_t->name is also published as "driver.name" variable - * [r3661] docs/man/belkinunv.txt, drivers/belkinunv.c, - drivers/main.c, drivers/masterguard.c, drivers/metasys.c, - drivers/mge-utalk.c, drivers/microdowell.c, - drivers/nut-ipmipsu.c, drivers/safenet.c, drivers/tripplitesu.c, - drivers/usbhid-ups.c: Remove redundant driver.version.internal - publication - * [r3660] configure.in, docs/configure.txt, - docs/man/nut-scanner.txt: Add missing references to libltdl for - nut-scanner - - nut-scanner requires libltdl (Libtool dlopen abstraction) since - NUT 2.6.3. Documentations have been completed, and nut-scanner - build status is now exposed in the build configuration summary - * [r3659] drivers/snmp-ups.c: Fix publication of - driver.version.data - - Publish the MIB name and version in driver.version.data, rather - than merged into driver.version.internal - * [r3658] drivers/netxml-ups.c: Fix publication of - driver.version.data - + * configure.in: Fix WITH_SSL and WITH_NSS AM_CONDITIONAL definitions + nut_with_nss / nut_with_openssl must be set to "yes", otherwise + AM_CONDITIONAL counterpart WITH_NSS / WITH_SSL is not defined + * docs/new-drivers.txt: Forgotten mention upsdrv_info_t->name is + also published as "driver.name" variable + * docs/man/belkinunv.txt, drivers/belkinunv.c, drivers/main.c, + drivers/masterguard.c, drivers/metasys.c, drivers/mge-utalk.c, + drivers/microdowell.c, drivers/nut-ipmipsu.c, drivers/safenet.c, + drivers/tripplitesu.c, drivers/usbhid-ups.c: Remove redundant + driver.version.internal publication + * configure.in, docs/configure.txt, docs/man/nut-scanner.txt: Add + missing references to libltdl for nut-scanner nut-scanner requires + libltdl (Libtool dlopen abstraction) since NUT 2.6.3. + Documentations have been completed, and nut-scanner build status is + now exposed in the build configuration summary + * drivers/snmp-ups.c: Fix publication of driver.version.data Publish + the MIB name and version in driver.version.data, rather than merged + into driver.version.internal + * drivers/netxml-ups.c: Fix publication of driver.version.data netxml-ups subdriver version is to be tracked in driver.version.data, not in driver.version.internal - * [r3657] docs/nut-names.txt: Add missing variable - driver.version.data - - Add variable driver.version.data, to track version of the - internal data mapping, for generic drivers (reported by Luiz - Angelo Daros de Luca) - * [r3656] docs/nut-names.txt: Fix comment for - driver.version.internal - - Drivers internal version are always tracked separately, and - stored in driver.version.internal + * docs/nut-names.txt: Add missing variable driver.version.data Add + variable driver.version.data, to track version of the internal data + mapping, for generic drivers (reported by Luiz Angelo Daros de + Luca) + * docs/nut-names.txt: Fix comment for driver.version.internal + Drivers internal version are always tracked separately, and stored + in driver.version.internal 2012-06-11 Michal Soltys - * [r3655] drivers/apcsmart.c: apcsmart: tcsetattr/tcgetattr - addendum - - This small patch moves the comparison sequence into separate - function. No functional changes. - - Also minor retab! run on defines. + * drivers/apcsmart.c: apcsmart: tcsetattr/tcgetattr addendum This + small patch moves the comparison sequence into separate function. + No functional changes. Also minor retab! run on defines. 2012-06-11 Arnaud Quette - * [r3654] data/driver.list.in: Add support for REDi Blazer - - Add REDi Blazer 400VA / 600VA / 800VA to the list of blazer_ser - supported models (reported by Marius Gavrilescu) - * [r3653] docs/nut-names.txt: Fix a typo error on power.minimum - description - + * data/driver.list.in: HCL: Add support for REDi Blazer Add REDi + Blazer 400VA / 600VA / 800VA to the list of blazer_ser supported + models (reported by Marius Gavrilescu) + * docs/nut-names.txt: Fix a typo error on power.minimum description power.minimum is really the minimum seen apparent power in VA (reported by Luiz Angelo Daros de Luca) 2012-06-07 Arnaud Quette - * [r3652] data/driver.list.in, drivers/blazer_usb.c: Add support - for Online Zinto A - - Add Online Zinto A (USB ID 0x06da:0x0601) to the list of - blazer_usb supported models (reported by Carsten Burkhardt) + * data/driver.list.in, drivers/blazer_usb.c: HCL: Add support for + Online Zinto A to blazer_usb Add Online Zinto A (USB ID + 0x06da:0x0601) to the list of blazer_usb supported models (reported + by Carsten Burkhardt) 2012-06-07 Charles Lepple - * [r3651] drivers/oneac.h: Remove unused constants to fix LLVM - compilation error. + * drivers/oneac.h: Remove unused constants to fix LLVM compilation + error. 2012-06-05 Arnaud Quette - * [r3650] docs/website/news.txt, docs/website/projects.txt: WMNut - updates - + * docs/website/news.txt, docs/website/projects.txt: WMNut updates Update WMNut release (0.64) and hosting URL 2012-06-04 Arnaud Quette - * [r3647] docs/download.txt, docs/website/news.txt: Update Windows - package publications for 2.6.4-1 + * docs/download.txt, docs/website/news.txt: Update Windows package + publications for 2.6.4-1 2012-05-31 Arnaud Quette - * [r3643] NEWS, UPGRADING, configure.in, docs/website/news.txt: - Final update for 2.6.4 release + * NEWS, UPGRADING, configure.in, docs/website/news.txt: Final update + for 2.6.4 release 2012-05-30 Arnaud Quette - * [r3642] data/driver.list.in: Add support for Cyber Power Systems - CP1000PFCLCD - - Add CyberPower Systems CP1000PFCLCD (USB ID 0x0764:0x0501) to the - list of usbhid-ups supported models (reported by David Owen) - * [r3641] drivers/apc-mib.c: Track more APC SNMP sysOID values, as - comments - * [r3640] drivers/upshandler.h: Fix code spacing (no functional - change) - * [r3639] drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c: Add some - debug traces on incoming / outgoing data - * [r3638] INSTALL: Add missing reference to nut.conf manual page - * [r3637] drivers/bestfortress.c: Improve Best Fortress LI675VA - support - + * data/driver.list.in: HCL: Add support for Cyber Power Systems + CP1000PFCLCD Add CyberPower Systems CP1000PFCLCD (USB ID + 0x0764:0x0501) to the list of usbhid-ups supported models (reported + by David Owen) + * drivers/apc-mib.c: Track more APC SNMP sysOID values, as comments + * drivers/upshandler.h: Fix code spacing (no functional change) + * drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c: Add some debug traces + on incoming / outgoing data + * INSTALL: Add missing reference to nut.conf manual page + * drivers/bestfortress.c: Improve Best Fortress LI675VA support Apply an old missed patch: all responses are preceded and terminated by "CR LF". But bestfortress driver discards anything after the first "CR LF". This patch trims everything up to the first LF. (patch from Jørgen Thomsen) - * [r3636] drivers/metasys.c: Remove extraneous spaces (no - functional changes) + * drivers/metasys.c: Remove extraneous spaces (no functional changes) + +2012-05-30 Prachi Gandhi + + * scripts/Solaris/preinstall: Updated preinstall script for 'nut' + group, user checking + * Makefile.am, scripts/Solaris/Makefile.am, + scripts/Solaris/preinstall: Added checking for existing 'nut' + group, user and updated package name 2012-05-29 Arnaud Quette - * [r3633] common/parseconf.c: Fix CVE-2012-2944: upsd can be - remotely crashed - - NUT server (upsd), from versions 2.4.0 to 2.6.3, are exposed to - crashes when receiving random data from the network. - - This issue is related to the way NUT parses characters, - especially from the network. Non printable characters were missed - from strings operation (such as strlen), but still copied to the - buffer, causing an overflow. - - Thus, fix NUT parser, to only allow the subset Ascii charset from - Space to ~ - - (Reported by Sebastian Pohle, Alioth bug #313636, CVE-2012-2944) - * [r3632] data/driver.list.in: Add support for Lexis X-power Tigra - 1kVA - + * common/parseconf.c: Fix CVE-2012-2944: upsd can be remotely crashed + NUT server (upsd), from versions 2.4.0 to 2.6.3, are exposed to + crashes when receiving random data from the network. This issue is + related to the way NUT parses characters, especially from the + network. Non printable characters were missed from strings + operation (such as strlen), but still copied to the buffer, causing + an overflow. Thus, fix NUT parser, to only allow the subset Ascii + charset from Space to ~ (Reported by Sebastian Pohle, Alioth bug + #313636, CVE-2012-2944) + * data/driver.list.in: HCL: Add support for Lexis X-power Tigra 1kVA Add Lexis X-power Tigra 1kVA to the list of blazer_ser or bestups supported models (reported by Tmima Pliroforikis Perifereiakis Enotitas Pierias) - * [r3631] data/driver.list.in: Encourage the use of blazer_ser - instead of bestups - - Mention blazer_ser as prefered compared to bestups. Recent - changes to blazer_ser have made it possible to use it instead of - bestups. In the end, bestups will be replaced by blazer_ser, as - for other Megatec/Q1 drivers - * [r3629] drivers/blazer.c, drivers/blazer_ser.c: Improve Best UPS - support in blazer - - Best UPS units, which use a subset of the Megatec/Q1 protocol, - supported by the blazer drivers, can now work with blazer_ser. - This support is still limited, but already offers a decent set of - features + * data/driver.list.in: HCL: Encourage the use of blazer_ser instead + of bestups Mention blazer_ser as prefered compared to bestups. + Recent changes to blazer_ser have made it possible to use it + instead of bestups. In the end, bestups will be replaced by + blazer_ser, as for other Megatec/Q1 drivers + +2012-05-29 Prachi Gandhi + + * Makefile.am, configure.in, tools/nut-scanner/Makefile.am, tools + /nut-scanner/nut-scan.h, tools/nut-scanner/nutscan-init.c, tools + /nut-scanner/nutscan-init.h, tools/nut-scanner/scan_snmp.c: Changes + in nut-scanner to remove Sparc 'usmAESPrivProtocol' error while + creating package + +2012-05-29 Arnaud Quette + + * drivers/blazer.c, drivers/blazer_ser.c: Improve Best UPS support in + blazer Best UPS units, which use a subset of the Megatec/Q1 + protocol, supported by the blazer drivers, can now work with + blazer_ser. This support is still limited, but already offers a + decent set of features 2012-05-25 Arnaud Quette - * [r3628] server/user.c: Add debug traces for instcmds and actions - - Whenever upsd adds an instant command or an action, from - upsd.users, display a debug trace - * [r3627] docs/man/upsd.users.txt: Clarify multiple actions - specification - + * server/user.c: Add debug traces for instcmds and actions Whenever + upsd adds an instant command or an action, from upsd.users, display + a debug trace + * docs/man/upsd.users.txt: Clarify multiple actions specification Add more details and an example, to illustrate multiple actions specification (reported by Emilien Kia, from Eaton) 2012-05-24 Arnaud Quette - * [r3626] data/driver.list.in: Add support for Eaton Management - Card Contact - - Add Eaton Management Card Contact (ref 66104) to the list of - mge-shut or mge-utalk supported models - * [r3625] drivers/compaq-mib.c: HP SNMP completion - - Complete HP SNMP mapping table, with thresholds, nominal values - and more commands + * data/driver.list.in: HCL: Add support for Eaton Management Card + Contact Add Eaton Management Card Contact (ref 66104) to the list + of mge-shut or mge-utalk supported models + * drivers/compaq-mib.c: HP SNMP completion Complete HP SNMP mapping + table, with thresholds, nominal values and more commands 2012-05-23 Arnaud Quette - * [r3623] clients/upsrw.c, common/state.c, - docs/man/upscli_list_start.txt, docs/man/upsrw.txt, - docs/net-protocol.txt, docs/new-drivers.txt, - docs/sock-protocol.txt, drivers/dstate.c, drivers/dstate.h, - include/extstate.h, include/state.h, - scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.java, - server/netget.c, server/netlist.c, server/netset.c, - server/sstate.c, server/sstate.h: Support of ranges of values for - writable variables - - Merge branch that implement [RFC]: new dstate_addrange() and - "LIST RANGE" command: it is now possible to specify one or more - ranges of values for writable variables, using dstate_addrange() - in drivers. upsd also supports the new type 'RANGE' for 'GET - TYPE', along with the 'LIST RANGE' command. Finally, users can - interact through upsrw, which displays the supported ranges, and - enforces new value checking against the provided boundaries - * [r3622] docs/website/projects.txt: Reference Thecus NAS in - Related projects - - Add a reference in the Related projects, on Thecus NAS range, - which uses NUT for power protection + * docs/website/projects.txt: Reference Thecus NAS in Related projects + Add a reference in the Related projects, on Thecus NAS range, which + uses NUT for power protection 2012-05-22 Arnaud Quette - * [r3621] drivers/apcsmart.c, drivers/apcsmart.h: Complete r3620 - for HP-UX - - HP-UX does not support VREPRINT, so make it conditional - * [r3620] drivers/apcsmart.c, drivers/apcsmart.h: Fix commit r3603 - - Commit r3603 (fix tcsetattr() / tcgetattr() issue) has introduced - some incompatibility with older Unix systems, such as Solaris, - Aix and HP-UX. The present commit should address it - * [r3618] configure.in, docs/net-protocol.txt, server/netcmds.h, + * drivers/apcsmart.c, drivers/apcsmart.h: Complete previous commit + for HP-UX HP-UX does not support VREPRINT, so make it conditional + * drivers/apcsmart.c, drivers/apcsmart.h: Fix commit [[SVN:3603]] + Commit [[SVN:3603]] (fix tcsetattr() / tcgetattr() issue) has + introduced some incompatibility with older Unix systems, such as + Solaris, Aix and HP-UX. The present commit should address it. + * scripts/java/jNut/src/main/java/org/networkupstools/jnut/Variable.j + ava: Adjust comment (no functional change) + * configure.in, docs/net-protocol.txt, server/netcmds.h, server/netmisc.c, server/netmisc.h: Add versioning to the network + protocol Due to the number of recent evolutions to the network + protocol, along with other possible future changes, NUT network + protocol is now versioned. The chapter "Network protocol + information", of the developer guide, stores the revision history, + while a new "NETVER" command serves this information through the protocol - - Due to the number of recent evolutions to the network protocol, - along with other possible future changes, NUT network protocol is - now versioned. The chapter "Network protocol information", of the - developer guide, stores the revision history, while a new - "NETVER" command serves this information through the protocol 2012-05-21 Arnaud Quette - * [r3617] data/driver.list.in: Complete the supported PowerWalker - ranges - - Add PowerWalker Online VFI LCD, Line-Interactive VI LCD and - Line-Interactive VI models to the list of blazer_usb supported - models - * [r3616] data/driver.list.in: Add support for Microline C-Lion - Innova ranges - - Add Microline C-Lion Innova models to the list of blazer_usb - supported models - * [r3614] data/driver.list.in: Add support for KOLFF ranges - - Add KOLFF BLACK NOVA models to the list of blazer_usb supported - models - * [r3613] data/driver.list.in: Add support Ippon INNOVA RT range - - Add Ippon INNOVA RT models to the list of blazer_usb supported - models - * [r3612] data/driver.list.in: Add support for Gtec ranges - - Add Gtec models to the list of blazer_ser or blazer_usb supported - models - * [r3611] data/driver.list.in: Complete the supported EVER ranges - - Add EVER POWERLINE RT / 11 / 31 and DUO II Pro models to the list - of blazer_ser or blazer_usb supported models - * [r3610] data/driver.list.in: Add support for COVER ENERGY SA - ranges - + * data/driver.list.in: HCL: Complete the supported PowerWalker ranges + Add PowerWalker Online VFI LCD, Line-Interactive VI LCD and Line- + Interactive VI models to the list of blazer_usb supported models + * data/driver.list.in: HCL: Add support for Microline C-Lion Innova + ranges Add Microline C-Lion Innova models to the list of + blazer_usb supported models + +2012-05-21 Prachi Gandhi + + * Makefile.am, scripts/HP-UX/Makefile, scripts/HP-UX/nut.psf.in, + scripts/Makefile.am: generalized 'make package' call for Solaris, + HPUX package; updated nut.psf.in for HPUX + +2012-05-21 Arnaud Quette + + * data/driver.list.in: HCL: Add support for KOLFF ranges Add KOLFF + BLACK NOVA models to the list of blazer_usb supported models + * data/driver.list.in: HCL: Add support Ippon INNOVA RT range Add + Ippon INNOVA RT models to the list of blazer_usb supported models + * data/driver.list.in: HCL: Add support for Gtec ranges Add Gtec + models to the list of blazer_ser or blazer_usb supported models + * data/driver.list.in: HCL: Complete the supported EVER ranges Add + EVER POWERLINE RT / 11 / 31 and DUO II Pro models to the list of + blazer_ser or blazer_usb supported models + * data/driver.list.in: HCL: Add support for COVER ENERGY SA ranges Add COVER ENERGY SA models to the list of blazer_usb supported models - * [r3609] data/driver.list.in: Add support for Borri ranges - - Add Borri models to the list of blazer_usb supported models - * [r3608] data/driver.list.in: Add support for ARTronic ranges - - Add ARTronic models, both serial and USB, to the list of - blazer_ser and blazer_usb supported models - * [r3607] drivers/belkin-hid.c: Fix Liebert firmware (incorrect - exponents) - + * data/driver.list.in: HCL: Add support for Borri ranges Add Borri + models to the list of blazer_usb supported models + * data/driver.list.in: HCL: Add support for ARTronic ranges Add + ARTronic models, both serial and USB, to the list of blazer_ser and + blazer_usb supported models + +2012-05-21 Charles Lepple + + * drivers/belkin-hid.c: Fix Liebert firmware (incorrect exponents) There are at least two Liebert firmware types which both report a VID:PID of 10af:0001. The newer ones tend not to have the Belkin broken Usage Pages (and therefore use standard HID PDC paths) but - they have incorrect exponents for some fields. This patch fixes - the values for the latter implementation - - Author: Charles Lepple - * [r3606] data/driver.list.in, drivers/netvision-mib.c: Add - 3-phases support to Socomec Netvision MIB - - Improve Socomec Netvision MIB, by adding support for 3-phases UPS - (patch from Manuel Bouyer) - * [r3605] data/driver.list.in: Add support for PowerShield Defender - 1200VA - - Add PowerShield Defender 1200VA (USB ID 0665:5161) to the list of - blazer_usb supported models (reported by Tom Clarkson) - * [r3604] drivers/blazer.c, drivers/blazer_ser.c, - drivers/blazer_usb.c: beeper.status belongs to the "ups" data - collection + they have incorrect exponents for some fields. This patch fixes the + values for the latter implementation + +2012-05-21 Arnaud Quette + + * data/driver.list.in, drivers/netvision-mib.c: Add 3-phases support + to Socomec Netvision MIB Improve Socomec Netvision MIB, by adding + support for 3-phases UPS (patch from Manuel Bouyer) + * data/driver.list.in: HCL: Add support for PowerShield Defender + 1200VA Add PowerShield Defender 1200VA (USB ID 0665:5161) to the + list of blazer_usb supported models (reported by Tom Clarkson) + * drivers/blazer.c, drivers/blazer_ser.c, drivers/blazer_usb.c: + beeper.status belongs to the "ups" data collection 2012-05-16 Arnaud Quette - * [r3603] drivers/apcsmart.c, drivers/apcsmart.h: Final fix to the - tcsetattr() / tcgetattr() issue - - The most likely cause of all spurious differences between what - was set on the port with tcsetattr() and what tcgetattr() shows - are likely to do with the c_local PENDIN flag, which is a status - bit, not a control bit. It will change when there's unread - pending input, which can be quite often on an APC UPS. - - The right way to compare struct termios values is to clear the - status flags _after_ the tcsetattr() and of course after the - tcgetattr() call and then compare the result with what was set. - - Also set NOKERNINFO, if available, as we don't want the UPS or - noise on the line to accidentally trigger status output back to - the UPS, and finally make sure IEXTEN is also cleared along with - ISIG since it too can cause weird things to happen. - - This change also adds some debug code to show any differences in - the structures in a logical manner in debug output (and squashes - one tiny compiler warning) (patch from Greg A. Woods) - * [r3602] docs/config-notes.txt, docs/man/upsmon.txt: Whitespace - fixes - - Remove some extraneous spaces, suggested by "git diff --check", - and improve a bit formatting (patch #36 from Greg A. Woods) + * drivers/apcsmart.c, drivers/apcsmart.h: Final fix to the + tcsetattr() / tcgetattr() issue The most likely cause of all + spurious differences between what was set on the port with + tcsetattr() and what tcgetattr() shows are likely to do with the + c_local PENDIN flag, which is a status bit, not a control bit. It + will change when there's unread pending input, which can be quite + often on an APC UPS. The right way to compare struct termios + values is to clear the status flags _after_ the tcsetattr() and of + course after the tcgetattr() call and then compare the result with + what was set. Also set NOKERNINFO, if available, as we don't want + the UPS or noise on the line to accidentally trigger status output + back to the UPS, and finally make sure IEXTEN is also cleared along + with ISIG since it too can cause weird things to happen. This + change also adds some debug code to show any differences in the + structures in a logical manner in debug output (and squashes one + tiny compiler warning) (patch from Greg A. Woods) + * docs/config-notes.txt, docs/man/upsmon.txt: Whitespace fixes + Remove some extraneous spaces, suggested by "git diff --check", and + improve a bit formatting (patch #36 from Greg A. Woods) 2012-05-15 Arnaud Quette - * [r3601] drivers/snmp-ups.c, drivers/snmp-ups.h: Remove dead code - - Remove dead code, related to shutdown handling (no functional - changes) (based on patch #29 from Greg A. Woods) - * [r3599] docs/nut-names.txt: Fix formating issue - * [r3598] docs/nut-names.txt: Add missing battery.voltage data to - the namespace - - Add missing battery.voltage.{low,high} to the standard NUT - namespace - * [r3597] docs/nut-names.txt, drivers/upscode2.c: Rename - peakcurrent to current.peak (as per RFC) - - Rename peakcurrent to current.peak, since it is more coherent and - suitable - * [r3596] drivers/dummy-ups.c, drivers/dummy-ups.h: Update and - cleanup - + * drivers/snmp-ups.c, drivers/snmp-ups.h: Remove dead code Remove + dead code, related to shutdown handling (no functional changes) + (based on patch #29 from Greg A. Woods) + +2012-05-15 Prachi Gandhi + + * scripts/Solaris/Makefile.am: Updated scripts/Solaris/Makefile.am to + remove prototype, checkinstall + +2012-05-15 Arnaud Quette + + * docs/nut-names.txt: Fix formating issue + * docs/nut-names.txt: Add missing battery.voltage data to the + namespace Add missing battery.voltage.{low,high} to the standard + NUT namespace + * docs/nut-names.txt, drivers/upscode2.c: Rename peakcurrent to + current.peak (as per RFC) Rename peakcurrent to current.peak, + since it is more coherent and suitable + * drivers/dummy-ups.c, drivers/dummy-ups.h: Update and cleanup Convert flags defitions to bitwise left shift, convert some - comments about variables to actual values, and do a bit of - cleanup (patch #27 from Greg A. Woods) - * [r3594] drivers/blazer.c: Add comment on shutdown.return ondelay - value - - Add a comment reinforcing the need for ondelay=3 (partial patch - #26 from Greg A. Woods) - * [r3593] docs/man/snmp-ups.txt: Complete APC SNMP compatibility - information - - Mention more varieties of APC SNMP cards, and mention the - POWERNET MIB (patch #25 from Greg A. Woods) - * [r3590] drivers/netvision-mib.c: Fix status processing for "ECO - mode" - - When running in "ECO mode", the driver should report an - ups.status set to "OL", or it otherwise ends up with an empty - string that confuses upsmon (patch from Ivan Kuznetsov) + comments about variables to actual values, and do a bit of cleanup + (patch #27 from Greg A. Woods) + +2012-05-15 Prachi Gandhi + + * scripts/Solaris/checkinstall, scripts/Solaris/precheck.py, + scripts/Solaris/prototype: Deleted checkinstall, prototype files + +2012-05-15 Arnaud Quette + + * drivers/blazer.c: Add comment on shutdown.return ondelay value Add + a comment reinforcing the need for ondelay=3 (partial patch #26 + from Greg A. Woods) + * docs/man/snmp-ups.txt: Complete APC SNMP compatibility information + Mention more varieties of APC SNMP cards, and mention the POWERNET + MIB (patch #25 from Greg A. Woods) + +2012-05-15 Prachi Gandhi + + * Makefile.am, scripts/Solaris/Makefile.am, + scripts/Solaris/pkginfo.in, scripts/Solaris/prepackage.py, + scripts/Solaris/preproto.pl: Added perl script to create prototype + file onsolaris platform, updated Makefile.am + * m4/nut_check_os.m4: Added perl script to create prototype file + onsolaris platform, updated Makefile.am + +2012-05-15 Arnaud Quette + + * drivers/netvision-mib.c: Fix status processing for "ECO mode" When + running in "ECO mode", the driver should report an ups.status set + to "OL", or it otherwise ends up with an empty string that confuses + upsmon (patch from Ivan Kuznetsov) 2012-05-14 Arnaud Quette - * [r3589] docs/man/blazer.txt: Mention General Electric in blazer - manual page - + * docs/man/blazer.txt: Mention General Electric in blazer manual page Mention General Electric as a user of the Megatec/Q1 protocol (patch #24 from Greg A. Woods) - * [r3588] clients/upsmon.h: Use bitwise left shift for flags - definitions - - Use (1 << N) to define a bit flag at bit N, which is more - coherent with other similar implementations in NUT (patch #23 + * clients/upsmon.h: Use bitwise left shift for flags definitions Use + (1 << N) to define a bit flag at bit N, which is more coherent with + other similar implementations in NUT (patch #23 from Greg A. Woods) + * clients/upsmon.c: Cosmetic changes Remove dead / redundant + #defines, and enable interesting debug traces that were commented + out (based on patch #22 from Greg A. Woods) + * drivers/apcsmart.h: Use bitwise left shift for status flags + definitions Use (1 << N) to define a bit flag at bit N, which is + more coherent with other similar implementations in NUT (patch #21 from Greg A. Woods) - * [r3587] clients/upsmon.c: Cosmetic changes - - Remove dead / redundant #defines, and enable interesting debug - traces that were commented out (based on patch #22 from Greg A. - Woods) - * [r3586] drivers/apcsmart.h: Use bitwise left shift for status - flags definitions - - Use (1 << N) to define a bit flag at bit N, which is more - coherent with other similar implementations in NUT (patch #21 - from Greg A. Woods) - * [r3585] drivers/apcsmart.c, drivers/apcsmart.h: Don't be too - strict about terminal settings - - Don't log an error when tcgetattr() reports different settings on - the port (patch #20 from Greg A. Woods) - * [r3584] tools/nut-usbinfo.pl: Better filtering on USB related - files - - The current USB information extraction script is not optimal at + * drivers/apcsmart.c, drivers/apcsmart.h: Don't be too strict about + terminal settings Don't log an error when tcgetattr() reports + different settings on the port (patch #20 from Greg A. Woods) + * tools/nut-usbinfo.pl: Better filtering on USB related files The + current USB information extraction script is not optimal at filtering files that need to be inspected. While waiting for a proper rewrite, improve a bit more filenames filtering (patch #18 from Greg A. Woods) - * [r3583] drivers/blazer_ser.c: Quote the debug output for space - visibility - + * drivers/blazer_ser.c: Quote the debug output for space visibility Quote the debug output so one can see how many spaces there are (patch #16 from Greg A. Woods) - * [r3582] docs/cables/apc.txt: Update APC cabling information - - Update information about APC cable model numbering and revisions - (patch #16 from Greg A. Woods) - * [r3581] data/driver.list.in: GE Digital Energy updates - - Rename "GE" to "GE Digital Energy", which is more appropriate in - this context. Also add GT Series 1000-3000 VA to the list of - blazer_ser supported models (patch #15 from Greg A. Woods) - * [r3580] docs/developers.txt: Complete notes on spaces for - alignements - - Add complementary note on the use of spaces for alignements - (patch #14 from Greg A. Woods) - * [r3577] docs/design.txt: Use more suitable examples - - Use an example driver name matching the unified NUT drivers - generic manual page name (patch #13 from Greg A. Woods) - * [r3576] drivers/mge-hid.c: Complete and update Eaton HID usages - table + * docs/cables/apc.txt: Update APC cabling information Update + information about APC cable model numbering and revisions (patch + #16 from Greg A. Woods) + * data/driver.list.in: HCL: GE Digital Energy updates Rename "GE" to + "GE Digital Energy", which is more appropriate in this context. + Also add GT Series 1000-3000 VA to the list of blazer_ser supported + models (patch #15 from Greg A. Woods) + * docs/developers.txt: Complete notes on spaces for alignements Add + complementary note on the use of spaces for alignements (patch #14 + from Greg A. Woods) + * docs/design.txt: Use more suitable examples Use an example driver + name matching the unified NUT drivers generic manual page name + (patch #13 from Greg A. Woods) + * drivers/mge-hid.c: Complete and update Eaton HID usages table 2012-05-11 Arnaud Quette - * [r3574] tools/Makefile.am: Fix typo in comment - - Fix a typo error in comment (reported by Fred Bohé, from Eaton) - * [r3573] scripts/upower/95-upower-hid.rules: Update upower script - - Update upower script with recent changes and updates (redundant - with patch #6 from Greg A. Woods) - * [r3572] tools/Makefile.am: Explicit mention of Makefiles - brokenness - + * tools/Makefile.am: Fix typo in comment Fix a typo error in comment + (reported by Fred Bohé, from Eaton) + * scripts/upower/95-upower-hid.rules: Update upower script Update + upower script with recent changes and updates (redundant with patch + #6 from Greg A. Woods) + * tools/Makefile.am: Explicit mention of Makefiles brokenness Document that, at least, this Makefile.am is broken by design (patch #5 from Greg A. Woods) - * [r3571] docs/man/apcsmart.txt: Fix documentation wording - - "there're" is not a valid contraction, especially not in a - technical document (patch #4 from Greg A. Woods) - * [r3570] docs/man/apcsmart.txt: Always use upper case for the - acronym "UPS" - + * docs/man/apcsmart.txt: Fix documentation wording "there're" is not + a valid contraction, especially not in a technical document (patch + #4 from Greg A. Woods) + * docs/man/apcsmart.txt: Always use upper case for the acronym "UPS" Be consistent in using all upper case for the acronym "UPS" (Ie Uninterruptible Power Supply) (patch #3 from Greg A. Woods) - * [r3569] docs/man/apcsmart.txt: Fix SmartUPS cabling nomenclature - - Correct the nomenclature of the SmartUPS cabling part numbers - (patch #2 from Greg A. Woods) - * [r3568] configure.in: Fix a configure error message - - Asciidoc might actually be installed but documentation might - still not be build-able (earlier messages should hint at exactly - what was missing) (patch #1 from Greg A. Woods) - * [r3567] data/driver.list.in: Add support for ATEK Defensor range - - Add ATEK Defensor range (Innova series) to the list of blazer_usb + * docs/man/apcsmart.txt: Fix SmartUPS cabling nomenclature Correct + the nomenclature of the SmartUPS cabling part numbers (patch #2 + from Greg A. Woods) + * configure.in: Fix a configure error message Asciidoc might + actually be installed but documentation might still not be build- + able (earlier messages should hint at exactly what was missing) + (patch #1 from Greg A. Woods) + * data/driver.list.in: HCL: Add support for ATEK Defensor range Add + ATEK Defensor range (Innova series) to the list of blazer_usb supported models - * [r3566] data/driver.list.in: Fix EVER brand name - - The correct name is "EVER", not "EVER UPS", as per a request from - the manufacturer + * data/driver.list.in: HCL: Fix EVER brand name The correct name is + "EVER", not "EVER UPS", as per a request from the manufacturer 2012-05-10 Arnaud Quette - * [r3565] docs/website/news.txt: Update for WMNut 0.63 publication - * [r3564] docs/website/ups-protocols.txt: Official Riello protocols + * docs/website/news.txt: Update for WMNut 0.63 publication + * docs/website/ups-protocols.txt: Official Riello protocols publication +2012-05-08 Prachi Gandhi + + * Makefile.am, scripts/Solaris/Makefile.am, + scripts/Solaris/prepackage.py: Added python script to create + pkginfo.in and checkinstall scripts depending upon the solaris + platform + 2012-05-03 Arnaud Quette - * [r3558] drivers/libshut.c, drivers/mge-shut.c: Forgotten driver - version bump - * [r3557] clients/upsmon.c: Coverity fix on upsmon - - Remove an unneeded null check, that cause a Coverity error - (reported by Michal Hlavinka from RedHat) - * [r3556] drivers/libshut.c, drivers/mge-shut.c: Coverity fix on - Eaton SHUT - + * drivers/libshut.c, drivers/mge-shut.c: Forgotten driver version + bump + * clients/upsmon.c: Coverity fix on upsmon Remove an unneeded null + check, that cause a Coverity error (reported by Michal Hlavinka + from RedHat) + * drivers/libshut.c, drivers/mge-shut.c: Coverity fix on Eaton SHUT Fix some tests that are always false, regardless of the values of operands (reported by Michal Hlavinka from RedHat) - * [r3555] clients/upssched.c, drivers/bcmxcp.c, - drivers/bcmxcp_usb.c, drivers/dstate.c, drivers/mge-utalk.c, - drivers/rhino.c, drivers/solis.c, drivers/tripplite_usb.c, - tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_xml_http.c: - Merge Coverity branch - - Merge all work done part of the Coverity static analysis scan, - done by Michal Hlavinka from RedHat 2012-05-02 Arnaud Quette - * [r3553] docs/download.txt, docs/website/news.txt: Update Windows - package publications - * [r3552] common/Makefile.am, include/Makefile.am: Better handling - of nut_version.h - - nut_version.h should not be distributed, since it is + * docs/download.txt, docs/website/news.txt: Update Windows package + publications + * common/Makefile.am, include/Makefile.am: Better handling of + nut_version.h nut_version.h should not be distributed, since it is automatically built. Moreover, hard dependency in common/ is not needed since BUILT_SOURCES reference ensure generation before any other target: @@ -731,3187 +2426,2415 @@ 2012-04-27 Arnaud Quette - * [r3547] data/driver.list.in, drivers/cps-hid.c: Add support for - CyberPower Systems PR6000LCDRTXL5U - - Add CyberPower Systems PR6000LCDRTXL5U (USB ID 0x0764:0x0601) to - the list of usbhid-ups supported models (reported by Dax Kelson) - * [r3546] data/driver.list.in: Complete HP supported devices list - - Add HP UPS Management Module to the list of snmp-ups supported - models. Also complete serial compatibility for some models, using - mge-shut + * data/driver.list.in, drivers/cps-hid.c: Add support for CyberPower + Systems PR6000LCDRTXL5U Add CyberPower Systems PR6000LCDRTXL5U + (USB ID 0x0764:0x0601) to the list of usbhid-ups supported models + (reported by Dax Kelson) + * data/driver.list.in: HCL: Complete HP supported devices list Add + HP UPS Management Module to the list of snmp-ups supported models. + Also complete serial compatibility for some models, using mge-shut 2012-04-25 Arnaud Quette - * [r3542] docs/man/nut-scanner.txt: Clarify nut-scanner compilation - and distribution - - Document explicitely how nut-scanner is compiled, and how its - features are made available, according to its dependencies (both - compile time and runtime) + * docs/man/nut-scanner.txt: Clarify nut-scanner compilation and + distribution Document explicitely how nut-scanner is compiled, and + how its features are made available, according to its dependencies + (both compile time and runtime) 2012-04-24 Frederic Bohe - * [r3539] tools/nut-scanner/nut-scanner.c, - tools/nut-scanner/nutscan-init.c, + * tools/nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan-init.c, tools/nut-scanner/nutscan-init.h, tools/nut-scanner/scan_avahi.c, - tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, - tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, - tools/nut-scanner/scan_xml_http.c: Cleaner exit for nut-scanner + tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, tools + /nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, tools/nut- + scanner/scan_xml_http.c: Cleaner exit for nut-scanner 2012-04-23 Frederic Bohe - * [r3538] tools/nut-scanner/scan_avahi.c, - tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, - tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, - tools/nut-scanner/scan_xml_http.c: Be more verbose when failing - to dynamically load a library + * tools/nut-scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, + tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools + /nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: Be more + verbose when failing to dynamically load a library 2012-04-14 Arnaud Quette - * [r3534] docs/man, docs/man/Makefile.am, docs/man/index.txt, - docs/man/nut-recorder.txt, tools/nut-recorder.sh: Create - nut-recorder manual page - * [r3533] drivers/tripplite-hid.c: HP USB UPS completion #3 - - Remove R/T3000 USB ID (0x03f0:0x1fe5) from the TrippLite HID - mapping, since it is supported by the Eaton HID mapping. This - completes commit r3525. Also adds ups.firmware and device.part - * [r3532] drivers/usbhid-ups.c: Correct Celsius temperatures that - should be in Kelvin - - Check if raw value is in the Kelvin range, to detect buggy values - that are already expressed in Celsius degrees, as found on some - HP devices - * [r3531] docs/developer-guide.txt, tools/Makefile.am, - tools/device-recorder.sh, tools/nut-recorder.sh: Rename - device-recorder to nut-recorder - * [r3530] data/driver.list.in: Reorder Dell devices by connection - type + * docs/man/.gitignore, docs/man/Makefile.am, docs/man/index.txt, + docs/man/nut-recorder.txt, tools/nut-recorder.sh: Create nut- + recorder manual page + * drivers/tripplite-hid.c: HP USB UPS completion #3 Remove R/T3000 + USB ID (0x03f0:0x1fe5) from the TrippLite HID mapping, since it is + supported by the Eaton HID mapping. This completes commit + * drivers/usbhid-ups.c: Correct Celsius temperatures that should be + in Kelvin Check if raw value is in the Kelvin range, to detect + buggy values that are already expressed in Celsius degrees, as + found on some HP devices + * docs/developer-guide.txt, tools/Makefile.am, tools/device- + recorder.sh, tools/nut-recorder.sh: Rename device-recorder to nut- + recorder + * data/driver.list.in: HCL: Reorder Dell devices by connection type 2012-04-10 Arnaud Quette - * [r3529] scripts/systemd/nut-driver.service.in, - scripts/systemd/nut-monitor.service.in, - scripts/systemd/nut-server.service.in, + * scripts/systemd/nut-driver.service.in, scripts/systemd/nut- + monitor.service.in, scripts/systemd/nut-server.service.in, scripts/systemd/nutshutdown.in: Fix broken systemd integration in - the build system - - Step 2: add the theoretical path templates to the systemd - scripts. This however requires adjustments to the RPM package. - Namely, upsd and upsmon will have to be installed in /sbin, - instead of the current /usr/sbin - * [r3528] configure.in, scripts/systemd/Makefile.am: Fix broken - systemd integration in the build system - - Step 1: remove Makefile rules that were both useless, and causing - warning. Generate nut-*.service files from .in templates in - configure, as it should be, which is currently void since there - is no target to substitute. This has however required to export - SBINDIR and PIDPATH through AC_SUBST, in configure - * [r3525] drivers/mge-hid.c: HP USB UPS completion #2 - - Address HP USB/HID devices, that use the Eaton HID definitions. - This includes the latest products range (USB IDs 0x1fe5, 0x1fe6, - 0x1fe7 and 0x1fe8), and few more variables and commands - * [r3524] drivers/mge-hid.c: Fix Eaton / MGE outlet.2.switchable - flags - + the build system Step 2: add the theoretical path templates to the + systemd scripts. This however requires adjustments to the RPM + package. Namely, upsd and upsmon will have to be installed in + /sbin, instead of the current /usr/sbin + * configure.in, scripts/systemd/Makefile.am: Fix broken systemd + integration in the build system Step 1: remove Makefile rules that + were both useless, and causing warning. Generate nut-*.service + files from .in templates in configure, as it should be, which is + currently void since there is no target to substitute. This has + however required to export SBINDIR and PIDPATH through AC_SUBST, in + configure + * clients/upsrw.c, common/state.c, docs/man/upscli_list_start.txt, + docs/man/upsrw.txt, docs/net-protocol.txt, docs/new-drivers.txt, + docs/sock-protocol.txt, drivers/dstate.c, drivers/dstate.h, + include/extstate.h, include/state.h, server/netget.c, + server/netlist.c, server/netset.c, server/sstate.c, + server/sstate.h: Support of ranges of values for writable variables + It is now possible to specify one or more ranges of values for + writable variables, using dstate_addrange() in drivers. upsd also + supports the new type 'RANGE' for 'GET TYPE', along with the 'LIST + RANGE' command. Finally, users can interact through upsrw, which + displays the supported ranges, and enforces new value checking + against the provided boundaries + * drivers/mge-hid.c: HP USB UPS completion #2 Address HP USB/HID + devices, that use the Eaton HID definitions. This includes the + latest products range (USB IDs 0x1fe5, 0x1fe6, 0x1fe7 and 0x1fe8), + and few more variables and commands + * drivers/mge-hid.c: Fix Eaton / MGE outlet.2.switchable flags outlet.2.switchable should only be writable to enable ECO mode on Ellipse ECO, Protection Station and some 3S. Other models should - only expose it as read only (reported by Prachi Gandhi from - Eaton, Alioth bug #313587) + only expose it as read only (reported by Prachi Gandhi from Eaton, + Alioth bug #313587) 2012-04-04 Arnaud Quette - * [r3520] scripts/Makefile.am, scripts/logrotate, - scripts/logrotate/nutlogd: Provide log rotation configuration for - NUT - - Provide a basic configuration file for managing rotation - (logrotate) of NUT log files, generated by upslog + * scripts/Makefile.am, scripts/logrotate/nutlogd: Provide log + rotation configuration for NUT Provide a basic configuration file + for managing rotation (logrotate) of NUT log files, generated by + upslog 2012-04-02 Arnaud Quette - * [r3518] docs/nut-names.txt: Update the namespace - - Complete the namespace with missing variables and commands, that - are either known or have had an RFC - * [r3517] docs/man: Subversion ignored files completion - - Mark nutscan_init.html as Subversion ignored (no functional - changes) + * docs/nut-names.txt: Update the namespace Complete the namespace + with missing variables and commands, that are either known or have + had an RFC + * docs/man/.gitignore: Subversion ignored files completion Mark + nutscan_init.html as Subversion ignored (no functional changes) 2012-03-31 Arnaud Quette - * [r3516] data/driver.list.in: Add support for AEG Power Solutions - PROTECT HOME - - Add AEG Power Solutions PROTECT HOME (USB ID 0x0665:0x5161) to - the list of blazer_ser and blazer_usb supported models (reported - by Joachim Schiele) + * data/driver.list.in: HCL: Add support for AEG Power Solutions + PROTECT HOME Add AEG Power Solutions PROTECT HOME (USB ID + 0x0665:0x5161) to the list of blazer_ser and blazer_usb supported + models (reported by Joachim Schiele) 2012-03-30 Arnaud Quette - * [r3514] drivers/bcmxcp_usb.c: Add debug traces for read / write - commands - * [r3512] common/common.c, include/common.h: Improve support - functions for trimming strings - - Enforce verifications in rtrim, and add an ltrim function + * drivers/bcmxcp_usb.c: Add debug traces for read / write commands + * common/common.c, include/common.h: Improve support functions for + trimming strings Enforce verifications in rtrim, and add an ltrim + function 2012-03-29 Arnaud Quette - * [r3511] data/driver.list.in, drivers/blazer_usb.c: Add support - Innova online UPS family - - Add Innova T (0x06da:0x0201), Innova RT (0x06da:0x0005) and - Innova 3/1 T (0x06da:0x0004) to the list of of blazer_usb and - blazer_ser supported models. Innova series are online UPS - supporting Q1 for compatibility, and many more commands. Better - support, either through blazer_* rewrite or through a new driver, - is considered as a future possibility + * data/driver.list.in, drivers/blazer_usb.c: Add support Innova + online UPS family Add Innova T (0x06da:0x0201), Innova RT + (0x06da:0x0005) and Innova 3/1 T (0x06da:0x0004) to the list of of + blazer_usb and blazer_ser supported models. Innova series are + online UPS supporting Q1 for compatibility, and many more commands. + Better support, either through blazer_* rewrite or through a new + driver, is considered as a future possibility 2012-03-24 Arnaud Quette - * [r3508] configure.in, docs/Makefile.am, docs/security.txt, - scripts/Makefile.am, scripts/ufw, scripts/ufw/README, + * configure.in, docs/Makefile.am, docs/security.txt, + scripts/Makefile.am, scripts/ufw/.gitignore, scripts/ufw/README, scripts/ufw/nut.ufw.profile.in: Uncomplicated Firewall (UFW) - support - - Provide an Uncomplicated Firewall (UFW) profile (nut.ufw.profile) - to tightly integrate NUT, along with some documentation - completion for the Security chapter of the user manual + support Provide an Uncomplicated Firewall (UFW) profile + (nut.ufw.profile) to tightly integrate NUT, along with some + documentation completion for the Security chapter of the user + manual 2012-03-23 Arnaud Quette - * [r3507] conf/nut.conf.sample, docs/man/nut.conf.txt: Fix nut.conf - documentation and sample file - - Since nut.conf is intended to be sourced by shell scripts, spaces - must not be added around the equal sign. Fix documentation and - sample file to conform to this purpose, and add bold warning - (reported by Tim Rice, Alioth bug #312452) - * [r3506] clients/upsmon.c, server/upsd.c: Detect duplicate - instances of upsd / upsmon - - Fix a long standing issue, that is the lack of detection of - duplicate upsd / upsmon instances when starting another one of - these daemons. This previously resulted in inconsistencies, such - as being unable to stop the daemon, due to its .pid file being - removed by the newly started instance (last reported by Andrew - Min Chang) + * conf/nut.conf.sample, docs/man/nut.conf.txt: Fix nut.conf + documentation and sample file Since nut.conf is intended to be + sourced by shell scripts, spaces must not be added around the equal + sign. Fix documentation and sample file to conform to this purpose, + and add bold warning (reported by Tim Rice, Alioth bug #312452) + * clients/upsmon.c, server/upsd.c: Detect duplicate instances of upsd + / upsmon Fix a long standing issue, that is the lack of detection + of duplicate upsd / upsmon instances when starting another one of + these daemons. This previously resulted in inconsistencies, such as + being unable to stop the daemon, due to its .pid file being removed + by the newly started instance (last reported by Andrew Min Chang) 2012-03-21 Frederic Bohe - * [r3503] drivers/libshut.c: Avoid stack corruption on invalid - frame - - In the protocol, the frame size can be 8 bytes max. That is why - the frame buffer is only 8 bytes long. If the frame is corrupted, - the size read may be up to 15, which may corrupt the stack while - writing into the frame buffer. This patch add a simple sanity - check on the size to avoid a crash and enforce protocol - limitation. - * [r3501] drivers/libshut.c: Fix SHUT variables read (from Arnaud - Quette) - * [r3500] drivers/bcmxcp.c, drivers/bcmxcp.h, drivers/bcmxcp_usb.c: - Change timeout for PW9120 - - Current timeout (1 sec) is too short for PW9120: numerous frames - are lost. Setting this to 2 seconds fix this. - * [r3499] drivers/libshut.c: Deactivate UPS notification - - Currently this driver is ignoring notification by automatically - sending NACK when they are received. Nevertheless,this behavior - creates communication errors with some UPS (M2200). So this patch - completly disable the sending of notification from the UPS. - Ideally we should correclty implement notifications managment for - optimal performance, but with this patch, at least, communiaton - works. - * [r3498] drivers/libshut.c: Fix shut notification mask + * drivers/libshut.c: Avoid stack corruption on invalid frame In the + protocol, the frame size can be 8 bytes max. That is why the frame + buffer is only 8 bytes long. If the frame is corrupted, the size + read may be up to 15, which may corrupt the stack while writing + into the frame buffer. This patch add a simple sanity check on the + size to avoid a crash and enforce protocol limitation. + * drivers/libshut.c: Fix SHUT variables read (from Arnaud Quette) + * drivers/bcmxcp.c, drivers/bcmxcp.h, drivers/bcmxcp_usb.c: Change + timeout for PW9120 Current timeout (1 sec) is too short for + PW9120: numerous frames are lost. Setting this to 2 seconds fix + this. + * drivers/libshut.c: Deactivate UPS notification Currently this + driver is ignoring notification by automatically sending NACK when + they are received. Nevertheless,this behavior creates communication + errors with some UPS (M2200). So this patch completly disable the + sending of notification from the UPS. Ideally we should correclty + implement notifications managment for optimal performance, but with + this patch, at least, communiaton works. + * drivers/libshut.c: Fix shut notification mask 2012-03-09 Arnaud Quette - * [r3495] docs/config-notes.txt: Emphasize special characters - * [r3494] data/driver.list.in, drivers/tripplite-hid.c: HP USB UPS - completion #1 - - Address HP USB/HID devices, that use the TrippLite HID + * docs/config-notes.txt: Emphasize special characters + * data/driver.list.in, drivers/tripplite-hid.c: HP USB UPS completion + #1 Address HP USB/HID devices, that use the TrippLite HID definitions. This includes new ProductIDs, and few more variables and commands - * [r3493] drivers/oneac.h: Remove extraneous comment start + * drivers/oneac.h: Remove extraneous comment start 2012-03-08 Frederic Bohe - * [r3487] common/parseconf.c, common/upsconf.c, - docs/config-notes.txt: More flexible '=' character managment in - conf files - - This allow to support the following forms : 'foo = bar', - 'foo=bar', 'foo =bar' and 'foo= bar' + * common/parseconf.c, common/upsconf.c, docs/config-notes.txt: More + flexible '=' character managment in conf files This allow to + support the following forms : 'foo = bar', 'foo=bar', 'foo =bar' + and 'foo= bar' 2012-03-06 Arnaud Quette - * [r3485] docs/man/oneac.txt, drivers/oneac.c, drivers/oneac.h: - Improve general OneAC support (oneac 0.80) - - Improve support for all families of Oneac (EG, ON, OZ and OB), - including support for more data and instant commands (patch from - Bill Elliot) + * docs/man/oneac.txt, drivers/oneac.c, drivers/oneac.h: Improve + general OneAC support (oneac 0.80) Improve support for all + families of Oneac (EG, ON, OZ and OB), including support for more + data and instant commands (patch from Bill Elliot) 2012-03-05 Arnaud Quette - * [r3484] drivers/blazer.c, drivers/blazer_ser.c, - drivers/blazer_usb.c: Guesstimate battery high and low voltages - - Add an automatic estimation for high and low voltages, to be able - to determine battery charge. This should cover most cases, but a - bold mention has been added at driver startup, to inform the - user. Driver version (USB and serial) have been bumped to reflect - this change - * [r3483] drivers/blazer.c: Set 'FSD' status flag upon need - - As per the recent decision to allow driver to set 'FSD' status - flag, set 'FSD' upon "Shutdown imminent" detection + * drivers/blazer.c, drivers/blazer_ser.c, drivers/blazer_usb.c: + Guesstimate battery high and low voltages Add an automatic + estimation for high and low voltages, to be able to determine + battery charge. This should cover most cases, but a bold mention + has been added at driver startup, to inform the user. Driver + version (USB and serial) have been bumped to reflect this change + * drivers/blazer.c: Set 'FSD' status flag upon need As per the + recent decision to allow driver to set 'FSD' status flag, set 'FSD' + upon "Shutdown imminent" detection 2012-03-02 Arnaud Quette - * [r3481] autogen.sh, scripts/augeas/Makefile.am: Sanity check - before python script execution - - Only generate Augeas ups.conf lens if we can import required - Python modules (re,glob,codecs) - * [r3480] docs/man/blazer.txt: Fix typo error in runtimecal example - values - * [r3479] docs/stable-hcl.txt: Improve formating - * [r3478] docs/new-drivers.txt: Formalize the use of the FSD status - flag - - As an exception, drivers are now allowed to set the "FSD" (Forced + * autogen.sh, scripts/augeas/Makefile.am: Sanity check before python + script execution Only generate Augeas ups.conf lens if we can + import required Python modules (re,glob,codecs) + * docs/man/blazer.txt: Fix typo error in runtimecal example values + * docs/stable-hcl.txt: Improve formating + * docs/new-drivers.txt: Formalize the use of the FSD status flag As + an exception, drivers are now allowed to set the "FSD" (Forced ShutDown) status flag when an imminent shutdown has been detected +2012-02-29 Arnaud Quette + + * clients/upsc.c, docs/man/upsc.txt: Client side implementation of + "LIST CLIENT" Implement "LIST CLIENT" in upsc, using "-c " + * docs/net-protocol.txt, server/netlist.c: Adjust server side + implementation of "LIST CLIENT" Commands of the "LIST" family have + to be coherent with the command name. Ie, "LIST CLIENT" should use + the same "CLIENT" prefix, or it will otherwise break client side + verification mechanism + * server/netlist.c: Adjust "LIST CLIENTS" implementation Adjust + "LIST CLIENTS" implementation to be more coherent with other + network protocol commands + * docs/net-protocol.txt: Document new "LIST CLIENTS" command + * server/upsd.c, server/upsd.h: Remove upsd "info" command Adjust + initial "LIST CLIENTS" commit, by removing the upsd "info" command, + which is not suitable, and redundant with the "LIST CLIENT" command + of the network protocol [Fixed compilation error] + 2012-02-29 Charles Lepple - * [r3477] clients/upsc.c, docs/man/upsc.txt: Client side - implementation of "LIST CLIENT" - - Implement "LIST CLIENT" in upsc, using "-c " - - Author: Arnaud Quette - * [r3476] docs/net-protocol.txt, server/netlist.c: Adjust server - side implementation of "LIST CLIENT" - - Commands of the "LIST" family have to be coherent with the - command name. Ie, "LIST CLIENT" should use the same "CLIENT" - prefix, or it will otherwise break client side verification - mechanism - - Author: Arnaud Quette - * [r3475] server/netlist.c: Adjust "LIST CLIENTS" implementation - - Adjust "LIST CLIENTS" implementation to be more coherent with - other network protocol commands - - Author: Arnaud Quette - * [r3474] docs/net-protocol.txt: Document new "LIST CLIENTS" - command - - Author: Arnaud Quette - * [r3473] server/upsd.c, server/upsd.h: Remove upsd "info" command - - Adjust initial "LIST CLIENTS" commit, by removing the upsd "info" - command, which is not suitable, and redundant with the "LIST - CLIENT" command of the network protocol - - [Fixed compilation error] - - Author: Arnaud Quette - * [r3472] scripts/python/module/PyNUT.py: Add support for LIST - CLIENTS, etc. to PyNUT. - - Patch by Rene Martín Rodríguez . Merged with - typo fixes in repository. - - Covers LIST CLIENTS, FSD, HELP and VER. Module version bumped to - 1.2.2. - - Discussion: + * scripts/python/module/PyNUT.py: Add support for LIST CLIENTS, etc. + to PyNUT. Patch by Rene Martín Rodríguez . + Merged with typo fixes in repository. Covers LIST CLIENTS, FSD, + HELP and VER. Module version bumped to 1.2.2. Discussion: http://article.gmane.org/gmane.comp.monitoring.nut.devel/5871 - * [r3471] server/netlist.c, server/upsd.c, server/upsd.h: Add new - "LIST CLIENTS" command to NUT protocol. - - Patch by Rene Martín Rodríguez , with - indentation changed to tabs. - + * server/netlist.c, server/upsd.c, server/upsd.h: Add new "LIST + CLIENTS" command to NUT protocol. Patch by Rene Martín Rodríguez + , with indentation changed to tabs. Discussion: http://article.gmane.org/gmane.comp.monitoring.nut.devel/5870 - * [r3470] drivers/blazer.c: Update URL to Megatec protocol - description. + * drivers/blazer.c: Update URL to Megatec protocol description. 2012-02-28 Arnaud Quette - * [r3469] drivers/liebert-hid.c: UPower optimization - - Always spell manufacturer names the same way across the various - USB drivers. This avoids duplication of manufacturer entries in + * drivers/liebert-hid.c: UPower optimization Always spell + manufacturer names the same way across the various USB drivers. + This avoids duplication of manufacturer entries in scripts/upower/95-upower-hid.rules, during automatic generation 2012-02-27 Arnaud Quette - * [r3468] data/driver.list.in, drivers/cps-hid.c: Add support for - CyberPower OR700LCDRM1U - - Add CyberPower OR700LCDRM1U (0x0764:0x0601) to the list of - usbhid-ups supported models (reported by Brian McCann) + * data/driver.list.in, drivers/cps-hid.c: Add support for CyberPower + OR700LCDRM1U Add CyberPower OR700LCDRM1U (0x0764:0x0601) to the + list of usbhid-ups supported models (reported by Brian McCann) 2012-02-22 Michal Soltys - * [r3467] drivers/apcsmart.c: drivers/apcsmart.c: setvar_string() - and apc_write_long() bugfixes - - setvar_string() couldn't function properly, due to the use of - wrong variable. - - Not associated with any bugreport (reported directly to email). - * [r3466] drivers/apcsmart.c: drivers/apcsmart.c: make - tcsetattr()/tcgetattr() difference not fatal - - This is follow up from earlier bug report (#313395). Earlier - commit should have fixed the issue, but the original submitter - never commented on it. - - Just in case - instead of making it fatal, we only log the issue. + * drivers/apcsmart.c: drivers/apcsmart.c: setvar_string() and + apc_write_long() bugfixes setvar_string() couldn't function + properly, due to the use of wrong variable. Not associated with + any bugreport (reported directly to email). + * drivers/apcsmart.c: drivers/apcsmart.c: make + tcsetattr()/tcgetattr() difference not fatal This is follow up + from earlier bug report (#313395). Earlier commit should have fixed + the issue, but the original submitter never commented on it. Just + in case - instead of making it fatal, we only log the issue. 2012-02-20 Arnaud Quette - * [r3450] drivers/snmp-ups.c, tools/nut-scanner/scan_snmp.c: Better - handling of Net-SNMP AES PrivProtocol - - Handle smartly issues related to Net-SNMP support and declaration - of AES PrivProtocol + * drivers/snmp-ups.c, tools/nut-scanner/scan_snmp.c: Better handling + of Net-SNMP AES PrivProtocol Handle smartly issues related to Net- + SNMP support and declaration of AES PrivProtocol 2012-02-19 Charles Lepple - * [r3449] drivers/snmp-ups.c, drivers/snmp-ups.h: Don't allocate - storage for variables in snmp-ups.h - - The header files should declare variables as extern, and they - should be allocated in only one .c file (not all of the files - which include the .h file). While this is not an immediate - problem when only one .c file includes the .h file, it still - should be fixed in case that changes in the future. - - Patch by Daniel Macks: - http://fink.cvs.sourceforge.net/viewvc/fink/experimental/dmacks/finkinfo/nut.patch?revision=1.1&view=markup - * [r3448] drivers/bcmxcp.c, drivers/bcmxcp.h: Don't allocate - storage for variables in bcmxcp.h - - The header files should declare variables as extern, and they - should be allocated in only one .c file (not all of the files - which include the .h file). This was causing multiple symbol - definitions on Mac OS X. - - Patch by Daniel Macks: - http://fink.cvs.sourceforge.net/viewvc/fink/experimental/dmacks/finkinfo/nut.patch?revision=1.1&view=markup + * drivers/snmp-ups.c, drivers/snmp-ups.h: Don't allocate storage for + variables in snmp-ups.h The header files should declare variables + as extern, and they should be allocated in only one .c file (not + all of the files which include the .h file). While this is not an + immediate problem when only one .c file includes the .h file, it + still should be fixed in case that changes in the future. Patch by + Daniel Macks: http://fink.cvs.sourceforge.net/viewvc/fink/experimen + tal/dmacks/finkinfo/nut.patch?revision=1.1&view=markup + * drivers/bcmxcp.c, drivers/bcmxcp.h: Don't allocate storage for + variables in bcmxcp.h The header files should declare variables as + extern, and they should be allocated in only one .c file (not all + of the files which include the .h file). This was causing multiple + symbol definitions on Mac OS X. Patch by Daniel Macks: http://fink + .cvs.sourceforge.net/viewvc/fink/experimental/dmacks/finkinfo/nut.p + atch?revision=1.1&view=markup 2012-02-16 Arnaud Quette - * [r3447] data/driver.list.in, drivers/blazer_usb.c: Add support - for Online Yunto YQ450 - - Add Online Yunto YQ450 (0x06da:0x0002) to the list of blazer_usb - supported models (reported by Thomas Maisl) + * data/driver.list.in, drivers/blazer_usb.c: Add support for Online + Yunto YQ450 Add Online Yunto YQ450 (0x06da:0x0002) to the list of + blazer_usb supported models (reported by Thomas Maisl) 2012-02-16 Charles Lepple - * [r3445] tools/git-svn.authors, tools/svn2cl.authors: Update SVN - username mappings + * tools/git-svn.authors, tools/svn2cl.authors: Update SVN username + mappings 2012-02-14 Arnaud Quette - * [r3440] data/driver.list.in: Add support for Tripp-Lite - OMNISMART500 - - Add Tripp-Lite OMNISMART500 (productID 0001) to the list of + * data/driver.list.in: Add support for Tripp-Lite OMNISMART500 Add + Tripp-Lite OMNISMART500 (productID 0001) to the list of tripplite_usb supported models (reported by Matt Schulte) 2012-02-10 Arnaud Quette - * [r3439] data/driver.list.in: Support for Dell UPS Network - Management Card - + * data/driver.list.in: Support for Dell UPS Network Management Card Add Dell UPS Network Management Card to the list of snmp-ups and - netxml-ups supported models. SNMP support currently relies on - IETF (RFC-1628) MIB, and not on Dell UPS MIB + netxml-ups supported models. SNMP support currently relies on IETF + (RFC-1628) MIB, and not on Dell UPS MIB 2012-02-09 Frederic Bohe - * [r3435] tools/nut-scanner/scan_snmp.c: Remove useless lib_mutex - and buggy dev_mutex + * tools/nut-scanner/scan_snmp.c: Remove useless lib_mutex and buggy + dev_mutex 2012-02-03 Arnaud Quette - * [r3431] Makefile.am: Update ChangeLog generation and fix text - wrapping - - Adapt the ChangeLog file generation process to correctly wrap - text, even with the new 'git style' format, used for Subversion - commit messages + * Makefile.am: Update ChangeLog generation and fix text wrapping + Adapt the ChangeLog file generation process to correctly wrap text, + even with the new 'git style' format, used for Subversion commit + messages 2012-02-02 Arnaud Quette - * [r3426] drivers/bcmxcp.c, drivers/bcmxcp.h: Improve XCP support - for battery status - - Add support for battery test publication in ups.test.result, and - RB (replace battery) in ups.status + * drivers/bcmxcp.c, drivers/bcmxcp.h: Improve XCP support for battery + status Add support for battery test publication in + ups.test.result, and RB (replace battery) in ups.status 2012-01-31 Arnaud Quette - * [r3424] drivers/bestfortress.c: Add more debug traces - - Add more debug traces, again, to work on the checksum corruption - issue + * drivers/bestfortress.c: Add more debug traces Add more debug + traces, again, to work on the checksum corruption issue 2012-01-23 Arnaud Quette - * [r3411] drivers/mge-mib.c: Clean and complete MGE MIB - - Complete MGE MIB for status, variables and commands, using IETF - MIB OIDs when needed. Macro have also been replaced by actual - numeric OID paths for better clarity. - * [r3410] drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups shutdown - support - - snmp-ups now provides support for UPS shutdown, based on - usbhid-ups mechanisms (composite commands and fallback). - Composite commands are also supported. This means, for example, - that if 'shutdown.return' is not supported, a combination of - 'load.off' + 'load.on' may be used. - * [r3409] drivers/ietf-mib.c: Fix invalid variable name - - Beeper status belongs to the 'ups' data collection - * [r3408] drivers/snmp-ups.c: Check validity of instant commands - before addition - - Prior to adding new instant commands, referenced OIDs are now - checked for existance. This avoid adding commands that are not + * drivers/mge-mib.c: Clean and complete MGE MIB Complete MGE MIB for + status, variables and commands, using IETF MIB OIDs when needed. + Macro have also been replaced by actual numeric OID paths for + better clarity. + * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups shutdown support + snmp-ups now provides support for UPS shutdown, based on usbhid-ups + mechanisms (composite commands and fallback). Composite commands + are also supported. This means, for example, that if + 'shutdown.return' is not supported, a combination of 'load.off' + + 'load.on' may be used. + * drivers/ietf-mib.c: Fix invalid variable name Beeper status + belongs to the 'ups' data collection + * drivers/snmp-ups.c: Check validity of instant commands before + addition Prior to adding new instant commands, referenced OIDs are + now checked for existance. This avoid adding commands that are not supported - * [r3407] docs/man/upsmon.txt: Fix upsmon synopsis - - Add the missing '-K' (Test for the shutdown flag) to upsmon - synopsis (reported by Regid Ichira) + * docs/man/upsmon.txt: Fix upsmon synopsis Add the missing '-K' + (Test for the shutdown flag) to upsmon synopsis (reported by Regid + Ichira) 2012-01-20 Arnaud Quette - * [r3406] data/driver.list.in: Support for Riello Netman Plus 102 - SNMP Card - + * data/driver.list.in: Support for Riello Netman Plus 102 SNMP Card Add Riello Netman Plus 102 SNMP Card, and attached Sentinel SDL 6000-7 and Sentinel Dual SDH 1000-7 UPS, to the list of snmp-ups supported models (reported by Rainer Stumbaum) 2012-01-19 Arnaud Quette - * [r3400] drivers/bestfortress.c: Add more debug traces, to work on - the checksum corruption issue + * drivers/bestfortress.c: Add more debug traces, to work on the + checksum corruption issue 2012-01-18 Arnaud Quette - * [r3399] docs/nut-names.txt, drivers/usbhid-ups.c: Adjust - ups.start.auto value for shutdown commands - - When present, ups.start.auto value needs to be adjusted for - shutdown.{return,stayoff} to behave as expected. This is limited - to Eaton devices (reported by Rich Wrenn) + * docs/nut-names.txt, drivers/usbhid-ups.c: Adjust ups.start.auto + value for shutdown commands When present, ups.start.auto value + needs to be adjusted for shutdown.{return,stayoff} to behave as + expected. This is limited to Eaton devices (reported by Rich Wrenn) 2012-01-11 Arnaud Quette - * [r3395] UPGRADING: Cleanup garbage line - - Remove garbage line that was added by accident during the - AsciiDoc branch merge or work - * [r3394] tools/nut-scanner/Makefile.am, - tools/nut-scanner/nutscan-init.c, tools/nut-scanner/scan_nut.c: - Move libupsclient to weak runtime dependencies - - libupsclient, as other libraries used by nut-scanner, is now a - weak runtime dependency, through the use of lt_dl*() functions. - This means that libupsclient is not anymore required, but only - suggested. This should also solve the distcheck-light compilation - on Aix (on behalf of Frédéric Bohe, from Eaton) + * UPGRADING: Cleanup garbage line Remove garbage line that was added + by accident during the AsciiDoc branch merge or work + * tools/nut-scanner/Makefile.am, tools/nut-scanner/nutscan-init.c, + tools/nut-scanner/scan_nut.c: Move libupsclient to weak runtime + dependencies libupsclient, as other libraries used by nut-scanner, + is now a weak runtime dependency, through the use of lt_dl*() + functions. This means that libupsclient is not anymore required, + but only suggested. This should also solve the distcheck-light + compilation on Aix (on behalf of Frédéric Bohe, from Eaton) + +2012-01-10 Michal Hlavinka + + * drivers/dstate.c: do not forget to check send_to_one return value + send_to_one free()s connection, we can't use it after failure. + * drivers/bcmxcp.c: do not call getinfo twice, use returned value for + parsing result was stored, but never used. Another dstate_getinfo + call was used instead of stored value. Probably result of copy- + paste. + * tools/nut-scanner/scan_xml_http.c: do not use unterminated string + in strlen recvfrom returns raw data without null termination, this + string can't be used in strlen. Use number of recieved bytes + returned by recvfrom instead of strlen. + * clients/upssched.c: do not send garbage on retry because write and + read commands shared one buffer, on retry we did not send command + again, but last read data + * drivers/tripplite_usb.c: prevent buffer overflow in hexascdump + haxascdump uses fixed size static buffer, but it had no checks to + assure result can fit into that buffer. + * tools/nut-scanner/scan_nut.c: ups variable was allocated, but not + free()d + * drivers/rhino.c, drivers/solis.c: use automatic time_t variable + instead of allocated one time_t value is small enough to be + automatic variable instead of allocated one. It eliminates risk we + forget to free it again. + * drivers/bcmxcp.c: do not forget to free pTmp even if len is zero, + pTmp should be freed + * drivers/mge-utalk.c: prevent null pointer dereference in strchr in + some cases p can be null causing null pointer dereference of v + (initialized to 0) in strchr command + * drivers/bcmxcp_usb.c: Fix condition in re-try loop making error + checking unreachable for loop with condition retry <= MAX_TRIES + ends with retry = MAX_TRIES+1. This breaks following error check + with retry == MAX_TRIES condition, because it's true only in case + when last retry actualy succeeded. 2012-01-09 Arnaud Quette - * [r3382] drivers/bestups.c: Add the missing driver variable - "battvoltmult" (patch from Sadara Kael) + * drivers/bestups.c: Add the missing driver variable "battvoltmult" + (patch from Sadara Kael) 2012-01-06 Arnaud Quette - * [r3379] drivers/snmp-ups.c: Reword the message when sysOID - detection fails - * [r3378] drivers/compaq-mib.c: Add the sysOID value, and bump the - MIB version to 1.1 (reported by Jack Challen) - * [r3377] docs/download.txt: Remove inline SHA-256 sum, and provide - links to MD5 and SHA-256 sums + * drivers/snmp-ups.c: Reword the message when sysOID detection fails + * drivers/compaq-mib.c: Add the sysOID value, and bump the MIB + version to 1.1 (reported by Jack Challen) + * docs/download.txt: Remove inline SHA-256 sum, and provide links to + MD5 and SHA-256 sums 2012-01-05 Arnaud Quette - * [r3376] server/netget.c: GET UPSDESC does not need device sanity - checks (Ie connected, with fresh data) to answer (reported by - Emilien Kia, Alioth bug #313323) - * [r3374] data/driver.list.in: Add Dynamix 1000VA USB to the list - of blazer_usb supported models (requires "langid_fix=0x0409" in - ups.conf ; reported by Glen Ogilvie) + * server/netget.c: GET UPSDESC does not need device sanity checks + (i.e. connected, with fresh data) to answer (reported by Emilien + Kia, Alioth bug #313323) + * data/driver.list.in: Add Dynamix 1000VA USB to the list of + blazer_usb supported models (requires "langid_fix=0x0409" in + ups.conf; reported by Glen Ogilvie) 2012-01-04 Arnaud Quette - * [r3372] docs/download.txt: Add the missing SHA-256 sum on the - Download page / section (need to be generated after the - distribution package) - * [r3371] docs/website/news.txt: Update 2.6.3 release date + * docs/download.txt: Add the missing SHA-256 sum on the Download page + / section (needs to be generated after the distribution package) + * docs/website/news.txt: Update 2.6.3 release date 2012-01-03 Arnaud Quette - * [r3370] NEWS, UPGRADING, configure.in, docs/website/news.txt: - Final update for 2.6.3 release + * NEWS, UPGRADING, configure.in, docs/website/news.txt: Final update + for 2.6.3 release 2012-01-03 Frederic Bohe - * [r3369] docs/config-notes.txt: Add a note about file names with - space characters in the documentation. + * docs/config-notes.txt: Add a note about file names with space + characters in the documentation. 2012-01-03 Arnaud Quette - * [r3368] drivers/dummy-ups.c: Add a comment for further processing + * drivers/dummy-ups.c: Add a comment for further processing 2012-01-03 Frederic Bohe - * [r3367] tools/nut-scanner/nut-scanner.c: Fix nut scanner SNMP v3 - help message. - * [r3366] docs/man/nut-scanner.txt: Fix nut scanner SNMP v3 - documentation. + * tools/nut-scanner/nut-scanner.c: Fix nut scanner SNMP v3 help + message. + * docs/man/nut-scanner.txt: Fix nut scanner SNMP v3 documentation. + +2011-12-30 Prachi Gandhi + + * configure.in, scripts/Solaris/Makefile.am, + scripts/Solaris/checkinstall, scripts/Solaris/nut.in, + scripts/Solaris/pkginfo.in, scripts/Solaris/postinstall.in, + scripts/Solaris/postremove, scripts/Solaris/preinstall, + scripts/Solaris/preremove.in, scripts/Solaris/prototype: Added + Solaris Packaging scripts 2011-12-17 Arnaud Quette - * [r3364] drivers/blazer_usb.c: Actually apply the langid_fix - value, when calling usb_get_string (reported by Charles Lepple) - * [r3363] data/driver.list.in, docs/man/blazer.txt, - drivers/blazer_usb.c: Try to fix language ID support for USB - units from LDLC, Dynamix and no names in blazer_usb (reworked - patch, from Brian R. Smith and Aurélien Grenotton) + * drivers/blazer_usb.c: Actually apply the langid_fix value, ... + ...when calling usb_get_string (reported by Charles Lepple) + * data/driver.list.in, docs/man/blazer.txt, drivers/blazer_usb.c: Try + to fix language ID support for USB units from LDLC, Dynamix ... + ...and no names in blazer_usb (reworked patch, from Brian R. Smith + and Aurélien Grenotton) 2011-12-16 Arnaud Quette - * [r3362] scripts/HP-UX: Add the generated HP-UX packaging script - (.psf) to the list of Subversion ignored files - * [r3361] drivers/eaton-mib.c, drivers/snmp-ups.c: Fix newer Eaton - ePDU OIDs declaration ordering, so that it better supports the + * scripts/HP-UX/.gitignore: Add the generated HP-UX packaging script + (.psf) to the list of ignored files + * drivers/eaton-mib.c, drivers/snmp-ups.c: Fix newer Eaton ePDU OIDs + declaration ordering, ... ...so that it better supports the various models (switched or advanced monitored) 2011-12-15 Arnaud Quette - * [r3360] clients/upsclient.c, drivers/belkinunv.c, - drivers/etapro.c, drivers/gamatronic.c, drivers/isbmex.c, - drivers/libshut.c, drivers/metasys.c, drivers/mge-shut.c, - drivers/microdowell.c, drivers/nut-libfreeipmi.c, - drivers/rhino.c, drivers/solis.c: Fix set but not used variables - [-Wunused-but-set-variable] (including patch from Regid Ichira) + * clients/upsclient.c, drivers/belkinunv.c, drivers/etapro.c, + drivers/gamatronic.c, drivers/isbmex.c, drivers/libshut.c, + drivers/metasys.c, drivers/mge-shut.c, drivers/microdowell.c, + drivers/nut-libfreeipmi.c, drivers/rhino.c, drivers/solis.c: Fix + set but not used variables [-Wunused-but-set-variable] (including + patch from Regid Ichira) 2011-12-13 Arnaud Quette - * [r3359] Makefile.am, configure.in, docs/man, - docs/man/Makefile.am, docs/man/nutscan_init.txt, + * compile: Update compile script, as per the latest version available + in Automake (1.11) + * docs/man/.gitignore: Add the generated nutscan_init.3 Groff manual + page... ...to the list of ignored files + * tools/nut-scanner/Makefile.am, tools/nut-scanner/scan_ipmi.c: Add + IPMI power supplies discovery to nut-scanner + * drivers/nut-libfreeipmi.c, m4/nut_check_libfreeipmi.m4: Separate + IPMI requirements, between FRU lookup and monitoring. This way, we + can at least compile nut-scanner with IPMI support and a limited + (no monitoring) version of nut-ipmipsu, using older (pre 1.0.1) + FreeIPMI versions + +2011-12-12 Frederic Bohe + + * tools/nut-scanner/Makefile.am: Unconditional compile of scan_* + source code... ...since now they contains the relevant stub + function. + * tools/nut-scanner/scan_avahi.c, tools/nut-scanner/scan_snmp.c, + tools/nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: + Clean call to nutscan include files + * tools/nut-scanner/nutscan-init.c: Fix wrong variable name + * tools/nut-scanner/nut-scanner.c: Fix wrong call to + nutscan_scan_avahi + * tools/nut-scanner/Makefile.am: Forgot to include nutscan-init.h in + Makefile + * docs/man/Makefile.am, docs/man/nutscan_init.txt, docs/man/nutscan_scan_avahi.txt, docs/man/nutscan_scan_ipmi.txt, docs/man/nutscan_scan_nut.txt, docs/man/nutscan_scan_snmp.txt, - docs/man/nutscan_scan_usb.txt, - docs/man/nutscan_scan_xml_http.txt, drivers/nut-libfreeipmi.c, - m4/nut_check_libfreeipmi.m4, m4/nut_check_libltdl.m4, - tools/nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, - tools/nut-scanner/nut-scanner.c, - tools/nut-scanner/nutscan-init.c, - tools/nut-scanner/nutscan-init.h, tools/nut-scanner/scan_avahi.c, - tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, - tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, - tools/nut-scanner/scan_xml_http.c: Merge nut-scanner_dlopen - branch, at revision 3358. This brings weak runtime dependencies - to nut-scanner, allowing to compile with all options and to run - according to the available dependencies. It also adds IPMI scan - * [r3358] compile: Update compile script, as per the latest version - available in Automake (1.11) + docs/man/nutscan_scan_usb.txt, docs/man/nutscan_scan_xml_http.txt: + Update documentation + * tools/nut-scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, + tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools + /nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: Make + sure not to call any non-initialized function pointers. + * tools/nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, tools + /nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan-init.c, tools + /nut-scanner/nutscan-init.h, tools/nut-scanner/scan_avahi.c, tools + /nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_snmp.c, tools/nut- + scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: Keep the + same API whatever the library are at compile time... ...(so some + scan functions may be stub only) Add an init function + variable to + know the available scan method at run time. Update nut-scanner + accordingly. + +2011-12-09 Arnaud Quette + + * Makefile.am, configure.in, libltdl/COPYING.LIB, + libltdl/Makefile.am, libltdl/Makefile.in, libltdl/Makefile.inc, + libltdl/README, libltdl/aclocal.m4, libltdl/argz.c, + libltdl/argz_.h, libltdl/config-h.in, libltdl/config/compile, + libltdl/config/config.guess, libltdl/config/config.sub, + libltdl/config/depcomp, libltdl/config/edit-readme-alpha, + libltdl/config/general.m4sh, libltdl/config/getopt.m4sh, + libltdl/config/install-sh, libltdl/config/ltmain.m4sh, + libltdl/config/ltmain.sh, libltdl/config/mdate-sh, + libltdl/config/missing, libltdl/config/mkstamp, + libltdl/config/texinfo.tex, libltdl/configure, + libltdl/configure.ac, libltdl/libltdl/lt__alloc.h, + libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, + libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, + libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, + libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h, + libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c, + libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c, + libltdl/loaders/loadlibrary.c, libltdl/loaders/preopen.c, + libltdl/loaders/shl_load.c, libltdl/lt__alloc.c, + libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c, + libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, + libltdl/m4/argz.m4, libltdl/m4/autobuild.m4, libltdl/m4/libtool.m4, + libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4, libltdl/m4/ltsugar.m4, + libltdl/m4/ltversion.in, libltdl/m4/ltversion.m4, + libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libltdl/stamp-mk, + m4/nut_check_libltdl.m4, tools/nut-scanner/Makefile.am: Delete the + bundled version of libltdl, ... and add detection and integration + for the system provided version. nut-scanner build now depends on + the existence of libltdl on the system + * autogen.sh: Revert commit [[SVN:3344]], ...since it causes + problems with documentation build, due to INSTALL being overwritten + +2011-12-09 Charles Lepple + + * autogen.sh: Force files to be overwritten (especially for libtool) + +2011-12-07 Frederic Bohe + + * Makefile.am, configure.in, libltdl/COPYING.LIB, + libltdl/Makefile.am, libltdl/Makefile.in, libltdl/Makefile.inc, + libltdl/README, libltdl/aclocal.m4, libltdl/argz.c, + libltdl/argz_.h, libltdl/config-h.in, libltdl/config/compile, + libltdl/config/config.guess, libltdl/config/config.sub, + libltdl/config/depcomp, libltdl/config/edit-readme-alpha, + libltdl/config/general.m4sh, libltdl/config/getopt.m4sh, + libltdl/config/install-sh, libltdl/config/ltmain.m4sh, + libltdl/config/ltmain.sh, libltdl/config/mdate-sh, + libltdl/config/missing, libltdl/config/mkstamp, + libltdl/config/texinfo.tex, libltdl/configure, + libltdl/configure.ac, libltdl/libltdl/lt__alloc.h, + libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, + libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, + libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, + libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h, + libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c, + libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c, + libltdl/loaders/loadlibrary.c, libltdl/loaders/preopen.c, + libltdl/loaders/shl_load.c, libltdl/lt__alloc.c, + libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c, + libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, + libltdl/m4/argz.m4, libltdl/m4/autobuild.m4, libltdl/m4/libtool.m4, + libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4, libltdl/m4/ltsugar.m4, + libltdl/m4/ltversion.in, libltdl/m4/ltversion.m4, + libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libltdl/stamp-mk, tools + /nut-scanner/Makefile.am, tools/nut-scanner/scan_avahi.c, tools + /nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, tools/nut- + scanner/scan_xml_http.c: First set of modification to include + libltdl 2011-12-05 Arnaud Quette - * [r3341] data/driver.list.in, docs/man/snmp-ups.txt, - drivers/Makefile.am, drivers/cyberpower-mib.c, - drivers/cyberpower-mib.h, drivers/snmp-ups.c: Add Cyber Power - Systems with SNMP RMCARD (100, 201, 202 and 301) to the list of - snmp-ups supported models (patch from Eric Schultz) - * [r3340] drivers/snmp-ups.c: Remove the Eaton Marlin hook, for - base outlet index, since it has been fixed by a new firmware - revision + * data/driver.list.in, docs/man/snmp-ups.txt, drivers/Makefile.am, + drivers/cyberpower-mib.c, drivers/cyberpower-mib.h, drivers/snmp- + ups.c: Add Cyber Power Systems with SNMP RMCARD (100, 201, 202 and + 301) ... ...to the list of snmp-ups supported models (patch from + Eric Schultz) + * drivers/snmp-ups.c: Remove the Eaton Marlin hook, for base outlet + index ... ...since it has been fixed by a new firmware revision 2011-11-29 Arnaud Quette - * [r3338] tools/nut-snmpinfo.py: Fix indentation and use open() - instead of file(), to better support Python 3 (Alioth bug - #313446, patch from Bohdan Popovych) + * tools/nut-snmpinfo.py: Fix indentation and use open() instead of + file(), to better support Python 3 (Alioth bug #313446, patch from + Bohdan Popovych) 2011-11-25 Arnaud Quette - * [r3335] drivers/nut-ipmi.h: Fix wrong prototype declaration, that - was causing a compilation warning (implicit declaration of - function ‘nut_ipmi_get_sensors_status’) + * drivers/nut-ipmi.h: Fix wrong prototype declaration, that was + causing a compilation warning (implicit declaration of function + ‘nut_ipmi_get_sensors_status’) + +2011-11-24 Arnaud Quette + + * scripts/Solaris/pkginfo.in: BASEDIR must also be adapted from + configure settings + * scripts/Solaris/Makefile.am: Add missing dependencies, and + distribution rules + * scripts/Makefile.am: There is no need to list Solaris/pkginfo.in + there, ... ...since 'Solaris' is listed in SUBDIRS, and + 'pkginfo.in' is listed in configure.in + * scripts/Solaris/Makefile.am: Remove makelocal.sh from + check_SCRIPTS, ... ...since it is not meant to be run at "make + check" time 2011-11-24 Prachi Gandhi - * [r3328] Makefile.am, configure.in, scripts/Makefile.am, - scripts/Solaris: Reverted changes made for Solaris packaging - files(revision 3326), added files in NUT_packaging branch - * [r3326] Makefile.am, configure.in, scripts/Makefile.am, - scripts/Solaris, scripts/Solaris/Makefile.am, - scripts/Solaris/makelocal.sh, scripts/Solaris/pkginfo.in, - scripts/Solaris/prototype: Solaris NUT package files added + * Makefile.am, configure.in, scripts/Makefile.am, + scripts/Solaris/Makefile.am, scripts/Solaris/makelocal.sh, + scripts/Solaris/pkginfo.in, scripts/Solaris/prototype: Reverted + changes made for Solaris packaging files in [[SVN:3326]] ... added + files in NUT_packaging branch + * Makefile.am, configure.in, scripts/Makefile.am, + scripts/Solaris/Makefile.am, scripts/Solaris/makelocal.sh, + scripts/Solaris/pkginfo.in, scripts/Solaris/prototype: Solaris NUT + package files added + * Makefile.am, configure.in, scripts/Makefile.am, + scripts/Solaris/Makefile.am, scripts/Solaris/makelocal.sh, + scripts/Solaris/pkginfo.in, scripts/Solaris/prototype: Solaris NUT + package files added 2011-11-15 Arnaud Quette - * [r3321] drivers/blazer_usb.c, drivers/usb-common.h: Revert commit - r2993 and r2994. This enables again inclusion of buggy USB Device - and Vendor IDs, supported by blazer_usb, in udev rules file - (Reported by Stanislav Brabec, from Suse) - * [r3320] tools/Makefile.am: Add missing comment + * drivers/blazer_usb.c, drivers/usb-common.h: Revert commit + [[SVN:2993]] and [[SVN:2994]]. This enables again inclusion of + buggy USB Device and Vendor IDs, supported by blazer_usb, in udev + rules file (Reported by Stanislav Brabec, from Suse) + * tools/Makefile.am: Add missing comment 2011-11-12 Arnaud Quette - * [r3318] drivers/mge-mib.c: Add upsmgBatteryLowCondition OID to - the status mapping (reported by Kiss Gabor (Bitman)) + * drivers/mge-mib.c: Add upsmgBatteryLowCondition OID to the status + mapping (reported by Kiss Gabor (Bitman)) 2011-11-11 Praveen Kumar - * [r3317] scripts/HP-UX/makedepot.sh: script file to create package - (depot) for HP-UX + * scripts/HP-UX/makedepot.sh: script file to create package (depot) + for HP-UX 2011-11-08 Arnaud Quette - * [r3316] docs/website/web-layout.conf: Complete search keywords - * [r3315] docs/website/web-layout.conf: Final fix for the - displaying of the legend, to work on all browsers, while still - being conforming to W3C validation + * docs/website/web-layout.conf: Complete search keywords + * docs/website/web-layout.conf: Final fix for the displaying of the + legend, to work on all browsers, ... ...while still being + conforming to W3C validation 2011-11-07 Arnaud Quette - * [r3314] docs/website/web-layout.conf: Fix displaying of the - legend + * docs/website/web-layout.conf: Fix displaying of the legend 2011-11-05 Michal Soltys - * [r3313] docs/cables.txt, docs/man/apcsmart.txt: apcsmart.txt: - minor documentation update - - Broken diagram link and 940-0024E cable mention (reported by - Jonathan Laventhol). + * docs/cables.txt, docs/man/apcsmart.txt: apcsmart.txt: minor + documentation update Broken diagram link and 940-0024E cable + mention (reported by Jonathan Laventhol). 2011-11-05 Arnaud Quette - * [r3312] conf/upsd.conf.sample, server/upsd.c: Don't fail to start - if at least one of the listening interface is available. This is - needed on systems where either IPv4 or IPv6 is disabled, and no - explicit LISTEN directive has been specified (Reported by Pavel - Zubkou, Debian bug #598741) + * conf/upsd.conf.sample, server/upsd.c: Don't fail to start if at + least one of the listening interface is available. This is needed + on systems where either IPv4 or IPv6 is disabled, and no explicit + LISTEN directive has been specified (Reported by Pavel Zubkou, + Debian bug #598741) 2011-11-02 Praveen Kumar - * [r3310] configure.in, scripts/HP-UX/nut.psf.in: Adding packaging - script for HPUX + * configure.in, scripts/HP-UX/nut.psf.in: Adding packaging script for + HPUX 2011-10-31 Arnaud Quette - * [r3308] docs/download.txt, docs/website/news.txt: Publish update - jNut 0.2, along with the new jNutWebAPI (contributed by Emilien - Kia, from Eaton) + * docs/download.txt, docs/website/news.txt: Publish update jNut 0.2, + along with the new jNutWebAPI (contributed by Emilien Kia, from + Eaton) -2011-10-28 Emilien Kia +2011-10-28 Emilien Kia - * [r3306] scripts/java/README, scripts/java/jNutWebAPI, - scripts/java/jNutWebAPI/README, scripts/java/jNutWebAPI/pom.xml, - scripts/java/jNutWebAPI/src, scripts/java/jNutWebAPI/src/main, - scripts/java/jNutWebAPI/src/main/java, - scripts/java/jNutWebAPI/src/main/java/org, - scripts/java/jNutWebAPI/src/main/java/org/networkupstools, - scripts/java/jNutWebAPI/src/main/java/org/networkupstools/jnutwebapi, - scripts/java/jNutWebAPI/src/main/java/org/networkupstools/jnutwebapi/NutRestProvider.java, - scripts/java/jNutWebAPI/src/main/java/org/networkupstools/jnutwebapi/RestWSApplication.java, - scripts/java/jNutWebAPI/src/main/java/org/networkupstools/jnutwebapi/ScannerProvider.java, - scripts/java/jNutWebAPI/src/main/resources, - scripts/java/jNutWebAPI/src/main/webapp, - scripts/java/jNutWebAPI/src/main/webapp/WEB-INF, - scripts/java/jNutWebAPI/src/main/webapp/WEB-INF/web.xml, - scripts/java/jNutWebAPI/src/test, - scripts/java/jNutWebAPI/src/test/java, - scripts/java/jNutWebAPI/src/test/java/org, - scripts/java/jNutWebAPI/src/test/java/org/networkupstools, - scripts/java/jNutWebAPI/src/test/java/org/networkupstools/jnutwebapi: - Initial commit of jNutWebAPI. - * [r3305] scripts/java/jNut, - scripts/java/jNut/src/main/java/org/networkupstools/jnut/Scanner.java: - Fix a little bug with function namming (get instead of set). + * scripts/java/README, scripts/java/jNutWebAPI/README, + scripts/java/jNutWebAPI/pom.xml, + .../jnutwebapi/NutRestProvider.java, + .../jnutwebapi/RestWSApplication.java, + .../jnutwebapi/ScannerProvider.java, .../jNutWebAPI/src/main/webapp + /WEB-INF/web.xml: Initial commit of jNutWebAPI. + * scripts/java/jNut/.gitignore, scripts/java/jNut/src/main/java/org/n + etworkupstools/jnut/Scanner.java: Fix a little bug with function + namming (get instead of set). 2011-10-27 Arnaud Quette - * [r3304] docs/maintainer-guide.txt: Create a basic NUT maintainer - guide, to start tracking and improving maintenance workflow - * [r3303] drivers/bcmxcp_usb.c: Handle disconnection issues and - reconnection mechanism (bug reported by Rich Wrenn) + * docs/maintainer-guide.txt: Create a basic NUT maintainer guide, ... + to start tracking and improving maintenance workflow + * drivers/bcmxcp_usb.c: Handle disconnection issues and reconnection + mechanism (bug reported by Rich Wrenn) -2011-10-25 Emilien Kia +2011-10-25 Emilien Kia - * [r3302] - scripts/java/jNut/src/test/java/org/networkupstools/jnut/ClientTest.java: - Add licence information. - * [r3301] scripts/java/jNut/README, scripts/java/jNut/pom.xml, - scripts/java/jNut/src/main/java/org/networkupstools/jnut/Scanner.java, - scripts/java/jNut/src/test/java/org/networkupstools/jnut/ScannerTest.java: - Add nut-scanner. + * .../test/java/org/networkupstools/jnut/ClientTest.java: Add licence + information. + * scripts/java/jNut/README, scripts/java/jNut/pom.xml, + .../java/org/networkupstools/jnut/Scanner.java, + .../java/org/networkupstools/jnut/ScannerTest.java: Add nut- + scanner. 2011-10-25 Frederic Bohe - * [r3300] tools/nut-scanner/scan_snmp.c: Add sanity checks - * [r3299] tools/nut-scanner/scan_avahi.c: Remove unused variable + * tools/nut-scanner/scan_snmp.c: Add sanity checks + * tools/nut-scanner/scan_avahi.c: Remove unused variable 2011-10-25 Michal Soltys - * [r3298] drivers/apcsmart.c: drivers/apcsmart.c: minor correction - - Assigning 0 directly was wrong (actually, a leftover from earlier - version of the code that was removed) - ser_set_speed() prepares - the port initially, we only adjust certain options. + * drivers/apcsmart.c: drivers/apcsmart.c: minor correction Assigning + 0 directly was wrong (actually, a leftover from earlier version of + the code that was removed) - ser_set_speed() prepares the port + initially, we only adjust certain options. 2011-10-24 Frederic Bohe - * [r3297] docs/man/nut-scanner.txt, - tools/nut-scanner/nut-scanner.c: Forgot to document "-q" option - (thanks to Emilien Kia for reporting this) + * docs/man/nut-scanner.txt, tools/nut-scanner/nut-scanner.c: Forgot + to document "-q" option (thanks to Emilien Kia for reporting this) 2011-10-21 Frederic Bohe - * [r3296] tools/nut-scanner/nut-scanner.c: Trivial layout - consistency - * [r3295] docs/man/nut-scanner.txt: Update man page with -V and -a + * tools/nut-scanner/nut-scanner.c: Trivial layout consistency + * docs/man/nut-scanner.txt: Update man page with -V and -a option + * tools/nut-scanner/nut-scanner.c: Add an option to display available + bus (usefull for wrapper). + * tools/nut-scanner/nut-scanner.c: return -1 on bad command line option - * [r3294] tools/nut-scanner/nut-scanner.c: Add an option to display - available bus (usefull for wrapper). - * [r3293] tools/nut-scanner/nut-scanner.c: return -1 on bad command - line option 2011-10-19 Frederic Bohe - * [r3292] tools/nut-scanner/nutscan-ip.c: Fix crash on 32bits - systems - * [r3291] tools/nut-scanner/nut-scanner.c: Add a switch to display - NUT version. + * tools/nut-scanner/nutscan-ip.c: Fix crash on 32bits systems + * tools/nut-scanner/nut-scanner.c: Add a switch to display NUT + version. 2011-10-19 Charles Lepple - * [r3290] docs/FAQ.txt: Add FAQ entry for LISTEN directive + * docs/FAQ.txt: Add FAQ entry for LISTEN directive 2011-10-18 Arnaud Quette - * [r3289] drivers/eaton-mib.c: Fix outlets reported current, which + * drivers/eaton-mib.c: Fix outlets reported current, ... ...which were off by 100 in aphel_genesisII MIB, and bump MIB version to 0.46 (patch from Sven Nilsson) 2011-10-14 Arnaud Quette - * [r3288] docs/Makefile.am, docs/images/nut-logo.png, - docs/images/nut.svg, docs/website/Makefile.am, - docs/website/css/web-layout.css, docs/website/faviconut.ico, - docs/website/faviconut.png, docs/website/web-layout.conf: Add the - new NUT logo (contributed by Luc Descotils, from Eaton) - * [r3287] docs/website/web-layout.conf: Fix another W3C validator - error (there is no attribute "language" anymore for - -endif::toc[] -ifdef::hcl[] - - - -endif::hcl[] - - - - -
    -
    - -
    Network UPS Tools
    -
    Power Devices support
    -
    -
    - -
    -
    -# Article, book header. -ifndef::doctype-manpage[] - -ifdef::toc[] -
    -
    Table of Contents
    - -
    -endif::toc[] -endif::doctype-manpage[] -# Man page header. -ifdef::doctype-manpage[] - -endif::doctype-manpage[] - -[footer] - -
    -
    - - -endif::analytics[] - - diff --git a/docs/website/website.txt b/docs/website/website.txt deleted file mode 100644 index 18ff58a..0000000 --- a/docs/website/website.txt +++ /dev/null @@ -1,19 +0,0 @@ -Welcome -======= - -The primary goal of the Network UPS Tools (NUT) project is to provide support -for Power Devices, such as Uninterruptible Power Supplies, Power Distribution -Units and Solar Controllers. - -NUT provides many control and monitoring link:features.html[features], with a -uniform control and management interface. - -More than 100 different manufacturers, and several thousands models are -link:stable-hcl.html[compatible]. - -This software is the combined effort of many -link:acknowledgements.html[individuals and companies]. - -News ----- -include::news.txt[] diff --git a/docs/xhtml.xsl b/docs/xhtml.xsl new file mode 100644 index 0000000..b84425d --- /dev/null +++ b/docs/xhtml.xsl @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/drivers/Makefile.am b/drivers/Makefile.am index f8158d5..be71e91 100644 --- a/drivers/Makefile.am +++ b/drivers/Makefile.am @@ -5,7 +5,6 @@ #FIXME: SERLIBS is only useful for LDADD_DRIVERS_SERIAL not for LDADD_COMMON LDADD_COMMON = ../common/libcommon.la ../common/libparseconf.la LDADD_DRIVERS = $(LDADD_COMMON) main.o dstate.o -LDADD_HAL_DRIVERS = $(LDADD_COMMON) libnuthalmain.a LDADD_DRIVERS_SERIAL = $(LDADD_DRIVERS) $(SERLIBS) serial.o # most targets are drivers, so make this the default @@ -14,9 +13,6 @@ LDADD = $(LDADD_DRIVERS_SERIAL) # files. In any case, CFLAGS are only -I options, so there is no harm, # but only add them if we really use the target. AM_CFLAGS = -I$(top_srcdir)/include -if WITH_HAL - AM_CFLAGS += $(LIBHAL_CFLAGS) -endif if WITH_USB AM_CFLAGS += $(LIBUSB_CFLAGS) endif @@ -42,11 +38,10 @@ SERIAL_DRIVERLIST = al175 bcmxcp belkin belkinunv bestfcom \ nutdrv_qx SNMP_DRIVERLIST = snmp-ups USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \ - blazer_usb richcomm_usb riello_usb nutdrv_qx + blazer_usb richcomm_usb riello_usb \ + nutdrv_atcl_usb \ + nutdrv_qx USB_DRIVERLIST = $(USB_LIBUSB_DRIVERLIST) -HAL_DRIVERLIST = hald-addon-usbhid-ups hald-addon-bcmxcp_usb \ - hald-addon-tripplite_usb hald-addon-blazer_usb hald-addon-riello_usb \ - hald-addon-nutdrv_qx NEONXML_DRIVERLIST = netxml-ups MACOSX_DRIVERLIST = macosx-ups @@ -67,10 +62,6 @@ endif if WITH_USB driverexec_PROGRAMS += $(USB_LIBUSB_DRIVERLIST) endif -if WITH_HAL - halexecdir = $(HAL_CALLOUTS_PATH) - halexec_PROGRAMS = $(HAL_DRIVERLIST) -endif if WITH_NEON driverexec_PROGRAMS += $(NEONXML_DRIVERLIST) endif @@ -88,7 +79,7 @@ else endif # always build upsdrvctl -driverexec_PROGRAMS += upsdrvctl +sbin_PROGRAMS = upsdrvctl # ========================================================================== # Driver build details @@ -185,12 +176,16 @@ bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm +nutdrv_atcl_usb_SOURCES = nutdrv_atcl_usb.c usb-common.c +nutdrv_atcl_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) + richcomm_usb_SOURCES = richcomm_usb.c usb-common.c richcomm_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) riello_usb_SOURCES = riello.c riello_usb.c libusb.c usb-common.c riello_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm + # HID-over-serial mge_shut_SOURCES = usbhid-ups.c libshut.c libhid.c hidparser.c mge-hid.c # per-target CFLAGS are necessary here @@ -200,30 +195,10 @@ mge_shut_LDADD = $(LDADD) # SNMP snmp_ups_SOURCES = snmp-ups.c apc-mib.c baytech-mib.c compaq-mib.c eaton-mib.c \ ietf-mib.c mge-mib.c netvision-mib.c powerware-mib.c raritan-pdu-mib.c \ - bestpower-mib.c cyberpower-mib.c delta_ups-mib.c + bestpower-mib.c cyberpower-mib.c delta_ups-mib.c \ + xppc-mib.c snmp_ups_LDADD = $(LDADD_DRIVERS) $(LIBNETSNMP_LIBS) -# HAL -hald_addon_usbhid_ups_SOURCES = usbhid-ups.c libhid.c libusb.c hidparser.c \ - $(USBHID_UPS_SUBDRIVERS) -hald_addon_usbhid_ups_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) - -hald_addon_tripplite_usb_SOURCES = tripplite_usb.c libusb.c -hald_addon_tripplite_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -lm - -hald_addon_bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c -hald_addon_bcmxcp_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) - -hald_addon_blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c -hald_addon_blazer_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -lm - -hald_addon_riello_usb_SOURCES = riello.c riello_usb.c libusb.c -hald_addon_riello_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -lm - -hald_addon_nutdrv_qx_SOURCES = nutdrv_qx.c libusb.c $(NUTDRV_QX_SUBDRIVERS) -hald_addon_nutdrv_qx_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -lm -hald_addon_nutdrv_qx_CFLAGS = $(AM_CFLAGS) -DQX_USB - # NEON XML/HTTP netxml_ups_SOURCES = netxml-ups.c mge-xml.c netxml_ups_LDADD = $(LDADD_DRIVERS) $(LIBNEON_LIBS) @@ -259,7 +234,7 @@ nutdrv_qx_LDADD += $(LIBUSB_LIBS) endif NUTDRV_QX_SUBDRIVERS = nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c nutdrv_qx_mustek.c \ - nutdrv_qx_voltronic.c nutdrv_qx_zinto.c + nutdrv_qx_q1.c nutdrv_qx_voltronic.c nutdrv_qx_voltronic-qs.c nutdrv_qx_zinto.c nutdrv_qx_SOURCES += $(NUTDRV_QX_SUBDRIVERS) # ---------------------------------------------------------------------- @@ -269,30 +244,20 @@ nutdrv_qx_SOURCES += $(NUTDRV_QX_SUBDRIVERS) dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \ bcmxcp_io.h belkin.h belkin-hid.h bestpower-mib.h blazer.h cps-hid.h dstate.h \ - dstate-hal.h dummy-ups.h eaton-mib.h explore-hid.h gamatronic.h genericups.h \ + dummy-ups.h eaton-mib.h explore-hid.h gamatronic.h genericups.h \ hidparser.h hidtypes.h ietf-mib.h libhid.h libshut.h libusb.h liebert-hid.h \ - main.h main-hal.h mge-hid.h mge-mib.h mge-shut.h mge-utalk.h \ + main.h mge-hid.h mge-mib.h mge-shut.h mge-utalk.h \ mge-xml.h microdowell.h netvision-mib.h netxml-ups.h nut-ipmi.h oneac.h \ powercom.h powerpanel.h powerp-bin.h powerp-txt.h powerware-mib.h raritan-pdu-mib.h \ safenet.h serial.h snmp-ups.h solis.h tripplite.h tripplite-hid.h \ upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \ apcsmart.h apcsmart_tabs.h apcsmart-old.h apcupsd-ups.h cyberpower-mib.h riello.h openups-hid.h \ delta_ups-mib.h nutdrv_qx.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ - nutdrv_qx_megatec.h nutdrv_qx_megatec-old.h nutdrv_qx_mustek.h nutdrv_qx_voltronic.h \ - nutdrv_qx_zinto.h + nutdrv_qx_megatec.h nutdrv_qx_megatec-old.h nutdrv_qx_mustek.h nutdrv_qx_q1.h \ + nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_zinto.h \ + xppc-mib.h # Define a dummy library so that Automake builds rules for the # corresponding object files. This library is not actually built, EXTRA_LIBRARIES = libdummy.a libdummy_a_SOURCES = main.c dstate.c serial.c - -# the nuthalmain library combines the code for main-hal.c and -# dstate-hal.c. It is necessary for Automake-technical reasons, -# because per-object CFLAGS can only be specified for libraries, not -# for object files. This library is used during the build process, -# and is not meant to be installed. - -EXTRA_LIBRARIES += libnuthalmain.a -libnuthalmain_a_SOURCES = main-hal.c dstate-hal.c usb-common.c - -MOSTLYCLEANFILES = libnuthalmain.a diff --git a/drivers/Makefile.in b/drivers/Makefile.in index b85633c..11a9f93 100644 --- a/drivers/Makefile.in +++ b/drivers/Makefile.in @@ -55,42 +55,38 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@WITH_HAL_TRUE@am__append_1 = $(LIBHAL_CFLAGS) -@WITH_USB_TRUE@am__append_2 = $(LIBUSB_CFLAGS) -@WITH_SNMP_TRUE@am__append_3 = $(LIBNETSNMP_CFLAGS) -@WITH_NEON_TRUE@am__append_4 = $(LIBNEON_CFLAGS) -@WITH_LIBPOWERMAN_TRUE@am__append_5 = $(LIBPOWERMAN_CFLAGS) -@WITH_IPMI_TRUE@am__append_6 = $(LIBIPMI_CFLAGS) +@WITH_USB_TRUE@am__append_1 = $(LIBUSB_CFLAGS) +@WITH_SNMP_TRUE@am__append_2 = $(LIBNETSNMP_CFLAGS) +@WITH_NEON_TRUE@am__append_3 = $(LIBNEON_CFLAGS) +@WITH_LIBPOWERMAN_TRUE@am__append_4 = $(LIBPOWERMAN_CFLAGS) +@WITH_IPMI_TRUE@am__append_5 = $(LIBIPMI_CFLAGS) EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4) \ $(am__EXEEXT_5) $(am__EXEEXT_6) @SOME_DRIVERS_FALSE@driverexec_PROGRAMS = $(am__EXEEXT_7) \ @SOME_DRIVERS_FALSE@ $(am__EXEEXT_8) $(am__EXEEXT_9) \ @SOME_DRIVERS_FALSE@ $(am__EXEEXT_10) $(am__EXEEXT_11) \ -@SOME_DRIVERS_FALSE@ $(am__EXEEXT_12) $(am__EXEEXT_13) \ -@SOME_DRIVERS_FALSE@ upsdrvctl$(EXEEXT) +@SOME_DRIVERS_FALSE@ $(am__EXEEXT_12) $(am__EXEEXT_13) @SOME_DRIVERS_TRUE@driverexec_PROGRAMS = $(DRIVER_BUILD_LIST) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_7) $(am__EXEEXT_8) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_9) $(am__EXEEXT_10) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_11) $(am__EXEEXT_12) \ -@SOME_DRIVERS_TRUE@ $(am__EXEEXT_13) skel$(EXEEXT) \ -@SOME_DRIVERS_TRUE@ upsdrvctl$(EXEEXT) -@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_7 = $(SERIAL_DRIVERLIST) -@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_8 = $(SNMP_DRIVERLIST) -@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_9 = $(USB_LIBUSB_DRIVERLIST) -@SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@halexec_PROGRAMS = \ -@SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@ $(am__EXEEXT_14) -@SOME_DRIVERS_FALSE@@WITH_NEON_TRUE@am__append_10 = $(NEONXML_DRIVERLIST) -@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_11 = powerman-pdu -@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_12 = nut-ipmipsu -@SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__append_13 = $(MACOSX_DRIVERLIST) -@WITH_SSL_TRUE@am__append_14 = $(LIBSSL_CFLAGS) -@WITH_SSL_TRUE@am__append_15 = $(LIBSSL_LIBS) -@WITH_FREEIPMI_TRUE@am__append_16 = nut-libfreeipmi.c -@WITH_SERIAL_TRUE@am__append_17 = -DQX_SERIAL -@WITH_SERIAL_TRUE@am__append_18 = $(SERLIBS) serial.o -@WITH_USB_TRUE@am__append_19 = -DQX_USB -@WITH_USB_TRUE@am__append_20 = libusb.c usb-common.c -@WITH_USB_TRUE@am__append_21 = $(LIBUSB_LIBS) +@SOME_DRIVERS_TRUE@ $(am__EXEEXT_13) skel$(EXEEXT) +@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_6 = $(SERIAL_DRIVERLIST) +@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_7 = $(SNMP_DRIVERLIST) +@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_8 = $(USB_LIBUSB_DRIVERLIST) +@SOME_DRIVERS_FALSE@@WITH_NEON_TRUE@am__append_9 = $(NEONXML_DRIVERLIST) +@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_10 = powerman-pdu +@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_11 = nut-ipmipsu +@SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__append_12 = $(MACOSX_DRIVERLIST) +sbin_PROGRAMS = upsdrvctl$(EXEEXT) +@WITH_SSL_TRUE@am__append_13 = $(LIBSSL_CFLAGS) +@WITH_SSL_TRUE@am__append_14 = $(LIBSSL_LIBS) +@WITH_FREEIPMI_TRUE@am__append_15 = nut-libfreeipmi.c +@WITH_SERIAL_TRUE@am__append_16 = -DQX_SERIAL +@WITH_SERIAL_TRUE@am__append_17 = $(SERLIBS) serial.o +@WITH_USB_TRUE@am__append_18 = -DQX_USB +@WITH_USB_TRUE@am__append_19 = libusb.c usb-common.c +@WITH_USB_TRUE@am__append_20 = $(LIBUSB_LIBS) subdir = drivers DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -104,7 +100,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -114,10 +109,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -130,11 +124,6 @@ libdummy_a_LIBADD = am_libdummy_a_OBJECTS = main.$(OBJEXT) dstate.$(OBJEXT) \ serial.$(OBJEXT) libdummy_a_OBJECTS = $(am_libdummy_a_OBJECTS) -libnuthalmain_a_AR = $(AR) $(ARFLAGS) -libnuthalmain_a_LIBADD = -am_libnuthalmain_a_OBJECTS = main-hal.$(OBJEXT) dstate-hal.$(OBJEXT) \ - usb-common.$(OBJEXT) -libnuthalmain_a_OBJECTS = $(am_libnuthalmain_a_OBJECTS) am__EXEEXT_1 = al175$(EXEEXT) bcmxcp$(EXEEXT) belkin$(EXEEXT) \ belkinunv$(EXEEXT) bestfcom$(EXEEXT) bestfortress$(EXEEXT) \ bestuferrups$(EXEEXT) bestups$(EXEEXT) dummy-ups$(EXEEXT) \ @@ -153,7 +142,8 @@ am__EXEEXT_1 = al175$(EXEEXT) bcmxcp$(EXEEXT) belkin$(EXEEXT) \ am__EXEEXT_2 = snmp-ups$(EXEEXT) am__EXEEXT_3 = usbhid-ups$(EXEEXT) bcmxcp_usb$(EXEEXT) \ tripplite_usb$(EXEEXT) blazer_usb$(EXEEXT) \ - richcomm_usb$(EXEEXT) riello_usb$(EXEEXT) nutdrv_qx$(EXEEXT) + richcomm_usb$(EXEEXT) riello_usb$(EXEEXT) \ + nutdrv_atcl_usb$(EXEEXT) nutdrv_qx$(EXEEXT) am__EXEEXT_4 = $(am__EXEEXT_3) am__EXEEXT_5 = netxml-ups$(EXEEXT) am__EXEEXT_6 = macosx-ups$(EXEEXT) @@ -165,14 +155,8 @@ am__EXEEXT_6 = macosx-ups$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__EXEEXT_12 = \ @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@ nut-ipmipsu$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__EXEEXT_13 = $(am__EXEEXT_6) -am__installdirs = "$(DESTDIR)$(driverexecdir)" \ - "$(DESTDIR)$(halexecdir)" -am__EXEEXT_14 = hald-addon-usbhid-ups$(EXEEXT) \ - hald-addon-bcmxcp_usb$(EXEEXT) \ - hald-addon-tripplite_usb$(EXEEXT) \ - hald-addon-blazer_usb$(EXEEXT) hald-addon-riello_usb$(EXEEXT) \ - hald-addon-nutdrv_qx$(EXEEXT) -PROGRAMS = $(driverexec_PROGRAMS) $(halexec_PROGRAMS) +am__installdirs = "$(DESTDIR)$(driverexecdir)" "$(DESTDIR)$(sbindir)" +PROGRAMS = $(driverexec_PROGRAMS) $(sbin_PROGRAMS) am_al175_OBJECTS = al175.$(OBJEXT) al175_OBJECTS = $(am_al175_OBJECTS) al175_LDADD = $(LDADD) @@ -264,56 +248,6 @@ am_genericups_OBJECTS = genericups.$(OBJEXT) genericups_OBJECTS = $(am_genericups_OBJECTS) genericups_LDADD = $(LDADD) genericups_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_hald_addon_bcmxcp_usb_OBJECTS = bcmxcp_usb.$(OBJEXT) \ - bcmxcp.$(OBJEXT) -hald_addon_bcmxcp_usb_OBJECTS = $(am_hald_addon_bcmxcp_usb_OBJECTS) -hald_addon_bcmxcp_usb_DEPENDENCIES = $(LDADD_HAL_DRIVERS) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_hald_addon_blazer_usb_OBJECTS = blazer.$(OBJEXT) \ - blazer_usb.$(OBJEXT) libusb.$(OBJEXT) -hald_addon_blazer_usb_OBJECTS = $(am_hald_addon_blazer_usb_OBJECTS) -hald_addon_blazer_usb_DEPENDENCIES = $(LDADD_HAL_DRIVERS) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__objects_1 = \ - hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.$(OBJEXT) \ - hald_addon_nutdrv_qx-nutdrv_qx_mecer.$(OBJEXT) \ - hald_addon_nutdrv_qx-nutdrv_qx_megatec.$(OBJEXT) \ - hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.$(OBJEXT) \ - hald_addon_nutdrv_qx-nutdrv_qx_mustek.$(OBJEXT) \ - hald_addon_nutdrv_qx-nutdrv_qx_voltronic.$(OBJEXT) \ - hald_addon_nutdrv_qx-nutdrv_qx_zinto.$(OBJEXT) -am_hald_addon_nutdrv_qx_OBJECTS = \ - hald_addon_nutdrv_qx-nutdrv_qx.$(OBJEXT) \ - hald_addon_nutdrv_qx-libusb.$(OBJEXT) $(am__objects_1) -hald_addon_nutdrv_qx_OBJECTS = $(am_hald_addon_nutdrv_qx_OBJECTS) -hald_addon_nutdrv_qx_DEPENDENCIES = $(LDADD_HAL_DRIVERS) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -hald_addon_nutdrv_qx_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_hald_addon_riello_usb_OBJECTS = riello.$(OBJEXT) \ - riello_usb.$(OBJEXT) libusb.$(OBJEXT) -hald_addon_riello_usb_OBJECTS = $(am_hald_addon_riello_usb_OBJECTS) -hald_addon_riello_usb_DEPENDENCIES = $(LDADD_HAL_DRIVERS) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_hald_addon_tripplite_usb_OBJECTS = tripplite_usb.$(OBJEXT) \ - libusb.$(OBJEXT) -hald_addon_tripplite_usb_OBJECTS = \ - $(am_hald_addon_tripplite_usb_OBJECTS) -hald_addon_tripplite_usb_DEPENDENCIES = $(LDADD_HAL_DRIVERS) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__objects_2 = apc-hid.$(OBJEXT) belkin-hid.$(OBJEXT) \ - cps-hid.$(OBJEXT) explore-hid.$(OBJEXT) liebert-hid.$(OBJEXT) \ - mge-hid.$(OBJEXT) powercom-hid.$(OBJEXT) \ - tripplite-hid.$(OBJEXT) idowell-hid.$(OBJEXT) \ - openups-hid.$(OBJEXT) -am_hald_addon_usbhid_ups_OBJECTS = usbhid-ups.$(OBJEXT) \ - libhid.$(OBJEXT) libusb.$(OBJEXT) hidparser.$(OBJEXT) \ - $(am__objects_2) -hald_addon_usbhid_ups_OBJECTS = $(am_hald_addon_usbhid_ups_OBJECTS) -hald_addon_usbhid_ups_DEPENDENCIES = $(LDADD_HAL_DRIVERS) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_isbmex_OBJECTS = isbmex.$(OBJEXT) isbmex_OBJECTS = $(am_isbmex_OBJECTS) isbmex_DEPENDENCIES = $(am__DEPENDENCIES_3) @@ -363,25 +297,32 @@ am_netxml_ups_OBJECTS = netxml-ups.$(OBJEXT) mge-xml.$(OBJEXT) netxml_ups_OBJECTS = $(am_netxml_ups_OBJECTS) netxml_ups_DEPENDENCIES = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) am__nut_ipmipsu_SOURCES_DIST = nut-ipmipsu.c nut-libfreeipmi.c -@WITH_FREEIPMI_TRUE@am__objects_3 = nut-libfreeipmi.$(OBJEXT) -am_nut_ipmipsu_OBJECTS = nut-ipmipsu.$(OBJEXT) $(am__objects_3) +@WITH_FREEIPMI_TRUE@am__objects_1 = nut-libfreeipmi.$(OBJEXT) +am_nut_ipmipsu_OBJECTS = nut-ipmipsu.$(OBJEXT) $(am__objects_1) nut_ipmipsu_OBJECTS = $(am_nut_ipmipsu_OBJECTS) nut_ipmipsu_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) +am_nutdrv_atcl_usb_OBJECTS = nutdrv_atcl_usb.$(OBJEXT) \ + usb-common.$(OBJEXT) +nutdrv_atcl_usb_OBJECTS = $(am_nutdrv_atcl_usb_OBJECTS) +nutdrv_atcl_usb_DEPENDENCIES = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) am__nutdrv_qx_SOURCES_DIST = nutdrv_qx.c libusb.c usb-common.c \ nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c nutdrv_qx_mustek.c \ - nutdrv_qx_voltronic.c nutdrv_qx_zinto.c -@WITH_USB_TRUE@am__objects_4 = nutdrv_qx-libusb.$(OBJEXT) \ + nutdrv_qx_q1.c nutdrv_qx_voltronic.c nutdrv_qx_voltronic-qs.c \ + nutdrv_qx_zinto.c +@WITH_USB_TRUE@am__objects_2 = nutdrv_qx-libusb.$(OBJEXT) \ @WITH_USB_TRUE@ nutdrv_qx-usb-common.$(OBJEXT) -am__objects_5 = nutdrv_qx-nutdrv_qx_blazer-common.$(OBJEXT) \ +am__objects_3 = nutdrv_qx-nutdrv_qx_blazer-common.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_mecer.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_megatec.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_megatec-old.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_mustek.$(OBJEXT) \ + nutdrv_qx-nutdrv_qx_q1.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_voltronic.$(OBJEXT) \ + nutdrv_qx-nutdrv_qx_voltronic-qs.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_zinto.$(OBJEXT) -am_nutdrv_qx_OBJECTS = nutdrv_qx-nutdrv_qx.$(OBJEXT) $(am__objects_4) \ - $(am__objects_5) +am_nutdrv_qx_OBJECTS = nutdrv_qx-nutdrv_qx.$(OBJEXT) $(am__objects_2) \ + $(am__objects_3) nutdrv_qx_OBJECTS = $(am_nutdrv_qx_OBJECTS) @WITH_SERIAL_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1) serial.o @WITH_USB_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1) @@ -438,7 +379,7 @@ am_snmp_ups_OBJECTS = snmp-ups.$(OBJEXT) apc-mib.$(OBJEXT) \ ietf-mib.$(OBJEXT) mge-mib.$(OBJEXT) netvision-mib.$(OBJEXT) \ powerware-mib.$(OBJEXT) raritan-pdu-mib.$(OBJEXT) \ bestpower-mib.$(OBJEXT) cyberpower-mib.$(OBJEXT) \ - delta_ups-mib.$(OBJEXT) + delta_ups-mib.$(OBJEXT) xppc-mib.$(OBJEXT) snmp_ups_OBJECTS = $(am_snmp_ups_OBJECTS) snmp_ups_DEPENDENCIES = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) am_solis_OBJECTS = solis.$(OBJEXT) @@ -462,9 +403,14 @@ upscode2_DEPENDENCIES = $(am__DEPENDENCIES_3) am_upsdrvctl_OBJECTS = upsdrvctl.$(OBJEXT) upsdrvctl_OBJECTS = $(am_upsdrvctl_OBJECTS) upsdrvctl_DEPENDENCIES = $(LDADD_COMMON) +am__objects_4 = apc-hid.$(OBJEXT) belkin-hid.$(OBJEXT) \ + cps-hid.$(OBJEXT) explore-hid.$(OBJEXT) liebert-hid.$(OBJEXT) \ + mge-hid.$(OBJEXT) powercom-hid.$(OBJEXT) \ + tripplite-hid.$(OBJEXT) idowell-hid.$(OBJEXT) \ + openups-hid.$(OBJEXT) am_usbhid_ups_OBJECTS = usbhid-ups.$(OBJEXT) libhid.$(OBJEXT) \ libusb.$(OBJEXT) hidparser.$(OBJEXT) usb-common.$(OBJEXT) \ - $(am__objects_2) + $(am__objects_4) usbhid_ups_OBJECTS = $(am_usbhid_ups_OBJECTS) usbhid_ups_DEPENDENCIES = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) am_victronups_OBJECTS = victronups.$(OBJEXT) @@ -484,25 +430,20 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libdummy_a_SOURCES) $(libnuthalmain_a_SOURCES) \ - $(al175_SOURCES) $(apcsmart_SOURCES) $(apcsmart_old_SOURCES) \ - $(apcupsd_ups_SOURCES) $(bcmxcp_SOURCES) $(bcmxcp_usb_SOURCES) \ - $(belkin_SOURCES) $(belkinunv_SOURCES) $(bestfcom_SOURCES) \ - bestfortress.c $(bestuferrups_SOURCES) $(bestups_SOURCES) \ +SOURCES = $(libdummy_a_SOURCES) $(al175_SOURCES) $(apcsmart_SOURCES) \ + $(apcsmart_old_SOURCES) $(apcupsd_ups_SOURCES) \ + $(bcmxcp_SOURCES) $(bcmxcp_usb_SOURCES) $(belkin_SOURCES) \ + $(belkinunv_SOURCES) $(bestfcom_SOURCES) bestfortress.c \ + $(bestuferrups_SOURCES) $(bestups_SOURCES) \ $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) $(clone_SOURCES) \ $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) $(etapro_SOURCES) \ $(everups_SOURCES) $(gamatronic_SOURCES) $(genericups_SOURCES) \ - $(hald_addon_bcmxcp_usb_SOURCES) \ - $(hald_addon_blazer_usb_SOURCES) \ - $(hald_addon_nutdrv_qx_SOURCES) \ - $(hald_addon_riello_usb_SOURCES) \ - $(hald_addon_tripplite_usb_SOURCES) \ - $(hald_addon_usbhid_ups_SOURCES) $(isbmex_SOURCES) \ - $(ivtscd_SOURCES) $(liebert_SOURCES) $(liebert_esp2_SOURCES) \ - $(macosx_ups_SOURCES) $(masterguard_SOURCES) \ - $(metasys_SOURCES) $(mge_shut_SOURCES) $(mge_utalk_SOURCES) \ - $(microdowell_SOURCES) $(netxml_ups_SOURCES) \ - $(nut_ipmipsu_SOURCES) $(nutdrv_qx_SOURCES) \ + $(isbmex_SOURCES) $(ivtscd_SOURCES) $(liebert_SOURCES) \ + $(liebert_esp2_SOURCES) $(macosx_ups_SOURCES) \ + $(masterguard_SOURCES) $(metasys_SOURCES) $(mge_shut_SOURCES) \ + $(mge_utalk_SOURCES) $(microdowell_SOURCES) \ + $(netxml_ups_SOURCES) $(nut_ipmipsu_SOURCES) \ + $(nutdrv_atcl_usb_SOURCES) $(nutdrv_qx_SOURCES) \ $(oldmge_shut_SOURCES) $(oneac_SOURCES) $(optiups_SOURCES) \ $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ $(powerpanel_SOURCES) $(rhino_SOURCES) $(richcomm_usb_SOURCES) \ @@ -512,25 +453,20 @@ SOURCES = $(libdummy_a_SOURCES) $(libnuthalmain_a_SOURCES) \ $(tripplitesu_SOURCES) $(upscode2_SOURCES) \ $(upsdrvctl_SOURCES) $(usbhid_ups_SOURCES) \ $(victronups_SOURCES) -DIST_SOURCES = $(libdummy_a_SOURCES) $(libnuthalmain_a_SOURCES) \ - $(al175_SOURCES) $(apcsmart_SOURCES) $(apcsmart_old_SOURCES) \ +DIST_SOURCES = $(libdummy_a_SOURCES) $(al175_SOURCES) \ + $(apcsmart_SOURCES) $(apcsmart_old_SOURCES) \ $(apcupsd_ups_SOURCES) $(bcmxcp_SOURCES) $(bcmxcp_usb_SOURCES) \ $(belkin_SOURCES) $(belkinunv_SOURCES) $(bestfcom_SOURCES) \ bestfortress.c $(bestuferrups_SOURCES) $(bestups_SOURCES) \ $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) $(clone_SOURCES) \ $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) $(etapro_SOURCES) \ $(everups_SOURCES) $(gamatronic_SOURCES) $(genericups_SOURCES) \ - $(hald_addon_bcmxcp_usb_SOURCES) \ - $(hald_addon_blazer_usb_SOURCES) \ - $(hald_addon_nutdrv_qx_SOURCES) \ - $(hald_addon_riello_usb_SOURCES) \ - $(hald_addon_tripplite_usb_SOURCES) \ - $(hald_addon_usbhid_ups_SOURCES) $(isbmex_SOURCES) \ - $(ivtscd_SOURCES) $(liebert_SOURCES) $(liebert_esp2_SOURCES) \ - $(macosx_ups_SOURCES) $(masterguard_SOURCES) \ - $(metasys_SOURCES) $(mge_shut_SOURCES) $(mge_utalk_SOURCES) \ - $(microdowell_SOURCES) $(netxml_ups_SOURCES) \ - $(am__nut_ipmipsu_SOURCES_DIST) $(am__nutdrv_qx_SOURCES_DIST) \ + $(isbmex_SOURCES) $(ivtscd_SOURCES) $(liebert_SOURCES) \ + $(liebert_esp2_SOURCES) $(macosx_ups_SOURCES) \ + $(masterguard_SOURCES) $(metasys_SOURCES) $(mge_shut_SOURCES) \ + $(mge_utalk_SOURCES) $(microdowell_SOURCES) \ + $(netxml_ups_SOURCES) $(am__nut_ipmipsu_SOURCES_DIST) \ + $(nutdrv_atcl_usb_SOURCES) $(am__nutdrv_qx_SOURCES_DIST) \ $(oldmge_shut_SOURCES) $(oneac_SOURCES) $(optiups_SOURCES) \ $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ $(powerpanel_SOURCES) $(rhino_SOURCES) $(richcomm_usb_SOURCES) \ @@ -591,10 +527,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -606,8 +538,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -693,6 +623,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ @@ -740,7 +671,6 @@ udevdir = @udevdir@ #FIXME: SERLIBS is only useful for LDADD_DRIVERS_SERIAL not for LDADD_COMMON LDADD_COMMON = ../common/libcommon.la ../common/libparseconf.la LDADD_DRIVERS = $(LDADD_COMMON) main.o dstate.o -LDADD_HAL_DRIVERS = $(LDADD_COMMON) libnuthalmain.a LDADD_DRIVERS_SERIAL = $(LDADD_DRIVERS) $(SERLIBS) serial.o # most targets are drivers, so make this the default @@ -749,8 +679,7 @@ LDADD = $(LDADD_DRIVERS_SERIAL) # files. In any case, CFLAGS are only -I options, so there is no harm, # but only add them if we really use the target. AM_CFLAGS = -I$(top_srcdir)/include $(am__append_1) $(am__append_2) \ - $(am__append_3) $(am__append_4) $(am__append_5) \ - $(am__append_6) + $(am__append_3) $(am__append_4) $(am__append_5) SERIAL_DRIVERLIST = al175 bcmxcp belkin belkinunv bestfcom \ bestfortress bestuferrups bestups dummy-ups etapro everups \ gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \ @@ -761,16 +690,13 @@ SERIAL_DRIVERLIST = al175 bcmxcp belkin belkinunv bestfcom \ SNMP_DRIVERLIST = snmp-ups USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \ - blazer_usb richcomm_usb riello_usb nutdrv_qx + blazer_usb richcomm_usb riello_usb \ + nutdrv_atcl_usb \ + nutdrv_qx USB_DRIVERLIST = $(USB_LIBUSB_DRIVERLIST) -HAL_DRIVERLIST = hald-addon-usbhid-ups hald-addon-bcmxcp_usb \ - hald-addon-tripplite_usb hald-addon-blazer_usb hald-addon-riello_usb \ - hald-addon-nutdrv_qx - NEONXML_DRIVERLIST = netxml-ups MACOSX_DRIVERLIST = macosx-ups -@SOME_DRIVERS_FALSE@@WITH_HAL_TRUE@halexecdir = $(HAL_CALLOUTS_PATH) # ========================================================================== # Driver build details @@ -830,9 +756,9 @@ riello_ser_LDADD = $(LDADD) -lm # dummy dummy_ups_SOURCES = dummy-ups.c dummy_ups_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/clients \ - $(am__append_14) + $(am__append_13) dummy_ups_LDADD = $(LDADD_DRIVERS) ../clients/libupsclient.la \ - $(am__append_15) + $(am__append_14) # Clone drivers clone_SOURCES = clone.c @@ -862,6 +788,8 @@ bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c usb-common.c bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm +nutdrv_atcl_usb_SOURCES = nutdrv_atcl_usb.c usb-common.c +nutdrv_atcl_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) richcomm_usb_SOURCES = richcomm_usb.c usb-common.c richcomm_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) riello_usb_SOURCES = riello.c riello_usb.c libusb.c usb-common.c @@ -876,27 +804,11 @@ mge_shut_LDADD = $(LDADD) # SNMP snmp_ups_SOURCES = snmp-ups.c apc-mib.c baytech-mib.c compaq-mib.c eaton-mib.c \ ietf-mib.c mge-mib.c netvision-mib.c powerware-mib.c raritan-pdu-mib.c \ - bestpower-mib.c cyberpower-mib.c delta_ups-mib.c + bestpower-mib.c cyberpower-mib.c delta_ups-mib.c \ + xppc-mib.c snmp_ups_LDADD = $(LDADD_DRIVERS) $(LIBNETSNMP_LIBS) -# HAL -hald_addon_usbhid_ups_SOURCES = usbhid-ups.c libhid.c libusb.c hidparser.c \ - $(USBHID_UPS_SUBDRIVERS) - -hald_addon_usbhid_ups_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -hald_addon_tripplite_usb_SOURCES = tripplite_usb.c libusb.c -hald_addon_tripplite_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -lm -hald_addon_bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c -hald_addon_bcmxcp_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -hald_addon_blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c -hald_addon_blazer_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -lm -hald_addon_riello_usb_SOURCES = riello.c riello_usb.c libusb.c -hald_addon_riello_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -lm -hald_addon_nutdrv_qx_SOURCES = nutdrv_qx.c libusb.c $(NUTDRV_QX_SUBDRIVERS) -hald_addon_nutdrv_qx_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -lm -hald_addon_nutdrv_qx_CFLAGS = $(AM_CFLAGS) -DQX_USB - # NEON XML/HTTP netxml_ups_SOURCES = netxml-ups.c mge-xml.c netxml_ups_LDADD = $(LDADD_DRIVERS) $(LIBNEON_LIBS) @@ -906,7 +818,7 @@ powerman_pdu_SOURCES = powerman-pdu.c powerman_pdu_LDADD = $(LDADD) $(LIBPOWERMAN_LIBS) # IPMI PSU -nut_ipmipsu_SOURCES = nut-ipmipsu.c $(am__append_16) +nut_ipmipsu_SOURCES = nut-ipmipsu.c $(am__append_15) nut_ipmipsu_LDADD = $(LDADD) $(LIBIPMI_LIBS) # Mac OS X metadriver @@ -915,14 +827,14 @@ macosx_ups_LDFLAGS = $(LDFLAGS) -framework IOKit -framework CoreFoundation macosx_ups_SOURCES = macosx-ups.c # nutdrv_qx USB/Serial -nutdrv_qx_SOURCES = nutdrv_qx.c $(am__append_20) \ +nutdrv_qx_SOURCES = nutdrv_qx.c $(am__append_19) \ $(NUTDRV_QX_SUBDRIVERS) -nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm $(am__append_18) \ - $(am__append_21) -nutdrv_qx_CFLAGS = $(AM_CFLAGS) $(am__append_17) $(am__append_19) +nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm $(am__append_17) \ + $(am__append_20) +nutdrv_qx_CFLAGS = $(AM_CFLAGS) $(am__append_16) $(am__append_18) NUTDRV_QX_SUBDRIVERS = nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c nutdrv_qx_mustek.c \ - nutdrv_qx_voltronic.c nutdrv_qx_zinto.c + nutdrv_qx_q1.c nutdrv_qx_voltronic.c nutdrv_qx_voltronic-qs.c nutdrv_qx_zinto.c # ---------------------------------------------------------------------- @@ -931,31 +843,24 @@ NUTDRV_QX_SUBDRIVERS = nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ # distributed by "make dist". dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \ bcmxcp_io.h belkin.h belkin-hid.h bestpower-mib.h blazer.h cps-hid.h dstate.h \ - dstate-hal.h dummy-ups.h eaton-mib.h explore-hid.h gamatronic.h genericups.h \ + dummy-ups.h eaton-mib.h explore-hid.h gamatronic.h genericups.h \ hidparser.h hidtypes.h ietf-mib.h libhid.h libshut.h libusb.h liebert-hid.h \ - main.h main-hal.h mge-hid.h mge-mib.h mge-shut.h mge-utalk.h \ + main.h mge-hid.h mge-mib.h mge-shut.h mge-utalk.h \ mge-xml.h microdowell.h netvision-mib.h netxml-ups.h nut-ipmi.h oneac.h \ powercom.h powerpanel.h powerp-bin.h powerp-txt.h powerware-mib.h raritan-pdu-mib.h \ safenet.h serial.h snmp-ups.h solis.h tripplite.h tripplite-hid.h \ upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \ apcsmart.h apcsmart_tabs.h apcsmart-old.h apcupsd-ups.h cyberpower-mib.h riello.h openups-hid.h \ delta_ups-mib.h nutdrv_qx.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ - nutdrv_qx_megatec.h nutdrv_qx_megatec-old.h nutdrv_qx_mustek.h nutdrv_qx_voltronic.h \ - nutdrv_qx_zinto.h + nutdrv_qx_megatec.h nutdrv_qx_megatec-old.h nutdrv_qx_mustek.h nutdrv_qx_q1.h \ + nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_zinto.h \ + xppc-mib.h # Define a dummy library so that Automake builds rules for the # corresponding object files. This library is not actually built, - -# the nuthalmain library combines the code for main-hal.c and -# dstate-hal.c. It is necessary for Automake-technical reasons, -# because per-object CFLAGS can only be specified for libraries, not -# for object files. This library is used during the build process, -# and is not meant to be installed. -EXTRA_LIBRARIES = libdummy.a libnuthalmain.a +EXTRA_LIBRARIES = libdummy.a libdummy_a_SOURCES = main.c dstate.c serial.c -libnuthalmain_a_SOURCES = main-hal.c dstate-hal.c usb-common.c -MOSTLYCLEANFILES = libnuthalmain.a all: all-am .SUFFIXES: @@ -994,10 +899,6 @@ libdummy.a: $(libdummy_a_OBJECTS) $(libdummy_a_DEPENDENCIES) $(EXTRA_libdummy_a_ -rm -f libdummy.a $(libdummy_a_AR) libdummy.a $(libdummy_a_OBJECTS) $(libdummy_a_LIBADD) $(RANLIB) libdummy.a -libnuthalmain.a: $(libnuthalmain_a_OBJECTS) $(libnuthalmain_a_DEPENDENCIES) $(EXTRA_libnuthalmain_a_DEPENDENCIES) - -rm -f libnuthalmain.a - $(libnuthalmain_a_AR) libnuthalmain.a $(libnuthalmain_a_OBJECTS) $(libnuthalmain_a_LIBADD) - $(RANLIB) libnuthalmain.a install-driverexecPROGRAMS: $(driverexec_PROGRAMS) @$(NORMAL_INSTALL) @list='$(driverexec_PROGRAMS)'; test -n "$(driverexecdir)" || list=; \ @@ -1044,12 +945,12 @@ clean-driverexecPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -install-halexecPROGRAMS: $(halexec_PROGRAMS) +install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - @list='$(halexec_PROGRAMS)'; test -n "$(halexecdir)" || list=; \ + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(halexecdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(halexecdir)" || exit 1; \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ @@ -1067,23 +968,23 @@ install-halexecPROGRAMS: $(halexec_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(halexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(halexecdir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done -uninstall-halexecPROGRAMS: +uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(halexec_PROGRAMS)'; test -n "$(halexecdir)" || list=; \ + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(halexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(halexecdir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files -clean-halexecPROGRAMS: - @list='$(halexec_PROGRAMS)'; test -n "$$list" || exit 0; \ +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ @@ -1153,24 +1054,6 @@ gamatronic$(EXEEXT): $(gamatronic_OBJECTS) $(gamatronic_DEPENDENCIES) $(EXTRA_ga genericups$(EXEEXT): $(genericups_OBJECTS) $(genericups_DEPENDENCIES) $(EXTRA_genericups_DEPENDENCIES) @rm -f genericups$(EXEEXT) $(LINK) $(genericups_OBJECTS) $(genericups_LDADD) $(LIBS) -hald-addon-bcmxcp_usb$(EXEEXT): $(hald_addon_bcmxcp_usb_OBJECTS) $(hald_addon_bcmxcp_usb_DEPENDENCIES) $(EXTRA_hald_addon_bcmxcp_usb_DEPENDENCIES) - @rm -f hald-addon-bcmxcp_usb$(EXEEXT) - $(LINK) $(hald_addon_bcmxcp_usb_OBJECTS) $(hald_addon_bcmxcp_usb_LDADD) $(LIBS) -hald-addon-blazer_usb$(EXEEXT): $(hald_addon_blazer_usb_OBJECTS) $(hald_addon_blazer_usb_DEPENDENCIES) $(EXTRA_hald_addon_blazer_usb_DEPENDENCIES) - @rm -f hald-addon-blazer_usb$(EXEEXT) - $(LINK) $(hald_addon_blazer_usb_OBJECTS) $(hald_addon_blazer_usb_LDADD) $(LIBS) -hald-addon-nutdrv_qx$(EXEEXT): $(hald_addon_nutdrv_qx_OBJECTS) $(hald_addon_nutdrv_qx_DEPENDENCIES) $(EXTRA_hald_addon_nutdrv_qx_DEPENDENCIES) - @rm -f hald-addon-nutdrv_qx$(EXEEXT) - $(hald_addon_nutdrv_qx_LINK) $(hald_addon_nutdrv_qx_OBJECTS) $(hald_addon_nutdrv_qx_LDADD) $(LIBS) -hald-addon-riello_usb$(EXEEXT): $(hald_addon_riello_usb_OBJECTS) $(hald_addon_riello_usb_DEPENDENCIES) $(EXTRA_hald_addon_riello_usb_DEPENDENCIES) - @rm -f hald-addon-riello_usb$(EXEEXT) - $(LINK) $(hald_addon_riello_usb_OBJECTS) $(hald_addon_riello_usb_LDADD) $(LIBS) -hald-addon-tripplite_usb$(EXEEXT): $(hald_addon_tripplite_usb_OBJECTS) $(hald_addon_tripplite_usb_DEPENDENCIES) $(EXTRA_hald_addon_tripplite_usb_DEPENDENCIES) - @rm -f hald-addon-tripplite_usb$(EXEEXT) - $(LINK) $(hald_addon_tripplite_usb_OBJECTS) $(hald_addon_tripplite_usb_LDADD) $(LIBS) -hald-addon-usbhid-ups$(EXEEXT): $(hald_addon_usbhid_ups_OBJECTS) $(hald_addon_usbhid_ups_DEPENDENCIES) $(EXTRA_hald_addon_usbhid_ups_DEPENDENCIES) - @rm -f hald-addon-usbhid-ups$(EXEEXT) - $(LINK) $(hald_addon_usbhid_ups_OBJECTS) $(hald_addon_usbhid_ups_LDADD) $(LIBS) isbmex$(EXEEXT): $(isbmex_OBJECTS) $(isbmex_DEPENDENCIES) $(EXTRA_isbmex_DEPENDENCIES) @rm -f isbmex$(EXEEXT) $(LINK) $(isbmex_OBJECTS) $(isbmex_LDADD) $(LIBS) @@ -1207,6 +1090,9 @@ netxml-ups$(EXEEXT): $(netxml_ups_OBJECTS) $(netxml_ups_DEPENDENCIES) $(EXTRA_ne nut-ipmipsu$(EXEEXT): $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_DEPENDENCIES) $(EXTRA_nut_ipmipsu_DEPENDENCIES) @rm -f nut-ipmipsu$(EXEEXT) $(LINK) $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_LDADD) $(LIBS) +nutdrv_atcl_usb$(EXEEXT): $(nutdrv_atcl_usb_OBJECTS) $(nutdrv_atcl_usb_DEPENDENCIES) $(EXTRA_nutdrv_atcl_usb_DEPENDENCIES) + @rm -f nutdrv_atcl_usb$(EXEEXT) + $(LINK) $(nutdrv_atcl_usb_OBJECTS) $(nutdrv_atcl_usb_LDADD) $(LIBS) nutdrv_qx$(EXEEXT): $(nutdrv_qx_OBJECTS) $(nutdrv_qx_DEPENDENCIES) $(EXTRA_nutdrv_qx_DEPENDENCIES) @rm -f nutdrv_qx$(EXEEXT) $(nutdrv_qx_LINK) $(nutdrv_qx_OBJECTS) $(nutdrv_qx_LDADD) $(LIBS) @@ -1308,7 +1194,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cps-hid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cyberpower-mib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delta_ups-mib.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dstate-hal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dstate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy_ups-dummy-ups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaton-mib.Po@am__quote@ @@ -1317,15 +1202,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/explore-hid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamatronic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genericups.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_addon_nutdrv_qx-libusb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mecer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mustek.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_voltronic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_zinto.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hidparser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idowell-hid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ietf-mib.Po@am__quote@ @@ -1337,7 +1213,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liebert-hid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liebert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macosx-ups.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main-hal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/masterguard.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metasys.Po@am__quote@ @@ -1356,6 +1231,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netxml-ups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nut-ipmipsu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nut-libfreeipmi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_atcl_usb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-libusb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po@am__quote@ @@ -1363,6 +1239,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-usb-common.Po@am__quote@ @@ -1396,6 +1274,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usb-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usbhid-ups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/victronups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xppc-mib.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -1446,132 +1325,6 @@ dummy_ups-dummy-ups.obj: dummy-ups.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` -hald_addon_nutdrv_qx-nutdrv_qx.o: nutdrv_qx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx.o -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx.c' object='hald_addon_nutdrv_qx-nutdrv_qx.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c - -hald_addon_nutdrv_qx-nutdrv_qx.obj: nutdrv_qx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx.obj -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx.c' object='hald_addon_nutdrv_qx-nutdrv_qx.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` - -hald_addon_nutdrv_qx-libusb.o: libusb.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-libusb.o -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-libusb.Tpo -c -o hald_addon_nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-libusb.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-libusb.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libusb.c' object='hald_addon_nutdrv_qx-libusb.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c - -hald_addon_nutdrv_qx-libusb.obj: libusb.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-libusb.obj -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-libusb.Tpo -c -o hald_addon_nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-libusb.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-libusb.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libusb.c' object='hald_addon_nutdrv_qx-libusb.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` - -hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.o: nutdrv_qx_blazer-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.o -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_blazer-common.c' object='hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c - -hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.obj: nutdrv_qx_blazer-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.obj -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_blazer-common.c' object='hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` - -hald_addon_nutdrv_qx-nutdrv_qx_mecer.o: nutdrv_qx_mecer.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_mecer.o -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mecer.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mecer.c' object='hald_addon_nutdrv_qx-nutdrv_qx_mecer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c - -hald_addon_nutdrv_qx-nutdrv_qx_mecer.obj: nutdrv_qx_mecer.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_mecer.obj -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mecer.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mecer.c' object='hald_addon_nutdrv_qx-nutdrv_qx_mecer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` - -hald_addon_nutdrv_qx-nutdrv_qx_megatec.o: nutdrv_qx_megatec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_megatec.o -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec.c' object='hald_addon_nutdrv_qx-nutdrv_qx_megatec.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c - -hald_addon_nutdrv_qx-nutdrv_qx_megatec.obj: nutdrv_qx_megatec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_megatec.obj -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec.c' object='hald_addon_nutdrv_qx-nutdrv_qx_megatec.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` - -hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.o: nutdrv_qx_megatec-old.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.o -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec-old.c' object='hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c - -hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.obj: nutdrv_qx_megatec-old.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.obj -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec-old.c' object='hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` - -hald_addon_nutdrv_qx-nutdrv_qx_mustek.o: nutdrv_qx_mustek.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_mustek.o -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mustek.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mustek.c' object='hald_addon_nutdrv_qx-nutdrv_qx_mustek.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c - -hald_addon_nutdrv_qx-nutdrv_qx_mustek.obj: nutdrv_qx_mustek.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_mustek.obj -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_mustek.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mustek.c' object='hald_addon_nutdrv_qx-nutdrv_qx_mustek.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` - -hald_addon_nutdrv_qx-nutdrv_qx_voltronic.o: nutdrv_qx_voltronic.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_voltronic.o -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_voltronic.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic.c' object='hald_addon_nutdrv_qx-nutdrv_qx_voltronic.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c - -hald_addon_nutdrv_qx-nutdrv_qx_voltronic.obj: nutdrv_qx_voltronic.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_voltronic.obj -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_voltronic.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic.c' object='hald_addon_nutdrv_qx-nutdrv_qx_voltronic.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` - -hald_addon_nutdrv_qx-nutdrv_qx_zinto.o: nutdrv_qx_zinto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_zinto.o -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_zinto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_zinto.c' object='hald_addon_nutdrv_qx-nutdrv_qx_zinto.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c - -hald_addon_nutdrv_qx-nutdrv_qx_zinto.obj: nutdrv_qx_zinto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -MT hald_addon_nutdrv_qx-nutdrv_qx_zinto.obj -MD -MP -MF $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o hald_addon_nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/hald_addon_nutdrv_qx-nutdrv_qx_zinto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_zinto.c' object='hald_addon_nutdrv_qx-nutdrv_qx_zinto.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hald_addon_nutdrv_qx_CFLAGS) $(CFLAGS) -c -o hald_addon_nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` - mge_shut-usbhid-ups.o: usbhid-ups.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.o -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po @@ -1754,6 +1507,20 @@ nutdrv_qx-nutdrv_qx_mustek.obj: nutdrv_qx_mustek.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` +nutdrv_qx-nutdrv_qx_q1.o: nutdrv_qx_q1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c + +nutdrv_qx-nutdrv_qx_q1.obj: nutdrv_qx_q1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` + nutdrv_qx-nutdrv_qx_voltronic.o: nutdrv_qx_voltronic.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po @@ -1768,6 +1535,20 @@ nutdrv_qx-nutdrv_qx_voltronic.obj: nutdrv_qx_voltronic.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` +nutdrv_qx-nutdrv_qx_voltronic-qs.o: nutdrv_qx_voltronic-qs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c + +nutdrv_qx-nutdrv_qx_voltronic-qs.obj: nutdrv_qx_voltronic-qs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` + nutdrv_qx-nutdrv_qx_zinto.o: nutdrv_qx_zinto.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_zinto.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po @@ -1874,7 +1655,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(driverexecdir)" "$(DESTDIR)$(halexecdir)"; do \ + for dir in "$(DESTDIR)$(driverexecdir)" "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1897,7 +1678,6 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: @@ -1910,8 +1690,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-driverexecPROGRAMS clean-generic clean-halexecPROGRAMS \ - clean-libtool mostlyclean-am +clean-am: clean-driverexecPROGRAMS clean-generic clean-libtool \ + clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1937,7 +1717,7 @@ install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-driverexecPROGRAMS install-halexecPROGRAMS +install-exec-am: install-driverexecPROGRAMS install-sbinPROGRAMS install-html: install-html-am @@ -1977,25 +1757,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-driverexecPROGRAMS uninstall-halexecPROGRAMS +uninstall-am: uninstall-driverexecPROGRAMS uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean \ - clean-driverexecPROGRAMS clean-generic clean-halexecPROGRAMS \ - clean-libtool ctags distclean distclean-compile \ + clean-driverexecPROGRAMS clean-generic clean-libtool \ + clean-sbinPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-driverexecPROGRAMS \ install-dvi install-dvi-am install-exec install-exec-am \ - install-halexecPROGRAMS 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 maintainer-clean \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-sbinPROGRAMS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-driverexecPROGRAMS \ - uninstall-halexecPROGRAMS + uninstall-sbinPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/drivers/al175.c b/drivers/al175.c index 4b4b652..7d0b02e 100644 --- a/drivers/al175.c +++ b/drivers/al175.c @@ -53,7 +53,7 @@ typedef uint8_t byte_t; #define DRIVER_NAME "Eltek AL175/COMLI driver" -#define DRIVER_VERSION "0.11" +#define DRIVER_VERSION "0.12" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -462,7 +462,7 @@ static int al_parse_reply_head(io_head_t *io, const raw_data_t raw_reply_head) const byte_t *reply_head = raw_reply_head.begin - 1; if ( (raw_reply_head.end - raw_reply_head.begin) != 10) { - upsdebugx(3, "%s: wrong size\t(%i != 10)", __func__, (raw_reply_head.end - raw_reply_head.begin)); + upsdebugx(3, "%s: wrong size\t(%i != 10)", __func__, (int)(raw_reply_head.end - raw_reply_head.begin)); return -1; /* wrong size */ } @@ -549,7 +549,7 @@ static int al_parse_reply(io_head_t *io_head, raw_data_t *io_buf, /*const*/ raw_ if ( (raw_reply.end - raw_reply.begin) != (ptrdiff_t)(10 + io_head->len)) { upsdebugx(3, "%s: corrupt sentence\t(%i != %i)", - __func__, raw_reply.end - raw_reply.begin, 10 + io_head->len); + __func__, (int)(raw_reply.end - raw_reply.begin), 10 + io_head->len); return -1; /* corrupt sentence */ } @@ -597,7 +597,7 @@ static int al_check_ack(/*const*/ raw_data_t raw_ack) const byte_t *ack = raw_ack.begin - 1; if ( (raw_ack.end - raw_ack.begin) !=5) { - upsdebugx(3, "%s: wrong size\t(%i != 5)", __func__, raw_ack.end - raw_ack.begin); + upsdebugx(3, "%s: wrong size\t(%i != 5)", __func__, (int)(raw_ack.end - raw_ack.begin)); return -1; /* wrong size */ } @@ -965,7 +965,8 @@ static int al175_read(byte_t *dst, unsigned addr, size_t count) if ( (io.addr != addr) || (io.len != count) ) { upsdebugx(3, "%s: io_head mismatch\t(%x,%x != %x,%x)", - __func__, io.addr, io.len, addr, count); + __func__, io.addr, io.len, addr, + (unsigned int)count); return -1; } diff --git a/drivers/apc-mib.c b/drivers/apc-mib.c index 8851a6f..b52ad1f 100644 --- a/drivers/apc-mib.c +++ b/drivers/apc-mib.c @@ -72,7 +72,7 @@ static info_lkp_t apcc_pwr_info[] = { { 1, "" }, /* unknown */ { 2, "OL" }, /* onLine */ { 3, "OB" }, /* onBattery */ - { 4, "BOOST" }, /* onSmartBoost */ + { 4, "OL BOOST" }, /* onSmartBoost */ { 5, "OFF" }, /* timedSleeping */ { 6, "OFF" }, /* softwareBypass */ { 7, "OFF" }, /* off */ @@ -80,7 +80,7 @@ static info_lkp_t apcc_pwr_info[] = { { 9, "BYPASS" }, /* switchedBypass */ { 10, "BYPASS" }, /* hardwareFailureBypass */ { 11, "OFF" }, /* sleepingUntilPowerReturn */ - { 12, "TRIM" }, /* onSmartTrim */ + { 12, "OL TRIM" }, /* onSmartTrim */ { 0, "NULL" } } ; diff --git a/drivers/belkin-hid.c b/drivers/belkin-hid.c index e95b17a..212d6f3 100644 --- a/drivers/belkin-hid.c +++ b/drivers/belkin-hid.c @@ -3,7 +3,7 @@ * Copyright (C) * 2003 - 2008 Arnaud Quette * 2005 Peter Selinger - * 2011 Charles Lepple + * 2011, 2014 Charles Lepple * * Sponsored by MGE UPS SYSTEMS * @@ -29,7 +29,7 @@ #include "belkin-hid.h" #include "usb-common.h" -#define BELKIN_HID_VERSION "Belkin HID 0.15" +#define BELKIN_HID_VERSION "Belkin HID 0.16" /* Belkin */ #define BELKIN_VENDORID 0x050d @@ -65,6 +65,8 @@ static usb_device_id_t belkin_usb_device_table[] = { /* Liebert PowerSure PSA UPS */ { USB_DEVICE(LIEBERT_VENDORID, 0x0001), NULL }, + /* Liebert PowerSure PSI 1440 */ + { USB_DEVICE(LIEBERT_VENDORID, 0x0004), NULL }, /* Terminating entry */ { -1, -1, NULL } diff --git a/drivers/blazer_ser.c b/drivers/blazer_ser.c index 5c75726..7fa7280 100644 --- a/drivers/blazer_ser.c +++ b/drivers/blazer_ser.c @@ -100,7 +100,7 @@ int blazer_command(const char *cmd, char *buf, size_t buflen) void upsdrv_help(void) { - printf("Read The Fine Manual ('man 8 blazer')\n"); + printf("Read The Fine Manual ('man 8 blazer_ser')\n"); } diff --git a/drivers/blazer_usb.c b/drivers/blazer_usb.c index e3ef3fc..7ba4df2 100644 --- a/drivers/blazer_usb.c +++ b/drivers/blazer_usb.c @@ -28,7 +28,7 @@ #include "blazer.h" #define DRIVER_NAME "Megatec/Q1 protocol USB driver" -#define DRIVER_VERSION "0.10" +#define DRIVER_VERSION "0.11" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -176,7 +176,7 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) static int ippon_command(const char *cmd, char *buf, size_t buflen) { char tmp[64]; - int ret; + int ret, len; size_t i; snprintf(tmp, sizeof(tmp), "%s", cmd); @@ -207,10 +207,19 @@ static int ippon_command(const char *cmd, char *buf, size_t buflen) return ret; } - snprintf(buf, buflen, "%.*s", ret, tmp); - - upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); - return ret; + /* + * As Ippon will always return 64 bytes in response, we have to + * calculate and return length of actual response data here. + * Empty response will look like 0x00 0x0D, otherwise it will be + * data string terminated by 0x0D. + */ + len = (int)strcspn(tmp, "\r"); + upsdebugx(3, "read: %.*s", len, tmp); + if (len > 0) { + len ++; + } + snprintf(buf, buflen, "%.*s", len, tmp); + return len; } @@ -443,7 +452,9 @@ int blazer_command(const char *cmd, char *buf, size_t buflen) case -ETIMEDOUT: /* Connection timed out */ case -EOVERFLOW: /* Value too large for defined data type */ +#ifdef EPROTO case -EPROTO: /* Protocol error */ +#endif default: break; } @@ -480,7 +491,7 @@ int blazer_command(const char *cmd, char *buf, size_t buflen) void upsdrv_help(void) { - printf("Read The Fine Manual ('man 8 blazer')\n"); + printf("Read The Fine Manual ('man 8 blazer_usb')\n"); } @@ -585,7 +596,7 @@ void upsdrv_initups(void) "and make sure you have an up-to-date version of NUT. If this does not help,\n" "try running the driver with at least 'subdriver', 'vendorid' and 'productid'\n" "options specified. Please refer to the man page for details about these options\n" - "(man 8 blazer).\n"); + "(man 8 blazer_usb).\n"); } if (!subdriver_command) { diff --git a/drivers/compaq-mib.c b/drivers/compaq-mib.c index febb9c0..fc9fdd9 100644 --- a/drivers/compaq-mib.c +++ b/drivers/compaq-mib.c @@ -30,7 +30,7 @@ #include "compaq-mib.h" -#define CPQPOWER_MIB_VERSION "1.5" +#define CPQPOWER_MIB_VERSION "1.6" #define DEFAULT_ONDELAY 30 #define DEFAULT_OFFDELAY 20 @@ -188,9 +188,10 @@ static snmp_info_t cpqpower_mib[] = { { "ups.L3.realpower", 0, 0.1, CPQPOWER_OID_OUT_POWER ".3", "", SU_OUTPUT_3, NULL }, { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_POWER_STATUS, "OFF", SU_STATUS_PWR, cpqpower_pwr_info }, { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_BATT_STATUS, "", SU_STATUS_PWR, cpqpower_battery_abm_status }, - { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_ALARM_OB, "", SU_STATUS_BATT, cpqpower_alarm_ob }, - { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_ALARM_LB, "", SU_STATUS_BATT, cpqpower_alarm_lb }, -/* { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, IETF_OID_BATT_STATUS, "", SU_STATUS_BATT, ietf_batt_info }, */ + /* The next two lines are no longer supported by MIB ver. 1.76 (Github issue 118) + * { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_ALARM_OB, "", SU_STATUS_BATT, cpqpower_alarm_ob }, + * { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_ALARM_LB, "", SU_STATUS_BATT, cpqpower_alarm_lb }, */ + /* { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, IETF_OID_BATT_STATUS, "", SU_STATUS_BATT, ietf_batt_info }, */ /* FIXME: this should use either .1.3.6.1.4.1.232.165.3.11.1.0 (upsTopologyType) * or .1.3.6.1.4.1.232.165.3.11.2.0 (upsTopoMachineCode) */ { "ups.type", ST_FLAG_STRING, SU_INFOSIZE, CPQPOWER_OID_POWER_STATUS, "", SU_STATUS_PWR, cpqpower_mode_info }, diff --git a/drivers/dstate-hal.c b/drivers/dstate-hal.c deleted file mode 100644 index 6728f0f..0000000 --- a/drivers/dstate-hal.c +++ /dev/null @@ -1,710 +0,0 @@ -/* dstate-hal.c - Network UPS Tools driver-side state management - This is a compatibility interface that encapsulate the HAL bridge - into the NUT dstate API for NUT drivers - - Copyright (C) 2006-2007 Arnaud Quette - - 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 -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include "common.h" -#include "config.h" -#include "dstate-hal.h" -#include "extstate.h" -/* #include "state.h" -#include "parseconf.h" */ - -#include - -/* FIXME: export command and RW variables (using the HAL example: addon-cpufreq and macbook addon) */ -/* beeper.enable, beeper.disable => SetBeeper(bool) - beeper.toggle => ToggleBeeper(void) - -org.freedesktop.Hal.Device.UPS.SetSounder (bool) - - -Shutdown() or ShutOff() - shutdown.return - shutdown.stayoff - shutdown.reboot - shutdown.reboot.graceful - -#define UPS_ERROR_GENERAL "GeneralError" -#define UPS_ERROR_UNSUPPORTED_FEATURE "FeatureNotSupported" -#define UPS_ERROR_PERMISSION_DENIED "PermissionDenied" - -****** implementation ******* - -#define DBUS_INTERFACE "org.freedesktop.Hal.Device.UPS" - -if (!libhal_device_claim_interface(halctx, udi, DBUS_INTERFACE, - - " \n" - " \n" - " \n" - " \n" - - &dbus_dbus_error)) { - fprintf(stderr, "Cannot claim interface: %s", dbus_dbus_error.message); - goto Error; - } - - -*/ - -/* - * static int sockfd = -1, stale = 1, alarm_active = 0; - * static struct st_tree_t *dtree_root = NULL; - * static struct conn_t *connhead = NULL; - * static struct cmdlist_t *cmdhead = NULL; - * static char *sockfn = NULL; - * static char status_buf[ST_MAX_VALUE_LEN], - * alarm_buf[ST_MAX_VALUE_LEN]; - */ - -struct ups_handler upsh; - -LibHalContext *halctx = NULL; -char *udi; -int ac_present = 0; /* 0 = false ; 1 = true */ -extern char *dbus_methods_introspection; - -static void* runtime_handler(LibHalChangeSet *cs, char* runtime); -static void* level_handler(LibHalChangeSet *cs, char* critical_level); -static void* battery_type_handler(LibHalChangeSet *cs, char* battery_type); - -/* Structure to lookup between NUT and HAL data */ -typedef struct { - const char *nut_name; /* NUT variable name */ - const char *hal_name; /* HAL variable name */ - int hal_type; /* HAL variable type */ - void *(*fun)(LibHalChangeSet *cs, - char *value); /* conversion function. */ -} info_lkp_t; - -enum hal_type_t -{ - NONE = 0, - HAL_TYPE_INT, - HAL_TYPE_BOOL, - HAL_TYPE_STRING -}; - -/* Structure to lookup between NUT commands and HAL/DBus methods */ -typedef struct { - char *nut_name; /* NUT command name */ - char *hal_name; /* HAL/DBus method name */ - char *xml_introspection; /* HAL/DBus method introspection */ -/* FIXME: how to lookup param values between HAL and NUT?? */ -/* void *(*fun)(LibHalChangeSet *cs, - char *value);*/ /* NUT function */ -} method_lkp_t; - -#if 0 -/* Data to lookup between NUT commands and HAL/DBus methods - * for dstate_addcmd() */ -static method_lkp_t nut2hal_cmd[] = -{ - /* ups.status is handled by status_set() calls */ - { - "beeper.enable", - "SetBeeper", - " \n" - " \n" - " \n" - " \n" - }, - - /* Terminating element */ - { NULL, NULL, NULL } -}; -#endif - -/* Data to lookup between NUT and HAL for dstate_setinfo() */ -static info_lkp_t nut2hal_info[] = -{ - /* ups.status is handled by status_set() calls */ - { "battery.charge.low", "battery.charge_level.low", HAL_TYPE_INT, *level_handler }, - /* { "battery.charge.low", "battery.reporting.low", HAL_TYPE_INT, NULL }, */ - { "battery.charge.low", "battery.alarm.design", HAL_TYPE_INT, NULL }, - - { "battery.charge", "battery.charge_level.current", HAL_TYPE_INT, NULL }, - { "battery.charge", "battery.charge_level.percentage", HAL_TYPE_INT, NULL }, - { "battery.charge", "battery.reporting.current", HAL_TYPE_INT, NULL }, - { "battery.charge", "battery.reporting.percentage", HAL_TYPE_INT, NULL }, - { "battery.runtime", "battery.remaining_time", HAL_TYPE_INT, *runtime_handler }, - /* raw version (PbAc) */ - { "battery.type", "battery.reporting.technology", HAL_TYPE_STRING, NULL }, - /* Human readable version */ - { "battery.type", "battery.technology", HAL_TYPE_STRING, *battery_type_handler }, - - /* AQ note: Not sure it fits! */ - /* HAL marked as mandatory! */ - { "battery.voltage", "battery.voltage.current", HAL_TYPE_INT, NULL }, - { "battery.voltage.nominal", "battery.voltage.design", HAL_TYPE_INT, NULL }, - - { "ups.mfr", "battery.vendor", HAL_TYPE_STRING, NULL }, - { "ups.model", "battery.model", HAL_TYPE_STRING, NULL }, - { "ups.serial", "battery.serial", HAL_TYPE_STRING, NULL }, - - /* Terminating element */ - { NULL, NULL, NONE, NULL } -}; - -/* Functions to lookup between NUT and HAL */ -static info_lkp_t *find_nut_info(const char *nut_varname, info_lkp_t *prev_info_item); - -/* HAL accessors wrappers */ -void hal_set_string(LibHalChangeSet *cs, const char *key, const char *value); -void hal_set_int(LibHalChangeSet *cs, const char *key, const int value); -void hal_set_bool(LibHalChangeSet *cs, const char *key, const dbus_bool_t value); -int hal_get_int(const char *key); -char *hal_get_string(const char *key); - -/* Handle warning charge level according to the critical level */ -static void* level_handler(LibHalChangeSet *cs, char* critical_level) -{ - /* Magic formula to generate the warning level */ - int int_critical_level = atoi(critical_level); - /* warning level = critical + 1/3 of (100 % - critical level), approx at the leat mod 10 */ - int int_warning_level = int_critical_level + ((100 - int_critical_level) / 3); - int_warning_level -= (int_warning_level % 10); - - /* Set the critical level value */ - hal_set_int (cs, "battery.charge_level.low", int_critical_level); - hal_set_int (cs, "battery.reporting.low", int_critical_level); - - /* Set the warning level value (FIXME: set to 50 % for now) */ - hal_set_int (cs, "battery.charge_level.warning", int_warning_level); - hal_set_int (cs, "battery.reporting.warning", int_warning_level); - - return NULL; /* Nothing to return */ -} - -/* Handle runtime exposition according to the AC status */ -static void* runtime_handler(LibHalChangeSet *cs, char* runtime) -{ - if (ac_present == 0) { - /* unSet the runtime auto computation and rely upon NUT.battery.runtime*/ - hal_set_bool (cs, "battery.remaining_time.calculate_per_time", FALSE); - - /* Set the runtime value */ - hal_set_int (cs, "battery.remaining_time", atoi(runtime)); - } - else { - /* Set the runtime auto computation */ - hal_set_bool (cs, "battery.remaining_time.calculate_per_time", TRUE); - - /* Set the runtime value */ - hal_set_int (cs, "battery.remaining_time", 0); - } - return NULL; /* Nothing to return */ -} - -/* Handle the battery technology reporting */ -static void* battery_type_handler(LibHalChangeSet *cs, char* battery_type) -{ - if (!strncmp (battery_type, "PbAc", 4)) { - hal_set_string(cs, "battery.technology", "lead-acid"); - } - /* FIXME: manage other types (lithium-ion, lithium-polymer, - * nickel-metal-hydride, unknown */ - - return NULL; /* Nothing to return */ -} - -/******************************************************************** - * dstate compatibility interface - *******************************************************************/ -void dstate_init(const char *prog, const char *port) -{ - DBusError dbus_error; - LibHalChangeSet *cs; - - dbus_error_init (&dbus_error); - - cs = libhal_device_new_changeset (udi); - if (cs == NULL) { - fatalx (EXIT_FAILURE, "Cannot initialize changeset"); - } - - /* UPS always report charge as percent */ - hal_set_string (cs, "battery.charge_level.unit", "percent"); - hal_set_string (cs, "battery.reporting.unit", "percent"); - hal_set_string (cs, "battery.alarm.unit", "percent"); - - /* Various UPSs assumptions */ - /****************************/ - /* UPS are always rechargeable! */ - /* FIXME: Check for NUT extension however: ie HID->UPS.PowerSummary.Rechargeable - * into battery.rechargeable - * or always expose it? - */ - hal_set_bool (cs, "battery.is_rechargeable", TRUE); - - /* UPS always has a max battery charge of 100 % */ - hal_set_int (cs, "battery.charge_level.design", 100); - hal_set_int (cs, "battery.charge_level.last_full", 100); - hal_set_int (cs, "battery.reporting.design", 100); - hal_set_int (cs, "battery.reporting.last_full", 100); - - /* NUT always express Voltage in Volts "V" */ - /* But not all UPSs provide the data - * battery.voltage.{design,current} */ - hal_set_string (cs, "battery.voltage.unit", "V"); - - /* UPS always have a battery! */ - /* Note(AQU): wrong with some solar panel usage, where the UPS */ - /* is just an energy source switch! */ - /* FIXME: to be processed (need possible NUT extension) */ - hal_set_bool (cs, "battery.present", TRUE); - - /* FIXME: can be improved?! (implies "info.recall.vendor") */ - hal_set_bool (cs, "info.is_recalled", FALSE); - - /* Set generic properties */ - hal_set_string (cs, "battery.type", "ups"); - libhal_device_add_capability (halctx, udi, "battery", &dbus_error); - libhal_device_add_capability (halctx, udi, "ac_adaptor", &dbus_error); - - /* FIXME: can be improved?! Set granularity (1 %)*/ - hal_set_int (cs, "battery.charge_level.granularity_1", 1); - hal_set_int (cs, "battery.charge_level.granularity_2", 1); - hal_set_int (cs, "battery.reporting.granularity_1", 1); - hal_set_int (cs, "battery.reporting.granularity_2", 1); - - dbus_error_init (&dbus_error); - /* NOTE: commit_changeset won't do IPC if set is empty */ - libhal_device_commit_changeset (halctx, cs, &dbus_error); - libhal_device_free_changeset (cs); - - if (dbus_error_is_set (&dbus_error)) - dbus_error_free (&dbus_error); -} - - -const char *dstate_getinfo(const char *var) -{ - info_lkp_t *nut2hal_info = find_nut_info(var, NULL); - -/* FIXME: use the data exposed by NUT on the DBus when available */ - - if (nut2hal_info != NULL) { - - switch (nut2hal_info->hal_type) - { -/* case HAL_TYPE_INT: - static char value[8]; - snprintf(value, sizeof(value), "%i", hal_get_int(nut2hal_info->hal_name)); - return value; - case HAL_TYPE_BOOL: - hal_set_bool(cs, nut2hal_info->hal_name, TRUE); - break; -*/ - case HAL_TYPE_STRING: - return hal_get_string(nut2hal_info->hal_name); - } - } - return NULL; -} - -int dstate_setinfo(const char *var, const char *fmt, ...) -{ - va_list ap; - int ret = 1; - LibHalChangeSet *cs; - DBusError dbus_error; - char value[ST_MAX_VALUE_LEN]; - info_lkp_t *nut2hal_info = NULL, *prev_nut2hal_info = NULL; - - va_start(ap, fmt); - vsnprintf(value, sizeof(value), fmt, ap); - va_end(ap); - - cs = libhal_device_new_changeset (udi); - if (cs == NULL) { - fatalx (EXIT_FAILURE, "Cannot initialize changeset"); - } - - /* Loop on getting HAL variable(s) matching this NUT variable */ - while ( (nut2hal_info = find_nut_info(var, prev_nut2hal_info)) != NULL) - { - upsdebugx(2, "dstate_setinfo: %s => %s (%s)\n", var, nut2hal_info->hal_name, value); - - if (nut2hal_info->fun != NULL) - nut2hal_info->fun(cs, value); - else { - switch (nut2hal_info->hal_type) - { - case HAL_TYPE_INT: - hal_set_int(cs, nut2hal_info->hal_name, atoi(value)); - break; - case HAL_TYPE_BOOL: - /* FIXME: howto lookup TRUE/FALSE? */ - hal_set_bool(cs, nut2hal_info->hal_name, TRUE); - break; - case HAL_TYPE_STRING: - hal_set_string(cs, nut2hal_info->hal_name, value); - break; - } - } - prev_nut2hal_info = nut2hal_info; - } - - dbus_error_init (&dbus_error); - /* NOTE: commit_changeset won't do IPC if set is empty */ - libhal_device_commit_changeset(halctx,cs,&dbus_error); - libhal_device_free_changeset (cs); - - if (dbus_error_is_set (&dbus_error)) - dbus_error_free (&dbus_error); - - return ret; -} - - -int dstate_addenum(const char *var, const char *fmt, ...) -{ - return 0; -} - -int dstate_addrange(const char *var, const int min, const int max) -{ - return 0; -} - -const st_tree_t *dstate_getroot(void) -{ - return NULL; -} - -int dstate_delinfo(const char *var) -{ - return 0; -} - -int dstate_delcmd(const char *var) -{ - return 0; -} - -void dstate_setflags(const char *var, int flags) -{ - return; -} - -void dstate_setaux(const char *var, int aux) -{ - return; -} - -void dstate_dataok(void) -{ - return; -} - -void dstate_datastale(void) -{ - return; -} - -void dstate_free(void) -{ - return; -} - -/* extrafd: provided for waking up based on the driver's UPS fd */ -int dstate_poll_fds(struct timeval timeout, int extrafd) -{ - /* drivers expect us to limit the polling rate here */ - sleep(timeout.tv_sec); - - /* the timeout expired */ - return 1; -} - -/* clean out the temp space for a new pass */ -void status_init(void) -{ - /* Nothing to do */ - return; -} - -/* ups.status element conversion */ -void status_set(const char *buf) -{ - upsdebugx(2, "status_set: %s", buf); - - /* Note: only usbhid-ups supported devices expose [DIS]CHRG status */ - /* along with the standard OL (online) / OB (on battery) status! */ - if ( (strcmp(buf, "DISCHRG") == 0) || (strcmp(buf, "OB") == 0) ) - { - ac_present = 0; - } - else if ( (strcmp(buf, "CHRG") == 0) || (strcmp(buf, "OL") == 0) ) - { - ac_present = 1; - } - else - upsdebugx(2, "status_set: dropping status %s (not managed)\n", buf); - - return; -} - -/* write the status_buf into the externally visible dstate storage */ -void status_commit(void) -{ - LibHalChangeSet *cs; - DBusError dbus_error; - int curlevel, warnlevel, lowlevel; - - upsdebugx(2, "status_commit"); - - cs = libhal_device_new_changeset (udi); - if (cs == NULL) { - fatalx (EXIT_FAILURE, "Cannot initialize changeset"); - } - - /* Retrieve the levels */ - curlevel = hal_get_int ("battery.charge_level.current"); - warnlevel = hal_get_int ("battery.charge_level.warning"); - lowlevel = hal_get_int ("battery.charge_level.low"); - - /* Set AC present status */ - /* Note: UPSs are also AC adaptors! */ - hal_set_bool (cs, "ac_adaptor.present", (ac_present == 0)?FALSE:TRUE); - - /* Set discharging status */ - hal_set_bool (cs, "battery.rechargeable.is_discharging", (ac_present == 0)?TRUE:FALSE); - - /* Set charging status */ - if (curlevel != 100) - hal_set_bool (cs, "battery.rechargeable.is_charging", (ac_present == 0)?FALSE:TRUE); - - /* Set the battery status (FIXME: are these values valid?) */ - if (curlevel <= lowlevel) - hal_set_string(cs, "battery.charge_level.capacity_state", "critical"); - else if (curlevel <= warnlevel) - hal_set_string(cs, "battery.charge_level.capacity_state", "warning"); /*low?*/ - else - hal_set_string(cs, "battery.charge_level.capacity_state", "ok"); - - dbus_error_init (&dbus_error); - /* NOTE: commit_changeset won't do IPC if set is empty */ - libhal_device_commit_changeset (halctx, cs, &dbus_error); - libhal_device_free_changeset (cs); - - if (dbus_error_is_set (&dbus_error)) - dbus_error_free (&dbus_error); - - return; -} - -/* similar functions for ups.alarm */ -void alarm_init(void) -{ - return; -} - -void alarm_set(const char *buf) -{ - return; -} - -void alarm_commit(void) -{ - return; -} - -/* FIXME: complete and use nut2hal_cmd */ -/* Register DBus methods, by feeling the methods buffer */ -void dstate_addcmd(const char *cmdname) -{ - DBusError dbus_error; - dbus_error_init (&dbus_error); - - upsdebugx(2, "dstate_addcmd: %s\n", cmdname); - - /* beeper.{on,off} */ - /* FIXME: how to deal with beeper.toggle */ - if (!strncasecmp(cmdname, "beeper.disable", 14)) - { - strcat(dbus_methods_introspection, - " \n" - " \n" - " \n" - " \n"); - } -} - - - -/******************************************************************* - * internal functions - *******************************************************************/ - -/**************** - * HAL wrappers * - ****************/ -/* Only update HAL string values if there are real changes */ -void hal_set_string(LibHalChangeSet *cs, const char *key, const char *value) -{ - DBusError dbus_error; - char *new_value = NULL; - - upsdebugx(2, "hal_set_string: %s => %s", key, value); - - dbus_error_init(&dbus_error); - - /* Check if the property already exists */ - if (libhal_device_property_exists (halctx, udi, key, &dbus_error) == TRUE) { - - new_value = libhal_device_get_property_string (halctx, udi, - key, &dbus_error); - - /* Check if the value has really changed */ - if (strcmp(value, new_value)) - libhal_changeset_set_property_string (cs, key, value); - - /* Free the new_value string */ - if (new_value != NULL) - libhal_free_string (new_value); - } - else { - libhal_changeset_set_property_string (cs, key, value); - } -} - -/* Only update HAL int values if there are real changes */ -void hal_set_int(LibHalChangeSet *cs, const char *key, const int value) -{ - DBusError dbus_error; - int new_value; - - upsdebugx(2, "hal_set_int: %s => %i", key, value); - - dbus_error_init(&dbus_error); - - /* Check if the property already exists */ - if (libhal_device_property_exists (halctx, udi, key, &dbus_error) == TRUE) { - - new_value = libhal_device_get_property_int (halctx, udi, - key, &dbus_error); - - /* Check if the value has really changed */ - if (value != new_value) - libhal_changeset_set_property_int (cs, key, value); - } - else { - libhal_changeset_set_property_int (cs, key, value); - } -} - -char *hal_get_string(const char *key) -{ - DBusError dbus_error; - char *value = NULL; - - upsdebugx(2, "hal_get_string: %s", key); - - dbus_error_init(&dbus_error); - - /* Check if the property already exists */ - if (libhal_device_property_exists (halctx, udi, key, &dbus_error) == TRUE) { - - value = libhal_device_get_property_string (halctx, udi, - key, &dbus_error); - } - return value; -} - -int hal_get_int(const char *key) -{ - DBusError dbus_error; - int value = -1; - - upsdebugx(2, "hal_get_int: %s", key); - - dbus_error_init(&dbus_error); - - /* Check if the property already exists */ - if (libhal_device_property_exists (halctx, udi, key, &dbus_error) == TRUE) { - - value = libhal_device_get_property_int (halctx, udi, - key, &dbus_error); - } - return value; -} - -/* Only update HAL int values if there are real changes */ -void hal_set_bool(LibHalChangeSet *cs, const char *key, const dbus_bool_t value) -{ - DBusError dbus_error; - dbus_bool_t new_value; - - upsdebugx(2, "hal_set_bool: %s => %s", key, (value==TRUE)?"true":"false"); - - dbus_error_init(&dbus_error); - - /* Check if the property already exists */ - if (libhal_device_property_exists (halctx, udi, key, &dbus_error) == TRUE) { - - new_value = libhal_device_get_property_bool (halctx, udi, - key, &dbus_error); - - /* Check if the value has really changed */ - if (value != new_value) - libhal_changeset_set_property_bool (cs, key, value); - } - else { - libhal_changeset_set_property_bool (cs, key, value); - } -} - -/* find the next info element definition in info array - * that matches nut_varname, and that is after prev_info_item - * if specified. - * Note that 1 nut item can matches several HAL items - */ -static info_lkp_t *find_nut_info(const char *nut_varname, info_lkp_t *prev_info_item) -{ - info_lkp_t *info_item; - - upsdebugx(2, "find_nut_info: looking up => %s\n", nut_varname); - - if (prev_info_item != NULL) { - /* Start from the item following prev_info_item */ - info_item = ++prev_info_item; - } - else { - info_item = nut2hal_info; - } - - for ( ; info_item != NULL && info_item->nut_name != NULL ; info_item++) { - - if (!strcasecmp(info_item->nut_name, nut_varname)) - return info_item; - } - - return NULL; -} diff --git a/drivers/dstate-hal.h b/drivers/dstate-hal.h deleted file mode 100644 index 6a2ad2f..0000000 --- a/drivers/dstate-hal.h +++ /dev/null @@ -1,94 +0,0 @@ -/* dstate-hal.h - Network UPS Tools driver-side state management - - Copyright (C) 2006 Arnaud Quette - - 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 DSTATE_HAL_H_SEEN -#define DSTATE_HAL_H_SEEN 1 - -#include "state.h" -#include "attribute.h" - -/*#include "parseconf.h"*/ -#include "upshandler.h" - -#include -#include -#include -#include - -#define DS_LISTEN_BACKLOG 16 -#define DS_MAX_READ 256 /* don't read forever from upsd */ - -/* HAL specific */ -#define DBUS_INTERFACE "org.freedesktop.Hal.Device.UPS" - -DBusHandlerResult dbus_filter_function(DBusConnection *connection, - DBusMessage *message, - void *user_data); - -gboolean dbus_init_local (void); - -#define HAL_WARNING - -/* track client connections */ -/* typedef struct conn_s { - * int fd; - * PCONF_CTX_t ctx; - * struct conn_s *next; - *} conn_t; - */ - extern struct ups_handler upsh; - -void dstate_init(const char *prog, const char *port); -int dstate_poll_fds(struct timeval timeout, int extrafd); -int dstate_setinfo(const char *var, const char *fmt, ...) - __attribute__ ((__format__ (__printf__, 2, 3))); -int dstate_addenum(const char *var, const char *fmt, ...) - __attribute__ ((__format__ (__printf__, 2, 3))); -int dstate_addrange(const char *var, const int min, const int max); -void dstate_setflags(const char *var, int flags); -void dstate_setaux(const char *var, int aux); -const char *dstate_getinfo(const char *var); -void dstate_addcmd(const char *cmdname); -int dstate_delinfo(const char *var); -int dstate_delenum(const char *var, const char *val); -int dstate_delcmd(const char *cmd); -void dstate_free(void); -const st_tree_t *dstate_getroot(void); -const cmdlist_t *dstate_getcmdlist(void); - -void dstate_dataok(void); -void dstate_datastale(void); - -int dstate_is_stale(void); - -/* clean out the temp space for a new pass */ -void status_init(void); - -/* add a status element */ -void status_set(const char *buf); - -/* write the temporary status_buf into ups.status */ -void status_commit(void); - -/* similar functions for ups.alarm */ -void alarm_init(void); -void alarm_set(const char *buf); -void alarm_commit(void); - -#endif /* DSTATE_HAL_H_SEEN */ diff --git a/drivers/libshut.c b/drivers/libshut.c index 30651d0..1e2cd8d 100644 --- a/drivers/libshut.c +++ b/drivers/libshut.c @@ -312,7 +312,7 @@ int libshut_open(int *upsfd, SHUTDevice_t *curDevice, char *device_path, /* FIXME: add variable baudrate detection */ *upsfd = ser_open(device_path); ser_set_speed(*upsfd, device_path, B2400); - setline(*upsfd, 0); + setline(*upsfd, 1); /* initialise communication */ if (!shut_synchronise(*upsfd)) diff --git a/drivers/libusb.c b/drivers/libusb.c index 234b9f1..fd8f5b9 100644 --- a/drivers/libusb.c +++ b/drivers/libusb.c @@ -33,9 +33,6 @@ #include "usb-common.h" #include "libusb.h" -/* USB standard timeout */ -#define USB_TIMEOUT 5000 - #define USB_DRIVER_NAME "USB communication driver" #define USB_DRIVER_VERSION "0.32" @@ -375,7 +372,9 @@ static int libusb_strerror(const int ret, const char *desc) return 0; case -EOVERFLOW: /* Value too large for defined data type */ +#ifdef EPROTO case -EPROTO: /* Protocol error */ +#endif upsdebugx(2, "%s: %s", desc, usb_strerror()); return 0; diff --git a/drivers/main-hal.c b/drivers/main-hal.c deleted file mode 100644 index 8cd3275..0000000 --- a/drivers/main-hal.c +++ /dev/null @@ -1,571 +0,0 @@ -/* main-hal.c - Network UPS Tools driver core for HAL - - Copyright (C) 2006 Arnaud Quette - Copyright (C) 1999 Russell Kroll - - 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 -*/ - -/* TODO list: - * -more cleanup - * - dstate-hal: expose all data on org.freedesktop.NUT to prepare - * a full HAL/DBus enabled nut (remove the need of {d,s}state layer - * - use HAL logging functions - */ - -#include "main-hal.h" -#include "dstate-hal.h" -#include - -#ifdef HAVE_POLKIT -#include -#endif - - /* HAL specific */ - extern LibHalContext *halctx; - extern char *udi; - - /* data which may be useful to the drivers */ - int upsfd = -1; - char *device_path = NULL; - const char *progname = NULL, *upsname = NULL, - *device_name = NULL; - - /* may be set by the driver to wake up while in dstate_poll_fds */ - int extrafd = -1; - - /* for ser_open */ - int do_lock_port = 1; - - /* set by the drivers */ - int experimental_driver = 0; - int broken_driver = 0; - - static vartab_t *vartab_h = NULL; - - /* variables possibly set by the global part of ups.conf */ - unsigned int poll_interval = 2; - static char *chroot_path = NULL; - - /* signal handling */ - int exit_flag = 0; - - /* everything else */ - static char *pidfn = NULL; - GMainLoop *gmain; - char *dbus_methods_introspection; - -/* retrieve the value of variable if possible */ -char *getval(const char *var) -{ - vartab_t *tmp = vartab_h; - - while (tmp) { - if (!strcasecmp(tmp->var, var)) - return(tmp->val); - tmp = tmp->next; - } - - return NULL; -} - -/* see if has been defined, even if no value has been given to it */ -int testvar(const char *var) -{ - vartab_t *tmp = vartab_h; - - while (tmp) { - if (!strcasecmp(tmp->var, var)) - return tmp->found; - tmp = tmp->next; - } - - return 0; /* not found */ -} - -/* callback from driver - create the table for -x/conf entries */ -void addvar(int vartype, const char *name, const char *desc) -{ - vartab_t *tmp, *last; - - tmp = last = vartab_h; - - while (tmp) { - last = tmp; - tmp = tmp->next; - } - - tmp = xmalloc(sizeof(vartab_t)); - - tmp->vartype = vartype; - tmp->var = xstrdup(name); - tmp->val = NULL; - tmp->desc = xstrdup(desc); - tmp->found = 0; - tmp->next = NULL; - - if (last) - last->next = tmp; - else - vartab_h = tmp; -} - -static void vartab_free(void) -{ - vartab_t *tmp, *next; - - tmp = vartab_h; - - while (tmp) { - next = tmp->next; - - free(tmp->var); - free(tmp->val); - free(tmp->desc); - free(tmp); - - tmp = next; - } -} - -static void exit_cleanup(int sig) -{ - upsdebugx(2, "exit_cleanup(%i", sig); - - exit_flag = sig; - - upsdrv_cleanup(); - - free(chroot_path); - free(device_path); - - if (pidfn) { - unlink(pidfn); - free(pidfn); - } - - dstate_free(); - vartab_free(); - - /* break the main loop */ - g_main_loop_quit(gmain); -} - -static void setup_signals(void) -{ - struct sigaction sa; - - sigemptyset(&sa.sa_mask); - sa.sa_flags = SA_RESTART | SA_NOCLDSTOP; - - sa.sa_handler = exit_cleanup; - sigaction(SIGTERM, &sa, NULL); - sigaction(SIGINT, &sa, NULL); - sigaction(SIGQUIT, &sa, NULL); - -/* sa.sa_handler = SIG_IGN; - sigaction(SIGHUP, &sa, NULL); - sigaction(SIGPIPE, &sa, NULL);*/ -} - -/* (*GSourceFunc) wrapper */ -static gboolean update_data (gpointer data) -{ - upsdrv_updateinfo(); - return (exit_flag == 0); -} - -int main(int argc, char **argv) -{ - DBusError dbus_error; - DBusConnection *dbus_connection; - struct passwd *new_uid = NULL; - char *hal_debug_level; -/* int i, do_forceshutdown = 0; */ - - if (experimental_driver) { - printf("Warning: This is an experimental driver.\n"); - printf("Some features may not function correctly.\n\n"); - } - - progname = xbasename(argv[0]); - open_syslog(progname); - - dbus_methods_introspection = xmalloc(1024); - - /* Register the basic supported method (Shutdown) - * Leave other methods registration to driver core calls to - * dstate_addcmd(), at initinfo() time - */ - snprintf(dbus_methods_introspection, 1024, "%s", - " \n" -/* " \n" */ - " \n" - " \n"); - - /* initialise HAL and DBus interface*/ - halctx = NULL; - udi = getenv ("UDI"); - if (udi == NULL) { - fprintf(stderr, "Error: UDI is null.\n"); - exit(EXIT_FAILURE); - } - - dbus_error_init (&dbus_error); - if ((halctx = libhal_ctx_init_direct (&dbus_error)) == NULL) { - fprintf(stderr, "Error: can't initialise libhal.\n"); - exit(EXIT_FAILURE); - } - if (dbus_error_is_set (&dbus_error)) - { - fatalx(EXIT_FAILURE, "Error in context creation: %s\n", dbus_error.message); - dbus_error_free (&dbus_error); - } - - if ((dbus_connection = libhal_ctx_get_dbus_connection(halctx)) == NULL) { - fprintf(stderr, "Error: can't get DBus connection.\n"); - exit(EXIT_FAILURE); - } - - /* FIXME: rework HAL param interface! or get path/regex from UDI - * Example: - * /org/freedesktop/Hal/devices/usb_device_463_ffff_1H2E300AH - * => linux.device_file = /dev/bus/usb/002/065 - */ - /* FIXME: the naming should be abstracted to os.device_file! */ - device_path = xstrdup("auto"); - - /* FIXME: bridge debug/warning on HAL equivalent (need them - * to externalize these in a lib... */ - hal_debug_level = getenv ("NUT_HAL_DEBUG"); - if (hal_debug_level == NULL) - nut_debug_level = 0; - else - nut_debug_level = atoi(hal_debug_level); - - /* Sleep 2 seconds to be able to view the device through usbfs! */ - sleep(2); - - /* build the driver's extra (-x) variable table */ - upsdrv_makevartable(); - - /* Switch to the HAL user */ - new_uid = get_user_pwent(HAL_USER); - become_user(new_uid); - - /* Only switch to statepath if we're not powering off */ - /* This avoid case where ie /var is umounted */ -/* ?! Not needed for HAL !? - if (!do_forceshutdown) - if (chdir(dflt_statepath())) - fatal_with_errno(EXIT_FAILURE, "Can't chdir to %s", dflt_statepath()); -*/ - setup_signals(); - - /* clear out callback handler data */ - memset(&upsh, '\0', sizeof(upsh)); - - upsdrv_initups(); - -#if 0 - if (do_forceshutdown) - forceshutdown(); -#endif - - /* get the supported data and commands before allowing connections */ - upsdrv_initinfo(); - upsdrv_updateinfo(); - - /* now we can start servicing requests */ - dstate_init(NULL, NULL); - - /* Commit DBus methods */ - if (!libhal_device_claim_interface(halctx, udi, DBUS_INTERFACE, - dbus_methods_introspection, &dbus_error)) { - fprintf(stderr, "Cannot claim interface: %s\n", dbus_error.message); - } - else - fprintf(stdout, "Claimed the following DBus interfaces on %s:\n%s", - DBUS_INTERFACE, dbus_methods_introspection); - - /* Complete DBus binding */ - dbus_connection_setup_with_g_main(dbus_connection, NULL); - dbus_connection_add_filter(dbus_connection, dbus_filter_function, NULL, NULL); - dbus_connection_set_exit_on_disconnect(dbus_connection, 0); - - dbus_init_local(); - /* end of HAL init */ - -#if 0 - /* publish the top-level data: version number, driver name */ - dstate_setinfo("driver.version", "%s", UPS_VERSION); - dstate_setinfo("driver.name", "%s", progname); - - /* The poll_interval may have been changed from the default */ - dstate_setinfo("driver.parameter.pollinterval", "%d", poll_interval); - -/* FIXME: needed? */ - if (nut_debug_level == 0) { - background(); - writepid(pidfn); - } -#endif - /* End HAL init */ - dbus_error_init (&dbus_error); - if (!libhal_device_addon_is_ready (halctx, udi, &dbus_error)) { - fprintf(stderr, "Error (libhal): device addon is not ready\n"); - exit(EXIT_FAILURE); - } - - /* add a timer for data update */ -#ifdef HAVE_G_TIMEOUT_ADD_SECONDS - g_timeout_add_seconds (poll_interval, -#else - g_timeout_add (1000 * poll_interval, /* seconds */ -#endif - (GSourceFunc)update_data, - NULL); - - /* setup and run the main loop */ - gmain = g_main_loop_new(NULL, FALSE); - g_main_loop_run(gmain); - - /* reached upon addon exit */ - upslogx(LOG_INFO, "Signal %d: exiting", exit_flag); - exit(EXIT_SUCCESS); -} - -/******************************************************************** - * DBus interface functions and data - *******************************************************************/ - -static DBusHandlerResult dbus_filter_function_local(DBusConnection *connection, - DBusMessage *message, - void *user_data) -{ - if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) { - upsdebugx(1, "DBus daemon disconnected. Trying to reconnect..."); - dbus_connection_unref(connection); - g_timeout_add(5000, (GSourceFunc)dbus_init_local, NULL); - } - return DBUS_HANDLER_RESULT_HANDLED; -} - -/* returns FALSE on success because it's used as a callback */ -gboolean dbus_init_local(void) -{ - DBusConnection *dbus_connection; - DBusError dbus_error; - - dbus_error_init(&dbus_error); - - dbus_connection = dbus_bus_get(DBUS_BUS_SYSTEM, &dbus_error); - if (dbus_error_is_set(&dbus_error)) { - upsdebugx(1, "Cannot get D-Bus connection"); -/* dbus_error_free (&dbus_error); */ - return TRUE; - } - - dbus_connection_setup_with_g_main(dbus_connection, NULL); - dbus_connection_add_filter(dbus_connection, dbus_filter_function_local, - NULL, NULL); - dbus_connection_set_exit_on_disconnect(dbus_connection, 0); - return FALSE; -} - -#ifdef HAVE_POLKIT -/** - * dbus_is_privileged: - * @connection: connection to D-Bus - * @message: Message - * @error: the error - * - * Returns: TRUE if the caller is privileged - * - * checks if caller of message possesses the CPUFREQ_POLKIT_PRIVILGE - */ -static gboolean -dbus_is_privileged (DBusConnection *connection, DBusMessage *message, DBusError *error) -{ - gboolean ret; - char *polkit_result; - const char *invoked_by_syscon_name; - - ret = FALSE; - polkit_result = NULL; -/* FIXME: CPUFREQ_POLKIT_PRIVILEGE, CPUFREQ_ERROR_GENERAL */ - invoked_by_syscon_name = dbus_message_get_sender (message); - - polkit_result = libhal_device_is_caller_privileged (halctx, - udi, - CPUFREQ_POLKIT_PRIVILEGE, - invoked_by_syscon_name, - error); - if (polkit_result == NULL) { - dbus_raise_error (connection, message, CPUFREQ_ERROR_GENERAL, - "Cannot determine if caller is privileged"); - } - else { - if (strcmp (polkit_result, "yes") != 0) { - - dbus_raise_error (connection, message, - "org.freedesktop.Hal.Device.PermissionDeniedByPolicy", - "%s %s <-- (action, result)", - CPUFREQ_POLKIT_PRIVILEGE, polkit_result); - } - else - ret = TRUE; - } - - if (polkit_result != NULL) - libhal_free_string (polkit_result); - return ret; -} -#endif - -/** - * dbus_send_reply: - * @connection: connection to D-Bus - * @message: Message - * @type: the type of data param - * @data: data to send - * - * Returns: TRUE/FALSE - * - * sends a reply to message with the given data and its dbus_type - */ -static gboolean dbus_send_reply(DBusConnection *connection, DBusMessage *message, - int dbus_type, void *data) -{ - DBusMessage *reply; - - if ((reply = dbus_message_new_method_return(message)) == NULL) { - upslogx(LOG_WARNING, "Could not allocate memory for the DBus reply"); - return FALSE; - } - - if (data != NULL) - dbus_message_append_args(reply, dbus_type, data, DBUS_TYPE_INVALID); - - if (!dbus_connection_send(connection, reply, NULL)) { - upslogx(LOG_WARNING, "Could not sent reply"); - return FALSE; - } - dbus_connection_flush(connection); - dbus_message_unref(reply); - - return TRUE; -} - -/** - * dbus_get_argument: - * @connection: connection to D-Bus - * @message: Message - * @dbus_error: the D-Bus error - * @type: the type of arg param - * @arg: the value to get from the message - * - * Returns: TRUE/FALSE - * - * gets one argument from message with the given dbus_type and stores it in arg - */ -static gboolean dbus_get_argument(DBusConnection *connection, DBusMessage *message, - DBusError *dbus_error, int dbus_type, void *arg) -{ - dbus_message_get_args(message, dbus_error, dbus_type, arg, - DBUS_TYPE_INVALID); - if (dbus_error_is_set(dbus_error)) { - upslogx(LOG_WARNING, "Could not get argument of DBus message: %s", - dbus_error->message); - dbus_error_free(dbus_error); - return FALSE; - } - return TRUE; -} - -/** - * dbus_filter_function: - * @connection: connection to D-Bus - * @message: message - * @user_data: pointer to the data - * - * Returns: the result - * - * @raises UnknownMethod - * - * D-Bus filter function - */ -DBusHandlerResult dbus_filter_function(DBusConnection *connection, - DBusMessage *message, - void *user_data) -{ - DBusError dbus_error; - int retcode = -1; - const char *member = dbus_message_get_member(message); - const char *path = dbus_message_get_path(message); -/* int ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; */ - - /* upsdebugx(2, "Received DBus message with member %s path %s", member, path); */ - fprintf(stdout, "Received DBus message with member %s on path %s\n", member, path); - - dbus_error_init(&dbus_error); - if (dbus_error_is_set (&dbus_error)) - { - fprintf (stderr, "an error occurred: %s\n", dbus_error.message); -/* dbus_error_free (&dbus_error); */ - } - else - { -#ifdef HAVE_POLKIT - if (!dbus_is_privileged(connection, message, &dbus_error)) - return DBUS_HANDLER_RESULT_HANDLED; -#endif - - if (dbus_message_is_method_call(message, DBUS_INTERFACE, "Shutdown")) { - - fprintf(stdout, "executing Shutdown\n"); - upsdrv_shutdown(); - dbus_send_reply(connection, message, DBUS_TYPE_INVALID, NULL); - - } else if (dbus_message_is_method_call(message, - DBUS_INTERFACE, "SetBeeper")) { - fprintf(stdout, "executing SetBeeper\n"); - gboolean b_enable; - if (!dbus_get_argument(connection, message, &dbus_error, - DBUS_TYPE_BOOLEAN, &b_enable)) { - fprintf(stderr, "Error receiving boolean argument\n"); - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - fprintf(stdout, "Received argument: %s\n", (b_enable==TRUE)?"true":"false"); - - if (b_enable==TRUE) { - if (upsh.instcmd("beeper.enable", NULL) != STAT_INSTCMD_HANDLED) { - dbus_send_reply(connection, message, DBUS_TYPE_INT32, &retcode); - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - } - else { - if (upsh.instcmd("beeper.disable", NULL) != STAT_INSTCMD_HANDLED) { - dbus_send_reply(connection, message, DBUS_TYPE_INT32, &retcode); - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - } - } else { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - } - dbus_send_reply(connection, message, DBUS_TYPE_INVALID, NULL); - return DBUS_HANDLER_RESULT_HANDLED; -} diff --git a/drivers/main-hal.h b/drivers/main-hal.h deleted file mode 100644 index e612133..0000000 --- a/drivers/main-hal.h +++ /dev/null @@ -1,51 +0,0 @@ -#include "common.h" -#include "config.h" -/* #include "upsconf.h" */ -#include "dstate.h" -#include "extstate.h" - -/* public functions & variables from main.c */ -extern const char *progname; -extern char *device_path; -extern const char *device_name; -extern int upsfd, extrafd, broken_driver, experimental_driver, exit_flag; -extern unsigned int poll_interval; - -/* functions & variables required in each driver */ -void upsdrv_initups(void); /* open connection to UPS, fail if not found */ -void upsdrv_initinfo(void); /* prep data, settings for UPS monitoring */ -void upsdrv_updateinfo(void); /* update state data if possible */ -void upsdrv_shutdown(void); /* make the UPS power off the load */ -void upsdrv_help(void); /* tack on anything useful for the -h text */ -void upsdrv_banner(void); /* print your version information */ -void upsdrv_cleanup(void); /* free any resources before shutdown */ - -/* --- details for the variable/value sharing --- */ - -/* main calls this driver function - it needs to call addvar */ -void upsdrv_makevartable(void); - -/* retrieve the value of variable if possible */ -char *getval(const char *var); - -/* see if has been defined, even if no value has been given to it */ -int testvar(const char *var); - -/* extended variable table - used for -x defines/flags */ -typedef struct vartab_s { - int vartype; /* VAR_* value, below */ - char *var; /* left side of =, or whole word if none */ - char *val; /* right side of = */ - char *desc; /* 40 character description for -h text */ - int found; /* set once encountered, for testvar() */ - struct vartab_s *next; -} vartab_t; - -/* flags to define types in the vartab */ - -#define VAR_FLAG 0x0001 /* argument is a flag (no value needed) */ -#define VAR_VALUE 0x0002 /* argument requires a value setting */ -#define VAR_SENSITIVE 0x0004 /* do not publish in driver.parameter */ - -/* callback from driver - create the table for future -x entries */ -void addvar(int vartype, const char *name, const char *desc); diff --git a/drivers/mge-hid.c b/drivers/mge-hid.c index 6383379..93ccde6 100644 --- a/drivers/mge-hid.c +++ b/drivers/mge-hid.c @@ -36,7 +36,7 @@ #include "usbhid-ups.h" #include "mge-hid.h" -#define MGE_HID_VERSION "MGE HID 1.32" +#define MGE_HID_VERSION "MGE HID 1.33" /* (prev. MGE Office Protection Systems, prev. MGE UPS SYSTEMS) */ /* Eaton */ @@ -98,7 +98,8 @@ typedef enum { MGE_PULSAR_M = 0x400, /* MGE Pulsar M series */ MGE_PULSAR_M_2200, MGE_PULSAR_M_3000, - MGE_PULSAR_M_3000_XL + MGE_PULSAR_M_3000_XL, + EATON_5P = 0x500 /* Eaton 5P / 5PX series */ } models_type_t; /* Default to line-interactive or online (ie, not offline). @@ -211,6 +212,7 @@ static const char *mge_battery_voltage_nominal_fun(double value) break; case MGE_PULSAR_M: + case EATON_5P: break; default: @@ -234,6 +236,7 @@ static const char *mge_battery_voltage_fun(double value) { case MGE_EVOLUTION: case MGE_PULSAR_M: + case EATON_5P: break; default: @@ -774,6 +777,12 @@ static models_name_t mge_model_names [] = { "Evolution", "S 2500", MGE_EVOLUTION_S_2500, NULL }, { "Evolution", "S 3000", MGE_EVOLUTION_S_3000, NULL }, + /* Eaton 5P */ + { "Eaton 5P", "650", EATON_5P, "5P 650" }, + { "Eaton 5P", "850", EATON_5P, "5P 850" }, + { "Eaton 5P", "1150", EATON_5P, "5P 1150" }, + { "Eaton 5P", "1550", EATON_5P, "5P 1550" }, + /* Pulsar M models */ { "PULSAR M", "2200", MGE_PULSAR_M_2200, NULL }, { "PULSAR M", "3000", MGE_PULSAR_M_3000, NULL }, diff --git a/drivers/mge-xml.c b/drivers/mge-xml.c index adb8262..560d432 100644 --- a/drivers/mge-xml.c +++ b/drivers/mge-xml.c @@ -31,7 +31,7 @@ #include "netxml-ups.h" #include "mge-xml.h" -#define MGE_XML_VERSION "MGEXML/0.22" +#define MGE_XML_VERSION "MGEXML/0.23" #define MGE_XML_INITUPS "/" #define MGE_XML_INITINFO "/mgeups/product.xml /product.xml /ws/product.xml" @@ -1489,7 +1489,7 @@ char *vvalue_mge_xml2nut(const char *name, const char *value, size_t len) { /* Convert */ if (NULL != info->convert) { - char *vconv = info->convert(vcpy); + char *vconv = (char *)info->convert(vcpy); free(vcpy); @@ -1510,7 +1510,7 @@ void vname_register_rw(void) { xml_info_t *info = mge_xml2nut + i; if (NULL != info->nutname && info->nutflags & ST_FLAG_RW) { - dstate_setinfo(info->nutname, ""); + dstate_setinfo(info->nutname, "%s", ""); dstate_setflags(info->nutname, ST_FLAG_RW); } } diff --git a/drivers/nutdrv_atcl_usb.c b/drivers/nutdrv_atcl_usb.c new file mode 100644 index 0000000..7424493 --- /dev/null +++ b/drivers/nutdrv_atcl_usb.c @@ -0,0 +1,498 @@ +/* + * nutdrv_atcl_usb.c - driver for generic-brand "ATCL FOR UPS" + * + * Copyright (C) 2013-2014 Charles Lepple + * + * Loosely based on richcomm_usb.c, + * Copyright (C) 2007 Peter van Valderen + * Dirk Teurlings + * + * 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 + */ + +#include "main.h" +#include "usb-common.h" + +/* driver version */ +#define DRIVER_NAME "'ATCL FOR UPS' USB driver" +#define DRIVER_VERSION "1.1" + +/* driver description structure */ +upsdrv_info_t upsdrv_info = { + DRIVER_NAME, + DRIVER_VERSION, + "Charles Lepple ", + DRV_EXPERIMENTAL, + { NULL } +}; + +#define STATUS_ENDPOINT (USB_ENDPOINT_IN | 1) +#define SHUTDOWN_ENDPOINT (USB_ENDPOINT_OUT | 2) +#define STATUS_PACKETSIZE 8 +#define SHUTDOWN_PACKETSIZE 8 + +/* Probably can reduce this, since the pcap file shows mostly 1050-ish ms response times */ +#define ATCL_USB_TIMEOUT USB_TIMEOUT + +/* limit the amount of spew that goes in the syslog when we lose the UPS (from nut_usb.h) */ +#define USB_ERR_LIMIT 10 /* start limiting after 10 in a row */ +#define USB_ERR_RATE 10 /* then only print every 10th error */ + +#define USB_VENDOR_STRING "ATCL FOR UPS" + +static usb_device_id_t atcl_usb_id[] = { + /* ATCL FOR UPS */ + { USB_DEVICE(0x0001, 0x0000), NULL }, + + /* end of list */ + {-1, -1, NULL} +}; + +static usb_dev_handle *udev = NULL; +static USBDevice_t usbdevice; +static unsigned int comm_failures = 0; + +static int device_match_func(USBDevice_t *device, void *privdata) +{ + char *requested_vendor; + switch (is_usb_device_supported(atcl_usb_id, device)) + { + case SUPPORTED: + if(!device->Vendor) { + upsdebugx(1, "Couldn't retrieve USB string descriptor for vendor. Check permissions?"); + requested_vendor = getval("vendor"); + if(requested_vendor) { + if(!strcmp("NULL", requested_vendor)) { + upsdebugx(3, "Matched device with NULL vendor string."); + return 1; + } + } + upsdebugx(1, "To keep trying (in case your device does not have a vendor string), use vendor=NULL"); + return 0; + } + + if(!strcmp(device->Vendor, USB_VENDOR_STRING)) { + upsdebugx(4, "Matched expected vendor='%s'.", USB_VENDOR_STRING); + return 1; + } + /* Didn't match, but the user provided an alternate vendor ID: */ + requested_vendor = getval("vendor"); + if(requested_vendor) { + if(!strcmp(device->Vendor, requested_vendor)) { + upsdebugx(3, "Matched device with vendor='%s'.", requested_vendor); + return 1; + } else { + upsdebugx(2, "idVendor=%04x and idProduct=%04x, but provided vendor '%s' does not match device: '%s'.", + device->VendorID, device->ProductID, requested_vendor, device->Vendor); + return 0; + } + } + + /* TODO: automatic way of suggesting other drivers? */ + upsdebugx(2, "idVendor=%04x and idProduct=%04x, but device vendor string '%s' does not match expected string '%s'. " + "Have you tried the nutdrv_qx driver?", + device->VendorID, device->ProductID, device->Vendor, USB_VENDOR_STRING); + return 0; + + case POSSIBLY_SUPPORTED: + case NOT_SUPPORTED: + default: + return 0; + } +} + +static USBDeviceMatcher_t device_matcher = { + &device_match_func, + NULL, + NULL +}; + +static int query_ups(char *reply) +{ + int ret; + + ret = usb_interrupt_read(udev, STATUS_ENDPOINT, reply, STATUS_PACKETSIZE, ATCL_USB_TIMEOUT); + + if (ret <= 0) { + upsdebugx(2, "status interrupt read: %s", ret ? usb_strerror() : "timeout"); + return ret; + } + + upsdebug_hex(3, "read", reply, ret); + return ret; +} + +static void usb_comm_fail(const char *fmt, ...) +{ + int ret; + char why[SMALLBUF]; + va_list ap; + + /* this means we're probably here because select was interrupted */ + if (exit_flag != 0) { + return; /* ignored, since we're about to exit anyway */ + } + + comm_failures++; + + if ((comm_failures == USB_ERR_LIMIT) || ((comm_failures % USB_ERR_RATE) == 0)) { + upslogx(LOG_WARNING, "Warning: excessive comm failures, limiting error reporting"); + } + + /* once it's past the limit, only log once every USB_ERR_LIMIT calls */ + if ((comm_failures > USB_ERR_LIMIT) && ((comm_failures % USB_ERR_LIMIT) != 0)) { + return; + } + + /* generic message if the caller hasn't elaborated */ + if (!fmt) { + upslogx(LOG_WARNING, "Communications with UPS lost - check cabling"); + return; + } + + va_start(ap, fmt); + ret = vsnprintf(why, sizeof(why), fmt, ap); + va_end(ap); + + if ((ret < 1) || (ret >= (int) sizeof(why))) { + upslogx(LOG_WARNING, "usb_comm_fail: vsnprintf needed more than %d bytes", (int)sizeof(why)); + } + + upslogx(LOG_WARNING, "Communications with UPS lost: %s", why); +} + +static void usb_comm_good(void) +{ + if (comm_failures == 0) { + return; + } + + upslogx(LOG_NOTICE, "Communications with UPS re-established"); + comm_failures = 0; +} + +/* + * Callback that is called by usb_device_open() that handles USB device + * settings prior to accepting the devide. At the very least claim the + * device here. Detaching the kernel driver will be handled by the + * caller, don't do this here. Return < 0 on error, 0 or higher on + * success. + */ +static int driver_callback(usb_dev_handle *handle, USBDevice_t *device) +{ + if (usb_set_configuration(handle, 1) < 0) { + upslogx(LOG_WARNING, "Can't set USB configuration: %s", usb_strerror()); + return -1; + } + + if (usb_claim_interface(handle, 0) < 0) { + upslogx(LOG_WARNING, "Can't claim USB interface: %s", usb_strerror()); + return -1; + } + + /* TODO: HID SET_IDLE to 0 (not necessary?) */ + + return 1; +} + +static int usb_device_close(usb_dev_handle *handle) +{ + if (!handle) { + return 0; + } + + /* usb_release_interface() sometimes blocks and goes + into uninterruptible sleep. So don't do it. */ + /* usb_release_interface(handle, 0); */ + return usb_close(handle); +} + +static int usb_device_open(usb_dev_handle **handlep, USBDevice_t *device, USBDeviceMatcher_t *matcher, + int (*callback)(usb_dev_handle *handle, USBDevice_t *device)) +{ + struct usb_bus *bus; + + /* libusb base init */ + usb_init(); + usb_find_busses(); + usb_find_devices(); + +#ifndef __linux__ /* SUN_LIBUSB (confirmed to work on Solaris and FreeBSD) */ + /* Causes a double free corruption in linux if device is detached! */ + usb_device_close(*handlep); +#endif + + for (bus = usb_busses; bus; bus = bus->next) { + + struct usb_device *dev; + usb_dev_handle *handle; + + for (dev = bus->devices; dev; dev = dev->next) { + + int i, ret; + USBDeviceMatcher_t *m; + + upsdebugx(3, "Checking USB device [%04x:%04x] (%s/%s)", dev->descriptor.idVendor, + dev->descriptor.idProduct, bus->dirname, dev->filename); + + /* supported vendors are now checked by the supplied matcher */ + + /* open the device */ + *handlep = handle = usb_open(dev); + if (!handle) { + upsdebugx(4, "Failed to open USB device, skipping: %s", usb_strerror()); + continue; + } + + /* collect the identifying information of this + device. Note that this is safe, because + there's no need to claim an interface for + this (and therefore we do not yet need to + detach any kernel drivers). */ + + free(device->Vendor); + free(device->Product); + free(device->Serial); + free(device->Bus); + + memset(device, 0, sizeof(*device)); + + device->VendorID = dev->descriptor.idVendor; + device->ProductID = dev->descriptor.idProduct; + device->Bus = strdup(bus->dirname); + + if (dev->descriptor.iManufacturer) { + char buf[SMALLBUF]; + ret = usb_get_string_simple(handle, dev->descriptor.iManufacturer, + buf, sizeof(buf)); + if (ret > 0) { + device->Vendor = strdup(buf); + } + } + + if (dev->descriptor.iProduct) { + char buf[SMALLBUF]; + ret = usb_get_string_simple(handle, dev->descriptor.iProduct, + buf, sizeof(buf)); + if (ret > 0) { + device->Product = strdup(buf); + } + } + + if (dev->descriptor.iSerialNumber) { + char buf[SMALLBUF]; + ret = usb_get_string_simple(handle, dev->descriptor.iSerialNumber, + buf, sizeof(buf)); + if (ret > 0) { + device->Serial = strdup(buf); + } + } + + upsdebugx(4, "- VendorID : %04x", device->VendorID); + upsdebugx(4, "- ProductID : %04x", device->ProductID); + upsdebugx(4, "- Manufacturer : %s", device->Vendor ? device->Vendor : "unknown"); + upsdebugx(4, "- Product : %s", device->Product ? device->Product : "unknown"); + upsdebugx(4, "- Serial Number: %s", device->Serial ? device->Serial : "unknown"); + upsdebugx(4, "- Bus : %s", device->Bus ? device->Bus : "unknown"); + + for (m = matcher; m; m = m->next) { + + switch (m->match_function(device, m->privdata)) + { + case 0: + upsdebugx(4, "Device does not match - skipping"); + goto next_device; + case -1: + fatal_with_errno(EXIT_FAILURE, "matcher"); + goto next_device; + case -2: + upsdebugx(4, "matcher: unspecified error"); + goto next_device; + } + } + + for (i = 0; i < 3; i++) { + + ret = callback(handle, device); + if (ret >= 0) { + upsdebugx(3, "USB device [%04x:%04x] opened", device->VendorID, device->ProductID); + return ret; + } +#ifdef HAVE_USB_DETACH_KERNEL_DRIVER_NP + /* this method requires at least libusb 0.1.8: + * it forces device claiming by unbinding + * attached driver... From libhid */ + if (usb_detach_kernel_driver_np(handle, 0) < 0) { + upsdebugx(1, "failed to detach kernel driver from USB device: %s", usb_strerror()); + } else { + upsdebugx(4, "detached kernel driver from USB device..."); + } +#endif + } + + fatalx(EXIT_FAILURE, "USB device [%04x:%04x] matches, but driver callback failed: %s", + device->VendorID, device->ProductID, usb_strerror()); + + next_device: + usb_close(handle); + } + } + + *handlep = NULL; + upsdebugx(3, "No matching USB device found"); + + return -1; +} + +/* + * Initialise the UPS + */ +void upsdrv_initups(void) +{ + int i; + + upsdebugx(1, "Searching for USB device..."); + + for (i = 0; usb_device_open(&udev, &usbdevice, &device_matcher, &driver_callback) < 0; i++) { + + if ((i < 3) && (sleep(5) == 0)) { + usb_comm_fail("Can't open USB device, retrying ..."); + continue; + } + + fatalx(EXIT_FAILURE, + "Unable to find ATCL FOR UPS\n\n" + + "Things to try:\n" + " - Connect UPS device to USB bus\n" + " - Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).\n" + " See upsdrvctl(8) and ups.conf(5).\n\n" + + "Fatal error: unusable configuration"); + } + +} + +void upsdrv_cleanup(void) +{ + usb_device_close(udev); + + free(usbdevice.Vendor); + free(usbdevice.Product); + free(usbdevice.Serial); + free(usbdevice.Bus); +} + +void upsdrv_initinfo(void) +{ + dstate_setinfo("ups.mfr", "%s", usbdevice.Vendor ? usbdevice.Vendor : "unknown"); + dstate_setinfo("ups.model", "%s", usbdevice.Product ? usbdevice.Product : "unknown"); + if(usbdevice.Serial && usbdevice.Product && strcmp(usbdevice.Serial, usbdevice.Product)) { + /* Only set "ups.serial" if it isn't the same as "ups.model": */ + dstate_setinfo("ups.serial", "%s", usbdevice.Serial); + } + + dstate_setinfo("ups.vendorid", "%04x", usbdevice.VendorID); + dstate_setinfo("ups.productid", "%04x", usbdevice.ProductID); +} + +void upsdrv_updateinfo(void) +{ + char reply[STATUS_PACKETSIZE]; + int ret; + + if (!udev) { + ret = usb_device_open(&udev, &usbdevice, &device_matcher, &driver_callback); + + if (ret < 0) { + return; + } + } + + ret = query_ups(reply); + + if (ret != STATUS_PACKETSIZE) { + usb_comm_fail("Query to UPS failed"); + dstate_datastale(); + + usb_device_close(udev); + udev = NULL; + + return; + } + + usb_comm_good(); + dstate_dataok(); + + status_init(); + + switch(reply[0]) { + case 3: + upsdebugx(2, "reply[0] = 0x%02x -> OL", reply[0]); + status_set("OL"); + break; + case 2: + upsdebugx(2, "reply[0] = 0x%02x -> LB", reply[0]); + status_set("LB"); + /* fall through */ + case 1: + upsdebugx(2, "reply[0] = 0x%02x -> OB", reply[0]); + status_set("OB"); + break; + default: + upslogx(LOG_ERR, "Unknown status: 0x%02x", reply[0]); + } + if(strnlen(reply + 1, 7) != 0) { + upslogx(LOG_NOTICE, "Status bytes 1-7 are not all zero"); + } + + status_commit(); +} + +/* If the UPS is on battery, it should shut down about 30 seconds after + * receiving this packet. + */ +void upsdrv_shutdown(void) +{ + const char shutdown_packet[SHUTDOWN_PACKETSIZE] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + int ret; + + upslogx(LOG_DEBUG, "%s: attempting to call usb_interrupt_write(01 00 00 00 00 00 00 00)", __func__); + + ret = usb_interrupt_write(udev, SHUTDOWN_ENDPOINT, (char *)shutdown_packet, SHUTDOWN_PACKETSIZE, ATCL_USB_TIMEOUT); + + if (ret <= 0) { + upslogx(LOG_NOTICE, "%s: first usb_interrupt_write() failed: %s", __func__, ret ? usb_strerror() : "timeout"); + } + + /* Totally guessing from the .pcap file here. TODO: configurable delay? */ + usleep(170*1000); + + ret = usb_interrupt_write(udev, SHUTDOWN_ENDPOINT, (char *)shutdown_packet, SHUTDOWN_PACKETSIZE, ATCL_USB_TIMEOUT); + + if (ret <= 0) { + upslogx(LOG_ERR, "%s: second usb_interrupt_write() failed: %s", __func__, ret ? usb_strerror() : "timeout"); + } + +} + +void upsdrv_help(void) +{ +} + +void upsdrv_makevartable(void) +{ + addvar(VAR_VALUE, "vendor", "USB vendor string (or NULL if none)"); +} diff --git a/drivers/nutdrv_qx.c b/drivers/nutdrv_qx.c index efde86e..f27e89b 100644 --- a/drivers/nutdrv_qx.c +++ b/drivers/nutdrv_qx.c @@ -33,7 +33,7 @@ * */ -#define DRIVER_VERSION "0.01" +#define DRIVER_VERSION "0.06" #include "main.h" @@ -66,17 +66,22 @@ #include "nutdrv_qx_megatec.h" #include "nutdrv_qx_megatec-old.h" #include "nutdrv_qx_mustek.h" +#include "nutdrv_qx_q1.h" #include "nutdrv_qx_voltronic.h" +#include "nutdrv_qx_voltronic-qs.h" #include "nutdrv_qx_zinto.h" /* Master list of avaiable subdrivers */ static subdriver_t *subdriver_list[] = { &voltronic_subdriver, + &voltronic_qs_subdriver, &mustek_subdriver, &megatec_old_subdriver, - &megatec_subdriver, &mecer_subdriver, + &megatec_subdriver, &zinto_subdriver, + /* Fallback Q1 subdriver */ + &q1_subdriver, NULL }; @@ -534,7 +539,7 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) static int ippon_command(const char *cmd, char *buf, size_t buflen) { char tmp[64]; - int ret; + int ret, len; size_t i; /* Send command */ @@ -562,10 +567,19 @@ static int ippon_command(const char *cmd, char *buf, size_t buflen) return ret; } - snprintf(buf, buflen, "%.*s", ret, tmp); - - upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); - return ret; + /* + * As Ippon will always return 64 bytes in response, we have to + * calculate and return length of actual response data here. + * Empty response will look like 0x00 0x0D, otherwise it will be + * data string terminated by 0x0D. + */ + len = (int)strcspn(tmp, "\r"); + upsdebugx(3, "read: %.*s", len, tmp); + if (len > 0) { + len ++; + } + snprintf(buf, buflen, "%.*s", len, tmp); + return len; } /* Krauler communication subdriver */ @@ -1759,7 +1773,9 @@ static int qx_command(const char *cmd, char *buf, size_t buflen) case -ETIMEDOUT: /* Connection timed out */ case -EOVERFLOW: /* Value too large for defined data type */ +#ifdef EPROTO case -EPROTO: /* Protocol error */ +#endif default: break; } diff --git a/drivers/nutdrv_qx.h b/drivers/nutdrv_qx.h index e42e9a0..b904689 100644 --- a/drivers/nutdrv_qx.h +++ b/drivers/nutdrv_qx.h @@ -45,7 +45,11 @@ #define DEFAULT_OFFDELAY "30" /* Delay before power off, in seconds */ #define DEFAULT_POLLFREQ 30 /* Polling interval between full updates, in seconds; the driver will do quick polls in the meantime */ +#ifndef TRUE typedef enum { FALSE, TRUE } bool_t; +#else +typedef int bool_t; +#endif /* Structure for rw vars */ typedef struct { diff --git a/drivers/nutdrv_qx_blazer-common.c b/drivers/nutdrv_qx_blazer-common.c index 950dfc8..1221778 100644 --- a/drivers/nutdrv_qx_blazer-common.c +++ b/drivers/nutdrv_qx_blazer-common.c @@ -1,4 +1,4 @@ -/* nutdrv_qx_blazer-common.c - Common functions/settings for nutdrv_qx_{mecer,megatec,megatec-old,mustek,zinto}.{c,h} +/* nutdrv_qx_blazer-common.c - Common functions/settings for nutdrv_qx_{mecer,megatec,megatec-old,mustek,q1,voltronic-qs,zinto}.{c,h} * * Copyright (C) * 2013 Daniele Pezzini @@ -88,6 +88,30 @@ int blazer_claim(void) { } +/* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. + * NOTE: this 'light' version only checks for status (Q1/QS/D/..) */ +int blazer_claim_light(void) { + + /* To tell whether the UPS is supported or not, we'll check just status (Q1/QS/D/..). */ + + item_t *item = find_nut_info("input.voltage", 0, 0); + + /* Don't know what happened */ + if (!item) + return 0; + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) + return 0; + + /* Unable to process value */ + if (ups_infoval_set(item) != 1) + return 0; + + return 1; + +} + /* Subdriver-specific flags/vars */ void blazer_makevartable(void) { diff --git a/drivers/nutdrv_qx_blazer-common.h b/drivers/nutdrv_qx_blazer-common.h index ec5fb5c..aee3864 100644 --- a/drivers/nutdrv_qx_blazer-common.h +++ b/drivers/nutdrv_qx_blazer-common.h @@ -1,4 +1,4 @@ -/* nutdrv_qx_blazer-common.h - Common functions/settings for nutdrv_qx_{mecer,megatec,megatec-old,mustek,zinto}.{c,h} +/* nutdrv_qx_blazer-common.h - Common functions/settings for nutdrv_qx_{mecer,megatec,megatec-old,mustek,q1,voltronic-qs,zinto}.{c,h} * * Copyright (C) * 2013 Daniele Pezzini @@ -28,6 +28,7 @@ void blazer_makevartable(void); void blazer_initups(item_t *qx2nut); int blazer_claim(void); +int blazer_claim_light(void); /* Preprocess functions */ int blazer_process_command(item_t *item, char *value, size_t valuelen); diff --git a/drivers/nutdrv_qx_mecer.c b/drivers/nutdrv_qx_mecer.c index a8299db..5160343 100644 --- a/drivers/nutdrv_qx_mecer.c +++ b/drivers/nutdrv_qx_mecer.c @@ -1,4 +1,4 @@ -/* nutdrv_qx_mecer.c - Subdriver for Mecer UPSes +/* nutdrv_qx_mecer.c - Subdriver for Mecer/Voltronic Power P98 UPSes * * Copyright (C) * 2013 Daniele Pezzini @@ -25,11 +25,29 @@ #include "nutdrv_qx_mecer.h" -#define MECER_VERSION "Mecer 0.01" +#define MECER_VERSION "Mecer 0.02" -/* qx2nut lookup table */ +/* Support functions */ +static int mecer_claim(void); +static void mecer_initups(void); + +/* Preprocess functions */ +static int voltronic_p98_protocol(item_t *item, char *value, size_t valuelen); +static int mecer_process_test_battery(item_t *item, char *value, size_t valuelen); + + +/* == qx2nut lookup table == */ static item_t mecer_qx2nut[] = { + /* Query UPS for protocol (Voltronic Power UPSes) + * > [QPI\r] + * < [(PI98\r] + * 012345 + * 0 + */ + + { "ups.firmware.aux", 0, NULL, "QPI\r", "", 6, '(', "", 1, 4, "%s", QX_FLAG_STATIC, voltronic_p98_protocol }, + /* * > [Q1\r] * < [(226.0 195.0 226.0 014 49.0 27.5 30.0 00001000\r] @@ -87,7 +105,7 @@ static item_t mecer_qx2nut[] = { { "shutdown.return", 0, NULL, "S%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, { "shutdown.stop", 0, NULL, "C\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, + { "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, mecer_process_test_battery }, { "test.battery.start.deep", 0, NULL, "TL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, { "test.battery.start.quick", 0, NULL, "T\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, { "test.battery.stop", 0, NULL, "CT\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, @@ -100,10 +118,12 @@ static item_t mecer_qx2nut[] = { { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } }; -/* Testing table */ + +/* == Testing table == */ #ifdef TESTING static testing_t mecer_testing[] = { { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, + { "QPI\r", "(PI98\r" }, { "F\r", "#230.0 000 024.0 50.0\r" }, { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, { "Q\r", "(ACK\r" }, @@ -119,6 +139,68 @@ static testing_t mecer_testing[] = { }; #endif /* TESTING */ + +/* == Support functions == */ + +/* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ +static int mecer_claim(void) +{ + + /* Apart from status (Q1), try to identify protocol (QPI, for Voltronic Power P98 units) or whether the UPS uses '(ACK\r'/'(NAK\r' replies */ + + item_t *item = find_nut_info("input.voltage", 0, 0); + + /* Don't know what happened */ + if (!item) + return 0; + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) + return 0; + + /* Unable to process value */ + if (ups_infoval_set(item) != 1) + return 0; + + /* UPS Protocol */ + item = find_nut_info("ups.firmware.aux", 0, 0); + + /* Don't know what happened */ + if (!item) { + dstate_delinfo("input.voltage"); + return 0; + } + + /* No reply/Unable to get value/Command rejected */ + if (qx_process(item, NULL)) { + + /* No reply/Command echoed back or rejected with something other than '(NAK\r' -> Not a '(ACK/(NAK' unit */ + if (!strlen(item->answer) || strcasecmp(item->answer, "(NAK\r")) { + dstate_delinfo("input.voltage"); + return 0; + } + + /* Command rejected with '(NAK\r' -> '(ACK/(NAK' unit */ + + /* Skip protocol query from now on */ + item->qxflags |= QX_FLAG_SKIP; + + } else { + + /* Unable to process value/Command echoed back or rejected with something other than '(NAK\r'/Protocol not supported */ + if (ups_infoval_set(item) != 1) { + dstate_delinfo("input.voltage"); + return 0; + } + + /* Voltronic Power P98 unit */ + + } + + return 1; + +} + /* Subdriver-specific initups */ static void mecer_initups(void) { @@ -127,10 +209,72 @@ static void mecer_initups(void) } -/* Subdriver interface */ + +/* == Preprocess functions == */ + +/* Protocol used by the UPS */ +static int voltronic_p98_protocol(item_t *item, char *value, size_t valuelen) +{ + if (strcasecmp(item->value, "PI98")) { + upslogx(LOG_ERR, "Protocol [%s] is not supported by this driver", item->value); + return -1; + } + + snprintf(value, valuelen, item->dfl, "Voltronic Power P98"); + + return 0; +} + +/* *CMD* Preprocess 'test.battery.start' instant command */ +static int mecer_process_test_battery(item_t *item, char *value, size_t valuelen) +{ + const char *protocol = dstate_getinfo("ups.firmware.aux"); + char buf[SMALLBUF] = ""; + int min, test_time; + + /* Voltronic P98 units -> Accepted values for test time: .2 -> .9 (.2=12sec ..), 01 -> 99 (minutes) -> range = [12..5940] */ + if (protocol && !strcasecmp(protocol, "Voltronic Power P98")) + min = 12; + /* Other units: 01 -> 99 (minutes) -> [60..5940] */ + else + min = 60; + + if (strlen(value) != strspn(value, "0123456789")) { + upslogx(LOG_ERR, "%s: non numerical value [%s]", item->info_type, value); + return -1; + } + + test_time = strlen(value) > 0 ? strtol(value, NULL, 10) : 600; + + if ((test_time < min) || (test_time > 5940)) { + upslogx(LOG_ERR, "%s: battery test time '%d' out of range [%d..5940] seconds", item->info_type, test_time, min); + return -1; + } + + /* test time < 1 minute */ + if (test_time < 60) { + + test_time = test_time / 6; + snprintf(buf, sizeof(buf), ".%d", test_time); + + /* test time > 1 minute */ + } else { + + test_time = test_time / 60; + snprintf(buf, sizeof(buf), "%02d", test_time); + + } + + snprintf(value, valuelen, item->command, buf); + + return 0; +} + + +/* == Subdriver interface == */ subdriver_t mecer_subdriver = { MECER_VERSION, - blazer_claim, + mecer_claim, mecer_qx2nut, mecer_initups, NULL, diff --git a/drivers/nutdrv_qx_mecer.h b/drivers/nutdrv_qx_mecer.h index 43cae1f..7ad2914 100644 --- a/drivers/nutdrv_qx_mecer.h +++ b/drivers/nutdrv_qx_mecer.h @@ -1,4 +1,4 @@ -/* nutdrv_qx_mecer.h - Subdriver for Mecer UPSes +/* nutdrv_qx_mecer.h - Subdriver for Mecer/Voltronic Power P98 UPSes * * Copyright (C) * 2013 Daniele Pezzini diff --git a/drivers/nutdrv_qx_megatec-old.c b/drivers/nutdrv_qx_megatec-old.c index 37372b2..73173de 100644 --- a/drivers/nutdrv_qx_megatec-old.c +++ b/drivers/nutdrv_qx_megatec-old.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_megatec-old.h" -#define MEGATEC_OLD_VERSION "Megatec/old 0.01" +#define MEGATEC_OLD_VERSION "Megatec/old 0.02" /* qx2nut lookup table */ static item_t megatec_old_qx2nut[] = { @@ -128,7 +128,7 @@ static void megatec_old_initups(void) /* Subdriver interface */ subdriver_t megatec_old_subdriver = { MEGATEC_OLD_VERSION, - blazer_claim, + blazer_claim_light, megatec_old_qx2nut, megatec_old_initups, NULL, diff --git a/drivers/nutdrv_qx_mustek.c b/drivers/nutdrv_qx_mustek.c index ce85ccc..3bdee1a 100644 --- a/drivers/nutdrv_qx_mustek.c +++ b/drivers/nutdrv_qx_mustek.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_mustek.h" -#define MUSTEK_VERSION "Mustek 0.01" +#define MUSTEK_VERSION "Mustek 0.02" /* qx2nut lookup table */ static item_t mustek_qx2nut[] = { @@ -128,7 +128,7 @@ static void mustek_initups(void) /* Subdriver interface */ subdriver_t mustek_subdriver = { MUSTEK_VERSION, - blazer_claim, + blazer_claim_light, mustek_qx2nut, mustek_initups, NULL, diff --git a/drivers/nutdrv_qx_q1.c b/drivers/nutdrv_qx_q1.c new file mode 100644 index 0000000..b201497 --- /dev/null +++ b/drivers/nutdrv_qx_q1.c @@ -0,0 +1,118 @@ +/* nutdrv_qx_q1.c - Subdriver for Q1 protocol based UPSes + * + * Copyright (C) + * 2013 Daniele Pezzini + * + * 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 + * + * NOTE: + * This subdriver implements the same protocol as the one used by the 'megatec' subdriver minus the vendor (I) and ratings (F) queries. + * In the claim function: + * - it doesn't even try to get 'vendor' informations (I) + * - it checks only status (Q1), through 'input.voltage' variable + * Therefore it should be able to work even if the UPS doesn't support vendor/ratings *and* the user doesn't use the 'novendor'/'norating' flags, as long as: + * - the UPS replies a Q1-compliant answer (i.e. not necessary filled with all of the Q1-required data, but at least of the right length and with not available data filled with some replacement character) + * - the UPS reports a valid input.voltage (used in the claim function) + * - the UPS reports valid status bits (1st, 2nd, 3rd, 6th, 7th are the mandatory ones) + * + */ + +#include "main.h" +#include "nutdrv_qx.h" +#include "nutdrv_qx_blazer-common.h" + +#include "nutdrv_qx_q1.h" + +#define Q1_VERSION "Q1 0.02" + +/* qx2nut lookup table */ +static item_t q1_qx2nut[] = { + + /* + * > [Q1\r] + * < [(226.0 195.0 226.0 014 49.0 27.5 30.0 00001000\r] + * 01234567890123456789012345678901234567890123456 + * 0 1 2 3 4 + */ + + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + /* Status bits */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + + /* Instant commands */ + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + + /* Server-side settable vars */ + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + + /* End of structure. */ + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } +}; + +/* Testing table */ +#ifdef TESTING +static testing_t q1_testing[] = { + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, + { "Q\r", "" }, + { "S03\r", "" }, + { "C\r", "" }, + { "S02R0005\r", "" }, + { "S.5R0000\r", "" }, + { "T04\r", "" }, + { "TL\r", "" }, + { "T\r", "" }, + { "CT\r", "" }, + { NULL } +}; +#endif /* TESTING */ + +/* Subdriver interface */ +subdriver_t q1_subdriver = { + Q1_VERSION, + blazer_claim_light, + q1_qx2nut, + NULL, + NULL, + NULL, + "ACK", + NULL, +#ifdef TESTING + q1_testing, +#endif /* TESTING */ +}; diff --git a/drivers/nutdrv_qx_q1.h b/drivers/nutdrv_qx_q1.h new file mode 100644 index 0000000..bad2f13 --- /dev/null +++ b/drivers/nutdrv_qx_q1.h @@ -0,0 +1,39 @@ +/* nutdrv_qx_q1.h - Subdriver for Q1 protocol based UPSes + * + * Copyright (C) + * 2013 Daniele Pezzini + * + * 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 + * + * NOTE: + * This subdriver implements the same protocol as the one used by the 'megatec' subdriver minus the vendor (I) and ratings (F) queries. + * In the claim function: + * - it doesn't even try to get 'vendor' informations (I) + * - it checks only status (Q1), through 'input.voltage' variable + * Therefore it should be able to work even if the UPS doesn't support vendor/ratings *and* the user doesn't use the 'novendor'/'norating' flags, as long as: + * - the UPS replies a Q1-compliant answer (i.e. not necessary filled with all of the Q1-required data, but at least of the right length and with not available data filled with some replacement character) + * - the UPS reports a valid input.voltage (used in the claim function) + * - the UPS reports valid status bits (1st, 2nd, 3rd, 6th, 7th are the mandatory ones) + * + */ + +#ifndef NUTDRV_QX_Q1_H +#define NUTDRV_QX_Q1_H + +#include "nutdrv_qx.h" + +extern subdriver_t q1_subdriver; + +#endif /* NUTDRV_QX_Q1_H */ diff --git a/drivers/nutdrv_qx_voltronic-qs.c b/drivers/nutdrv_qx_voltronic-qs.c new file mode 100644 index 0000000..9b86999 --- /dev/null +++ b/drivers/nutdrv_qx_voltronic-qs.c @@ -0,0 +1,214 @@ +/* nutdrv_qx_voltronic-qs.c - Subdriver for Voltronic Power UPSes with QS protocol + * + * Copyright (C) + * 2013 Daniele Pezzini + * + * 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 + * + */ + +#include "main.h" +#include "nutdrv_qx.h" +#include "nutdrv_qx_blazer-common.h" + +#include "nutdrv_qx_voltronic-qs.h" + +#define VOLTRONIC_QS_VERSION "Voltronic-QS 0.01" + +/* Support functions */ +static int voltronic_qs_claim(void); + +/* Preprocess functions */ +static int voltronic_qs_protocol(item_t *item, char *value, size_t valuelen); + + +/* == Ranges == */ + +/* Range for ups.delay.start */ +static info_rw_t voltronic_qs_r_ondelay[] = { + { "60", 0 }, + { "599940", 0 }, + { "", 0 } +}; + +/* Range for ups.delay.shutdown */ +static info_rw_t voltronic_qs_r_offdelay[] = { + { "12", 0 }, + { "540", 0 }, + { "", 0 } +}; + + +/* == qx2nut lookup table == */ +static item_t voltronic_qs_qx2nut[] = { + + /* Query UPS for protocol + * > [M\r] + * < [V\r] + * 01 + * 0 + */ + + { "ups.firmware.aux", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%s", QX_FLAG_STATIC, voltronic_qs_protocol }, + + /* Query UPS for status + * > [QS\r] + * < [(226.0 195.0 226.0 014 49.0 27.5 30.0 00001000\r] + * 01234567890123456789012345678901234567890123456 + * 0 1 2 3 4 + */ + + { "input.voltage", 0, NULL, "QS\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, + { "input.voltage.fault", 0, NULL, "QS\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, + { "output.voltage", 0, NULL, "QS\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, + { "ups.load", 0, NULL, "QS\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, + { "input.frequency", 0, NULL, "QS\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, + { "battery.voltage", 0, NULL, "QS\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, + { "ups.temperature", 0, NULL, "QS\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + /* Status bits */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "QS\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + + /* Query UPS for ratings + * > [F\r] + * < [#220.0 000 024.0 50.0\r] + * 0123456789012345678901 + * 0 1 2 + */ + + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + + /* Instant commands */ + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + + /* Server-side settable vars */ + { "ups.delay.start", ST_FLAG_RW, voltronic_qs_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, voltronic_qs_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + + /* End of structure. */ + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } +}; + + +/* == Testing table == */ +#ifdef TESTING +static testing_t voltronic_qs_testing[] = { + { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, + { "F\r", "#230.0 000 024.0 50.0\r" }, + { "M\r", "V\r" }, + { "Q\r", "" }, + { "C\r", "" }, + { "S02R0005\r", "" }, + { "S.5R0000\r", "" }, + { "T\r", "" }, + { NULL } +}; +#endif /* TESTING */ + + +/* == Support functions == */ + +/* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ +static int voltronic_qs_claim(void) +{ + + /* We need at least M and QS to run this subdriver */ + + /* UPS Protocol */ + item_t *item = find_nut_info("ups.firmware.aux", 0, 0); + + /* Don't know what happened */ + if (!item) + return 0; + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) + return 0; + + /* Unable to process value/Protocol not supported */ + if (ups_infoval_set(item) != 1) + return 0; + + item = find_nut_info("input.voltage", 0, 0); + + /* Don't know what happened */ + if (!item) { + dstate_delinfo("ups.firmware.aux"); + return 0; + } + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) { + dstate_delinfo("ups.firmware.aux"); + return 0; + } + + /* Unable to process value */ + if (ups_infoval_set(item) != 1) { + dstate_delinfo("ups.firmware.aux"); + return 0; + } + + return 1; + +} + + +/* == Preprocess functions == */ + +/* Protocol used by the UPS */ +static int voltronic_qs_protocol(item_t *item, char *value, size_t valuelen) +{ + if (strcasecmp(item->value, "V")) { + upsdebugx(2, "%s: invalid protocol [%s]", __func__, item->value); + return -1; + } + + snprintf(value, valuelen, item->dfl, "PMV"); + + return 0; +} + + +/* == Subdriver interface == */ +subdriver_t voltronic_qs_subdriver = { + VOLTRONIC_QS_VERSION, + voltronic_qs_claim, + voltronic_qs_qx2nut, + NULL, + NULL, + NULL, + "ACK", + "(NAK\r", +#ifdef TESTING + voltronic_qs_testing, +#endif /* TESTING */ +}; diff --git a/drivers/nutdrv_qx_voltronic-qs.h b/drivers/nutdrv_qx_voltronic-qs.h new file mode 100644 index 0000000..ac9f39b --- /dev/null +++ b/drivers/nutdrv_qx_voltronic-qs.h @@ -0,0 +1,29 @@ +/* nutdrv_qx_voltronic-qs.h - Subdriver for Voltronic Power UPSes with QS protocol + * + * Copyright (C) + * 2013 Daniele Pezzini + * + * 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 NUTDRV_QX_VOLTRONIC_QS_H +#define NUTDRV_QX_VOLTRONIC_QS_H + +#include "nutdrv_qx.h" + +extern subdriver_t voltronic_qs_subdriver; + +#endif /* NUTDRV_QX_VOLTRONIC_QS_H */ diff --git a/drivers/powercom.c b/drivers/powercom.c index 82e4898..62d8683 100644 --- a/drivers/powercom.c +++ b/drivers/powercom.c @@ -6,8 +6,10 @@ * See http://www.advice.co.il/product/inter/ups.html for its specifications. * This model is based on PowerCom (www.powercom.com) models. * -Socomec Sicon Egys 420 + * -OptiUPS VS 575C * * Copyrights: + * (C) 2013 Florian Bruhin * (C) 2002 Simon Rozman * (C) 1999 Peter Bieringer * @@ -58,6 +60,10 @@ * * Tested on: BNT-1500A * + * rev 0.14: Florian Bruhin (The Compiler) + * - Added support for OptiUPS VS 575C + * This probably also works with others, but I don't have their model numbers. + * */ #include "main.h" @@ -66,7 +72,7 @@ #include "math.h" #define DRIVER_NAME "PowerCom protocol UPS driver" -#define DRIVER_VERSION "0.13" +#define DRIVER_VERSION "0.14" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -74,7 +80,8 @@ upsdrv_info_t upsdrv_info = { DRIVER_VERSION, "Simon Rozman \n" \ "Peter Bieringer \n" \ - "Alexey Sidorov ", + "Alexey Sidorov \n" \ + "Florian Bruhin ", DRV_STABLE, { NULL } }; @@ -199,6 +206,17 @@ static struct type types[] = { { 1.0000, 0.0000, 0.0000, 1.0000, 0.0000 }, { 2.0000, 0.0000, 2.0000, 0.0000 }, }, + { + "OPTI", + 16, + { "no_flow_control", no_flow_control }, + { { 5U, 0xFFU }, { 7U, 0U }, { 8U, 0U } }, + { { 1U, 30U }, 'y' }, + { 0.0000, 0.0000 }, + { 1.0000, 0.0000, 1.0000, 0.0000 }, + { 1.0000, 0.0000, 0.0000, 1.0000, 0.0000 }, + { 2.0000, 0.0000, 2.0000, 0.0000 }, + }, }; /* values for sending to UPS */ @@ -249,6 +267,7 @@ unsigned int voltages[]={100,110,115,120,0,0,0,200,220,230,240,0,0,0,0,0}; unsigned int BNTmodels[]={0,400,500,600,800,801,1000,1200,1500,2000,0,0,0,0,0,0}; unsigned int KINmodels[]={0,425,500,525,625,800,1000,1200,1500,1600,2200,2200,2500,3000,5000,0}; unsigned int IMPmodels[]={0,425,525,625,825,1025,1200,1500,2000,0,0,0,0,0,0,0}; +unsigned int OPTImodels[]={0,0,0,575,0,0,0,0,0,0,0,0,0,0,0,0}; /* * local used functions @@ -398,7 +417,7 @@ static float input_voltage(void) } else { tmp=1.625*raw_data[INPUT_VOLTAGE]; } - } else if ( !strcmp(types[type].name, "IMP")) { + } else if ( !strcmp(types[type].name, "IMP") || !strcmp(types[type].name, "OPTI")) { tmp=raw_data[INPUT_VOLTAGE]*2.0; } else { tmp=linevoltage >= 220 ? @@ -489,7 +508,7 @@ static float output_voltage(void) tmp=sqrt(tmp)*rdatay; } } - } else if ( !strcmp(types[type].name, "IMP")) { + } else if ( !strcmp(types[type].name, "IMP") || !strcmp(types[type].name, "OPTI")) { tmp=raw_data[OUTPUT_VOLTAGE]*2.0; } else { tmp= linevoltage >= 220 ? @@ -506,7 +525,7 @@ static float input_freq(void) { if ( !strcmp(types[type].name, "BNT") || !strcmp(types[type].name, "KIN")) return 4807.0/raw_data[INPUT_FREQUENCY]; - else if ( !strcmp(types[type].name, "IMP")) + else if ( !strcmp(types[type].name, "IMP") || !strcmp(types[type].name, "OPTI")) return raw_data[INPUT_FREQUENCY]; return raw_data[INPUT_FREQUENCY] ? 1.0 / (types[type].freq[0] * @@ -518,7 +537,7 @@ static float output_freq(void) { if ( !strcmp(types[type].name, "BNT") || !strcmp(types[type].name, "KIN")) return 4807.0/raw_data[OUTPUT_FREQUENCY]; - else if ( !strcmp(types[type].name, "IMP")) + else if ( !strcmp(types[type].name, "IMP") || !strcmp(types[type].name, "OPTI")) return raw_data[OUTPUT_FREQUENCY]; return raw_data[OUTPUT_FREQUENCY] ? 1.0 / (types[type].freq[0] * @@ -588,7 +607,7 @@ static float load_level(void) if (model<2000) return raw_data[UPS_LOAD]*1.66; if (model>=2000) return raw_data[UPS_LOAD]*110.0/load2ki[voltage]; } - } else if ( !strcmp(types[type].name, "IMP")) { + } else if ( !strcmp(types[type].name, "IMP") || !strcmp(types[type].name, "OPTI")) { return raw_data[UPS_LOAD]; } return raw_data[STATUS_A] & MAINS_FAILURE ? @@ -644,7 +663,7 @@ static float batt_level(void) return 30.0+(battval-bat29)*70.0/(bat100-bat29); return 100; } - if ( !strcmp(types[type].name, "IMP")) + if ( !strcmp(types[type].name, "IMP") || !strcmp(types[type].name, "OPTI")) return raw_data[BATTERY_CHARGE]; return raw_data[STATUS_A] & ONLINE ? /* Are we on battery power? */ /* Yes */ @@ -885,10 +904,10 @@ void upsdrv_initups(void) types[type].flowControl.setup_flow_control(); /* Setup Model and LineVoltage */ - if (!strncmp(types[type].name, "BNT",3) || !strcmp(types[type].name, "KIN") || !strcmp(types[type].name, "IMP")){ + if (!strncmp(types[type].name, "BNT",3) || !strcmp(types[type].name, "KIN") || !strcmp(types[type].name, "IMP") || !strcmp(types[type].name, "OPTI")) { if (!ups_getinfo()) return; /* Give "BNT-other" a chance! */ - if (raw_data[MODELNAME]==0x42 || raw_data[MODELNAME]==0x4B){ + if (raw_data[MODELNAME]==0x42 || raw_data[MODELNAME]==0x4B || raw_data[MODELNAME]==0x4F){ model=BNTmodels[raw_data[MODELNUMBER]/16]; if (!strcmp(types[type].name, "BNT-other")) types[type].name="BNT-other"; @@ -897,6 +916,9 @@ void upsdrv_initups(void) else if (raw_data[MODELNAME]==0x4B){ types[type].name="KIN"; model=KINmodels[raw_data[MODELNUMBER]/16]; + } else if (raw_data[MODELNAME]==0x4F){ + types[type].name="OPTI"; + model=OPTImodels[raw_data[MODELNUMBER]/16]; } } else if (raw_data[UPSVERSION]==0xFF){ @@ -904,7 +926,11 @@ void upsdrv_initups(void) model=IMPmodels[raw_data[MODELNUMBER]/16]; } linevoltage=voltages[raw_data[MODELNUMBER]%16]; - snprintf(buf,sizeof(buf),"%s-%dAP",types[type].name,model); + if (!strcmp(types[type].name, "OPTI")) { + snprintf(buf,sizeof(buf),"%s-%d",types[type].name,model); + } else { + snprintf(buf,sizeof(buf),"%s-%dAP",types[type].name,model); + } if (!strcmp(modelname, "Unknown")) modelname=buf; upsdebugx(1,"Detected: %s , %dV",buf,linevoltage); @@ -962,7 +988,7 @@ void upsdrv_help(void) printf("\n"); printf("Specify UPS information in the ups.conf file.\n"); printf(" type: Type of UPS: 'Trust','Egys','KP625AP','IMP','KIN','BNT',\n"); - printf(" 'BNT-other' (default: 'Trust')\n"); + printf(" 'BNT-other', 'OPTI' (default: 'Trust')\n"); printf(" 'BNT-other' is a special type intended for BNT 100-120V models,\n"); printf(" but can be used to override ALL models.\n"); printf("You can additional specify these variables:\n"); @@ -1042,7 +1068,7 @@ void upsdrv_makevartable(void) // 1 2 3 4 5 6 7 8 //2345678901234567890123456789012345678901234567890123456789012345678901234567890 MAX addvar(VAR_VALUE, "type", - "Type of UPS: 'Trust','Egys','KP625AP','IMP','KIN','BNT','BNT-other'\n" + "Type of UPS: 'Trust','Egys','KP625AP','IMP','KIN','BNT','BNT-other','OPTI'\n" " (default: 'Trust')"); addvar(VAR_VALUE, "manufacturer", "Manufacturer name (default: 'PowerCom')"); diff --git a/drivers/riello_usb.c b/drivers/riello_usb.c index 799fb44..89909da 100644 --- a/drivers/riello_usb.c +++ b/drivers/riello_usb.c @@ -355,7 +355,9 @@ int riello_command(uint8_t *cmd, uint8_t *buf, uint16_t length, uint16_t buflen) case -ETIMEDOUT: /* Connection timed out */ case -EOVERFLOW: /* Value too large for defined data type */ +#ifdef EPROTO case -EPROTO: /* Protocol error */ +#endif default: break; } diff --git a/drivers/snmp-ups.c b/drivers/snmp-ups.c index 514c699..e99615d 100644 --- a/drivers/snmp-ups.c +++ b/drivers/snmp-ups.c @@ -3,7 +3,7 @@ * Based on NetSNMP API (Simple Network Management Protocol V1-2) * * Copyright (C) - * 2002 - 2012 Arnaud Quette + * 2002 - 2014 Arnaud Quette * 2002 - 2006 Dmitry Frolov * J.W. Hoogervorst * Niels Baggesen @@ -49,6 +49,7 @@ #include "cyberpower-mib.h" #include "delta_ups-mib.h" #include "ietf-mib.h" +#include "xppc-mib.h" /* Address API change */ #ifndef usmAESPrivProtocol @@ -71,6 +72,7 @@ static mib2nut_info_t *mib2nut[] = { &bestpower, &cyberpower, &delta_ups, + &xppc, /* * Prepend vendor specific MIB mappings before IETF, so that * if a device supports both IETF and vendor specific MIB, @@ -98,7 +100,7 @@ const char *mibvers; static void disable_transfer_oids(void); #define DRIVER_NAME "Generic SNMP UPS driver" -#define DRIVER_VERSION "0.70" +#define DRIVER_VERSION "0.72" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -586,6 +588,9 @@ struct snmp_pdu *nut_snmp_get(const char *OID) struct snmp_pdu ** pdu_array; struct snmp_pdu * ret_pdu; + if (OID == NULL) + return NULL; + upsdebugx(3, "nut_snmp_get(%s)", OID); pdu_array = nut_snmp_walk(OID,1); diff --git a/drivers/upsdrvctl.c b/drivers/upsdrvctl.c index 623f753..0cdaa2c 100644 --- a/drivers/upsdrvctl.c +++ b/drivers/upsdrvctl.c @@ -45,6 +45,12 @@ static int maxsdorder = 0, testmode = 0, exec_error = 0; /* timer - keeps us from getting stuck if a driver hangs */ static int maxstartdelay = 45; + /* counter - retry that many time(s) to start the driver if it fails to */ +static int maxretry = 1; + + /* timer - delay between each restart attempt of the driver(s) */ +static int retrydelay = 5; + /* Directory where driver executables live */ static char *driverpath = NULL; @@ -65,6 +71,12 @@ void do_upsconf_args(char *upsname, char *var, char *val) driverpath = xstrdup(val); } + if (!strcmp(var, "maxretry")) + maxretry = atoi(val); + + if (!strcmp(var, "retrydelay")) + retrydelay = atoi(val); + /* ignore anything else - it's probably for main */ return; @@ -248,6 +260,7 @@ static void start_driver(const ups_t *ups) char *argv[8]; char dfn[SMALLBUF]; int ret, arg = 0; + int initial_exec_error = exec_error, drv_maxretry = maxretry; struct stat fs; upsdebugx(1, "Starting UPS: %s", ups->upsname); @@ -276,10 +289,28 @@ static void start_driver(const ups_t *ups) /* tie it off */ argv[arg++] = NULL; - debugcmdline(2, "exec: ", argv); - if (!testmode) { - forkexec(argv, ups); + while (drv_maxretry > 0) { + int cur_exec_error = exec_error; + + upsdebugx(2, "%i remaining attempts", drv_maxretry); + debugcmdline(2, "exec: ", argv); + drv_maxretry--; + + if (!testmode) { + forkexec(argv, ups); + } + + /* driver command succeeded */ + if (cur_exec_error == exec_error) { + drv_maxretry = 0; + exec_error = initial_exec_error; + } + else { + /* otherwise, retry if still needed */ + if (drv_maxretry > 0) + sleep (retrydelay); + } } } diff --git a/drivers/usb-common.h b/drivers/usb-common.h index e160e76..ad08172 100644 --- a/drivers/usb-common.h +++ b/drivers/usb-common.h @@ -25,6 +25,9 @@ #include #include +/* USB standard timeout [ms] */ +#define USB_TIMEOUT 5000 + /*! * USBDevice_t: Describe a USB device. This structure contains exactly * the 5 pieces of information by which a USB device identifies diff --git a/drivers/usbhid-ups.c b/drivers/usbhid-ups.c index fcf628d..cdfbad7 100644 --- a/drivers/usbhid-ups.c +++ b/drivers/usbhid-ups.c @@ -1269,7 +1269,9 @@ static bool_t hid_ups_walk(walkmode_t mode) case -ETIMEDOUT: /* Connection timed out */ case -EOVERFLOW: /* Value too large for defined data type */ +#ifdef EPROTO case -EPROTO: /* Protocol error */ +#endif case -EPIPE: /* Broken pipe */ default: /* Don't know what happened, try again later... */ diff --git a/drivers/xppc-mib.c b/drivers/xppc-mib.c new file mode 100644 index 0000000..4562cd4 --- /dev/null +++ b/drivers/xppc-mib.c @@ -0,0 +1,126 @@ +/* xppc-mib.c - subdriver to monitor XPPC SNMP devices with NUT + * + * Copyright (C) + * 2011 - 2012 Arnaud Quette + * 2014 Charles Lepple + * + * Note: this subdriver was initially generated as a "stub" by the + * scripts/subdriver/gen-snmp-subdriver.sh script. + * + * 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 + */ + +#include "xppc-mib.h" + +#define XPPC_MIB_VERSION "0.2" + +#define XPPC_SYSOID ".1.3.6.1.4.1.935" + +/* To create a value lookup structure (as needed on the 2nd line of the example + * below), use the following kind of declaration, outside of the present snmp_info_t[]: + * static info_lkp_t onbatt_info[] = { + * { 1, "OB" }, + * { 2, "OL" }, + * { 0, "NULL" } + * }; + */ + +/* upsBaseBatteryStatus */ +static info_lkp_t xpcc_onbatt_info[] = { + { 1, "" }, /* unknown */ + { 2, "" }, /* batteryNormal */ + { 3, "LB" } /* batteryLow */ +}; + +/* +upsBaseOutputStatus OBJECT-TYPE + SYNTAX INTEGER { + unknown(1), + onLine(2), + onBattery(3), + onBoost(4), + sleeping(5), + onBypass(6), + rebooting(7), + standBy(8), + onBuck(9) } +*/ +static info_lkp_t xpcc_power_info[] = { + { 1, "" }, /* unknown */ + { 2, "OL" }, /* onLine */ + { 3, "OB" }, /* onBattery */ + { 4, "OL BOOST" }, /* onBoost */ + { 5, "OFF" }, /* sleeping */ + { 6, "BYPASS"}, /* onBypass */ + { 7, "" }, /* rebooting */ + { 8, "OFF" }, /* standBy */ + { 9, "OL TRIM"} /* onBuck */ +}; + +/* XPPC Snmp2NUT lookup table */ +static snmp_info_t xppc_mib[] = { + + /* Data format: + * { info_type, info_flags, info_len, OID, dfl, flags, oid2info, setvar }, + * + * info_type: NUT INFO_ or CMD_ element name + * info_flags: flags to set in addinfo + * info_len: length of strings if STR + * cmd value if CMD, multiplier otherwise + * OID: SNMP OID or NULL + * dfl: default value + * flags: snmp-ups internal flags (FIXME: ...) + * oid2info: lookup table between OID and NUT values + * setvar: variable to set for SU_FLAG_SETINT + * + * Example: + * { "input.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.2.1", "", SU_INPUT_1, NULL }, + * { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.7.3.0", "", SU_FLAG_OK | SU_STATUS_BATT, onbatt_info }, + * + * To create a value lookup structure (as needed on the 2nd line), use the + * following kind of declaration, outside of the present snmp_info_t[]: + * static info_lkp_t onbatt_info[] = { + * { 1, "OB" }, + * { 2, "OL" }, + * { 0, "NULL" } + * }; + */ + { "ups.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "Tripp Lite / Phoenixtec", + SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL }, + + /* upsBaseIdentModel.0 = STRING: "Intelligent" */ + { "ups.model", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.935.1.1.1.1.1.1.0", "Generic Phoenixtec SNMP device", SU_FLAG_OK, NULL }, + /* upsBaseBatteryStatus.0 = INTEGER: batteryNormal(2) */ + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.935.1.1.1.2.1.1.0", "", SU_STATUS_BATT | SU_TYPE_INT | SU_FLAG_OK, xpcc_onbatt_info }, + /* upsSmartBatteryCapacity.0 = INTEGER: 100 */ + { "battery.charge", 0, 1, ".1.3.6.1.4.1.935.1.1.1.2.2.1.0", NULL, SU_TYPE_INT | SU_FLAG_OK, NULL }, + /* upsSmartBatteryTemperature.0 = INTEGER: 260 */ + { "ups.temperature", 0, 0.1, ".1.3.6.1.4.1.935.1.1.1.2.2.3.0", NULL, SU_TYPE_INT | SU_FLAG_OK, NULL }, + /* upsSmartInputLineVoltage.0 = INTEGER: 1998 */ + { "input.voltage", 0, 0.1, ".1.3.6.1.4.1.935.1.1.1.3.2.1.0", NULL, SU_TYPE_INT | SU_FLAG_OK, NULL }, + /* upsBaseOutputStatus.0 = INTEGER: onLine(2) */ + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.935.1.1.1.4.1.1.0", "", SU_TYPE_INT | SU_STATUS_PWR, xpcc_power_info }, + /* upsSmartOutputVoltage.0 = INTEGER: 2309 */ + { "output.voltage", 0, 0.1, ".1.3.6.1.4.1.935.1.1.1.4.2.1.0", NULL, SU_TYPE_INT | SU_FLAG_OK, NULL }, + /* upsSmartOutputFrequency.0 = INTEGER: 500 */ + { "output.frequency", 0, 0.1, ".1.3.6.1.4.1.935.1.1.1.4.2.2.0", NULL, SU_TYPE_INT | SU_FLAG_OK, NULL }, + /* upsSmartOutputLoad.0 = INTEGER: 7 */ + { "ups.load", 0, 1, ".1.3.6.1.4.1.935.1.1.1.4.2.3.0", NULL, SU_TYPE_INT | SU_FLAG_OK, NULL }, + + /* end of structure. */ + { NULL, 0, 0, NULL, NULL, 0, NULL } +}; + +mib2nut_info_t xppc = { "xppc", XPPC_MIB_VERSION, NULL, NULL, xppc_mib, XPPC_SYSOID }; diff --git a/drivers/xppc-mib.h b/drivers/xppc-mib.h new file mode 100644 index 0000000..e2a360b --- /dev/null +++ b/drivers/xppc-mib.h @@ -0,0 +1,29 @@ +/* xppc-mib.h - subdriver to monitor XPPC SNMP devices with NUT + * + * Copyright (C) + * 2011 - 2012 Arnaud Quette + * + * 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 XPPC_MIB_H +#define XPPC_MIB_H + +#include "main.h" +#include "snmp-ups.h" + +extern mib2nut_info_t xppc; + +#endif /* XPPC_MIB_H */ diff --git a/include/Makefile.in b/include/Makefile.in index cc95d61..bd75cae 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -75,10 +74,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -138,10 +136,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -153,8 +147,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -240,6 +232,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/include/config.h.in b/include/config.h.in index 7e8db11..f255496 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -1,4 +1,4 @@ -/* include/config.h.in. Generated from configure.in by autoheader. */ +/* include/config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD @@ -30,9 +30,6 @@ MSVC and with C++ compilers. */ #undef FLEXIBLE_ARRAY_MEMBER -/* addons run as user */ -#undef HAL_USER - /* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT @@ -54,9 +51,6 @@ /* Define to 1 if C supports variable-length arrays. */ #undef HAVE_C_VARARRAYS -/* Define to 1 if you have the header file. */ -#undef HAVE_DBUS_DBUS_GLIB_H - /* Define to 1 if you have the declaration of `LOG_UPTO', and to 0 if you don't. */ #undef HAVE_DECL_LOG_UPTO @@ -116,12 +110,6 @@ /* Define to 1 if you have the `getpassphrase' function. */ #undef HAVE_GETPASSPHRASE -/* Define to 1 if you have the header file. */ -#undef HAVE_GLIB_H - -/* Define to 1 if you have the `g_timeout_add_seconds' function. */ -#undef HAVE_G_TIMEOUT_ADD_SECONDS - /* Define to 1 if you have the `init_snmp' function. */ #undef HAVE_INIT_SNMP @@ -134,12 +122,6 @@ /* Define if you have Boutell's libgd installed */ #undef HAVE_LIBGD -/* Define to 1 if you have the `libhal_device_new_changeset' function. */ -#undef HAVE_LIBHAL_DEVICE_NEW_CHANGESET - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBHAL_H - /* Define to enable libltdl support */ #undef HAVE_LIBLTDL @@ -391,9 +373,6 @@ /* Define to enable IPMI support using FreeIPMI */ #undef WITH_FREEIPMI -/* Define to enable HAL support */ -#undef WITH_HAL - /* Define to enable IPMI support */ #undef WITH_IPMI diff --git a/lib/Makefile.in b/lib/Makefile.in index a8296b1..0480c02 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -69,7 +69,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -79,10 +78,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -170,10 +168,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -185,8 +179,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -272,6 +264,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/m4/nut_check_libhal.m4 b/m4/nut_check_libhal.m4 deleted file mode 100644 index ec54068..0000000 --- a/m4/nut_check_libhal.m4 +++ /dev/null @@ -1,81 +0,0 @@ -dnl Check for LIBHAL compiler flags. On success, set nut_have_libhal="yes" -dnl and set LIBHAL_CFLAGS and LIBHAL_LIBS. On failure, set -dnl nut_have_libhal="no". This macro can be run multiple times, but will -dnl do the checking only once. -dnl NUT requires HAL version 0.5.8 at least - -AC_DEFUN([NUT_CHECK_LIBHAL], -[ -if test -z "${nut_have_libhal_seen}"; then - nut_have_libhal_seen=yes - - CFLAGS_ORIG="${CFLAGS}" - LIBS_ORIG="${LIBS}" - - AC_MSG_CHECKING(for libhal version via pkg-config (0.5.8 minimum required)) - HAL_VERSION="`pkg-config --silence-errors --modversion hal 2>/dev/null`" - if test "$?" != "0" -o -z "${HAL_VERSION}"; then - AC_MSG_RESULT(none found) - elif pkg-config --silence-errors --atleast-version=0.5.8 hal 2>/dev/null; then - AC_MSG_RESULT(${HAL_VERSION} found) - else - AC_MSG_WARN(${HAL_VERSION} is too old) - fi - - AC_MSG_CHECKING(for libhal cflags) - AC_ARG_WITH(hal-includes, - AS_HELP_STRING([@<:@--with-hal-includes=CFLAGS@:>@], [include flags for the HAL library]), - [ - case "${withval}" in - yes|no) - AC_MSG_ERROR(invalid option --with(out)-hal-includes - see docs/configure.txt) - ;; - *) - CFLAGS="${withval}" - ;; - esac - ], [ - dnl also get cflags from glib-2.0 to workaround a bug in dbus-glib - CFLAGS="`pkg-config --silence-errors --cflags hal dbus-glib-1 2>/dev/null`" - if test "$?" != "0"; then - CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include" - fi - ]) - AC_MSG_RESULT([${CFLAGS}]) - - AC_MSG_CHECKING(for libhal ldflags) - AC_ARG_WITH(hal-libs, - AS_HELP_STRING([@<:@--with-hal-libs=LIBS@:>@], [linker flags for the HAL library]), - [ - case "${withval}" in - yes|no) - AC_MSG_ERROR(invalid option --with(out)-hal-libs - see docs/configure.txt) - ;; - *) - LIBS="${withval}" - ;; - esac - ], [ - dnl also get libs from glib-2.0 to workaround a bug in dbus-glib - LIBS="`pkg-config --silence-errors --libs hal dbus-glib-1 2>/dev/null`" - if test "$?" != "0"; then - LIBS="-lhal -ldbus-1 -lpthread" - fi - ]) - AC_MSG_RESULT([${LIBS}]) - - dnl check if HAL is usable - AC_CHECK_HEADERS(libhal.h, [nut_have_libhal=yes], [nut_have_libhal=no], [AC_INCLUDES_DEFAULT]) - AC_CHECK_HEADERS(glib.h dbus/dbus-glib.h, [], [nut_have_libhal=no], [AC_INCLUDES_DEFAULT]) - AC_CHECK_FUNCS(libhal_device_new_changeset, [], [nut_have_libhal=no]) - - if test "${nut_have_libhal}" = "yes"; then - AC_CHECK_FUNCS(g_timeout_add_seconds) - LIBHAL_CFLAGS="${CFLAGS}" - LIBHAL_LIBS="${LIBS}" - fi - - CFLAGS="${CFLAGS_ORIG}" - LIBS="${LIBS_ORIG}" -fi -]) diff --git a/m4/nut_config_libhal.m4 b/m4/nut_config_libhal.m4 deleted file mode 100644 index 23f6192..0000000 --- a/m4/nut_config_libhal.m4 +++ /dev/null @@ -1,102 +0,0 @@ -dnl Check for LIBHAL configuration if support for HAL was found. -dnl This keeps compile and link time options separate from runtime -dnl configuration items. This macro can be run multiple times, but -dnl will do the checking only once. - -AC_DEFUN([NUT_CONFIG_LIBHAL], -[ -if test -z "${nut_have_config_libhal_seen}" -a "${nut_have_libhal}" = "yes"; then - nut_have_config_libhal_seen=yes - - AC_REQUIRE([NUT_CHECK_LIBHAL]) - - AC_MSG_CHECKING(for libhal user) - AC_ARG_WITH(hal-user, - AS_HELP_STRING([@<:@--with-hal-user=USER@:>@], [addons run as user]), - [ - case "${withval}" in - yes|no) - AC_MSG_ERROR(invalid option --with(out)-hal-user - see docs/configure.txt) - ;; - *) - HAL_USER="${withval}" - ;; - esac - ], [ - dnl this will only work as of HAL 0.5.9 - HAL_USER="`pkg-config --silence-errors --variable=haluser hal 2>/dev/null`" - if test "$?" != "0" -o -z "${HAL_USER}"; then - HAL_USER="haldaemon" - fi - ]) - AC_MSG_RESULT(${HAL_USER}) - AC_DEFINE_UNQUOTED(HAL_USER, "${HAL_USER}", [addons run as user]) - - AC_MSG_CHECKING(for libhal device match key) - AC_ARG_WITH(hal-device-match-key, - AS_HELP_STRING([@<:@--with-hal-device-match-key=KEY@:>@], [device match key]), - [ - case "${withval}" in - yes|no) - AC_MSG_ERROR(invalid option --with(out)-hal-device-match-key - see docs/configure.txt) - ;; - *) - HAL_DEVICE_MATCH_KEY="${withval}" - ;; - esac - ], [ - dnl the device match key changed with HAL 0.5.11 - if pkg-config --silence-errors --atleast-version=0.5.11 hal 2>/dev/null; then - HAL_DEVICE_MATCH_KEY="info.bus" - else - HAL_DEVICE_MATCH_KEY="info.subsystem" - fi - ]) - AC_MSG_RESULT(${HAL_DEVICE_MATCH_KEY}) - - AC_MSG_CHECKING(for libhal Callouts path) - AC_ARG_WITH(hal-callouts-path, - AS_HELP_STRING([@<:@--with-hal-callouts-path=PATH@:>@], [installation path for callouts]), - [ - case "${withval}" in - yes|no) - AC_MSG_ERROR(invalid option --with(out)-hal-callouts-path - see docs/configure.txt) - ;; - *) - HAL_CALLOUTS_PATH="${withval}" - ;; - esac - ], [ - dnl Determine installation path for callouts - dnl As per HAL spec, §5 Callouts addon install path: $libdir/hal - HAL_CALLOUTS_PATH="`pkg-config --silence-errors --variable=libexecdir hal 2>/dev/null`" - if test "$?" != "0" -o -z "${HAL_CALLOUTS_PATH}"; then - HAL_CALLOUTS_PATH="${libdir}/hal" - fi - ]) - AC_MSG_RESULT(${HAL_CALLOUTS_PATH}) - - AC_MSG_CHECKING(for libhal Device Information path) - AC_ARG_WITH(hal-fdi-path, - AS_HELP_STRING([@<:@--with-hal-fdi-path=PATH@:>@], [installation path for device information files]), - [ - case "${withval}" in - yes|no) - AC_MSG_ERROR(invalid option --with(out)-hal-fdi-path - see docs/configure.txt) - ;; - *) - HAL_FDI_PATH="${withval}" - ;; - esac - ], [ - dnl Determine installation path for .fdi - dnl As per HAL spec, §2 Device Information Files - dnl fdi install path: $datarootdir/hal/fdi/information/20thirdparty - HAL_FDI_PATH="`pkg-config --silence-errors --variable=hal_fdidir hal 2>/dev/null`" - if test "$?" != "0" -o -z "${HAL_FDI_PATH}"; then - HAL_FDI_PATH="${datarootdir}/hal/fdi/information/20thirdparty" - fi - ]) - AC_MSG_RESULT(${HAL_FDI_PATH}) -fi -]) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index b6dde24..8e84e24 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,27 +1,28 @@ EXTRA_DIST = README \ -avahi/nut.service.in \ -HP-UX/nut-drvctl \ -HP-UX/nut-drvctl.sh \ -HP-UX/nut-upsd \ -HP-UX/nut-upsd.sh \ -HP-UX/nut-upsmon \ -HP-UX/nut-upsmon.sh \ -logrotate/nutlogd \ -misc/nut.bash_completion \ -misc/osd-notify \ -perl/Nut.pm \ -RedHat/halt.patch \ -RedHat/README \ -RedHat/ups \ -RedHat/upsd \ -RedHat/upsd.in \ -RedHat/upsmon \ -RedHat/upsmon.in \ -Solaris8/S99upsmon \ -subdriver/gen-usbhid-subdriver.sh \ -ufw/README \ -upower/95-upower-hid.rules \ -Windows/halt.c \ -Windows/Makefile + avahi/nut.service.in \ + HP-UX/nut-drvctl \ + HP-UX/nut-drvctl.sh \ + HP-UX/nut-upsd \ + HP-UX/nut-upsd.sh \ + HP-UX/nut-upsmon \ + HP-UX/nut-upsmon.sh \ + logrotate/nutlogd \ + misc/nut.bash_completion \ + misc/osd-notify \ + perl/Nut.pm \ + RedHat/halt.patch \ + RedHat/README \ + RedHat/ups \ + RedHat/upsd \ + RedHat/upsd.in \ + RedHat/upsmon \ + RedHat/upsmon.in \ + Solaris8/S99upsmon \ + subdriver/gen-usbhid-subdriver.sh \ + subdriver/gen-snmp-subdriver.sh \ + ufw/README \ + upower/95-upower-hid.rules \ + Windows/halt.c \ + Windows/Makefile -SUBDIRS = augeas hal hotplug python systemd udev Solaris +SUBDIRS = augeas devd hotplug python systemd udev Solaris diff --git a/scripts/Makefile.in b/scripts/Makefile.in index fad5e58..c260153 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -63,7 +63,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -73,10 +72,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -173,10 +171,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -188,8 +182,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -275,6 +267,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ @@ -317,32 +310,33 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ EXTRA_DIST = README \ -avahi/nut.service.in \ -HP-UX/nut-drvctl \ -HP-UX/nut-drvctl.sh \ -HP-UX/nut-upsd \ -HP-UX/nut-upsd.sh \ -HP-UX/nut-upsmon \ -HP-UX/nut-upsmon.sh \ -logrotate/nutlogd \ -misc/nut.bash_completion \ -misc/osd-notify \ -perl/Nut.pm \ -RedHat/halt.patch \ -RedHat/README \ -RedHat/ups \ -RedHat/upsd \ -RedHat/upsd.in \ -RedHat/upsmon \ -RedHat/upsmon.in \ -Solaris8/S99upsmon \ -subdriver/gen-usbhid-subdriver.sh \ -ufw/README \ -upower/95-upower-hid.rules \ -Windows/halt.c \ -Windows/Makefile + avahi/nut.service.in \ + HP-UX/nut-drvctl \ + HP-UX/nut-drvctl.sh \ + HP-UX/nut-upsd \ + HP-UX/nut-upsd.sh \ + HP-UX/nut-upsmon \ + HP-UX/nut-upsmon.sh \ + logrotate/nutlogd \ + misc/nut.bash_completion \ + misc/osd-notify \ + perl/Nut.pm \ + RedHat/halt.patch \ + RedHat/README \ + RedHat/ups \ + RedHat/upsd \ + RedHat/upsd.in \ + RedHat/upsmon \ + RedHat/upsmon.in \ + Solaris8/S99upsmon \ + subdriver/gen-usbhid-subdriver.sh \ + subdriver/gen-snmp-subdriver.sh \ + ufw/README \ + upower/95-upower-hid.rules \ + Windows/halt.c \ + Windows/Makefile -SUBDIRS = augeas hal hotplug python systemd udev Solaris +SUBDIRS = augeas devd hotplug python systemd udev Solaris all: all-recursive .SUFFIXES: diff --git a/scripts/README b/scripts/README index f4251da..f31e103 100644 --- a/scripts/README +++ b/scripts/README @@ -2,8 +2,6 @@ These directories hold various scripts: - example startup and shutdown scripts for various operating systems and distributions, - hotplug and udev integration for on the fly privileges settings (Linux only), -- Hardware Abstraction Layer script, for declaring and binding NUT addons to -specific USB devices, - UPower (previously DeviceKit-power) rules file, - Python Client module and application, - Perl client module, diff --git a/scripts/Solaris/Makefile.in b/scripts/Solaris/Makefile.in index d6f845b..e968d1f 100644 --- a/scripts/Solaris/Makefile.in +++ b/scripts/Solaris/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -75,10 +74,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -135,10 +133,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -150,8 +144,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -237,6 +229,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/scripts/Solaris/nut.in b/scripts/Solaris/nut.in index b18b7fd..ab7ec94 100644 --- a/scripts/Solaris/nut.in +++ b/scripts/Solaris/nut.in @@ -12,7 +12,7 @@ fi ups_stop () { pkill -n upsmon pkill -n upsd - ${NUT_DIR}/bin/upsdrvctl stop > /dev/null 2>&1 + ${NUT_DIR}/sbin/upsdrvctl stop > /dev/null 2>&1 } ups_start () { @@ -22,7 +22,7 @@ ups_start () { fi if [ ! "$MODE" = "netclient" ];then - $NUT_DIR/bin/upsdrvctl start #> /dev/null 2>&1 + $NUT_DIR/sbin/upsdrvctl start #> /dev/null 2>&1 $NUT_DIR/sbin/upsd #> /dev/null 2>&1 fi $NUT_DIR/sbin/upsmon #> /dev/null 2>&1 @@ -49,7 +49,7 @@ case $1 in $NUT_DIR/sbin/upsmon -K >/dev/null 2>&1 if [ $? = 0 ]; then echo "Shutting down the UPS ..." - #$NUT_DIR/bin/upsdrvctl shutdown + #$NUT_DIR/sbin/upsdrvctl shutdown fi ;; *) diff --git a/scripts/Solaris/postinstall.in b/scripts/Solaris/postinstall.in index 3bf6226..136e077 100644 --- a/scripts/Solaris/postinstall.in +++ b/scripts/Solaris/postinstall.in @@ -59,7 +59,7 @@ ln -s /etc/init.d/nut /etc/rc3.d/K100nut > /dev/null 2>&1 # Start nut services #echo "Starting nut services" -#$NUT_DIR/bin/upsdrvctl start #> /dev/null 2>&1 +#$NUT_DIR/sbin/upsdrvctl start #> /dev/null 2>&1 #$NUT_DIR/sbin/upsd #> /dev/null 2>&1 #$NUT_DIR/sbin/upsmon #> /dev/null 2>&1 diff --git a/scripts/Solaris/preremove.in b/scripts/Solaris/preremove.in index 7096918..dc4a1a1 100644 --- a/scripts/Solaris/preremove.in +++ b/scripts/Solaris/preremove.in @@ -4,5 +4,5 @@ NUT_DIR="@prefix@" -#$NUT_DIR/bin/upsdrvctl stop +#$NUT_DIR/sbin/upsdrvctl stop diff --git a/scripts/augeas/Makefile.in b/scripts/augeas/Makefile.in index 2f7fc23..2c1d35c 100644 --- a/scripts/augeas/Makefile.in +++ b/scripts/augeas/Makefile.in @@ -68,7 +68,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -78,10 +77,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -140,10 +138,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -155,8 +149,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -242,6 +234,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/scripts/devd/Makefile.am b/scripts/devd/Makefile.am new file mode 100644 index 0000000..e5a9bbc --- /dev/null +++ b/scripts/devd/Makefile.am @@ -0,0 +1,14 @@ + +if WITH_DEVD + devdconfdir = $(devddir) + devdconf_DATA = +if WITH_USB + devdconf_DATA += nut-usb.conf +endif +endif + +EXTRA_DIST = README + +DISTCLEANFILES = nut-usb.conf +# we should never remove this one, apart from a distclean-check +#MAINTAINERCLEANFILES = nut-usbups.rules.in diff --git a/scripts/hal/Makefile.in b/scripts/devd/Makefile.in similarity index 88% rename from scripts/hal/Makefile.in rename to scripts/devd/Makefile.in index 4b5950d..2b564ce 100644 --- a/scripts/hal/Makefile.in +++ b/scripts/devd/Makefile.in @@ -52,9 +52,10 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -subdir = scripts/hal -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/ups-nut-device.fdi.in +@WITH_DEVD_TRUE@@WITH_USB_TRUE@am__append_1 = nut-usb.conf +subdir = scripts/devd +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/nut-usb.conf.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 \ @@ -65,7 +66,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -75,15 +75,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac 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 = ups-nut-device.fdi +CONFIG_CLEAN_FILES = nut-usb.conf CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = @@ -119,8 +118,8 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(halfdidir)" -DATA = $(halfdi_DATA) +am__installdirs = "$(DESTDIR)$(devdconfdir)" +DATA = $(devdconf_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ @@ -164,10 +163,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -179,8 +174,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -266,6 +259,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ @@ -307,13 +301,10 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -@WITH_HAL_TRUE@halfdidir = $(HAL_FDI_PATH) -@WITH_HAL_TRUE@halfdi_DATA = 20-ups-nut-device.fdi -EXTRA_DIST = ups-nut-device.fdi.in -DISTCLEANFILES = ups-nut-device.fdi -# we should never remove this one, apart from a distclean-check -#MAINTAINERCLEANFILES = ups-nut-device.fdi.in -CLEANFILES = 20-ups-nut-device.fdi +@WITH_DEVD_TRUE@devdconfdir = $(devddir) +@WITH_DEVD_TRUE@devdconf_DATA = $(am__append_1) +EXTRA_DIST = README +DISTCLEANFILES = nut-usb.conf all: all-am .SUFFIXES: @@ -326,9 +317,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/hal/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/devd/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu scripts/hal/Makefile + $(AUTOMAKE) --gnu scripts/devd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -347,7 +338,7 @@ $(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): -ups-nut-device.fdi: $(top_builddir)/config.status $(srcdir)/ups-nut-device.fdi.in +nut-usb.conf: $(top_builddir)/config.status $(srcdir)/nut-usb.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: @@ -355,27 +346,27 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-halfdiDATA: $(halfdi_DATA) +install-devdconfDATA: $(devdconf_DATA) @$(NORMAL_INSTALL) - @list='$(halfdi_DATA)'; test -n "$(halfdidir)" || list=; \ + @list='$(devdconf_DATA)'; test -n "$(devdconfdir)" || list=; \ if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(halfdidir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(halfdidir)" || exit 1; \ + echo " $(MKDIR_P) '$(DESTDIR)$(devdconfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(devdconfdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(halfdidir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(halfdidir)" || exit $$?; \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(devdconfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(devdconfdir)" || exit $$?; \ done -uninstall-halfdiDATA: +uninstall-devdconfDATA: @$(NORMAL_UNINSTALL) - @list='$(halfdi_DATA)'; test -n "$(halfdidir)" || list=; \ + @list='$(devdconf_DATA)'; test -n "$(devdconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(halfdidir)'; $(am__uninstall_files_from_dir) + dir='$(DESTDIR)$(devdconfdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -417,7 +408,7 @@ check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: - for dir in "$(DESTDIR)$(halfdidir)"; do \ + for dir in "$(DESTDIR)$(devdconfdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -442,7 +433,6 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -472,7 +462,7 @@ info: info-am info-am: -install-data-am: install-halfdiDATA +install-data-am: install-devdconfDATA install-dvi: install-dvi-am @@ -516,26 +506,24 @@ ps: ps-am ps-am: -uninstall-am: uninstall-halfdiDATA +uninstall-am: uninstall-devdconfDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir 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-halfdiDATA install-html \ + install-data install-data-am install-devdconfDATA 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 \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-halfdiDATA + uninstall uninstall-am uninstall-devdconfDATA - -# FIXME: should be able to use $< here. -20-ups-nut-device.fdi: ups-nut-device.fdi - cp ups-nut-device.fdi $@ +# we should never remove this one, apart from a distclean-check +#MAINTAINERCLEANFILES = nut-usbups.rules.in # 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. diff --git a/scripts/devd/README b/scripts/devd/README new file mode 100644 index 0000000..58f9fda --- /dev/null +++ b/scripts/devd/README @@ -0,0 +1,11 @@ +On FreeBSD, devd has a similar role to udev on Linux. The devd.conf file +defines actions to perform when devices are plugged in. + +The tools/nut-usbinfo.pl script generates nut-usb.conf.in by processing USB +macros in all of the drivers. In this case, the defined action for each +matching UPS is to change the permissions such that the NUT drivers can access +the devices without requiring root privileges. You may need to restart devd and +re-plug in the UPS to trigger the actions. + +The format of this configuration file should work with devd on FreeBSD 9.0 and +9.1, at the very least. diff --git a/scripts/devd/nut-usb.conf.in b/scripts/devd/nut-usb.conf.in new file mode 100644 index 0000000..05b6ffa --- /dev/null +++ b/scripts/devd/nut-usb.conf.in @@ -0,0 +1,850 @@ +# This file is generated and installed by the Network UPS Tools package. +# Homepage: http://www.networkupstools.org/ + +# ATCL FOR UPS - nutdrv_atcl_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0001"; + match "product" "0x0000"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Hewlett Packard +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x0001"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# T500 - bcmxcp_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1f01"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# T750 - bcmxcp_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1f02"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# HP T750 INTL - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1f06"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# HP T1000 INTL - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1f08"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# HP T1500 INTL - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1f09"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# HP R/T 2200 INTL (like SMART2200RMXL2U) - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1f0a"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# HP R1500 G2 and G3 INTL - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1fe0"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# HP T750 G2 - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1fe1"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1fe2"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# HP T1500 G3 - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1fe3"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# R/T3000 - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1fe5"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# R/T3000 - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1fe6"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# various models - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1fe7"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# various models - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x03f0"; + match "product" "0x1fe8"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Eaton +# various models - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0463"; + match "product" "0x0001"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# various models - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0463"; + match "product" "0xffff"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Dell +# various models - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x047c"; + match "product" "0xffff"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Riello (Cypress Semiconductor Corp.) +# various models - riello_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x04b4"; + match "product" "0x5500"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Minibox +# openUPS Intelligent UPS (minimum required firmware 1.4) - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x04d8"; + match "product" "0xd004"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Belkin +# F6H375-USB - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0375"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# F6C550-AVR - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0551"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# F6C1250-TW-RK - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0750"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# F6C1500-TW-RK - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0751"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# F6C900-UNV - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0900"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# F6C100-UNV - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0910"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# F6C120-UNV - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0912"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# F6C800-UNV - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0980"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# F6C1100-UNV, F6C1200-UNV - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x1100"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# APC +# various models - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x051d"; + match "product" "0x0002"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# various 5G models - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x051d"; + match "product" "0x0003"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Powerware +# various models - bcmxcp_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0592"; + match "product" "0x0002"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# PW 9140 - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0592"; + match "product" "0x0004"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Agiler UPS - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x05b8"; + match "product" "0x0000"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Belkin F6C1200-UNV - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0665"; + match "product" "0x5161"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Phoenixtec Power Co., Ltd +# Online Yunto YQ450 - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x06da"; + match "product" "0x0002"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Mustek Powermust - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x06da"; + match "product" "0x0003"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Phoenixtec Innova 3/1 T - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x06da"; + match "product" "0x0004"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Phoenixtec Innova RT - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x06da"; + match "product" "0x0005"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Phoenixtec Innova T - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x06da"; + match "product" "0x0201"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Online Zinto A - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x06da"; + match "product" "0x0601"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# various models - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x06da"; + match "product" "0xffff"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# iDowell +# iDowell - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x075d"; + match "product" "0x0300"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Cyber Power Systems +# 900AVR/BC900D, CP1200AVR/BC1200D - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0764"; + match "product" "0x0005"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Dynex DX-800U? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0764"; + match "product" "0x0501"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0764"; + match "product" "0x0601"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Sweex 1000VA - richcomm_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0925"; + match "product" "0x1234"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# TrippLite +# e.g. OMNIVS1000, SMART550USB, ... - tripplite_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x0001"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite AVR550U - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x1003"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite AVR750U - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x1007"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite ECO550UPS - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x1008"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite ECO550UPS - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x1009"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite ECO550UPS - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x1010"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite OMNI1000LCD - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x2005"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite OMNI900LCD - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x2007"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x2008"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite Smart1000LCD - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x2009"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x2010"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x2011"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x2012"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x2013"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x2014"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x3008"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x3009"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x3010"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x3011"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite smart2200RMXL2U - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x3012"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x3013"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x3014"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x3015"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite Smart1500LCD (newer unit) - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x3016"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite SmartOnline SU1500RTXL2UA (older unit?) - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x4001"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite SmartOnline SU6000RT4U? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x4002"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite SmartOnline SU1500RTXL2ua - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x4003"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. TrippLite SmartOnline SU1000XLA - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x4004"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x4005"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x4006"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x4007"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# e.g. ? - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x09ae"; + match "product" "0x4008"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# PowerCOM +# PowerCOM Vanguard and BNT-xxxAP - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0d9f"; + match "product" "0x0004"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# PowerCOM IMP - IMPERIAL Series - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0d9f"; + match "product" "0x00a2"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# PowerCOM SKP - Smart KING Pro (all Smart series) - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0d9f"; + match "product" "0x00a3"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# PowerCOM WOW - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0d9f"; + match "product" "0x00a4"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# PowerCOM VGD - Vanguard - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0d9f"; + match "product" "0x00a5"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# PowerCOM BNT - Black Knight Pro - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0d9f"; + match "product" "0x00a6"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Unitek Alpha 1200Sx - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0f03"; + match "product" "0x0001"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; + +# Liebert +# Liebert PowerSure PSA UPS - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x10af"; + match "product" "0x0001"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Liebert PowerSure PSI 1440 - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x10af"; + match "product" "0x0004"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# GE EP series - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x14f0"; + match "product" "0x00c9"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; +# Ablerex 625L USB - blazer_usb +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0xffff"; + match "product" "0x0000"; + action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; +}; diff --git a/scripts/hal/Makefile.am b/scripts/hal/Makefile.am deleted file mode 100644 index f639b22..0000000 --- a/scripts/hal/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ - -if WITH_HAL - halfdidir = $(HAL_FDI_PATH) - halfdi_DATA = 20-ups-nut-device.fdi -endif - -# FIXME: should be able to use $< here. -20-ups-nut-device.fdi: ups-nut-device.fdi - cp ups-nut-device.fdi $@ - -EXTRA_DIST = ups-nut-device.fdi.in - -DISTCLEANFILES = ups-nut-device.fdi -# we should never remove this one, apart from a distclean-check -#MAINTAINERCLEANFILES = ups-nut-device.fdi.in -CLEANFILES = 20-ups-nut-device.fdi diff --git a/scripts/hal/ups-nut-device.fdi.in b/scripts/hal/ups-nut-device.fdi.in deleted file mode 100644 index 235a636..0000000 --- a/scripts/hal/ups-nut-device.fdi.in +++ /dev/null @@ -1,707 +0,0 @@ - - - - - - - - battery - battery - hald-addon-blazer_usb - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-bcmxcp_usb - ups - - - - battery - battery - hald-addon-bcmxcp_usb - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - - - battery - battery - hald-addon-riello_usb - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - - - battery - battery - hald-addon-bcmxcp_usb - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - battery - battery - hald-addon-blazer_usb - ups - - - - - - battery - battery - hald-addon-blazer_usb - ups - - - - - - - - battery - battery - hald-addon-blazer_usb - ups - - - - battery - battery - hald-addon-blazer_usb - ups - - - - battery - battery - hald-addon-blazer_usb - ups - - - - battery - battery - hald-addon-blazer_usb - ups - - - - battery - battery - hald-addon-blazer_usb - ups - - - - battery - battery - hald-addon-blazer_usb - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - battery - battery - hald-addon-richcomm_usb - ups - - - - - - - - battery - battery - hald-addon-tripplite_usb - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - battery - battery - hald-addon-blazer_usb - ups - - - - - - - - battery - battery - hald-addon-usbhid-ups - ups - - - - - - battery - battery - hald-addon-blazer_usb - ups - - - - - - battery - battery - hald-addon-blazer_usb - ups - - - - - diff --git a/scripts/hotplug/Makefile.in b/scripts/hotplug/Makefile.in index 3102c3c..4d6b47e 100644 --- a/scripts/hotplug/Makefile.in +++ b/scripts/hotplug/Makefile.in @@ -67,7 +67,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -77,10 +76,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -169,10 +167,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -184,8 +178,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -271,6 +263,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/scripts/hotplug/libhid.usermap b/scripts/hotplug/libhid.usermap index 493ce31..08f25c5 100644 --- a/scripts/hotplug/libhid.usermap +++ b/scripts/hotplug/libhid.usermap @@ -4,7 +4,7 @@ # libhidups 0x0003 0xVVVV 0xPPPP 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # # usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info -# Krauler UP-M500VA +# ATCL FOR UPS libhidups 0x0003 0x0001 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Hewlett Packard @@ -208,6 +208,8 @@ libhidups 0x0003 0x0f03 0x0001 0x0000 0x0000 0x00 # Liebert # Liebert PowerSure PSA UPS libhidups 0x0003 0x10af 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Liebert PowerSure PSI 1440 +libhidups 0x0003 0x10af 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # GE EP series libhidups 0x0003 0x14f0 0x00c9 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Ablerex 625L USB diff --git a/scripts/python/Makefile.in b/scripts/python/Makefile.in index a3fd0df..d04e8aa 100644 --- a/scripts/python/Makefile.in +++ b/scripts/python/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -75,10 +74,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -135,10 +133,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -150,8 +144,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -237,6 +229,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/scripts/subdriver/gen-snmp-subdriver.sh b/scripts/subdriver/gen-snmp-subdriver.sh new file mode 100755 index 0000000..b9aa44f --- /dev/null +++ b/scripts/subdriver/gen-snmp-subdriver.sh @@ -0,0 +1,348 @@ +#!/bin/bash +# +# an auxiliary script to produce a "stub" snmp-ups subdriver from +# SNMP data from a real agent or from dump files +# +# Version: 0.4 +# +# See also: docs/snmp-subdrivers.txt +# +# Copyright (C) +# 2011 - 2012 Arnaud Quette +# +# 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 +# +# TODO: +# - extend to SNMP v3 (auth.) + +usage() { + echo "Usage: $0 [options] [file]" + echo "Options:" + echo " -h, --help -- show this message and quit" + echo " -n name -- subdriver name (use natural capitalization)" + echo " -M DIRLIST -- colon separated list of directories to also search for MIBs" + echo " -k -- keep temporary files (for debugging)" + echo "" + echo "mode 1: get SNMP data from a real agent" + echo " -H host_address -- SNMP host IP address or name" + echo " -c community -- SNMP v1 community name (default: public)" + echo "" + echo "mode 2: get data from files (snmpwalk dumps of 'sysOID' subtree)" + echo " -s XXXX -- SNMP OID entry point (sysOID). Ex: '.1.3.6.1.4.1.705.1'" + echo " file1 file2 -- read from files instead of an host (using Net SNMP)" + echo " file1: numeric SNMP walk (snmpwalk -On ... )" + echo " file2: string SNMP walk (snmpwalk -Os ... )" + # FIXME: EXAMPLES +} + +# variables +DRIVER="" +KEEP="" +HOSTNAME="" +MIBS_DIRLIST="+." +COMMUNITY="public" +SYSOID="" +MODE=0 + +# constants +NAME=gen-snmp-subdriver +TMPDIR="${TEMPDIR:-/tmp}" +DEBUG=`mktemp "$TMPDIR/$NAME-DEBUG.XXXXXX"` +DFL_NUMWALKFILE=`mktemp "$TMPDIR/$NAME-NUMWALK.XXXXXX"` +DFL_STRWALKFILE=`mktemp "$TMPDIR/$NAME-STRWALK.XXXXXX"` +TMP_NUMWALKFILE=`mktemp "$TMPDIR/$NAME-TMP-NUMWALK.XXXXXX"` +TMP_STRWALKFILE=`mktemp "$TMPDIR/$NAME-TMP-STRWALK.XXXXXX"` + +get_snmp_data() { + # 1) get the sysOID (points the mfr specif MIB) + SYSOID=`snmpget -v1 -c $COMMUNITY $HOSTNAME .1.3.6.1.2.1.1.2.0 41` + + # 2) get the content of the mfr specif MIB + snmpwalk -On -v1 -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_NUMWALKFILE + snmpwalk -Os -v1 -M $MIBS_DIRLIST -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_STRWALKFILE +} + +# process command line options +while [ $# -gt 0 ]; do + if [ $# -gt 1 -a "$1" = "-n" ]; then + DRIVER="$2" + shift 2 + elif [ $# -gt 1 -a "$1" = "-M" ]; then + MIBS_DIRLIST="$MIBS_DIRLIST:$2" + shift 2 + elif [ "$1" = "-k" ]; then + KEEP=yes + shift + elif [ $# -gt 1 -a "$1" = "-H" ]; then + HOSTNAME="$2" + shift 2 + elif [ $# -gt 1 -a "$1" = "-c" ]; then + COMMUNITY="$2" + shift 2 + elif [ $# -gt 1 -a "$1" = "-s" ]; then + SYSOID="$2" + shift 2 + elif echo "$1" | grep -qv '^-'; then + if [ $# -gt 1 ]; then + NUMWALKFILE="$1" + shift + STRWALKFILE="$1" + shift + else + usage + exit 1 + fi + elif [ "$1" = "--help" -o "$1" = "-h" ]; then + usage + exit 0 + else + echo "Illegal option $1. Try --help for more info." >&2 + exit 1 + fi +done + +# check that the needed parameters are provided, depending on the mode +if [ -z "$NUMWALKFILE" ]; then + # mode 1: directly get SNMP data from a real agent + MODE=1 + NUMWALKFILE=$DFL_NUMWALKFILE + STRWALKFILE=$DFL_STRWALKFILE + + # check if Net SNMP is available + if [ -z "`which snmpget`" -o -z "`which snmpwalk`" ]; then + echo "Net SNMP not found! snmpget and snmpwalk commands are required." >&2 + exit 1 + fi + # hostname is also mandatory + while [ -z "$HOSTNAME" ]; do + echo " + Please enter the SNMP host IP address or name." + read -p "SNMP host IP name or address: " HOSTNAME < /dev/tty + if echo $HOSTNAME | egrep -q '[^a-zA-Z0-9]'; then + echo "Please use only letters and digits" + HOSTNAME="" + fi + done + # get data from the agent + get_snmp_data +else + # mode 2: get data from files + MODE=2 + + # get sysOID value from command line, if needed + while [ -z "$SYSOID" ]; do + echo " +Please enter the value of sysOID, as displayed by snmp-ups. For example '.1.3.6.1.4.1.2254.2.4'. +You can get it using: snmpget -v1 -c XXX .1.3.6.1.2.1.1.2.0" + read -p "Value of sysOID: " SYSOID < /dev/tty + if echo $SYSOID | egrep -q '[^0-9.]'; then + echo "Please use only the numeric form, with dots and digits" + SYSOID="" + fi + done + # check for actual files existence + if [ ! -f "$NUMWALKFILE" -o ! -f "$STRWALKFILE" ]; then + echo "SNMP walk dump files are missing on disk. Try --help for more info." >&2 + exit 1 + fi +fi + +# delete temporary files: this is called just before exiting. +cleanup () { + rm -f "$DEBUG $DFL_NUMWALKFILE $TMP_NUMWALKFILE $DFL_STRWALKFILE $TMP_STRWALKFILE" +} +if [ -z "$KEEP" ]; then + trap cleanup EXIT +fi + +# prompt use for name of driver +while [ -z "$DRIVER" ]; do + echo " +Please enter a name for this driver. Use only letters and numbers. Use +natural (upper- and lowercase) capitalization, e.g., 'Belkin', 'APC'." + read -p "Name of subdriver: " DRIVER < /dev/tty + if echo $DRIVER | egrep -q '[^a-zA-Z0-9]'; then + echo "Please use only letters and digits" + DRIVER="" + fi +done + +# remove blank and "End of MIB" lines +egrep -e "^[[:space:]]?$" -e "End of MIB" -v ${NUMWALKFILE} > ${TMP_NUMWALKFILE} +egrep -e "^[[:space:]]?$" -e "End of MIB" -v ${STRWALKFILE} > ${TMP_STRWALKFILE} +NUMWALKFILE=${TMP_NUMWALKFILE} +STRWALKFILE=${TMP_STRWALKFILE} + +# FIXME: sanity checks (! -z contents -a same `wc -l`) +NUM_OID_COUNT="`cat $NUMWALKFILE | wc -l`" +STR_OID_COUNT="`cat $STRWALKFILE | wc -l`" + +echo "COUNT = $NUM_OID_COUNT / $NUM_OID_COUNT" + +# create file names +LDRIVER=`echo $DRIVER | tr A-Z a-z` +UDRIVER=`echo $DRIVER | tr a-z A-Z` +CFILE="$LDRIVER-mib.c" +HFILE="$LDRIVER-mib.h" + +# generate header file +echo "Creating $HFILE" +cat > "$HFILE" < + * + * 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 ${UDRIVER}_MIB_H +#define ${UDRIVER}_MIB_H + +#include "main.h" +#include "snmp-ups.h" + +extern mib2nut_info_t ${LDRIVER}; + +#endif /* ${UDRIVER}_MIB_H */ +EOF + +# generate source file +# create header +echo "Creating $CFILE" +cat > "$CFILE" < + * + * Note: this subdriver was initially generated as a "stub" by the + * gen-snmp-subdriver script. It must be customized! + * + * 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 + */ + +#include "${HFILE}" + +#define ${UDRIVER}_MIB_VERSION "0.1" + +#define ${UDRIVER}_SYSOID "${SYSOID}" + +/* To create a value lookup structure (as needed on the 2nd line of the example + * below), use the following kind of declaration, outside of the present snmp_info_t[]: + * static info_lkp_t onbatt_info[] = { + * { 1, "OB" }, + * { 2, "OL" }, + * { 0, "NULL" } + * }; + */ + +/* ${UDRIVER} Snmp2NUT lookup table */ +static snmp_info_t ${LDRIVER}_mib[] = { + + /* Data format: + * { info_type, info_flags, info_len, OID, dfl, flags, oid2info, setvar }, + * + * info_type: NUT INFO_ or CMD_ element name + * info_flags: flags to set in addinfo + * info_len: length of strings if STR + * cmd value if CMD, multiplier otherwise + * OID: SNMP OID or NULL + * dfl: default value + * flags: snmp-ups internal flags (FIXME: ...) + * oid2info: lookup table between OID and NUT values + * setvar: variable to set for SU_FLAG_SETINT + * + * Example: + * { "input.voltage", 0, 0.1, ".1.3.6.1.4.1.705.1.6.2.1.2.1", "", SU_INPUT_1, NULL }, + * { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.705.1.7.3.0", "", SU_FLAG_OK | SU_STATUS_BATT, onbatt_info }, + * + * To create a value lookup structure (as needed on the 2nd line), use the + * following kind of declaration, outside of the present snmp_info_t[]: + * static info_lkp_t onbatt_info[] = { + * { 1, "OB" }, + * { 2, "OL" }, + * { 0, "NULL" } + * }; + */ +EOF + + +# extract OID string paths, one by one +LINENB="0" +while IFS= read -r line; do + LINENB="`expr $LINENB + 1`" + FULL_STR_OID="$line" + STR_OID="`echo $line | cut -d'.' -f1`" + echo $line | grep STRING > /dev/null + if [ $? -eq 0 ]; then + ST_FLAG_TYPE="ST_FLAG_STRING" + SU_INFOSIZE="SU_INFOSIZE" + else + ST_FLAG_TYPE="0" + SU_INFOSIZE="1" + fi + # get the matching numeric OID + NUM_OID="`sed -n ${LINENB}p ${NUMWALKFILE} | cut -d' ' -f1`" + printf "\t/* ${FULL_STR_OID} */\n\t{ \"unmapped.${STR_OID}\", ${ST_FLAG_TYPE}, ${SU_INFOSIZE}, \"${NUM_OID}\", NULL, SU_FLAG_OK, NULL },\n" +done < ${STRWALKFILE} >> ${CFILE} + +# append footer +cat >> "$CFILE" < "$CFILE" < * 2005 - 2006 Peter Selinger * 2008 - 2009 Arjen de Korte + * 2013 Charles Lepple * * Note: this subdriver was initially generated as a "stub" by the * gen-usbhid-subdriver script. It must be customized. @@ -263,7 +264,7 @@ static const char *${LDRIVER}_format_serial(HIDDevice_t *hd) { * the device is supported by this subdriver, else 0. */ static int ${LDRIVER}_claim(HIDDevice_t *hd) { - int status = is_usb_device_supported(${LDRIVER}_usb_device_table, hd->VendorID, hd->ProductID); + int status = is_usb_device_supported(${LDRIVER}_usb_device_table, hd); switch (status) { @@ -299,8 +300,8 @@ cat </dev/null 2>&1 && @driverexecdir@/upsdrvctl shutdown +@SBINDIR@/upsmon -K >/dev/null 2>&1 && @SBINDIR@/upsdrvctl shutdown diff --git a/scripts/udev/Makefile.in b/scripts/udev/Makefile.in index 6e6aa5c..c222218 100644 --- a/scripts/udev/Makefile.in +++ b/scripts/udev/Makefile.in @@ -67,7 +67,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -77,10 +76,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -166,10 +164,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -181,8 +175,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -268,6 +260,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/scripts/udev/nut-usbups.rules.in b/scripts/udev/nut-usbups.rules.in index d7285c8..d8961dd 100644 --- a/scripts/udev/nut-usbups.rules.in +++ b/scripts/udev/nut-usbups.rules.in @@ -6,7 +6,7 @@ SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real" SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end" LABEL="nut-usbups_rules_real" -# Krauler UP-M500VA - blazer_usb +# ATCL FOR UPS - nutdrv_atcl_usb ATTR{idVendor}=="0001", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" # Hewlett Packard @@ -210,6 +210,8 @@ ATTR{idVendor}=="0f03", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROU # Liebert # Liebert PowerSure PSA UPS - usbhid-ups ATTR{idVendor}=="10af", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" +# Liebert PowerSure PSI 1440 - usbhid-ups +ATTR{idVendor}=="10af", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" # GE EP series - blazer_usb ATTR{idVendor}=="14f0", ATTR{idProduct}=="00c9", MODE="664", GROUP="@RUN_AS_GROUP@" # Ablerex 625L USB - blazer_usb diff --git a/scripts/upower/95-upower-hid.rules b/scripts/upower/95-upower-hid.rules index 8af6415..31ffec2 100644 --- a/scripts/upower/95-upower-hid.rules +++ b/scripts/upower/95-upower-hid.rules @@ -123,5 +123,6 @@ ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a6", ENV{UPOWER_BATTERY_TYPE}="ups # Liebert ATTRS{idVendor}=="10af", ATTRS{idProduct}=="0001", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="10af", ATTRS{idProduct}=="0004", ENV{UPOWER_BATTERY_TYPE}="ups" LABEL="up_hid_end" diff --git a/server/Makefile.in b/server/Makefile.in index 6ef6823..b6c8d7d 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -72,7 +72,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -82,10 +81,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -177,10 +175,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -192,8 +186,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -279,6 +271,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/server/netlist.c b/server/netlist.c index 91f7831..c226dc3 100644 --- a/server/netlist.c +++ b/server/netlist.c @@ -220,7 +220,7 @@ static void list_range(nut_ctype_t *client, const char *upsname, const char *var return; } - sendback(client, "END LIST ENUM %s %s\n", upsname, var); + sendback(client, "END LIST RANGE %s %s\n", upsname, var); } static void list_ups(nut_ctype_t *client) diff --git a/tests/Makefile.in b/tests/Makefile.in index 153fc11..1e9772c 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -67,7 +67,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -77,10 +76,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -164,10 +162,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -179,8 +173,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -266,6 +258,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/tools/Makefile.am b/tools/Makefile.am index bfcadf7..0e6501e 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -16,7 +16,7 @@ # sub-directory SUBDIRS = . nut-scanner -EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py nut-recorder.sh gitlog2changelog.py nut-snmpinfo.py +EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh gitlog2changelog.py nut-snmpinfo.py all: nut-scanner-deps @@ -45,22 +45,9 @@ nut-scanner-deps: echo "----------------------------------------------------------------------"; \ fi -website: - @if python -c "import json,simplejson,lxml"; then \ - echo "Regenerating the HTML and JSON formated HCL tables."; \ - $(top_srcdir)/tools/nut-hclinfo.py; \ - else \ - echo "----------------------------------------------------------------------"; \ - echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \ - echo "is not available."; \ - echo "Skipping the HTML and JSON formated HCL tables regeneration."; \ - echo "----------------------------------------------------------------------"; \ - fi - # call the USB info script upon "make dist", and if Perl is present # call the SNMP info script upon "make dist", and if Python is present # and call both for building nut-scanner -# also generate HCL data files dist-hook: @if python -c 1; then \ echo "Regenerating the SNMP helper files."; \ @@ -82,15 +69,4 @@ dist-hook: echo "----------------------------------------------------------------------"; \ fi - @if python -c "import json,simplejson,lxml"; then \ - echo "Regenerating the HTML and JSON formated HCL tables."; \ - $(distdir)/nut-hclinfo.py; \ - else \ - echo "----------------------------------------------------------------------"; \ - echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \ - echo "is not available."; \ - echo "Skipping the HTML and JSON formated HCL tables regeneration."; \ - echo "----------------------------------------------------------------------"; \ - fi - .PHONY: nut-scanner-deps nut-scanner-snmp-deps nut-scanner-usb-deps diff --git a/tools/Makefile.in b/tools/Makefile.in index 0535d38..dcbf07d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -75,10 +74,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -175,10 +173,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -190,8 +184,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -277,6 +269,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ @@ -334,7 +327,7 @@ udevdir = @udevdir@ # to have nutscan-{usb,snmp}.h built before going into the nut-scanner # sub-directory SUBDIRS = . nut-scanner -EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py nut-recorder.sh gitlog2changelog.py nut-snmpinfo.py +EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh gitlog2changelog.py nut-snmpinfo.py all: all-recursive .SUFFIXES: @@ -714,22 +707,9 @@ nut-scanner-deps: echo "----------------------------------------------------------------------"; \ fi -website: - @if python -c "import json,simplejson,lxml"; then \ - echo "Regenerating the HTML and JSON formated HCL tables."; \ - $(top_srcdir)/tools/nut-hclinfo.py; \ - else \ - echo "----------------------------------------------------------------------"; \ - echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \ - echo "is not available."; \ - echo "Skipping the HTML and JSON formated HCL tables regeneration."; \ - echo "----------------------------------------------------------------------"; \ - fi - # call the USB info script upon "make dist", and if Perl is present # call the SNMP info script upon "make dist", and if Python is present # and call both for building nut-scanner -# also generate HCL data files dist-hook: @if python -c 1; then \ echo "Regenerating the SNMP helper files."; \ @@ -751,17 +731,6 @@ dist-hook: echo "----------------------------------------------------------------------"; \ fi - @if python -c "import json,simplejson,lxml"; then \ - echo "Regenerating the HTML and JSON formated HCL tables."; \ - $(distdir)/nut-hclinfo.py; \ - else \ - echo "----------------------------------------------------------------------"; \ - echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \ - echo "is not available."; \ - echo "Skipping the HTML and JSON formated HCL tables regeneration."; \ - echo "----------------------------------------------------------------------"; \ - fi - .PHONY: nut-scanner-deps nut-scanner-snmp-deps nut-scanner-usb-deps # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/nut-hclinfo.py b/tools/nut-hclinfo.py deleted file mode 100755 index 35b368e..0000000 --- a/tools/nut-hclinfo.py +++ /dev/null @@ -1,277 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# Copyright (c) 2009 - Arnaud Quette -# Copyright (c) 2010 - Sébastien Volle -# -# 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 - -# This script convert the driver.list into HTML and JSON formated tables -# These tables are then used by the AsciiDoc generated website and -# documentation - -try: - import json -except ImportError: - import simplejson as json # Required for Python < 2.6 - -import re -import sys -import os, errno - -# HCL file location and name -rawHCL="../data/driver.list"; - -# Website output -webJsonHCL = "../docs/website/scripts/ups_data.js"; -webStaticHCL = "../docs/ups-html.txt"; - -# from http://wiki.python.org/moin/EscapingHtml - -html_escape_table = { - "&": "&", - '"': """, - "'": "'", - ">": ">", - "<": "<", - } - -def html_escape(text): - """Produce entities within text.""" - return "".join(html_escape_table.get(c,c) for c in text) - -# # # - -class WrongFieldNumberException(Exception): - pass - -def buildData(deviceDataFile): - """ - Read and parse data file under provided path. - Return a bi-dimensional list representing parsed data. - """ - - deviceData = [] - numFields = 6 # Manufacturer, type, support level, model comment, driver - - try: - file = open(deviceDataFile, "r") - except IOError: - print "Cannot open", deviceDataFile - exit(1) - - for line in file: - # Ignore empty lines or comments - if re.match(r"^$|^\s*#", line): - continue - - # Strip all trailing whitespace chars - line = re.sub(r"\s+$", "", line) - - # Replace all tabs by commas - line = re.sub(r"\t", ",", line) - - # Remove trailing comma - line = re.sub(r",$", "", line) - - # Split fields and append result to device data list - # We suppose there are no double-quotes in fields - row = re.findall(r'"([^"]*)",?', line) - - if len(row) != numFields: - print "Warning: Unexpected number of fields in line: %s" % row - print "\tLine will be skipped." - else: - deviceData.append(re.findall(r'"([^"]*)",?', line)) - - return deviceData - -def buildHTMLTable(deviceData): - """ - Convert provided device data into an HTML table. - Return string representation of the HTML table. - - Identical cells are merged vertically with rowspan attribute. - The driver column is color-coded on support level. - - A support level column is also provided. It should be hidden in a graphic - browser but should be visible from a console based browser (w3m). - """ - - from lxml import etree, html - from lxml.builder import E - - if not type(deviceData).__name__ == "list" or len(deviceData) == 0: - raise Exception("Incorrect data was provided") - - # HTML table columns definition - columns = [ - { - "name": "manufacturer", "id": "manufacturer-col", - "text": "Manufacturer", "fields": ["manufacturer"] - }, - { - "name": "model", "id": "model-col", - "text": "Model", "fields": ["model", "comment"] - }, - { - "name": "driver", "id": "driver-col", - "text": "Driver", "fields": ["driver"] - }, - { - "name": "support-level", "id": "support-level-col", - "text": "Support Level", "fields": ["support-level"] - }, - ] - # Device data fields definition - dataFields = [ - "manufacturer", "device-type", "support-level", - "model", "comment", "driver" - ] - - # FIXME: CSS classes should be defined in script global settings - supportLevelClasses = { - "0": "", "1": "red", "2": "orange", - "3": "yellow", "4": "blue", "5": "green" - } - hiddenClass = "hidden" - - # Build table header - table = E.table(id="ups_list", border="1") - header = E.tr() - - for column in columns: - td = E.td(column.get("text"), id=column.get("id")) - if column["id"] == "support-level-col": - td.set("class", hiddenClass) - header.append(td) - - table.append(E.thead(header)) - - # Build table body - tbody = E.tbody(id="ups_list_body") - - cellHistory = [] - rowHistory = deviceData[0][0] - rows = [] - classes = ("even", "odd") - currentClass = 0 - manufIndex = dataFields.index("manufacturer") - - # Build table rows - for device in deviceData: - - # Devices are expected to have a specified number of fields - if len(device) < len(dataFields): - print "Unexpected number of fields in device: %s" % device - print "Device will not be included in result set." - continue - - # Alternate CSS class if current manufacturer is different from the last - if device[manufIndex] != rowHistory : - currentClass = (currentClass + 1) % 2 - rowHistory = device[manufIndex] - - cells = [] - - colIndex = 0 - for column in columns: - cellContent = [] - for field in column["fields"]: - fieldIndex = dataFields.index(field) - fieldContent = device[fieldIndex] - cellContent.append(html_escape(fieldContent)) - cellContent = "
    ".join(cellContent) - - try: - cH = cellHistory[colIndex] - except: - cH = False - - if not column["name"] == "driver" and cH and cH.get("text") == cellContent: - cH["rowspan"] = cH.get("rowspan", 1) + 1 - else: - cell = { "text": cellContent, "rowspan": 1 } - if column["name"] == "driver": - cell["class"] = supportLevelClasses[device[dataFields.index("support-level")]] - else: - cell["class"] = classes[currentClass] - if column["name"] == "support-level": - cell["class"] = hiddenClass - - cells.append(cell) - try: - cellHistory[colIndex] = cell - except: - cellHistory.append(cell) - - colIndex += 1 - - rows.append(cells) - - for row in rows: - r = E.tr() - for cell in row: - attr = "" - innerHTML = "" - for key, value in cell.iteritems(): - val = unicode(str(value), "utf-8") - if key != "text": - attr += " %s='%s'" % (key, val) - else: - innerHTML = val - - r.append(html.fromstring("%s" % (attr, innerHTML))) - - tbody.append(r) - - table.append(tbody) - - return etree.tostring(table, pretty_print=True) - -# main program -deviceData = buildData(rawHCL) - -# Dump device data as JSON -jsonData = "var UPSData = %s" % json.dumps(deviceData, encoding="utf-8") - -# First, check if target directory exists (which is not the case for 'dist') -dir = os.path.dirname(webJsonHCL) -try: - os.makedirs(dir) -except OSError: - pass - -try: - file = open(webJsonHCL, "w") - file.write(jsonData) - file.close() - print "JSON HCL written" -except IOError: - print "Unable to write JSON device data to %s" % webJsonHCL - exit(1) - -# Create HTML table from device data -table = buildHTMLTable(deviceData) -try: - file = open(webStaticHCL, "w") - file.write("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n") - file.write(table) - file.write("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n") - print "HTML HCL written" -except IOError: - print "Unable to write HTML device table to %s" % webStaticHCL - exit(1) - diff --git a/tools/nut-scanner/Makefile.in b/tools/nut-scanner/Makefile.in index 6352714..dedf63c 100644 --- a/tools/nut-scanner/Makefile.in +++ b/tools/nut-scanner/Makefile.in @@ -77,7 +77,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libhal.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ @@ -87,10 +86,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_config_libhal.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -221,10 +219,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ -HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@ -HAL_FDI_PATH = @HAL_FDI_PATH@ -HAL_USER = @HAL_USER@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -236,8 +230,6 @@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ -LIBHAL_LIBS = @LIBHAL_LIBS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ @@ -323,6 +315,7 @@ builddir = @builddir@ cgiexecdir = @cgiexecdir@ datadir = @datadir@ datarootdir = @datarootdir@ +devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ dvidir = @dvidir@ diff --git a/tools/nut-scanner/nutscan-snmp.h b/tools/nut-scanner/nutscan-snmp.h index 886916a..c66aa96 100644 --- a/tools/nut-scanner/nutscan-snmp.h +++ b/tools/nut-scanner/nutscan-snmp.h @@ -39,6 +39,7 @@ static snmp_device_id_t snmp_device_table[] = { { ".1.3.6.1.4.1.20677.1" , "pulizzi_switched2", ".1.3.6.1.4.1.20677.2"}, { ".1.3.6.1.4.1.2947.1.1.2.0" , "bestpower", NULL}, { ".1.3.6.1.4.1.3808.1.1.1.1.1.1.0" , "cyberpower", ".1.3.6.1.4.1.3808"}, + { "" , "xppc", ".1.3.6.1.4.1.935"}, { "" , "delta_ups", ".1.3.6.1.4.1.2254.2.4"}, { ".1.3.6.1.4.1.705.1.1.1.0" , "mge", ".1.3.6.1.4.1.705.1"}, { ".1.3.6.1.4.1.232.165.3.1.1.0" , "cpqpower", ".1.3.6.1.4.1.232.165.3"}, diff --git a/tools/nut-scanner/nutscan-usb.h b/tools/nut-scanner/nutscan-usb.h index d8085d8..c31466f 100644 --- a/tools/nut-scanner/nutscan-usb.h +++ b/tools/nut-scanner/nutscan-usb.h @@ -31,7 +31,7 @@ typedef struct { /* USB IDs device table */ static usb_device_id_t usb_device_table[] = { - { 0x0001, 0x0000, "blazer_usb" }, + { 0x0001, 0x0000, "nutdrv_atcl_usb" }, { 0x03f0, 0x0001, "usbhid-ups" }, { 0x03f0, 0x1f01, "bcmxcp_usb" }, { 0x03f0, 0x1f02, "bcmxcp_usb" }, @@ -119,6 +119,7 @@ static usb_device_id_t usb_device_table[] = { { 0x0d9f, 0x00a6, "usbhid-ups" }, { 0x0f03, 0x0001, "blazer_usb" }, { 0x10af, 0x0001, "usbhid-ups" }, + { 0x10af, 0x0004, "usbhid-ups" }, { 0x14f0, 0x00c9, "blazer_usb" }, { 0xffff, 0x0000, "blazer_usb" }, /* Terminating entry */ diff --git a/tools/nut-usbinfo.pl b/tools/nut-usbinfo.pl index 5e3592e..989cef2 100755 --- a/tools/nut-usbinfo.pl +++ b/tools/nut-usbinfo.pl @@ -1,8 +1,8 @@ #!/usr/bin/env perl -# Current Version : 1.2 -# Copyright (C) 2008 - 2012 -# Arnaud Quette -# dloic (loic.dardant AT gmail DOT com) +# Current Version : 1.3 +# Copyright (C) 2008 - 2012 dloic (loic.dardant AT gmail DOT com) +# Copyright (C) 2008 - 2014 Arnaud Quette +# Copyright (C) 2013 - 2014 Charles Lepple # # Based on the usbdevice.pl script, made for the Ubuntu Media Center # for the final use of the LIRC project. @@ -31,17 +31,18 @@ use strict; # path to scan for USB_DEVICE pattern my $scanPath="../drivers"; -# HAL output file -my $outputHAL="../scripts/hal/ups-nut-device.fdi.in"; - # Hotplug output file my $outputHotplug="../scripts/hotplug/libhid.usermap"; # udev output file my $outputUdev="../scripts/udev/nut-usbups.rules.in"; +# BSD devd output file +my $output_devd="../scripts/devd/nut-usb.conf.in"; + # UPower output file my $outputUPower="../scripts/upower/95-upower-hid.rules"; + # tmp output, to allow generating the ENV{UPOWER_VENDOR} header list my $tmpOutputUPower; # mfr header flag @@ -81,13 +82,6 @@ find(\&find_usbdevs,$scanPath); ################# SUB METHOD ################# sub gen_usb_files { - # HAL file header - open my $outHAL, ">$outputHAL" || die "error $outputHAL : $!"; - print $outHAL ' '."\n"; - print $outHAL ''."\n"; - print $outHAL ' '."\n"; - print $outHAL ' '."\n"; - # Hotplug file header open my $outHotplug, ">$outputHotplug" || die "error $outputHotplug : $!"; print $outHotplug '# This file is generated and installed by the Network UPS Tools package.'."\n"; @@ -109,6 +103,10 @@ sub gen_usb_files print $outUdev 'SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"'."\n\n"; print $outUdev 'LABEL="nut-usbups_rules_real"'."\n"; + open my $out_devd, ">$output_devd" || die "error $output_devd : $!"; + print $out_devd '# This file is generated and installed by the Network UPS Tools package.'."\n"; + print $out_devd "# Homepage: http://www.networkupstools.org/\n\n"; + # UPower file header open my $outputUPower, ">$outputUPower" || die "error $outputUPower : $!"; print $outputUPower '##############################################################################################################'."\n"; @@ -131,12 +129,6 @@ sub gen_usb_files # generate the file in alphabetical order (first for VendorID, then for ProductID) foreach my $vendorId (sort { lc $a cmp lc $b } keys %vendorName) { - # HAL vendor header - if ($vendorName{$vendorId}) { - print $outHAL "\n \n"; - } - print $outHAL " \n"; - # Hotplug vendor header if ($vendorName{$vendorId}) { print $outHotplug "\n# ".$vendorName{$vendorId}."\n"; @@ -147,20 +139,17 @@ sub gen_usb_files print $outUdev "\n# ".$vendorName{$vendorId}."\n"; } + # devd vendor header + if ($vendorName{$vendorId}) { + print $out_devd "\n# ".$vendorName{$vendorId}."\n"; + } + + # UPower vendor header flag $upowerMfrHeaderDone = 0; foreach my $productId (sort { lc $a cmp lc $b } keys %{$vendor{$vendorId}}) { - # HAL device entry - print $outHAL " \n"; - print $outHAL " \n"; - print $outHAL ' battery'."\n"; - print $outHAL ' battery'."\n"; - print $outHAL " hald-addon-".$vendor{$vendorId}{$productId}{"driver"}."\n"; - print $outHAL ' ups'."\n"; - print $outHAL ' '."\n"; - # Hotplug device entry print $outHotplug "# ".$vendor{$vendorId}{$productId}{"comment"}."\n"; print $outHotplug "libhidups 0x0003 ".$vendorId." ".$productId." 0x0000 0x0000 0x00"; @@ -172,6 +161,17 @@ sub gen_usb_files print $outUdev "\", ATTR{idProduct}==\"".removeHexPrefix($productId)."\","; print $outUdev ' MODE="664", GROUP="@RUN_AS_GROUP@"'."\n"; + # devd device entry + print $out_devd "# ".$vendor{$vendorId}{$productId}{"comment"}.' - '.$vendor{$vendorId}{$productId}{"driver"}."\n"; + print $out_devd "notify 100 {\n\tmatch \"system\"\t\t\"USB\";\n"; + print $out_devd "\tmatch \"subsystem\"\t\"DEVICE\";\n"; + print $out_devd "\tmatch \"type\"\t\t\"ATTACH\";\n"; + print $out_devd "\tmatch \"vendor\"\t\t\"$vendorId\";\n"; + # + print $out_devd "\tmatch \"product\"\t\t\"$productId\";\n"; + print $out_devd "\taction \"chgrp \@RUN_AS_GROUP\@ /dev/\$device-name*; chmod g+rw /dev/\$device-name*\";\n"; + print $out_devd "};\n"; + # UPower device entry (only for USB/HID devices!) if ($vendor{$vendorId}{$productId}{"driver"} eq "usbhid-ups") { @@ -192,14 +192,7 @@ sub gen_usb_files # Device scanner entry print $outputDevScanner "\t{ ".$vendorId.', '.$productId.", \"".$vendor{$vendorId}{$productId}{"driver"}."\" },\n"; } - # HAL vendor footer - print $outHAL " \n"; } - # HAL footer - print $outHAL " \n"; - print $outHAL " \n"; - print $outHAL "\n"; - # Udev footer print $outUdev "\n".'LABEL="nut-usbups_rules_end"'."\n"; @@ -297,6 +290,9 @@ sub find_usbdevs elsif ($nameFile eq "richcomm_usb.c") { $driver="richcomm_usb"; } + elsif ($nameFile eq "nutdrv_atcl_usb.c") { + $driver="nutdrv_atcl_usb"; + } elsif ($nameFile eq "riello_usb.c") { $driver="riello_usb"; } From d0947d03cc8543ff8bef0ee1a5f155ea41b52854 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 22 Apr 2014 20:43:14 +0200 Subject: [PATCH 156/300] New upstream release * New upstream release - Fix the undefined references (Closes: #731156) --- debian/changelog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 85d0316..fa0a536 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,14 @@ -nut (2.7.1-2) UNRELEASED; urgency=low +nut (2.7.2-1) UNRELEASED; urgency=low + * New upstream release + - Fix the undefined references (Closes: #731156) * debian/rules, debian/control, d/p/0004-fix-systemd-service.patch: Use a symlink instead of an Alias= to mask the SysV initscript * debian/control: Bump Standards-Version to 3.9.5 (no further changes) * debian/tests/control: Add lsb-release and netcat to the dependencies (Closes: #733189) - -- Laurent Bigonville Sun, 29 Dec 2013 16:35:33 +0100 + -- Laurent Bigonville Tue, 22 Apr 2014 20:42:08 +0200 nut (2.7.1-1) unstable; urgency=low From a766575eca0f0f082a343af725fe1e1b478577b2 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 24 Nov 2013 18:20:21 +0100 Subject: [PATCH 157/300] debian/control, debian/rules: Call dh-autoreconf and pass LDFLAGS to minimize runtime dependencies --- debian/changelog | 2 ++ debian/control | 1 + debian/rules | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index fa0a536..4c88058 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ nut (2.7.2-1) UNRELEASED; urgency=low * debian/control: Bump Standards-Version to 3.9.5 (no further changes) * debian/tests/control: Add lsb-release and netcat to the dependencies (Closes: #733189) + * debian/control, debian/rules: Call dh-autoreconf and pass LDFLAGS to + minimize runtime dependencies -- Laurent Bigonville Tue, 22 Apr 2014 20:42:08 +0200 diff --git a/debian/control b/debian/control index 3e32d44..b821640 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Uploaders: Laurent Bigonville Build-Depends: debhelper (>= 8.1.3), cdbs (>= 0.4.122~), autotools-dev, + dh-autoreconf, dh-systemd (>= 1.14), libgd-dev | libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, diff --git a/debian/rules b/debian/rules index 570cf28..4e13232 100755 --- a/debian/rules +++ b/debian/rules @@ -4,12 +4,20 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/class/python-module.mk +include /usr/share/cdbs/1/rules/autoreconf.mk +# We cannot call autoreconf -f -i as it updates INSTALL which is used for doc +# generation +DEB_DH_AUTORECONF_ARGS = --as-needed + DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) # List any files which are not installed include /usr/share/cdbs/1/rules/utils.mk common-binary-post-install-arch:: list-missing +DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,-O1 -Wl,--as-needed +include /usr/share/dpkg/buildflags.mk + DEB_CONFIGURE_PREFIX := DEB_CONFIGURE_SYSCONFDIR := /etc/nut DEB_CONFIGURE_INCLUDEDIR := /usr/include From c94a1d80c66ce7e839e79c81cacb7fee402a704e Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 22 Apr 2014 20:55:43 +0200 Subject: [PATCH 158/300] debian/patches/0004-fix-systemd-service.patch: Refreshed --- debian/changelog | 3 ++- debian/patches/0004-fix-systemd-service.patch | 14 +------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4c88058..b8b9430 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ nut (2.7.2-1) UNRELEASED; urgency=low * New upstream release - Fix the undefined references (Closes: #731156) + - debian/patches/0004-fix-systemd-service.patch: Refreshed * debian/rules, debian/control, d/p/0004-fix-systemd-service.patch: Use a symlink instead of an Alias= to mask the SysV initscript * debian/control: Bump Standards-Version to 3.9.5 (no further changes) @@ -10,7 +11,7 @@ nut (2.7.2-1) UNRELEASED; urgency=low * debian/control, debian/rules: Call dh-autoreconf and pass LDFLAGS to minimize runtime dependencies - -- Laurent Bigonville Tue, 22 Apr 2014 20:42:08 +0200 + -- Laurent Bigonville Tue, 22 Apr 2014 20:55:27 +0200 nut (2.7.1-1) unstable; urgency=low diff --git a/debian/patches/0004-fix-systemd-service.patch b/debian/patches/0004-fix-systemd-service.patch index b6dff75..16df1c7 100644 --- a/debian/patches/0004-fix-systemd-service.patch +++ b/debian/patches/0004-fix-systemd-service.patch @@ -4,7 +4,7 @@ Forwarded: not-needed --- a/scripts/systemd/nut-driver.service.in +++ b/scripts/systemd/nut-driver.service.in -@@ -1,10 +1,11 @@ +@@ -1,6 +1,7 @@ [Unit] Description=Network UPS Tools - power device driver controller -After=local-fs.target network.target @@ -13,15 +13,3 @@ Forwarded: not-needed StopWhenUnneeded=yes [Service] --ExecStart=@DRVPATH@/upsdrvctl start --ExecStop=@DRVPATH@/upsdrvctl stop -+ExecStart=@SBINDIR@/upsdrvctl start -+ExecStop=@SBINDIR@/upsdrvctl stop - Type=forking - ---- a/scripts/systemd/nutshutdown.in -+++ b/scripts/systemd/nutshutdown.in -@@ -1,2 +1,2 @@ - #!/bin/sh --@SBINDIR@/upsmon -K >/dev/null 2>&1 && @driverexecdir@/upsdrvctl shutdown -+@SBINDIR@/upsmon -K >/dev/null 2>&1 && @SBINDIR@/upsdrvctl shutdown From 6621b7de39f8b34545f9ee65d92e4c56c7d7a9f6 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 22 Apr 2014 20:57:00 +0200 Subject: [PATCH 159/300] Drop d/p/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch: Merged upstream --- debian/changelog | 4 +- ...ry-options-for-upsdrvctl-and-drivers.patch | 133 ------------------ debian/patches/series | 1 - 3 files changed, 3 insertions(+), 135 deletions(-) delete mode 100644 debian/patches/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch diff --git a/debian/changelog b/debian/changelog index b8b9430..5245d7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ nut (2.7.2-1) UNRELEASED; urgency=low * New upstream release - Fix the undefined references (Closes: #731156) - debian/patches/0004-fix-systemd-service.patch: Refreshed + - Drop d/p/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch: + Merged upstream * debian/rules, debian/control, d/p/0004-fix-systemd-service.patch: Use a symlink instead of an Alias= to mask the SysV initscript * debian/control: Bump Standards-Version to 3.9.5 (no further changes) @@ -11,7 +13,7 @@ nut (2.7.2-1) UNRELEASED; urgency=low * debian/control, debian/rules: Call dh-autoreconf and pass LDFLAGS to minimize runtime dependencies - -- Laurent Bigonville Tue, 22 Apr 2014 20:55:27 +0200 + -- Laurent Bigonville Tue, 22 Apr 2014 20:56:12 +0200 nut (2.7.1-1) unstable; urgency=low diff --git a/debian/patches/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch b/debian/patches/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch deleted file mode 100644 index ee3cb8f..0000000 --- a/debian/patches/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch +++ /dev/null @@ -1,133 +0,0 @@ -From ad1e78a22dc91b70bee871425cd5f74bb3c34c9f Mon Sep 17 00:00:00 2001 -From: Laurent Bigonville -Date: Thu, 21 Nov 2013 17:52:16 +0100 -Subject: [PATCH] Provide retry options for upsdrvctl and driver(s) - -As recently seen in Debian (bugs #694717 and #677143), it may be required to -have upsdrvctl retrying to start the driver in case of failure. More -specifically, a mix of init system (V and systemd), udev and USB device(s) can -result in the /dev entry not being available at driver startup, thus resulting -in a general failure to start NUT. This commit provides at least a way to -overcome this issue. A more suitable solution will require more work on NUT -design. - -This patch if based on Arnaud Quette proposal ---- - docs/man/ups.conf.txt | 15 +++++++++++++++ - docs/man/upsdrvctl.txt | 3 ++- - drivers/upsdrvctl.c | 37 ++++++++++++++++++++++++++++++++++--- - 3 files changed, 51 insertions(+), 4 deletions(-) - -diff --git a/docs/man/ups.conf.txt b/docs/man/ups.conf.txt -index 8a72a83..4877852 100644 ---- a/docs/man/ups.conf.txt -+++ b/docs/man/ups.conf.txt -@@ -58,6 +58,21 @@ directory, which is often /usr/local/ups/bin. - Optional. Same as the UPS field of the same name, but this is the - default for UPSes that don't have the field. - -+*maxretry*:: -+Optional. Specify the number of attempts to start the driver(s), in case of -+failure, before giving up. A delay of 'retrydelay' is inserted between each -+attempt. Caution should be taken when using this option, since it can -+impact the time taken by your system to start. -++ -+The default is 1 attempt. -+ -+*retrydelay*:: -+Optional. Specify the delay between each restart attempt of the driver(s), -+as specified by 'maxretry'. Caution should be taken when using this option, -+since it can impact the time taken by your system to start. -++ -+The default is 5 seconds. -+ - *pollinterval*:: - - Optional. The status of the UPS will be refreshed after a maximum -diff --git a/docs/man/upsdrvctl.txt b/docs/man/upsdrvctl.txt -index f19fd77..52e5509 100644 ---- a/docs/man/upsdrvctl.txt -+++ b/docs/man/upsdrvctl.txt -@@ -63,7 +63,8 @@ Without that argument, they operate on every UPS that is currently - configured. - - *start*:: --Start the UPS driver(s). -+Start the UPS driver(s). In case of failure, further attempts may be executed -+by using the 'maxretry' and 'retrydelay' options - see linkman:ups.conf[5]. - - *stop*:: - Stop the UPS driver(s). -diff --git a/drivers/upsdrvctl.c b/drivers/upsdrvctl.c -index 623f753..0cdaa2c 100644 ---- a/drivers/upsdrvctl.c -+++ b/drivers/upsdrvctl.c -@@ -45,6 +45,12 @@ - /* timer - keeps us from getting stuck if a driver hangs */ - static int maxstartdelay = 45; - -+ /* counter - retry that many time(s) to start the driver if it fails to */ -+static int maxretry = 1; -+ -+ /* timer - delay between each restart attempt of the driver(s) */ -+static int retrydelay = 5; -+ - /* Directory where driver executables live */ - static char *driverpath = NULL; - -@@ -65,6 +71,12 @@ void do_upsconf_args(char *upsname, char *var, char *val) - driverpath = xstrdup(val); - } - -+ if (!strcmp(var, "maxretry")) -+ maxretry = atoi(val); -+ -+ if (!strcmp(var, "retrydelay")) -+ retrydelay = atoi(val); -+ - /* ignore anything else - it's probably for main */ - - return; -@@ -248,6 +260,7 @@ static void start_driver(const ups_t *ups) - char *argv[8]; - char dfn[SMALLBUF]; - int ret, arg = 0; -+ int initial_exec_error = exec_error, drv_maxretry = maxretry; - struct stat fs; - - upsdebugx(1, "Starting UPS: %s", ups->upsname); -@@ -276,10 +289,28 @@ static void start_driver(const ups_t *ups) - /* tie it off */ - argv[arg++] = NULL; - -- debugcmdline(2, "exec: ", argv); - -- if (!testmode) { -- forkexec(argv, ups); -+ while (drv_maxretry > 0) { -+ int cur_exec_error = exec_error; -+ -+ upsdebugx(2, "%i remaining attempts", drv_maxretry); -+ debugcmdline(2, "exec: ", argv); -+ drv_maxretry--; -+ -+ if (!testmode) { -+ forkexec(argv, ups); -+ } -+ -+ /* driver command succeeded */ -+ if (cur_exec_error == exec_error) { -+ drv_maxretry = 0; -+ exec_error = initial_exec_error; -+ } -+ else { -+ /* otherwise, retry if still needed */ -+ if (drv_maxretry > 0) -+ sleep (retrydelay); -+ } - } - } - --- -1.8.4 - diff --git a/debian/patches/series b/debian/patches/series index 45dbe55..09a762e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,5 @@ 0003-install-dev-files-in-usr.patch 0002-nut-monitor-paths.patch 0004-fix-systemd-service.patch -0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch 0006-ups-conf-maxretry.patch 0007-killpower-path.patch From d551399f973b8a7d6c5eb5d3b12cddf6aa5b2aef Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 22 Apr 2014 21:16:19 +0200 Subject: [PATCH 160/300] debian/nut-server.install: Upstream is now installing upsdrvctl /sbin --- debian/changelog | 3 ++- debian/nut-server.install | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5245d7d..1094015 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ nut (2.7.2-1) UNRELEASED; urgency=low - debian/patches/0004-fix-systemd-service.patch: Refreshed - Drop d/p/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch: Merged upstream + - debian/nut-server.install: Upstream is now installing upsdrvctl /sbin * debian/rules, debian/control, d/p/0004-fix-systemd-service.patch: Use a symlink instead of an Alias= to mask the SysV initscript * debian/control: Bump Standards-Version to 3.9.5 (no further changes) @@ -13,7 +14,7 @@ nut (2.7.2-1) UNRELEASED; urgency=low * debian/control, debian/rules: Call dh-autoreconf and pass LDFLAGS to minimize runtime dependencies - -- Laurent Bigonville Tue, 22 Apr 2014 20:56:12 +0200 + -- Laurent Bigonville Tue, 22 Apr 2014 21:15:52 +0200 nut (2.7.1-1) unstable; urgency=low diff --git a/debian/nut-server.install b/debian/nut-server.install index 1a61309..e515b0f 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -1,4 +1,5 @@ debian/tmp/sbin/upsd +debian/tmp/sbin/upsdrvctl debian/tmp/usr/share/nut/cmdvartab debian/tmp/usr/share/nut/driver.list debian/tmp/*/udev/rules.d/52-nut-usbups.rules @@ -44,7 +45,6 @@ debian/tmp/lib/nut/bcmxcp_usb debian/tmp/lib/nut/victronups debian/tmp/lib/nut/tripplitesu debian/tmp/lib/nut/optiups -debian/tmp/lib/nut/upsdrvctl /sbin debian/tmp/lib/nut/everups debian/tmp/lib/nut/dummy-ups debian/tmp/lib/nut/richcomm_usb From 8bd57e3e0131fd25c611792380f1087b1ef4ed03 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 22 Apr 2014 21:25:56 +0200 Subject: [PATCH 161/300] Rename package libupsclient3 to libupsclient4, soname got bumped again --- debian/changelog | 3 +- debian/control | 4 +- debian/libupsclient3.symbols | 27 ------- ...sclient3.install => libupsclient4.install} | 0 debian/libupsclient4.symbols | 78 +++++++++++++++++++ debian/rules | 2 +- 6 files changed, 83 insertions(+), 31 deletions(-) delete mode 100644 debian/libupsclient3.symbols rename debian/{libupsclient3.install => libupsclient4.install} (100%) create mode 100644 debian/libupsclient4.symbols diff --git a/debian/changelog b/debian/changelog index 1094015..1a67944 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ nut (2.7.2-1) UNRELEASED; urgency=low - Drop d/p/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch: Merged upstream - debian/nut-server.install: Upstream is now installing upsdrvctl /sbin + - Rename package libupsclient3 to libupsclient4, soname got bumped again * debian/rules, debian/control, d/p/0004-fix-systemd-service.patch: Use a symlink instead of an Alias= to mask the SysV initscript * debian/control: Bump Standards-Version to 3.9.5 (no further changes) @@ -14,7 +15,7 @@ nut (2.7.2-1) UNRELEASED; urgency=low * debian/control, debian/rules: Call dh-autoreconf and pass LDFLAGS to minimize runtime dependencies - -- Laurent Bigonville Tue, 22 Apr 2014 21:15:52 +0200 + -- Laurent Bigonville Tue, 22 Apr 2014 21:25:23 +0200 nut (2.7.1-1) unstable; urgency=low diff --git a/debian/control b/debian/control index b821640..11e4876 100644 --- a/debian/control +++ b/debian/control @@ -165,7 +165,7 @@ Description: network UPS tools - documentation . This package contains FAQ, user, developer and packager documentation. -Package: libupsclient3 +Package: libupsclient4 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -183,7 +183,7 @@ Description: network UPS tools - client library Package: libupsclient-dev Section: libdevel Architecture: any -Depends: libupsclient3 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Depends: libupsclient4 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Conflicts: libupsclient1-dev Replaces: libupsclient1-dev Description: network UPS tools - development files diff --git a/debian/libupsclient3.symbols b/debian/libupsclient3.symbols deleted file mode 100644 index 4fc0a9f..0000000 --- a/debian/libupsclient3.symbols +++ /dev/null @@ -1,27 +0,0 @@ -libupsclient.so.3 libupsclient3 #MINVER# - pconf_char@Base 2.7.1 - pconf_encode@Base 2.7.1 - pconf_file_begin@Base 2.7.1 - pconf_file_next@Base 2.7.1 - pconf_finish@Base 2.7.1 - pconf_init@Base 2.7.1 - pconf_line@Base 2.7.1 - pconf_parse_error@Base 2.7.1 - upscli_add_host_cert@Base 2.7.1 - upscli_cleanup@Base 2.7.1 - upscli_connect@Base 2.7.1 - upscli_disconnect@Base 2.7.1 - upscli_errlist@Base 2.7.1 - upscli_fd@Base 2.7.1 - upscli_get@Base 2.7.1 - upscli_init@Base 2.7.1 - upscli_list_next@Base 2.7.1 - upscli_list_start@Base 2.7.1 - upscli_readline@Base 2.7.1 - upscli_sendline@Base 2.7.1 - upscli_splitaddr@Base 2.7.1 - upscli_splitname@Base 2.7.1 - upscli_ssl@Base 2.7.1 - upscli_strerror@Base 2.7.1 - upscli_upserror@Base 2.7.1 - upscli_tryconnect@Base 2.7.1 diff --git a/debian/libupsclient3.install b/debian/libupsclient4.install similarity index 100% rename from debian/libupsclient3.install rename to debian/libupsclient4.install diff --git a/debian/libupsclient4.symbols b/debian/libupsclient4.symbols new file mode 100644 index 0000000..c72efc4 --- /dev/null +++ b/debian/libupsclient4.symbols @@ -0,0 +1,78 @@ +libupsclient.so.4 libupsclient4 #MINVER# + UPS_VERSION@Base 2.7.2 + altpidpath@Base 2.7.2 + background@Base 2.7.2 + become_user@Base 2.7.2 + chroot_start@Base 2.7.2 + confpath@Base 2.7.2 + dflt_statepath@Base 2.7.2 + fatal_with_errno@Base 2.7.2 + fatalx@Base 2.7.2 + get_user_pwent@Base 2.7.2 + ltrim@Base 2.7.2 + nut_debug_level@Base 2.7.2 + nut_log_level@Base 2.7.2 + open_syslog@Base 2.7.2 + pconf_char@Base 2.7.2 + pconf_encode@Base 2.7.2 + pconf_file_begin@Base 2.7.2 + pconf_file_next@Base 2.7.2 + pconf_finish@Base 2.7.2 + pconf_init@Base 2.7.2 + pconf_line@Base 2.7.2 + pconf_parse_error@Base 2.7.2 + rtrim@Base 2.7.2 + select_read@Base 2.7.2 + select_write@Base 2.7.2 + sendsignal@Base 2.7.2 + sendsignalfn@Base 2.7.2 + snprintfcat@Base 2.7.2 + state_addcmd@Base 2.7.2 + state_addenum@Base 2.7.2 + state_addrange@Base 2.7.2 + state_cmdfree@Base 2.7.2 + state_delcmd@Base 2.7.2 + state_delenum@Base 2.7.2 + state_delinfo@Base 2.7.2 + state_delrange@Base 2.7.2 + state_getaux@Base 2.7.2 + state_getenumlist@Base 2.7.2 + state_getflags@Base 2.7.2 + state_getinfo@Base 2.7.2 + state_getrangelist@Base 2.7.2 + state_infofree@Base 2.7.2 + state_setaux@Base 2.7.2 + state_setflags@Base 2.7.2 + state_setinfo@Base 2.7.2 + state_tree_find@Base 2.7.2 + syslogbit_set@Base 2.7.2 + upscli_add_host_cert@Base 2.7.2 + upscli_cleanup@Base 2.7.2 + upscli_connect@Base 2.7.2 + upscli_disconnect@Base 2.7.2 + upscli_errlist@Base 2.7.2 + upscli_fd@Base 2.7.2 + upscli_get@Base 2.7.2 + upscli_init@Base 2.7.2 + upscli_list_next@Base 2.7.2 + upscli_list_start@Base 2.7.2 + upscli_readline@Base 2.7.2 + upscli_sendline@Base 2.7.2 + upscli_splitaddr@Base 2.7.2 + upscli_splitname@Base 2.7.2 + upscli_ssl@Base 2.7.2 + upscli_strerror@Base 2.7.2 + upscli_tryconnect@Base 2.7.2 + upscli_upserror@Base 2.7.2 + upsdebug_ascii@Base 2.7.2 + upsdebug_hex@Base 2.7.2 + upsdebug_with_errno@Base 2.7.2 + upsdebugx@Base 2.7.2 + upslog_with_errno@Base 2.7.2 + upslogx@Base 2.7.2 + writepid@Base 2.7.2 + xbasename@Base 2.7.2 + xcalloc@Base 2.7.2 + xmalloc@Base 2.7.2 + xrealloc@Base 2.7.2 + xstrdup@Base 2.7.2 diff --git a/debian/rules b/debian/rules index 4e13232..b169acd 100755 --- a/debian/rules +++ b/debian/rules @@ -74,7 +74,7 @@ common-install-arch:: mv $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libupsclient.a \ $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.a rm -f $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so - ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.3 \ + ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.4 \ $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so # Install systemd files only on systems where it's supported From f26715942d235bdbbdfb1929ee038d47a2a436aa Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 22 Apr 2014 21:46:02 +0200 Subject: [PATCH 162/300] debian/patches/0008-drop-w3c-icons.patch: Remove the link to external W3C icons to prevent privacy breach (privacy-breach-w3c-valid-html) --- debian/changelog | 4 +++- debian/patches/0008-drop-w3c-icons.patch | 26 ++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0008-drop-w3c-icons.patch diff --git a/debian/changelog b/debian/changelog index 1a67944..7184137 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,8 +14,10 @@ nut (2.7.2-1) UNRELEASED; urgency=low (Closes: #733189) * debian/control, debian/rules: Call dh-autoreconf and pass LDFLAGS to minimize runtime dependencies + * debian/patches/0008-drop-w3c-icons.patch: Remove the link to external W3C + icons to prevent privacy breach (privacy-breach-w3c-valid-html) - -- Laurent Bigonville Tue, 22 Apr 2014 21:25:23 +0200 + -- Laurent Bigonville Tue, 22 Apr 2014 21:44:35 +0200 nut (2.7.1-1) unstable; urgency=low diff --git a/debian/patches/0008-drop-w3c-icons.patch b/debian/patches/0008-drop-w3c-icons.patch new file mode 100644 index 0000000..ac05a34 --- /dev/null +++ b/debian/patches/0008-drop-w3c-icons.patch @@ -0,0 +1,26 @@ +--- a/conf/upsstats.html.sample ++++ b/conf/upsstats.html.sample +@@ -180,11 +180,4 @@ Network UPS Tools upsstats + + + +-
    +-Valid CSS! +- +-
    +- + +--- a/conf/upsstats-single.html.sample ++++ b/conf/upsstats-single.html.sample +@@ -286,9 +286,6 @@ + + + +-Valid HTML 4.0 Transitional + + + diff --git a/debian/patches/series b/debian/patches/series index 09a762e..5046408 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ 0004-fix-systemd-service.patch 0006-ups-conf-maxretry.patch 0007-killpower-path.patch +0008-drop-w3c-icons.patch From 1e664224b23d5bf959141eb85cd5ad4c3941704f Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 22 Apr 2014 22:14:57 +0200 Subject: [PATCH 163/300] debian/nut-server.install, debian/nut-server.manpages: Install new nutdrv_atcl_usb driver --- debian/changelog | 4 +++- debian/nut-server.install | 1 + debian/nut-server.manpages | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7184137..f3f767b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,10 @@ nut (2.7.2-1) UNRELEASED; urgency=low minimize runtime dependencies * debian/patches/0008-drop-w3c-icons.patch: Remove the link to external W3C icons to prevent privacy breach (privacy-breach-w3c-valid-html) + * debian/nut-server.install, debian/nut-server.manpages: Install new + nutdrv_atcl_usb driver - -- Laurent Bigonville Tue, 22 Apr 2014 21:44:35 +0200 + -- Laurent Bigonville Tue, 22 Apr 2014 22:14:11 +0200 nut (2.7.1-1) unstable; urgency=low diff --git a/debian/nut-server.install b/debian/nut-server.install index e515b0f..8b67a85 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -52,6 +52,7 @@ debian/tmp/lib/nut/liebert-esp2 debian/tmp/lib/nut/microdowell debian/tmp/lib/nut/al175 debian/tmp/lib/nut/apcupsd-ups +debian/tmp/lib/nut/nutdrv_atcl_usb debian/tmp/lib/nut/nutdrv_qx debian/tmp/lib/nut/riello_ser debian/tmp/lib/nut/riello_usb diff --git a/debian/nut-server.manpages b/debian/nut-server.manpages index 44de902..d5cf07e 100644 --- a/debian/nut-server.manpages +++ b/debian/nut-server.manpages @@ -47,6 +47,7 @@ debian/tmp/usr/share/man/man8/al175.8 debian/tmp/usr/share/man/man8/apcupsd-ups.8 debian/tmp/usr/share/man/man8/blazer_ser.8 debian/tmp/usr/share/man/man8/blazer_usb.8 +debian/tmp/usr/share/man/man8/nutdrv_atcl_usb.8 debian/tmp/usr/share/man/man8/nutdrv_qx.8 debian/tmp/usr/share/man/man8/riello_ser.8 debian/tmp/usr/share/man/man8/riello_usb.8 From d504d6110114d00726a7bc9d3025bee81209c428 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 22 Apr 2014 22:46:17 +0200 Subject: [PATCH 164/300] Release to unstable --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f3f767b..e940af1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.7.2-1) UNRELEASED; urgency=low +nut (2.7.2-1) unstable; urgency=low * New upstream release - Fix the undefined references (Closes: #731156) @@ -19,7 +19,7 @@ nut (2.7.2-1) UNRELEASED; urgency=low * debian/nut-server.install, debian/nut-server.manpages: Install new nutdrv_atcl_usb driver - -- Laurent Bigonville Tue, 22 Apr 2014 22:14:11 +0200 + -- Laurent Bigonville Tue, 22 Apr 2014 22:46:12 +0200 nut (2.7.1-1) unstable; urgency=low From 165791ea2ad25a48267b89079e4c3dde5923b854 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Mon, 20 Oct 2014 20:06:06 +0200 Subject: [PATCH 165/300] New packages: libnutclient0 and libnutclient-dev --- debian/changelog | 10 ++ debian/control | 28 ++++ debian/libnutclient-dev.install | 4 + debian/libnutclient-dev.manpages | 34 +++++ debian/libnutclient0.install | 1 + debian/libnutclient0.symbols | 234 +++++++++++++++++++++++++++++++ debian/rules | 5 + 7 files changed, 316 insertions(+) create mode 100644 debian/libnutclient-dev.install create mode 100644 debian/libnutclient-dev.manpages create mode 100644 debian/libnutclient0.install create mode 100644 debian/libnutclient0.symbols diff --git a/debian/changelog b/debian/changelog index e940af1..687fd78 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +nut (2.7.2-2) UNRELEASED; urgency=low + + * debian/control: add new packages libnutclient0 and libnutclient-dev + * debian/rules: adapted for the new packages + * debian/libnutclient0.install, debian/libnutclient0.symbols, + debian/libnutclient-dev.install, debian/libnutclient-dev.manpages: + created for the new packages + + -- Arnaud Quette Mon, 20 Oct 2014 20:41:47 +0200 + nut (2.7.2-1) unstable; urgency=low * New upstream release diff --git a/debian/control b/debian/control index 11e4876..e6a2fbe 100644 --- a/debian/control +++ b/debian/control @@ -195,6 +195,34 @@ Description: network UPS tools - development files . This package provides the development files. +Package: libnutclient0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Description: network UPS tools - new client library + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the new shared client library. + +Package: libnutclient-dev +Section: libdevel +Architecture: any +Depends: libnutclient0 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: network UPS tools - development files + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the development files for the new client library. + Package: python-nut Section: python Architecture: all diff --git a/debian/libnutclient-dev.install b/debian/libnutclient-dev.install new file mode 100644 index 0000000..8d84fd6 --- /dev/null +++ b/debian/libnutclient-dev.install @@ -0,0 +1,4 @@ +usr/lib/*/libnutclient.so +usr/lib/*/libnutclient.a +usr/lib/*/pkgconfig/libnutclient.pc +usr/include/nutclient.h diff --git a/debian/libnutclient-dev.manpages b/debian/libnutclient-dev.manpages new file mode 100644 index 0000000..7ac2971 --- /dev/null +++ b/debian/libnutclient-dev.manpages @@ -0,0 +1,34 @@ +debian/tmp/usr/share/man/man3/libnutclient.3 +debian/tmp/usr/share/man/man3/libnutclient_commands.3 +debian/tmp/usr/share/man/man3/libnutclient_devices.3 +debian/tmp/usr/share/man/man3/libnutclient_general.3 +debian/tmp/usr/share/man/man3/libnutclient_misc.3 +debian/tmp/usr/share/man/man3/libnutclient_tcp.3 +debian/tmp/usr/share/man/man3/libnutclient_variables.3 +debian/tmp/usr/share/man/man3/nutclient_authenticate.3 +debian/tmp/usr/share/man/man3/nutclient_destroy.3 +debian/tmp/usr/share/man/man3/nutclient_device_forced_shutdown.3 +debian/tmp/usr/share/man/man3/nutclient_device_login.3 +debian/tmp/usr/share/man/man3/nutclient_device_master.3 +debian/tmp/usr/share/man/man3/nutclient_execute_device_command.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_command_description.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_commands.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_description.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_num_logins.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_rw_variables.3 +debian/tmp/usr/share/man/man3/nutclient_get_devices.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_variable_description.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_variables.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_variable_values.3 +debian/tmp/usr/share/man/man3/nutclient_has_device.3 +debian/tmp/usr/share/man/man3/nutclient_has_device_command.3 +debian/tmp/usr/share/man/man3/nutclient_has_device_variable.3 +debian/tmp/usr/share/man/man3/nutclient_logout.3 +debian/tmp/usr/share/man/man3/nutclient_set_device_variable_value.3 +debian/tmp/usr/share/man/man3/nutclient_set_device_variable_values.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_create_client.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_disconnect.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_get_timeout.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_is_connected.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_reconnect.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_set_timeout.3 diff --git a/debian/libnutclient0.install b/debian/libnutclient0.install new file mode 100644 index 0000000..e5a792e --- /dev/null +++ b/debian/libnutclient0.install @@ -0,0 +1 @@ +lib/*/libnutclient.so.* diff --git a/debian/libnutclient0.symbols b/debian/libnutclient0.symbols new file mode 100644 index 0000000..dcc54cd --- /dev/null +++ b/debian/libnutclient0.symbols @@ -0,0 +1,234 @@ +libnutclient.so.0 libnutclient0 #MINVER# + _ZN3nut11IOExceptionD0Ev@Base 2.7.2 + _ZN3nut11IOExceptionD1Ev@Base 2.7.2 + _ZN3nut11IOExceptionD2Ev@Base 2.7.2 + _ZN3nut12NutExceptionC1ERKSs@Base 2.7.2 + _ZN3nut12NutExceptionC2ERKSs@Base 2.7.2 + _ZN3nut12NutExceptionD0Ev@Base 2.7.2 + _ZN3nut12NutExceptionD1Ev@Base 2.7.2 + _ZN3nut12NutExceptionD2Ev@Base 2.7.2 + _ZN3nut15SystemException3errEv@Base 2.7.2 + _ZN3nut15SystemExceptionC1Ev@Base 2.7.2 + _ZN3nut15SystemExceptionC2Ev@Base 2.7.2 + _ZN3nut15SystemExceptionD0Ev@Base 2.7.2 + _ZN3nut15SystemExceptionD1Ev@Base 2.7.2 + _ZN3nut15SystemExceptionD2Ev@Base 2.7.2 + _ZN3nut16TimeoutExceptionC1Ev@Base 2.7.2 + _ZN3nut16TimeoutExceptionC2Ev@Base 2.7.2 + _ZN3nut16TimeoutExceptionD0Ev@Base 2.7.2 + _ZN3nut16TimeoutExceptionD1Ev@Base 2.7.2 + _ZN3nut16TimeoutExceptionD2Ev@Base 2.7.2 + _ZN3nut20UnknownHostExceptionC1Ev@Base 2.7.2 + _ZN3nut20UnknownHostExceptionC2Ev@Base 2.7.2 + _ZN3nut20UnknownHostExceptionD0Ev@Base 2.7.2 + _ZN3nut20UnknownHostExceptionD1Ev@Base 2.7.2 + _ZN3nut20UnknownHostExceptionD2Ev@Base 2.7.2 + _ZN3nut21NotConnectedExceptionC1Ev@Base 2.7.2 + _ZN3nut21NotConnectedExceptionC2Ev@Base 2.7.2 + _ZN3nut21NotConnectedExceptionD0Ev@Base 2.7.2 + _ZN3nut21NotConnectedExceptionD1Ev@Base 2.7.2 + _ZN3nut21NotConnectedExceptionD2Ev@Base 2.7.2 + _ZN3nut6Client10getDevicesEv@Base 2.7.2 + _ZN3nut6Client16hasDeviceCommandERKSsS2_@Base 2.7.2 + _ZN3nut6Client17hasDeviceVariableERKSsS2_@Base 2.7.2 + _ZN3nut6Client23getDeviceVariableValuesERKSs@Base 2.7.2 + _ZN3nut6Client9getDeviceERKSs@Base 2.7.2 + _ZN3nut6Client9hasDeviceERKSs@Base 2.7.2 + _ZN3nut6ClientC1Ev@Base 2.7.2 + _ZN3nut6ClientC2Ev@Base 2.7.2 + _ZN3nut6ClientD1Ev@Base 2.7.2 + _ZN3nut6ClientD2Ev@Base 2.7.2 + _ZN3nut6Device10getCommandERKSs@Base 2.7.2 + _ZN3nut6Device11getCommandsEv@Base 2.7.2 + _ZN3nut6Device11getVariableERKSs@Base 2.7.2 + _ZN3nut6Device11setVariableERKSsRKSt6vectorISsSaISsEE@Base 2.7.2 + _ZN3nut6Device11setVariableERKSsS2_@Base 2.7.2 + _ZN3nut6Device12getNumLoginsEv@Base 2.7.2 + _ZN3nut6Device12getVariablesEv@Base 2.7.2 + _ZN3nut6Device14executeCommandERKSs@Base 2.7.2 + _ZN3nut6Device14forcedShutdownEv@Base 2.7.2 + _ZN3nut6Device14getDescriptionEv@Base 2.7.2 + _ZN3nut6Device14getRWVariablesEv@Base 2.7.2 + _ZN3nut6Device15getCommandNamesEv@Base 2.7.2 + _ZN3nut6Device16getVariableNamesEv@Base 2.7.2 + _ZN3nut6Device16getVariableValueERKSs@Base 2.7.2 + _ZN3nut6Device17getVariableValuesEv@Base 2.7.2 + _ZN3nut6Device18getRWVariableNamesEv@Base 2.7.2 + _ZN3nut6Device5loginEv@Base 2.7.2 + _ZN3nut6Device6masterEv@Base 2.7.2 + _ZN3nut6Device9getClientEv@Base 2.7.2 + _ZN3nut6DeviceC1EPNS_6ClientERKSs@Base 2.7.2 + _ZN3nut6DeviceC1ERKS0_@Base 2.7.2 + _ZN3nut6DeviceC2EPNS_6ClientERKSs@Base 2.7.2 + _ZN3nut6DeviceC2ERKS0_@Base 2.7.2 + _ZN3nut6DeviceD1Ev@Base 2.7.2 + _ZN3nut6DeviceD2Ev@Base 2.7.2 + _ZN3nut7Command14getDescriptionEv@Base 2.7.2 + _ZN3nut7Command7executeEv@Base 2.7.2 + _ZN3nut7Command9getDeviceEv@Base 2.7.2 + _ZN3nut7CommandC1EPNS_6DeviceERKSs@Base 2.7.2 + _ZN3nut7CommandC1ERKS0_@Base 2.7.2 + _ZN3nut7CommandC2EPNS_6DeviceERKSs@Base 2.7.2 + _ZN3nut7CommandC2ERKS0_@Base 2.7.2 + _ZN3nut7CommandD1Ev@Base 2.7.2 + _ZN3nut7CommandD2Ev@Base 2.7.2 + _ZN3nut8Variable14getDescriptionEv@Base 2.7.2 + _ZN3nut8Variable8getValueEv@Base 2.7.2 + _ZN3nut8Variable8setValueERKSs@Base 2.7.2 + _ZN3nut8Variable9getDeviceEv@Base 2.7.2 + _ZN3nut8Variable9setValuesERKSt6vectorISsSaISsEE@Base 2.7.2 + _ZN3nut8VariableC1EPNS_6DeviceERKSs@Base 2.7.2 + _ZN3nut8VariableC1ERKS0_@Base 2.7.2 + _ZN3nut8VariableC2EPNS_6DeviceERKSs@Base 2.7.2 + _ZN3nut8VariableC2ERKS0_@Base 2.7.2 + _ZN3nut8VariableD1Ev@Base 2.7.2 + _ZN3nut8VariableD2Ev@Base 2.7.2 + _ZN3nut8internal6Socket10disconnectEv@Base 2.7.2 + _ZN3nut8internal6Socket10setTimeoutEl@Base 2.7.2 + _ZN3nut8internal6Socket4readEPvm@Base 2.7.2 + _ZN3nut8internal6Socket4readEv@Base 2.7.2 + _ZN3nut8internal6Socket5writeEPKvm@Base 2.7.2 + _ZN3nut8internal6Socket5writeERKSs@Base 2.7.2 + _ZN3nut8internal6Socket7connectERKSsi@Base 2.7.2 + _ZN3nut8internal6SocketC1Ev@Base 2.7.2 + _ZN3nut8internal6SocketC2Ev@Base 2.7.2 + _ZN3nut9TcpClient10disconnectEv@Base 2.7.2 + _ZN3nut9TcpClient10setTimeoutEl@Base 2.7.2 + _ZN3nut9TcpClient11detectErrorERKSs@Base 2.7.2 + _ZN3nut9TcpClient11deviceLoginERKSs@Base 2.7.2 + _ZN3nut9TcpClient12authenticateERKSsS2_@Base 2.7.2 + _ZN3nut9TcpClient12deviceMasterERKSs@Base 2.7.2 + _ZN3nut9TcpClient14getDeviceNamesEv@Base 2.7.2 + _ZN3nut9TcpClient17setDeviceVariableERKSsS2_RKSt6vectorISsSaISsEE@Base 2.7.2 + _ZN3nut9TcpClient17setDeviceVariableERKSsS2_S2_@Base 2.7.2 + _ZN3nut9TcpClient18deviceGetNumLoginsERKSs@Base 2.7.2 + _ZN3nut9TcpClient20deviceForcedShutdownERKSs@Base 2.7.2 + _ZN3nut9TcpClient20executeDeviceCommandERKSsS2_@Base 2.7.2 + _ZN3nut9TcpClient20getDeviceDescriptionERKSs@Base 2.7.2 + _ZN3nut9TcpClient21getDeviceCommandNamesERKSs@Base 2.7.2 + _ZN3nut9TcpClient22getDeviceVariableNamesERKSs@Base 2.7.2 + _ZN3nut9TcpClient22getDeviceVariableValueERKSsS2_@Base 2.7.2 + _ZN3nut9TcpClient23getDeviceVariableValuesERKSs@Base 2.7.2 + _ZN3nut9TcpClient24getDeviceRWVariableNamesERKSs@Base 2.7.2 + _ZN3nut9TcpClient27getDeviceCommandDescriptionERKSsS2_@Base 2.7.2 + _ZN3nut9TcpClient28getDeviceVariableDescriptionERKSsS2_@Base 2.7.2 + _ZN3nut9TcpClient3getERKSsS2_@Base 2.7.2 + _ZN3nut9TcpClient4listERKSsS2_@Base 2.7.2 + _ZN3nut9TcpClient6escapeERKSs@Base 2.7.2 + _ZN3nut9TcpClient6logoutEv@Base 2.7.2 + _ZN3nut9TcpClient7connectERKSsi@Base 2.7.2 + _ZN3nut9TcpClient7connectEv@Base 2.7.2 + _ZN3nut9TcpClient7explodeERKSsm@Base 2.7.2 + _ZN3nut9TcpClient9getDeviceERKSs@Base 2.7.2 + _ZN3nut9TcpClient9sendQueryERKSs@Base 2.7.2 + _ZN3nut9TcpClientC1ERKSsi@Base 2.7.2 + _ZN3nut9TcpClientC1Ev@Base 2.7.2 + _ZN3nut9TcpClientC2ERKSsi@Base 2.7.2 + _ZN3nut9TcpClientC2Ev@Base 2.7.2 + _ZN3nut9TcpClientD1Ev@Base 2.7.2 + _ZN3nut9TcpClientD2Ev@Base 2.7.2 + _ZNK3nut12NutException3strEv@Base 2.7.2 + _ZNK3nut12NutException4whatEv@Base 2.7.2 + _ZNK3nut6Device4isOkEv@Base 2.7.2 + _ZNK3nut6Device7getNameEv@Base 2.7.2 + _ZNK3nut6Device9getClientEv@Base 2.7.2 + _ZNK3nut6DevicecvbEv@Base 2.7.2 + _ZNK3nut6DeviceeqERKS0_@Base 2.7.2 + _ZNK3nut6DeviceltERKS0_@Base 2.7.2 + _ZNK3nut6DevicentEv@Base 2.7.2 + _ZNK3nut7Command4isOkEv@Base 2.7.2 + _ZNK3nut7Command7getNameEv@Base 2.7.2 + _ZNK3nut7Command9getDeviceEv@Base 2.7.2 + _ZNK3nut7CommandcvbEv@Base 2.7.2 + _ZNK3nut7CommandeqERKS0_@Base 2.7.2 + _ZNK3nut7CommandltERKS0_@Base 2.7.2 + _ZNK3nut7CommandntEv@Base 2.7.2 + _ZNK3nut8Variable4isOkEv@Base 2.7.2 + _ZNK3nut8Variable7getNameEv@Base 2.7.2 + _ZNK3nut8Variable9getDeviceEv@Base 2.7.2 + _ZNK3nut8VariablecvbEv@Base 2.7.2 + _ZNK3nut8VariableeqERKS0_@Base 2.7.2 + _ZNK3nut8VariableltERKS0_@Base 2.7.2 + _ZNK3nut8VariablentEv@Base 2.7.2 + _ZNK3nut8internal6Socket11isConnectedEv@Base 2.7.2 + _ZNK3nut9TcpClient10getTimeoutEv@Base 2.7.2 + _ZNK3nut9TcpClient11isConnectedEv@Base 2.7.2 + _ZNK3nut9TcpClient7getHostEv@Base 2.7.2 + _ZNK3nut9TcpClient7getPortEv@Base 2.7.2 + _ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag@Base 2.7.2 + _ZNSt12_Destroy_auxILb0EE9__destroyIPSsEEvT_S3_@Base 2.7.2 + _ZNSt4pairIKSsSt6vectorISsSaISsEEED1Ev@Base 2.7.2 + _ZNSt4pairIKSsSt6vectorISsSaISsEEED2Ev@Base 2.7.2 + _ZNSt6vectorIS_ISsSaISsEESaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_@Base 2.7.2 + _ZNSt6vectorIS_ISsSaISsEESaIS1_EED1Ev@Base 2.7.2 + _ZNSt6vectorIS_ISsSaISsEESaIS1_EED2Ev@Base 2.7.2 + _ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPSsS1_EERKSs@Base 2.7.2 + _ZNSt6vectorISsSaISsEED1Ev@Base 2.7.2 + _ZNSt6vectorISsSaISsEED2Ev@Base 2.7.2 + _ZNSt6vectorISsSaISsEEaSERKS1_@Base 2.7.2 + _ZNSt8_Rb_treeIN3nut6DeviceES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE8_M_eraseEPSt13_Rb_tree_nodeIS1_E@Base 2.7.2 + _ZNSt8_Rb_treeIN3nut7CommandES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE8_M_eraseEPSt13_Rb_tree_nodeIS1_E@Base 2.7.2 + _ZNSt8_Rb_treeIN3nut8VariableES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE16_M_insert_uniqueERKS1_@Base 2.7.2 + _ZNSt8_Rb_treeIN3nut8VariableES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE8_M_eraseEPSt13_Rb_tree_nodeIS1_E@Base 2.7.2 + _ZNSt8_Rb_treeISsSsSt9_IdentityISsESt4lessISsESaISsEE16_M_insert_uniqueERKSs@Base 2.7.2 + _ZNSt8_Rb_treeISsSsSt9_IdentityISsESt4lessISsESaISsEE4findERKSs@Base 2.7.2 + _ZNSt8_Rb_treeISsSsSt9_IdentityISsESt4lessISsESaISsEE8_M_eraseEPSt13_Rb_tree_nodeISsE@Base 2.7.2 + _ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE10_M_insert_EPSt18_Rb_tree_node_baseSD_RKS5_@Base 2.7.2 + _ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE24_M_get_insert_unique_posERS1_@Base 2.7.2 + _ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS1_@Base 2.7.2 + _ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE8_M_eraseEPSt13_Rb_tree_nodeIS5_E@Base 2.7.2 + _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_@Base 2.7.2 + _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8_@Base 2.7.2 + _ZTIN3nut11IOExceptionE@Base 2.7.2 + _ZTIN3nut12NutExceptionE@Base 2.7.2 + _ZTIN3nut15SystemExceptionE@Base 2.7.2 + _ZTIN3nut16TimeoutExceptionE@Base 2.7.2 + _ZTIN3nut20UnknownHostExceptionE@Base 2.7.2 + _ZTIN3nut21NotConnectedExceptionE@Base 2.7.2 + _ZTIN3nut6ClientE@Base 2.7.2 + _ZTIN3nut9TcpClientE@Base 2.7.2 + _ZTSN3nut11IOExceptionE@Base 2.7.2 + _ZTSN3nut12NutExceptionE@Base 2.7.2 + _ZTSN3nut15SystemExceptionE@Base 2.7.2 + _ZTSN3nut16TimeoutExceptionE@Base 2.7.2 + _ZTSN3nut20UnknownHostExceptionE@Base 2.7.2 + _ZTSN3nut21NotConnectedExceptionE@Base 2.7.2 + _ZTSN3nut6ClientE@Base 2.7.2 + _ZTSN3nut9TcpClientE@Base 2.7.2 + _ZTVN3nut11IOExceptionE@Base 2.7.2 + _ZTVN3nut12NutExceptionE@Base 2.7.2 + _ZTVN3nut15SystemExceptionE@Base 2.7.2 + _ZTVN3nut16TimeoutExceptionE@Base 2.7.2 + _ZTVN3nut20UnknownHostExceptionE@Base 2.7.2 + _ZTVN3nut21NotConnectedExceptionE@Base 2.7.2 + _ZTVN3nut6ClientE@Base 2.7.2 + _ZTVN3nut9TcpClientE@Base 2.7.2 + nutclient_authenticate@Base 2.7.2 + nutclient_destroy@Base 2.7.2 + nutclient_device_forced_shutdown@Base 2.7.2 + nutclient_device_login@Base 2.7.2 + nutclient_device_master@Base 2.7.2 + nutclient_execute_device_command@Base 2.7.2 + nutclient_get_device_command_description@Base 2.7.2 + nutclient_get_device_commands@Base 2.7.2 + nutclient_get_device_description@Base 2.7.2 + nutclient_get_device_num_logins@Base 2.7.2 + nutclient_get_device_rw_variables@Base 2.7.2 + nutclient_get_device_variable_description@Base 2.7.2 + nutclient_get_device_variable_values@Base 2.7.2 + nutclient_get_device_variables@Base 2.7.2 + nutclient_get_devices@Base 2.7.2 + nutclient_has_device@Base 2.7.2 + nutclient_has_device_command@Base 2.7.2 + nutclient_has_device_variable@Base 2.7.2 + nutclient_logout@Base 2.7.2 + nutclient_set_device_variable_value@Base 2.7.2 + nutclient_set_device_variable_values@Base 2.7.2 + nutclient_tcp_create_client@Base 2.7.2 + nutclient_tcp_disconnect@Base 2.7.2 + nutclient_tcp_get_timeout@Base 2.7.2 + nutclient_tcp_is_connected@Base 2.7.2 + nutclient_tcp_reconnect@Base 2.7.2 + nutclient_tcp_set_timeout@Base 2.7.2 + strarr_alloc@Base 2.7.2 + strarr_free@Base 2.7.2 diff --git a/debian/rules b/debian/rules index b169acd..73abe42 100755 --- a/debian/rules +++ b/debian/rules @@ -76,6 +76,11 @@ common-install-arch:: rm -f $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.4 \ $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so + mv $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutclient.a \ + $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnutclient.a + rm -f $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutclient.so + ln -s /lib/$(DEB_HOST_MULTIARCH)/libnutclient.so.0 \ + $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnutclient.so # Install systemd files only on systems where it's supported ifeq (linux,$(DEB_HOST_ARCH_OS)) From c57ad7e8971e36fb7560e96ef82610544a79e1f4 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Fri, 24 Oct 2014 23:02:25 +0200 Subject: [PATCH 166/300] Demangle C++ symbols --- debian/libnutclient0.symbols | 373 ++++++++++++++++------------------- 1 file changed, 169 insertions(+), 204 deletions(-) diff --git a/debian/libnutclient0.symbols b/debian/libnutclient0.symbols index dcc54cd..ccc230c 100644 --- a/debian/libnutclient0.symbols +++ b/debian/libnutclient0.symbols @@ -1,208 +1,173 @@ libnutclient.so.0 libnutclient0 #MINVER# - _ZN3nut11IOExceptionD0Ev@Base 2.7.2 - _ZN3nut11IOExceptionD1Ev@Base 2.7.2 - _ZN3nut11IOExceptionD2Ev@Base 2.7.2 - _ZN3nut12NutExceptionC1ERKSs@Base 2.7.2 - _ZN3nut12NutExceptionC2ERKSs@Base 2.7.2 - _ZN3nut12NutExceptionD0Ev@Base 2.7.2 - _ZN3nut12NutExceptionD1Ev@Base 2.7.2 - _ZN3nut12NutExceptionD2Ev@Base 2.7.2 - _ZN3nut15SystemException3errEv@Base 2.7.2 - _ZN3nut15SystemExceptionC1Ev@Base 2.7.2 - _ZN3nut15SystemExceptionC2Ev@Base 2.7.2 - _ZN3nut15SystemExceptionD0Ev@Base 2.7.2 - _ZN3nut15SystemExceptionD1Ev@Base 2.7.2 - _ZN3nut15SystemExceptionD2Ev@Base 2.7.2 - _ZN3nut16TimeoutExceptionC1Ev@Base 2.7.2 - _ZN3nut16TimeoutExceptionC2Ev@Base 2.7.2 - _ZN3nut16TimeoutExceptionD0Ev@Base 2.7.2 - _ZN3nut16TimeoutExceptionD1Ev@Base 2.7.2 - _ZN3nut16TimeoutExceptionD2Ev@Base 2.7.2 - _ZN3nut20UnknownHostExceptionC1Ev@Base 2.7.2 - _ZN3nut20UnknownHostExceptionC2Ev@Base 2.7.2 - _ZN3nut20UnknownHostExceptionD0Ev@Base 2.7.2 - _ZN3nut20UnknownHostExceptionD1Ev@Base 2.7.2 - _ZN3nut20UnknownHostExceptionD2Ev@Base 2.7.2 - _ZN3nut21NotConnectedExceptionC1Ev@Base 2.7.2 - _ZN3nut21NotConnectedExceptionC2Ev@Base 2.7.2 - _ZN3nut21NotConnectedExceptionD0Ev@Base 2.7.2 - _ZN3nut21NotConnectedExceptionD1Ev@Base 2.7.2 - _ZN3nut21NotConnectedExceptionD2Ev@Base 2.7.2 - _ZN3nut6Client10getDevicesEv@Base 2.7.2 - _ZN3nut6Client16hasDeviceCommandERKSsS2_@Base 2.7.2 - _ZN3nut6Client17hasDeviceVariableERKSsS2_@Base 2.7.2 - _ZN3nut6Client23getDeviceVariableValuesERKSs@Base 2.7.2 - _ZN3nut6Client9getDeviceERKSs@Base 2.7.2 - _ZN3nut6Client9hasDeviceERKSs@Base 2.7.2 - _ZN3nut6ClientC1Ev@Base 2.7.2 - _ZN3nut6ClientC2Ev@Base 2.7.2 - _ZN3nut6ClientD1Ev@Base 2.7.2 - _ZN3nut6ClientD2Ev@Base 2.7.2 - _ZN3nut6Device10getCommandERKSs@Base 2.7.2 - _ZN3nut6Device11getCommandsEv@Base 2.7.2 - _ZN3nut6Device11getVariableERKSs@Base 2.7.2 - _ZN3nut6Device11setVariableERKSsRKSt6vectorISsSaISsEE@Base 2.7.2 - _ZN3nut6Device11setVariableERKSsS2_@Base 2.7.2 - _ZN3nut6Device12getNumLoginsEv@Base 2.7.2 - _ZN3nut6Device12getVariablesEv@Base 2.7.2 - _ZN3nut6Device14executeCommandERKSs@Base 2.7.2 - _ZN3nut6Device14forcedShutdownEv@Base 2.7.2 - _ZN3nut6Device14getDescriptionEv@Base 2.7.2 - _ZN3nut6Device14getRWVariablesEv@Base 2.7.2 - _ZN3nut6Device15getCommandNamesEv@Base 2.7.2 - _ZN3nut6Device16getVariableNamesEv@Base 2.7.2 - _ZN3nut6Device16getVariableValueERKSs@Base 2.7.2 - _ZN3nut6Device17getVariableValuesEv@Base 2.7.2 - _ZN3nut6Device18getRWVariableNamesEv@Base 2.7.2 - _ZN3nut6Device5loginEv@Base 2.7.2 - _ZN3nut6Device6masterEv@Base 2.7.2 - _ZN3nut6Device9getClientEv@Base 2.7.2 - _ZN3nut6DeviceC1EPNS_6ClientERKSs@Base 2.7.2 - _ZN3nut6DeviceC1ERKS0_@Base 2.7.2 - _ZN3nut6DeviceC2EPNS_6ClientERKSs@Base 2.7.2 - _ZN3nut6DeviceC2ERKS0_@Base 2.7.2 - _ZN3nut6DeviceD1Ev@Base 2.7.2 - _ZN3nut6DeviceD2Ev@Base 2.7.2 - _ZN3nut7Command14getDescriptionEv@Base 2.7.2 - _ZN3nut7Command7executeEv@Base 2.7.2 - _ZN3nut7Command9getDeviceEv@Base 2.7.2 - _ZN3nut7CommandC1EPNS_6DeviceERKSs@Base 2.7.2 - _ZN3nut7CommandC1ERKS0_@Base 2.7.2 - _ZN3nut7CommandC2EPNS_6DeviceERKSs@Base 2.7.2 - _ZN3nut7CommandC2ERKS0_@Base 2.7.2 - _ZN3nut7CommandD1Ev@Base 2.7.2 - _ZN3nut7CommandD2Ev@Base 2.7.2 - _ZN3nut8Variable14getDescriptionEv@Base 2.7.2 - _ZN3nut8Variable8getValueEv@Base 2.7.2 - _ZN3nut8Variable8setValueERKSs@Base 2.7.2 - _ZN3nut8Variable9getDeviceEv@Base 2.7.2 - _ZN3nut8Variable9setValuesERKSt6vectorISsSaISsEE@Base 2.7.2 - _ZN3nut8VariableC1EPNS_6DeviceERKSs@Base 2.7.2 - _ZN3nut8VariableC1ERKS0_@Base 2.7.2 - _ZN3nut8VariableC2EPNS_6DeviceERKSs@Base 2.7.2 - _ZN3nut8VariableC2ERKS0_@Base 2.7.2 - _ZN3nut8VariableD1Ev@Base 2.7.2 - _ZN3nut8VariableD2Ev@Base 2.7.2 - _ZN3nut8internal6Socket10disconnectEv@Base 2.7.2 - _ZN3nut8internal6Socket10setTimeoutEl@Base 2.7.2 - _ZN3nut8internal6Socket4readEPvm@Base 2.7.2 - _ZN3nut8internal6Socket4readEv@Base 2.7.2 - _ZN3nut8internal6Socket5writeEPKvm@Base 2.7.2 - _ZN3nut8internal6Socket5writeERKSs@Base 2.7.2 - _ZN3nut8internal6Socket7connectERKSsi@Base 2.7.2 - _ZN3nut8internal6SocketC1Ev@Base 2.7.2 - _ZN3nut8internal6SocketC2Ev@Base 2.7.2 - _ZN3nut9TcpClient10disconnectEv@Base 2.7.2 - _ZN3nut9TcpClient10setTimeoutEl@Base 2.7.2 - _ZN3nut9TcpClient11detectErrorERKSs@Base 2.7.2 - _ZN3nut9TcpClient11deviceLoginERKSs@Base 2.7.2 - _ZN3nut9TcpClient12authenticateERKSsS2_@Base 2.7.2 - _ZN3nut9TcpClient12deviceMasterERKSs@Base 2.7.2 - _ZN3nut9TcpClient14getDeviceNamesEv@Base 2.7.2 - _ZN3nut9TcpClient17setDeviceVariableERKSsS2_RKSt6vectorISsSaISsEE@Base 2.7.2 - _ZN3nut9TcpClient17setDeviceVariableERKSsS2_S2_@Base 2.7.2 - _ZN3nut9TcpClient18deviceGetNumLoginsERKSs@Base 2.7.2 - _ZN3nut9TcpClient20deviceForcedShutdownERKSs@Base 2.7.2 - _ZN3nut9TcpClient20executeDeviceCommandERKSsS2_@Base 2.7.2 - _ZN3nut9TcpClient20getDeviceDescriptionERKSs@Base 2.7.2 - _ZN3nut9TcpClient21getDeviceCommandNamesERKSs@Base 2.7.2 - _ZN3nut9TcpClient22getDeviceVariableNamesERKSs@Base 2.7.2 - _ZN3nut9TcpClient22getDeviceVariableValueERKSsS2_@Base 2.7.2 - _ZN3nut9TcpClient23getDeviceVariableValuesERKSs@Base 2.7.2 - _ZN3nut9TcpClient24getDeviceRWVariableNamesERKSs@Base 2.7.2 - _ZN3nut9TcpClient27getDeviceCommandDescriptionERKSsS2_@Base 2.7.2 - _ZN3nut9TcpClient28getDeviceVariableDescriptionERKSsS2_@Base 2.7.2 - _ZN3nut9TcpClient3getERKSsS2_@Base 2.7.2 - _ZN3nut9TcpClient4listERKSsS2_@Base 2.7.2 - _ZN3nut9TcpClient6escapeERKSs@Base 2.7.2 - _ZN3nut9TcpClient6logoutEv@Base 2.7.2 - _ZN3nut9TcpClient7connectERKSsi@Base 2.7.2 - _ZN3nut9TcpClient7connectEv@Base 2.7.2 - _ZN3nut9TcpClient7explodeERKSsm@Base 2.7.2 - _ZN3nut9TcpClient9getDeviceERKSs@Base 2.7.2 - _ZN3nut9TcpClient9sendQueryERKSs@Base 2.7.2 - _ZN3nut9TcpClientC1ERKSsi@Base 2.7.2 - _ZN3nut9TcpClientC1Ev@Base 2.7.2 - _ZN3nut9TcpClientC2ERKSsi@Base 2.7.2 - _ZN3nut9TcpClientC2Ev@Base 2.7.2 - _ZN3nut9TcpClientD1Ev@Base 2.7.2 - _ZN3nut9TcpClientD2Ev@Base 2.7.2 - _ZNK3nut12NutException3strEv@Base 2.7.2 - _ZNK3nut12NutException4whatEv@Base 2.7.2 - _ZNK3nut6Device4isOkEv@Base 2.7.2 - _ZNK3nut6Device7getNameEv@Base 2.7.2 - _ZNK3nut6Device9getClientEv@Base 2.7.2 - _ZNK3nut6DevicecvbEv@Base 2.7.2 - _ZNK3nut6DeviceeqERKS0_@Base 2.7.2 - _ZNK3nut6DeviceltERKS0_@Base 2.7.2 - _ZNK3nut6DevicentEv@Base 2.7.2 - _ZNK3nut7Command4isOkEv@Base 2.7.2 - _ZNK3nut7Command7getNameEv@Base 2.7.2 - _ZNK3nut7Command9getDeviceEv@Base 2.7.2 - _ZNK3nut7CommandcvbEv@Base 2.7.2 - _ZNK3nut7CommandeqERKS0_@Base 2.7.2 - _ZNK3nut7CommandltERKS0_@Base 2.7.2 - _ZNK3nut7CommandntEv@Base 2.7.2 - _ZNK3nut8Variable4isOkEv@Base 2.7.2 - _ZNK3nut8Variable7getNameEv@Base 2.7.2 - _ZNK3nut8Variable9getDeviceEv@Base 2.7.2 - _ZNK3nut8VariablecvbEv@Base 2.7.2 - _ZNK3nut8VariableeqERKS0_@Base 2.7.2 - _ZNK3nut8VariableltERKS0_@Base 2.7.2 - _ZNK3nut8VariablentEv@Base 2.7.2 - _ZNK3nut8internal6Socket11isConnectedEv@Base 2.7.2 - _ZNK3nut9TcpClient10getTimeoutEv@Base 2.7.2 - _ZNK3nut9TcpClient11isConnectedEv@Base 2.7.2 - _ZNK3nut9TcpClient7getHostEv@Base 2.7.2 - _ZNK3nut9TcpClient7getPortEv@Base 2.7.2 - _ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag@Base 2.7.2 - _ZNSt12_Destroy_auxILb0EE9__destroyIPSsEEvT_S3_@Base 2.7.2 - _ZNSt4pairIKSsSt6vectorISsSaISsEEED1Ev@Base 2.7.2 - _ZNSt4pairIKSsSt6vectorISsSaISsEEED2Ev@Base 2.7.2 - _ZNSt6vectorIS_ISsSaISsEESaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_@Base 2.7.2 - _ZNSt6vectorIS_ISsSaISsEESaIS1_EED1Ev@Base 2.7.2 - _ZNSt6vectorIS_ISsSaISsEESaIS1_EED2Ev@Base 2.7.2 - _ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPSsS1_EERKSs@Base 2.7.2 - _ZNSt6vectorISsSaISsEED1Ev@Base 2.7.2 - _ZNSt6vectorISsSaISsEED2Ev@Base 2.7.2 - _ZNSt6vectorISsSaISsEEaSERKS1_@Base 2.7.2 - _ZNSt8_Rb_treeIN3nut6DeviceES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE8_M_eraseEPSt13_Rb_tree_nodeIS1_E@Base 2.7.2 - _ZNSt8_Rb_treeIN3nut7CommandES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE8_M_eraseEPSt13_Rb_tree_nodeIS1_E@Base 2.7.2 - _ZNSt8_Rb_treeIN3nut8VariableES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE16_M_insert_uniqueERKS1_@Base 2.7.2 - _ZNSt8_Rb_treeIN3nut8VariableES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE8_M_eraseEPSt13_Rb_tree_nodeIS1_E@Base 2.7.2 - _ZNSt8_Rb_treeISsSsSt9_IdentityISsESt4lessISsESaISsEE16_M_insert_uniqueERKSs@Base 2.7.2 - _ZNSt8_Rb_treeISsSsSt9_IdentityISsESt4lessISsESaISsEE4findERKSs@Base 2.7.2 - _ZNSt8_Rb_treeISsSsSt9_IdentityISsESt4lessISsESaISsEE8_M_eraseEPSt13_Rb_tree_nodeISsE@Base 2.7.2 - _ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE10_M_insert_EPSt18_Rb_tree_node_baseSD_RKS5_@Base 2.7.2 - _ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE24_M_get_insert_unique_posERS1_@Base 2.7.2 - _ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS1_@Base 2.7.2 - _ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE8_M_eraseEPSt13_Rb_tree_nodeIS5_E@Base 2.7.2 - _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_@Base 2.7.2 - _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8_@Base 2.7.2 - _ZTIN3nut11IOExceptionE@Base 2.7.2 - _ZTIN3nut12NutExceptionE@Base 2.7.2 - _ZTIN3nut15SystemExceptionE@Base 2.7.2 - _ZTIN3nut16TimeoutExceptionE@Base 2.7.2 - _ZTIN3nut20UnknownHostExceptionE@Base 2.7.2 - _ZTIN3nut21NotConnectedExceptionE@Base 2.7.2 - _ZTIN3nut6ClientE@Base 2.7.2 - _ZTIN3nut9TcpClientE@Base 2.7.2 - _ZTSN3nut11IOExceptionE@Base 2.7.2 - _ZTSN3nut12NutExceptionE@Base 2.7.2 - _ZTSN3nut15SystemExceptionE@Base 2.7.2 - _ZTSN3nut16TimeoutExceptionE@Base 2.7.2 - _ZTSN3nut20UnknownHostExceptionE@Base 2.7.2 - _ZTSN3nut21NotConnectedExceptionE@Base 2.7.2 - _ZTSN3nut6ClientE@Base 2.7.2 - _ZTSN3nut9TcpClientE@Base 2.7.2 - _ZTVN3nut11IOExceptionE@Base 2.7.2 - _ZTVN3nut12NutExceptionE@Base 2.7.2 - _ZTVN3nut15SystemExceptionE@Base 2.7.2 - _ZTVN3nut16TimeoutExceptionE@Base 2.7.2 - _ZTVN3nut20UnknownHostExceptionE@Base 2.7.2 - _ZTVN3nut21NotConnectedExceptionE@Base 2.7.2 - _ZTVN3nut6ClientE@Base 2.7.2 - _ZTVN3nut9TcpClientE@Base 2.7.2 + (c++)"nut::IOException::~IOException()@Base" 2.7.2 + (c++)"nut::NutException::NutException(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::NutException::~NutException()@Base" 2.7.2 + (c++)"nut::SystemException::err()@Base" 2.7.2 + (c++)"nut::SystemException::SystemException()@Base" 2.7.2 + (c++)"nut::SystemException::~SystemException()@Base" 2.7.2 + (c++)"nut::TimeoutException::TimeoutException()@Base" 2.7.2 + (c++)"nut::TimeoutException::~TimeoutException()@Base" 2.7.2 + (c++)"nut::UnknownHostException::UnknownHostException()@Base" 2.7.2 + (c++)"nut::UnknownHostException::~UnknownHostException()@Base" 2.7.2 + (c++)"nut::NotConnectedException::NotConnectedException()@Base" 2.7.2 + (c++)"nut::NotConnectedException::~NotConnectedException()@Base" 2.7.2 + (c++)"nut::Client::getDevices()@Base" 2.7.2 + (c++)"nut::Client::hasDeviceCommand(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Client::hasDeviceVariable(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Client::getDeviceVariableValues(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Client::getDevice(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Client::hasDevice(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Client::Client()@Base" 2.7.2 + (c++)"nut::Client::~Client()@Base" 2.7.2 + (c++)"nut::Device::getCommand(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Device::getCommands()@Base" 2.7.2 + (c++)"nut::Device::getVariable(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Device::setVariable(std::basic_string, std::allocator > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 + (c++)"nut::Device::setVariable(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Device::getNumLogins()@Base" 2.7.2 + (c++)"nut::Device::getVariables()@Base" 2.7.2 + (c++)"nut::Device::executeCommand(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Device::forcedShutdown()@Base" 2.7.2 + (c++)"nut::Device::getDescription()@Base" 2.7.2 + (c++)"nut::Device::getRWVariables()@Base" 2.7.2 + (c++)"nut::Device::getCommandNames()@Base" 2.7.2 + (c++)"nut::Device::getVariableNames()@Base" 2.7.2 + (c++)"nut::Device::getVariableValue(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Device::getVariableValues()@Base" 2.7.2 + (c++)"nut::Device::getRWVariableNames()@Base" 2.7.2 + (c++)"nut::Device::login()@Base" 2.7.2 + (c++)"nut::Device::master()@Base" 2.7.2 + (c++)"nut::Device::getClient()@Base" 2.7.2 + (c++)"nut::Device::Device(nut::Client*, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Device::Device(nut::Device const&)@Base" 2.7.2 + (c++)"nut::Device::~Device()@Base" 2.7.2 + (c++)"nut::Command::getDescription()@Base" 2.7.2 + (c++)"nut::Command::execute()@Base" 2.7.2 + (c++)"nut::Command::getDevice()@Base" 2.7.2 + (c++)"nut::Command::Command(nut::Device*, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Command::Command(nut::Command const&)@Base" 2.7.2 + (c++)"nut::Command::~Command()@Base" 2.7.2 + (c++)"nut::Variable::getDescription()@Base" 2.7.2 + (c++)"nut::Variable::getValue()@Base" 2.7.2 + (c++)"nut::Variable::setValue(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Variable::getDevice()@Base" 2.7.2 + (c++)"nut::Variable::setValues(std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 + (c++)"nut::Variable::Variable(nut::Device*, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::Variable::Variable(nut::Variable const&)@Base" 2.7.2 + (c++)"nut::Variable::~Variable()@Base" 2.7.2 + (c++)"nut::internal::Socket::disconnect()@Base" 2.7.2 + (c++)"nut::internal::Socket::setTimeout(long)@Base" 2.7.2 + (c++)"nut::internal::Socket::read(void*, unsigned long)@Base" 2.7.2 + (c++)"nut::internal::Socket::read()@Base" 2.7.2 + (c++)"nut::internal::Socket::write(void const*, unsigned long)@Base" 2.7.2 + (c++)"nut::internal::Socket::write(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::internal::Socket::connect(std::basic_string, std::allocator > const&, int)@Base" 2.7.2 + (c++)"nut::internal::Socket::Socket()@Base" 2.7.2 + (c++)"nut::TcpClient::disconnect()@Base" 2.7.2 + (c++)"nut::TcpClient::setTimeout(long)@Base" 2.7.2 + (c++)"nut::TcpClient::detectError(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::deviceLogin(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::authenticate(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::deviceMaster(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::getDeviceNames()@Base" 2.7.2 + (c++)"nut::TcpClient::setDeviceVariable(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::setDeviceVariable(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::deviceGetNumLogins(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::deviceForcedShutdown(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::executeDeviceCommand(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::getDeviceDescription(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::getDeviceCommandNames(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::getDeviceVariableNames(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::getDeviceVariableValue(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::getDeviceVariableValues(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::getDeviceRWVariableNames(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::getDeviceCommandDescription(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::getDeviceVariableDescription(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::get(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::list(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::escape(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::logout()@Base" 2.7.2 + (c++)"nut::TcpClient::connect(std::basic_string, std::allocator > const&, int)@Base" 2.7.2 + (c++)"nut::TcpClient::connect()@Base" 2.7.2 + (c++)"nut::TcpClient::explode(std::basic_string, std::allocator > const&, unsigned long)@Base" 2.7.2 + (c++)"nut::TcpClient::getDevice(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::sendQuery(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"nut::TcpClient::TcpClient(std::basic_string, std::allocator > const&, int)@Base" 2.7.2 + (c++)"nut::TcpClient::TcpClient()@Base" 2.7.2 + (c++)"nut::TcpClient::~TcpClient()@Base" 2.7.2 + (c++)"nut::NutException::str() const@Base" 2.7.2 + (c++)"nut::NutException::what() const@Base" 2.7.2 + (c++)"nut::Device::isOk() const@Base" 2.7.2 + (c++)"nut::Device::getName() const@Base" 2.7.2 + (c++)"nut::Device::getClient() const@Base" 2.7.2 + (c++)"nut::Device::operator bool() const@Base" 2.7.2 + (c++)"nut::Device::operator==(nut::Device const&) const@Base" 2.7.2 + (c++)"nut::Device::operator<(nut::Device const&) const@Base" 2.7.2 + (c++)"nut::Device::operator!() const@Base" 2.7.2 + (c++)"nut::Command::isOk() const@Base" 2.7.2 + (c++)"nut::Command::getName() const@Base" 2.7.2 + (c++)"nut::Command::getDevice() const@Base" 2.7.2 + (c++)"nut::Command::operator bool() const@Base" 2.7.2 + (c++)"nut::Command::operator==(nut::Command const&) const@Base" 2.7.2 + (c++)"nut::Command::operator<(nut::Command const&) const@Base" 2.7.2 + (c++)"nut::Command::operator!() const@Base" 2.7.2 + (c++)"nut::Variable::isOk() const@Base" 2.7.2 + (c++)"nut::Variable::getName() const@Base" 2.7.2 + (c++)"nut::Variable::getDevice() const@Base" 2.7.2 + (c++)"nut::Variable::operator bool() const@Base" 2.7.2 + (c++)"nut::Variable::operator==(nut::Variable const&) const@Base" 2.7.2 + (c++)"nut::Variable::operator<(nut::Variable const&) const@Base" 2.7.2 + (c++)"nut::Variable::operator!() const@Base" 2.7.2 + (c++)"nut::internal::Socket::isConnected() const@Base" 2.7.2 + (c++)"nut::TcpClient::getTimeout() const@Base" 2.7.2 + (c++)"nut::TcpClient::isConnected() const@Base" 2.7.2 + (c++)"nut::TcpClient::getHost() const@Base" 2.7.2 + (c++)"nut::TcpClient::getPort() const@Base" 2.7.2 + (c++)"char* std::basic_string, std::allocator >::_S_construct(char*, char*, std::allocator const&, std::forward_iterator_tag)@Base" 2.7.2 + (c++)"void std::_Destroy_aux::__destroy, std::allocator >*>(std::basic_string, std::allocator >*, std::basic_string, std::allocator >*)@Base" 2.7.2 + (c++)"std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >::~pair()@Base" 2.7.2 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::_M_insert_aux(__gnu_cxx::__normal_iterator, std::allocator >, std::allocator, std::allocator > > >*, std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > > >, std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::~vector()@Base" 2.7.2 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::_M_insert_aux(__gnu_cxx::__normal_iterator, std::allocator >*, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::~vector()@Base" 2.7.2 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::operator=(std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(nut::Variable const&)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::allocator >, std::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::_M_insert_unique(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::allocator >, std::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::find(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::allocator >, std::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::_M_erase(std::_Rb_tree_node, std::allocator > >*)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_insert_(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > const&)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_get_insert_unique_pos(std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_erase(std::_Rb_tree_node, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >*)@Base" 2.7.2 + (c++)"std::basic_string, std::allocator > std::operator+, std::allocator >(char const*, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 + (c++)"typeinfo for nut::IOException@Base" 2.7.2 + (c++)"typeinfo for nut::NutException@Base" 2.7.2 + (c++)"typeinfo for nut::SystemException@Base" 2.7.2 + (c++)"typeinfo for nut::TimeoutException@Base" 2.7.2 + (c++)"typeinfo for nut::UnknownHostException@Base" 2.7.2 + (c++)"typeinfo for nut::NotConnectedException@Base" 2.7.2 + (c++)"typeinfo for nut::Client@Base" 2.7.2 + (c++)"typeinfo for nut::TcpClient@Base" 2.7.2 + (c++)"typeinfo name for nut::IOException@Base" 2.7.2 + (c++)"typeinfo name for nut::NutException@Base" 2.7.2 + (c++)"typeinfo name for nut::SystemException@Base" 2.7.2 + (c++)"typeinfo name for nut::TimeoutException@Base" 2.7.2 + (c++)"typeinfo name for nut::UnknownHostException@Base" 2.7.2 + (c++)"typeinfo name for nut::NotConnectedException@Base" 2.7.2 + (c++)"typeinfo name for nut::Client@Base" 2.7.2 + (c++)"typeinfo name for nut::TcpClient@Base" 2.7.2 + (c++)"vtable for nut::IOException@Base" 2.7.2 + (c++)"vtable for nut::NutException@Base" 2.7.2 + (c++)"vtable for nut::SystemException@Base" 2.7.2 + (c++)"vtable for nut::TimeoutException@Base" 2.7.2 + (c++)"vtable for nut::UnknownHostException@Base" 2.7.2 + (c++)"vtable for nut::NotConnectedException@Base" 2.7.2 + (c++)"vtable for nut::Client@Base" 2.7.2 + (c++)"vtable for nut::TcpClient@Base" 2.7.2 nutclient_authenticate@Base 2.7.2 nutclient_destroy@Base 2.7.2 nutclient_device_forced_shutdown@Base 2.7.2 From 819cab0654a2a599dae96550a120c9a37a6aae29 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sat, 17 Jan 2015 10:29:11 +0000 Subject: [PATCH 167/300] Imported Debian patch 2.7.2-1.1 --- debian/changelog | 8 ++++++++ debian/rules | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e940af1..f8ba3fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +nut (2.7.2-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Port Ubuntu change to drop upstream systemd unit files to allow + sysvinit files for Jessie. (Closes: #747863) + + -- Neil Williams Sat, 17 Jan 2015 10:29:11 +0000 + nut (2.7.2-1) unstable; urgency=low * New upstream release diff --git a/debian/rules b/debian/rules index b169acd..084af15 100755 --- a/debian/rules +++ b/debian/rules @@ -78,7 +78,9 @@ common-install-arch:: $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so # Install systemd files only on systems where it's supported -ifeq (linux,$(DEB_HOST_ARCH_OS)) + # disabled in Ubuntu until the unit gets fixed to check nut.conf + # disabled in Debian Jessie to retain sysvinit support until fix is available +ifeq (linux-disabled,$(DEB_HOST_ARCH_OS)) install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-monitor.service \ $(CURDIR)/debian/nut-client/lib/systemd/system/nut-monitor.service install -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system-shutdown/nutshutdown \ From f07df515f5ce5a258e05d6e9f4174391edf3da75 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 25 Jan 2015 12:28:45 +0100 Subject: [PATCH 168/300] debian/gbp.conf: Switch to debian-jessie branch --- debian/changelog | 6 ++++++ debian/gbp.conf | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f8ba3fa..bedfdc1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nut (2.7.2-2) UNRELEASED; urgency=medium + + * debian/gbp.conf: Switch to debian-jessie branch + + -- Laurent Bigonville Sun, 25 Jan 2015 12:28:14 +0100 + nut (2.7.2-1.1) unstable; urgency=medium * Non-maintainer upload. diff --git a/debian/gbp.conf b/debian/gbp.conf index 6837223..2e63610 100644 --- a/debian/gbp.conf +++ b/debian/gbp.conf @@ -1,5 +1,5 @@ [DEFAULT] -debian-branch = debian +debian-branch = debian-jessie upstream-branch = upstream pristine-tar = True From fedf671e4dee3c649022eab07663c768a8d52163 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 25 Jan 2015 12:50:07 +0100 Subject: [PATCH 169/300] Revert the changes made in the previous NMU debian/rules: Revert the changes made in the previous NMU, I don't think that dropping the .service file that late in the release cycle is a good idea and anyway this was causing left-over files on upgrade. --- debian/changelog | 5 ++++- debian/rules | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index bedfdc1..4968b14 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ nut (2.7.2-2) UNRELEASED; urgency=medium * debian/gbp.conf: Switch to debian-jessie branch + * debian/rules: Revert the changes made in the previous NMU, I don't think + that dropping the .service file that late in the release cycle is a good + idea and anyway this was causing left-over files on upgrade. - -- Laurent Bigonville Sun, 25 Jan 2015 12:28:14 +0100 + -- Laurent Bigonville Sun, 25 Jan 2015 12:47:47 +0100 nut (2.7.2-1.1) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index 084af15..b169acd 100755 --- a/debian/rules +++ b/debian/rules @@ -78,9 +78,7 @@ common-install-arch:: $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so # Install systemd files only on systems where it's supported - # disabled in Ubuntu until the unit gets fixed to check nut.conf - # disabled in Debian Jessie to retain sysvinit support until fix is available -ifeq (linux-disabled,$(DEB_HOST_ARCH_OS)) +ifeq (linux,$(DEB_HOST_ARCH_OS)) install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-monitor.service \ $(CURDIR)/debian/nut-client/lib/systemd/system/nut-monitor.service install -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system-shutdown/nutshutdown \ From 241119d464a2c8b1afdc20f0a15395ec2ef8e7fd Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 25 Jan 2015 12:54:03 +0100 Subject: [PATCH 170/300] Add wrappers that check the MODE in /etc/nut/nut.conf to avoid starting the daemons if nut is not configured (Closes: #747863). --- debian/changelog | 4 +++- debian/local/upsd | 19 +++++++++++++++++++ debian/local/upsmon | 19 +++++++++++++++++++ debian/nut-client.install | 1 + debian/nut-server.install | 1 + debian/rules | 6 ++++++ 6 files changed, 49 insertions(+), 1 deletion(-) create mode 100755 debian/local/upsd create mode 100755 debian/local/upsmon diff --git a/debian/changelog b/debian/changelog index 4968b14..acd59b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,10 @@ nut (2.7.2-2) UNRELEASED; urgency=medium * debian/rules: Revert the changes made in the previous NMU, I don't think that dropping the .service file that late in the release cycle is a good idea and anyway this was causing left-over files on upgrade. + * Add wrappers that check the MODE in /etc/nut/nut.conf to avoid starting + the daemons if nut is not configured (Closes: #747863). - -- Laurent Bigonville Sun, 25 Jan 2015 12:47:47 +0100 + -- Laurent Bigonville Sun, 25 Jan 2015 12:53:03 +0100 nut (2.7.2-1.1) unstable; urgency=medium diff --git a/debian/local/upsd b/debian/local/upsd new file mode 100755 index 0000000..5e4d2a4 --- /dev/null +++ b/debian/local/upsd @@ -0,0 +1,19 @@ +#!/bin/sh + +# Include NUT nut.conf +[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf + +case "$MODE" in + standalone|netserver) + exec /lib/nut/upsd "$@" + ;; + none|netclient) + echo "upsd disabled, please adjust the configuration to your needs" + echo "Then set MODE to a suitable value in /etc/nut/nut.conf to enable it" + # exit success to avoid breaking the install process! + exit 0 + ;; + *) + exit 1 + ;; +esac diff --git a/debian/local/upsmon b/debian/local/upsmon new file mode 100755 index 0000000..a9f6d1b --- /dev/null +++ b/debian/local/upsmon @@ -0,0 +1,19 @@ +#!/bin/sh + +# Include NUT nut.conf +[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf + +case "$MODE" in + standalone|netserver|netclient) + exec /lib/nut/upsmon "$@" + ;; + none) + echo "upsmon disabled, please adjust the configuration to your needs" + echo "Then set MODE to a suitable value in /etc/nut/nut.conf to enable it" + # exit success to avoid breaking the install process! + exit 0 + ;; + *) + exit 1 + ;; +esac diff --git a/debian/nut-client.install b/debian/nut-client.install index b899f84..e9e32e4 100644 --- a/debian/nut-client.install +++ b/debian/nut-client.install @@ -3,6 +3,7 @@ debian/tmp/bin/upsc debian/tmp/bin/upsrw debian/tmp/bin/upscmd debian/tmp/sbin/upsmon +debian/tmp/lib/nut/upsmon debian/tmp/sbin/upssched debian/tmp/bin/upssched-cmd debian/tmp/etc/nut/nut.conf diff --git a/debian/nut-server.install b/debian/nut-server.install index 8b67a85..bbc50da 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -1,4 +1,5 @@ debian/tmp/sbin/upsd +debian/tmp/lib/nut/upsd debian/tmp/sbin/upsdrvctl debian/tmp/usr/share/nut/cmdvartab debian/tmp/usr/share/nut/driver.list diff --git a/debian/rules b/debian/rules index b169acd..c667da4 100755 --- a/debian/rules +++ b/debian/rules @@ -77,6 +77,12 @@ common-install-arch:: ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.4 \ $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so + # Move daemons and install wrappers + mv $(CURDIR)/debian/tmp/sbin/upsmon $(CURDIR)/debian/tmp/lib/nut/upsmon + mv $(CURDIR)/debian/tmp/sbin/upsd $(CURDIR)/debian/tmp/lib/nut/upsd + install -m 0755 debian/local/upsmon $(CURDIR)/debian/tmp/sbin/upsmon + install -m 0755 debian/local/upsd $(CURDIR)/debian/tmp/sbin/upsd + # Install systemd files only on systems where it's supported ifeq (linux,$(DEB_HOST_ARCH_OS)) install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-monitor.service \ From 1563b485dc5490a087a64f3da08cb41ebd553fa6 Mon Sep 17 00:00:00 2001 From: Michael Fincham Date: Fri, 13 Feb 2015 11:39:10 +1300 Subject: [PATCH 171/300] Add patch that detects and corrects unsafe permissions on ~/.nut-monitor left over from old installations during NUT-Monitor startup. (Closes: #777706) --- debian/NEWS | 13 ++++ debian/changelog | 8 ++- .../0009-fix-favorites-permissions.patch | 69 +++++++++++++++++++ debian/patches/series | 1 + 4 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0009-fix-favorites-permissions.patch diff --git a/debian/NEWS b/debian/NEWS index e42605c..53ca695 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,16 @@ +nut (2.7.2-2) unstable; urgency=medium + + Since version 1.2 NUT-Monitor uses safer directory permissions when + creating ~/.nut-monitor. + + NUT-Monitor will now detect a pre-1.2 settings directory on startup + and update its permissions. + + Please note that passwords stored in NUT-Monitor prior to this change + may have been exposed, and it is recommended that they be reset. + + -- Michael Fincham Fri, 13 Feb 2015 11:57:12 +1300 + nut (2.6.5-1) experimental; urgency=low mge-shut driver has been replaced by a new implementation (newmge-shut). diff --git a/debian/changelog b/debian/changelog index acd59b2..8332b74 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ nut (2.7.2-2) UNRELEASED; urgency=medium + [ Laurent Bigonville ] * debian/gbp.conf: Switch to debian-jessie branch * debian/rules: Revert the changes made in the previous NMU, I don't think that dropping the .service file that late in the release cycle is a good @@ -7,7 +8,12 @@ nut (2.7.2-2) UNRELEASED; urgency=medium * Add wrappers that check the MODE in /etc/nut/nut.conf to avoid starting the daemons if nut is not configured (Closes: #747863). - -- Laurent Bigonville Sun, 25 Jan 2015 12:53:03 +0100 + [ Michael Fincham ] + * Add patch that detects and corrects unsafe permissions on ~/.nut-monitor + left over from old installations during NUT-Monitor startup. + (Closes: #777706) + + -- Michael Fincham Fri, 13 Feb 2015 11:39:10 +1300 nut (2.7.2-1.1) unstable; urgency=medium diff --git a/debian/patches/0009-fix-favorites-permissions.patch b/debian/patches/0009-fix-favorites-permissions.patch new file mode 100644 index 0000000..7128250 --- /dev/null +++ b/debian/patches/0009-fix-favorites-permissions.patch @@ -0,0 +1,69 @@ +If a ~/.nut-monitor directory is found with insecure permissions, change them to 0700. +--- a/scripts/python/app/NUT-Monitor ++++ b/scripts/python/app/NUT-Monitor +@@ -29,6 +29,7 @@ + import sys + import base64 + import os, os.path ++import stat + import platform + import time + import threading +@@ -44,21 +45,23 @@ + + class interface : + +- __widgets = {} +- __callbacks = {} +- __favorites = {} +- __favorites_file = None +- __favorites_path = "" +- __fav_menu_items = list() +- __window_visible = True +- __glade_file = None +- __connected = False +- __ups_handler = None +- __ups_commands = None +- __ups_vars = None +- __ups_rw_vars = None +- __gui_thread = None +- __current_ups = None ++ DESIRED_FAVORITES_DIRECTORY_MODE = 0700 ++ ++ __widgets = {} ++ __callbacks = {} ++ __favorites = {} ++ __favorites_file = None ++ __favorites_path = "" ++ __fav_menu_items = list() ++ __window_visible = True ++ __glade_file = None ++ __connected = False ++ __ups_handler = None ++ __ups_commands = None ++ __ups_vars = None ++ __ups_rw_vars = None ++ __gui_thread = None ++ __current_ups = None + + def __init__( self ) : + +@@ -528,6 +531,9 @@ + return + + try : ++ if ( not stat.S_IMODE( os.stat( self.__favorites_path ).st_mode ) == self.DESIRED_FAVORITES_DIRECTORY_MODE ) : # unsafe pre-1.2 directory found ++ os.chmod( self.__favorites_path, self.DESIRED_FAVORITES_DIRECTORY_MODE ) ++ + conf = ConfigParser.ConfigParser() + conf.read( self.__favorites_file ) + for current in conf.sections() : +@@ -573,7 +579,7 @@ + # If path does not exists, try to create it + if ( not os.path.exists( self.__favorites_file ) ) : + try : +- os.makedirs( self.__favorites_path, mode=0700 ) ++ os.makedirs( self.__favorites_path, mode=self.DESIRED_FAVORITES_DIRECTORY_MODE ) + except : + self.gui_status_message( _("Error while creating configuration folder (%s)") % sys.exc_info()[1] ) + diff --git a/debian/patches/series b/debian/patches/series index 5046408..fbaa314 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 0006-ups-conf-maxretry.patch 0007-killpower-path.patch 0008-drop-w3c-icons.patch +0009-fix-favorites-permissions.patch From f8cfca1b183d27f69da4b08930b96415f7fc0875 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 17 Feb 2015 10:01:35 +0100 Subject: [PATCH 172/300] Release to unstable --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8332b74..ac59e51 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nut (2.7.2-2) UNRELEASED; urgency=medium +nut (2.7.2-2) unstable; urgency=medium [ Laurent Bigonville ] * debian/gbp.conf: Switch to debian-jessie branch @@ -13,7 +13,7 @@ nut (2.7.2-2) UNRELEASED; urgency=medium left over from old installations during NUT-Monitor startup. (Closes: #777706) - -- Michael Fincham Fri, 13 Feb 2015 11:39:10 +1300 + -- Laurent Bigonville Tue, 17 Feb 2015 09:54:11 +0100 nut (2.7.2-1.1) unstable; urgency=medium From 47e0e45e3531240f8a08faa025acd982efa01de6 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 17 Feb 2015 10:43:27 +0100 Subject: [PATCH 173/300] debian/NEWS: Fix NEWS file syntax --- debian/NEWS | 12 ++++++------ debian/changelog | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/debian/NEWS b/debian/NEWS index 53ca695..c943bb7 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,13 +1,13 @@ nut (2.7.2-2) unstable; urgency=medium - Since version 1.2 NUT-Monitor uses safer directory permissions when - creating ~/.nut-monitor. + Since version 1.2 NUT-Monitor uses safer directory permissions when + creating ~/.nut-monitor. - NUT-Monitor will now detect a pre-1.2 settings directory on startup - and update its permissions. + NUT-Monitor will now detect a pre-1.2 settings directory on startup + and update its permissions. - Please note that passwords stored in NUT-Monitor prior to this change - may have been exposed, and it is recommended that they be reset. + Please note that passwords stored in NUT-Monitor prior to this change + may have been exposed, and it is recommended that they be reset. -- Michael Fincham Fri, 13 Feb 2015 11:57:12 +1300 diff --git a/debian/changelog b/debian/changelog index ac59e51..5e7a799 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nut (2.7.2-3) UNRELEASED; urgency=medium + + * debian/NEWS: Fix NEWS file syntax + + -- Laurent Bigonville Tue, 17 Feb 2015 10:40:24 +0100 + nut (2.7.2-2) unstable; urgency=medium [ Laurent Bigonville ] From 64e656ba48ad625257835f9baad856f2e13ab9bf Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 17 Feb 2015 23:17:22 +0100 Subject: [PATCH 174/300] Release to unstable The changelog was not changed before releasing 2.7.2-3 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5e7a799..e31806e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -nut (2.7.2-3) UNRELEASED; urgency=medium +nut (2.7.2-3) unstable; urgency=medium * debian/NEWS: Fix NEWS file syntax - -- Laurent Bigonville Tue, 17 Feb 2015 10:40:24 +0100 + -- Laurent Bigonville Tue, 17 Feb 2015 23:13:02 +0100 nut (2.7.2-2) unstable; urgency=medium From 5dc71af1098a1774681f6cf632488e31a6f7a349 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 15 Mar 2015 11:14:01 +0100 Subject: [PATCH 175/300] Really fix package initial installation when PID1 is systemd (Closes: #747863) --- debian/changelog | 7 +++++++ debian/nut-client.postinst | 11 +++++++++++ debian/nut-client.prerm | 13 +++++++++++++ debian/nut-server.postinst | 13 +++++++++++++ debian/nut-server.prerm | 7 +++++++ debian/rules | 4 ++-- 6 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 debian/nut-client.prerm diff --git a/debian/changelog b/debian/changelog index e31806e..d2a67f2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nut (2.7.2-4) UNRELEASED; urgency=medium + + * Really fix package initial installation when PID1 is systemd (Closes: + #747863) + + -- Laurent Bigonville Fri, 20 Mar 2015 00:44:01 +0100 + nut (2.7.2-3) unstable; urgency=medium * debian/NEWS: Fix NEWS file syntax diff --git a/debian/nut-client.postinst b/debian/nut-client.postinst index 4b04850..5d68dae 100644 --- a/debian/nut-client.postinst +++ b/debian/nut-client.postinst @@ -1,5 +1,16 @@ #!/bin/sh -e +handle_start_failure () { +# The nut client part (upsmon) must run in all cases except when MODE in +# /etc/nut/nut.conf is set to "none" or not set at all. + [ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf + if [ -d /run/systemd/system ] && [ "$MODE" = "none" -o -z "$MODE" ]; then + return 0 + else + return 1 + fi +} + case "$1" in configure) diff --git a/debian/nut-client.prerm b/debian/nut-client.prerm new file mode 100644 index 0000000..e45a69b --- /dev/null +++ b/debian/nut-client.prerm @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +handle_start_failure () { +# The MODE defined in /etc/nut/nut.conf shouldn't affect the exit code when the +# daemon is stopped. If it fails to stop, the maintainer script should fail +# too. + return 1 +} + +#DEBHELPER# + +exit 0 diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index 3322126..f0e05c2 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -1,5 +1,18 @@ #!/bin/sh -e +handle_start_failure () { +# The nut server part (upsd) must run in all cases except when MODE in +# /etc/nut/nut.conf is set to "none", not set at all or if the machine is a +# client. + [ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf + if [ -d /run/systemd/system ] \ + && [ "$MODE" = "none" -o "$MODE" = "netclient" -o -z "$MODE" ]; then + return 0 + else + return 1 + fi +} + case "$1" in configure) diff --git a/debian/nut-server.prerm b/debian/nut-server.prerm index 6292ef8..b68c6d8 100644 --- a/debian/nut-server.prerm +++ b/debian/nut-server.prerm @@ -4,6 +4,13 @@ # because we don't want the daemon to be # stopped during an upgrade +handle_start_failure () { +# The MODE defined in /etc/nut/nut.conf shouldn't affect the exit code when the +# daemon is stopped. If it fails to stop, the maintainer script should fail +# too. + return 1 +} + case "$1" in remove) diff --git a/debian/rules b/debian/rules index c667da4..26bab23 100755 --- a/debian/rules +++ b/debian/rules @@ -119,8 +119,8 @@ common-install-indep:: binary-install/nut-monitor:: dh_python2 -pnut-monitor -DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut-server --restart-after-upgrade -DEB_DH_INSTALLINIT_ARGS_nut-client := --init-script=nut-client --restart-after-upgrade +DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut-server --restart-after-upgrade --error-handler=handle_start_failure +DEB_DH_INSTALLINIT_ARGS_nut-client := --init-script=nut-client --restart-after-upgrade --error-handler=handle_start_failure DEB_DH_SYSTEMD_START_ARGS_nut-server := --restart-after-upgrade DEB_DH_SYSTEMD_START_ARGS_nut-client := --restart-after-upgrade DEB_DH_COMPRESS_ARGS_nut-doc := -X.pdf From 564becd819124049542e5085a7159dd62e00ef97 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 20 Mar 2015 23:13:01 +0100 Subject: [PATCH 176/300] Release to unstable --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d2a67f2..37bfd60 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -nut (2.7.2-4) UNRELEASED; urgency=medium +nut (2.7.2-4) unstable; urgency=medium * Really fix package initial installation when PID1 is systemd (Closes: #747863) - -- Laurent Bigonville Fri, 20 Mar 2015 00:44:01 +0100 + -- Laurent Bigonville Fri, 20 Mar 2015 23:12:53 +0100 nut (2.7.2-3) unstable; urgency=medium From fd413a316856dd5d5cd6aa815da07191595c83fb Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 30 Apr 2015 15:53:36 +0200 Subject: [PATCH 177/300] Imported Upstream version 2.7.3 --- AUTHORS | 4 + ChangeLog | 1120 ++++++++++++++++++++ INSTALL | 12 +- INSTALL.nut | 4 +- Makefile.am | 34 +- Makefile.in | 364 ++++--- NEWS | 70 ++ UPGRADING | 24 + aclocal.m4 | 885 ++++++++++------ clients/Makefile.in | 387 ++++--- clients/upsclient.c | 17 +- clients/upslog.c | 9 + common/Makefile.in | 253 +++-- common/common.c | 29 +- conf/Makefile.am | 2 +- conf/Makefile.in | 126 ++- conf/ups.conf.sample | 15 + conf/upsmon.conf.sample | 377 ------- conf/upsmon.conf.sample.in | 7 +- config.guess | 346 +++--- config.sub | 113 +- configure | 1068 ++++++++++++++----- configure.ac | 88 +- data/Makefile.in | 277 ++--- data/cmdvartab | 11 + data/driver.list.in | 79 +- data/html/Makefile.in | 114 +- depcomp | 457 ++++---- docs/FAQ.txt | 185 +++- docs/Makefile.am | 9 +- docs/Makefile.in | 270 ++--- docs/cables.txt | 65 +- docs/chunked.xsl | 5 - docs/common.xsl | 18 + docs/config-notes.txt | 6 +- docs/configure.txt | 10 +- docs/developers.txt | 80 +- docs/docinfo.xml | 10 - docs/docinfo.xml.in | 23 + docs/documentation.txt | 10 +- docs/download.txt | 9 +- docs/features.txt | 2 +- docs/history.txt | 2 +- docs/images/cables/mge-usb-rj45.jpg | Bin 0 -> 13921 bytes docs/man/Makefile.am | 58 +- docs/man/Makefile.in | 183 +++- docs/man/al175.8 | 15 +- docs/man/apcsmart-old.8 | 8 +- docs/man/apcsmart.8 | 78 +- docs/man/apcsmart.txt | 80 +- docs/man/apcupsd-ups.8 | 8 +- docs/man/asciidoc.conf | 4 + docs/man/asem.8 | 87 ++ docs/man/asem.txt | 83 ++ docs/man/bcmxcp.8 | 16 +- docs/man/bcmxcp_usb.8 | 8 +- docs/man/belkin.8 | 8 +- docs/man/belkinunv.8 | 8 +- docs/man/bestfcom.8 | 8 +- docs/man/bestfortress.8 | 8 +- docs/man/bestuferrups.8 | 8 +- docs/man/bestups.8 | 8 +- docs/man/blazer_ser.8 | 8 +- docs/man/blazer_usb.8 | 11 +- docs/man/clone.8 | 8 +- docs/man/dummy-ups.8 | 16 +- docs/man/dummy-ups.txt | 14 +- docs/man/etapro.8 | 8 +- docs/man/everups.8 | 8 +- docs/man/gamatronic.8 | 8 +- docs/man/genericups.8 | 8 +- docs/man/hosts.conf.5 | 8 +- docs/man/isbmex.8 | 8 +- docs/man/ivtscd.8 | 8 +- docs/man/libnutclient.3 | 8 +- docs/man/libnutclient_commands.3 | 8 +- docs/man/libnutclient_devices.3 | 8 +- docs/man/libnutclient_general.3 | 8 +- docs/man/libnutclient_misc.3 | 8 +- docs/man/libnutclient_tcp.3 | 8 +- docs/man/libnutclient_variables.3 | 8 +- docs/man/libupsclient-config.1 | 8 +- docs/man/liebert-esp2.8 | 8 +- docs/man/liebert.8 | 8 +- docs/man/macosx-ups.8 | 8 +- docs/man/masterguard.8 | 8 +- docs/man/metasys.8 | 8 +- docs/man/mge-shut.8 | 8 +- docs/man/mge-utalk.8 | 8 +- docs/man/microdowell.8 | 8 +- docs/man/netxml-ups.8 | 8 +- docs/man/nut-ipmipsu.8 | 11 +- docs/man/nut-recorder.8 | 8 +- docs/man/nut-scanner.8 | 25 +- docs/man/nut-scanner.txt | 4 +- docs/man/nut.conf.5 | 10 +- docs/man/nut.conf.txt | 2 +- docs/man/nutdrv_atcl_usb.8 | 8 +- docs/man/nutdrv_qx.8 | 142 ++- docs/man/nutdrv_qx.txt | 72 +- docs/man/nutscan.3 | 16 +- docs/man/nutscan_add_device_to_device.3 | 8 +- docs/man/nutscan_add_option_to_device.3 | 8 +- docs/man/nutscan_cidr_to_ip.3 | 8 +- docs/man/nutscan_display_parsable.3 | 8 +- docs/man/nutscan_display_ups_conf.3 | 8 +- docs/man/nutscan_free_device.3 | 8 +- docs/man/nutscan_get_serial_ports_list.3 | 8 +- docs/man/nutscan_init.3 | 8 +- docs/man/nutscan_new_device.3 | 8 +- docs/man/nutscan_scan_avahi.3 | 8 +- docs/man/nutscan_scan_eaton_serial.3 | 8 +- docs/man/nutscan_scan_ipmi.3 | 8 +- docs/man/nutscan_scan_nut.3 | 8 +- docs/man/nutscan_scan_snmp.3 | 8 +- docs/man/nutscan_scan_usb.3 | 8 +- docs/man/nutscan_scan_xml_http.3 | 8 +- docs/man/nutupsdrv.8 | 8 +- docs/man/oneac.8 | 8 +- docs/man/optiups.8 | 8 +- docs/man/powercom.8 | 8 +- docs/man/powerman-pdu.8 | 8 +- docs/man/powerpanel.8 | 8 +- docs/man/rhino.8 | 8 +- docs/man/richcomm_usb.8 | 8 +- docs/man/riello_ser.8 | 8 +- docs/man/riello_usb.8 | 8 +- docs/man/safenet.8 | 8 +- docs/man/snmp-ups.8 | 8 +- docs/man/solis.8 | 37 +- docs/man/solis.txt | 14 +- docs/man/tripplite.8 | 8 +- docs/man/tripplite_usb.8 | 14 +- docs/man/tripplite_usb.txt | 9 + docs/man/tripplitesu.8 | 8 +- docs/man/ups.conf.5 | 36 +- docs/man/ups.conf.txt | 31 + docs/man/upsc.8 | 8 +- docs/man/upscli_add_host_cert.3 | 8 +- docs/man/upscli_cleanup.3 | 8 +- docs/man/upscli_connect.3 | 8 +- docs/man/upscli_disconnect.3 | 8 +- docs/man/upscli_fd.3 | 8 +- docs/man/upscli_get.3 | 39 +- docs/man/upscli_get.txt | 18 +- docs/man/upscli_init.3 | 8 +- docs/man/upscli_list_next.3 | 12 +- docs/man/upscli_list_next.txt | 4 +- docs/man/upscli_list_start.3 | 15 +- docs/man/upscli_list_start.txt | 5 +- docs/man/upscli_readline.3 | 8 +- docs/man/upscli_sendline.3 | 8 +- docs/man/upscli_splitaddr.3 | 8 +- docs/man/upscli_splitname.3 | 8 +- docs/man/upscli_ssl.3 | 8 +- docs/man/upscli_strerror.3 | 8 +- docs/man/upscli_upserror.3 | 8 +- docs/man/upsclient.3 | 8 +- docs/man/upscmd.8 | 8 +- docs/man/upscode2.8 | 8 +- docs/man/upsd.8 | 8 +- docs/man/upsd.conf.5 | 11 +- docs/man/upsd.users.5 | 8 +- docs/man/upsdrvctl.8 | 8 +- docs/man/upsimage.cgi.8 | 8 +- docs/man/upslog.8 | 13 +- docs/man/upslog.txt | 12 +- docs/man/upsmon.8 | 12 +- docs/man/upsmon.conf.5 | 12 +- docs/man/upsmon.conf.txt | 5 +- docs/man/upsrw.8 | 8 +- docs/man/upssched.8 | 8 +- docs/man/upssched.conf.5 | 8 +- docs/man/upsset.cgi.8 | 8 +- docs/man/upsset.conf.5 | 8 +- docs/man/upsstats.cgi.8 | 8 +- docs/man/upsstats.html.5 | 8 +- docs/man/usbhid-ups.8 | 36 +- docs/man/usbhid-ups.txt | 13 +- docs/man/victronups.8 | 8 +- docs/new-drivers.txt | 30 +- docs/nut-names.txt | 97 +- docs/nut-qa.txt | 5 +- docs/nutdrv_qx-subdrivers.txt | 97 +- docs/packager-guide.txt | 2 +- docs/scheduling.txt | 2 +- docs/security.txt | 119 ++- docs/xhtml.xsl | 5 - drivers/Makefile.am | 21 +- drivers/Makefile.in | 901 ++++++++++------ drivers/apc-hid.c | 2 + drivers/apcsmart.c | 17 +- drivers/apcsmart.h | 2 +- drivers/asem.c | 373 +++++++ drivers/bcmxcp.c | 915 +++++++++++++--- drivers/bcmxcp.h | 30 + drivers/belkin-hid.c | 28 +- drivers/blazer_usb.c | 9 +- drivers/compaq-mib.c | 8 +- drivers/cps-hid.c | 53 +- drivers/dstate.c | 27 +- drivers/dstate.h | 4 + drivers/eaton-mib.c | 78 +- drivers/genericups.c | 38 + drivers/libhid.c | 10 +- drivers/libhid.h | 3 + drivers/libusb.c | 59 +- drivers/liebert-hid.c | 9 +- drivers/main.c | 27 +- drivers/mge-hid.c | 251 ++++- drivers/netvision-mib.c | 13 +- drivers/nutdrv_qx.c | 504 +++++++-- drivers/nutdrv_qx.h | 20 +- drivers/nutdrv_qx_bestups.c | 705 ++++++++++++ drivers/nutdrv_qx_bestups.h | 29 + drivers/nutdrv_qx_blazer-common.c | 61 +- drivers/nutdrv_qx_blazer-common.h | 2 + drivers/nutdrv_qx_mecer.c | 105 +- drivers/nutdrv_qx_megatec-old.c | 99 +- drivers/nutdrv_qx_megatec.c | 99 +- drivers/nutdrv_qx_mustek.c | 99 +- drivers/nutdrv_qx_q1.c | 89 +- drivers/nutdrv_qx_voltronic-qs-hex.c | 415 ++++++++ drivers/nutdrv_qx_voltronic-qs-hex.h | 29 + drivers/nutdrv_qx_voltronic-qs.c | 90 +- drivers/nutdrv_qx_voltronic.c | 783 +++++++------- drivers/nutdrv_qx_zinto.c | 99 +- drivers/openups-hid.c | 48 +- drivers/openups-hid.h | 7 +- drivers/powercom-hid.c | 205 +++- drivers/powercom.c | 34 +- drivers/powerware-mib.c | 28 +- drivers/riello_ser.c | 351 +++--- drivers/riello_usb.c | 455 ++++---- drivers/solis.c | 32 +- drivers/solis.h | 2 +- drivers/tripplite_usb.c | 254 ++++- drivers/usb-common.h | 2 + drivers/usbhid-ups.c | 41 +- include/Makefile.in | 182 ++-- include/common.h | 2 + include/config.h.in | 26 +- install-sh | 14 +- lib/Makefile.in | 117 +- ltmain.sh | 4 +- m4/libtool.m4 | 12 +- m4/nut_check_asciidoc.m4 | 21 +- missing | 412 +++---- scripts/Aix/nut-aix.spec.in | 330 ++++++ scripts/Makefile.in | 271 ++--- scripts/Solaris/Makefile.in | 114 +- scripts/augeas/Makefile.in | 109 +- scripts/augeas/nutupsconf.aug.in | 9 + scripts/devd/Makefile.in | 114 +- scripts/devd/nut-usb.conf.in | 233 ++-- scripts/hotplug/Makefile.in | 115 +- scripts/hotplug/libhid.usermap | 16 +- scripts/python/Makefile.am | 1 + scripts/python/Makefile.in | 111 +- scripts/python/app/NUT-Monitor | 41 +- scripts/python/app/gui-1.3.glade | 2 +- scripts/python/app/nut-monitor.appdata.xml | 42 + scripts/python/module/PyNUT.py | 37 +- scripts/subdriver/gen-snmp-subdriver.sh | 13 +- scripts/systemd/Makefile.in | 110 +- scripts/systemd/nut-server.service.in | 5 +- scripts/udev/Makefile.am | 10 +- scripts/udev/Makefile.in | 125 ++- scripts/udev/README | 4 +- scripts/udev/nut-usbups.rules.in | 16 +- scripts/upower/95-upower-hid.rules | 7 +- server/Makefile.in | 243 +++-- server/upsd.c | 6 +- test-driver | 139 +++ tests/Makefile.in | 704 +++++++++--- tools/Makefile.am | 3 +- tools/Makefile.in | 260 +++-- tools/nut-ddl-dump.sh | 53 + tools/nut-scanner/Makefile.am | 6 +- tools/nut-scanner/Makefile.in | 454 +++++--- tools/nut-scanner/nutscan-snmp.h | 18 +- tools/nut-scanner/nutscan-usb.h | 7 +- tools/nut-usbinfo.pl | 10 +- 283 files changed, 14978 insertions(+), 6511 deletions(-) delete mode 100644 conf/upsmon.conf.sample delete mode 100644 docs/docinfo.xml create mode 100644 docs/docinfo.xml.in create mode 100644 docs/images/cables/mge-usb-rj45.jpg create mode 100644 docs/man/asem.8 create mode 100644 docs/man/asem.txt create mode 100644 drivers/asem.c create mode 100644 drivers/nutdrv_qx_bestups.c create mode 100644 drivers/nutdrv_qx_bestups.h create mode 100644 drivers/nutdrv_qx_voltronic-qs-hex.c create mode 100644 drivers/nutdrv_qx_voltronic-qs-hex.h create mode 100644 scripts/Aix/nut-aix.spec.in create mode 100644 scripts/python/app/nut-monitor.appdata.xml create mode 100755 test-driver create mode 100755 tools/nut-ddl-dump.sh diff --git a/AUTHORS b/AUTHORS index 320efbe..c179b0c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -170,3 +170,7 @@ D: pwmib support for snmp-ups N: Kjell Claesson E: Kjell.claesson@epost.tidanet.se D: Author of bcmxcp driver, 3-phase work. + +N: Giuseppe Corbelli +E: giuseppe.corbelli@copanitalia.com +D: Author of asem driver diff --git a/ChangeLog b/ChangeLog index 1710194..96dc998 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,1051 @@ +2015-04-22 Arnaud Quette + + * configure.ac: Restore version 2.7.3 for release + * docs/security.txt: Missing link reference update The filename of + the previous GPG release key was not updated, leading to pointing + to the current release key + +2015-04-08 Nick Mayerhofer + + * docs/nutdrv_qx-subdrivers.txt, drivers/nutdrv_qx.c, + drivers/nutdrv_qx.h: nutdrv_qx: clarify docs/inline comments + +2015-04-16 Arnaud Quette + + * configure.ac: bump version to 2.7.3.1 + +2015-04-15 Arnaud Quette + + * configure.ac: update version to 2.7.3 + * docs/security.txt: Update release signature verification The + release manager key has change. Update the documentation to reflect + it, along with keeping necessary for checking the previous releases + * docs/download.txt: Fix formatting issue + * NEWS, UPGRADING: Final update for release 2.7.3 Complete the + release information for NUT 2.7.3 + * docs/maintainer-guide.txt: Store some comments for latter + processing + +2015-04-10 Arnaud Quette + + * drivers/mge-hid.c: Improve Eaton ABM support for USB/HID units As + per clarifications from David G. Miller (Eaton ABM expert) and + customers request, when ABM is enabled, we now both publish the + following as per the ABM information: - the 5 status bits + {charging, discharging, floating, resting, off} under + battery.charger.status - the 2 historical status bits {CHRG, + DISCHRG} under ups.status When ABM is disabled, we just publish the + 2 historical status bits {CHRG, DISCHRG} under ups.status, as per + UPS.PowerSummary.PresentStatus.{Charging,Discharging}, as done + previously + +2015-04-02 Arnaud Quette + + * conf/ups.conf.sample, docs/man/ups.conf.txt, drivers/dstate.c, + drivers/dstate.h, drivers/main.c: Improve synchronous driver flag + implementation The previous commit was suffering a number of + issues. The present commit fixes these, along with adding more + documentation and a better and more understandable implementation + code. Thanks to Daniele Pezzini for the thorough review Closes: + https://github.com/networkupstools/nut/issues/197 + +2015-04-01 Arnaud Quette + + * docs/man/ups.conf.txt, drivers/dstate.c, drivers/dstate.h, + drivers/main.c: Implement synchronous driver flag As per issue + #197, NUT drivers work by default in asynchronous mode. This means + that all data are pushed by the driver on the communication socket + to upsd (Unix socket on Unix, Named pipe on Windows) without + waiting for these data to be actually consumed. With some HW, such + as ePDUs, that can produce a lot of data, asynchronous mode may + cause some congestion, resulting in the socket to be full, and the + driver to appear as not connected. By enabling the 'synchronous' + flag, the driver will wait for data to be consumed by upsd, prior + to publishing more. This can be enabled either globally or per + driver. + +2015-04-07 Arnaud Quette + + * scripts/systemd/nut-server.service.in: Do not Require systemd nut- + driver for nut-server Put the Requires=nut-driver.service in + comment for nut-server systemd unit file. Thus we don't require + drivers to be successfully started! This was a change of behavior + compared to init SysV, and could prevent from accessing + successfully started drivers, or at least to audit a system + Closes: https://github.com/networkupstools/nut/issues/200 + +2015-04-04 Charles Lepple + + * UPGRADING: UPGRADING: mention SSL permissions (#199) + * docs/security.txt: NSS SSL documentation Addresses new behavior as + part of the NSS forking fix (#199). Formatting and wording fixed as + well. + +2015-04-04 Émilien Kia + + * server/upsd.c: Initialize SSL after deamonize and downgrade to + user. Fix issue #190 - upsd: NSS SSL only working in debug mode + https://github.com/networkupstools/nut/issues/190 + +2015-04-02 Arnaud Quette + + * drivers/eaton-mib.c: Better input.realpower handling for Eaton + ePDUs G2/G3 Improve the way we declare and process + input.realpower, in order to address the variations between Eaton + ePDUs G2 and G3 + +2015-03-19 Arnaud Quette + + * docs/nut-names.txt: Document new variables and commands addition + The variables and commands that were added were not described in + the NUT namespace document. These are: input.transfer.delay - + battery.energysave.load - battery.energysave.delay - + battery.charger.status - outlet.1.shutdown.return - + outlet.2.shutdown.return + * drivers/bcmxcp.c: Fix the letter case of ABM and outlets status + For more coherence with NUT status publication, these status are + now lower case + * drivers/bcmxcp.c: Add missing Author + +2014-10-10 gavrilov-i + + * data/cmdvartab, drivers/bcmxcp.c, drivers/bcmxcp.h: drivers/bcmxcp: + advanced features Closes: #158 Added setvar function exec result + parsing Add command to turn load on after shutdown.stayoff and + shutdown.return. Outlet control changed. Outlet control via + commands "outlet.n.load.on/off" like in other drivers. Variable + outlet.n.staus now only for reading. Some code changes in + outlet.n.shutdown.return command - now supporting more than 3 + outlets (up to 9). Add descriptions to new and some old variables + and commands. Add "bypass.start" command, for enabling bypass. For + returning in On-Line mode exec "load.on" command. Additional + checks of UPS vars. Now add zero var only if it could be changed. + +2015-04-01 Arnaud Quette + + * drivers/eaton-mib.c: Workaround input.{power,realpower} for Eaton + ePDUs Add variable declarations to handle missing + input.{power,realpower} on Eaton ePDUs G2 and G3 1phase. On 3phase, + these variables point at SNMP OIDs that sum up the 3 phases + information. These OIDs should also be present on 1phase, however + it's actually not the case. So simply duplicate the L1 declaration + +2015-03-31 Arnaud Quette + + * drivers/powerware-mib.c: Implement battery.charger.status for Eaton + SNMP This new official variable now replaces the historic + 'vendor.specific.abmstatus', as per other similar implementations + (in usbhid-ups and bcmxcp drivers) + +2015-03-27 Arnaud Quette + + * drivers/mge-hid.c: Implement Eaton ABM support for USB/HID units + Add support for Eaton Advanced Battery Monitoring, for USB/HID + units. Information are provided through the new + battery.charger.status. For now, at least, when ABM is enabled, the + historic CHRG and DISCHRG flags are not published anymore in + ups.status + +2015-03-25 Daniele Pezzini + + * drivers/nutdrv_qx_voltronic.c: nutdrv_qx: add support in + 'voltronic' subdriver for P13 protocol + +2015-03-24 Arnaud Quette + + * drivers/mge-hid.c: Complementary Energy Saving data for Eaton USB + devices Add a 2nd HID path for battery.energysave.delay. Depending + on the exact device model, different implementations may be used + +2015-03-22 Daniele Pezzini + + * NEWS: nutdrv_qx: update NEWS about new 'fuji' USB subdriver + +2015-03-21 Daniele Pezzini + + * drivers/nutdrv_qx.c, drivers/nutdrv_qx.h: nutdrv_qx: typedef + testing_t only if TESTING is #defined First reported by GitHub + user @nickma82 + * docs/man/nutdrv_qx.txt, docs/nutdrv_qx-subdrivers.txt: nutdrv_qx: + document 'voltronic-qs-hex' subdriver in man pages + * docs/man/nutdrv_qx.txt, drivers/nutdrv_qx_bestups.c, drivers + /nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer-common.h, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs-hex.c, + drivers/nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_zinto.c: + nutdrv_qx: add 'ignoresab' flag to support bogus devices Some + UPSes incorrectly report the 'Shutdown Active' bit (7th bit of the + 'status byte') as always on (=1), consequently making the driver + believe the UPS is nearing a shutdown (and, as a result, ups.status + always contains FSD). To workaround this issue, add a new + 'ignoresab' flag that makes the driver do just what its name tells + (IGNORE Status Active Bit) skipping the relative item in qx2nut + tables. References: - http://lists.alioth.debian.org/pipermail + /nut-upsdev/2015-March/006896.html - + https://github.com/networkupstools/nut/issues/195 + +2015-03-11 Arnaud Quette + + * data/cmdvartab, docs/nut-names.txt: Add some new variable names, + related to ePDUs Add new variables names, related to ePDUs, such + as input.*.load, input.*.realpower and input.*.power + * drivers/eaton-mib.c: Minor update to comments + +2015-02-04 Arnaud Quette + + * drivers/eaton-mib.c: Fix outlet.{power,realpower} data mapping + According to the new mapping using the input collection, these two + data mapping were targeting at the wrong OIDs. + +2015-02-03 Arnaud Quette + + * drivers/eaton-mib.c: Fix and complete a bit Eaton ePDUs support + Add some new data mapping to improve support for Eaton ePDUs. This + commit includes some new NUT data names that requires approval + before being merged + +2015-03-19 Arnaud Quette + + * data/cmdvartab, docs/nut-names.txt, drivers/mge-hid.c: Add more + Energy Saving features for Eaton USB devices Add two new Energy + Saving features: - battery.energysave.delay: to configure the delay + before switching off the UPS if running on battery and load level + low (in minutes) - battery.energysave.realpower: to switch off the + UPS if running on battery and power consumption on UPS output is + lower than this value (expressed in Watts). Note that documentation + in nut-names.txt and cmdvartab was limited to difference with an + upcoming branch merge, that will add the others + * drivers/mge-hid.c: Align Energy Saving variable names Change + ups.load.energysave to battery.energysave.load, to be coherent with + the latest commit made in the bcmxcp driver + +2015-03-10 Arnaud Quette + + * data/cmdvartab, drivers/mge-hid.c: Add a new EnergySaving threshold + for Eaton UPSs Add 'ups.load.energysave' parameter, to enable + energy saving when the power consumption on the UPS output drops + below this value (in percent). This new variable however requires + to go through the NUT RFC process to get approved + +2015-03-19 Arnaud Quette + + * tools/Makefile.am: Also distribute nut-ddl-dump.sh helper script + +2015-03-18 Daniele Pezzini + + * data/driver.list.in: HCL: EUROCASE EA200N 2000VA supported by + nutdrv_qx Protocol: 'megatec' USB subdriver: 'fuji' Reference: ht + tp://thread.gmane.org/gmane.comp.monitoring.nut.user/8808/focus=908 + 1 + * drivers/nutdrv_qx_bestups.c, drivers/nutdrv_qx_blazer-common.c, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs-hex.c, + drivers/nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_zinto.c: + nutdrv_qx: remove redundancy in blazer-common-dependent subdrivers + Since main nutdrv_qx driver already sets an alarm when FSD arises + (see nutdrv_qx.c>ups_alarm_set()), there is no need to do so in the + various subdrivers. So, in order to prevent a duplicated alarm + message, remove all unneeded code from the affected subdrivers (all + the ones that depend on nutdrv_qx_blazer-common). + +2015-03-17 Daniele Pezzini + + * data/driver.list.in: HCL: update Mecer ME-1000-WTU (supported by + nutdrv_qx) Tested by @sliverc (Oliver Sauder) on NUT 2.7.1 + Reference: https://github.com/networkupstools/nut/issues/148 + +2015-03-16 Daniele Pezzini + + * docs/man/nutdrv_qx.txt: nutdrv_qx: document USB subdrivers' + glitches + * drivers/nutdrv_qx.c: nutdrv_qx: add workaround in 'fuji' subdriver + to support all shutdown.returns As 'fuji' subdriver discards all + the commands of more than 3 characters, in order to support 'SnRm' + shutdown.returns (and hence the standard 'S.5R0003' shutdown.return + with DEFAULT_{ON,OFF}DELAYs) map 'SnRm' shutdown.returns to the + corresponding 'Sn' commands, meanwhile ignoring ups.delay.start and + making the UPS turn on the load as soon as power is back. + * drivers/nutdrv_qx.c: nutdrv_qx: fix command handling in 'fuji' + subdriver 'fuji' subdriver supported devices only allow one 8 + bytes interrupt as a command/query: make the subdriver discard (and + echo back) all the too long commands. + +2014-11-08 Daniele Pezzini + + * docs/man/nutdrv_qx.txt: nutdrv_qx: update man for the new 'fabula' + and 'fuji' USB subdrivers + +2014-06-26 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: add new 'fuji' USB subdriver Add a + new USB subdriver ('fuji') to support models manufactured by Fuji + (and others) and accompained by UPSmart2000I software. + +2015-03-15 Charles Lepple + + * docs/developers.txt, docs/new-drivers.txt: doc: document build + dependencies, etc. Closes: + https://github.com/networkupstools/nut/issues/189 + * docs/nutdrv_qx-subdrivers.txt: doc: fold a few long preformatted + lines in nutdrv_qx developer guide + * docs/FAQ.txt: docs: FAQ update This addresses several issues: * + https://github.com/networkupstools/nut/issues/19 * + https://github.com/networkupstools/nut/issues/191 and Closes: + https://github.com/networkupstools/nut/issues/161 + * docs/man/Makefile.am: docs/man: provide additional detail for + missing asciidoc/a2x error + * configure.ac: configure: indicate required version of + Asciidoc/A2X/dblatex Still doesn't address data-only packages like + docbook-xsl, so leaving this issue open. Reference: + https://github.com/networkupstools/nut/issues/162 + * docs/Makefile.am, docs/man/Makefile.am: Pass --nonet to xsltproc + This prevents xsltproc from downloading DocBook XSL files for each + step in the documentation build process. Reference: + https://github.com/networkupstools/nut/issues/172 Still need to + document what to do if the build fails. + +2015-03-10 Arnaud Quette + + * docs/documentation.txt: Reference DDL on the Documentation page + Add a reference to the NUT Devices Dumps Library (DDL) on the + Documentation page, both for the website and the distributed + documentation. There are separate references, to distinguish the + DDL interest from a user and a developer point of view + +2015-03-06 Arnaud Quette + + * tools/nut-ddl-dump.sh: First stab at a helper script to generate + device dumps This preliminary version only generates .dev (static) + dump files. However, a merge with nut-recorder.sh, which generates + .seq files (dynamic simulation) is to be considered, along with an + improved version for the newer .nds format + +2015-02-24 Charles Lepple + + * data/driver.list.in: HCL: CPS Value 1500ELCD-RU @ 2.6.3 Source: + http://news.gmane.org/find- + root.php?message_id=1423241134.6830.8.camel%40ignatev + * data/driver.list.in: HCL: JAWAN JW-UPSLC02 with blazer_usb @ 2.7.2 + Source: http://news.gmane.org/find-root.php?message_id=SNT404%2dEAS + 8312A94DDAF0FAD4B7702BA52A0%40phx.gbl + +2015-02-22 Charles Lepple + + * scripts/python/app/NUT-Monitor, scripts/python/app/gui-1.3.glade: + NUT-Monitor: updated version to 1.3.1 + +2015-02-14 Charles Lepple + + * NEWS, UPGRADING: NEWS/UPGRADING for 2.7.3 + +2015-02-14 Daniele Pezzini + + * docs/man/nutdrv_qx.txt: nutdrv_qx: specify 'bestups' ranges in man + pages + +2015-01-03 Daniele Pezzini + + * drivers/nutdrv_qx_bestups.c: nutdrv_qx: bestups - add support for + 'M' query + +2014-11-02 Daniele Pezzini + + * docs/man/nutdrv_qx.txt, docs/nutdrv_qx-subdrivers.txt: nutdrv_qx: + update man pages for new 'bestups' subdriver + * drivers/Makefile.am, drivers/nutdrv_qx.c, + drivers/nutdrv_qx_bestups.c, drivers/nutdrv_qx_bestups.h: + nutdrv_qx: add BestUPS subdriver (protocol=bestups) A subdriver + using Best Power/Sola Australia protocol as described in + http://www.networkupstools.org/protocols/sola.html Based also on + bestups.c and meant to eventually replace it. + +2015-02-14 Michael Fincham + + * scripts/python/app/NUT-Monitor: Correct unsafe permissions on + ~/.nut-monitor (Debian #777706) fix-permissions-on-start.debdiff + from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777706#24 + Closes: https://github.com/networkupstools/nut/issues/185 + +2015-02-14 Michal Soltys + + * drivers/apcsmart.c: apcsmart: fix SEGV in apc_getcaps() ups ... + +2015-02-13 Michal Soltys + + * drivers/apcsmart.c, drivers/apcsmart.h: apcsmart: fix command set + parsing for protocol version 4 The issue was discovered with + Smart-UPS RT 10000 XL by surr, see + https://github.com/networkupstools/nut/issues/180 When protocol + version is 4, command set query returns string with additional + section after another '.' . This patch updates the code to handle + such string as well. + +2015-02-10 Charles Lepple + + * configure.ac: configure.ac: bump version to 2.7.2.6 for snapshots + * scripts/upower/95-upower-hid.rules: upower: regenerate for Powercom + PID 0001 (PR #121) + * configure.ac: configure.ac: add bug report URL Should be + compatible with Autoconf 2.59 and newer. + +2015-02-04 Arnaud Quette + + * drivers/netvision-mib.c: Improve support for on-battery detection + Add support for upsAlarmOnBattery OID, to better detect on-battery + events (reported by Henning Fehrmann) + * drivers/libhid.c, drivers/libhid.h: Fix compilation warning related + to sign comparison + +2015-01-31 Ryan Underwood + + * drivers/apc-hid.c, scripts/upower/95-upower-hid.rules: Add a + product ID for APC AP9584 USB kit. Resolves + networkupstools/nut#181 + +2015-01-12 Charles Lepple + + * scripts/upower/95-upower-hid.rules: upower: regenerate rules file + for OpenUPS PID 0xd005 + * Makefile.am: Add systemd unit dir fix for 'make distcheck' + +2015-01-11 Sergey Kvachonok + + * configure.ac: Undo ${systemdsystemunitdir} mangling. Running sed + 's/\/lib/\${libdir}/' destroys any ${systemdsystemunitdir} values + that don't start with '/lib' e.g. '/usr/lib64/systemd/system' + becomes '/usr/usr/lib6464/systemd/system'. If a local installation + prefix is needed use appropriately prefixed --with- + systemdsystemunitdir='' parameter instead. + +2015-01-02 Charles Lepple + + * docs/cables.txt, docs/config-notes.txt, docs/configure.txt, + docs/features.txt, docs/history.txt, docs/man/nutdrv_qx.txt, docs + /nut-names.txt, docs/scheduling.txt, docs/security.txt: docs: typo + fixes + +2015-01-01 Charles Lepple + + * docs/cables.txt: docs: MGE NMC pinout Closes + https://github.com/networkupstools/nut/issues/141 + * docs/cables.txt: docs: Best Power cable pinout Closes + https://github.com/networkupstools/nut/issues/164 + * INSTALL.nut: docs: clarify group ownership of directory in + INSTALL.nut Closes + https://github.com/networkupstools/nut/issues/151 + * docs/man/dummy-ups.txt: docs: dummy-ups repeater mode requires `@` + in port name Also reworded parts of the man page. + +2014-12-17 bsalvador + + * drivers/solis.c: Update solis.c to force ScanReceivePack() + +2014-12-12 Andy Juniper + + * clients/upslog.c, docs/man/upslog.txt: upslog: break out of sleep + on SIGUSR1 and log immediately Reference: http://news.gmane.org + /find-root.php?message_id=54863D44.3000902%40freeuk.com + +2014-11-25 Charles Lepple + + * data/driver.list.in: HCL: additional NHS models + +2014-11-17 Charles Lepple + + * data/driver.list.in: HCL: NHS Sistemas de Energia: Expert C + Isolador series Source: http://news.gmane.org/find-root.php?messag + e_id=CADe06rfE5MA%3dyWDZzofPsC7TOgGOU4TRSoi67uMXedymA9L7ow%40mail.g + mail.com + +2014-11-07 Arnaud Quette + + * scripts/subdriver/gen-snmp-subdriver.sh: Various minor fixes to the + SNMP subdriver generator + +2014-11-06 Charles Lepple + + * drivers/openups-hid.c: openups-hid: Fix scale factors for 0xd005 + (0.4) Previous commit had extra scale factors applied. + * drivers/openups-hid.c, drivers/openups-hid.h: openups-hid: voltage + scale factors based on product IDs + * drivers/openups-hid.c: openups-hid: remove a const; this will + require more thought The USB matching routines should have their + parameters marked as "const" to indicate that they do not modify + the matching tables, but that will require more invasive changes. + Roll this back for now. + +2014-11-05 Charles Lepple + + * drivers/openups-hid.c: openups-hid: const and float/double fixups + (0.2) + * drivers/openups-hid.c: openups-hid: add USB ProductID d005 for + OpenUPS2 + +2014-11-05 Arnaud Quette + + * Makefile.am: Store the git start point as a variable For + ChangeLog, we now store the git start point (older reference) in a + separate variable, to make the process more clear + +2014-10-31 Charles Lepple + + * docs/download.txt: Update VMware ESXi package link (from René + Garcia) + +2014-10-29 Charles Lepple + + * scripts/upower/95-upower-hid.rules: upower: Update Belkin and + Liebert rules Follow-up to issue #159. + * drivers/belkin-hid.c, drivers/liebert-hid.c: usbhid-ups: comments + describing Belkin/Liebert/Phoenixtec situation Follow-up to issue + #159. + * data/driver.list.in: HCL: Rucelf UPOII-3000-96-EL supported by + blazer_ser Manufacturer: + http://www.rucelf.ua/en/catalog/upoii-3000-96-el/ Closes: + https://github.com/networkupstools/nut/issues/165 + +2014-10-28 Elio Parisi + + * drivers/riello_usb.c: riello_usb: explicitly claim USB interface + Reference: http://news.gmane.org/find-root.php?message_id=7731ed2f9 + 8014b8a90e695a06d077970%40AM3PR07MB289.eurprd07.prod.outlook.com + and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=738122 + +2014-10-20 Elio Parisi + + * drivers/riello_usb.c: riello_usb: timeouts and error handling + (0.03) Small changes in riello_usb.c that solved some problem with + managing transmission errors between the Raspberry Pi and Riello + ups (thanks to Fredrik Öberg): introducing timeout in reading ups + data in cypress_command; enhanced handling error codes + http://news.gmane.org/find-root.php?message_id=f5294e5579574bcbaf5c + dd95523e0b68%40AM3PR07MB289.eurprd07.prod.outlook.com + * drivers/riello_ser.c: riello_ser: enhanced handling error codes + (0.03) + +2014-10-20 Charles Lepple + + * docs/.gitignore: docs: docinfo.xml is now auto-generated + +2014-10-20 Nik Soggia + + * drivers/Makefile.am: missing -lm in drivers/Makefile.am Both + bcmxcp and bcmxcp_usb use ldexp(), so both need `-lm`. + http://news.gmane.org/find- + root.php?message_id=544515BA.4060804%40niksoggia.it + +2014-10-10 Paul Chavent + + * drivers/belkin-hid.c: drivers : add Liebert GXT3 device. + * drivers/main.c: drivers : fix possible memory leak. In arguments + parsing, if user option is passed. + +2014-09-30 Michal Soltys + + * drivers/apcsmart.c: apcsmart: increase passes in setvar_enum() + Current 6 is not enough for bigger units - especially if we swap to + the value directly preceeding the current setting. + +2014-09-27 Daniele Pezzini + + * configure.ac, docs/Makefile.am, docs/docinfo.xml, + docs/docinfo.xml.in: docs: add NUT version number/date in PDF + documents Reference: + https://github.com/networkupstools/nut/issues/150 + * docs/chunked.xsl, docs/common.xsl, docs/xhtml.xsl: docs: move + DocBook options common to html stylesheets to common.xsl + * docs/Makefile.am, docs/common.xsl: docs: add NUT version + number/date into footer of HTML pages Reference: + https://github.com/networkupstools/nut/issues/150 + +2014-09-28 Arnaud Quette + + * docs/configure.txt: Clarify a bit more Avahi build requirements + * tools/nut-scanner/Makefile.am: Don't reference subdir-object with + $(top_srcdir) Replace references to objects in separate + directories that were using $(top_srcdir) by the expanded version + '../../'. The variable was otherwise part of the path, resulting in + build failures. This completes commit f8abb9b Closes + networkupstools/nut#155 + * configure.ac: Explicitly use subdir-objects in automake init + Closes networkupstools/nut#155 + +2014-09-27 Arnaud Quette + + * configure.ac, m4/nut_check_asciidoc.m4: Also check for source- + highlight at configure time source-highlight is used for + documentation generation. It's however optional, so we just check + for the sake of completion + +2014-09-27 Arnaud Quette + + * docs/man/Makefile.am, docs/man/asciidoc.conf: Add NUT version + number into footer of HTML man pages Override AsciiDoc default for + footer-txt to include NUT version number into footer of HTML man + pages. This commit addresses the 2nd point of + networkupstools/nut#150 + +2014-09-26 Charles Lepple + + * drivers/tripplite_usb.c: tripplite_usb: set input.voltage.nominal + back to 230V (0.30) Keeps the input.voltage and output.voltage + scaling from 0.28 Discussion: + http://article.gmane.org/gmane.comp.monitoring.nut.user/8719 + +2014-09-26 Arnaud Quette + + * conf/upsmon.conf.sample.in, docs/man/nut.conf.txt, + docs/man/upsmon.conf.txt, docs/packager-guide.txt: Replace outdated + references to shutdown.txt shutdown.txt was merged into config- + notes.txt during the AsciiDoc conversion of the whole documentation + and website. This content is now available in the docs/config- + notes.txt file, section [[UPS_shutdown]] "Configuring automatic + shutdowns for low battery events" + * conf/upsmon.conf.sample.in: Fix default value of POWERDOWNFLAG + POWERDOWNFLAG path changed from the hard-coded value /etc/killpower + to the build-time generated @CONFPATH@/killpower. This resulted in + an unexpected value '/etc/nut/killpower', at least on Debian. + (reported by Laurent Bigonville) Closes networkupstools/nut#74 + +2014-09-25 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: move to ltrim_m()/rtrim_m() + functions + * common/common.c, include/common.h: Add ltrim_m()/rtrim_m() + functions to trim several chars at the same time Also, make + ltrim() / rtrim() wrappers around ltrim_m() / rtrim_m(). + * common/common.c: Make ltrim() modify the input string Also, always + check string length in both ltrim() and rtrim(). Reference: + https://github.com/networkupstools/nut/issues/154 + +2014-09-25 Charles Lepple + + * data/driver.list.in: HCL: sort Tripp Lite models by name, then + increasing power I know this doesn't allow the cell merging code + to do as much, but this should make it easier to find models. + * data/driver.list.in: HCL: add Tripp Lite OMNIVSINT800 + (tripplite_usb) Source: + http://article.gmane.org/gmane.comp.monitoring.nut.user/8713 + * drivers/tripplite_usb.c: tripplite_usb: scale min/max voltages for + SMART protocol (0.29) Observed in a dump file from driver version + 0.11. Scale input.voltage.minimum and input.voltage.maximum the + same way as other voltages. + * drivers/tripplite_usb.c: tripplite_usb: fix voltage scaling for + 240V/1001 (0.28) Reported by Dave Williams: + http://article.gmane.org/gmane.comp.monitoring.nut.user/8713 The + input.voltage and output.voltage scaling for Protocol 1001 did not + factor in the input_voltage_scaled value. + +2014-09-24 Arnaud Quette + + * scripts/python/app/nut-monitor.appdata.xml: Fix compliance of NUT- + Monitor FreeDesktop AppData file Following the upstream update (by + David Goncalves), update the screenshots width and height to + conform to AppData specification: + http://people.freedesktop.org/~hughsient/appdata/ Closes + networkupstools/nut#127 + +2014-05-18 Charles Lepple + + * drivers/genericups.c: genericups: log cable type overrides as they + are parsed Fixes networkupstools/nut#28 Better than nothing, but + without a unit to test against, I don't want to make any more + intrusive changes. + +2014-09-17 Arnaud Quette + + * docs/nut-qa.txt: Minor update and completion Use the new Debian + package tracker URL and add Redhat / Fedora bug tracker + +2014-09-15 Daniele Pezzini + + * data/driver.list.in: HCL: add devices supported by nutdrv_qx - + Fideltronik LUPUS 500 USB Protocol: 'megatec' USB subdriver: + 'fabula' Reference: http://lists.alioth.debian.org/pipermail/nut- + upsuser/2014-June/009059.html - FTUPS FT-1000BS(T) / Voltronic + Power Apex 1KVA Protocol: 'voltronic-qs-hex' USB devices -> USB + subdriver: 'cypress' - FTUPS FT-1000BS / Voltronic Power Imperial + 1KVA Protocol: 'voltronic-qs' USB devices -> USB subdriver: + 'cypress' + +2014-07-11 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: improve the USB matching procedure + Consider also the iManufacturer/iProduct strings when checking + devices (if subdriver is not specified) to assign the right + subdriver in case the VID:PID couple is not specific enough. + +2014-06-30 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: add new 'fabula' USB subdriver Add + a new USB subdriver ('fabula') to support models + manufactured/rebranded by Fideltronik and accompained by + UPSilon2000 software. Reference: + http://lists.alioth.debian.org/pipermail/nut- + upsuser/2014-June/009059.html + +2014-09-03 Daniele Pezzini + + * drivers/Makefile.am, drivers/nutdrv_qx.c, drivers + /nutdrv_qx_voltronic-qs-hex.c, drivers/nutdrv_qx_voltronic-qs- + hex.h: nutdrv_qx: add Voltronic-QS-Hex subdriver (protocol + =voltronic-qs-hex) A subdriver using a protocol, specific to UPSes + manufactured by Voltronic Power, partially Hex-encoded (e.g. 'QS' + reply) and supporting some megatec commands. + * docs/nutdrv_qx-subdrivers.txt: nutdrv_qx: update docs about added + support for more complex UPS answers + * drivers/nutdrv_qx.c, drivers/nutdrv_qx.h, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs.c, + drivers/nutdrv_qx_voltronic.c, drivers/nutdrv_qx_zinto.c: + nutdrv_qx: add basic support for more complex UPS answers Add + support (also in 'TESTING' mode) for '\0' chars in raw UPS answers + and the ability to preprocess answers before anything else (e.g.: + for CRC, decoding, ...). Increase verbosity of USB subdrivers and + serial communication. Always print also the return code when + dealing with an error. Update all subdrivers accordingly, bump + versions. + +2014-09-08 Charles Lepple + + * docs/documentation.txt: docs: Add link to Roger Price's openSUSE + writeup + +2014-09-04 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: prevent a vicious loop when + unexpected answers happen If a 'QX_FLAG_QUICK_POLL' item gets an + unexpected (non-empty) answer and, after returning from + 'qx_ups_walk()', it is not followed by at least one item using a + different 'command', the driver will loop endlessly using the same + 'broken' answer instead of trying to get a new one from the UPS. To + solve this issue, make sure to have an empty 'previous_item' when + starting 'qx_ups_walk()'. Also, bail out of 'qx_ups_walk()' when a + 'QX_FLAG_QUICK_POLL' item can't be preprocessed properly through + 'ups_infoval_set()'. + +2014-09-04 Charles Lepple + + * docs/man/asem.txt: docs: recommend I2C bus name for asem driver + +2014-09-03 Arnaud Quette + + * docs/man/nut-scanner.txt: Fix typo error in nut-scanner doc The + example network range scanned when using 192.168.0.0/25 is actually + 192.168.0.0 to 192.168.0.12*7* not (i.e. not .128) as previously + stated (reported by Evgeny 'Jim' Klimov) Closes + networkupstools/nut#144 + +2014-09-02 Charles Lepple + + * data/driver.list.in, drivers/belkin-hid.c: HCL: Belkin Regulator + PRO-USB 050d:0f51 (0.17) + https://github.com/networkupstools/nut/issues/149 + +2014-08-22 Charles Lepple + + * data/driver.list.in: HCL: Mecer ME-100-WTU with blazer_usb USB + VID:PID = 0665:5161 Tested by @silvec (Oliver Sauder) on NUT 2.6.3 + Reference: https://github.com/networkupstools/nut/issues/148 + +2014-08-19 Charles Lepple + + * docs/documentation.txt: docs: update links for two articles + +2014-08-17 Charles Lepple + + * tools/nut-usbinfo.pl: nut-usbinfo: fix FreeBSD devd.conf to use + $cdev + * scripts/upower/95-upower-hid.rules: 95-upower-hid.rules: updated by + nut-usbinfo.pl URL updated in previous commit. + * tools/nut-usbinfo.pl: nut-usbinfo: change link from Alioth SVN to + GitHub + * scripts/udev/.gitignore: udev: ignore 62-nut-usbups.rules Follow- + up commit to networkupstools/nut#140 + +2014-08-17 Yann E. MORIN + + * conf/Makefile.am: conf/: fix parallel install Do not reference the + upsmon.conf.sample twice, otherwise install, with a high number of + make jobs, may fail, like so: http://autobuild.buildroot.net/result + s/256/2567e13cd5bc702bc3a38a1d6fc8e34022cc7db5/build-end.log --- + This is not a rare occurence, as my testing managed to trigger the + issue in about 1 test out of 10 on average, on a not-so-fast + machine. + +2014-08-16 Charles Lepple + + * tools/nut-usbinfo.pl: nut-usbinfo: ignore *.orig files + +2014-08-14 Émilien Kia + + * configure.ac, docs/man/Makefile.am, m4/nut_check_asciidoc.m4: Test + presence of xmllint for manpages doc generation. + * configure.ac, docs/man/Makefile.am, m4/nut_check_asciidoc.m4: Test + presence of xsltproc for manpages doc generation. + +2014-08-04 Charles Lepple + + * docs/man/ups.conf.txt, drivers/libusb.c: Remove redundant + usb_set_altinterface(), unless user requests it Adds flag/value to + USB driver options. Closes networkupstools/nut#138 + +2014-08-09 Charles Lepple + + * drivers/blazer_usb.c, drivers/libusb.c, drivers/nutdrv_qx.c, + drivers/tripplite_usb.c, drivers/usb-common.h, drivers/usbhid- + ups.c: libusb.c: consolidate USB-related addvar() calls + * drivers/cps-hid.c: usbhid-ups (CPS): determine battery.voltage + scale factor at runtime If the battery.voltage reading is greater + than 1.4x battery.voltage.nominal, apply a scale factor of 2/3 to + bring the voltage back in line. Closes networkupstools/nut#142 + +2014-08-08 Arnaud Quette + + * docs/man/nut-scanner.txt: Fix typo error Fix a typo error on "-B" + option (reported by Evgeny 'Jim' Klimov) + +2014-08-05 Arnaud Quette + + * scripts/python/Makefile.am: Distribute FreeDesktop AppData file for + NUT Monitor FreeDesktop AppData file for NUT Monitor was not + distributed, waiting for some approval + +2014-08-01 Arnaud Quette + + * scripts/udev/Makefile.am, scripts/udev/README: Fix USB permission + issues related to Linux / udev Rename udev rules file to 62-nut- + usbups.rules, to prevent NUT USB privileges from being overwritten + Closes #140 + * docs/cables.txt: Fix typo error on Eaton / MGE USB-RJ45 cable + +2014-07-14 Charles Lepple + + * scripts/Aix/.gitignore: Ignore generated AIX spec file + +2014-07-14 Giuseppe Corbelli + + * AUTHORS, docs/man/asem.txt: asem: additional documentation + http://article.gmane.org/gmane.comp.monitoring.nut.devel/6741 + +2014-07-13 Charles Lepple + + * docs/man/upscli_get.txt: upscli_get(): mention SIGPIPE handling + Closes: #132 + * data/driver.list.in: HCL: distinguish between Tripp Lite old and + new protocol 3005 + +2014-07-13 Arnaud Quette + + * scripts/python/app/nut-monitor.appdata.xml: Complete FreeDesktop + AppData file for NUT Monitor As per Richard Hughes comments, in + #127, complete the description field + +2014-07-12 Arnaud Quette + + * scripts/Aix/nut-aix.spec.in: Minor adjustments as per Github + comments + * docs/configure.txt: Add missing documentation for configure option + The new asem driver introduced --with-linux_i2c, for which + documentation was missing in configure documentation + +2014-07-11 Charles Lepple + + * NEWS, data/driver.list.in, docs/man/Makefile.am, docs/man/asem.txt, + docs/man/index.txt: asem: documentation + +2014-07-07 Giuseppe Corbelli + + * configure.ac, data/driver.list.in, drivers/Makefile.am, + drivers/asem.c: Support for ASEM UPS on Linux/i2c Patch from + http://article.gmane.org/gmane.comp.monitoring.nut.devel/6723 + Thread: http://news.gmane.org/find- + root.php?message_id=53A83FCB.1080808%40copanitalia.com Builds on + Ubuntu 12.10 and 14.04; requires libi2c-dev + +2014-07-05 Charles Lepple + + * drivers/tripplite_usb.c: tripplite_usb: fix typos in bin2d() and + control_outlet() (0.27) + * drivers/tripplite_usb.c: tripplite_usb: control_outlet() for + protocol 3005 (0.26) + * drivers/tripplite_usb.c: tripplite_usb: Additional 3005 protocol + support (0.25) http://news.gmane.org/find-root.php?message_id=CAFe + iwyG8HCfg%2dQqxcwhnm1Yo0z0F0BLyOPCYX%2d4yMMFg8sB4QQ%40mail.gmail.co + m + * drivers/tripplite_usb.c: tripplite_usb: basic support for 3005 + binary protocol (0.24) Based on logs from SMART500RT1U + +2014-07-04 vesnn + + * drivers/powercom.c: Update powercom.c Fix Powercom Imperial + initialization for models since 2009 with USB interface. + +2014-06-23 Arnaud Quette + + * scripts/python/app/nut-monitor.appdata.xml: Create a FreeDesktop + AppData file for NUT Monitor appData files provide to users long + descriptions, screenshots and other useful information on + application. This will mainly serve for Software Center like + applications + +2014-06-19 Charles Lepple + + * data/driver.list.in: HCL: Lacerda New Orion 800VA with blazer_usb + http://news.gmane.org/find-root.php?message_id=CANDysWwqgTUMYU03QbP + T8JxEtLd38mvwfTMMhZqS%3d%2diGpdvJDA%40mail.gmail.com + +2014-06-17 Charles Lepple + + * data/driver.list.in: HCL: add APC-Microsol entry for solis + * drivers/solis.c: solis: silence clang warnings about extra + parentheses Since we're in the neighborhood (#133)... Typically, + the idiom is either: if ( a == b ) for equality checking, or: if + ( ( a = b ) ) for assignment with a comparison. + * drivers/solis.c, drivers/solis.h: solis: eliminate fixed-length + string buffer for model name The new APC model name overflows the + buffer. (#133) + +2014-06-16 bsalvador + + * drivers/solis.c: Update on solis.c to add more support to Back-UPS + 1200BR + * drivers/solis.c: Update solis.c to support Microsol-APC Unit. + Added support to Back-UPS 1200BR (Microsol-APC) unit. + +2014-06-15 Charles Lepple + + * docs/man/upscli_get.txt, docs/man/upscli_list_next.txt, + docs/man/upscli_list_start.txt: docs: synchronize upscli_* + numq/numa with header There were a few leftover signed int + parameters in the man pages, but the headers and implementation use + 'unsigned int'. Closes: + https://github.com/networkupstools/nut/issues/131 + * docs/man/solis.txt: docs: mention APC in Microsol driver man page + * docs/man/apcsmart.txt: docs: point APC Microsol users from apcsmart + to solis Also make some of the formatting and grammar self- + consistent. + * drivers/solis.c: solis: recognize APC BZ1200-BR and BZ2200BI-BR + (0.62) Patch suggested by Bruno Salvador for BZ1200-BR, and also + tested by Douglas A. Augusto on BZ2200BI-BR. Reference: * + http://forums.freenas.org/index.php?threads/nobreak-bz1200-br-back- + ups-rs-1200va-600w-bivolt-115-nt.20247/ * http://news.gmane.org + /find-root.php?message_id=CACu22%2d3Nn2R%3dQQe9uy%5fPXHRduaPaFgCp2S + w4ra57Ow2qDQcOJQ%40mail.gmail.com + +2014-06-08 Arnaud Quette + + * scripts/subdriver/gen-snmp-subdriver.sh: Inline documentation fixes + +2014-06-03 george + + * scripts/python/module/PyNUT.py: Fixed version description. + * scripts/python/module/PyNUT.py: Added author information, bumped + version. According to the semantic versioning scheme + (http://semver.org/), adding features that do not break backwards + compatibility with previous releases means that the minor version + number should be incremented. + * scripts/python/module/PyNUT.py: Change format of raise keyword. + Fixes PyNUT Python 3 compatibility. + * scripts/python/module/PyNUT.py: PyNUT: Create a custom exception + class. This maintains backwards compatibility, and allows calling + programs to use "except PyNUTError" instead of "except Exception" + when using PyNUT methods. See + https://wiki.python.org/moin/HandlingExceptions for more + information. + * scripts/python/module/PyNUT.py: Fix error when raising without an + Exception. Raising without a valid exception is invalid: >>> + raise Traceback (most recent call last): File "", line 1, in + TypeError: exceptions must be old-style classes or derived + from BaseException, not NoneType >>> raise Exception Traceback + (most recent call last): File "", line 1, in + Exception Changing this to "raise Exception" fixes this problem. + +2014-06-01 Charles Lepple + + * docs/man/tripplite_usb.txt, drivers/tripplite_usb.c: tripplite_usb: + last tweaks, for now. Initialize bv_12V to a dummy value, since + gcc can't see that it is used in the union of both conditionals + where it is set. Also, align the documentation with the strange + definition of empty used by the Tripp Lite state-of-charge + approximation. + * drivers/tripplite_usb.c: tripplite_usb: silence warning (0.23) + Pedantic, to be sure, but someone might try the driver with a + protocol not listed, and sure enough, bv_12V won't be initialized. + * docs/man/tripplite_usb.txt, drivers/tripplite_usb.c: tripplite_usb: + expose battery_min/_max as variables (0.22) http://news.gmane.org + /find- + root.php?message_id=21370.36829.817425.464627%40godel.bruda.ca + +2014-05-27 Charles Lepple + + * data/driver.list.in: HCL: GRAFENTHAL PR-3000-HS supported by snmp- + ups Tested with 2.6.5-3 (0.68) on Windows (IETF MIB 1.4). Some + NUT variables are zero - further testing may be needed. Reference: + http://news.gmane.org/find-root.php?message_id=75FC7A5479BA4A4E8ADF + 76BC3AD3E568581EC753%40MS03.MACLE.DE + +2014-05-23 Charles Lepple + + * drivers/tripplite_usb.c: tripplite_usb: use dv/dq charge + calculation for all models (0.21) + +2014-05-20 Andrew Burdo + + * drivers/powercom-hid.c: Add comments for some values. + * drivers/usbhid-ups.c: Reuse variable. + * drivers/usbhid-ups.c: Add default case. + +2014-05-18 Charles Lepple + + * scripts/upower/95-upower-hid.rules: upower: regenerate rules file + USB VID:PID = 10af:0004 This dependency graph makes my head spin. + * configure.ac: configure.ac: version to 2.7.2.5 for snapshots + +2014-05-13 Daniele Pezzini + + * drivers/compaq-mib.c: compaq-mib: comment out no longer used items + As per 31827d5faa86377efb7a92b7aec322cc4c7a275f + +2014-05-03 Daniele Pezzini + + * docs/download.txt: docs: add Void Linux in download/Binary packages + Reference: https://github.com/networkupstools/nut/issues/125 + +2014-05-03 Charles Lepple + + * docs/Makefile.am: docs: add mge-usb-rj45.jpg to distribution + +2014-05-02 Arnaud Quette + + * docs/images/cables/mge-usb-rj45.jpg: Add MGE information on USB- + RJ45 cable The illustration matching the previous commit was still + needed on the nut repository, and not on the nut-website on + * docs/cables.txt: Add MGE information on USB-RJ45 cable These + information were provided by MGE years ago, and were waiting for + counter testing. Martin De Graaf - Loyer has now fixed this. Note + that the matching illustration will be committed on the new nut- + website repository + +2014-04-29 Andrew Burdo + + * drivers/powercom-hid.c, drivers/usbhid-ups.c: Bump versions. + * data/driver.list.in, docs/man/usbhid-ups.txt: Update documentation. + * drivers/usbhid-ups.c: Reconnect on interrupt read error. + * drivers/libhid.c, drivers/libhid.h, drivers/powercom-hid.c, drivers + /usbhid-ups.c: Reading from the interrupt pipe implies that you use + INPUT flagged objects. + * drivers/powercom-hid.c: Remove erroneous status. + * drivers/powercom-hid.c: Comment non-compliant variables. + +2014-04-17 Andrew Burdo + + * drivers/libhid.c, drivers/libhid.h, drivers/powercom-hid.c, drivers + /usbhid-ups.c: Add support for 0d9f:0001 (USB HID, Powercom). + 2014-04-17 Arnaud Quette * NEWS, UPGRADING, configure.ac: Update for release 2.7.2 Complete @@ -68,6 +1116,78 @@ * UPGRADING: Added note about --enable-option-checking=fatal Closes #99 (really) +2014-03-05 Émilien Kia + + * scripts/Aix/nut-aix.spec.in: Make web source path independant from + specific version. + * scripts/Aix/nut-aix.spec.in: Use configure-dependant variables + instead of statically defined ones for user and group. + * configure.ac: Use $target_cpu instead of calling uname to know cpu + type. Fix crosscompilation. + +2013-06-14 Vaclav Krpec + + * scripts/Aix/nut-aix.spec.in, scripts/Aix/nut.init: AIX: packaging & + init script improvements (cherry picked from commit + ce195e3a2eff1abbd8e192f4d3e278017d7ffb21) + +2013-06-12 Vaclav Krpec + + * scripts/Aix/nut.init: Fixed client startup detection (cherry + picked from commit 23df5e811cc9008bfa0a37bd174b59890a3760a6) + * scripts/Aix/nut-aix.spec.in: Fixed AIX RPM specfile (cherry picked + from commit 11ba37bf36dcda0398c8c62fab838dd00e54c5db) + +2013-06-11 Vaclav Krpec + + * scripts/Aix/nut-aix.spec.in: Allow libneon-based XML driver & + scanning for AIX (cherry picked from commit + 4c2e89ec584b2015b22f4599d1571c26f2f94e3d) + +2013-06-10 Vaclav Krpec + + * clients/Makefile.am: Fix of AIX-specific parseconf linking bug + Added dummy do_upsconf_args to binaries that use libcommon to + satisfy the linker. libcommon links libparseconf, which calls + do_upsconf_args supplied from above as an implementation-specific + routine. (cherry picked from commit + 0078f9383d3a7af4f3edfed6c78de387a12c6b2b) + +2013-04-25 Vaclav Krpec + + * clients/Makefile.am, clients/upsclient.c, configure.ac: + linupsclient: NUT scanning on AIX bugfix 1/ A simmilar bug like in + Solaris is in AIX itself---non-blocking connect may return -1 while + errno == 0. Shall be treated as EINPROGRESS. 2/ Linking of + libupsclent.so on AIX requires libcommon, otherwise scanning for + NUT crashes with SIGSEGV on unresolved usplogx (cherry picked from + commit 16177f99bc995852bb86d2183958f24f11993632) + +2013-03-13 Vaclav Krpec + + * Makefile.am: AIX packages: make package does the trick (cherry + picked from commit 1d25bd2868339decace5b3028c834746f2824670) + +2013-03-12 Vaclav Krpec + + * scripts/Aix/nut-aix.spec.in, scripts/Aix/nut.init: AIX packaging: + nut-client uninstal bugfix Packages clean uninstallation + (lost/forgotten commit) (cherry picked from commit + f6dd1aec5d2157a3ba3654621fa8e2ac88b060f9) + +2013-03-08 Vaclav Krpec + + * clients/upsclient.c, configure.ac: Solaris/i386: non-blocking + connect WA (cherry picked from commit + d2b466b9ee5402074ccbf7f2967433350affdbcc) + +2013-03-04 Vaclav Krpec + + * Makefile.am, configure.ac, scripts/Aix/nut-aix.spec.in, + scripts/Aix/nut.init: AIX packaging AIX init script and RPM spec. + file added (cherry picked from commit + 3851525edcb417f96a5d1c12fb786b85095b54d4) + 2014-03-03 Charles Lepple * data/driver.list.in: HCL: various updates * Closes diff --git a/INSTALL b/INSTALL index a1e89e1..2099840 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, @@ -12,8 +12,8 @@ without warranty of any kind. Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented @@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -367,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/INSTALL.nut b/INSTALL.nut index bc754cc..160b558 100644 --- a/INSTALL.nut +++ b/INSTALL.nut @@ -141,7 +141,7 @@ State path creation Create the state path directory for the driver(s) and server to use for storing UPS status data and other auxiliary files, and make it -owned by the user you created. +group-writable by the group of the system user you created. mkdir -p /var/state/ups chmod 0770 /var/state/ups @@ -183,7 +183,7 @@ drivers; this should allow you to follow the below instructions. However, don't forget to set up the correct permissions later!). -NOTE: if you are using something like devfs or udev, make sure +NOTE: if you are using something like udev or devd, make sure these permissions stay set across a reboot. If they revert to the old values, your drivers may fail to start. diff --git a/Makefile.am b/Makefile.am index 2d67519..aebe618 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,6 +21,7 @@ DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ + --with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ --with-udev-dir='$${prefix}/etc/udev' \ --with-devd-dir='$${prefix}/etc/devd' @@ -36,15 +37,23 @@ distcheck-light: distcleancheck: @: +# ---------------------------------------------------------------------- # Automatically generate the ChangeLog from Git logs: MAINTAINERCLEAN_FILES = ChangeLog + +# Older boundary of the ChangeLog commits range +# It can be a tag ('v2.2.0'), a commit hash, a date, ... +# See gitrevisions for more information on specifying ranges +GITLOG_START_POINT=v2.6.0 + # Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'), # in case it has already been generated previously dummy-stamp: ChangeLog: tools/gitlog2changelog.py dummy-stamp - $(top_srcdir)/tools/gitlog2changelog.py v2.6.0 || \ + $(top_srcdir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ +# ---------------------------------------------------------------------- # Maintainers targets: distribution signature and hashes dist-sig: gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz @@ -113,14 +122,17 @@ package: 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; \ + elif test `uname -s` = "SunOS"; then \ + make; \ + rm -rf @prefix@; \ + make install; \ + cd scripts/Solaris; \ + make package; \ + make uninstall; \ + rm -rf @prefix@; \ + elif test `uname -s` = "AIX"; then \ + make dist; \ + cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS; \ + cp scripts/Aix/nut.init nut-*.tar.gz /usr/src/packages/SOURCES; \ + rpm -ba /usr/src/packages/SPECS/nut-aix.spec; \ fi; diff --git a/Makefile.in b/Makefile.in index f702014..44ffd6b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +16,51 @@ # top-level Makefile for NUT VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,14 +81,16 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure \ +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(top_srcdir)/scripts/Aix/nut-aix.spec.in \ + $(top_srcdir)/scripts/avahi/nut.service.in \ $(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 \ - depcomp install-sh ltmain.sh missing + $(top_srcdir)/scripts/ufw/nut.ufw.profile.in COPYING TODO \ + compile config.guess config.sub depcomp install-sh missing \ + ltmain.sh 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 \ @@ -90,18 +119,32 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = scripts/avahi/nut.service scripts/HP-UX/nut.psf \ +CONFIG_CLEAN_FILES = scripts/Aix/nut-aix.spec \ + scripts/avahi/nut.service scripts/HP-UX/nut.psf \ scripts/HP-UX/postinstall scripts/ufw/nut.ufw.profile CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -109,11 +152,32 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -124,6 +188,7 @@ am__remove_distdir = \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -151,6 +216,7 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -158,6 +224,7 @@ distcleancheck_listfiles = find . -type f -print A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -264,12 +331,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -314,6 +384,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -356,14 +427,21 @@ EXTRA_DIST = INSTALL.nut LICENSE-GPL2 LICENSE-GPL3 MAINTAINERS UPGRADING DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ + --with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ --with-udev-dir='$${prefix}/etc/udev' \ --with-devd-dir='$${prefix}/etc/devd' +# ---------------------------------------------------------------------- # Automatically generate the ChangeLog from Git logs: MAINTAINERCLEAN_FILES = ChangeLog +# Older boundary of the ChangeLog commits range +# It can be a tag ('v2.2.0'), a commit hash, a date, ... +# See gitrevisions for more information on specifying ranges +GITLOG_START_POINT = v2.6.0 + # ---------------------------------------------------------------------- # targets from old build system (pre-automake). # supported for a period of time for backward "compatibility". @@ -405,6 +483,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): +scripts/Aix/nut-aix.spec: $(top_builddir)/config.status $(top_srcdir)/scripts/Aix/nut-aix.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ scripts/avahi/nut.service: $(top_builddir)/config.status $(top_srcdir)/scripts/avahi/nut.service.in cd $(top_builddir) && $(SHELL) ./config.status $@ scripts/HP-UX/nut.psf: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/nut.psf.in @@ -424,22 +504,25 @@ distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -454,57 +537,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -520,12 +558,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -537,15 +570,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -554,9 +583,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -624,40 +675,42 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) + $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -668,8 +721,6 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ 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*) \ @@ -681,18 +732,19 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -715,7 +767,7 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ 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' @@ -839,14 +891,13 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.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-lzip dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip 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 \ @@ -856,7 +907,7 @@ uninstall-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 + ps ps-am tags tags-am uninstall uninstall-am distcheck-light: @@ -869,13 +920,15 @@ distcheck-light: # find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' distcleancheck: @: + # Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'), # in case it has already been generated previously dummy-stamp: ChangeLog: tools/gitlog2changelog.py dummy-stamp - $(top_srcdir)/tools/gitlog2changelog.py v2.6.0 || \ + $(top_srcdir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ +# ---------------------------------------------------------------------- # Maintainers targets: distribution signature and hashes dist-sig: gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz @@ -938,16 +991,19 @@ package: 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; \ + elif test `uname -s` = "SunOS"; then \ + make; \ + rm -rf @prefix@; \ + make install; \ + cd scripts/Solaris; \ + make package; \ + make uninstall; \ + rm -rf @prefix@; \ + elif test `uname -s` = "AIX"; then \ + make dist; \ + cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS; \ + cp scripts/Aix/nut.init nut-*.tar.gz /usr/src/packages/SOURCES; \ + rpm -ba /usr/src/packages/SPECS/nut-aix.spec; \ fi; # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/NEWS b/NEWS index c45fc6a..1e6fbde 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,76 @@ If you're upgrading from an earlier version, see the UPGRADING file. For a complete and more detailed list of changes, please refer to the ChangeLog file. +--------------------------------------------------------------------------- +Release notes for NUT 2.7.3 - what's new since 2.7.2: + + - reverted POWERDOWNFLAG to /etc/killpower as in 2.6.5 (packagers may want to + put this in another filesystem, though) + + - configure/make fixes for ${systemdsystemunitdir} + + - apcsmart: fix command set parsing for protocol version 4 (e.g. Smart-UPS + RT 10000 XL) + + - upslog: SIGUSR1 forces an immediate log entry + + - riello_usb/_ser: USB interface claim fix; improved error handling + + - usbhid-ups: add support for OpenUPS2 (PID: D005), Liebert GXT3 (PID: 0008) + APC AP9584 Serial->USB kit (PID: 0000), and some Powercom models + (PID: 0001). Fixed scaling for Cyberpower 0764:0501. + + - USB core: do not call usb_set_altinterface(0) by default + + - nutdrv_qx: added fabula, fuji USB and Voltronic-QS-HEX subdrivers; add + bestups subdriver to supersede the old standalone bestups driver + + - NUT Monitor: added FreeDesktop AppData file (including screenshots) + + - renamed udev rules file to 62-nut-usbups.rules (permissions fix) + + - added AIX packaging + + - asem: added a driver for the UPS in ASEM PB1300 embedded PCs + + - solis: updated to support APC Microsol units sold in Brazil + + - tripplite_usb: updated to use dv/dq charge calculation for all models (also + exposes battery_min and battery max as configuration variables); added + binary 3005 protocol support (such as for SMART500RT1U) + + - genericups: better debugging while parsing the cable description flags + + - all drivers: a new 'synchronous' driver flag is available for very verbose + units, such as some ePDUs + + - Eaton: + * Add support for EnergySaving features for Eaton UPSs (HID USB/SHUT and + XCP USB/serial) + * Fix and complete Eaton ePDUs G2/G3 support + * ABM (Advanced Battery Monitoring) support through battery.charger.status + in HID (USB and SHUT), XCP (USB and serial) and SNMP (Powerware XUPS + MIB) + + - support for new devices: + APC Back-UPS 1200BR and Back-UPS BZ2200BI-BR (Microsol) + ASEM SPA PB1300 UPS + Belkin Regulator PRO-USB + Cyber Power Systems Value 1500ELCD-RU + EUROCASE EA200N 2000VA + Fideltronik LUPUS 500 + Flight Technic & International (FTUPS) FT-1000BS and FT-1000BS(T) + Grafenthal PR-3000-HS + JAWAN JW-UPSLC02 + Lacerda New Orion 800VA + Mecer ME-1000-WTU + NHS Sistemas de Energia Expert C Online 6000/8000/10000 + NHS Sistemas de Energia Expert S Online 6000/8000/10000 + Powercom BNT-xxxAP (USB product id: 0001) + Rucelf UPOII-3000-96-EL + Tripp Lite OMNIVSINT800 + Voltronic Power Apex 1KVA and Imperial 1KVA + --------------------------------------------------------------------------- Release notes for NUT 2.7.2 - what's new since 2.7.1: diff --git a/UPGRADING b/UPGRADING index f2d19c0..3b14a40 100644 --- a/UPGRADING +++ b/UPGRADING @@ -7,6 +7,30 @@ 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.7.2 to 2.7.3 +--------------------------- + +- The linkman:nutdrv_qx[8] driver will eventually supersede linkman:bestups[8]. + It has been tested on a U-series Patriot Pro II. Please test the new driver + on your hardware during your next maintenance window, and report any bugs. + +- If you are upgrading from a new install of 2.7.1 or 2.7.2, double-check the + value of POWERDOWNFLAG in $prefix/etc/upsmon.conf - it has been restored to + /etc/killpower as in 2.6.5 and earlier. + +- If you use upslog with a large sleep value, you may be interested in adding + `killall -SIGUSR1 upslog` to any OB/OL script actions. This will force + upslog to write a log entry to catch short power transients. + +- Be sure that your SSL keys are readable by the NUT system user. The SSL + subsystem is now initialized after `upsd` forks, to work around issues in the + NSS library. + +- The systemd nut-server.service does not Require nut-driver to be started + successfully. This was previously preventing upsd startup, even for just + one driver failure among many. This also matches the behavior of sysV + initscripts. + Changes from 2.7.1 to 2.7.2 --------------------------- diff --git a/aclocal.m4 b/aclocal.m4 index 4e5d1df..709a8d0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,8 +1,7 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 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. @@ -12,16 +11,17 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 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'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# longlong.m4 serial 14 -dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc. +# longlong.m4 serial 17 +dnl Copyright (C) 1999-2007, 2009-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,8 +29,8 @@ dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be @@ -38,44 +38,48 @@ dnl From Paul Eggert. AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug isn't important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [ac_cv_type_long_long_int=yes], - [ac_cv_type_long_long_int=no], - [ac_cv_type_long_long_int=yes])], - [ac_cv_type_long_long_int=no])]) + [ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. + dnl If cross compiling, assume the bug is not important, since + dnl nobody cross compiles for this platform as far as we know. + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include + @%:@ifndef LLONG_MAX + @%:@ define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + @%:@ define LLONG_MAX (HALF - 1 + HALF) + @%:@endif]], + [[long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0;]])], + [], + [ac_cv_type_long_long_int=no], + [:]) + fi + fi]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `long long int'.]) + [Define to 1 if the system has the type 'long long int'.]) fi ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT @@ -86,13 +90,16 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [ac_cv_type_unsigned_long_long_int=yes], - [ac_cv_type_unsigned_long_long_int=no])]) + [ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + AC_LINK_IFELSE( + [_AC_TYPE_LONG_LONG_SNIPPET], + [], + [ac_cv_type_unsigned_long_long_int=no]) + fi]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `unsigned long long int'.]) + [Define to 1 if the system has the type 'unsigned long long int'.]) fi ]) @@ -287,25 +294,77 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR + +# Copyright (C) 2002-2013 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 # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.14' 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.6], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -321,24 +380,22 @@ 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.6])dnl +[AM_AUTOMAKE_VERSION([1.14.1])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, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 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/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -357,7 +414,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -375,30 +432,26 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 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 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -417,16 +470,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, -# 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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 12 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# 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, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -436,7 +487,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -449,12 +500,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -462,8 +514,8 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # 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'. + # 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 @@ -503,16 +555,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -521,8 +573,8 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -530,7 +582,7 @@ AC_CACHE_CHECK([dependency style of $depcc], fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # 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. am__obj=conftest.${OBJEXT-o} @@ -578,7 +630,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -588,9 +640,13 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -605,20 +661,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -631,7 +685,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -643,21 +697,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -675,7 +727,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -685,18 +737,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 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 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -709,7 +764,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -738,31 +793,40 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -773,34 +837,79 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -822,15 +931,12 @@ 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, 2011 Free Software Foundation, -# Inc. +# Copyright (C) 2001-2013 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. @@ -844,16 +950,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 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 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -870,20 +974,17 @@ 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, -# 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 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 5 - # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), @@ -894,10 +995,11 @@ AC_DEFUN([AM_MAINTAINER_MODE], 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 - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE @@ -905,18 +1007,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ] ) -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 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 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -934,7 +1032,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -959,52 +1057,14 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# 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 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 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 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -1012,11 +1072,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -1029,54 +1088,22 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# 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'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 2001-2013 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 5 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -1086,7 +1113,7 @@ AC_DEFUN([_AM_MANGLE_OPTION], # -------------------- # 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)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ @@ -1100,24 +1127,82 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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 5 +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 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. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1128,32 +1213,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -1163,46 +1256,118 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 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_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 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. # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 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 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1216,18 +1381,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 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 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1237,76 +1400,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_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='$${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]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff --git a/clients/Makefile.in b/clients/Makefile.in index e004931..7e58b62 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +20,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -67,8 +94,9 @@ sbin_PROGRAMS = upsmon$(EXEEXT) upssched$(EXEEXT) @WITH_CGI_TRUE@ upsimage.cgi$(EXEEXT) upsset.cgi$(EXEEXT) @WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LIBS) subdir = clients -DIST_COMMON = $(am__include_HEADERS_DIST) $(dist_bin_SCRIPTS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(dist_bin_SCRIPTS) $(top_srcdir)/depcomp \ + $(am__include_HEADERS_DIST) 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 \ @@ -131,18 +159,24 @@ LTLIBRARIES = $(lib_LTLIBRARIES) libnutclient_la_LIBADD = am_libnutclient_la_OBJECTS = nutclient.lo libnutclient_la_OBJECTS = $(am_libnutclient_la_OBJECTS) -libnutclient_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libnutclient_la_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libnutclient_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(libnutclient_la_LDFLAGS) \ + $(LDFLAGS) -o $@ am__DEPENDENCIES_1 = @WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) libupsclient_la_DEPENDENCIES = ../common/libcommonclient.la \ $(am__DEPENDENCIES_2) am_libupsclient_la_OBJECTS = upsclient.lo libupsclient_la_OBJECTS = $(am_libupsclient_la_OBJECTS) -libupsclient_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libupsclient_la_LDFLAGS) $(LDFLAGS) -o $@ +libupsclient_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libupsclient_la_LDFLAGS) $(LDFLAGS) \ + -o $@ PROGRAMS = $(bin_PROGRAMS) $(cgiexec_PROGRAMS) $(sbin_PROGRAMS) am_upsc_OBJECTS = upsc.$(OBJEXT) upsc_OBJECTS = $(am_upsc_OBJECTS) @@ -190,28 +224,58 @@ upsstats_cgi_LDADD = $(LDADD) upsstats_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) SCRIPTS = $(dist_bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = 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) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libnutclient_la_SOURCES) $(libupsclient_la_SOURCES) \ $(upsc_SOURCES) $(upscmd_SOURCES) $(upsimage_cgi_SOURCES) \ $(upslog_SOURCES) $(upsmon_SOURCES) $(upsrw_SOURCES) \ @@ -230,12 +294,30 @@ am__can_run_installinfo = \ am__include_HEADERS_DIST = upsclient.h ../include/parseconf.h \ nutclient.h HEADERS = $(include_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -342,12 +424,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -392,6 +477,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -482,6 +568,7 @@ $(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): + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -508,16 +595,20 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libnutclient.la: $(libnutclient_la_OBJECTS) $(libnutclient_la_DEPENDENCIES) $(EXTRA_libnutclient_la_DEPENDENCIES) - $(libnutclient_la_LINK) -rpath $(libdir) $(libnutclient_la_OBJECTS) $(libnutclient_la_LIBADD) $(LIBS) + $(AM_V_CXXLD)$(libnutclient_la_LINK) -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) + $(AM_V_CCLD)$(libupsclient_la_LINK) -rpath $(libdir) $(libupsclient_la_OBJECTS) $(libupsclient_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -527,10 +618,12 @@ install-binPROGRAMS: $(bin_PROGRAMS) 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; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -551,7 +644,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -573,10 +667,12 @@ install-cgiexecPROGRAMS: $(cgiexec_PROGRAMS) 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; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -597,7 +693,8 @@ uninstall-cgiexecPROGRAMS: @list='$(cgiexec_PROGRAMS)'; test -n "$(cgiexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(cgiexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(cgiexecdir)" && rm -f $$files @@ -619,10 +716,12 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS) 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; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -643,7 +742,8 @@ uninstall-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files @@ -656,33 +756,42 @@ 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) $(EXTRA_upsc_DEPENDENCIES) @rm -f upsc$(EXEEXT) - $(LINK) $(upsc_OBJECTS) $(upsc_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsc_OBJECTS) $(upsc_LDADD) $(LIBS) + upscmd$(EXEEXT): $(upscmd_OBJECTS) $(upscmd_DEPENDENCIES) $(EXTRA_upscmd_DEPENDENCIES) @rm -f upscmd$(EXEEXT) - $(LINK) $(upscmd_OBJECTS) $(upscmd_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upscmd_OBJECTS) $(upscmd_LDADD) $(LIBS) + 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) + $(AM_V_CCLD)$(LINK) $(upsimage_cgi_OBJECTS) $(upsimage_cgi_LDADD) $(LIBS) + upslog$(EXEEXT): $(upslog_OBJECTS) $(upslog_DEPENDENCIES) $(EXTRA_upslog_DEPENDENCIES) @rm -f upslog$(EXEEXT) - $(LINK) $(upslog_OBJECTS) $(upslog_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upslog_OBJECTS) $(upslog_LDADD) $(LIBS) + upsmon$(EXEEXT): $(upsmon_OBJECTS) $(upsmon_DEPENDENCIES) $(EXTRA_upsmon_DEPENDENCIES) @rm -f upsmon$(EXEEXT) - $(LINK) $(upsmon_OBJECTS) $(upsmon_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsmon_OBJECTS) $(upsmon_LDADD) $(LIBS) + upsrw$(EXEEXT): $(upsrw_OBJECTS) $(upsrw_DEPENDENCIES) $(EXTRA_upsrw_DEPENDENCIES) @rm -f upsrw$(EXEEXT) - $(LINK) $(upsrw_OBJECTS) $(upsrw_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsrw_OBJECTS) $(upsrw_LDADD) $(LIBS) + upssched$(EXEEXT): $(upssched_OBJECTS) $(upssched_DEPENDENCIES) $(EXTRA_upssched_DEPENDENCIES) @rm -f upssched$(EXEEXT) - $(LINK) $(upssched_OBJECTS) $(upssched_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upssched_OBJECTS) $(upssched_LDADD) $(LIBS) + 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) + $(AM_V_CCLD)$(LINK) $(upsset_cgi_OBJECTS) $(upsset_cgi_LDADD) $(LIBS) + 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) + $(AM_V_CCLD)$(LINK) $(upsstats_cgi_OBJECTS) $(upsstats_cgi_LDADD) $(LIBS) install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -739,46 +848,52 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsstats.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(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@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(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@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -807,26 +922,15 @@ uninstall-includeHEADERS: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -838,15 +942,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -855,6 +955,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1006,25 +1121,25 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cgiexecPROGRAMS \ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-cgiexecPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-sbinPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-cgiexecPROGRAMS \ - install-data install-data-am install-dist_binSCRIPTS \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-includeHEADERS \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-cgiexecPROGRAMS uninstall-dist_binSCRIPTS \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-sbinPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-sbinPROGRAMS \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-cgiexecPROGRAMS install-data \ + install-data-am install-dist_binSCRIPTS install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-includeHEADERS install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-cgiexecPROGRAMS \ + uninstall-dist_binSCRIPTS uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-sbinPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/clients/upsclient.c b/clients/upsclient.c index 797786b..43c0e79 100644 --- a/clients/upsclient.c +++ b/clients/upsclient.c @@ -20,6 +20,7 @@ */ #include "config.h" /* safe because it doesn't contain prototypes */ +#include "nut_platform.h" #ifdef HAVE_PTHREAD /* this include is needed on AIX to have errno stored in thread local storage */ @@ -41,6 +42,20 @@ #include "common.h" #include "timehead.h" +/* WA for Solaris/i386 bug: non-blocking connect sets errno to ENOENT */ +#if (defined NUT_PLATFORM_SOLARIS && CPU_TYPE == i386) + #define SOLARIS_i386_NBCONNECT_ENOENT(status) (ENOENT == (status)) +#else + #define SOLARIS_i386_NBCONNECT_ENOENT(status) (0) +#endif /* end of Solaris/i386 WA for non-blocking connect */ + +/* WA for AIX bug: non-blocking connect sets errno to 0 */ +#if (defined NUT_PLATFORM_AIX) + #define AIX_NBCONNECT_0(status) (0 == (status)) +#else + #define AIX_NBCONNECT_0(status) (0) +#endif /* end of AIX WA for non-blocking connect */ + #ifdef WITH_NSS #include #include @@ -916,7 +931,7 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags,stru } while ((v = connect(sock_fd, ai->ai_addr, ai->ai_addrlen)) < 0) { - if(errno == EINPROGRESS) { + if(errno == EINPROGRESS || SOLARIS_i386_NBCONNECT_ENOENT(errno) || AIX_NBCONNECT_0(errno)) { FD_ZERO(&wfds); FD_SET(sock_fd, &wfds); select(sock_fd+1,NULL,&wfds,NULL, diff --git a/clients/upslog.c b/clients/upslog.c index 7c534c7..325cdc9 100644 --- a/clients/upslog.c +++ b/clients/upslog.c @@ -77,6 +77,11 @@ static void set_exit_flag(int sig) exit_flag = sig; } +static void set_print_now_flag(int sig) +{ + /* no need to do anything, the signal will cause sleep to be interrupted */ +} + /* handlers: reload on HUP, exit on INT/QUIT/TERM */ static void setup_signals(void) { @@ -97,6 +102,10 @@ static void setup_signals(void) fatal_with_errno(EXIT_FAILURE, "Can't install SIGQUIT handler"); if (sigaction(SIGTERM, &sa, NULL) < 0) fatal_with_errno(EXIT_FAILURE, "Can't install SIGTERM handler"); + + sa.sa_handler = set_print_now_flag; + if (sigaction(SIGUSR1, &sa, NULL) < 0) + fatal_with_errno(EXIT_FAILURE, "Can't install SIGUSR1 handler"); } static void help(const char *prog) diff --git a/common/Makefile.in b/common/Makefile.in index daa0324..6a5149e 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +17,51 @@ # Network UPS Tools: common VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -55,8 +82,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in atexit.c \ - setenv.c snprintf.c strerror.c +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am strerror.c \ + atexit.c setenv.c snprintf.c $(top_srcdir)/depcomp 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 \ @@ -89,25 +116,50 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ am_libcommon_la_OBJECTS = common.lo state.lo upsconf.lo libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = libcommonclient_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ am_libcommonclient_la_OBJECTS = common.lo state.lo libcommonclient_la_OBJECTS = $(am_libcommonclient_la_OBJECTS) libparseconf_la_LIBADD = am_libparseconf_la_OBJECTS = parseconf.lo libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \ $(libparseconf_la_SOURCES) DIST_SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \ @@ -117,12 +169,30 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -229,12 +299,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -279,6 +352,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -351,18 +425,23 @@ $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES) - $(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) + libcommonclient.la: $(libcommonclient_la_OBJECTS) $(libcommonclient_la_DEPENDENCIES) $(EXTRA_libcommonclient_la_DEPENDENCIES) - $(LINK) $(libcommonclient_la_OBJECTS) $(libcommonclient_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libcommonclient_la_OBJECTS) $(libcommonclient_la_LIBADD) $(LIBS) + libparseconf.la: $(libparseconf_la_OBJECTS) $(libparseconf_la_DEPENDENCIES) $(EXTRA_libparseconf_la_DEPENDENCIES) - $(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -380,25 +459,28 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -406,26 +488,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -437,15 +508,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -454,6 +521,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -595,18 +677,19 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir 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 maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/common/common.c b/common/common.c index ce3c573..d7c74d3 100644 --- a/common/common.c +++ b/common/common.c @@ -586,13 +586,21 @@ char *xstrdup(const char *string) /* modify in - strip all trailing instances of */ char *rtrim(char *in, const char sep) +{ + char seps[2] = { sep, '\0' }; + + return rtrim_m(in, seps); +} + +/* modify in - strip all trailing instances of each char in */ +char *rtrim_m(char *in, const char *seps) { char *p; - if (in) { + if (in && strlen(in)) { p = &in[strlen(in) - 1]; - while ((p >= in) && (*p == sep)) + while ((p >= in) && (strchr(seps, *p) != NULL)) *p-- = '\0'; } return in; @@ -601,16 +609,19 @@ char *rtrim(char *in, const char sep) /* modify in - strip all leading instances of */ char* ltrim(char *in, const char sep) { - char *p; + char seps[2] = { sep, '\0' }; - if (in) { - p = in; + return ltrim_m(in, seps); +} - while ((*p != '\0') && (*p == sep)) - *p++ = *in++; - - p = '\0'; +/* modify in - strip all leading instances of each char in */ +char* ltrim_m(char *in, const char *seps) +{ + if (in && strlen(in)) { + while ((*in != '\0') && (strchr(seps, *in) != NULL)) + memmove(in, in + 1, strlen(in)); } + return in; } diff --git a/conf/Makefile.am b/conf/Makefile.am index 681f33c..95c0173 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -2,7 +2,7 @@ INSTALL_0600 = $(INSTALL) -m 0600 -SECFILES = upsmon.conf.sample upsd.conf.sample upsd.users.sample +SECFILES = upsd.conf.sample upsd.users.sample PUBFILES = nut.conf.sample ups.conf.sample CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \ upsstats-single.html.sample diff --git a/conf/Makefile.in b/conf/Makefile.in index 6b374f8..4afc1f8 100644 --- a/conf/Makefile.in +++ b/conf/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +17,51 @@ # Network UPS Tools: conf VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -55,9 +82,10 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = conf -DIST_COMMON = $(am__dist_sysconf_DATA_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/upsmon.conf.sample.in \ - $(srcdir)/upssched.conf.sample.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/upsmon.conf.sample.in \ + $(srcdir)/upssched.conf.sample.in \ + $(am__dist_sysconf_DATA_DIST) 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 \ @@ -86,6 +114,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = upsmon.conf.sample upssched.conf.sample CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -93,9 +133,9 @@ am__can_run_installinfo = \ 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 \ +am__dist_sysconf_DATA_DIST = upsd.conf.sample upsd.users.sample \ + nut.conf.sample ups.conf.sample hosts.conf.sample \ + upsset.conf.sample upsstats.html.sample \ upsstats-single.html.sample am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -126,10 +166,12 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)" DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -236,12 +278,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -286,6 +331,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -308,7 +354,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ INSTALL_0600 = $(INSTALL) -m 0600 -SECFILES = upsmon.conf.sample upsd.conf.sample upsd.users.sample +SECFILES = upsd.conf.sample upsd.users.sample PUBFILES = nut.conf.sample ups.conf.sample CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \ upsstats-single.html.sample @@ -402,11 +448,11 @@ uninstall-nodist_sysconfDATA: @list='$(nodist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -545,17 +591,19 @@ uninstall-am: uninstall-dist_sysconfDATA uninstall-nodist_sysconfDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_sysconfDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-nodist_sysconfDATA install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_sysconfDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-nodist_sysconfDATA install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-dist_sysconfDATA uninstall-nodist_sysconfDATA + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dist_sysconfDATA \ + uninstall-nodist_sysconfDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/conf/ups.conf.sample b/conf/ups.conf.sample index 365a6f7..d8faef2 100644 --- a/conf/ups.conf.sample +++ b/conf/ups.conf.sample @@ -75,6 +75,21 @@ # # The default is 45 seconds. # +# synchronous: optional. The driver work by default in asynchronous +# mode (i.e *synchronous=no*). This means that all data +# are pushed by the driver on the communication socket to +# upsd (Unix socket on Unix, Named pipe on Windows) without +# waiting for these data to be actually consumed. With +# some HW, such as ePDUs, that can produce a lot of data, +# asynchronous mode may cause some congestion, resulting in +# the socket to be full, and the driver to appear as not +# connected. By enabling the 'synchronous' flag +# (value = 'yes'), the driver will wait for data to be +# consumed by upsd, prior to publishing more. This can be +# enabled either globally or per driver. +# +# The default is 'no' (i.e. asynchronous mode) for backward +# compatibility of the driver behavior. # # Anything else is passed through to the hardware-specific part of # the driver. diff --git a/conf/upsmon.conf.sample b/conf/upsmon.conf.sample deleted file mode 100644 index 9b44237..0000000 --- a/conf/upsmon.conf.sample +++ /dev/null @@ -1,377 +0,0 @@ -# Network UPS Tools: example upsmon configuration -# -# This file contains passwords, so keep it secure. - -# -------------------------------------------------------------------------- -# RUN_AS_USER -# -# 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 ' 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 nut - -# -------------------------------------------------------------------------- -# MONITOR ("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. -# -# is a UPS identifier in the form @[:] -# 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". -# -# 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 is 0. -# -# and 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 -# -# 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 "" -# -# 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 -# -# 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 /usr/local/ups/bin/notifyme - -# -------------------------------------------------------------------------- -# POLLFREQ -# -# 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 -# -# 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 /etc/nut/killpower - -# -------------------------------------------------------------------------- -# NOTIFYMSG - change messages sent by upsmon when certain events occur -# -# You can change the default messages to something else if you like. -# -# NOTIFYMSG "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 : -# -# 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 [+][+] ... -# -# 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 /etc/nut/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 -# -# 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 -# -# 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. diff --git a/conf/upsmon.conf.sample.in b/conf/upsmon.conf.sample.in index 6bb6a04..8703eb4 100644 --- a/conf/upsmon.conf.sample.in +++ b/conf/upsmon.conf.sample.in @@ -194,9 +194,12 @@ DEADTIME 15 # 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. +# See the config-notes.txt file in the docs subdirectory for more information. +# Refer to the section: +# [[UPS_shutdown]] "Configuring automatic shutdowns for low battery events" +# or refer to the online version. -POWERDOWNFLAG @CONFPATH@/killpower +POWERDOWNFLAG /etc/killpower # -------------------------------------------------------------------------- # NOTIFYMSG - change messages sent by upsmon when certain events occur diff --git a/config.guess b/config.guess index d622a44..1f5c50c 100755 --- a/config.guess +++ b/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # 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, 2012 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2014-03-23' # 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 -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ 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, 2012 -Free Software Foundation, Inc. +Copyright 1992-2014 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." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -801,10 +820,13 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -852,21 +874,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +901,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1227,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1256,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1297,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,157 +1371,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <. @@ -26,11 +20,12 @@ timestamp='2012-04-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to ." 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, 2012 -Free Software Foundation, Inc. +Copyright 1992-2014 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." @@ -123,7 +116,7 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -156,7 +149,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -259,10 +252,12 @@ case $basic_machine in | 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 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -270,10 +265,11 @@ case $basic_machine in | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -287,23 +283,26 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | 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 \ @@ -328,7 +327,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -370,13 +369,13 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -385,11 +384,13 @@ case $basic_machine in | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -403,18 +404,22 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -788,11 +793,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -820,6 +829,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -828,7 +841,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1019,7 +1032,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1346,29 +1363,29 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1492,9 +1509,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1543,6 +1557,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; diff --git a/configure b/configure index 2fd661d..3210ecd 100755 --- a/configure +++ b/configure @@ -1,6 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for nut 2.7.2. +# Generated by GNU Autoconf 2.69 for nut 2.7.3. +# +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -272,10 +274,11 @@ fi $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://github.com/networkupstools/nut/issues about +$0: your system, including any error possibly output before +$0: this message. Then install a modern shell, or manually +$0: run the script under such a shell if you do have one." fi exit 1 fi @@ -587,9 +590,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nut' PACKAGE_TARNAME='nut' -PACKAGE_VERSION='2.7.2' -PACKAGE_STRING='nut 2.7.2' -PACKAGE_BUGREPORT='' +PACKAGE_VERSION='2.7.3' +PACKAGE_STRING='nut 2.7.3' +PACKAGE_BUGREPORT='https://github.com/networkupstools/nut/issues' PACKAGE_URL='' ac_unique_file="server/upsd.c" @@ -682,6 +685,9 @@ LIBSSL_CFLAGS NUT_NETVERSION TREE_VERSION OS_NAME +now +SYSTEM_AIX_FALSE +SYSTEM_AIX_TRUE HAVE_ASPELL_FALSE HAVE_ASPELL_TRUE ASPELL @@ -723,6 +729,9 @@ HAVE_ASCIIDOC_FALSE HAVE_ASCIIDOC_TRUE WITH_ASCIIDOC_FALSE WITH_ASCIIDOC_TRUE +SOURCE_HIGHLIGHT +XMLLINT +XSLTPROC DBLATEX A2X ASCIIDOC @@ -738,6 +747,8 @@ WITH_OPENSSL_FALSE WITH_OPENSSL_TRUE WITH_NSS_FALSE WITH_NSS_TRUE +WITH_LINUX_I2C_FALSE +WITH_LINUX_I2C_TRUE WITH_MACOSX_FALSE WITH_MACOSX_TRUE WITH_FREEIPMI_FALSE @@ -795,6 +806,10 @@ CPPFLAGS LDFLAGS CFLAGS CC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -871,6 +886,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_dependency_tracking enable_maintainer_mode with_all @@ -897,6 +913,7 @@ with_freeipmi with_freeipmi_includes with_freeipmi_libs with_macosx_ups +with_linux_i2c with_ssl with_nss with_openssl @@ -1494,7 +1511,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nut 2.7.2 to adapt to many kinds of systems. +\`configure' configures nut 2.7.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1565,7 +1582,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nut 2.7.2:";; + short | recursive ) echo "Configuration of nut 2.7.3:";; esac cat <<\_ACEOF @@ -1573,10 +1590,15 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1588,7 +1610,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-all enable serial, usb, snmp, neon, ipmi, powerman, cgi, - dev, avahi + dev, avahi, linux_i2c --with-dev build and install the development files (no) --with-serial build and install serial drivers (yes) --with-usb build and install USB drivers (auto) @@ -1622,6 +1644,7 @@ Optional Packages: linker flags for the FreeIPMI library --with-macosx_ups build and install Mac OS X Power Sources meta-driver (auto) + --with-linux_i2c build and install i2c drivers (auto) --with-ssl enable SSL support (either NSS or OpenSSL) (auto) --with-nss enable SSL support using Mozilla NSS (auto) --with-openssl enable SSL support using OpenSSL (auto) @@ -1698,7 +1721,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to the package provider. +Report bugs to . _ACEOF ac_status=$? fi @@ -1761,7 +1784,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nut configure 2.7.2 +nut configure 2.7.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1920,6 +1943,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------------------------ ## +## Report this to https://github.com/networkupstools/nut/issues ## +## ------------------------------------------------------------ ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2347,7 +2374,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nut $as_me 2.7.2, which was +It was created by nut $as_me 2.7.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2857,7 +2884,7 @@ test -n "$target_alias" && *-aix*) echo 'aix' ;; *-freebsd*) echo 'freebsd' ;; *-darwin*) echo 'darwin' ;; - *solaris*) echo 'Linux x86_64 + *solaris*) echo 'Linux unknown ' ;; *-hpux*) echo 'hpux' ;; esac @@ -2980,7 +3007,7 @@ $as_echo "$dist_cv_build_flavor" >&6; } ac_config_headers="$ac_config_headers include/config.h" -am__api_version='1.11' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3077,9 +3104,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -3090,32 +3114,40 @@ case `pwd` in esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -3127,6 +3159,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -3137,8 +3179,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -3149,12 +3191,12 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -3166,10 +3208,10 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -3308,12 +3350,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -3396,6 +3432,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3418,7 +3493,7 @@ fi # Define the identity of the package. PACKAGE='nut' - VERSION='2.7.2' + VERSION='2.7.3' cat >>confdefs.h <<_ACEOF @@ -3446,12 +3521,22 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3459,6 +3544,49 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro to enable system extensions" >&5 $as_echo_n "checking for autoconf macro to enable system extensions... " >&6; } @@ -3483,7 +3611,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -4316,6 +4444,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4327,8 +4514,8 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # 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'. + # 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 @@ -4363,16 +4550,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -4381,8 +4568,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -4390,7 +4577,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # 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. am__obj=conftest.${OBJEXT-o} @@ -5526,6 +5713,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -5537,8 +5783,8 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # 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'. + # 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 @@ -5573,16 +5819,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -5591,8 +5837,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -5600,7 +5846,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # 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. am__obj=conftest.${OBJEXT-o} @@ -5654,131 +5900,6 @@ else fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6185,8 +6306,8 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # 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'. + # 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 @@ -6221,16 +6342,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -6239,8 +6360,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -6248,7 +6369,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # 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. am__obj=conftest.${OBJEXT-o} @@ -6903,6 +7024,63 @@ cat >>confdefs.h <<_ACEOF _ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if ${ac_cv_type_unsigned_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + for ac_func in vsnprintf snprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -6963,75 +7141,47 @@ $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } if ${ac_cv_type_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if test "$cross_compiling" = yes; then : ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif int main () { long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - ac_cv_type_long_long_int=yes + else ac_cv_type_long_long_int=no fi @@ -7039,11 +7189,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -else - ac_cv_type_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } @@ -7778,6 +7925,7 @@ if test "${with_all+set}" = set; then : if test -z "${with_dev}"; then with_dev="${withval}"; fi if test -z "${with_avahi}"; then with_avahi="${withval}"; fi if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi + if test -z "${with_linux_i2c}"; then with_linux_i2c="${withval}"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${withval}\"" >&5 $as_echo "\"${withval}\"" >&6; } else @@ -9918,6 +10066,115 @@ _ACEOF +# Check whether --with-linux_i2c was given. +if test "${with_linux_i2c+set}" = set; then : + withval=$with_linux_i2c; nut_with_linux_i2c="${withval}" +else + nut_with_linux_i2c="auto" + +fi + + +if test "${nut_with_linux_i2c}" != no; then + case ${target_os} in + linux* ) + ac_fn_c_check_decl "$LINENO" "i2c_smbus_read_word_data" "ac_cv_have_decl_i2c_smbus_read_word_data" "#include + #include + + +" +if test "x$ac_cv_have_decl_i2c_smbus_read_word_data" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_I2C_SMBUS_READ_WORD_DATA $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + nut_with_linux_i2c="yes" +else + nut_with_linux_i2c="no" +fi +ac_fn_c_check_decl "$LINENO" "i2c_smbus_write_word_data" "ac_cv_have_decl_i2c_smbus_write_word_data" "#include + #include + + +" +if test "x$ac_cv_have_decl_i2c_smbus_write_word_data" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_I2C_SMBUS_WRITE_WORD_DATA $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + nut_with_linux_i2c="yes" +else + nut_with_linux_i2c="no" +fi +ac_fn_c_check_decl "$LINENO" "i2c_smbus_read_block_data" "ac_cv_have_decl_i2c_smbus_read_block_data" "#include + #include + + +" +if test "x$ac_cv_have_decl_i2c_smbus_read_block_data" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_I2C_SMBUS_READ_BLOCK_DATA $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + nut_with_linux_i2c="yes" +else + nut_with_linux_i2c="no" +fi + + ;; + * ) + nut_with_linux_i2c="no" + ;; + esac +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build i2c based drivers" >&5 +$as_echo_n "checking whether to build i2c based drivers... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_linux_i2c} " >&5 +$as_echo "${nut_with_linux_i2c} " >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature + fi + echo "build i2c based drivers: ${nut_with_linux_i2c} " >> conf_nut_report_feature + + + if test "${nut_with_linux_i2c}" = "yes"; then + WITH_LINUX_I2C_TRUE= + WITH_LINUX_I2C_FALSE='#' +else + WITH_LINUX_I2C_TRUE='#' + WITH_LINUX_I2C_FALSE= +fi + + if test "${nut_with_linux_i2c}" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define WITH_LINUX_I2C 1 +_ACEOF + + fi + + + nut_ssl_lib="" @@ -11248,8 +11505,162 @@ $as_echo_n "checking for dblatex version... " >&6; } $as_echo "${DBLATEX_VERSION} found" >&6; } fi + for ac_prog in xsltproc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XSLTPROC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XSLTPROC in + [\\/]* | ?:[\\/]*) + ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XSLTPROC=$ac_cv_path_XSLTPROC +if test -n "$XSLTPROC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 +$as_echo "$XSLTPROC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$XSLTPROC" && break +done + + if test -n "${XSLTPROC}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltproc version" >&5 +$as_echo_n "checking for xsltproc version... " >&6; } + XSLTPROC_VERSION="`${XSLTPROC} --version 2>/dev/null`" + XSLTPROC_VERSION="${XSLTPROC_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${XSLTPROC_VERSION} found" >&5 +$as_echo "${XSLTPROC_VERSION} found" >&6; } fi + for ac_prog in xmllint +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XMLLINT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XMLLINT in + [\\/]* | ?:[\\/]*) + ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XMLLINT=$ac_cv_path_XMLLINT +if test -n "$XMLLINT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 +$as_echo "$XMLLINT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$XMLLINT" && break +done + + if test -n "${XMLLINT}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmllint version" >&5 +$as_echo_n "checking for xmllint version... " >&6; } + XMLLINT_VERSION="`${XMLLINT} --version 2>/dev/null`" + XMLLINT_VERSION="${XMLLINT_VERSION##* }" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${XMLLINT_VERSION} found" >&5 +$as_echo "${XMLLINT_VERSION} found" >&6; } + fi + + for ac_prog in source-highlight +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_SOURCE_HIGHLIGHT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $SOURCE_HIGHLIGHT in + [\\/]* | ?:[\\/]*) + ac_cv_path_SOURCE_HIGHLIGHT="$SOURCE_HIGHLIGHT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SOURCE_HIGHLIGHT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +SOURCE_HIGHLIGHT=$ac_cv_path_SOURCE_HIGHLIGHT +if test -n "$SOURCE_HIGHLIGHT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOURCE_HIGHLIGHT" >&5 +$as_echo "$SOURCE_HIGHLIGHT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$SOURCE_HIGHLIGHT" && break +done + + +fi + case "${nut_with_doc}" in yes|all|auto) @@ -11266,8 +11677,8 @@ esac for nut_doc_build_target in ${nut_doc_build_list}; do case "${nut_doc_build_target}" in html-single) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build ${nut_doc_build_target}" >&5 -$as_echo_n "checking if asciidoc version can build ${nut_doc_build_target}... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)" >&5 +$as_echo_n "checking if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)... " >&6; } @@ -11315,8 +11726,8 @@ $as_echo "no" >&6; } ;; html-chunked) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build ${nut_doc_build_target}" >&5 -$as_echo_n "checking if a2x version can build ${nut_doc_build_target}... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)" >&5 +$as_echo_n "checking if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)... " >&6; } @@ -11364,8 +11775,8 @@ $as_echo "no" >&6; } ;; pdf) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dblatex version can build ${nut_doc_build_target}" >&5 -$as_echo_n "checking if dblatex version can build ${nut_doc_build_target}... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)" >&5 +$as_echo_n "checking if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)... " >&6; } @@ -11428,7 +11839,7 @@ no) if test -z "${DOC_NOBUILD_LIST}"; then nut_with_doc="yes" else - as_fn_error $? "\"Unable to build ${DOC_NOBUILD_LIST} documentation\"" "$LINENO" 5 + as_fn_error $? "\"Unable to build ${DOC_NOBUILD_LIST} documentation (check for 'no' results above)\"" "$LINENO" 5 fi ;; esac @@ -11526,6 +11937,38 @@ $as_echo "no" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if xsltproc is present (mandatory for man page regeneration)" >&5 +$as_echo_n "checking if xsltproc is present (mandatory for man page regeneration)... " >&6; } +if test -n "${XSLTPROC}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if xmllint is present (mandatory for man page regeneration)" >&5 +$as_echo_n "checking if xmllint is present (mandatory for man page regeneration)... " >&6; } +if test -n "${XMLLINT}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if source-highlight is present (preferable for documentation generation)" >&5 +$as_echo_n "checking if source-highlight is present (preferable for documentation generation)... " >&6; } +if test -n "${SOURCE_HIGHLIGHT}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build and install documentation" >&5 $as_echo_n "checking whether to build and install documentation... " >&6; } @@ -13785,7 +14228,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -13810,7 +14253,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -13829,7 +14275,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -22532,7 +22981,6 @@ if test -n "${systemdsystemunitdir}"; then systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${systemdsystemunitdir}" >&5 $as_echo "using ${systemdsystemunitdir}" >&6; } - systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -22830,6 +23278,21 @@ else fi + if test "xAIX" = "x`uname -s 2>/dev/null`"; then + SYSTEM_AIX_TRUE= + SYSTEM_AIX_FALSE='#' +else + SYSTEM_AIX_TRUE='#' + SYSTEM_AIX_FALSE= +fi + + + +cat >>confdefs.h <<_ACEOF +#define CPU_TYPE $target_cpu +_ACEOF + + conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -22870,6 +23333,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF +now=`TZ=UTC date +%Y-%m-%d` @@ -22920,7 +23384,9 @@ _ACEOF -ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upsmon.conf.sample conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/man/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutclient.pc lib/libnutscan.pc lib/Makefile scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/devd/Makefile scripts/devd/nut-usb.conf scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf 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 scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile tests/Makefile Makefile" + + +ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upsmon.conf.sample conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/docinfo.xml docs/man/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutclient.pc lib/libnutscan.pc lib/Makefile scripts/Aix/nut-aix.spec scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/devd/Makefile scripts/devd/nut-usb.conf scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf 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 scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile tests/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -23031,6 +23497,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -23100,6 +23574,10 @@ if test -z "${WITH_MACOSX_TRUE}" && test -z "${WITH_MACOSX_FALSE}"; then as_fn_error $? "conditional \"WITH_MACOSX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WITH_LINUX_I2C_TRUE}" && test -z "${WITH_LINUX_I2C_FALSE}"; then + as_fn_error $? "conditional \"WITH_LINUX_I2C\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_NSS_TRUE}" && test -z "${WITH_NSS_FALSE}"; then as_fn_error $? "conditional \"WITH_NSS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -23172,6 +23650,10 @@ if test -z "${HAVE_ASPELL_TRUE}" && test -z "${HAVE_ASPELL_FALSE}"; then as_fn_error $? "conditional \"HAVE_ASPELL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${SYSTEM_AIX_TRUE}" && test -z "${SYSTEM_AIX_FALSE}"; then + as_fn_error $? "conditional \"SYSTEM_AIX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -23569,7 +24051,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nut $as_me 2.7.2, which was +This file was extended by nut $as_me 2.7.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23629,13 +24111,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to the package provider." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nut config.status 2.7.2 +nut config.status 2.7.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -24152,6 +24634,7 @@ do "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "data/driver.list") CONFIG_FILES="$CONFIG_FILES data/driver.list" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "docs/docinfo.xml") CONFIG_FILES="$CONFIG_FILES docs/docinfo.xml" ;; "docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/Makefile" ;; "drivers/Makefile") CONFIG_FILES="$CONFIG_FILES drivers/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; @@ -24160,6 +24643,7 @@ do "lib/libnutclient.pc") CONFIG_FILES="$CONFIG_FILES lib/libnutclient.pc" ;; "lib/libnutscan.pc") CONFIG_FILES="$CONFIG_FILES lib/libnutscan.pc" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "scripts/Aix/nut-aix.spec") CONFIG_FILES="$CONFIG_FILES scripts/Aix/nut-aix.spec" ;; "scripts/augeas/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/augeas/Makefile" ;; "scripts/augeas/nutnutconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutnutconf.aug" ;; "scripts/augeas/nutupsconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsconf.aug" ;; @@ -24793,7 +25277,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -24806,7 +25290,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -24840,21 +25324,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || diff --git a/configure.ac b/configure.ac index ce8b2c5..f87be6d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,9 @@ dnl +------------------------------------------------------------------+ -dnl | Network UPS Tools: configure.in | +dnl | Network UPS Tools: configure.ac | dnl +------------------------------------------------------------------+ dnl NUT version number is defined here, with a Git suffix in include/nut_version.h -AC_INIT(nut, 2.7.2) +AC_INIT(nut, 2.7.3, [https://github.com/networkupstools/nut/issues]) AC_CONFIG_SRCDIR(server/upsd.c) AC_CONFIG_MACRO_DIR([m4]) echo "Network UPS Tools version ${PACKAGE_VERSION}" @@ -11,7 +11,7 @@ AC_CANONICAL_SYSTEM NUT_CHECK_OS AC_CONFIG_HEADER(include/config.h) AC_PREFIX_DEFAULT(/usr/local/ups) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([subdir-objects]) dnl we need Autoconf 2.60 or better to enable features of Posix that are extensions to C AC_MSG_CHECKING(for autoconf macro to enable system extensions) @@ -23,7 +23,7 @@ m4_version_prereq(2.60, [ ]) dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile -dnl in sync after SVN updates. +dnl in sync after Git updates. AM_MAINTAINER_MODE dnl PKG_PROG_PKG_CONFIG @@ -42,6 +42,8 @@ dnl However, automatically define the tree version (mostly for AC_SUBST) TREE_VERSION="`echo ${PACKAGE_VERSION} | awk '{ print substr($0,1,3) }'`" AC_DEFINE_UNQUOTED(TREE_VERSION, "${TREE_VERSION}", [NUT tree version]) +dnl Should not be necessary, since old servers have well-defined errors for +dnl unsupported commands: NUT_NETVERSION="1.2" AC_DEFINE_UNQUOTED(NUT_NETVERSION, "${NUT_NETVERSION}", [NUT network protocol version]) @@ -221,7 +223,7 @@ dnl check for --with-all (or --without-all, or --with-all=auto) flag AC_MSG_CHECKING(for --with-all) AC_ARG_WITH(all, - AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi]), + AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi, linux_i2c]), [ if test -n "${withval}"; then dnl Note: we allow "no" as a positive value, because @@ -235,6 +237,7 @@ AC_ARG_WITH(all, if test -z "${with_dev}"; then with_dev="${withval}"; fi if test -z "${with_avahi}"; then with_avahi="${withval}"; fi if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi + if test -z "${with_linux_i2c}"; then with_linux_i2c="${withval}"; fi AC_MSG_RESULT("${withval}") else AC_MSG_RESULT(not given) @@ -464,6 +467,35 @@ NUT_REPORT_FEATURE([build Mac OS X meta-driver], [${nut_with_macosx_ups}], [${nut_macosx_ups_lib}], [WITH_MACOSX], [Define to enable Mac OS X meta-driver]) +dnl ---------------------------------------------------------------------- +dnl checks related to --with_linux_i2c +dnl Check for i2c header on Linux, used for ASEM UPS driver +NUT_ARG_WITH([linux_i2c], [build and install i2c drivers], [auto]) +if test "${nut_with_linux_i2c}" != no; then + case ${target_os} in + linux* ) + AC_CHECK_DECLS( + [i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data], + [nut_with_linux_i2c="yes"], + [nut_with_linux_i2c="no"], + [#include + #include + ] + ) + ;; + * ) + nut_with_linux_i2c="no" + ;; + esac +fi +NUT_REPORT_FEATURE( + [build i2c based drivers], + [${nut_with_linux_i2c}], + [], + [WITH_LINUX_I2C], + [Define to enable I2C support] +) + dnl ---------------------------------------------------------------------- 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 @@ -611,7 +643,7 @@ esac for nut_doc_build_target in ${nut_doc_build_list}; do case "${nut_doc_build_target}" in html-single) - AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target}]) + AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)]) AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [ AC_MSG_RESULT(yes) DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" @@ -622,7 +654,7 @@ for nut_doc_build_target in ${nut_doc_build_list}; do ;; html-chunked) - AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target}]) + AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)]) AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ AC_MSG_RESULT(yes) DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" @@ -633,7 +665,7 @@ for nut_doc_build_target in ${nut_doc_build_list}; do ;; pdf) - AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target}]) + AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)]) AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [0.2.5], [ AC_MSG_RESULT(yes) DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" @@ -659,7 +691,7 @@ no) if test -z "${DOC_NOBUILD_LIST}"; then nut_with_doc="yes" else - AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation"]) + AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation (check for 'no' results above)"]) fi ;; esac @@ -681,6 +713,31 @@ AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ nut_have_asciidoc="no" ]) +dnl TODO: test for docbook-xsl files (maybe build a test man page?) +dnl https://github.com/networkupstools/nut/issues/162 +AC_MSG_CHECKING([if xsltproc is present (mandatory for man page regeneration)]) +if test -n "${XSLTPROC}"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +fi + +AC_MSG_CHECKING([if xmllint is present (mandatory for man page regeneration)]) +if test -n "${XMLLINT}"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +fi + +AC_MSG_CHECKING([if source-highlight is present (preferable for documentation generation)]) +if test -n "${SOURCE_HIGHLIGHT}"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}], [], [WITH_ASCIIDOC], [Define to enable Asciidoc support]) @@ -1010,7 +1067,6 @@ dnl files will try to get intalled to the actual system directories if test -n "${systemdsystemunitdir}"; then systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" AC_MSG_RESULT(using ${systemdsystemunitdir}) - systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`" else AC_MSG_RESULT(no) fi @@ -1112,6 +1168,12 @@ dnl check for spell checking deps AC_PATH_PROGS([ASPELL], [aspell], [none]) AM_CONDITIONAL([HAVE_ASPELL], [test "x$ASPELL" != "xnone"]) +dnl AIX system +AM_CONDITIONAL([SYSTEM_AIX], [test "xAIX" = "x`uname -s 2>/dev/null`"]) + +dnl processor type +AC_DEFINE_UNQUOTED(CPU_TYPE, $target_cpu, [Define processor type]) + dnl expand ${sysconfdir} and write it out conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" @@ -1140,6 +1202,10 @@ eval conftemp=\"${conftemp}\" SBINDIR=${conftemp} AC_DEFINE_UNQUOTED(SBINDIR, "${conftemp}", [Default path for system executables]) +dnl Current date +now=`TZ=UTC date +%Y-%m-%d` + +AC_SUBST(now) AC_SUBST(OS_NAME) AC_SUBST(TREE_VERSION) AC_SUBST(NUT_NETVERSION) @@ -1201,6 +1267,7 @@ AC_OUTPUT([ data/Makefile data/driver.list docs/Makefile + docs/docinfo.xml docs/man/Makefile drivers/Makefile include/Makefile @@ -1209,6 +1276,7 @@ AC_OUTPUT([ lib/libnutclient.pc lib/libnutscan.pc lib/Makefile + scripts/Aix/nut-aix.spec scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug diff --git a/data/Makefile.in b/data/Makefile.in index 96bf232..5a010e3 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +17,51 @@ # Network UPS Tools: data VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -55,8 +82,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = data -DIST_COMMON = $(dist_data_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/driver.list.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/driver.list.in $(dist_data_DATA) 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 \ @@ -85,15 +112,28 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = driver.list CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -130,9 +170,29 @@ am__installdirs = "$(DESTDIR)$(datadir)" "$(DESTDIR)$(datadir)" DATA = $(dist_data_DATA) $(nodist_data_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -165,6 +225,7 @@ am__relativize = \ A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -271,12 +332,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -321,6 +385,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -431,22 +496,25 @@ uninstall-nodist_dataDATA: 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. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -461,57 +529,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -527,12 +550,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -544,15 +562,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -561,6 +575,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -724,24 +753,22 @@ ps-am: uninstall-am: uninstall-dist_dataDATA uninstall-nodist_dataDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dist_dataDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-nodist_dataDATA 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 uninstall-dist_dataDATA \ - uninstall-nodist_dataDATA +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_dataDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-nodist_dataDATA \ + 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-am uninstall uninstall-am \ + uninstall-dist_dataDATA uninstall-nodist_dataDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/data/cmdvartab b/data/cmdvartab index 8bef408..ef68d70 100644 --- a/data/cmdvartab +++ b/data/cmdvartab @@ -20,6 +20,7 @@ VARDESC ups.firmware "UPS firmware" VARDESC ups.firmware.aux "Auxiliary device firmware" VARDESC ups.temperature "UPS temperature (degrees C)" VARDESC ups.load "Load on UPS (percent of full)" +VARDESC ups.load.energysave "Load on UPS that triggers energysave (percent)" VARDESC ups.load.high "Load when UPS switches to overload condition (percent)" VARDESC ups.id "UPS system identifier" VARDESC ups.delay.start "Interval to wait before (re)starting the load (seconds)" @@ -67,6 +68,10 @@ VARDESC input.transfer.boost.low "Low voltage boosting transfer point (V)" VARDESC input.transfer.boost.high "High voltage boosting transfer point (V)" VARDESC input.transfer.trim.low "Low voltage trimming transfer point (V)" VARDESC input.transfer.trim.high "High voltage trimming transfer point (V)" +VARDESC input.transfer.delay "Delay before transfer to mains" +VARDESC input.load "Load on (ePDU) input (percent of full)" +VARDESC input.realpower "Current sum value of all (ePDU) phases real power (W)" +VARDESC input.power "Current sum value of all (ePDU) phases apparent power (VA)" VARDESC output.voltage "Output voltage (V)" VARDESC output.voltage.nominal "Nominal output voltage (V)" @@ -94,6 +99,10 @@ VARDESC battery.packs.bad "Number of bad battery packs" VARDESC battery.type "Battery chemistry" VARDESC battery.protection "Prevent deep discharge of battery" VARDESC battery.energysave "Switch off when running on battery and no/low load" +VARDESC battery.energysave.load "Switch off UPS if on battery and load level lower (percent)" +VARDESC battery.energysave.delay "Delay before switch off UPS if on battery and load level low (min)" +VARDESC battery.energysave.realpower "Switch off UPS if on battery and load level lower (Watts)" +VARDESC battery.charger.status "Battery charger status" VARDESC ambient.temperature "Ambient temperature (degrees C)" VARDESC ambient.temperature.alarm "Ambient temperature alarm is active" @@ -179,8 +188,10 @@ CMDDESC beeper.mute "Temporarily mute the UPS beeper" CMDDESC beeper.toggle "Toggle the UPS beeper" CMDDESC outlet.1.load.off "Turn off the load on outlet 1 immediately" CMDDESC outlet.1.load.on "Turn on the load on outlet 1 immediately" +CMDDESC outlet.1.shutdown.return "Turn off the outlet 1 and return when power is back" CMDDESC outlet.2.load.off "Turn off the load on outlet 2 immediately" CMDDESC outlet.2.load.on "Turn on the load on outlet 2 immediately" +CMDDESC outlet.2.shutdown.return "Turn off the outlet 2 and return when power is back" # The following two commands should *only* be defined when you need # to compose a 'shutdown.return' command by sending both a switch-off diff --git a/data/driver.list.in b/data/driver.list.in index 45db598..a0e82fb 100644 --- a/data/driver.list.in +++ b/data/driver.list.in @@ -48,6 +48,8 @@ "AEG Power Solutions" "ups" "2" "PROTECT HOME" "" "blazer_ser or blazer_usb" +"APC" "ups" "2" "Back-UPS 1200BR (Microsol)" "" "solis" +"APC" "ups" "2" "Back-UPS BZ2200BI-BR (Microsol)" "" "solis" "APC" "ups" "1" "Back-UPS Pro" "" "apcsmart" "APC" "ups" "1" "Matrix-UPS" "" "apcsmart" "APC" "ups" "1" "Smart-UPS" "" "apcsmart" @@ -91,6 +93,8 @@ "ARTronic" "ups" "2" "ARTon Platinium Combo 3.1 10/15/20 kVA" "USB" "blazer_usb" "ARTronic" "ups" "2" "ARTon Platinium RT 1/2/3/6/10 kVA" "USB" "blazer_usb" +"ASEM SPA" "UPS" "5" "PB1300 UPS" "i2c" "asem" + "ATEK" "ups" "2" "Defensor 1K Tower / Rack" "USB" "blazer_usb" "ATEK" "ups" "2" "Defensor 2K Tower / Rack" "USB" "blazer_usb" "ATEK" "ups" "2" "Defensor 3K Tower / Rack" "USB" "blazer_usb" @@ -120,6 +124,7 @@ "Belkin" "ups" "2" "F6H375-USB" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups" "Belkin" "ups" "2" "F6H375-USB" "USB (2007 models, vendor id: 0665)" "blazer_usb" "Belkin" "ups" "2" "Office Series F6C550-AVR" "USB" "usbhid-ups" +"Belkin" "ups" "3" "Regulator PRO-USB" "USB (~2000, product id: 0f51)" "usbhid-ups" "Belkin" "ups" "2" "Regulator Pro" "F6C525-SER, F6C625-SER" "belkin" "Belkin" "ups" "1" "Resource" "" "genericups upstype=4" "Belkin" "ups" "2" "Small Enterprise F6C1500-TW-RK" "serial port" "belkin" @@ -203,6 +208,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" "Value 1500ELCD-RU" "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" @@ -319,6 +325,8 @@ "ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7" "ETA" "ups" "1" "mini+UPS PRO" "UPS Explorer cable" "etapro" +"EUROCASE" "ups" "2" "EA200N 2000VA" "USB" "nutdrv_qx" # http://partis.cz/index.php?gid=2551 + "EVER" "ups" "1" "NET DPC series" "Serial port" "everups" "EVER" "ups" "1" "AP Pro series" "Serial port" "everups" "EVER" "ups" "1" "625/1000" "" "safenet" @@ -341,6 +349,7 @@ "Fairstone" "ups" "1" "L525/L625/L750" "" "safenet" "Fideltronik" "ups" "1" "Ares 700 and larger" "" "genericups upstype=6" +"Fideltronik" "ups" "2" "LUPUS 500" "USB" "nutdrv_qx" "Fideltronik" "ups" "1" "Other Ares models" "" "genericups upstype=19" "Fiskars" "ups" "4" "PowerRite MAX" "" "upscode2" @@ -348,6 +357,10 @@ "Fiskars" "ups" "4" "PowerServer 30" "" "upscode2" "Fiskars" "ups" "4" "9200" "UPS Information Unit" "upscode2" +"Flight Technic & International (FTUPS)" "ups" "2" "FT-1000BS" "Serial" "nutdrv_qx" +"Flight Technic & International (FTUPS)" "ups" "2" "FT-1000BS" "USB" "nutdrv_qx" +"Flight Technic & International (FTUPS)" "ups" "2" "FT-1000BS(T)" "Serial" "nutdrv_qx" +"Flight Technic & International (FTUPS)" "ups" "2" "FT-1000BS(T)" "USB" "nutdrv_qx" "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" @@ -372,6 +385,8 @@ "Gemini" "ups" "1" "UPS625/UPS1000" "" "safenet" +"Grafenthal" "ups" "2" "PR-3000-HS" "SNMP/Web Minislot card (ref 149G0006)" "snmp-ups" # http://grafenthal.de/produkte/usv/online/pr-hs-serie/pr-3000-hs/?L=3et8 + "Gtec" "ups" "2" "ZP120N-1K / ZP120N-1KS / ZP120N-2K / ZP120N-2KS / ZP120N-3K / ZP120N-3KS" "" "blazer_usb" "Gtec" "ups" "2" "ZP120N-6K / ZP120N-6KS / ZP120N-10K-11 / ZP120N-10KS-11" "" "blazer_usb" "Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "USB port" "blazer_usb" @@ -445,6 +460,8 @@ "Jageson Technology" "ups" "1" "Jasuny USPS" "" "genericups upstype=4" +"JAWAN" "ups" "2" "JW-UPSLC02" "USB" "blazer_usb" + "Kanji" "ups" "1" "800 VA" "USB" "nutdrv_atcl_usb" "Kebo" "ups" "2" "1200D/D Series" "" "blazer_ser" @@ -457,6 +474,8 @@ "Krauler" "ups" "2" "UP-D1200VA" "USB" "blazer_usb" "Krauler" "ups" "2" "UP-M500VA" "USB" "blazer_usb" +"Lacerda" "ups" "2" "New Orion 800VA" "USB" "blazer_usb" + "LDLC" "ups" "2" "UPS-1200D" "" "blazer_usb langid_fix=0x4095" "Lestar" "ups" "2" "MD-800E" "" "blazer_ser" @@ -478,6 +497,7 @@ "Maxxtro" "ups" "2" "UPS 600 VA" "serial port" "blazer_ser" +"Mecer" "ups" "2" "ME-1000-WTU" "USB" "nutdrv_qx" # http://www.comx-computers.co.za/download/mecer/ME-1000-WTU.pdf "Mecer" "ups" "2" "ME-2000" "" "blazer_ser" "Meta System" "ups" "1" "HF Line" "1..4 boards" "metasys" @@ -696,6 +716,14 @@ "Neus" "ups" "2" "400va / 600va" "" "blazer_ser" +"NHS Sistemas de Energia" "ups" "5" "Expert C Online 6000" "" "gamatronic" # http://www.nhs.com.br/produtos_interna/id/TWpFeQ== +"NHS Sistemas de Energia" "ups" "5" "Expert C Online 8000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert C Online 10000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert S Online 6000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert S Online 8000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert S Online 10000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Expert S Online 10000" "" "gamatronic" + "Nitram" "ups" "1" "Elite 500" "" "genericups upstype=8" "Nitram" "ups" "1" "Elite 2002" "" "genericups upstype=16" "Nitram" "ups" "1" "Elite 2005" "" "powerpanel" @@ -760,6 +788,7 @@ "Powercom" "ups" "4" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)" "Powercom" "ups" "5" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)" "Powercom" "ups" "5" "BNT-xxxAP" "USB (product id: 0004)" "usbhid-ups (experimental)" +"Powercom" "ups" "1" "BNT-xxxAP" "USB (product id: 0001)" "usbhid-ups (experimental)" "POWEREX" "ups" "2" "VI 1000 LED" "" "blazer_usb" @@ -864,6 +893,8 @@ "Rocketfish" "ups" "2" "RF-1000VA / RF-1025VA" "" "usbhid-ups" +"Rucelf" "ups" "2" "Rucelf UPOII-3000-96-EL" "" "blazer_ser" # http://www.rucelf.ua/en/catalog/upoii-3000-96-el/ + "SmartLabs" "pdu" "1" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)" "SMS (Brazil)" "ups" "2" "Manager III" "" "blazer_ser" @@ -913,16 +944,6 @@ "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 (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 @@ -952,23 +973,39 @@ "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" "1" "INTERNETOFFICE700" "USB (older; product ID: 0001)" "tripplite_usb" "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" "1" "OMNISMART500" "USB (older; product ID: 0001)" "tripplite_usb" "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" "2" "OMNIVSINT800" "USB (older; product ID: 0001)" "tripplite_usb" "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" "2" "OMNIVS1000" "USB (older; product ID: 0001)" "tripplite_usb" +"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" "1" "OMNIVS1500XL" "USB" "tripplite_usb" "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" "1" "SmartUPS" "" "tripplite" +"Tripp Lite" "ups" "1" "SmartOnline" "" "tripplitesu" +"Tripp Lite" "ups" "1" "SMART550USB" "USB (older; product ID: 0001)" "tripplite_usb" +"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" "1" "SMART700USB" "USB" "tripplite_usb" +"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" "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" "1" "SMART1500RM2U" "USB (older; product ID: 0001)" "tripplite_usb" "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 @@ -980,6 +1017,7 @@ "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" "1" "SMART2200RMXL2U" "USB (older; product ID: 0001)" "tripplite_usb (experimental)" "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 @@ -994,13 +1032,8 @@ "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" "2" "SMART500RT1U" "USB (older; product ID 0001, protocol 3005)" "tripplite_usb" +"Tripp Lite" "ups" "3" "SMART500RT1U" "USB (newer; protocol/product ID 3005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2853 "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 @@ -1013,6 +1046,9 @@ "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" "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" "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 @@ -1032,9 +1068,6 @@ "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 @@ -1084,10 +1117,14 @@ "Vivaldi" "ups" "1" "EA200 LED" "USB" "richcomm_usb" +"Voltronic Power" "ups" "2" "Apex 1KVA" "Serial" "nutdrv_qx" +"Voltronic Power" "ups" "2" "Apex 1KVA" "USB" "nutdrv_qx" "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" "Imperial 1KVA" "Serial" "nutdrv_qx" +"Voltronic Power" "ups" "2" "Imperial 1KVA" "USB" "nutdrv_qx" "Voltronic Power" "ups" "2" "Prosine 800" "Serial" "nutdrv_qx" "Voltronic Power" "ups" "2" "Prosine 800" "USB" "nutdrv_qx" "Voltronic Power" "ups" "2" "Vesta LED 850VA" "USB" "nutdrv_qx" diff --git a/data/html/Makefile.in b/data/html/Makefile.in index 602ffcf..8ec093f 100644 --- a/data/html/Makefile.in +++ b/data/html/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,8 +80,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = data/html -DIST_COMMON = README $(am__dist_html_DATA_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/header.html.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/header.html.in $(am__dist_html_DATA_DIST) README 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 \ @@ -83,6 +110,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = header.html CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -120,10 +159,12 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)" DATA = $(dist_html_DATA) $(nodist_html_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -230,12 +271,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -280,6 +324,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -390,11 +435,11 @@ uninstall-nodist_htmlDATA: @list='$(nodist_html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -533,16 +578,17 @@ uninstall-am: uninstall-dist_htmlDATA uninstall-nodist_htmlDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_htmlDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-nodist_htmlDATA install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-dist_htmlDATA \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_htmlDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-nodist_htmlDATA \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am uninstall-dist_htmlDATA \ uninstall-nodist_htmlDATA diff --git a/depcomp b/depcomp index 25a39e6..4ebd5b3 100755 --- a/depcomp +++ b/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-03-27.16; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC case $1 in '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -57,11 +56,65 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + # A tabulation character. tab=' ' # A newline character. nl=' ' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 @@ -75,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -86,32 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" 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' - depmode=msvisualcpp + # 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' + 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 + # 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 + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -134,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -143,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -157,15 +216,14 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # 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. @@ -174,15 +232,15 @@ gcc) ## 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 ' ' "$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. 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 "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -200,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -209,7 +266,6 @@ sgi) if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in @@ -217,19 +273,15 @@ sgi) # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr "$nl" ' ' >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; @@ -247,9 +299,8 @@ aix) # 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|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -262,9 +313,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -273,65 +322,113 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # 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:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$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 - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" + aix_post_process_depfile ;; -icc) - # 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 - # 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 '\': - # 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. +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" 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 non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + 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 \'. # Do two passes, one to just change these to - # '$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" + # `$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" rm -f "$tmpdepfile" ;; @@ -342,9 +439,8 @@ hp2) # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -355,8 +451,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -366,76 +461,61 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; 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'. - # 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. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + # The Tru64 compiler uses -MD to generate dependencies as a side + # 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. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -446,8 +526,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -473,6 +552,7 @@ $ { G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -524,13 +604,14 @@ dashmstdout) # 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. "$@" $dashmflag | - sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - 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" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -583,10 +664,12 @@ makedepend) # 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" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -622,10 +705,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -657,15 +740,15 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | diff --git a/docs/FAQ.txt b/docs/FAQ.txt index 0eff1a4..8ce0b14 100644 --- a/docs/FAQ.txt +++ b/docs/FAQ.txt @@ -10,15 +10,6 @@ right? If not, go read it now, then come back to this file if your question wasn't answered in there. -== upsstats says 'Error: can't open template file (upsstats.html)'. -Go into your configuration path (/usr/local/ups/etc by default) and -copy the sample template files over to their real names. The sample -template files are installed with 'make install' and can -also be found inside the source distribution in the conf directory. - -== upsmon fails the login and says 'username required' now. -Go read the link:UPGRADING[UPGRADING] file again. - == My UPS driver now says it's 'broken', and won't start. What now? Or a variation like... @@ -108,6 +99,19 @@ tcp-wrappers or kernel firewall rules. This isn't a NUT-specific limitation - it applies equally to your web server or mailer daemon. +== Which UPS should I buy? + +One with a no-questions-asked money-back guarantee. Seriously. The NUT +developers cannot take responsibility for recommending an UPS (see the LICENSE +file for more details on the explicit lack of warranty), only to find out that +the manufacturer has changed the internals of the UPS without changing the +model name. + +That said, from time to time, certain vendors have helped out by providing +hardware for testing, results of their testing efforts, or protocol +specifications. We try to publish this information on the NUT website, so you +can take this into consideration when selecting an UPS brand. + == I have an APC Smart-UPS connected with a grey APC serial cable and it won't work. The Back-UPS type in the genericups driver works but then I don't get to use @@ -158,7 +162,7 @@ hardware properly. *Answer 1* -I try to follow the "tool for the job" philosophy. It may mean +We try to follow the "tool for the job" philosophy. It may mean more programs running, but the flexibility you get is usually worth it. @@ -172,7 +176,8 @@ Besides, if upsmon were rolled into upsd, upsd would get even bigger than it is now. You'd have one less process, but the RAM consumption would be pretty close to now. -See data-room.txt for more configuration ideas and explanations. +See the "Data Room" section in docs/config-notes.txt for more configuration +ideas and explanations. *Answer 2* @@ -225,7 +230,7 @@ driver supports the older Best hardware. There is a similar problem with the tripplite_usb driver: it only supports the older, proprietary protocol. Newer standards-compliant Tripp Lite UPS models are supported by usbhid-ups. We name drivers based on the information -available at that time, which often is incomplete. +available at the time the driver was first written, which often is incomplete. == What's this about 'data stale'? @@ -237,9 +242,9 @@ If this happens to you, make sure your driver is still running. Also look at the syslog. Sometimes the driver loses the connection to the UPS, and that will also make the data go stale. -Note: some very slow machines have trouble keeping up with the -serial ports during periods of extreme load. My old 486 used to -flip between "stale" and "OK" while running backups. +This might also happen on certain virtualization platforms. If you cannot +reproduce the problem on a physical machine, please report the bug to the +virtualization software vendor. If this happens a lot, you might consider cranking up DEADTIME in the upsmon.conf to suppress some of the warnings for shorter @@ -250,8 +255,8 @@ what's going on with the UPS. Note: some drivers occasionally need more time to update than the default value of MAXAGE (in upsd.conf) allows. As a result, they are temporarily marked stale even though everything is fine. This -can happen with MGE Ellipse equipment - see the mge-shut man page. -In such cases, you can raise the value of MAXAGE to avoid these +can happen with MGE Ellipse equipment - see the mge-shut or usbhid-ups man +pages. In such cases, you can raise the value of MAXAGE to avoid these warnings; try a value like 25 or 30. == Why do the client programs say 'Driver not connected' when I try to run them? @@ -267,6 +272,17 @@ Note: if you jumped in with both feet and didn't follow the INSTALL.nut document, you probably started upsd by itself. You have to run 'upsdrvctl start' to start the drivers after configuring ups.conf. +== Why don't the pathnames in your documentation match the package I installed? + +Each distribution has conventions for where specific file types should be +stored. The NUT project cannot possibly track all of these conventions, so the +documentation assumes the default installation directory prefix of +`/usr/local/ups` when describing file locations. The distributions tend not to +change the base name of the files, so you can search for drivers and +configuration files in the package database of installed files. For instance, +on Debian or Ubuntu derivatives, you can use `dpkg --search usbhid-ups` to see +where the drivers are stored. + == Everything works perfectly during the shutdown, and the UPS comes back on, but my system stays off. What's happening? Assuming you don't have the problem in the next question, then you @@ -518,45 +534,65 @@ file. There are several driver to support USB models. -- usbhid-ups supports various manufacturers complying to the HID standard, -- tripplite_usb supports various Tripp-Lite units, +- usbhid-ups supports various manufacturers complying to the HID Power Device Class (PDC) standard, +- tripplite_usb supports various older Tripp-Lite units (with USB ProductID 0001) - bcmxcp_usb supports various Powerware units, -- blazer_usb supports various manufacturers that use the Megatec / Q1 protocol. +- nutdrv_qx and blazer_usb support various manufacturers that use the Megatec / Q1 protocol. Refer to the 'driver-name' (8) manpage for more information. -== What is this usbhid-ups (formerly newhidups) about? - -The basic USB UPS support was done until NUT 2.2 using hidups. To allow -a wider support accross platforms for USB/HID compliant devices, -usbhid-ups driver uses libusb (which is available for a wide range of -operating systems) and libhid (currently, a modified internal version -of it). - -As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver, -and provides support for various manufacturers. At that time, newhidups was -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. +You can also consult the Hardware Compatibility List (HCL) and filter on USB: +http://www.networkupstools.org/stable-hcl.html?connection=USB == 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 +However, the driver may still fail 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. +*Operation not permitted* is a message pointing to 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. +- 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. +In this case, just unplug and plug back the USB cord, then restart NUT. + +There was a mistake in the naming of the NUT udev rules file which resulted in +the rules being overridden by another udev configuration file. While this has +been fixed in the Git master branch, your distribution may still be affected. +Details are available in the following Github issue: +https://github.com/networkupstools/nut/issues/140 + +== Why do you not use the Linux kernel HID driver when communicating with USB UPSes? + +When the `usbhid-ups` was first written, it replaced an older driver `hidups` +which used the Linux kernel USB HID API. At the time, the kernel HID API could +not distinguish between identical Usage IDs that were nested in different +parent IDs, so many common measurements were not available from `hidups`. For +this reason, the libusb approach was chosen, which has the added side effect +of being more portable than the Linux HID API. The Linux hiddev device nodes +have very similar permissions problems as the `/dev/bus/usb` nodes that the +libusb approach uses. + +Due to difficulties in running libusb on OS X and Windows, those platforms +might benefit more from a native HID approach. + +== I get a message from the kernel that the driver "did not claim interface 0 before use" + +On Linux, if two copies of a driver are competing for the UPS, these messages +will appear in dmesg: + + usbfs: process 29641 (usbhid-ups) did not claim interface 0 before use + +This can be a symptom of a source install conflicting with a package install. +There is a rudimetary locking mechanism in NUT, but there is a chance that the +packages might not use the same directory as the NUT default, and the conflict +will be reported by the kernel. == Why doesn't my package work? @@ -587,23 +623,50 @@ root, start upsmon with -p and it will go back to being one big process. This is not recommended, so don't blame us if something bad happens in this mode. +== I get the following error while building: `make[4]: don't know how to make HP-UX/nut-drvctl.sh. Stop` + +NUT still has some hidden dependencies on GNU Make which show up while running +`make distcheck`. If you are running `make distcheck` or its variants, you +will need to install GNU Make (`devel/gmake` in the ports tree), which is +incidentally what the official FreeBSD port of NUT does for all builds. + == I have 'some problem' with 'some old version' ... Get the latest stable release, and see if it still happens. If it goes away, it means someone else reported it and got it fixed a long time ago. -If that doesn't work, try the latest development version. +You may want to search the mailing lists to see if someone else has +experienced the same problem. If so, there is a good chance that someone else +has worked through the process necessary to shoehorn the latest NUT version +into your distribution (potentially with unofficial packages). -If your problem is STILL there, then contact the mailing lists. +Some OS distributions contain old versions of NUT. If your hardware is newer +than the NUT release, there is a good chance that support has not been added +yet. Please do not tell us you have the "latest version for Distro XYZ" - even +if the developers are familiar with that distribution, it helps others if you +quote the exact package version. NOTE: check the release date on the version you have. If it's more -than about 6 months old, there's probably a newer stable tree +than about 6-12 months old, there's probably a newer stable tree version out there. +== I built NUT from Git, and it complains about lots of missing files. What happened? + +If you are not actively developing a driver, can you use a snapshot instead? +The NUT instance of Buildbot generates tar files of the latest NUT source +after each successful build, and these snapshots include a prebuilt version of +the `./configure` script. + +Otherwise, you will need recent versions of autoconf, automake, libtool, +asciidoc, a2x and its dependencies for DocBook/dblatex. Rather than publish a +list of the exact versions needed (which will quickly become out of date), we +recommend you consult your distribution's dependency list for building a NUT +package, and use that as a starting point. + == Do I have to use a serial connection to monitor the UPS? What about direct network connections (SNMP or otherwise)? -No. NUT currently support USB communication through several drivers, +NUT currently supports USB communication through several drivers, and also SNMP and XML/HTTP (Eaton and MGE) communications. Since NUT is very extensible, support for a new communication bus can be added @@ -616,15 +679,10 @@ turn an owner into a developer or vice-versa. == What happened to the patch I sent? -If a release goes by and your patch hasn't been included, it was -probably dropped. There can be a lot of patches waiting for -inclusion at some points, and occasionally some have to be -rejected. - -Design issues or severe coding style problems can be the reason -for this. I try to point out what the problems are, but there are -limits. See developers.txt for some pointers on submitting -patches. +We try to prioritize emails with patches, but you should understand that a +simple fix for your bug might be complicated to integrate with the rest of +NUT. Changing the way a fundamental component works, such as USB support, +means a lot of testing to ensure that your fix does not break other drivers. Sometimes patches are put on hold due to a feature freeze. If it doesn't show up once the new version opens up, send it again. @@ -632,7 +690,7 @@ doesn't show up once the new version opens up, send it again. == I'm not much of a programmer. How can I help? There's always work to be done outside of the realm of code bashing. -Documentation might not always be so clear. A user's perspective +Documentation can always be improved. A user's perspective is sometimes needed to appreciate this. Bug reports on a project's documentation are just as valuable as those for the actual source. @@ -686,10 +744,13 @@ upsstats.html and change it from TEMPC to TEMPF. == Why is the mailing list ignoring me? -You probably asked a question that's answered in this FAQ or -somewhere else in the documentation and nobody wants to quote it +You probably asked a question that's answered in this FAQ, or +somewhere else in the documentation, and nobody wants to quote it for you. +There is a small chance that the mailing list spam filter ate your message. +Check the list archives to see if your message appears there. + Convincing the other subscribers that you've actually read down this far might be useful. You might mention "queequeg" for better results. @@ -697,6 +758,22 @@ This URL may also be helpful: http://www.catb.org/~esr/faqs/smart-questions.html +== Why are you so insistent about sending emails to public mailing lists instead of to individuals? + +By and large, NUT is a volunteer effort. By emailing one person, you are +asking them to take care of your question. If you email the list instead, you +give others the opportunity to answer. + +In addition, the mailing lists are publicly archived, and therefore easily +searchable. Chances are, you aren't the only person who will ever have that +question. + +== If you want mailing list replies to go to the list, why don't you add a Reply-To: header? + +We are not going to rehash all of the arguments for and against this in a +simple FAQ entry. If you intend for your reply to go to more than just the +last person who posted, it is not too much trouble to hit "reply all". + == I found some information about another kind of UPS protocol you don't support yet, but I don't know what to do with it. Can you help? If you're not a programmer, you can still help others by making diff --git a/docs/Makefile.am b/docs/Makefile.am index c7907c2..8ca7afd 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -32,6 +32,7 @@ CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \ images/cables/mac-940-0024C.png images/cables/mge-66049.png \ images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \ + images/cables/mge-usb-rj45.jpg \ images/cables/SOLA-330.png ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ @@ -39,7 +40,7 @@ ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ NUT_SPELL_DICT = nut.dict EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \ - $(CABLES_IMAGES) docinfo.xml $(NUT_SPELL_DICT) \ + $(CABLES_IMAGES) $(NUT_SPELL_DICT) \ common.xsl xhtml.xsl chunked.xsl ASCIIDOC_HTML_SINGLE = user-manual.html \ @@ -90,8 +91,10 @@ packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.tx # variable ASCIIDOC_VERBOSE to "-v", ie: # $ ASCIIDOC_VERBOSE=-v make A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ - --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ - --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --xsltproc-opts "--nonet" \ + --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \ + --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \ + --xsltproc-opts "--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ --attribute iconsdir=$(srcdir)/images \ --attribute=badges \ --attribute=external_title \ diff --git a/docs/Makefile.in b/docs/Makefile.in index ad9ac5c..037296f 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,7 +79,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = docs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/docinfo.xml.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 \ @@ -79,17 +107,30 @@ 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 = +CONFIG_CLEAN_FILES = docinfo.xml CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -97,9 +138,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -132,6 +193,7 @@ am__relativize = \ A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -238,12 +300,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -288,6 +353,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -343,6 +409,7 @@ CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \ images/cables/mac-940-0024C.png images/cables/mge-66049.png \ images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \ + images/cables/mge-usb-rj45.jpg \ images/cables/SOLA-330.png ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ @@ -350,7 +417,7 @@ ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ NUT_SPELL_DICT = nut.dict EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \ - $(CABLES_IMAGES) docinfo.xml $(NUT_SPELL_DICT) \ + $(CABLES_IMAGES) $(NUT_SPELL_DICT) \ common.xsl xhtml.xsl chunked.xsl ASCIIDOC_HTML_SINGLE = user-manual.html \ @@ -387,8 +454,10 @@ FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ # variable ASCIIDOC_VERBOSE to "-v", ie: # $ ASCIIDOC_VERBOSE=-v make A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ - --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ - --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --xsltproc-opts "--nonet" \ + --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \ + --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \ + --xsltproc-opts "--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ --attribute iconsdir=$(srcdir)/images \ --attribute=badges \ --attribute=external_title \ @@ -429,6 +498,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): +docinfo.xml: $(top_builddir)/config.status $(srcdir)/docinfo.xml.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo @@ -437,22 +508,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -467,57 +541,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -533,12 +562,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -550,15 +574,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -567,6 +587,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -725,12 +760,11 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-local ctags ctags-recursive distclean distclean-generic \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool clean-local \ + cscopelist-am ctags ctags-am distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -739,8 +773,8 @@ uninstall-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 + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am all: doc diff --git a/docs/cables.txt b/docs/cables.txt index fde660a..afc2c29 100644 --- a/docs/cables.txt +++ b/docs/cables.txt @@ -55,7 +55,7 @@ Documents in this section are provided courtesy of Eaton. MGE Office Protection Systems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The two first cables also applies to MGE UPS SYSTEMS. +The three first cables also applies to MGE UPS SYSTEMS and Eaton. DB9-DB9 cable (ref 66049) ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -67,11 +67,36 @@ image::images/cables/mge-66049.png[DB9-DB9 cable] DB9-RJ45 cable ^^^^^^^^^^^^^^ -This cable is used on the more recent models, including Ellipse MAX, Protection -Station, ... +This cable is used on the more recent models, including Ellipse MAX, +Protection Station, ... image::images/cables/mge-db9-rj45.jpg[DB9-RJ45 cable] +NMC DB9-RJ45 cable +^^^^^^^^^^^^^^^^^^ + +The following applies to the MGE 66102 NMC (Network Management Card), and +possibly other models. The NMC connection is an 8P8C RJ45-style jack. + +|==== +|Signal | PC | NMC +| | 1,4,6 | +|TxD | 2 | 3 +|RxD | 3 | 6 +|GND | 5 | 4 +| | 7,8 | +| | shield | shield +|==== + + +USB-RJ45 cable +^^^^^^^^^^^^^^ + +This cable is used also on the more recent models, including Ellipse MAX, +Protection Station, ... + +image::images/cables/mge-usb-rj45.jpg[USB-RJ45 cable] + DB9-RJ12 cable ^^^^^^^^^^^^^^ @@ -104,17 +129,37 @@ T700, T1000, T1500, T1500j, T700h, T1000h, T1500h, R1500, R1500j, R1500h, T2000, T2000j, T2400h, T2400h-NA, R3000 / R3000j, R3000h, R3000h-International, R3000h-NA, R6000h-NA, R6000i, R6000j. -UPS PC 9 pin connector + UPS PC 9 pin connector - 1 --------- 3 - 2 --------- 2 - 4 -\ - 4 --------- 5 | - 6 -/ - 6 --------- 7 + 1 --------- 3 + 2 --------- 2 + 4 -\ + 4 --------- 5 | + 6 -/ + 6 --------- 7 Contributed by Kjell Claesson and Arnaud Quette. +Phoenixtec (Best Power) +----------------------- + +Many Best Power units (including the Patriot Pro II) have a female DB-9 socket +with a non-standard pinout. + +|==== +|Signal | PC | UPS +| | 1,4,6 | NC +|TxD | 2 | 2 +|RxD | 3 | 1 +|GND | 5 | 4 +| | 7,8 | NC +|==== + +Sources: + +* http://pinoutsguide.com/UPS/best_power_pinout.shtml +* http://lit.powerware.com/ll_download.asp?file=m_patriotproii_jan99.pdf +* Stan Gammons Tripp-Lite ---------- diff --git a/docs/chunked.xsl b/docs/chunked.xsl index a8b698c..7f09a80 100644 --- a/docs/chunked.xsl +++ b/docs/chunked.xsl @@ -14,9 +14,4 @@ images/icons/ images/icons/ - - - - - diff --git a/docs/common.xsl b/docs/common.xsl index 2e5cbc2..eed9099 100644 --- a/docs/common.xsl +++ b/docs/common.xsl @@ -103,4 +103,22 @@ book nop + + + + + + + + + + + + + + + diff --git a/docs/config-notes.txt b/docs/config-notes.txt index 700d8fa..021033b 100644 --- a/docs/config-notes.txt +++ b/docs/config-notes.txt @@ -76,7 +76,7 @@ Much better. The *=* character should be used with care too. There should be only one "simple" *=* character in a line: between the parameter name and its value. -All other *=* characters should be either escaped or whithin "quotes". +All other *=* characters should be either escaped or within "quotes". password = 123=123 @@ -648,9 +648,9 @@ shut down completely in the middle. In order for this to work, you need to shutdown NUT (UPS driver, upsd server and upsmon client) in the suspend script and start them again in the resume script. Don't try to keep them running. The upsd server -will latch the FSD state (so it won't be useable after resuming) and so +will latch the FSD state (so it won't be usable after resuming) and so will the upsmon client. Some drivers may work after resuming, but many -don't and some UPS'es will require re-initialization, so it's best not +don't and some UPSs will require re-initialization, so it's best not to keep this running either. After stopping driver, server and client you'll have to send the UPS diff --git a/docs/configure.txt b/docs/configure.txt index 282a1c9..9b12481 100644 --- a/docs/configure.txt +++ b/docs/configure.txt @@ -44,6 +44,11 @@ on servers. Note that you need to install freeipmi (0.8.5 or higher) development package or files. + --with-linux_i2c + +Build and install i2c drivers (default: auto-detect) +Note that you need to install libi2c development package or files. + --with-drivers=,,... Specify exactly which driver or drivers to build and install (this @@ -101,7 +106,7 @@ library). 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. +be preferred. Read docs/security.txt for instructions on SSL support. --with-wrap (default: auto-detect) @@ -115,7 +120,8 @@ Enable IPv6 support. --with-avahi (default: auto-detect) Build and install Avahi support, to publish NUT server availability -using mDNS protocol. +using mDNS protocol. This requires Avahi development files for the +Core and Client parts. --with-libltdl (default: auto-detect) diff --git a/docs/developers.txt b/docs/developers.txt index 7b2ec36..9d52065 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -371,16 +371,22 @@ Most developers will be well served by committing to their own Git repository, and having the NUT team merge their changes. 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 +fetch other developers' changes 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. +This allows development to continue without a constant network connection. 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. +If you use GitHub's web-based editor to make changes, it tends to create lots +of small commits, one per change per file. Unless there is reason to keep the +intermediate history, we will probably collapse the entire branch into one +commit with `git rebase -i` before merging. + The link:https://git.wiki.kernel.org/index.php/GitSvnCrashCourse[GitSvnCrashCourse] wiki page has some useful information for long-time users of Subversion. @@ -479,7 +485,7 @@ 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. +and should *not* be used as a guide for future commits. Repository etiquette and quality assurance ------------------------------------------ @@ -500,28 +506,9 @@ 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 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 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, 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. +history into a pile of spaghetti by merging unnecessarily. (Test merges can be +done on integration branches, which can be discarded if the merge is trivial.) +Be sure that your commit messages are descriptive when merging. 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 @@ -561,4 +548,49 @@ Here is an example workflow: 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. +[[building]] +Building the Code +----------------- + +For a developer, the NUT build process starts with `./autogen.sh`. This script +generates the `./configure` script that end users typically invoke to build +NUT. If you are making a number of changes to the NUT source tree, configuring +with the `--enable-maintainer-mode` flag will ensure that after you change +`Makefile.am`, the `Makefile.in` and `Makefile` get regenerated. At a +minimum, you will need: + +* autoconf +* automake +* libtool +* Python +* Perl + +After running `./autogen.sh`, you can pass your local configuration options to +`./configure` and run `make` from the top-level directory. To avoid the need +for root privileges when testing new NUT code, you may wish to use +`--prefix=$HOME/local/nut --with-statepath=/tmp`. You can also keep +compilation times down by only building the driver you are currently working +on: `--with-drivers=driver1,dummy-ups`. + +Before pushing your commits upstream, please 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. Note that this requires all of the dependencies necessary +to build the documentation, including asciidoc, a2x, xsltproc, dblatex and any +additional XSL stylesheets. + +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 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 than +make distcheck-light+, but will not work unless you have all the +optional libraries and features installed. + +Even if you do not use your distribution's packages of NUT, installing the +distribution's list of build dependencies for NUT can reduce the amount of +trial-and-error when installing dependencies. For instance, in Debian, you can +run `apt-get build-dep nut` to install all of the auto* tools as well as any +development libraries and headers. diff --git a/docs/docinfo.xml b/docs/docinfo.xml deleted file mode 100644 index a8650ec..0000000 --- a/docs/docinfo.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - 2.6.0 - 2011-01-14 - - - First release of AsciiDoc documentation for Network UPS Tools (NUT). - - - diff --git a/docs/docinfo.xml.in b/docs/docinfo.xml.in new file mode 100644 index 0000000..ed3faaf --- /dev/null +++ b/docs/docinfo.xml.in @@ -0,0 +1,23 @@ + + + + + @PACKAGE_VERSION@ + @now@ + + + Current release of Network UPS Tools (NUT). + + + + + + 2.6.0 + 2011-01-14 + + + First release of AsciiDoc documentation for Network UPS Tools (NUT). + + + + diff --git a/docs/documentation.txt b/docs/documentation.txt index b7cf5ee..4483117 100644 --- a/docs/documentation.txt +++ b/docs/documentation.txt @@ -3,6 +3,7 @@ Documentation ============= endif::website[] + User Documentation ------------------ @@ -11,12 +12,14 @@ ifdef::website[] - NUT User Manual (link:docs/user-manual.chunked/index.html[online]) (link:docs/user-manual.pdf[PDF]) - Cables information (link:cables.html[online]) (link:docs/cables.pdf[PDF]) - link:docs/man/index.html#User_man[User manual pages] +- link:ddl/index.html#_supported_devices[Devices Dumps Library (DDL)]: Provides information on how devices are supported endif::website[] ifndef::website[] - link:../FAQ.html[FAQ - Frequently Asked Questions] - linkdoc:user-manual[NUT user manual] - <> - link:../man/index.html#User_man[User manual pages] +- link:http://www.networkupstools.org/ddl/index.html#_supported_devices[Devices Dumps Library (DDL)]: Provides information on how devices are supported endif::website[] Developer Documentation @@ -28,6 +31,7 @@ ifdef::website[] - link:ups-protocols.html[UPS protocols library] - link:docs/man/index.html#Developer_man[Developer manual pages] - link:nut-qa.html[NUT Quality Assurance] +- link:ddl/index.html[Devices Dumps Library (DDL)]: Provides simulation data to the linkman:dummy-ups[8] driver endif::website[] ifndef::website[] - linkdoc:developer-guide[NUT Developer Guide] @@ -35,6 +39,7 @@ ifndef::website[] - link:ups-protocols.html[UPS protocols library] - link:../man/index.html#Developer_man[Developer manual pages] - link:nut-qa.html[NUT Quality Assurance] +- link:http://www.networkupstools.org/ddl/index.html[Devices Dumps Library (DDL)]: Provides simulation data to the linkman:dummy-ups[8] driver endif::website[] Offsite Links @@ -51,6 +56,7 @@ These are general information about UPS and PDU. These are writeups by users of the software. +- link:http://rogerprice.org/NUT.html[NUT Setup with openSUSE] '(Roger Price)' - link:http://www.dimat.unina2.it/LCS/MonitoraggioUpsNutUbuntu10-eng.htm[Deploying NUT on an Ubuntu 10.04 cluster] '(Stefano Angelone)' - link:http://blog.shadypixel.com/monitoring-a-ups-with-nut-on-debian-or-ubuntu-linux[Monitoring a UPS with nut on Debian or Ubuntu Linux] '(Avery Fay)' - link:http://linux.developpez.com/cours/upsusb/[Installation et gestion d'un UPS USB en réseau sous linux] '(Olivier Van Hoof, french)' @@ -67,5 +73,5 @@ These are writeups by users of the software. News articles and Press releases -------------------------------- -- link:http://www.crn.com/white-box/199000818?pgno=1[Linux UPS Without Tears] '(A. Lizard)' -- link:http://networking.earthweb.com/netsysm/article.php/10954_3295841_1[Graceful UPS shutdowns on Linux] '(Carla Schroder)' +- link:http://www.crn.com/news/channel-programs/199000818/linux-ups-without-tears.htm[Linux UPS Without Tears] '(A. Lizard)' +- link:http://www.enterprisenetworkingplanet.com/netsysm/article.php/3295841/Graceful-UPS-Shutdowns-on-Linux.htm[Graceful UPS shutdowns on Linux] '(Carla Schroder)' diff --git a/docs/download.txt b/docs/download.txt index 8436094..3991b1c 100644 --- a/docs/download.txt +++ b/docs/download.txt @@ -15,7 +15,7 @@ ifdef::website[] link:docs/user-manual.chunked/ar01s09.html#verifySourceSig[following procedure] endif::website[] ifndef::website[] -- Else, you can read the <>. +<>. endif::website[] to do so. ================================================================================ @@ -110,7 +110,8 @@ Mandriva, link:https://admin.fedoraproject.org/pkgdb/acls/name/nut[Red Hat / Fedora], 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]. +link:http://packages.ubuntu.com/nut[Ubuntu], +link:https://github.com/voidlinux/xbps-packages/blob/master/srcpkgs/network-ups-tools/template[Void Linux]. - BSD systems: link:http://www.FreeBSD.org/cgi/ports.cgi?query=^nut-&stype=name[FreeBSD], @@ -143,7 +144,7 @@ Virtualization packages VMware ~~~~~~ -- NUT client for ESXi 5.0 (offsite, René Garcia) +- NUT client 2.7.2 for ESXi 5.x (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.2.0.tar.gz[VIB package (v1.2.0)] + * link:http://rene.margar.fr/downloads/NutClient-ESXi500-1.3.0.tar.gz[VIB package (v1.3.0)] diff --git a/docs/features.txt b/docs/features.txt index 65690ba..8e25259 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -120,7 +120,7 @@ no mysteries or secrets in your critical monitoring tools. UPS management and control -------------------------- -- Writable variables may be edited on higher end equipment for local customizations +- Writable variables may be edited on higher end equipment for local customization - Status monitoring can generate notifications (email/pager/SMS/...) on alert conditions diff --git a/docs/history.txt b/docs/history.txt index da66cec..e31c933 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -234,7 +234,7 @@ On July 25, 2003, 1.4.0 was released. It contained support for both the old "REQ July 2003: pushing towards 2.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1.5.0 forked from 1.4.0 and was released on July 29, 2003. The first changes were to throw out anything which was providing compatibilty with the older versions of the software. This means that 1.5 and the eventual 2.0 will not talk to anything older than 1.4. +1.5.0 forked from 1.4.0 and was released on July 29, 2003. The first changes were to throw out anything which was providing compatibility with the older versions of the software. This means that 1.5 and the eventual 2.0 will not talk to anything older than 1.4. This tree continues to evolve with new serial routines for the drivers which are intended to replace the aging upscommon code which dates back to the early 0.x releases. The original routines would call alarm and read in a tight loop while fetching characters. The new functions are much cleaner, and wait for data with select. This makes for much cleaner code and easier strace/ktrace logs, since the number of syscalls has been greatly reduced. diff --git a/docs/images/cables/mge-usb-rj45.jpg b/docs/images/cables/mge-usb-rj45.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e9104a5dc4c06d79dc03cb7657fb2d38a6f78314 GIT binary patch literal 13921 zcmb7q1wfQdyXd>@(w$Pmf=h>Vi%W-er_$Xmf^>IxcS?hVq;!XZfP|EQ3ZjUF+y(u< z|2yaZ&pr1J!@N(=JTvn?GqdwvFJ7+$c=FP6(f|kq0>lx2!1XVHP{PIB*v;Gw>S^s} z1(lIgRJmRTBmgiH(oIGr2qGh+AtOT|$QY=oC}>z1SXh`Cn3&i&1bEmu_&AuDcqDlE zgha%|#8|j@NJ)rD35bY^Zj6Ay2ptGAIx;dk5jG|^(f@b4?gQ}AK&YS@FbE$&!Uuuz zLDvHSB>)1z2p14e{FNZcC}0p0DjI@I^bhhM_Vqge3k(8~@W6Ng0Qyz&m)3uM4w0$z z*eUip{8#G#f=R>tZzPx>-CN)Dy#;|lr5nmkLJO|Dd5ApZVi~dA8<@U90OD=`+a~}N zaWSaF9}~zUaR7l{Isj-708ayqV{_90djuVmxN7R)*>A~BjU1eid;l;H_}z5S&x~`< zMF3!#N(7nc{IPah*<>y`$1T3Dkv)M10NSa4xBv(b0g^#&;Wq>@v-NmI4FF(#?YTh_ z3G3sj9%cCJVSp^Cpa{t4hRqcKpOu*7rh8DFW-^i#0HBl>f6Qh6w=`09vX`4s#wHXf zLf%8>95~b=E}Q9zHv}-aj*9OCK=(Z)L6<+>@u%hw8703fS}Nuq3`Vql?6)ZZ;Dkxo zspKZ2<%30Cc=E|;i_h4iGc0t;)KBq1**q3r)Bd36YLpmi>u>#ks~}wQ@&-_hc5HfB zF!6lBTj!$6`JfbDX`Ok0Kvb6Qj~GCO#KZ~!+^F1I06<0M51?o)kh!Ydj6lHpgWskY zqdBpzB==Qw(EO47cdV5`@r>wFy3>s?iaPI`%6)DsS4ovNE2pO}{;l$RRHrB>7;kY) zY_eP)C;)o=_c)jfe$!3DfyD#dJ=6YDqH#$9c;UKtM|!}bR#?Xc0N@18j%64r{B4bC zTz6#-TqgivElp1YMhY`-O3au=6<_V)C_d9<{n7w(uY!{RS>O1Y|8IrcVIBeN-C|^> z^5!vC|31uf2*sO383{*lkvi*cF+_2zJqA|0#la`{z6F*4n>Jo_JuA2e7Z3rc0B64Z ze-0H8{^&1DH&5iJMt`CB=zoI<5_6=>V(VY5KX1Vwl#GzkVQl?3f;$qv6TD}qFp?@j zaU%JbJODf-V^w708O|Q2tLNCVj1g1u5Xvj@NAM;89@`t?8^6{)0i>peTZ{%V*#AoZ zdd>cW)*mq(RHuI_{CDgBe1FBD|1HOH*1cQq%?+61IIGz$ zr*%d52b6ttbx;3WjN>eCx9nVdc4^ewRL$l2zlysKLKCw1W`;xW-FDpr_EpQ++j2(9_UrAwiLADDQUsK*5F@JbiL*n5K3ivg=_Ojs5j)nMqEuOyrU%&0Ud$ z#V$$lF7lvV->ukj3QtL@oL7tNt{tL+cSSa@&Py#1lYf5KtIgpE)@`zm8$8KbIyQ@@ zDKarnpdGo(?6+nCON+)#rcd;Xgdk+Z@&O~c}lVEn)bB& zdh1o6S71LnBIBzyLQINTh-uV0%b*GxAu@wGT_0d9WHdS>7=yA}T;d_tgE~UI5iA5z zJWNh~+2{BcbDIfsQ-nVR%N;+){@iuE^p1Tsa?=;A$862_DEQ9x?v>gNWd_d$3rIS1 z_l8~rghOxt%JZT{$W8lfl9=_B%G3t8S<*I@BJmnf>1u`i$}exeTOIZse?sS2fxjA+ ztN#FSg4s$gK4*xl{VP}0NMfc89Dk!KLgu>s%gAq2;>k11&8)@jtKS4Z~=+f40P@{N`grjkaRSnDAS%=YAP-4b`5Oua_HI4hw~z zt_urQ9Z_C9M}OardUCnzVQX)HR668-_8oiQS^{%lYju_C>q6Mnrw;f`tsM zwkv%gB^5_G+`Y-fvoeo!xg_fgw*$PKoR6iY%G=J2R^uXkb~8QcrObw_Gl-LDi;CAI zvpchX+#(HT>b==pWAUz-&!}lU%fLzLu)PTJiqmcK&a5QmNN5=*XA*6LnU+H2NP_yT z<2!D8DT$F+C0oBu-7<_{i_EW>Y)h_Wo50S#*3i(DDDcsxyI$S+?_9IDz)kJ*VyZI1 zlV{AfvF2lxpWUu-kqJiRw$ajT;@-waJ(dSlUPttBI&nw)x z@@<2%tu@Lkes+zlV7Gnb_%5L&ZLE#S5rcFF-yWZ#@l+yqC>`=p+lRVYr3A02;RcpB zDQPqfydrU>;!aVu%nEaFzP%Lmw8W{$5NY5!Xb+z9rhg7!5+7rK7xv*^**6)F=QVYq zj-%llnLoonUg59iQO4%Y++8|;ulUw+hG=yK5sZ;<_M7;i|F%5j-v)TZ4)r0()$jiz zf%Lb8I${Yy?6n~n*l1|T5HP|X0tF!W1cWrmw4A&|TyQZ}-6Z(8ixN2IV2rxqX6Ab1RcuC0=3ja`~L% zxz)))@ho}HVuM(5dAn7K9@*(!H@ujdlv70C-F$51a4>m$oyg<0XGL?_(OevTss+9a zTNp-i6>(#TH9@L@A~v$B8gbY!w@h+NTt`QKSGE_@Ax@cSY;Q#X+0BPX#^c9}r`Lcs zMxR!aH8U~9@iWo%Tm#fE-68m?_37ycMUG{<=4RITMb@@Yb%`W_4ht=fk~s`PXk^Dds#%re9gA|DB`yQXMk7neQd znXTDRP$ca$bgoJXt0wx;S<8W?kFJLbj$nG|H(cBZ4a<73o8I_@_nv0!WcM6-%`5j` z=?nHJFTM>{Ip+A4l3Zl4(J__USlDPN0a&XinD=18Oqgsn7#YNnr$w4Y*>S-(O|A(? zF5K-A|A?hkq^=NeCPU`Wh!<%E}2_=_*jkkynrkY7C30+XWWAIfa(f0s9 znfw|kJ+U9hWg%kuEYFXlmZ`+eUb9qs4TKm*eHN#|DYIz`!I{o$a$Lh(nMpQ=`jqOKA>pSXFZ!t1O%1xO3I7@sw6=257Zeu|-Agxnr!;`!Gv3{zTD zLrwzwr{!|0(Yc6u`YC8XJe~@ZN$fa4;vL~>%*6+{dt=J2P3DB15xQ=E8FN3whaLPr zF`*9Vx}JcY%=Lv$nb)bflF((Rk!c2=Pdb=WN4NW~7Cf|Cd&SR_-SpBP`NCa4oVf%Q zSrSu=B2!LJYgp4ttszi`SQ25lg>o^rsf@sGeiudsmVGn@(ex_qDN*nAxdwz;?_ZkT zo1Vq}A(?oIUOH9AfAPvhmD8H9dWolJLF1w+moX>(r88?2b6B;8r?7b8t4YQT2kT~D zm!g>BPjI>BvIDC*EcS3!wFnix3h7zq1_7lbN_vuoS#5Ls+P9FGa?Gw1#(r*?b#vfG zLGMlZkau^?$c^y{nXu*DOsYDq+oj zZj*2!L*Y2PDKnD1d}J~2%Ov0ZFgK;u4Y`u-?OSu~SgHpbyAk|(#f@=Hxr0Rtn+2g9 zTh%2)rfImU)20i}0VA46jx6J2&^>GHCiu7f^tW@_Np}rwKTgWU*7APag$-$w zpSvcSRz;U6wDRS>L6)`7{yZ4%5x*p8V{K~2!D*fMu54erGjmIK@1LbOpO#jp$Ea4q z;yY4CUF~PRIPx!3ETV9XiWhAumql?QY#&lBC8Cy@XwYk8LEj}&V|6pwAw(KYZ-UCY zHt~Ya6~C(9ub0xZI=zo-8ylW#FKA-lG)DWWsxCOW42u~R@0$ec^VIA|c5ROxCj7-G zY;5I!3?f|v3X=pFn&D!Q0Jv-^gET`R@B9$$TWQ|8%P2$Ax5{7H+)NE04mZyP6Q;a> za)5_9OZOJCNHyKO|K1Ij;-CT%MI%v>0lcEh$R}Ua$*y*8l8F%@sxSmkwf}9_QX?&bM@}d zXE)P!;fa;Kfz^_Z=&`Ui!T!y##FUpdsz<3oCsU*T^K2%? zy%hP`L<9Tg_*4xxJ%JM52YYLSohqZqi=EC)>?<{5y!JM<{+nX*zV@V&%^|NcUgif# zlWP_jXqzQ;vWb&BSfA4G=swbEs_i>5Th@xbK$AG(RvwiT*?b$Ql>=fDX9M~3sMUo< zCC#zwsNUHwY}TzM(#*8tf%IcoG76|$zh;nAAxSc`cb&|B|3LWoA3hDad1k$wiQW6c z?^;B_r?o>U%TOnH^cyFW(pqh(YWF}D5K;XfRPN5aci5FCIFU?UD6C+*i00wb8e}#^ zagXXZ%i_COqb4%j)wbS#>7-R}=2%937N(amikS#c!n7+{=Fu!MRl0bFWum8NqB%jFWHHhG}>DNN=Kz~$c>miVWL|R zX^jl`UCN>?-W~LN$aa)QTJ^V#UvxnEAv+!{Nj# zJ}F0e6rV4mbuk=1dp`pF5Sm`T6|qk!H7 z5#yYq@Nw;qARvWS26(yQ6VzqVH#t)qA;o=kq2B z@-U18&W2YA_Kz&me-+B?el^$hi%$MU{`|r36_+{psg}Mnu}_a!h`8JC%O1ge>2}?6-u!Is{eiLJHiQKd#lMM}%Yz2cixo?WT^?XQy0d()@ zl76I>pIn>mj|#s7h8-dQ>YbPr93k)_Endrl6&sD|fDyl)9#iX1gvWcAzBR+p*F5RQ zO!$kYiEk@?VhLtXhSTs?_LD&jaH%t1U}8yLQ0G~TSm<+(!Gp9Lg9^J!X3 z?o6oiPD5X)dAr}6Ujx-~Ni5I5J}g|D(x0s6n?){R(gQ-X#VSc!l5vR(&?QP<3l!M& zvoXC^4~;-YOV=8a!{ThvhAW$v*yB+1kQudtQ^&NDNBb~_yh)_cPd>v|bh_=Wok0^7 z_q_TvAGp_J2H2!_>!&`WsL({GHWVQjsJEX#)NOsntkG(q#z9A-8K@-K7M`4pNxw(a z;g?OXZ!Q=Zz@j4`c@|3)A!nJ5(>^CBp3GxJBdes8@$_D|cviu;YSIPn+{OoHHW^d8 zxedGuyVX;=QbZd>-6~TNhva*U&DZ3b;5Sg{$A_cQDZONtdR<33F$K*%> zs%1Dqh4=z6iy%)M@r*m9_Ez!spQQ4BsQ>mcMqTiL`;Bx(_V#yz`t4=10U4LI$4*LtqA@)A%unl|9rYiKkd&tO#d&QrKY)a{OKc}%*AQdy z^u1c+k!@&QuutJ4QdKy|@8gkZRI9LGK2;eDci!evH!BY$iud6TR%mWeZA@b)e>9NE z!ZrHInL6No7^$misludP$3S%&j&EHSpA}~*uW$;Lo^MwXBlh+v$BPGLGJRa+0`yuN zCtUSc{Z8g8IW4bUa)s#$>I=l{nt#pO7(Y)-Q|@SD_(btzaPM|kkhbBXIeHCXBq)0g z5lEenwvj3#2X4^M}gANG?y#31M+@-Z|0=Z@O!Wr4qg$*1S?v+7@T zqKmHquXp6BRGgZ5zM?VxDKN2y^T#fljlEvALq7!4J+_@X@h=e3#K%e^2`5C{^k?eyvMb z34&2wbY^H^+xcJ12L`s|MQ8u5JS^HXt&H(a_Qi5nebEqC5L?NoKX;N8RjwHpiNuDD zQK-f_bT#dfd~>W^z1gguWBJZxR2nn-Hx=q#&>rkgICf0v9GLa#aJWu@fc z;DJtGNcOZOq-ir#O@qHz<+nbngu`5|Ol@XIuK=L^C_l1GL8Ms>N(< zpQu#&7KCRMJdg28qbiK=WVB?l+$S&AB|W~nl)g(y;sjTVClsIUr2aXGzg@OWXwIm9 zf7YMQ>*EG~@?w_SQp>D^U0W*!S=Drjsk$PiL?}U+CN~4Sc_iCgULJK#-3EJY`%NmZ z<;Qd^YHFWK7zJ30^H%R^(_%uU^(czqiaw0u@_$7Jnc}kR^kaaKf=5(4xj^+WIMfJMe zGC7QVBYcgcq{PaWA9Cn=0jX{Gp_No5VPEwn=}Ey(ES`OQ#PYV#=aQp!E0xN+aQht| zGc`XA-1&nc-aE%Eeb3U`U~5@BpHgXj8C_c#bk-{BTW zTmu2!h~J7>@emgSU?d0%_~wf9=7%N3%_j|~m?{)*?2N||kWg@>Qh(e#v+=KMgoiYj z?{t|b=2fS=(rWr`qqeiRSnqz^P;rqab6!Mou$FQc{}jw{ziA%p(0s|*;jUr#4`rT& zrIRt#;Ki<<6@7Gz(ANu0(1!|Y{+d!t;$I|vtrEhM1Nw)ngxg6QqNrvz#WFqIfL z4C;AZq4%vN)U!USVnVQVD-Kms2EemSc}C0bDl5&sfTk0{USO-)2{ z!sW_dPCZy((nhYcuHTVY$-# z!cW)$q1Y{S`X}BT7)c+=wBEgmTXvL9uXo6Pv1s=dFYI7ukL;A5AM)TO1}Ba$k{{oa^P?xZn69G)7n8+^lU8Wo;F(VN{|u3^p}+*`zF2 zp2Av1vi8%I=p*B=Xb{H`Q<)7I-$}JW1h;*%a#g?TiE%?LG(s=jnB9{xBn(ub>d;BN z_dTlpXgq_m2%{Uz6Q>*w5& zNsM%3T2{CHkrtD5j_{T*bt)4xFVNcUbhCCnN_@%5qvW&3f)Z26L@;V0tDbsD6Dnb_ za1;sC_;TKkBj+F#?Digq^koS@Wl)@ZsMyooMYdL=moD353E1+jhv2f3C#}JO1`HS} z^9?x;Qs28oVNK|7kO&UHi23yPV4<>|Qiz0o&k(yz&x-#f^=Um19`O@rtoiHLH~1|` zB$Ce*AK=`5v3p0+RJGYRbQD(B6bn~re1#n?#XuwjFrw**8NK_F87bCtk(4O7Ver!B z;7wd;3vcUWe5y~E2xb~PDZT4J;NlMnA&ufwXN_<^EIMb!@0zq)?r2GnOsJ)0A6}q2 z)}9)66uT`@j2`Ir`hMo>J6VS$s7*{z0Fl@o6deD?lngS;0t&1*n9@dVci0Wusc{Un z=#FX~B?TO%7mwKywSFX%Om8Gbm1jBXTSD)B#W4LQY{CaADw+1VR!QCA3YR6uTb$8A z@c{uE!ic1l0K`0#gYh%=0B}-)r~lk$xzDxVnr*bmf`2iQKpfG5yX{sMEm5u;S=*=0$%ej7Khpcy94X{&Q}4=)5d+ z^V`c2%!#v8-soVf=2}Px8xLBcSqj^D_*h0}6z}>MnQFtgp)lD5l-(n{W(Gd%W;->Q z5XF(rLKTM$4bVbl5TQ}hGUK0k78QSYN*tbz7mm)4ZN|o1NMn=aLJmT zNauK)$ef&;pgtA<8L>sSgB^L!_!)KBlWvGnum33+I+29)0tKM;%)FSh-hBJwahD5s zgvXV?+qd%C0a(R zd9K-jHSt1m>x`K8Ub7J2eSoV56JI5KwkwwjYT4q~#gjQ2WfV?ZuE-h}XUYPnLfAerFxIW4!enwR!c^4EQ^>ohcQ1TRl%}ly%;%PGtWbj1An@NCz z-Q+2CLAA-pPU|00DYa_!<>=}({BXKA-d>7g8Ep*QpFL77>1muR_)GD~@3l|o(4yTX z?)w5u{5OLc%{tK|bJVu1{)R6V_wLgyCbiwHNk@Q(?(3Q_5kJD27O_4w#Uz6NvVk z-`Bchl~vMGK>-&i=R+}L3;o7rjGbCh9MP0y`!Np`h)E8f*Bh4+&Y&iQ2%|pZDVZmi zaApiZaf$@5(B*R>8P-d1-5F+RGU|LyB!QJyXqF)HO6iUoj9yRM->pTikX=k*)RAeC zlhIltLj2>52faLJA45xUaS5RpTabcW$)bZAsvC(pE#E_LnMoJfz4rEW!u{qqY3LOp z_tmm=VVq-le1YGeV8zu*Ce!fH@2xO*qxDuK8?!#?*g@=edJ(^aemx?V!&*W=rCQM) zd;FCwPm}A*?q96i-n!}3p41Qz>fV(zYp1aFYhZm1ap`vZof&X*gNK(W2m23M7Wfau z|0sD&4E$Z9{|8g?=#c+nN(@Q>AdKG-0}%lHw+b{~4i^7gT^2zB2yPADD9S=^N;&Ai zC^sk!>9+Jozkz>e|670n4S_=bCMJqO5l#YVPy%!)qLIJb`J0QV@dgn4qmF>%(GXuq zLGk2ZcnB5H-$o!va!>*|EFK+3@Gp5N0!B~(bXej|jeol9)+RI_4n?>I0JmI(%0F@- zLjEr_5ClsE!H^K@h&IUH8b`3;03HBED8~Z;fgIEyA@i5~p9cTK!VL?ddm{k-TkJPL zaI5uCe-ZR}IfP%pO`C7I|BvPGj{P@b$R7$i6zN~qph##Cgj4@r7#-1v|3>`ZD1ZF@ zEhhW_t)BRQyVSn9_Qv~Puf2auAPzf-(+(0C75V0a&YOV+;nM(!!;Uc&?p#pcdwg@? zIZ`oln)&NK8)5qzuv37?R+9}%8_3?HG@UPaV@7uu&&G~(h&i5;z(6UVNHE9hx%}L- zf(;D(;r(D$67jdc+|mR0h~OFPpF}SgtvpE7=~Wak_J~(kie%{Sy)N*f#qJR_Jn?rY zP%+Y=qP@4G&HztR5W$yRCF082P?)QxZruGs1fwA*i&V?x7VAdCHz!0gM@fKo*?8ZB zY0@QNusg^k!NVm2g_xg(;xa#YtxQz@jq0*dxYoxnqz$ zmPO(LGMsc^!$e#FRL!oUl7A;N1&Yo!_Uq{m_|P?;K9p3MF8U*BLfY`F()McXDWoLheS z_UPC7FY2`?{TByke!hOVU#hpUM4%taN$o9hOU8TNjF<`|5l1KK+#@2=)aEY46Jj%j zk;-mv$kNV-j`gvExZVfuPPvfAw!tXFjR}NS$nCiW7tO_M4YBsTn%64PLZG4TX_0hk4l%a}A)DT>k98w5>geA30a9D~r_d#(l1v$rs2( zn;(EhE5EZ>U`a)6H;>V=*Ru}kLGpr{b8LBPax2w6pUSJ-T)@50-CYI8Lab3AY`Srs zK5F#1JP(tO;i!NR4(?&C)^4b;I}RU)nbzv~W$F z+K+qBf+j3rPET~K&_jI!a218CI1;^&Pno?+Wb%J(XRH=lG=Rmt3)>WPC|vZ+2f2b( z^Q}v6Tad#Y%qB|*!Q`Q1&wX>*G5ngT02$RRZKS(E8S~;U`JBzu``19)Ze1ypgi`1y zXIh7d0;#Pi+*!ZR!li(H(!*%#7p1ar%2YpFzXx?)edV#LavIFZsOmPn ztS$i|=#(5Jhl)#w`Sr;z6?o1X1Ue~ccRvW{2Mb59>q;Uqn<^zes;&&K#K6F)Y**(w zKt239`-yozz~pr}{iYC=#UUL2kX)?1s12XCuquTHTrZ!(49B)q8Z39hlTMKfS8z~t zO-C7pNKsdX;gBe73K~y2kJwP|9Uk@}g_0#S?<`0J;Al{a_3_5sqeVqJ2tiIs?3vxd ztg`jUN*iC{`t?$(a{Cdnk=z*0&VAZy_&dDV7IV%>r(r4ieAsdFQ=DFx?Zs6N+6a_< z>}0e^U(B6#_2CUk6%c0o3rnROA-6AjRwwcn=>7)TwI!jG>teH5l@_1Teioj9*&e-? z-_K`yfqg5~VrLJ*I1BCB)eNXJ zkl^%k7a|1ffQ%$T%g?$WFx6lYfBZHqF%_v%e&4w5@!e{~F?uA+l}>@0C9vedT>s))GNZ*S8Iq>{rhmi(mP&FGIZXMP%g7cWy(UXhNMa>-c9If`(5u z=SEPk10p8kln{Z-=TuiI*h`gY2Aw=8l8y{YZnf$o&QsJzXE_%? z^5lKE){IIYTiw2yl^P}d(_4+S4cV7G08WpK*AG?_NwIrRBgtkBo=1F={XSp_pL^gj z7NUj&SERwIZ7BFGL#fcwZXwCrB-6+#G)iCn=(LA?3M*gTCSgWNg;q*Rn^_#y^v9RA zK-`zIdX(aLTPQD#`H*a)X=v^Ab9m2Fm^E!n=*z9-EMChB$$Wcp);T3ZK3KV>FmS=z#)YpZ9aph||ye_$-U$XhN`{prO6)Nw%~qDsACCUfOA; z6ISLPT`d%w{l=!}E%{r^?IK!RXLjQwMonOJAFqd0=0M%E7nwPx<3BI%s-398TB(Dm zy860|eL>^>hx`?3nfQATep+~HZ$SM}m^b{93aa`sKk7h}%jHqZ<~n5^mMuZ1e6@xu zCXAAbL*yuC8VeEtQdRMA1VD!;h63GfK9PGi;U^zwzSz?At)44eX{OcN*4bPZsR>C$ zLKEcB`xlaM&CNqA*i?k-bOqa+2h6} zJ6tP1Z4tWgA>2P}#tF;Pxr39}!A65|&il@Y>GYzvOFk+*b~W}`?pcr{O0Vz?u2*1U zh5~Y?=2ubH_muvO(&5h8lmJC9G(Vq7`%#?uH{@ufBFgCE$AdL`&7g!nnonRWm8`)` z`=dO@DYA$~^PCQx93gw>roz}9G@?RsR&XeaL|+yz=mwV*8-hvE$QR*m?ZE|Iu29$J+WO|fatEq_dr=E(P``SD% z>lHehlS)M*7fte3S3Y7PM{cdbU}S*;wFHAfM0;4lLGtt?(YCZFxUtdM>+#_qv{Ovy z?Q4;pL$PrtFDQrD+Lq>#12U-dX(dTOt73@F$N!by?0Tcn zdq(P#c?@JmaBH&k$Lzp?(UtEi-=FtoJT0IKT1&O`+9}gH5q;h>TTJH1NpUv!J@pcN z4Gez$EQnrb9QooGwvDUA8T6spDbbjq?Ct(%=r+`xvVO|qC>_I_&`VHl3s z>rul2;;k?H7uZ>RduusQn5wpUMKj)39l`^^#aG&KkRYRcflMiSau(mr4E5xHHhiNZ zWN&C*&hcX`SS?vV~dFGJ#uH^j*nR)g*+11W)TQ-Li8`Ilo3Eq(Uv{ z)XTMkb0wZKf4datiV?#+rHUOH-2yy_4S_gDTUZaVhDF0`#Yh7i0)ui*GD z)SuqN{oKO+@ZlG!Q9gL#F~88)@oS)<`+DjB0Dg_z3jhEB literal 0 HcmV?d00001 diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index d45d1f7..e793657 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -516,6 +516,15 @@ endif HTML_MACOSX_MANS = macosx-ups.html +SRC_LINUX_I2C_PAGES = asem.txt +MAN_LINUX_I2C_PAGES = asem.8 + +if WITH_LINUX_I2C + man8_MANS += $(LINUX_I2C_PAGES) +endif + +HTML_LINUX_I2C_MANS = asem.html + # SOME_DRIVERS endif @@ -533,7 +542,8 @@ MAN_MANS = \ $(MAN_NETXML_PAGES) \ $(MAN_POWERMAN_PAGES) \ $(MAN_IPMIPSU_PAGES) \ - $(MAN_MACOSX_PAGES) + $(MAN_MACOSX_PAGES) \ + $(MAN_LINUX_I2C_PAGES) # distribute everything, even those not installed by default # Note that 'dist' target requires AsciiDoc! @@ -550,6 +560,7 @@ EXTRA_DIST = \ $(SRC_POWERMAN_PAGES) \ $(SRC_IPMIPSU_PAGES) \ $(SRC_MACOSX_PAGES) \ + $(SRC_LINUX_I2C_PAGES) \ $(MAN_MANS) \ asciidoc.conf @@ -565,7 +576,8 @@ HTML_MANS = \ $(HTML_NETXML_MANS) \ $(HTML_POWERMAN_MANS) \ $(HTML_IPMIPSU_MANS) \ - $(HTML_MACOSX_MANS) + $(HTML_MACOSX_MANS) \ + $(HTML_LINUX_I2C_MANS) all: @@ -581,10 +593,12 @@ if HAVE_ASCIIDOC $(ASCIIDOC) --backend=xhtml11 \ --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ --attribute localtime=`TZ=UTC date +%H:%M:%S` \ + --attribute nutversion="@PACKAGE_VERSION@" \ -o $@ $< ### 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 \ + --xsltproc-opts "--nonet" \ --attribute mansource="Network UPS Tools" \ --attribute manversion="@PACKAGE_VERSION@" \ --attribute manmanual="NUT Manual" \ @@ -605,18 +619,48 @@ A2X_MANPAGE_OPTS = --doctype manpage --format manpage \ else !HAVE_ASCIIDOC .txt.html: - @echo "Not (re)building $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi .txt.1: - @echo "Using existing $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi .txt.3: - @echo "Using existing $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi .txt.5: - @echo "Using existing $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi .txt.8: - @echo "Using existing $@ manual page, since 'asciidoc' was not found." + @if [ -r "$@" ]; then \ + echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ + else \ + echo "Could not find prebuilt $@ manual page." ; \ + echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ + exit 1; \ + fi endif !HAVE_ASCIIDOC diff --git a/docs/man/Makefile.in b/docs/man/Makefile.in index 7936892..e2fb1a8 100644 --- a/docs/man/Makefile.in +++ b/docs/man/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +28,51 @@ # 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; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -79,8 +106,9 @@ target_triplet = @target@ @SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_8 = $(MAN_POWERMAN_PAGES) @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_9 = $(MAN_IPMIPSU_PAGES) @SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__append_10 = $(MAN_MACOSX_PAGES) +@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@am__append_11 = $(LINUX_I2C_PAGES) subdir = docs/man -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am 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 \ @@ -109,6 +137,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -151,10 +191,12 @@ man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -261,12 +303,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -311,6 +356,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -384,7 +430,7 @@ MAN_CLIENT_PAGES = \ man8_MANS = $(MAN_CLIENT_PAGES) $(MAN_TOOL_PAGES) $(am__append_2) \ $(am__append_3) $(am__append_4) $(am__append_5) \ $(am__append_6) $(am__append_7) $(am__append_8) \ - $(am__append_9) $(am__append_10) + $(am__append_9) $(am__append_10) $(am__append_11) HTML_CLIENT_MANS = \ nutupsdrv.html \ upsc.html \ @@ -782,6 +828,9 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@SRC_MACOSX_PAGES = macosx-ups.txt @SOME_DRIVERS_FALSE@MAN_MACOSX_PAGES = macosx-ups.8 @SOME_DRIVERS_FALSE@HTML_MACOSX_MANS = macosx-ups.html +@SOME_DRIVERS_FALSE@SRC_LINUX_I2C_PAGES = asem.txt +@SOME_DRIVERS_FALSE@MAN_LINUX_I2C_PAGES = asem.8 +@SOME_DRIVERS_FALSE@HTML_LINUX_I2C_MANS = asem.html # SOME_DRIVERS MAN_MANS = \ @@ -798,7 +847,8 @@ MAN_MANS = \ $(MAN_NETXML_PAGES) \ $(MAN_POWERMAN_PAGES) \ $(MAN_IPMIPSU_PAGES) \ - $(MAN_MACOSX_PAGES) + $(MAN_MACOSX_PAGES) \ + $(MAN_LINUX_I2C_PAGES) # distribute everything, even those not installed by default @@ -816,6 +866,7 @@ EXTRA_DIST = \ $(SRC_POWERMAN_PAGES) \ $(SRC_IPMIPSU_PAGES) \ $(SRC_MACOSX_PAGES) \ + $(SRC_LINUX_I2C_PAGES) \ $(MAN_MANS) \ asciidoc.conf @@ -831,13 +882,15 @@ HTML_MANS = \ $(HTML_NETXML_MANS) \ $(HTML_POWERMAN_MANS) \ $(HTML_IPMIPSU_MANS) \ - $(HTML_MACOSX_MANS) + $(HTML_MACOSX_MANS) \ + $(HTML_LINUX_I2C_MANS) CLEANFILES = *.xml *.html SUFFIXES = .txt .html .1 .3 .5 .8 ### 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@ --xsltproc-opts "--nonet" \ @HAVE_ASCIIDOC_TRUE@ --attribute mansource="Network UPS Tools" \ @HAVE_ASCIIDOC_TRUE@ --attribute manversion="@PACKAGE_VERSION@" \ @HAVE_ASCIIDOC_TRUE@ --attribute manmanual="NUT Manual" \ @@ -1047,27 +1100,14 @@ uninstall-man8: } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1207,18 +1247,18 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir 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-man1 \ - install-man3 install-man5 install-man8 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-man uninstall-man1 uninstall-man3 uninstall-man5 \ - uninstall-man8 + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir 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-man1 install-man3 install-man5 install-man8 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am uninstall-man uninstall-man1 \ + uninstall-man3 uninstall-man5 uninstall-man8 all: @@ -1229,6 +1269,7 @@ html-man: $(HTML_MANS) index.html @HAVE_ASCIIDOC_TRUE@ $(ASCIIDOC) --backend=xhtml11 \ @HAVE_ASCIIDOC_TRUE@ --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ @HAVE_ASCIIDOC_TRUE@ --attribute localtime=`TZ=UTC date +%H:%M:%S` \ +@HAVE_ASCIIDOC_TRUE@ --attribute nutversion="@PACKAGE_VERSION@" \ @HAVE_ASCIIDOC_TRUE@ -o $@ $< @HAVE_ASCIIDOC_TRUE@.txt.1: @@ -1244,19 +1285,49 @@ html-man: $(HTML_MANS) index.html @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." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.1: -@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.3: -@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.5: -@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.8: -@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found." +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ +@HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ +@HAVE_ASCIIDOC_FALSE@ else \ +@HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ +@HAVE_ASCIIDOC_FALSE@ echo "If you are building from Git, do you have all of the asciidoc/a2x tools installed?"; \ +@HAVE_ASCIIDOC_FALSE@ exit 1; \ +@HAVE_ASCIIDOC_FALSE@ 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. diff --git a/docs/man/al175.8 b/docs/man/al175.8 index c86d122..297d4f7 100644 --- a/docs/man/al175.8 +++ b/docs/man/al175.8 @@ -1,13 +1,13 @@ '\" t .\" Title: al175 .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "AL175" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "AL175" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -77,7 +77,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBups\&.test\&.result\fR .RE .sp @@ -89,7 +88,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBoutput\&.voltage\&.nominal\fR .RE .sp @@ -101,7 +99,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBoutput\&.current\fR .RE .sp @@ -113,7 +110,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBbattery\&.voltage\&.nominal\fR .RE .sp @@ -125,7 +121,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBbattery\&.current\fR .RE .sp @@ -137,7 +132,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBbattery\&.temperature\fR .RE .sp @@ -149,7 +143,6 @@ Besides status, this driver reads UPS state into following variables: .sp -1 .IP \(bu 2.3 .\} - \fBinput\&.transfer\&.boost\&.low\fR .RE .SH "KNOWN ISSUES AND BUGS" diff --git a/docs/man/apcsmart-old.8 b/docs/man/apcsmart-old.8 index 9aa7c06..dc8c5d0 100644 --- a/docs/man/apcsmart-old.8 +++ b/docs/man/apcsmart-old.8 @@ -1,13 +1,13 @@ '\" t .\" Title: apcsmart-old .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "APCSMART\-OLD" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "APCSMART\-OLD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/apcsmart.8 b/docs/man/apcsmart.8 index 6b9b69f..7dc6cfd 100644 --- a/docs/man/apcsmart.8 +++ b/docs/man/apcsmart.8 @@ -1,13 +1,13 @@ '\" t .\" Title: apcsmart .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "APCSMART" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "APCSMART" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,7 +33,7 @@ apcsmart \- Driver for American Power Conversion Smart Protocol UPS equipment .sp \fBapcsmart\fR \-h .sp -\fBapcsmart\fR \-a \*(AqUPS_NAME\*(Aq [\-x option=value \&...] +\fBapcsmart\fR \-a \fIUPS_NAME\fR [\-x option=value \&...] .if n \{\ .sp .\} @@ -52,15 +52,15 @@ This man page only documents the hardware\-specific features of the apcsmart dri .RE .SH "SUPPORTED HARDWARE" .sp -The apcsmart driver should recognize (or at the very least work with) majority of Smart\-UPS models \- which includes Smart\-UPS, Matrix\-UPS and Back\-UPS lineups, among few other ones\&. +The apcsmart driver should recognize (or at the very least, work with) the majority of Smart\-UPS models \- which includes Smart\-UPS, Matrix\-UPS and Back\-UPS lineups, among few other ones\&. .sp -Currently we can roughly divide APC hardware into 3 groups (note that the division isn\*(Aqt strict by any means, and the borders between those are pretty fuzzy): +Currently, we can roughly divide APC hardware into four groups (note that the division isn\(cqt strict by any means, and the borders between those are pretty fuzzy): .PP [very] "old" models .RS 4 These models usually have old APC logo, white color and \fIno\fR -programmable eeprom; You won\*(Aqt find them listed anywhere on APC\(cqs site either\&. The support for those will be usually based on driver\*(Aqs compatibility tables, or if the model (firmware) is not listed in those \- the driver will try to follow the very basic subset of features, while still trying to remain useful\&. Despite "smart" tagname, they often tend to behave in pretty dumb way (see the section below about shutdown behaviour)\&. +programmable EEPROM; you won\(cqt find them listed anywhere on APC\(cqs site either\&. The support for those will be usually based on driver\(cqs compatibility tables, or if the model (firmware) is not listed in those \- the driver will try to follow the very basic subset of features, while still trying to remain useful\&. Despite "smart" tagname, they often tend to behave in pretty dumb way (see the section below about shutdown behaviour)\&. .PP \fBExample models:\fR .sp @@ -89,16 +89,52 @@ Smart\-UPS 900I .PP "new" models .RS 4 -These models usually come from late 1990s / pre\-2009 times\&. They are often referred as "3rd\&. gen"\&. For the most part, they have programmable eeprom, report supported commands and capabilites, and should work just fine with the apcsmart driver\&. +These models usually come from late 1990s / pre\-2009 times\&. They are often referred as "3rd\&. gen"\&. For the most part, they have programmable EEPROM, report supported commands and capabilites, and should work just fine with the apcsmart driver\&. .RE .PP "microlink" models .RS 4 WARNING: these are not \fInatively\fR -supported by apcsmart (or apcupsd for that matter, if you\(cqre wondering)\&. Around 2007 APC (now APC Schneider) decided to go back to its proprietry roots and all the new models (SMT, SMX, SURTD) use completely different protocol and cables\&. If you purchased a new APC UPS, that uses cable with rj45 on the one end, and db\-9 on the other \- then you have such model\&. Your only option to support it through +supported by +\fBapcsmart\fR +(or +\fBapcupsd\fR, for that matter, if you\(cqre wondering)\&. Around 2007, APC (now APC Schneider) decided to go back to its proprietry roots, and all the new models (SMT, SMX, SURTD) use completely different protocol and cables\&. If you purchased a new APC UPS \- that uses cable with RJ45 on the one end, and DB\-9 on the other \- then you have such model\&. Your only option to support it through \fBNUT\fR -is to purchase "legacy communications card" \- part #AP9620 (google \*(AqAP9620\*(Aq for more details)\&. Or if that\*(Aqs not an option, rely on official software\&. +is to purchase a "legacy communications card" \- part #AP9620 (google \*(AqAP9620\*(Aq for more details)\&. Or if that\(cqs not an option, rely on official software\&. +.RE +.PP +Microsol models +.RS 4 +Several Microsol serial models sold in Brazil have been rebranded as APC Back\-UPS, and the model numbers tend to start with "BZ"\&. If you have one of these "Nobreaks", they will not work with the +\fBapcsmart\fR +driver \- please see the +\fBsolis\fR(8) +driver instead\&. +.PP +\fBExample models:\fR +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Back\-UPS BZ1200\-BR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Back\-UPS BZ2200BI\-BR +.RE .RE .sp Another thing to remember is that Smart protocol is not USB protocol\&. If you have UPS with both USB and serial ports, then depending on how you connect it, you will need either apcsmart or usbhid\-ups driver\&. @@ -135,7 +171,7 @@ Alternatively, you can also provide it on the command line using: \-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): +By default the driver works in canonical mode, but it proved to be a problem in Windows systems\&. Furthermore there\(cqs a possibility of some obscure serial cards or serial\-USB converters 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 @@ -165,7 +201,7 @@ APC hardware supports a lot of shutdown methods, that themselves can differ in b \fBS\fR (soft hibernate) .RS 4 This is most basic command present in probably all APC models\&. It will hibernate the UPS, and subsequently wake it up when the mains supply returns\&. -\fBThe command doesn\*(Aqt work if UPS is running on mains\&.\fR +\fBThe command doesn\(cqt work if the UPS is running on mains\&.\fR .PP "old" models .RS 4 @@ -174,7 +210,7 @@ The behaviour here is unfortunately pretty primitive \- when the power returns, .PP "new" models .RS 4 -The behaviour here is as expected \- the power is cut off after the eeprom defined grace period\&. The UPS will wake up when the power returns, after the eeprom defined delay AND if the eeprom defined min\&. battery charge level is met\&. The delay is counted from the power\*(Aqs return\&. +The behaviour here is as expected \- the power is cut off after the EEPROM defined grace period\&. The UPS will wake up when the power returns, after the EEPROM defined delay AND if the EEPROM defined min\&. battery charge level is met\&. The delay is counted from the power\*(Aqs return\&. .RE .RE .PP @@ -206,8 +242,8 @@ If nnn = 000, then UPS will do precisely nothing\&. On those models you\*(Aqre b .PP "new" models .RS 4 -All the usual variables defined in eeprom are respected (see -\fBS\fR)\&. Additionally, if nnn > 0, the nnn*6 minutes are added to eeprom defined delay\&. UPS will not power up if it\*(Aqs running on batteries, contrary to what "old" models used to do \- the combined delay is counted from the moment of power return\&. +All the usual variables defined in EEPROM are respected (see +\fBS\fR)\&. Additionally, if nnn > 0, the nnn*6 minutes are added to EEPROM defined delay\&. UPS will not power up if it\*(Aqs running on batteries, contrary to what "old" models used to do \- the combined delay is counted from the moment of power return\&. .RE .sp Supposedly there exist models that take 2 digits instead of 3\&. Just in case, NUT also supports such variation\&. You have to provide exactly 2 digits to trigger it (\fBawd\fR @@ -216,7 +252,7 @@ option, or argument to one of the supported instant commands)\&. .PP \fBK\fR (delayed poweroff) .RS 4 -This is permanent poweroff \- the UPS will not wake up automatically\&. On newer units, it will respect applicable eeprom variables\&. +This is permanent poweroff \- the UPS will not wake up automatically\&. On newer units, it will respect applicable EEPROM variables\&. .RE .PP \fBZ\fR (instant poweroff) @@ -366,7 +402,7 @@ Hard hibernate\*(Aqs additional wakeup delay can be provided by \fBawd\fR\&. .RE .SH "IGNORING LB STATE" .sp -APC units \- even if they report LB mode \- will not go into shutdown automatically\&. This gives us even more control with reference to "when to actually shutdown psu"\&. Since version 2\&.6\&.2, NUT supports \fBignorelb\fR option in driver\*(Aqs section of \fBups.conf\fR(5)\&. When such option is in effect, the core driver will ignore LB state as reported by specific driver and start shutdown basing the decision \fIonly\fR on two conditions: +APC units \- even if they report LB mode \- will not go into shutdown automatically\&. This gives us even more control with reference to "when to actually shutdown PSU"\&. Since version 2\&.6\&.2, NUT supports \fBignorelb\fR option in driver\(cqs section of \fBups.conf\fR(5)\&. When such option is in effect, the core driver will ignore LB state as reported by specific driver and start shutdown basing the decision \fIonly\fR on two conditions: .sp battery\&.charge < battery\&.charge\&.low .sp @@ -376,7 +412,7 @@ battery\&.runtime < battery\&.runtime\&.low .sp Of course \- if any of the variables are not available, the appropriate condition is not checked\&. If you want to explicitly disable one of the conditions, simply override the right hand variable causing the condition to always evaluate to false (you can even provide negative numbers)\&. .sp -APC UPSes don\*(Aqt have battery\&.charge\&.low \- you will have to define it if you want to use such condition (prefix the variable with override\&. or default\&.)\&. +APC UPSes don\(cqt have battery\&.charge\&.low \- you will have to define it if you want to use such condition (prefix the variable with override\&. or default\&.)\&. .sp "New" units have battery\&.runtime\&.low, but depending on battery quality, firmware version, calibration and UPS load \- this variable can be underestimated quite a bit \- especially right after going into OB state\&. This in turn can cause LB to be asserted, which under normal conditions will cause \fBNUT\fR to initiate the shutdown\&. You might want to disable this condition entirely, when relying on \fBignorelb\fR option (this was actually the main motivation behind introduction of such feature)\&. .sp @@ -535,7 +571,7 @@ 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\&. +Previous driver is still available as \fBapcsmart\-old\fR, should there be any need to use earlier version (bugs, incompatiblities with new functionality, etc\&.)\&. In due time, \fBapcsmart\-old\fR 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\&. @@ -546,7 +582,7 @@ APC UPS models with both USB and serial ports require a power cycle when switchi Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&. In 2\&.6\&.2 it was renamed to apcsmart\-old, being superseded by updated version with new features, which is maintained by Michal Soltys .SH "SEE ALSO" .sp -\fBnutupsdrv\fR(8), \fBups.conf\fR(5) +\fBnutupsdrv\fR(8), \fBups.conf\fR(5), \fBusbhid-ups\fR(8), \fBsolis\fR(8) .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/apcsmart.txt b/docs/man/apcsmart.txt index 2ec0a34..6a474c7 100644 --- a/docs/man/apcsmart.txt +++ b/docs/man/apcsmart.txt @@ -11,7 +11,7 @@ SYNOPSIS *apcsmart* -h -*apcsmart* -a \'UPS_NAME' [-x option=value ...] +*apcsmart* -a 'UPS_NAME' [-x option=value ...] NOTE: This man page only documents the hardware-specific features of the apcsmart driver. For information about the core driver, see @@ -21,17 +21,17 @@ linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ -The apcsmart driver should recognize (or at the very least work with) majority -of Smart-UPS models - which includes Smart-UPS, Matrix-UPS and Back-UPS lineups, -among few other ones. +The apcsmart driver should recognize (or at the very least, work with) the +majority of Smart-UPS models - which includes Smart-UPS, Matrix-UPS and Back-UPS +lineups, among few other ones. -Currently we can roughly divide APC hardware into 3 groups (note that the -division isn\'t strict by any means, and the borders between those are pretty fuzzy): +Currently, we can roughly divide APC hardware into four groups (note that the +division isn't strict by any means, and the borders between those are pretty fuzzy): [very] "old" models:: These models usually have old APC logo, white color and _no_ programmable - eeprom; You won\'t find them listed anywhere on APC's site either. The support - for those will be usually based on driver\'s compatibility tables, or if the + EEPROM; you won't find them listed anywhere on APC's site either. The support + for those will be usually based on driver's compatibility tables, or if the model (firmware) is not listed in those - the driver will try to follow the very basic subset of features, while still trying to remain useful. Despite "smart" tagname, they often tend to behave in pretty dumb way (see the @@ -45,19 +45,32 @@ division isn\'t strict by any means, and the borders between those are pretty fu "new" models:: These models usually come from late 1990s / pre-2009 times. They are often - referred as "3rd. gen". For the most part, they have programmable eeprom, + referred as "3rd. gen". For the most part, they have programmable EEPROM, report supported commands and capabilites, and should work just fine with the apcsmart driver. "microlink" models:: - WARNING: these are not _natively_ supported by apcsmart (or apcupsd for that - matter, if you\'re wondering). Around 2007 APC (now APC Schneider) decided to - go back to its proprietry roots and all the new models (SMT, SMX, SURTD) use - completely different protocol and cables. If you purchased a new APC UPS, - that uses cable with rj45 on the one end, and db-9 on the other - then you - have such model. Your only option to support it through *NUT* is to - purchase "legacy communications card" - part #AP9620 (google \'AP9620' for - more details). Or if that\'s not an option, rely on official software. + WARNING: these are not _natively_ supported by *apcsmart* (or *apcupsd*, + for that matter, if you're wondering). Around 2007, APC (now APC Schneider) + decided to go back to its proprietry roots, and all the new models (SMT, + SMX, SURTD) use completely different protocol and cables. If you purchased + a new APC UPS - that uses cable with RJ45 on the one end, and DB-9 on the + other - then you have such model. Your only option to support it through + *NUT* is to purchase a "legacy communications card" - part #AP9620 (google + \'AP9620' for more details). Or if that's not an option, rely on official + software. + +Microsol models:: + Several Microsol serial models sold in Brazil have been rebranded as APC + Back-UPS, and the model numbers tend to start with "BZ". If you have one + of these "Nobreaks", they will not work with the *apcsmart* driver - please + see the linkman:solis[8] driver instead. ++ +-- +.Example models: + * Back-UPS BZ1200-BR + * Back-UPS BZ2200BI-BR +-- Another thing to remember is that Smart protocol is not USB protocol. If you have UPS with both USB and serial ports, then depending on how you connect it, @@ -92,9 +105,9 @@ Alternatively, you can also provide it on the command line using: 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 +By default the driver works in canonical mode, but it proved to be a problem in +Windows systems. Furthermore there's a possibility of some obscure serial cards +or serial-USB converters that could cause problems as well. You can use \'ttymode=' option to force non-canonical discipline in linkman:ups.conf[5]: *ttymode*=raw @@ -114,7 +127,7 @@ behaviour quite a bit, depending on the model. *S* (soft hibernate):: This is most basic command present in probably all APC models. It will hibernate the UPS, and subsequently wake it up when the mains supply - returns. *The command doesn\'t work if UPS is running on mains.* + returns. *The command doesn't work if the UPS is running on mains.* "old" models::: The behaviour here is unfortunately pretty primitive - when the power @@ -123,8 +136,8 @@ behaviour quite a bit, depending on the model. "new" models::: The behaviour here is as expected - the power is cut off after the - eeprom defined grace period. The UPS will wake up when the power - returns, after the eeprom defined delay AND if the eeprom defined min. + EEPROM defined grace period. The UPS will wake up when the power + returns, after the EEPROM defined delay AND if the EEPROM defined min. battery charge level is met. The delay is counted from the power\'s return. @@ -154,8 +167,8 @@ command if your UPS supports it (and is not too old, see below). connection is kept alive). "new" models::: - All the usual variables defined in eeprom are respected (see *S*). - Additionally, if nnn > 0, the $$nnn*6$$ minutes are added to eeprom + All the usual variables defined in EEPROM are respected (see *S*). + Additionally, if nnn > 0, the $$nnn*6$$ minutes are added to EEPROM defined delay. UPS will not power up if it\'s running on batteries, contrary to what "old" models used to do - the combined delay is counted from the moment of power return. @@ -167,7 +180,7 @@ trigger it (*awd* option, or argument to one of the supported instant commands). *K* (delayed poweroff):: This is permanent poweroff - the UPS will not wake up automatically. On - newer units, it will respect applicable eeprom variables. + newer units, it will respect applicable EEPROM variables. *Z* (instant poweroff):: This is also permanent poweroff - the UPS will not wake up automatically. @@ -248,8 +261,8 @@ IGNORING LB STATE APC units - even if they report LB mode - will not go into shutdown automatically. This gives us even more control with reference to "when to -actually shutdown psu". Since version 2.6.2, NUT supports *ignorelb* option in -driver\'s section of linkman:ups.conf[5]. When such option is in effect, +actually shutdown PSU". Since version 2.6.2, NUT supports *ignorelb* option in +driver's section of linkman:ups.conf[5]. When such option is in effect, the core driver will ignore LB state as reported by specific driver and start shutdown basing the decision _only_ on two conditions: @@ -264,8 +277,8 @@ is not checked. If you want to explicitly disable one of the conditions, simply override the right hand variable causing the condition to always evaluate to false (you can even provide negative numbers). -APC UPSes don\'t have battery.charge.low - you will have to define it if you want -to use such condition (prefix the variable with override. or default.). +APC UPSes don't have battery.charge.low - you will have to define it if you want +to use such condition (prefix the variable with `override.` or `default.`). "New" units have battery.runtime.low, but depending on battery quality, firmware version, calibration and UPS load - this variable can be underestimated quite a bit - @@ -335,9 +348,9 @@ Other supported commands: PREVIOUS DRIVER VERSION ----------------------- -Previous driver is still available as apcsmart-old - should there be any need to +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 +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 @@ -362,7 +375,8 @@ new features, which is maintained by Michal Soltys SEE ALSO -------- -linkman:nutupsdrv[8], linkman:ups.conf[5] +linkman:nutupsdrv[8], linkman:ups.conf[5], linkman:usbhid-ups[8], +linkman:solis[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ diff --git a/docs/man/apcupsd-ups.8 b/docs/man/apcupsd-ups.8 index 8da8d88..a6bb2f5 100644 --- a/docs/man/apcupsd-ups.8 +++ b/docs/man/apcupsd-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: apcupsd-ups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "APCUPSD\-UPS" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "APCUPSD\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/asciidoc.conf b/docs/man/asciidoc.conf index d294d23..9b4533d 100644 --- a/docs/man/asciidoc.conf +++ b/docs/man/asciidoc.conf @@ -23,6 +23,10 @@ ifdef::backend-xhtml11[] [linkman-inlinemacro] {target}{0?({0})} +# Override HTML footer, to include NUT version +[footer-text] +Last updated {docdate} {doctime} -- Network UPS Tools {nutversion} + # Format-detection to prevent smartphones from being too smart [+docinfo] diff --git a/docs/man/asem.8 b/docs/man/asem.8 new file mode 100644 index 0000000..7f1328f --- /dev/null +++ b/docs/man/asem.8 @@ -0,0 +1,87 @@ +'\" t +.\" Title: asem +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 +.\" Manual: NUT Manual +.\" Source: Network UPS Tools 2.7.3 +.\" Language: English +.\" +.TH "ASEM" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "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" +asem \- driver for UPS in ASEM PB1300 +.SH "NOTE" +.sp +This man page only documents the hardware\-specific features of the \fBasem\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.SH "SUPPORTED HARDWARE" +.sp +The \fBasem\fR driver supports the UPS in ASEM PB1300 embedded PCs\&. Likely other I2C devices from the same manufacturer will work too, since this is a "custom" charger\&. +.sp +Seems that there are two versions of the charger\&. Older one is based on Max1667, newer one is a custom solution\&. Both are on I2C address 0x09\&. To be compatible with both versions, the driver just reads bit 15 of address 0x13 which yields online/on battery status\&. Battery monitor is a BQ2060 at address 0x0B\&. +.SH "EXTRA ARGUMENTS" +.sp +The required parameter for this driver is the I2C bus name: +.PP +\fBport\fR=\fIdev\-node\fR +.RS 4 +On the Asem PB1300, this should be +/dev/i2c\-7 +for the i801 SMBUS adapter\&. +.RE +.sp +This driver also supports the following optional settings: +.PP +\fBlb\fR=\fInum\fR +.RS 4 +Set the low battery threshold to +\fInum\fR +volts\&. +.RE +.PP +\fBhb\fR=\fInum\fR +.RS 4 +Set the high battery threshold to +\fInum\fR +volts\&. +.RE +.SH "INSTALLATION" +.sp +This driver is specific to the Linux I2C API, and requires the lm_sensors libi2c\-dev or its equivalent to compile\&. +.sp +Beware that the SystemIO memory used by the I2C controller is reserved by ACPI\&. If only a native I2C driver (e\&.g\&. i2c_i801, as of 3\&.5\&.X Linux kernels) is available, then you\(cqll need to relax the ACPI resources check\&. For example, you can boot with the acpi_enforce_resources=lax option\&. +.SH "KNOWN ISSUES AND BUGS" +.sp +The driver shutdown function is not implemented, so other arrangements must be made to turn off the UPS\&. +.SH "AUTHORS" +.sp +Giuseppe Corbelli +.SH "SEE ALSO" +.SS "The core driver:" +.sp +\fBnutupsdrv\fR(8) +.SS "Internet resources:" +.sp +PB1300 specifications: http://www\&.asem\&.it/en/products/industrial\-automation/box\-pcs/performance/pb1300/ +.sp +BQ2060 datasheet: http://www\&.ti\&.com/lit/ds/symlink/bq2060\&.pdf +.sp +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/asem.txt b/docs/man/asem.txt new file mode 100644 index 0000000..25f67ab --- /dev/null +++ b/docs/man/asem.txt @@ -0,0 +1,83 @@ +ASEM(8) +======= + +NAME +---- +asem - driver for UPS in ASEM PB1300 + +NOTE +---- +This man page only documents the hardware-specific features of the +*asem* driver. For information about the core driver, see +linkman:nutupsdrv[8]. + +SUPPORTED HARDWARE +------------------ +The *asem* driver supports the UPS in ASEM PB1300 embedded PCs. Likely other +I2C devices from the same manufacturer will work too, since this is a "custom" +charger. + +Seems that there are two versions of the charger. Older one is based on +Max1667, newer one is a custom solution. Both are on I2C address 0x09. +To be compatible with both versions, the driver just reads bit 15 of address +0x13 which yields online/on battery status. +Battery monitor is a BQ2060 at address 0x0B. + +EXTRA ARGUMENTS +--------------- + +The required parameter for this driver is the I2C bus name: + +*port*='dev-node':: +On the Asem PB1300, this should be `/dev/i2c-7` for the i801 SMBUS adapter. + +This driver also supports the following optional settings: + +*lb*='num':: +Set the low battery threshold to 'num' volts. + +*hb*='num':: +Set the high battery threshold to 'num' volts. + +INSTALLATION +------------ +This driver is specific to the Linux I2C API, and requires the lm_sensors +libi2c-dev or its equivalent to compile. + +Beware that the SystemIO memory used by the I2C controller is reserved by ACPI. +If only a native I2C driver (e.g. i2c_i801, as of 3.5.X Linux kernels) is +available, then you'll need to relax the ACPI resources check. For example, you +can boot with the `acpi_enforce_resources=lax` option. + +////////////////////////////////////////// +Optional: use DIAGNOSTICS to describe troubleshooting techniques that are +longer than what can be conveniently described in the driver error messages. + +DIAGNOSTICS +----------- + +////////////////////////////////////////// + +KNOWN ISSUES AND BUGS +--------------------- +The driver shutdown function is not implemented, so other arrangements must be +made to turn off the UPS. + +AUTHORS +------- +Giuseppe Corbelli + +SEE ALSO +-------- + +The core driver: +~~~~~~~~~~~~~~~~ +linkman:nutupsdrv[8] + +Internet resources: +~~~~~~~~~~~~~~~~~~~ +PB1300 specifications: http://www.asem.it/en/products/industrial-automation/box-pcs/performance/pb1300/ + +BQ2060 datasheet: http://www.ti.com/lit/ds/symlink/bq2060.pdf + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bcmxcp.8 b/docs/man/bcmxcp.8 index bcd38c2..0d6fa26 100644 --- a/docs/man/bcmxcp.8 +++ b/docs/man/bcmxcp.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bcmxcp .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BCMXCP" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BCMXCP" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -58,9 +58,7 @@ Communication speed for the UPS\&. If this is set to 9600, it tries to connect t .sp -1 .IP \(bu 2.3 .\} - -\fBshutdown_delay =\fR -\fI120\fR +\fBshutdown_delay =\fR\fI120\fR .RE .sp .RS 4 @@ -71,9 +69,7 @@ Communication speed for the UPS\&. If this is set to 9600, it tries to connect t .sp -1 .IP \(bu 2.3 .\} - -\fBbaud_rate =\fR -\fInone\fR +\fBbaud_rate =\fR\fInone\fR .RE .SH "INSTANT COMMANDS" .sp diff --git a/docs/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.8 index c46b557..5e40a3e 100644 --- a/docs/man/bcmxcp_usb.8 +++ b/docs/man/bcmxcp_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bcmxcp_usb .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BCMXCP_USB" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BCMXCP_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkin.8 b/docs/man/belkin.8 index 5c3716d..9788c80 100644 --- a/docs/man/belkin.8 +++ b/docs/man/belkin.8 @@ -1,13 +1,13 @@ '\" t .\" Title: belkin .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BELKIN" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BELKIN" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/belkinunv.8 b/docs/man/belkinunv.8 index 83cb1c8..528147a 100644 --- a/docs/man/belkinunv.8 +++ b/docs/man/belkinunv.8 @@ -1,13 +1,13 @@ '\" t .\" Title: belkinunv .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BELKINUNV" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BELKINUNV" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestfcom.8 b/docs/man/bestfcom.8 index 702aea2..bc55212 100644 --- a/docs/man/bestfcom.8 +++ b/docs/man/bestfcom.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestfcom .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BESTFCOM" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BESTFCOM" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestfortress.8 b/docs/man/bestfortress.8 index 3710a39..8edf6d2 100644 --- a/docs/man/bestfortress.8 +++ b/docs/man/bestfortress.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestfortress .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BESTFORTRESS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BESTFORTRESS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestuferrups.8 b/docs/man/bestuferrups.8 index 9561420..70338bd 100644 --- a/docs/man/bestuferrups.8 +++ b/docs/man/bestuferrups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestuferrups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BESTUFERRUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BESTUFERRUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/bestups.8 b/docs/man/bestups.8 index 45cebad..f2c5b07 100644 --- a/docs/man/bestups.8 +++ b/docs/man/bestups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BESTUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BESTUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/blazer_ser.8 b/docs/man/blazer_ser.8 index c163ff4..883a139 100644 --- a/docs/man/blazer_ser.8 +++ b/docs/man/blazer_ser.8 @@ -1,13 +1,13 @@ '\" t .\" Title: blazer_ser .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BLAZER_SER" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BLAZER_SER" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/blazer_usb.8 b/docs/man/blazer_usb.8 index e552504..3f6b5b7 100644 --- a/docs/man/blazer_usb.8 +++ b/docs/man/blazer_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: blazer_usb .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "BLAZER_USB" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "BLAZER_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -154,7 +154,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendor="Foo\&.Corporation\&.*" .RE .sp @@ -166,7 +165,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendorid=051d* (APC) .RE @@ -179,7 +177,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x product="\&.*(Smart|Back)\-?UPS\&.*" .RE .RE diff --git a/docs/man/clone.8 b/docs/man/clone.8 index 8637a95..7f92efb 100644 --- a/docs/man/clone.8 +++ b/docs/man/clone.8 @@ -1,13 +1,13 @@ '\" t .\" Title: clone .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "CLONE" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "CLONE" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/dummy-ups.8 b/docs/man/dummy-ups.8 index ea9d41b..eaba7fd 100644 --- a/docs/man/dummy-ups.8 +++ b/docs/man/dummy-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: dummy-ups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "DUMMY\-UPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "DUMMY\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -95,7 +95,7 @@ Port is the name of a remote UPS, using the NUT form, ie: .RS 4 .\} .nf -[@[:]] +@[:] .fi .if n \{\ .RE @@ -115,6 +115,8 @@ For instance: .if n \{\ .RE .\} +.sp +Unlike UPS specifications in the rest of NUT, the @hostname portion is not optional \- it is the @ character which enables Repeater Mode\&. To refer to an UPS on the same host as \fBdummy\-ups\fR, use port = upsname@localhost\&. .SH "INTERACTION" .sp Once the driver is loaded in dummy mode, you can change any variables, except those of the driver\&.* and server\&.* collections\&. You can do this by either editing the definition file, or use the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands\&. @@ -124,9 +126,9 @@ Note that in simulation mode, new variables can be added on the fly, by adding t In repeater mode, the driver acts according to the capabilities of the UPS, and so support the same instant commands and settable values\&. .SH "BACKGROUND" .sp -This driver was written in one evening to replace the previous dummycons testing driver\&. It was too limited and required to work from a terminal to interact\&. +Dummy Mode was originally written in one evening to replace the previous dummycons testing driver, which was too limited, and required a terminal for interaction\&. .sp -\fBdummy\-ups\fR is useful for NUT client development, and other testing purpose\&. +\fBdummy\-ups\fR is useful for NUT client development, and other testing purposes\&. .sp It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework\&. .sp diff --git a/docs/man/dummy-ups.txt b/docs/man/dummy-ups.txt index 766d17e..385f5be 100644 --- a/docs/man/dummy-ups.txt +++ b/docs/man/dummy-ups.txt @@ -86,7 +86,7 @@ Repeater Mode Port is the name of a remote UPS, using the NUT form, ie: - [@[:]] + @[:] For instance: @@ -95,6 +95,10 @@ For instance: port = ups@hostname desc = "dummy-ups in repeater mode" +Unlike UPS specifications in the rest of NUT, the `@hostname` portion is not +optional - it is the `@` character which enables Repeater Mode. To refer to an +UPS on the same host as *dummy-ups*, use `port = upsname@localhost`. + INTERACTION ----------- @@ -114,11 +118,11 @@ so support the same instant commands and settable values. BACKGROUND ---------- -This driver was written in one evening to replace the previous dummycons -testing driver. It was too limited and required to work from a terminal to -interact. +Dummy Mode was originally written in one evening to replace the previous +dummycons testing driver, which was too limited, and required a terminal for +interaction. -*dummy-ups* is useful for NUT client development, and other testing purpose. +*dummy-ups* is useful for NUT client development, and other testing purposes. It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework. diff --git a/docs/man/etapro.8 b/docs/man/etapro.8 index 868a0bc..e327592 100644 --- a/docs/man/etapro.8 +++ b/docs/man/etapro.8 @@ -1,13 +1,13 @@ '\" t .\" Title: etapro .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "ETAPRO" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "ETAPRO" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/everups.8 b/docs/man/everups.8 index 34c2e67..784627e 100644 --- a/docs/man/everups.8 +++ b/docs/man/everups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: everups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "EVERUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "EVERUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/gamatronic.8 b/docs/man/gamatronic.8 index 161d14f..12ef3be 100644 --- a/docs/man/gamatronic.8 +++ b/docs/man/gamatronic.8 @@ -1,13 +1,13 @@ '\" t .\" Title: gamatronic .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "GAMATRONIC" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "GAMATRONIC" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/genericups.8 b/docs/man/genericups.8 index 7d9f4df..a7f883f 100644 --- a/docs/man/genericups.8 +++ b/docs/man/genericups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: genericups .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "GENERICUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "GENERICUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/hosts.conf.5 b/docs/man/hosts.conf.5 index 8044fd5..c2d62fe 100644 --- a/docs/man/hosts.conf.5 +++ b/docs/man/hosts.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: hosts.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "HOSTS\&.CONF" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "HOSTS\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/isbmex.8 b/docs/man/isbmex.8 index 7c0ba16..06a2041 100644 --- a/docs/man/isbmex.8 +++ b/docs/man/isbmex.8 @@ -1,13 +1,13 @@ '\" t .\" Title: isbmex .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "ISBMEX" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "ISBMEX" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ivtscd.8 b/docs/man/ivtscd.8 index be2e1ee..66d51c7 100644 --- a/docs/man/ivtscd.8 +++ b/docs/man/ivtscd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: ivtscd .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "IVTSCD" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "IVTSCD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient.3 b/docs/man/libnutclient.3 index cab68f1..fced59c 100644 --- a/docs/man/libnutclient.3 +++ b/docs/man/libnutclient.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT" "3" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_commands.3 b/docs/man/libnutclient_commands.3 index 9899bf7..7a30319 100644 --- a/docs/man/libnutclient_commands.3 +++ b/docs/man/libnutclient_commands.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_commands .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_COMMAND" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_COMMAND" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_devices.3 b/docs/man/libnutclient_devices.3 index 2323630..4c048eb 100644 --- a/docs/man/libnutclient_devices.3 +++ b/docs/man/libnutclient_devices.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_devices .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_DEVICES" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_DEVICES" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_general.3 b/docs/man/libnutclient_general.3 index 3b7f5cb..4b3504e 100644 --- a/docs/man/libnutclient_general.3 +++ b/docs/man/libnutclient_general.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_general .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_GENERAL" "3" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_GENERAL" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_misc.3 b/docs/man/libnutclient_misc.3 index c2ef69b..0d83919 100644 --- a/docs/man/libnutclient_misc.3 +++ b/docs/man/libnutclient_misc.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_misc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_MISC" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_MISC" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_tcp.3 b/docs/man/libnutclient_tcp.3 index 7af1ddc..b91b7b7 100644 --- a/docs/man/libnutclient_tcp.3 +++ b/docs/man/libnutclient_tcp.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_tcp .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_TCP" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_TCP" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient_variables.3 b/docs/man/libnutclient_variables.3 index 0733cf2..da3f2ce 100644 --- a/docs/man/libnutclient_variables.3 +++ b/docs/man/libnutclient_variables.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_variables .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBNUTCLIENT_VARIABL" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBNUTCLIENT_VARIABL" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libupsclient-config.1 b/docs/man/libupsclient-config.1 index b368ec0..e2a0dde 100644 --- a/docs/man/libupsclient-config.1 +++ b/docs/man/libupsclient-config.1 @@ -1,13 +1,13 @@ '\" t .\" Title: libupsclient-config .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIBUPSCLIENT\-CONFIG" "1" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIBUPSCLIENT\-CONFIG" "1" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert-esp2.8 b/docs/man/liebert-esp2.8 index 916b704..24debf7 100644 --- a/docs/man/liebert-esp2.8 +++ b/docs/man/liebert-esp2.8 @@ -1,13 +1,13 @@ '\" t .\" Title: liebert-esp2 .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIEBERT\-ESP2" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIEBERT\-ESP2" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert.8 b/docs/man/liebert.8 index 67a949c..9600054 100644 --- a/docs/man/liebert.8 +++ b/docs/man/liebert.8 @@ -1,13 +1,13 @@ '\" t .\" Title: liebert .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "LIEBERT" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "LIEBERT" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/macosx-ups.8 b/docs/man/macosx-ups.8 index 4d29a0b..f3a8327 100644 --- a/docs/man/macosx-ups.8 +++ b/docs/man/macosx-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: macosx-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MACOSX\-UPS" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MACOSX\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/masterguard.8 b/docs/man/masterguard.8 index 423c696..f793cff 100644 --- a/docs/man/masterguard.8 +++ b/docs/man/masterguard.8 @@ -1,13 +1,13 @@ '\" t .\" Title: masterguard .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MASTERGUARD" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MASTERGUARD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/metasys.8 b/docs/man/metasys.8 index edfe9a3..321d8c6 100644 --- a/docs/man/metasys.8 +++ b/docs/man/metasys.8 @@ -1,13 +1,13 @@ '\" t .\" Title: metasys .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "METASYS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "METASYS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/mge-shut.8 b/docs/man/mge-shut.8 index cef01bb..fd0fb04 100644 --- a/docs/man/mge-shut.8 +++ b/docs/man/mge-shut.8 @@ -1,13 +1,13 @@ '\" t .\" Title: mge-shut .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MGE\-SHUT" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MGE\-SHUT" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/mge-utalk.8 b/docs/man/mge-utalk.8 index 445b862..c8dac81 100644 --- a/docs/man/mge-utalk.8 +++ b/docs/man/mge-utalk.8 @@ -1,13 +1,13 @@ '\" t .\" Title: mge-utalk .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MGE\-UTALK" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MGE\-UTALK" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/microdowell.8 b/docs/man/microdowell.8 index d09dd0e..2252f58 100644 --- a/docs/man/microdowell.8 +++ b/docs/man/microdowell.8 @@ -1,13 +1,13 @@ '\" t .\" Title: microdowell .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "MICRODOWELL" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "MICRODOWELL" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/netxml-ups.8 b/docs/man/netxml-ups.8 index 65dae82..3784370 100644 --- a/docs/man/netxml-ups.8 +++ b/docs/man/netxml-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: netxml-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NETXML\-UPS" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NETXML\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nut-ipmipsu.8 b/docs/man/nut-ipmipsu.8 index 845c935..aa2d1a5 100644 --- a/docs/man/nut-ipmipsu.8 +++ b/docs/man/nut-ipmipsu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nut-ipmipsu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUT\-IPMIPSU" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUT\-IPMIPSU" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -153,7 +153,6 @@ status of the PSU: .sp -1 .IP \(bu 2.3 .\} - \fIOL\fR means that the PSU is present and providing power, .RE @@ -166,7 +165,6 @@ means that the PSU is present and providing power, .sp -1 .IP \(bu 2.3 .\} - \fIOFF\fR means that the PSU is present but not providing power (power cable removed), .RE @@ -179,7 +177,6 @@ means that the PSU is present but not providing power (power cable removed), .sp -1 .IP \(bu 2.3 .\} - \fIstale\fR (no data) means that the PSU is not present (ie physically removed)\&. .RE diff --git a/docs/man/nut-recorder.8 b/docs/man/nut-recorder.8 index 4467a37..54d6f50 100644 --- a/docs/man/nut-recorder.8 +++ b/docs/man/nut-recorder.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nut-recorder .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUT\-RECORDER" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUT\-RECORDER" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nut-scanner.8 b/docs/man/nut-scanner.8 index f154875..8cb91fd 100644 --- a/docs/man/nut-scanner.8 +++ b/docs/man/nut-scanner.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nut-scanner .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUT\-SCANNER" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUT\-SCANNER" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -115,7 +115,6 @@ can be expressed in various forms: .sp -1 .IP \(bu 2.3 .\} - \fIauto\fR to scan all serial ports\&. .RE @@ -266,7 +265,7 @@ Set the username used for authenticating IPMI over LAN connections (mandatory fo .PP \fB\-B\fR | \fB\-\-password\fR \fIpassword\fR .RS 4 -Specify the password to use when authenticationg with the remote host (mandatory for IPMI over LAN\&. No default)\&. +Specify the password to use when authenticating with the remote host (mandatory for IPMI over LAN\&. No default)\&. .RE .PP \fB\-d\fR | \fB\-\-authType\fR \fIauthentication type\fR @@ -290,7 +289,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB0\fR: None; None; None .RE .sp @@ -302,7 +300,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB1\fR: HMAC\-SHA1; None; None .RE .sp @@ -314,7 +311,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB2\fR: HMAC\-SHA1; HMAC\-SHA1\-96; None .RE .sp @@ -326,7 +322,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB3\fR: HMAC\-SHA1; HMAC\-SHA1\-96; AES\-CBC\-128 .RE .sp @@ -338,7 +333,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB6\fR: HMAC\-MD5; None; None .RE .sp @@ -350,7 +344,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB7\fR: HMAC\-MD5; HMAC\-MD5\-128; None .RE .sp @@ -362,7 +355,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB8\fR: HMAC\-MD5; HMAC\-MD5\-128; AES\-CBC\-128 .RE .sp @@ -374,7 +366,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB11\fR: HMAC\-MD5; MD5\-128; None .RE .sp @@ -386,7 +377,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB12\fR: HMAC\-MD5; MD5\-128; AES\-CBC\-128 .RE .sp @@ -398,7 +388,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB15\fR: HMAC\-SHA256; None; None .RE .sp @@ -410,7 +399,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB16\fR: HMAC\-SHA256; HMAC_SHA256_128; None .RE .sp @@ -422,7 +410,6 @@ The following cipher suite ids are currently supported (Authentication; Integrit .sp -1 .IP \(bu 2.3 .\} - \fB17\fR: HMAC\-SHA256; HMAC_SHA256_128; AES\-CBC\-128 .RE .RE @@ -456,7 +443,7 @@ The same using CIDR notation: .sp \fBnut\-scanner \-S \-m 192\&.168\&.0\&.0/24\fR .sp -To scan NUT servers with a timeout of 10 seconds on IP range 192\&.168\&.0\&.0 to 192\&.168\&.0\&.128 using CIDR notation: +To scan NUT servers with a timeout of 10 seconds on IP range 192\&.168\&.0\&.0 to 192\&.168\&.0\&.127 using CIDR notation: .sp \fBnut\-scanner \-O \-t 10 \-m 192\&.168\&.0\&.0/25\fR .sp diff --git a/docs/man/nut-scanner.txt b/docs/man/nut-scanner.txt index 359806f..7f99465 100644 --- a/docs/man/nut-scanner.txt +++ b/docs/man/nut-scanner.txt @@ -134,7 +134,7 @@ IPMI OPTIONS Set the username used for authenticating IPMI over LAN connections (mandatory for IPMI over LAN. No default). *-B* | *--password* 'password':: -Specify the password to use when authenticationg with the remote host (mandatory for IPMI over LAN. No default). +Specify the password to use when authenticating with the remote host (mandatory for IPMI over LAN. No default). *-d* | *--authType* 'authentication type':: Specify the IPMI 1.5 authentication type to use (NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5) with the remote host (default=MD5). @@ -188,7 +188,7 @@ The same using CIDR notation: *nut-scanner -S -m 192.168.0.0/24* -To scan NUT servers with a timeout of 10 seconds on IP range 192.168.0.0 to 192.168.0.128 using CIDR notation: +To scan NUT servers with a timeout of 10 seconds on IP range 192.168.0.0 to 192.168.0.127 using CIDR notation: *nut-scanner -O -t 10 -m 192.168.0.0/25* diff --git a/docs/man/nut.conf.5 b/docs/man/nut.conf.5 index 726ce8f..d291731 100644 --- a/docs/man/nut.conf.5 +++ b/docs/man/nut.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: nut.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUT\&.CONF" "5" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUT\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -94,7 +94,7 @@ above indicates that no upsmon should be running\&. .PP \fBPOWEROFF_WAIT\fR .RS 4 -Optional\&. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off\&. This may fail for a number of reasons\&. Most notably is the case that mains power returns during the shutdown process\&. See the section "Power races" in /usr/share/doc/nut/docs/shutdown\&.txt\&.gz\&. The system will wait this long for the UPS to cut power, and then reboot\&. It should be long enough to exhaust the batteries, in case line power continues to be unavailable\&. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned\&. See sleep(1) for compatible time syntax\&. If you specify the time in seconds, use the "s" suffix\&. +Optional\&. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off\&. This may fail for a number of reasons\&. Most notably is the case that mains power returns during the shutdown process\&. See the section "Power races" in /usr/share/doc/nut/FAQ\&.txt\&.gz\&. The system will wait this long for the UPS to cut power, and then reboot\&. It should be long enough to exhaust the batteries, in case line power continues to be unavailable\&. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned\&. See sleep(1) for compatible time syntax\&. If you specify the time in seconds, use the "s" suffix\&. .RE .if n \{\ .sp diff --git a/docs/man/nut.conf.txt b/docs/man/nut.conf.txt index 074ff95..881a08a 100644 --- a/docs/man/nut.conf.txt +++ b/docs/man/nut.conf.txt @@ -68,7 +68,7 @@ Optional. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off. This may fail for a number of reasons. Most notably is the case that mains power returns during the shutdown process. See the section "Power races" in -/usr/share/doc/nut/docs/shutdown.txt.gz. The system will wait this +/usr/share/doc/nut/FAQ.txt.gz. The system will wait this long for the UPS to cut power, and then reboot. It should be long enough to exhaust the batteries, in case line power continues to be unavailable. On the other hand, it should not be so long that the diff --git a/docs/man/nutdrv_atcl_usb.8 b/docs/man/nutdrv_atcl_usb.8 index 78b4804..7f73147 100644 --- a/docs/man/nutdrv_atcl_usb.8 +++ b/docs/man/nutdrv_atcl_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nutdrv_atcl_usb .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTDRV_ATCL_USB" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTDRV_ATCL_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutdrv_qx.8 b/docs/man/nutdrv_qx.8 index 60c2591..df98321 100644 --- a/docs/man/nutdrv_qx.8 +++ b/docs/man/nutdrv_qx.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nutdrv_qx .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/22/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTDRV_QX" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTDRV_QX" "8" "04/22/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -112,13 +112,15 @@ seconds (if mains meanwhile returned)\&. \fBprotocol =\fR \fIstring\fR .RS 4 Skip autodetection of the protocol to use and only use the one specified\&. Supported values: +\fIbestups\fR, \fImecer\fR, \fImegatec\fR, \fImegatec/old\fR, \fImustek\fR, \fIq1\fR, \fIvoltronic\fR, -\fIvoltronic\-qs\fR +\fIvoltronic\-qs\fR, +\fIvoltronic\-qs\-hex\fR and \fIzinto\fR\&. .sp @@ -201,6 +203,13 @@ Minimum battery load used by the driver to estimate the runtime\&. If not specif \fBruntimecal\fR is also specified\&. .RE +.SS "BESTUPS, MECER, MEGATAEC, MEGATEC/OLD, MUSTEK, Q1, VOLTRONIC\-QS, VOLTRONIC\-QS\-HEX, ZINTO PROTOCOLS" +.PP +\fBignoresab\fR +.RS 4 +Some UPSes incorrectly report the \(oqShutdown Active\(cq bit as always on, consequently making the driver believe the UPS is nearing a shutdown (and, as a result, ups\&.status always contains +FSD\&... and you know what this means)\&. Setting this flag will make the driver ignore the \(oqShutdown Active\(cq bit\&. +.RE .SS "MECER, MEGATAEC, MEGATEC/OLD, MUSTEK, ZINTO PROTOCOLS" .PP \fBondelay\fR @@ -226,6 +235,30 @@ Some UPSes will lock up if you attempt to read rating information from them\&. S .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 +.SS "BESTUPS PROTOCOL" +.PP +\fBondelay\fR +.RS 4 +The acceptable range is +60\&.\&.599940 +seconds\&. +.RE +.PP +\fBoffdelay\fR +.RS 4 +The acceptable range is +12\&.\&.5940 +seconds\&. +.RE +.PP +\fBpins_shutdown_mode =\fR \fIvalue\fR +.RS 4 +Set +shutdown mode functionality of Pin 1 and Pin 7 +on the UPS DB9 communication port (Per Best Power\(cqs EPS\-0059) to +\fIvalue\fR +[0\&.\&.6]\&. +.RE .SS "Q1 PROTOCOL" .PP \fBondelay\fR @@ -241,7 +274,7 @@ The acceptable range is 12\&.\&.600 seconds\&. .RE -.SS "VOLTRONIC\-QS PROTOCOL" +.SS "VOLTRONIC\-QS, VOLTRONIC\-QS\-HEX PROTOCOLS" .PP \fBondelay\fR .RS 4 @@ -374,7 +407,7 @@ Enable or disable Battery Open Status Check [enabled/disabled]\&. If enabled, wh Enable or disable site fault detection [enabled/disabled]\&. If enabled, the UPS will beep when the input neutral and hot wires are reversed\&. .RE .PP -\fBcostant_phase_angle =\fR \fIstring\fR +\fBconstant_phase_angle =\fR \fIstring\fR .RS 4 Enable or disable Constant Phase Angle Function (output and input phase angles are not equal) [enabled/disabled]\&. .RE @@ -484,7 +517,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendor="Foo\&.Corporation\&.*" .RE .sp @@ -496,7 +528,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendorid=051d* (APC) .RE @@ -509,7 +540,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x product="\&.*(Smart|Back)\-?UPS\&.*" .RE .RE @@ -524,10 +554,13 @@ bus="00[2\-3]")\&. \fBsubdriver =\fR \fIstring\fR .RS 4 Select a serial\-over\-USB subdriver to use\&. You have a choice between -\fBphoenix\fR, +\fBcypress\fR, +\fBfabula\fR, +\fBfuji\fR, \fBippon\fR, -\fBcypress\fR, and -\fBkrauler\fR\&. When using this option, it is mandatory to also specify the +\fBkrauler\fR +and +\fBphoenix\fR\&. When using this option, it is mandatory to also specify the \fBvendorid\fR and \fBproductid\fR\&. @@ -543,6 +576,60 @@ subdriver\&. This is mandatory for some devices to work (LDLC, Dynamix and other or 0x4095), according to your device entry in NUT hardware compatibility list (HCL)\&. .RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBIMPLEMENTATION NOTES\fR +.RS 4 +.PP +\fB\fIfabula\fR\fR\fB subdriver\fR +.RS 4 +This subdriver, meant to be used with the +\fImegatec\fR +protocol, does +\fBnot\fR +support the various +\fBtest\&.battery\fR +commands\&. Plus, the +\fBshutdown\&.return\fR +command ignores the values set in +\fIups\&.delay\&.start\fR/\fBondelay\fR +and makes the UPS turn on the load as soon as power is back\&. +.RE +.PP +\fB\fIfuji\fR\fR\fB subdriver\fR +.RS 4 +This subdriver, meant to be used with the +\fImegatec\fR +protocol, does +\fBnot\fR +support the +\fBshutdown\&.stayoff\fR +and +\fBload\&.off\fR +commands\&. Plus, the +\fBshutdown\&.return\fR +command ignores the values set in +\fIups\&.delay\&.start\fR/\fBondelay\fR +and makes the UPS turn on the load as soon as power is back\&. +.RE +.PP +\fB\fIkrauler\fR\fR\fB subdriver\fR +.RS 4 +This subdriver, meant to be used with the +\fImegatec\fR +protocol, does +\fBnot\fR +support the shutdown commands, i\&.e\&.: +\fBshutdown\&.return\fR, +\fBshutdown\&.stayoff\fR +and +\fBload\&.off\fR\&. +.RE +.RE .SH "UPS COMMANDS" .sp This driver supports some instant commands (see \fBupscmd\fR(8)): @@ -554,7 +641,7 @@ Toggle the UPS beeper\&. (Not available on some hardware) .PP \fBload\&.on\fR .RS 4 -Turn on the load immediately\&. +Turn on the load immediately\&. (Not available on some hardware) .RE .PP \fBload\&.off\fR @@ -597,7 +684,7 @@ Perform a quick (10 second) battery test\&. .RS 4 Stop a running battery test\&. (Not available on some hardware) .RE -.SS "MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS" +.SS "BESTUPS, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS" .PP \fBtest\&.battery\&.start\fR \fIvalue\fR .RS 4 @@ -763,6 +850,22 @@ driver wants a \fIvalue\fR in seconds\&. .RE +.SH "NOTES FOR THE PREVIOUS USER OF BESTUPS DRIVER" +.sp +The \fBnutdrv_qx\fR driver having replaced the bestups one, some configuration changes may be required by users switching to \fBnutdrv_qx\fR\&. +.sp +Part of this, the following bestups options, in \fBups.conf\fR(5), are no longer supported by this driver: +.PP +\fBnombattvolt\fR, \fBbattvoltmult\fR +.RS 4 +See +BATTERY CHARGE\&. +.RE +.PP +\fBID\fR +.RS 4 +Discarded\&. +.RE .SH "NOTES FOR THE PREVIOUS USER OF VOLTRONIC DRIVERS" .sp The \fBnutdrv_qx\fR driver having replaced the voltronic ones, some configuration changes may be required by users switching to \fBnutdrv_qx\fR\&. @@ -971,11 +1074,9 @@ After issuing a \fBshutdown\&.return\fR instant command, the UPS won\(cqt wait \ .IP \(bu 2.3 .\} if the load has been previously (no matter how long before) powered off through -\fBload\&.off\fR/\fBshutdown\&.stayoff\fR -\fIand\fR +\fBload\&.off\fR/\fBshutdown\&.stayoff\fR\fIand\fR powered on through -\fBload\&.on\fR/\fBshutdown\&.stop\fR -\fIand\fR +\fBload\&.on\fR/\fBshutdown\&.stop\fR\fIand\fR .RE .sp .RS 4 @@ -1006,6 +1107,9 @@ command .RE .sp In this case, as soon as mains returns the load will be powered\&. +.SS "VOLTRONIC\-QS\-HEX UNITS" +.sp +\fBshutdown\&.return\fR, \fBload\&.off\fR, and \fBshutdown\&.stayoff\fR instant commands are known to work as expected only if mains is present, otherwise, as soon as mains returns the load will be powered\&. .SH "UPS WARNINGS (VOLTRONIC PROTOCOL)" .sp The UPSes supported by \fIvoltronic\fR protocol report warnings through a 64bit flag (bit1bit2\&...bit63bit64) where 1 means that a warning arose, while 0 means no warning\&. Since more than one warning at a time can be signaled, and because of the limited space in the ups\&.alarm variable, if the length of the warnings exceeds that of ups\&.alarms variable, they will be reported as bits\&. If you want to know the explanation of that bit you can either watch the log or see the next table (unlisted bits equal to unknown warnings)\&. diff --git a/docs/man/nutdrv_qx.txt b/docs/man/nutdrv_qx.txt index 963342c..5d08901 100644 --- a/docs/man/nutdrv_qx.txt +++ b/docs/man/nutdrv_qx.txt @@ -52,7 +52,7 @@ If you set stayoff in linkman:ups.conf[5] when FSD arises the UPS will call a *s *protocol =* 'string':: Skip autodetection of the protocol to use and only use the one specified. -Supported values: 'mecer', 'megatec', 'megatec/old', 'mustek', 'q1', 'voltronic', 'voltronic-qs' and 'zinto'. +Supported values: 'bestups', 'mecer', 'megatec', 'megatec/old', 'mustek', 'q1', 'voltronic', 'voltronic-qs', 'voltronic-qs-hex' and 'zinto'. + Note that if you end up using the 'q1' protocol, you may want to give a try to the 'mecer', 'megatec' and 'zinto' ones setting the <> (only one, or both). @@ -103,6 +103,14 @@ If not specified, the driver defaults to 10%. Only used if *runtimecal* is also specified. +BESTUPS, MECER, MEGATAEC, MEGATEC/OLD, MUSTEK, Q1, VOLTRONIC-QS, VOLTRONIC-QS-HEX, ZINTO PROTOCOLS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*ignoresab*:: +Some UPSes incorrectly report the `Shutdown Active' bit as always on, consequently making the driver believe the UPS is nearing a shutdown (and, as a result, ups.status always contains +FSD+... and you know what this means). +Setting this flag will make the driver ignore the `Shutdown Active' bit. + + [[old-blazer-protocols-options]] MECER, MEGATAEC, MEGATEC/OLD, MUSTEK, ZINTO PROTOCOLS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -122,6 +130,19 @@ Some UPSes will lock up if you attempt to read vendor information from them. Setting this flag will make the driver skip this step. +BESTUPS PROTOCOL +~~~~~~~~~~~~~~~~ + +*ondelay*:: +The acceptable range is +60..599940+ seconds. + +*offdelay*:: +The acceptable range is +12..5940+ seconds. + +*pins_shutdown_mode =* 'value':: +Set http://www.networkupstools.org/protocols/sola.html#_shutdown_set_command[shutdown mode functionality of Pin 1 and Pin 7] on the UPS DB9 communication port (Per Best Power’s EPS-0059) to 'value' [+0..6+]. + + Q1 PROTOCOL ~~~~~~~~~~~ @@ -132,8 +153,8 @@ The acceptable range is +0..599940+ seconds. The acceptable range is +12..600+ seconds. -VOLTRONIC-QS PROTOCOL -~~~~~~~~~~~~~~~~~~~~~ +VOLTRONIC-QS, VOLTRONIC-QS-HEX PROTOCOLS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *ondelay*:: The acceptable range is +60..599940+ seconds. @@ -215,7 +236,7 @@ If enabled, when the UPS is turned on, it will check if the battery is connected Enable or disable site fault detection [+enabled+/+disabled+]. If enabled, the UPS will beep when the input neutral and hot wires are reversed. -*costant_phase_angle =* 'string':: +*constant_phase_angle =* 'string':: Enable or disable Constant Phase Angle Function (output and input phase angles are not equal) [+enabled+/+disabled+]. *limited_runtime_on_battery =* 'string':: @@ -301,7 +322,7 @@ The argument is a regular expression that must match the bus name where the UPS *subdriver =* 'string':: Select a serial-over-USB subdriver to use. -You have a choice between *phoenix*, *ippon*, *cypress*, and *krauler*. +You have a choice between *cypress*, *fabula*, *fuji*, *ippon*, *krauler* and *phoenix*. When using this option, it is mandatory to also specify the *vendorid* and *productid*. *langid_fix =* 'value':: @@ -310,6 +331,21 @@ This is mandatory for some devices to work (LDLC, Dynamix and others). You must provide *value* (+0x409+ or +0x4095+), according to your device entry in NUT hardware compatibility list (HCL). +IMPLEMENTATION NOTES +^^^^^^^^^^^^^^^^^^^^ + +*'fabula' subdriver*:: +This subdriver, meant to be used with the 'megatec' protocol, does *not* support the various *test.battery* commands. +Plus, the *shutdown.return* command ignores the values set in 'ups.delay.start'/*ondelay* and makes the UPS turn on the load as soon as power is back. + +*'fuji' subdriver*:: +This subdriver, meant to be used with the 'megatec' protocol, does *not* support the *shutdown.stayoff* and *load.off* commands. +Plus, the *shutdown.return* command ignores the values set in 'ups.delay.start'/*ondelay* and makes the UPS turn on the load as soon as power is back. + +*'krauler' subdriver*:: +This subdriver, meant to be used with the 'megatec' protocol, does *not* support the shutdown commands, i.e.: *shutdown.return*, *shutdown.stayoff* and *load.off*. + + UPS COMMANDS ------------ @@ -321,6 +357,7 @@ Toggle the UPS beeper. *load.on*:: Turn on the load immediately. +(Not available on some hardware) *load.off*:: Turn off the load immediately (see <<_known_problems,KNOWN PROBLEMS>>). @@ -348,8 +385,8 @@ Stop a running battery test. (Not available on some hardware) -MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +BESTUPS, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *test.battery.start* 'value':: Perform a battery test for the duration of 'value' seconds (truncated to 60 seconds) [+60..5940+]. @@ -470,6 +507,21 @@ The following instant command has also been changed: While the old blazer drivers expected a 'value' in minutes, the *nutdrv_qx* driver wants a 'value' in seconds. +NOTES FOR THE PREVIOUS USER OF BESTUPS DRIVER +--------------------------------------------- + +The *nutdrv_qx* driver having replaced the bestups one, some configuration changes may be required by users switching to *nutdrv_qx*. + +Part of this, the following bestups options, in linkman:ups.conf[5], are no longer supported by this driver: + +*nombattvolt*:: +*battvoltmult*:: +See <<_battery_charge,BATTERY CHARGE>>. + +*ID*:: +Discarded. + + NOTES FOR THE PREVIOUS USER OF VOLTRONIC DRIVERS ------------------------------------------------ @@ -593,6 +645,12 @@ After issuing a *shutdown.return* instant command, the UPS won't wait *ondelay* In this case, as soon as mains returns the load will be powered. +VOLTRONIC-QS-HEX UNITS +~~~~~~~~~~~~~~~~~~~~~~ + +*shutdown.return*, *load.off*, and *shutdown.stayoff* instant commands are known to work as expected only if mains is present, otherwise, as soon as mains returns the load will be powered. + + UPS WARNINGS (VOLTRONIC PROTOCOL) --------------------------------- diff --git a/docs/man/nutscan.3 b/docs/man/nutscan.3 index 0f5e677..49211d7 100644 --- a/docs/man/nutscan.3 +++ b/docs/man/nutscan.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -58,7 +58,6 @@ Then, to discover new devices, use the appropriate function: .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_usb\fR(3) for supported USB devices, .RE @@ -71,7 +70,6 @@ for supported USB devices, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_snmp\fR(3) for supported SNMP agents, .RE @@ -84,7 +82,6 @@ for supported SNMP agents, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_xml_http\fR(3) for Eaton Network Management Card, .RE @@ -97,7 +94,6 @@ for Eaton Network Management Card, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_nut\fR(3) for NUT servers (upsd), using the classic method, .RE @@ -110,7 +106,6 @@ for NUT servers (upsd), using the classic method, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_avahi\fR(3) for NUT servers (upsd), using the mDNS (Avahi) method, .RE @@ -123,7 +118,6 @@ for NUT servers (upsd), using the mDNS (Avahi) method, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_scan_ipmi\fR(3) for supported IPMI PSU\&. .RE @@ -140,7 +134,6 @@ Helper functions are also provided to output data using standard formats: .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_display_parsable\fR(3) for parsable output, .RE @@ -153,7 +146,6 @@ for parsable output, .sp -1 .IP \(bu 2.3 .\} - \fBnutscan_display_ups_conf\fR(3) for ups\&.conf style\&. .RE diff --git a/docs/man/nutscan_add_device_to_device.3 b/docs/man/nutscan_add_device_to_device.3 index 875732d..f98dfac 100644 --- a/docs/man/nutscan_add_device_to_device.3 +++ b/docs/man/nutscan_add_device_to_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_add_device_to_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_ADD_DEVICE_T" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_ADD_DEVICE_T" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_add_option_to_device.3 b/docs/man/nutscan_add_option_to_device.3 index bb1bd59..c591587 100644 --- a/docs/man/nutscan_add_option_to_device.3 +++ b/docs/man/nutscan_add_option_to_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_add_option_to_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_ADD_OPTION_T" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_ADD_OPTION_T" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_cidr_to_ip.3 b/docs/man/nutscan_cidr_to_ip.3 index 0e2ae46..aedb836 100644 --- a/docs/man/nutscan_cidr_to_ip.3 +++ b/docs/man/nutscan_cidr_to_ip.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_cidr_to_ip .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_CIDR_TO_IP" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_CIDR_TO_IP" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_display_parsable.3 b/docs/man/nutscan_display_parsable.3 index f812757..0b1ac06 100644 --- a/docs/man/nutscan_display_parsable.3 +++ b/docs/man/nutscan_display_parsable.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_display_parsable .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_PARS" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_DISPLAY_PARS" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_display_ups_conf.3 b/docs/man/nutscan_display_ups_conf.3 index 917707f..6df43c5 100644 --- a/docs/man/nutscan_display_ups_conf.3 +++ b/docs/man/nutscan_display_ups_conf.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_display_ups_conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_UPS_" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_DISPLAY_UPS_" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_free_device.3 b/docs/man/nutscan_free_device.3 index c05bb8e..962cd4b 100644 --- a/docs/man/nutscan_free_device.3 +++ b/docs/man/nutscan_free_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_free_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_FREE_DEVICE" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_FREE_DEVICE" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_get_serial_ports_list.3 b/docs/man/nutscan_get_serial_ports_list.3 index 47b3bd4..567eb8e 100644 --- a/docs/man/nutscan_get_serial_ports_list.3 +++ b/docs/man/nutscan_get_serial_ports_list.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_get_serial_ports_list .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_GET_SERIAL_P" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_GET_SERIAL_P" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_init.3 b/docs/man/nutscan_init.3 index 549cf0d..0691ee5 100644 --- a/docs/man/nutscan_init.3 +++ b/docs/man/nutscan_init.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_init .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_INIT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_INIT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_new_device.3 b/docs/man/nutscan_new_device.3 index 5248d3f..9bdcab1 100644 --- a/docs/man/nutscan_new_device.3 +++ b/docs/man/nutscan_new_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_new_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_NEW_DEVICE" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_NEW_DEVICE" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_avahi.3 b/docs/man/nutscan_scan_avahi.3 index d113387..921d61f 100644 --- a/docs/man/nutscan_scan_avahi.3 +++ b/docs/man/nutscan_scan_avahi.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_avahi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_AVAHI" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_AVAHI" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_eaton_serial.3 b/docs/man/nutscan_scan_eaton_serial.3 index 0d34a97..13f2bdf 100644 --- a/docs/man/nutscan_scan_eaton_serial.3 +++ b/docs/man/nutscan_scan_eaton_serial.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_eaton_serial .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_EATON_S" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_EATON_S" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_ipmi.3 b/docs/man/nutscan_scan_ipmi.3 index 3731954..c782ec7 100644 --- a/docs/man/nutscan_scan_ipmi.3 +++ b/docs/man/nutscan_scan_ipmi.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_ipmi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_IPMI" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_IPMI" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_nut.3 b/docs/man/nutscan_scan_nut.3 index 482aea7..d3e34d7 100644 --- a/docs/man/nutscan_scan_nut.3 +++ b/docs/man/nutscan_scan_nut.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_nut .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_NUT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_NUT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_snmp.3 b/docs/man/nutscan_scan_snmp.3 index f255dc8..40cdb3b 100644 --- a/docs/man/nutscan_scan_snmp.3 +++ b/docs/man/nutscan_scan_snmp.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_snmp .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_SNMP" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_SNMP" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_usb.3 b/docs/man/nutscan_scan_usb.3 index 9e223df..fca4e54 100644 --- a/docs/man/nutscan_scan_usb.3 +++ b/docs/man/nutscan_scan_usb.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_usb .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_USB" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_USB" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutscan_scan_xml_http.3 b/docs/man/nutscan_scan_xml_http.3 index 75f35c0..64a6797 100644 --- a/docs/man/nutscan_scan_xml_http.3 +++ b/docs/man/nutscan_scan_xml_http.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_xml_http .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTSCAN_SCAN_XML_HTT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTSCAN_SCAN_XML_HTT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/nutupsdrv.8 b/docs/man/nutupsdrv.8 index 991d88a..234f103 100644 --- a/docs/man/nutupsdrv.8 +++ b/docs/man/nutupsdrv.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nutupsdrv .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "NUTUPSDRV" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "NUTUPSDRV" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/oneac.8 b/docs/man/oneac.8 index f4c54bc..4b69624 100644 --- a/docs/man/oneac.8 +++ b/docs/man/oneac.8 @@ -1,13 +1,13 @@ '\" t .\" Title: oneac .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "ONEAC" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "ONEAC" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/optiups.8 b/docs/man/optiups.8 index df62f9d..6713849 100644 --- a/docs/man/optiups.8 +++ b/docs/man/optiups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: optiups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "OPTIUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "OPTIUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powercom.8 b/docs/man/powercom.8 index 17f0ae3..6782a26 100644 --- a/docs/man/powercom.8 +++ b/docs/man/powercom.8 @@ -1,13 +1,13 @@ '\" t .\" Title: powercom .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "POWERCOM" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "POWERCOM" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powerman-pdu.8 b/docs/man/powerman-pdu.8 index 839b963..23549ea 100644 --- a/docs/man/powerman-pdu.8 +++ b/docs/man/powerman-pdu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: powerman-pdu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "POWERMAN\-PDU" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "POWERMAN\-PDU" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/powerpanel.8 b/docs/man/powerpanel.8 index b36a90b..1ca1c84 100644 --- a/docs/man/powerpanel.8 +++ b/docs/man/powerpanel.8 @@ -1,13 +1,13 @@ '\" t .\" Title: powerpanel .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "POWERPANEL" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "POWERPANEL" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/rhino.8 b/docs/man/rhino.8 index 280b4c6..f13dc8f 100644 --- a/docs/man/rhino.8 +++ b/docs/man/rhino.8 @@ -1,13 +1,13 @@ '\" t .\" Title: rhino .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "RHINO" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "RHINO" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/richcomm_usb.8 b/docs/man/richcomm_usb.8 index cbc27d5..b171425 100644 --- a/docs/man/richcomm_usb.8 +++ b/docs/man/richcomm_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: richcomm_usb .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "RICHCOMM_USB" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "RICHCOMM_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/riello_ser.8 b/docs/man/riello_ser.8 index 8d6227f..e4f41fe 100644 --- a/docs/man/riello_ser.8 +++ b/docs/man/riello_ser.8 @@ -1,13 +1,13 @@ '\" t .\" Title: riello_ser .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "RIELLO_SER" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "RIELLO_SER" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/riello_usb.8 b/docs/man/riello_usb.8 index 6297a49..b29e0ba 100644 --- a/docs/man/riello_usb.8 +++ b/docs/man/riello_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: riello_usb .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "RIELLO_USB" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "RIELLO_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/safenet.8 b/docs/man/safenet.8 index 813a87e..2cdd042 100644 --- a/docs/man/safenet.8 +++ b/docs/man/safenet.8 @@ -1,13 +1,13 @@ '\" t .\" Title: safenet .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "SAFENET" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "SAFENET" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/snmp-ups.8 b/docs/man/snmp-ups.8 index 4f12539..594e1bf 100644 --- a/docs/man/snmp-ups.8 +++ b/docs/man/snmp-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: snmp-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "SNMP\-UPS" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "SNMP\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/solis.8 b/docs/man/solis.8 index f643df6..434079e 100644 --- a/docs/man/solis.8 +++ b/docs/man/solis.8 @@ -1,13 +1,13 @@ '\" t .\" Title: solis .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "SOLIS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "SOLIS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -80,7 +80,31 @@ Solis 2000 VA Solis 3000 VA .RE .sp -All Solis models are sinusoidal on\-line +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Back\-UPS BZ1200\-BR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Back\-UPS BZ2200BI\-BR +.RE +.sp +All Solis models are sinusoidal on\-line\&. +.sp +In 2009, Schneider Electric acquired Microsol Technologies, and by 2012, the entire Microsol line of equipment was being sold under the APC brand\&. .SH "EXTRA ARGUMENTS" .sp This driver support the following extra optional settings in the \fBups.conf\fR(5)\&. @@ -111,6 +135,9 @@ shutdown\&.return \- Shut down in \&.3 minutes and restart in \&.3 minutes .\} shutdown\&.stayoff \- Shut down in \&.3 minutes and do not return .RE +.SH "ISSUES" +.sp +The APC version of the Microsol protocol is slightly incompatible with the \fBsolis\fR driver\&. As of version 0\&.62 of the \fBsolis\fR driver, the driver will connect to the UPS, but some values are read incorrectly\&. .SH "AUTHOR" .sp Silvino B\&. Magalhães diff --git a/docs/man/solis.txt b/docs/man/solis.txt index 37bc48d..d009b60 100644 --- a/docs/man/solis.txt +++ b/docs/man/solis.txt @@ -21,8 +21,13 @@ This driver has been tested with : * Solis 1500 VA * Solis 2000 VA * Solis 3000 VA + * Back-UPS BZ1200-BR + * Back-UPS BZ2200BI-BR -All Solis models are sinusoidal on-line +All Solis models are sinusoidal on-line. + +In 2009, Schneider Electric acquired Microsol Technologies, and by 2012, the +entire Microsol line of equipment was being sold under the APC brand. EXTRA ARGUMENTS --------------- @@ -41,6 +46,13 @@ COMMANDS * shutdown.stayoff - Shut down in .3 minutes and do not return +ISSUES +------ + +The APC version of the Microsol protocol is slightly incompatible with the +*solis* driver. As of version 0.62 of the *solis* driver, the driver will +connect to the UPS, but some values are read incorrectly. + AUTHOR ------ Silvino B. Magalhães diff --git a/docs/man/tripplite.8 b/docs/man/tripplite.8 index fcf979c..f8fde31 100644 --- a/docs/man/tripplite.8 +++ b/docs/man/tripplite.8 @@ -1,13 +1,13 @@ '\" t .\" Title: tripplite .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "TRIPPLITE" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "TRIPPLITE" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplite_usb.8 b/docs/man/tripplite_usb.8 index feecd83..82e80a5 100644 --- a/docs/man/tripplite_usb.8 +++ b/docs/man/tripplite_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: tripplite_usb .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "TRIPPLITE_USB" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "TRIPPLITE_USB" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -173,6 +173,12 @@ This driver supports the following optional settings in the \fBups.conf\fR(5) fi This setting controls the delay between receiving the "kill" command (\fI\-k\fR) and actually cutting power to the computer\&. .RE .PP +\fBbattery_min\fR, \fBbattery_max\fR +.RS 4 +These floating\-point values correspond to the "empty" (10%) and "full" (100%) voltages of the battery\&. They are used for an approximation of the battery state\-of\-charge\&. The calculated battery\&.charge value will be clamped to the range of 10% through 100%, so the resting voltage of the charged battery can be used for +\fBbattery_max\fR, and the higher float charge voltage should not cause problems\&. +.RE +.PP \fBbus\fR .RS 4 This regular expression is used to match the USB bus (as seen in diff --git a/docs/man/tripplite_usb.txt b/docs/man/tripplite_usb.txt index 9e4e59e..1d67caa 100644 --- a/docs/man/tripplite_usb.txt +++ b/docs/man/tripplite_usb.txt @@ -60,6 +60,15 @@ file (or with '-x' on the command line): This setting controls the delay between receiving the "kill" command ('-k') and actually cutting power to the computer. +*battery_min*, *battery_max*:: + +These floating-point values correspond to the "empty" (10%) and "full" (100%) +voltages of the battery. They are used for an approximation of the battery +state-of-charge. The calculated battery.charge value will be clamped to the +range of 10% through 100%, so the resting voltage of the charged battery can be +used for *battery_max*, and the higher float charge voltage should not cause +problems. + *bus*:: This regular expression is used to match the USB bus (as seen in diff --git a/docs/man/tripplitesu.8 b/docs/man/tripplitesu.8 index d9bc32e..afb2789 100644 --- a/docs/man/tripplitesu.8 +++ b/docs/man/tripplitesu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: tripplitesu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "TRIPPLITESU" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "TRIPPLITESU" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ups.conf.5 b/docs/man/ups.conf.5 index 14584c8..835ae8e 100644 --- a/docs/man/ups.conf.5 +++ b/docs/man/ups.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: ups.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/22/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPS\&.CONF" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPS\&.CONF" "5" "04/22/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -107,6 +107,19 @@ The default is 5 seconds\&. Optional\&. The status of the UPS will be refreshed after a maximum delay which is controlled by this setting\&. This is normally 2 seconds\&. This may be useful if the driver is creating too much of a load on your system or network\&. .RE .PP +\fBsynchronous\fR +.RS 4 +Optional\&. The driver work by default in asynchronous mode (i\&.e +\fBsynchronous=no\fR)\&. This means that all data are pushed by the driver on the communication socket to upsd (Unix socket on Unix, Named pipe on Windows) without waiting for these data to be actually consumed\&. With some HW, such as ePDUs, that can produce a lot of data, asynchronous mode may cause some congestion, resulting in the socket to be full, and the driver to appear as not connected\&. By enabling the +\fIsynchronous\fR +flag (value = +\fIyes\fR), the driver will wait for data to be consumed by upsd, prior to publishing more\&. This can be enabled either globally or per driver\&. +.sp +The default is +\fIno\fR +(i\&.e\&. asynchronous mode) for backward compatibility of the driver behavior\&. +.RE +.PP \fBuser\fR .RS 4 Optional\&. If started as root, the driver will setuid(2) to the user id associated with @@ -189,6 +202,21 @@ Optional\&. This can be set as a global variable above your first UPS definition The default is 45 seconds\&. .RE .PP +\fBsynchronous\fR +.RS 4 +Optional\&. Same as the global directive of the same name, but this is for a specific device\&. +.RE +.PP +\fBusb_set_altinterface\fR[=\fIaltinterface\fR] +.RS 4 +Optional\&. Force the USB code to call +usb_set_altinterface(0), as was done in NUT 2\&.7\&.2 and earlier\&. This should not be necessary, since the default for +bAlternateSetting +(as shown in lsusb) is zero on all USB devices seen to date\&. However, this redundant call to +usb_set_altinterface() +prevents certain UPSes from working on Mac OS X\&. If your UPS requires explicitly setting the alternate interface, include this flag, and email the nut\-upsdev list with details about your UPS and operating system\&. +.RE +.PP \fBdefault\&.\fR .RS 4 Optional\&. Set a default value for which is used in case the UPS doesn\(cqt provide a value, but will be overwritten if a value is available from the UPS: diff --git a/docs/man/ups.conf.txt b/docs/man/ups.conf.txt index 4877852..dd145bd 100644 --- a/docs/man/ups.conf.txt +++ b/docs/man/ups.conf.txt @@ -80,6 +80,22 @@ delay which is controlled by this setting. This is normally 2 seconds. This may be useful if the driver is creating too much of a load on your system or network. +*synchronous*:: + +Optional. The driver work by default in asynchronous mode (i.e +*synchronous=no*). This means that all data are pushed by the driver +on the communication socket to upsd (Unix socket on Unix, Named pipe +on Windows) without waiting for these data to be actually consumed. +With some HW, such as ePDUs, that can produce a lot of data, +asynchronous mode may cause some congestion, resulting in the socket to +be full, and the driver to appear as not connected. By enabling the +'synchronous' flag (value = 'yes'), the driver will wait for data to be +consumed by upsd, prior to publishing more. This can be enabled either +globally or per driver. ++ +The default is 'no' (i.e. asynchronous mode) for backward compatibility +of the driver behavior. + *user*:: Optional. If started as root, the driver will setuid(2) to the user id @@ -154,6 +170,21 @@ system from getting stuck due to a broken driver or UPS. + The default is 45 seconds. +*synchronous*:: + +Optional. Same as the global directive of the same name, but this is +for a specific device. + +*usb_set_altinterface*[='altinterface']:: + +Optional. Force the USB code to call `usb_set_altinterface(0)`, as was done in +NUT 2.7.2 and earlier. This should not be necessary, since the default for +`bAlternateSetting` (as shown in lsusb) is zero on all USB devices seen to +date. However, this redundant call to `usb_set_altinterface()` prevents +certain UPSes from working on Mac OS X. If your UPS requires explicitly setting +the alternate interface, include this flag, and email the nut-upsdev list with +details about your UPS and operating system. + *default.*:: Optional. Set a default value for which is used in case the UPS diff --git a/docs/man/upsc.8 b/docs/man/upsc.8 index dab4787..1914da4 100644 --- a/docs/man/upsc.8 +++ b/docs/man/upsc.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsc .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSC" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSC" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_add_host_cert.3 b/docs/man/upscli_add_host_cert.3 index ae8d6f1..aff4f80 100644 --- a/docs/man/upscli_add_host_cert.3 +++ b/docs/man/upscli_add_host_cert.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_add_host_cert .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_ADD_HOST_CERT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_ADD_HOST_CERT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_cleanup.3 b/docs/man/upscli_cleanup.3 index 6364c26..4ed07ef 100644 --- a/docs/man/upscli_cleanup.3 +++ b/docs/man/upscli_cleanup.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_cleanup .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_CLEANUP" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_CLEANUP" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_connect.3 b/docs/man/upscli_connect.3 index f5743bc..bf5e5ff 100644 --- a/docs/man/upscli_connect.3 +++ b/docs/man/upscli_connect.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_connect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_CONNECT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_CONNECT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_disconnect.3 b/docs/man/upscli_disconnect.3 index fff9b19..05dd513 100644 --- a/docs/man/upscli_disconnect.3 +++ b/docs/man/upscli_disconnect.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_disconnect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_DISCONNECT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_DISCONNECT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_fd.3 b/docs/man/upscli_fd.3 index 338eca3..9efb4cf 100644 --- a/docs/man/upscli_fd.3 +++ b/docs/man/upscli_fd.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_fd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_FD" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_FD" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_get.3 b/docs/man/upscli_get.3 index 8c88bd3..590711f 100644 --- a/docs/man/upscli_get.3 +++ b/docs/man/upscli_get.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_get .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_GET" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_GET" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,8 +36,8 @@ upscli_get \- retrieve data from a UPS .fi .sp .nf -int upscli_get(UPSCONN_t *ups, int numq, const char **query, - int *numa, char ***answer) +int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) .fi .SH "DESCRIPTION" .sp @@ -121,7 +121,7 @@ To generate a request for GET NUMLOGINS su700, you would populate query and numq .RS 4 .\} .nf -int numq; +unsigned int numq; const char *query[2]; .fi .if n \{\ @@ -149,6 +149,16 @@ The raw response from upsd to the above query would be NUMLOGINS su700 1\&. Sinc .RS 4 .\} .nf +unsigned int numa; +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf numa = 3; answer[0] = "NUMLOGINS" answer[1] = "su700" @@ -174,6 +184,21 @@ The array will be deleted after calling \fBupscli_disconnect\fR(3)\&. Any access .SH "RETURN VALUE" .sp The \fBupscli_get()\fR function returns 0 on success, or \-1 if an error occurs\&. +.sp +If \fBupsd\fR disconnects, you may need to handle or ignore SIGPIPE in order to prevent your program from terminating the next time that the library writes to the disconnected socket\&. The following code in your initialization function will allow the \fBupscli_get()\fR call to return an error in that case: +.sp +.if n \{\ +.RS 4 +.\} +.nf +#include +\&.\&.\&. +signal (SIGPIPE, SIG_IGN); +\&.\&.\&. +.fi +.if n \{\ +.RE +.\} .SH "SEE ALSO" .sp \fBupscli_list_start\fR(3), \fBupscli_list_next\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_get.txt b/docs/man/upscli_get.txt index 00aea76..71cdf1a 100644 --- a/docs/man/upscli_get.txt +++ b/docs/man/upscli_get.txt @@ -10,8 +10,8 @@ SYNOPSIS #include - int upscli_get(UPSCONN_t *ups, int numq, const char **query, - int *numa, char ***answer) + int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) DESCRIPTION ----------- @@ -43,7 +43,7 @@ QUERY FORMATTING To generate a request for `GET NUMLOGINS su700`, you would populate query and numq as follows: - int numq; + unsigned int numq; const char *query[2]; query[0] = "NUMLOGINS"; @@ -58,6 +58,8 @@ ANSWER FORMATTING The raw response from upsd to the above query would be `NUMLOGINS su700 1`. Since this is split up for you, the values work out like this: + unsigned int numa; + numa = 3; answer[0] = "NUMLOGINS" answer[1] = "su700" @@ -96,6 +98,16 @@ RETURN VALUE The *upscli_get()* function returns 0 on success, or -1 if an error occurs. +If *upsd* disconnects, you may need to handle or ignore `SIGPIPE` in order to +prevent your program from terminating the next time that the library writes to +the disconnected socket. The following code in your initialization function +will allow the *upscli_get()* call to return an error in that case: + + #include + ... + signal (SIGPIPE, SIG_IGN); + ... + SEE ALSO -------- linkman:upscli_list_start[3], linkman:upscli_list_next[3], diff --git a/docs/man/upscli_init.3 b/docs/man/upscli_init.3 index 9a666a0..67afe20 100644 --- a/docs/man/upscli_init.3 +++ b/docs/man/upscli_init.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_init .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_INIT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_INIT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_list_next.3 b/docs/man/upscli_list_next.3 index 6e64479..00a231d 100644 --- a/docs/man/upscli_list_next.3 +++ b/docs/man/upscli_list_next.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_list_next .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_LIST_NEXT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_LIST_NEXT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,8 +36,8 @@ upscli_list_next \- retrieve list items from a UPS .fi .sp .nf -int upscli_list_next(UPSCONN_t *ups, int numq, const char **query, - int *numa, char ***answer) +int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) .fi .SH "DESCRIPTION" .sp diff --git a/docs/man/upscli_list_next.txt b/docs/man/upscli_list_next.txt index 30fc7b3..20c1174 100644 --- a/docs/man/upscli_list_next.txt +++ b/docs/man/upscli_list_next.txt @@ -11,8 +11,8 @@ SYNOPSIS #include - int upscli_list_next(UPSCONN_t *ups, int numq, const char **query, - int *numa, char ***answer) + int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) DESCRIPTION ----------- diff --git a/docs/man/upscli_list_start.3 b/docs/man/upscli_list_start.3 index 9b66ccf..e26f750 100644 --- a/docs/man/upscli_list_start.3 +++ b/docs/man/upscli_list_start.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_list_start .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_LIST_START" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_LIST_START" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,7 +33,10 @@ upscli_list_start \- begin multi\-item retrieval from a UPS .sp .nf #include -int upscli_list_start(UPSCONN_t *ups, int numq, const char **query) +.fi +.sp +.nf +int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query) .fi .SH "DESCRIPTION" .sp @@ -117,7 +120,7 @@ To see the list of variables on a UPS called \fIsu700\fR, the protocol command w .RS 4 .\} .nf -int numq; +unsigned int numq; const char *query[2]; .fi .if n \{\ diff --git a/docs/man/upscli_list_start.txt b/docs/man/upscli_list_start.txt index e041934..e425f9e 100644 --- a/docs/man/upscli_list_start.txt +++ b/docs/man/upscli_list_start.txt @@ -10,7 +10,8 @@ SYNOPSIS -------- #include - int upscli_list_start(UPSCONN_t *ups, int numq, const char **query) + + int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query) DESCRIPTION ----------- @@ -46,7 +47,7 @@ To see the list of variables on a UPS called 'su700', the protocol command would be `LIST VAR su700`. To start that list with this function, you would populate query and numq as follows: - int numq; + unsigned int numq; const char *query[2]; query[0] = "VAR"; diff --git a/docs/man/upscli_readline.3 b/docs/man/upscli_readline.3 index 925d683..523bbdc 100644 --- a/docs/man/upscli_readline.3 +++ b/docs/man/upscli_readline.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_readline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_READLINE" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_READLINE" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_sendline.3 b/docs/man/upscli_sendline.3 index 1f54d10..61bfac1 100644 --- a/docs/man/upscli_sendline.3 +++ b/docs/man/upscli_sendline.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_sendline .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_SENDLINE" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_SENDLINE" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitaddr.3 b/docs/man/upscli_splitaddr.3 index 1db69f3..ec231d7 100644 --- a/docs/man/upscli_splitaddr.3 +++ b/docs/man/upscli_splitaddr.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_splitaddr .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_SPLITADDR" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_SPLITADDR" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitname.3 b/docs/man/upscli_splitname.3 index 2dc54da..bfd993b 100644 --- a/docs/man/upscli_splitname.3 +++ b/docs/man/upscli_splitname.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_splitname .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_SPLITNAME" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_SPLITNAME" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_ssl.3 b/docs/man/upscli_ssl.3 index 2460c43..a5b5bc1 100644 --- a/docs/man/upscli_ssl.3 +++ b/docs/man/upscli_ssl.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_ssl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_SSL" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_SSL" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_strerror.3 b/docs/man/upscli_strerror.3 index 28069f8..af15ed9 100644 --- a/docs/man/upscli_strerror.3 +++ b/docs/man/upscli_strerror.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_strerror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_STRERROR" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_STRERROR" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_upserror.3 b/docs/man/upscli_upserror.3 index bcfb5a3..b2f2d9c 100644 --- a/docs/man/upscli_upserror.3 +++ b/docs/man/upscli_upserror.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_upserror .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLI_UPSERROR" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLI_UPSERROR" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsclient.3 b/docs/man/upsclient.3 index 3f822f8..8583d22 100644 --- a/docs/man/upsclient.3 +++ b/docs/man/upsclient.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upsclient .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCLIENT" "3" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCLIENT" "3" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscmd.8 b/docs/man/upscmd.8 index d21afa1..f86c873 100644 --- a/docs/man/upscmd.8 +++ b/docs/man/upscmd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upscmd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCMD" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCMD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscode2.8 b/docs/man/upscode2.8 index 1ea0a85..3163168 100644 --- a/docs/man/upscode2.8 +++ b/docs/man/upscode2.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upscode2 .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSCODE2" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSCODE2" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.8 b/docs/man/upsd.8 index 026be3d..5c81855 100644 --- a/docs/man/upsd.8 +++ b/docs/man/upsd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsd .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSD" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSD" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsd.conf.5 b/docs/man/upsd.conf.5 index 7e13883..24dc318 100644 --- a/docs/man/upsd.conf.5 +++ b/docs/man/upsd.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsd.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSD\&.CONF" "5" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSD\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -110,7 +110,6 @@ When compiled with SSL support with NSS backend and client certificate validatio .sp -1 .IP \(bu 2.3 .\} - \fI0\fR to not request to clients to provide any certificate .RE @@ -123,7 +122,6 @@ to not request to clients to provide any certificate .sp -1 .IP \(bu 2.3 .\} - \fI1\fR to require to all clients a certificate .RE @@ -136,7 +134,6 @@ to require to all clients a certificate .sp -1 .IP \(bu 2.3 .\} - \fI2\fR to require to all clients a valid certificate .RE diff --git a/docs/man/upsd.users.5 b/docs/man/upsd.users.5 index ee73e73..7367139 100644 --- a/docs/man/upsd.users.5 +++ b/docs/man/upsd.users.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsd.users .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSD\&.USERS" "5" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSD\&.USERS" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsdrvctl.8 b/docs/man/upsdrvctl.8 index a8610d8..ae4e846 100644 --- a/docs/man/upsdrvctl.8 +++ b/docs/man/upsdrvctl.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsdrvctl .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSDRVCTL" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSDRVCTL" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsimage.cgi.8 b/docs/man/upsimage.cgi.8 index 8847895..6464d23 100644 --- a/docs/man/upsimage.cgi.8 +++ b/docs/man/upsimage.cgi.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsimage.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 03/21/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSIMAGE\&.CGI" "8" "03/21/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSIMAGE\&.CGI" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upslog.8 b/docs/man/upslog.8 index 1f3da75..a79cf23 100644 --- a/docs/man/upslog.8 +++ b/docs/man/upslog.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upslog .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSLOG" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSLOG" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -138,6 +138,9 @@ is not defined, it will use the value that was compiled into the program\&. This .SH "SERVICE DELAYS" .sp The interval value is merely the number given to \fBsleep\fR(3) after running through the format string\&. Therefore, a query will actually take slightly longer than the interval, depending on the speed of your system\&. +.SH "ON-DEMAND LOGGING" +.sp +Sending a USR1 signal to a running \fBupslog\fR process makes it wake from the current sleep and log immediately\&. This is useful when triggered from a \fBupssched\fR event trigger (e\&.g\&. AT ONBATT or AT ONLINE) to ensure that an entry always exists, even if the power goes away for a period of time shorter than that specified by the \-i argument\&. .SH "LOG ROTATION" .sp \fBupslog\fR writes its PID to upslog\&.pid, and will reopen the log file if you send it a SIGHUP\&. This allows it to keep running when the log is rotated by an external program\&. @@ -147,7 +150,7 @@ The interval value is merely the number given to \fBsleep\fR(3) after running th \fBupsd\fR(8) .SS "Clients:" .sp -\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupsmon\fR(8) +\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupsmon\fR(8), \fBupssched\fR(8) .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upslog.txt b/docs/man/upslog.txt index b3603d8..4571cc3 100644 --- a/docs/man/upslog.txt +++ b/docs/man/upslog.txt @@ -86,6 +86,16 @@ The interval value is merely the number given to *sleep*(3) after running through the format string. Therefore, a query will actually take slightly longer than the interval, depending on the speed of your system. +ON-DEMAND LOGGING +----------------- + +Sending a USR1 signal to a running *upslog* process makes it wake from the +current sleep and log immediately. This is useful when triggered from a +*upssched* event trigger (e.g. `AT ONBATT` or `AT ONLINE`) to ensure that an +entry always exists, even if the power goes away for a period of time shorter +than that specified by the `-i` argument. + + LOG ROTATION ------------ @@ -103,7 +113,7 @@ linkman:upsd[8] Clients: ~~~~~~~~ linkman:upsc[8], linkman:upscmd[8], -linkman:upsrw[8], linkman:upsmon[8] +linkman:upsrw[8], linkman:upsmon[8], linkman:upssched[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ diff --git a/docs/man/upsmon.8 b/docs/man/upsmon.8 index 7830762..9421226 100644 --- a/docs/man/upsmon.8 +++ b/docs/man/upsmon.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsmon .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSMON" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSMON" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -233,7 +233,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - NOTIFYFLAG ONLINE SYSLOG .RE .sp @@ -245,7 +244,6 @@ NOTIFYFLAG ONLINE SYSLOG .sp -1 .IP \(bu 2.3 .\} - NOTIFYFLAG ONBATT SYSLOG+WALL .RE .sp @@ -257,7 +255,6 @@ NOTIFYFLAG ONBATT SYSLOG+WALL .sp -1 .IP \(bu 2.3 .\} - NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC .RE .sp @@ -301,7 +298,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - NOTIFYMSG ONLINE "UPS %s is getting line power" .RE .sp diff --git a/docs/man/upsmon.conf.5 b/docs/man/upsmon.conf.5 index 9c7b002..d2e3526 100644 --- a/docs/man/upsmon.conf.5 +++ b/docs/man/upsmon.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsmon.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSMON\&.CONF" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSMON\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -339,7 +339,9 @@ if it exists\&. .sp This is done to forcibly reset the slaves, so they don\(cqt get stuck at the "halted" stage even if the power returns during the shutdown process\&. This usually does not work well on contact\-closure UPSes that use the genericups driver\&. .sp -See the shutdown\&.txt file in the docs subdirectory for more information\&. +See the config\-notes\&.txt file in the docs subdirectory for more information\&. Refer to the section: + +"Configuring automatic shutdowns for low battery events", or refer to the online version\&. .RE .PP \fBRBWARNTIME\fR \fIseconds\fR diff --git a/docs/man/upsmon.conf.txt b/docs/man/upsmon.conf.txt index 4ae285b..fccf495 100644 --- a/docs/man/upsmon.conf.txt +++ b/docs/man/upsmon.conf.txt @@ -275,7 +275,10 @@ the "halted" stage even if the power returns during the shutdown process. This usually does not work well on contact-closure UPSes that use the genericups driver. + -See the shutdown.txt file in the docs subdirectory for more information. +See the config-notes.txt file in the docs subdirectory for more information. +Refer to the section: +[[UPS_shutdown]] "Configuring automatic shutdowns for low battery events", +or refer to the online version. *RBWARNTIME* 'seconds':: diff --git a/docs/man/upsrw.8 b/docs/man/upsrw.8 index 280505d..ed61839 100644 --- a/docs/man/upsrw.8 +++ b/docs/man/upsrw.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsrw .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSRW" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSRW" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.8 b/docs/man/upssched.8 index 05b759a..0c3f838 100644 --- a/docs/man/upssched.8 +++ b/docs/man/upssched.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upssched .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSCHED" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSCHED" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.conf.5 b/docs/man/upssched.conf.5 index 0483b31..8770d33 100644 --- a/docs/man/upssched.conf.5 +++ b/docs/man/upssched.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upssched.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSCHED\&.CONF" "5" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSCHED\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.cgi.8 b/docs/man/upsset.cgi.8 index b5b563a..d74c140 100644 --- a/docs/man/upsset.cgi.8 +++ b/docs/man/upsset.cgi.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsset.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSET\&.CGI" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSET\&.CGI" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.conf.5 b/docs/man/upsset.conf.5 index 87a5601..4292322 100644 --- a/docs/man/upsset.conf.5 +++ b/docs/man/upsset.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsset.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSET\&.CONF" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSET\&.CONF" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.8 index 1458bad..4a2aea9 100644 --- a/docs/man/upsstats.cgi.8 +++ b/docs/man/upsstats.cgi.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsstats.cgi .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSTATS\&.CGI" "8" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSTATS\&.CGI" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.html.5 b/docs/man/upsstats.html.5 index e9639ca..0864821 100644 --- a/docs/man/upsstats.html.5 +++ b/docs/man/upsstats.html.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsstats.html .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/25/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "UPSSTATS\&.HTML" "5" "02/25/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "UPSSTATS\&.HTML" "5" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/usbhid-ups.8 b/docs/man/usbhid-ups.8 index 6fd4034..0972045 100644 --- a/docs/man/usbhid-ups.8 +++ b/docs/man/usbhid-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: usbhid-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "USBHID\-UPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "USBHID\-UPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -103,7 +103,7 @@ some Belkin models, .sp -1 .IP \(bu 2.3 .\} -some Cyber Power Systems models\&. +some Cyber Power Systems models, .RE .sp .RS 4 @@ -114,7 +114,18 @@ some Cyber Power Systems models\&. .sp -1 .IP \(bu 2.3 .\} -some TrippLite models +some Powercom models, +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +some TrippLite models\&. .RE .sp For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/drivers\&.list, or on the NUT website\&. You may use the "explore" driver option to gather information from HID UPSes which are not yet supported; see below for details\&. @@ -223,7 +234,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendor="Foo\&.Corporation\&.*" .RE .sp @@ -235,7 +245,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x vendorid=051d* (APC) .RE @@ -248,7 +257,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} - \-x product="\&.*(Smart|Back)\-?UPS\&.*" .RE .RE @@ -267,6 +275,16 @@ With this option, the driver will connect to any device, including ones that are .RS 4 With this option, the driver activates a tweak to workaround buggy firmware returning invalid HID report length\&. Some APC Back\-UPS units are known to have this bug\&. .RE +.PP +\fBinterruptonly\fR +.RS 4 +If this flag is set, the driver will not poll UPS\&. This also implies using of INPUT flagged objects\&. Some Powercom units need this option\&. +.RE +.PP +\fBinterruptsize\fR=\fInum\fR +.RS 4 +Limit the number of bytes to read from interrupt pipe\&. For some Powercom units this option should be equal to 8\&. +.RE .SH "INSTALLATION" .sp This driver is not built by default\&. You can build it by using "configure \-\-with\-usb=yes"\&. Note that it will also install other USB drivers\&. diff --git a/docs/man/usbhid-ups.txt b/docs/man/usbhid-ups.txt index 1f6f729..a125837 100644 --- a/docs/man/usbhid-ups.txt +++ b/docs/man/usbhid-ups.txt @@ -31,8 +31,9 @@ At the present time, usbhid-ups supports: - all Dell USB models, - some APC models, - some Belkin models, - - some Cyber Power Systems models. - - some TrippLite models + - some Cyber Power Systems models, + - some Powercom models, + - some TrippLite models. For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/drivers.list, or on the @@ -120,6 +121,14 @@ With this option, the driver activates a tweak to workaround buggy firmware returning invalid HID report length. Some APC Back-UPS units are known to have this bug. +*interruptonly*:: +If this flag is set, the driver will not poll UPS. This also implies using of +INPUT flagged objects. Some Powercom units need this option. + +*interruptsize*='num':: +Limit the number of bytes to read from interrupt pipe. For some Powercom units +this option should be equal to 8. + INSTALLATION ------------ diff --git a/docs/man/victronups.8 b/docs/man/victronups.8 index 6934487..d400151 100644 --- a/docs/man/victronups.8 +++ b/docs/man/victronups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: victronups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 02/15/2014 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 04/17/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.7.1.5 +.\" Source: Network UPS Tools 2.7.3 .\" Language: English .\" -.TH "VICTRONUPS" "8" "02/15/2014" "Network UPS Tools 2\&.7\&.1\&." "NUT Manual" +.TH "VICTRONUPS" "8" "04/17/2015" "Network UPS Tools 2\&.7\&.3" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/new-drivers.txt b/docs/new-drivers.txt index bdd5084..9145f49 100644 --- a/docs/new-drivers.txt +++ b/docs/new-drivers.txt @@ -1,15 +1,15 @@ Creating a new driver to support another device =============================================== -This chapter will present the process to create a new driver to support +This chapter will present the process of creating a new driver to support another device. -Since NUT already supports all major power devices protocols, through -several generic drivers (genericups, usbhid-ups, snmp-ups, blazer_*, ...), -creation of new drivers has become rare. +Since NUT already supports many major power devices protocols through +several generic drivers (genericups, usbhid-ups, snmp-ups, blazer_* and +nutdrv_qx), creation of new drivers has become rare. So most of the time, it will be limited to completing one of these -generic driver. +generic drivers. Smart vs. Contact-closure ------------------------- @@ -698,6 +698,26 @@ latter accepts either "\n", "\n\r" or "\r\n" as line termination. You can define other termination characters as well, but can't undefine "\r" and "\n" (so if you need these as data, this is not for you). +Adding the driver into the tree +------------------------------- + +In order to build your new driver, it needs to be added to +`drivers/Makefile.am`. At the moment, there are several driver list variables +corresponding to the general protocol of the driver (`SERIAL_DRIVERLIST`, +`SNMP_DRIVERLIST`, etc.). If your driver does not fit into one of these +categories, please discuss it on the nut-upsdev mailing list. + +There are also `*_SOURCES` and optional `*_LDADD` variables to list the source +files, and any additional linker flags. If your driver uses the C math +library, be sure to add `-lm`, since this flag is not always included by +default on embedded systems. + +When you add a driver to one of these lists, pay attention to the backslash +continuation characters (`\\`) at the end of the lines. + +The `automake` program converts the `Makefile.am` files into `Makefile.in` +files to be processed by `./configure`. See the discussion in <> +about automating the rebuild process for these files. [[contact-closure]] diff --git a/docs/nut-names.txt b/docs/nut-names.txt index ebee1fe..cb81b7b 100644 --- a/docs/nut-names.txt +++ b/docs/nut-names.txt @@ -122,7 +122,7 @@ ups: General unit information NOTE: When present, the value of *ups.start.auto* has an impact on shutdown.* commands. For the sake of coherence, shutdown commands will set *ups.start.auto* -to the right value before issuing the command. Ie, shutdown.stayoff will first +to the right value before issuing the command. That is, shutdown.stayoff will first set *ups.start.auto* to *no*, while shutdown.return will set it to *yes*. input: Incoming line/power information @@ -136,6 +136,8 @@ input: Incoming line/power information | input.voltage.minimum | Minimum incoming voltage seen | 100 | input.voltage.nominal | Nominal input voltage | 120 | input.voltage.extended | Extended input voltage range | no +| input.transfer.delay | Delay before transfer to mains + (seconds) | 60 | input.transfer.reason | Reason for last transfer to battery (*** opaque) | T | input.transfer.low | Low voltage transfer point | 91 @@ -167,9 +169,14 @@ input: Incoming line/power information transfer point | 230 | input.transfer.trim.high | High voltage trimming transfer point | 240 +| input.load | Load on (ePDU) input (percent + of full) | 25 +| input.realpower | Current sum value of all (ePDU) + phases real power (W) | 300 +| input.power | Current sum value of all (ePDU) + phases apparent power (VA) | 500 |=============================================================================== - output: Outgoing power/inverter information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -239,14 +246,14 @@ Valid CONTEXTs L3-N / L1 \ - L2 for currrent and power measurements + L2 for current and power measurements L3 / N - for current measurement Valid SPECs ^^^^^^^^^^^ -Valid with/without context (ie. per phase or aggregated/averaged) +Valid with/without context (i.e. per phase or aggregated/averaged) [options="header"] |=============================================================================== @@ -268,15 +275,18 @@ Valid with/without context (ie. per phase or aggregated/averaged) | realpower | Real power (W) | powerfactor | Power Factor (dimensionless value between 0.00 and 1.00) | crestfactor | Crest Factor (dimensionless value greater or equal to 1) +| load | Load on (ePDU) input |=============================================================================== -Valid without context (ie. aggregation of all phases): +Valid without context (i.e. aggregation of all phases): [options="header"] |=============================================================================== | Name | Description | frequency | Frequency (Hz) | frequency.nominal | Nominal frequency (Hz) +| realpower | Current value of real power (Watts) +| power | Current value of apparent power (Volt-Amps) |=============================================================================== EXAMPLES @@ -309,41 +319,47 @@ battery: Any battery details [options="header"] |=============================================================================== -| Name | Description | Example value -| battery.charge | Battery charge (percent) | 100.0 -| battery.charge.low | Remaining battery level when - UPS switches to LB (percent) | 20 -| battery.charge.restart | Minimum battery level for - UPS restart after power-off | 20 -| battery.charge.warning | Battery level when UPS switches - to "Warning" state (percent) | 50 -| battery.voltage | Battery voltage (V) | 24.84 -| battery.voltage.nominal | Nominal battery voltage (V) | 024 -| battery.voltage.low | Minimum battery voltage, that - triggers FSD status | 21,52 -| battery.voltage.high | Maximum battery voltage - (Ie battery.charge = 100) | 26,9 -| battery.capacity | Battery capacity (Ah) | 7.2 -| battery.current | Battery current (A) | 1.19 -| battery.current.total | Total battery current (A) | 1.19 -| battery.temperature | Battery temperature (degrees C) | 050.7 -| battery.runtime | Battery runtime (seconds) | 1080 -| battery.runtime.low | Remaining battery runtime when - UPS switches to LB (seconds) | 180 -| battery.runtime.restart | Minimum battery runtime for UPS - restart after power-off (seconds) | 120 -| battery.alarm.threshold | Battery alarm threshold | 0 (immediate) -| battery.date | Battery change date (opaque string) | 11/14/00 -| battery.mfr.date | Battery manufacturing date - (opaque string) | 2005/04/02 -| battery.packs | Number of battery packs | 001 -| battery.packs.bad | Number of bad battery packs | 000 -| battery.type | Battery chemistry (opaque - string) | PbAc -| battery.protection | Prevent deep discharge of - battery | yes -| battery.energysave | Switch off when running on - battery and no/low load | no +| Name | Description | Example value +| battery.charge | Battery charge (percent) | 100.0 +| battery.charge.low | Remaining battery level when + UPS switches to LB (percent) | 20 +| battery.charge.restart | Minimum battery level for + UPS restart after power-off | 20 +| battery.charge.warning | Battery level when UPS switches + to "Warning" state (percent) | 50 +| battery.voltage | Battery voltage (V) | 24.84 +| battery.voltage.nominal | Nominal battery voltage (V) | 024 +| battery.voltage.low | Minimum battery voltage, that + triggers FSD status | 21,52 +| battery.voltage.high | Maximum battery voltage + (i.e. battery.charge = 100) | 26,9 +| battery.capacity | Battery capacity (Ah) | 7.2 +| battery.current | Battery current (A) | 1.19 +| battery.current.total | Total battery current (A) | 1.19 +| battery.temperature | Battery temperature (degrees C) | 050.7 +| battery.runtime | Battery runtime (seconds) | 1080 +| battery.runtime.low | Remaining battery runtime when + UPS switches to LB (seconds) | 180 +| battery.runtime.restart | Minimum battery runtime for UPS + restart after power-off (seconds) | 120 +| battery.alarm.threshold | Battery alarm threshold | 0 (immediate) +| battery.date | Battery change date (opaque string) | 11/14/00 +| battery.mfr.date | Battery manufacturing date + (opaque string) | 2005/04/02 +| battery.packs | Number of battery packs | 001 +| battery.packs.bad | Number of bad battery packs | 000 +| battery.type | Battery chemistry (opaque + string) | PbAc +| battery.protection | Prevent deep discharge of + battery | yes +| battery.energysave | Switch off when running on + battery and no/low load | no +| battery.energysave.load | Switch off UPS if on battery and + load level lower (percent) | 5 +| battery.energysave.delay | Delay before switch off UPS if on + battery and load level low (min) | 3 +| battery.energysave.realpower | Switch off UPS if on battery + and load level lower (Watts) | 10 |=============================================================================== @@ -508,4 +524,5 @@ Instant commands | outlet.n.load.off | Turn off the outlet immediately | outlet.n.load.on | Turn on the outlet immediately | outlet.n.load.cycle | Power cycle the outlet immediately +| outlet.n.shutdown.return | Turn off the outlet and return when power is back |======================================================================== diff --git a/docs/nut-qa.txt b/docs/nut-qa.txt index 604e101..ebf256f 100644 --- a/docs/nut-qa.txt +++ b/docs/nut-qa.txt @@ -78,7 +78,7 @@ mailing list, and fixed quickly. - a project portal with trackers for bugs, feature request, patchs and tasks -NUT QA also relies on external tools, like: +NUT QA also relies on external tools and trackers, like: //////////////////////////////////////////////////////////////////////////////// FIXME (POST): @@ -91,7 +91,7 @@ FIXME (POST): //////////////////////////////////////////////////////////////////////////////// - Clang -- the Debian QA tools, available through the link:http://packages.qa.debian.org/n/nut.html[NUT Package Tracking System]: +- the Debian QA tools, available through the link:https://tracker.debian.org/pkg/nut[NUT Package Tracking System]: * Lintian general QA checks, * link:http://piuparts.debian.org/sid/source/n/nut.html[piuparts] automates @@ -104,6 +104,7 @@ is available in the link:https://code.edge.launchpad.net/qa-regression-testing[U It installs NUT, configures it with the dummy-ups driver, changes a few data and checks that these are well propagated with upsc. +- link:https://bugzilla.redhat.com/buglist.cgi?component=nut[Redhat / Fedora Bug tracker] Runtime quality ~~~~~~~~~~~~~~~ diff --git a/docs/nutdrv_qx-subdrivers.txt b/docs/nutdrv_qx-subdrivers.txt index 56d19f3..aa7fe50 100644 --- a/docs/nutdrv_qx-subdrivers.txt +++ b/docs/nutdrv_qx-subdrivers.txt @@ -85,7 +85,37 @@ String to match if the driver is expecting a reply from the UPS in case of error Note that this comparison is done on the answer we got back from the UPS before it has been processed, so include also the trailing carriage return (+\r+) and whatever character is expected. *+testing+*:: -Testing table that will hold the commands and the replies used for testing the subdriver. +Testing table (an array of +testing_t+) that will hold the commands and the replies used for testing the subdriver. ++ +-- ++testing_t+: + +---- +typedef struct { + const char *cmd; + const char answer[SMALLBUF]; + const int answer_len; +} testing_t; +---- + +Where: + +*+cmd+*:: +Command to match. + +*+answer+*:: +Answer for that command. ++ +NOTE: If +answer+ contains inner ++\0++s, in order to preserve them, +answer_len+ as well as an +item_t+'s +preprocess_answer()+ function must be set. + +*+answer_len+*:: +Answer length: ++ +- if set to +-1+ -> auto calculate answer length (treat +answer+ as a null-terminated string), +- otherwise -> use the provided length (if reasonable) and preserve inner ++\0++s (treat +answer+ as a sequence of bytes till the +item_t+'s +preprocess_answer()+ function gets called). + +For more informations, see <<_mapping_an_idiom_to_nut,Mapping an idiom to NUT>>. +-- Mapping an idiom to NUT @@ -107,6 +137,7 @@ typedef struct item_t { const int to; const char *dfl; unsigned long qxflags; + int (*preprocess_answer)(struct item_t *item, const int len); int (*preprocess)(struct item_t *item, char *value, size_t valuelen); } item_t; ---- @@ -155,6 +186,8 @@ Command sent to the UPS to get answer/to execute a instant command/to set a vari *+answer+*:: Answer from the UPS, filled at runtime. ++ +NOTE: If you expect a nonvalid C string (e.g.: inner ++\0++s) or need to perform actions before the answer is used (and treated as a null-terminated string), you should set a +preprocess_answer()+ function. *+answer_len+*:: Expected minimum length of the answer. @@ -164,7 +197,7 @@ Set it to +0+ if there's no minimum length to look after. Expected leading character of the answer (optional), e.g. +#+, +(+ ... *+value+*:: -Value from the answer, filled at runtime (i.e. +answer+ between +from+ and +to+). +Value from the answer, filled at runtime (i.e. +answer+ in the interval [+from+ to +to+]). *+from+*:: Position of the starting character of the info we're after in the answer. @@ -212,6 +245,11 @@ If there's a problem with a var in +QX_WALKMODE_INIT+, the driver will automagic ==== -- +*+preprocess_answer(item, len)+*:: +Function to preprocess the answer we got from the UPS before we do anything else (e.g. for CRC, decoding, ...). +This function is given the currently processed item (+item+) with the answer we got from the UPS unmolested and already stored in +item+'s +answer+ and the length of that answer (+len+). +Return +-1+ in case of errors, else the length of the newly allocated +item+'s +answer+ (from now on, treated as a null-terminated string). + *+preprocess(item, value, valuelen)+*:: Function to preprocess the data from/to the UPS: you are given the currently processed item (+item+), a char array (+value+) and its +size_t+ (+valuelen+). Return +-1+ in case of errors, else +0+. @@ -252,7 +290,7 @@ We know that when the UPS is queried for status with +QGS\r+, it replies with so Here's the +item_t+: ---- -{ "output.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 12, 16, "%.1f", 0, NULL }, +{ "output.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 12, 16, "%.1f", 0, NULL, NULL }, ---- [horizontal] @@ -295,6 +333,9 @@ Because of that we need to provide a floating point specifier. +qxflags+:: +0+ ++preprocess_answer+:: ++NULL+ + +preprocess+:: +NULL+ @@ -314,7 +355,7 @@ Also from +QGS\r+, we want to process the 9th status bit +10000000+*`0`*+001+ th Here's the +item_t+: ---- -{ "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 71, 71, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, +{ "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 71, 71, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, ---- [horizontal] @@ -357,6 +398,9 @@ Since a +preprocess+ function is defined for this item, this could have been +NU +QX_FLAG_QUICK_POLL+ -> this item will be polled every time the driver will check for updates. Since this item is mandatory to run the driver, if a problem arises in +QX_WALKMODE_INIT+ the driver won't skip it an it'll set +datastale+. ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_status+ + @@ -378,7 +422,8 @@ So your UPS reports its battery type when queried for +QBT\r+; we are expecting Here's the +item_t+: ---- -{ "battery.type", ST_FLAG_RW, voltronic_e_batt_type, "QBT\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_p31b }, +{ "battery.type", ST_FLAG_RW, voltronic_e_batt_type, "QBT\r", "", 4, '(', "", 1, 2, "%s", + QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_p31b }, ---- [horizontal] @@ -424,6 +469,9 @@ Since a +preprocess+ function is defined for this item, this could have been +NU + +QX_FLAG_ENUM+ -> this r/w variable is of the enumerated type and the enumerated values are listed in the +info_rw+ structure (i.e. +voltronic_e_batt_type+) ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_p31b+ + @@ -441,7 +489,8 @@ We also know that we can change battery type with the +PBTnn\r+ command; we are Here's the +item_t+: ---- -{ "battery.type", 0, voltronic_e_batt_type, "PBT%02.0f\r", "", 5, '(', "", 1, 4, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM, voltronic_p31b_set }, +{ "battery.type", 0, voltronic_e_batt_type, "PBT%02.0f\r", "", 5, '(', "", 1, 4, NULL, + QX_FLAG_SETVAR | QX_FLAG_ENUM, NULL, voltronic_p31b_set }, ---- [horizontal] @@ -485,6 +534,9 @@ Not used for +QX_FLAG_SETVAR+ + +QX_FLAG_ENUM+ -> this r/w variable is of the enumerated type and the enumerated values are listed in the +info_rw+ structure (i.e. +voltronic_e_batt_type+) ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_p31b_set+ + @@ -506,7 +558,7 @@ We know that we have to send to the UPS +Tnn\r+ or +T.n\r+ in order to start a b Here's the +item_t+: ---- -{ "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 4, NULL, QX_FLAG_CMD, voltronic_process_command }, +{ "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 4, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, ---- [horizontal] @@ -546,6 +598,9 @@ Not used for +QX_FLAG_CMD+ +qxflags+:: +QX_FLAG_CMD+ -> this item is an instant command that will be fired when +info_type+ (i.e. +test.battery.start+) is called ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_process_command+ + @@ -558,7 +613,8 @@ Informations absent in the device In order to set the server-side var +ups.delay.start+, that will be then used by the driver, we have to provide the following +item_t+: ---- -{ "ups.delay.start", ST_FLAG_RW, voltronic_r_ondelay, NULL, "", 0, 0, "", 0, 0, "180", QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, +{ "ups.delay.start", ST_FLAG_RW, voltronic_r_ondelay, NULL, "", 0, 0, "", 0, 0, "180", + QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, ---- [horizontal] @@ -605,6 +661,9 @@ Not used for +QX_FLAG_ABSENT+ + +QX_FLAG_RANGE+ -> this r/w variable has a settable range and its boundaries are listed in the +info_rw+ structure (i.e. +voltronic_r_ondelay+) ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_process_setvar+ + @@ -628,7 +687,8 @@ So we know that the UPS reports actual input/output phase angles when queried fo Here's the +item_t+ for input phase angle: ---- -{ "input_phase_angle", 0, NULL, "QPD\r", "", 9, '(', "", 1, 3, "%03.0f", QX_FLAG_STATIC | QX_FLAG_NONUT, voltronic_phase }, +{ "input_phase_angle", 0, NULL, "QPD\r", "", 9, '(', "", 1, 3, "%03.0f", + QX_FLAG_STATIC | QX_FLAG_NONUT, NULL, voltronic_phase }, ---- [horizontal] @@ -675,6 +735,9 @@ Here instead it's used by the +preprocess+ function. + +QX_FLAG_NONUT+ -> this item doesn't have yet a NUT variable ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_phase+ + @@ -683,7 +746,8 @@ This function will be called *after* the +command+ has been sent to the UPS so t Here's the +item_t+ for output phase angle: ---- -{ "output_phase_angle", ST_FLAG_RW, voltronic_e_phase, "QPD\r", "", 9, '(', "", 5, 7, "%03.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT, voltronic_phase }, +{ "output_phase_angle", ST_FLAG_RW, voltronic_e_phase, "QPD\r", "", 9, '(', "", 5, 7, "%03.0f", + QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT, NULL, voltronic_phase }, ---- [horizontal] @@ -737,6 +801,9 @@ Here instead it's used by the +preprocess+ function. + +QX_FLAG_NONUT+ -> this item doesn't have yet a NUT variable ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_phase+ + @@ -759,7 +826,8 @@ We know we can set output phase angle sending +PPDnnn\r+ to the UPS: Here's the +item_t+ ---- -{ "output_phase_angle", 0, voltronic_e_phase, "PPD%03.0f\r", "", 5, '(', "", 1, 4, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT, voltronic_phase_set }, +{ "output_phase_angle", 0, voltronic_e_phase, "PPD%03.0f\r", "", 5, '(', "", 1, 4, NULL, + QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT, NULL, voltronic_phase_set }, ---- [horizontal] @@ -809,6 +877,9 @@ Not used for +QX_FLAG_SETVAR+ + +QX_FLAG_NONUT+ -> this item doesn't have yet a NUT variable ++preprocess_answer+:: ++NULL+ + +preprocess+:: +voltronic_phase_set+ + @@ -838,7 +909,7 @@ Send +command+ or, if it is +NULL+, send the command stored in the +item+ to the Return +-1+ on errors, +0+ on success. *+int ups_infoval_set(item_t *item)+*:: -Process the value we got back from the UPS (set status bits and set the value of other parameters), calling its +preprocess+ function, if any. +Process the value we got back from the UPS (set status bits and set the value of other parameters), calling its +preprocess+ function, if any, otherwise executing the standard preprocessing (including trimming if +QX_FLAG_TRIM+ is set). Return +-1+ on failure, +0+ for a status update and +1+ in all other cases. *+int qx_status(void)+*:: @@ -860,6 +931,7 @@ You can then recompile +nutdrv_qx+, and start experimenting with the new subdriv For more informations, have a look at the currently available subdrivers: +- +nutdrv_qx_bestups.+{+c+,+h+} - +nutdrv_qx_mecer.+{+c+,+h+} - +nutdrv_qx_megatec.+{+c+,+h+} - +nutdrv_qx_megatec-old.+{+c+,+h+} @@ -867,5 +939,6 @@ For more informations, have a look at the currently available subdrivers: - +nutdrv_qx_q1.+{+c+,+h+} - +nutdrv_qx_voltronic.+{+c+,+h+} - +nutdrv_qx_voltronic-qs.+{+c+,+h+} +- +nutdrv_qx_voltronic-qs-hex.+{+c+,+h+} - +nutdrv_qx_zinto.+{+c+,+h+} diff --git a/docs/packager-guide.txt b/docs/packager-guide.txt index c6ea86b..2d40b83 100644 --- a/docs/packager-guide.txt +++ b/docs/packager-guide.txt @@ -35,7 +35,7 @@ support and maintenance accross the supported OSes. ------------------------------------------------------------------------ *sandbox* This document assumes that you have read the other NUT document such -as INSTALL.nut, FAQ, shutdown.txt, ... +as INSTALL.nut, FAQ, config-notes.txt, ... Facts about NUT packaging ========================= diff --git a/docs/scheduling.txt b/docs/scheduling.txt index 8bb2b91..922bea3 100644 --- a/docs/scheduling.txt +++ b/docs/scheduling.txt @@ -270,7 +270,7 @@ The design of the timer handler is also geared towards minimizing impact. It will come and go from the process list as necessary. When a new timer is started, a process will be forked to actually watch the clock and eventually start the CMDSCRIPT. When a timer triggers, it is removed from -the queue. Cancelling a timer will also remove it from the queue. When +the queue. Canceling a timer will also remove it from the queue. When no timers are present in the queue, the background process exits. This means that you will only see upssched running when one of two things diff --git a/docs/security.txt b/docs/security.txt index 808b26d..fd6b747 100644 --- a/docs/security.txt +++ b/docs/security.txt @@ -26,16 +26,24 @@ In order to verify the NUT source code signature for releases, perform the follo $ gpg --fetch-keys http://www.networkupstools.org/source/nut-key.gpg +NOTE: As of NUT 2.7.3, a new release key is used. In order to verify previous release, please use +link:http://www.networkupstools.org/source/nut-old-key.gpg[NUT old maintainer's signature] + - Launch the GPG checking using the following command: $ gpg --verify nut-X.Y.Z.tar.gz.sig - You should see a message mentioning a "Good signature", like: - gpg: Signature made Thu Jul 5 16:15:05 2007 CEST using DSA key ID 204DDF1B + gpg: Signature made Wed Apr 15 15:55:30 2015 CEST using RSA key ID 55CA5976 gpg: Good signature from "Arnaud Quette ..." ... +NOTE: the previously used maintainer's signature would output: ++ + gpg: Signature made Thu Jul 5 16:15:05 2007 CEST using DSA key ID 204DDF1B + gpg: Good signature from "Arnaud Quette ..." + ... System level privileges and ownership ------------------------------------- @@ -142,7 +150,7 @@ TCP Wrappers If the server is build with tcp-wrappers support enabled, it will check if the NUT username is allowed to connect from the client address through the -'/etc/hosts.allow' and '/etc/hosts.deny' files. +`/etc/hosts.allow` and `/etc/hosts.deny` files. NOTE: this will only be done for commands that require the user to be logged into the server. @@ -162,7 +170,7 @@ Further details are described in hosts_access(5). Configuring SSL --------------- -SSL is available as a build option ('--with-ssl'). +SSL is available as a build option (`--with-ssl`). It encrypts sessions between upsd and clients, and can also be used to authenticate servers. @@ -174,9 +182,9 @@ Several things must happen before this will work, however. This chapter will present these steps. SSL is available via two back-end libraries : NSS and OpenSSL (historically). -You can choose to use one of them by specifying it with abuild option -('--with-nss' or '--with-openssl'). If any is specified, configure script will -try to detect one of them and use it with a precedence for OpenSSL. +You can choose to use one of them by specifying it with a build option +(`--with-nss` or `--with-openssl`). If neither is specified, the configure +script will try to detect one of them, with a precedence for OpenSSL. OpenSSL backend usage ~~~~~~~~~~~~~~~~~~~~~ @@ -188,12 +196,13 @@ Install OpenSSL ^^^^^^^^^^^^^^^ Install link:http://www.openssl.org[OpenSSL] as usual, either from source -or binary packages including nss-tools. +or binary packages. If using binary packages, be sure to include the developer +libraries. Recompile and install NUT ^^^^^^^^^^^^^^^^^^^^^^^^^ -Recompile NUT from source, starting with 'configure --with-openssl'. +Recompile NUT from source, starting with `configure --with-openssl`. Then install everything as usual. @@ -207,7 +216,7 @@ Use the following command to create the certificate: openssl req -new -x509 -nodes -out upsd.crt -keyout upsd.key -You can also put a '-days nnn' in there to set the expiration. If +You can also put a `-days nnn` in there to set the expiration. If you skip this, it may default to 30 days. This is probably not what you want. @@ -271,7 +280,8 @@ hold of port 3493. Having it be owned by 'root' and readable by group 'nut' allows upsd to read the file without being able to change the contents. This -is done to minimize the impact if someone should break into upsd. +is done to minimize the impact if someone should break into upsd. NUT reads the +key and certificate files after dropping privileges and forking. Note on certification authorities (CAs) and signed keys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -340,7 +350,7 @@ Again in upsmon.conf: FORCESSL 1 -If you don't use 'CERTVERIFY 1', then this will at least make sure +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. @@ -355,12 +365,13 @@ Install NSS ^^^^^^^^^^^ Install link:http://www.mozilla.org/projects/security/pki/nss/[Mozilla NSS] as -usual, either from source or binary packages. +usual, either from source or binary packages. If using binary packages, be sure +to include the developer libraries, and nss-tools (for `certutil`). Recompile and install NUT ^^^^^^^^^^^^^^^^^^^^^^^^^ -Recompile NUT from source, starting with 'configure --with-nss'. +Recompile NUT from source, starting with `configure --with-nss`. Then install everything as usual. @@ -368,7 +379,7 @@ Create certificate and key for the host ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NSS (package generally called libnss3-tools) will install a tool called -'certutil'. +`certutil`. It will be used to generate certificates and manage certificate database. Certificates should be signed by a certification authorities (CAs). @@ -376,19 +387,19 @@ Following commands are typical samples, contact your SSL guru or security office to follow your company procedures. .Generate a server certificate for upsd: -- Create a directory where store the certificate database: 'mkdir cert_db' -- Create the certificate database : 'certutil -N -d cert_db' +- Create a directory where store the certificate database: `mkdir cert_db` +- Create the certificate database : `certutil -N -d cert_db` - Import the CA certificate: - 'certutil -A -d cert_db -n "My Root CA" -t "TC,," -a -i rootca.crt' + `certutil -A -d cert_db -n "My Root CA" -t "TC,," -a -i rootca.crt` - Create a server certificate request (here called 'My nut server'): - 'certutil -R -d cert_db -s "CN=My nut server,O=MyCompany,ST=MyState,C=US" -a -o server.req' + `certutil -R -d cert_db -s "CN=My nut server,O=MyCompany,ST=MyState,C=US" -a -o server.req` - Make your CA sign the certificate (produces server.crt) - Import the signed certificate into server database: - 'certutil -A -d cert_db -n "My nut server" -a -i server.crt -t ",,"' + `certutil -A -d cert_db -n "My nut server" -a -i server.crt -t ",,"` - Display the content of certificate server: - 'certutil -L -d cert_db' + `certutil -L -d cert_db` -Clients and servers in the same host could share the same certificate to authentify them +Clients and servers in the same host could share the same certificate to authenticate them or use different ones in same or different databases. The same operation can be done in same or different databases to generate other certificates. @@ -397,27 +408,27 @@ Create a self-signed CA certificate ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NSS provides a way to create self-signed certificate which can acting as -CA certificate and to sign other certificates with this CA certificate. -This method can be used to provide CA certification chain without passing -by an 'official' CA provider. +CA certificate, and to sign other certificates with this CA certificate. +This method can be used to provide a CA certification chain without using +an "official" certificate authority. .Generate a self-signed CA certificate: -- Create a directory where store the CA certificate database: 'mkdir CA_db' +- Create a directory where store the CA certificate database: `mkdir CA_db` - Create the certificate database: - 'certutil -N -d CA_db' + `certutil -N -d CA_db` - Generate a certificate for CA: - 'certutil -S -d CA_db -n "My Root CA" -s "CN=My CA,O=MyCompany,ST=MyState,C=US" -t "CT,," -x -2' -Do not forget to answer 'Yes' to the question 'Is this a CA certificate [y/N]?' + `certutil -S -d CA_db -n "My Root CA" -s "CN=My CA,O=MyCompany,ST=MyState,C=US" -t "CT,," -x -2` +(Do not forget to answer 'Yes' to the question 'Is this a CA certificate [y/N]?') - Extract the CA certificate to be able to import it in upsd (or upsmon) certificate database: - 'certutil -L -d CA_db -n "My Root CA" -a -o rootca.crt' + `certutil -L -d CA_db -n "My Root CA" -a -o rootca.crt` - Sign a certificate request with the CA certificate (simulate a real CA signature): - 'certutil -C -d CA_db -c "My Root CA" -a -i server.req -o server.crt -2 -6' + `certutil -C -d CA_db -c "My Root CA" -a -i server.req -o server.crt -2 -6` Install the server-side certificate ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Just copy the database directory (just the directory and included 3 -database .db files) at the right place like in '/usr/local/ups/etc/': +database .db files) to the right place, such as `/usr/local/ups/etc/`: mv cert_db /usr/local/ups/etc/ @@ -441,12 +452,12 @@ upsd (optional): client authentication ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NOTE: This functionality is disabled by default. To activate it, recompile -NUT with 'WITH_CLIENT_CERTIFICATE_VALIDATION' defined: +NUT with `WITH_CLIENT_CERTIFICATE_VALIDATION` defined: make CFLAGS="-DWITH_CLIENT_CERTIFICATE_VALIDATION" UPSD can accept three levels of client authentication. Just specify it with -the directive 'CERTREQUEST' with the corresponding value in the upsd.conf file: +the directive `CERTREQUEST` with the corresponding value in the upsd.conf file: - NO: no client authentication. - REQUEST: a certificate is request to the client but it is not strictly validated. @@ -465,36 +476,37 @@ In order for upsmon to securely connect to upsd, it must authenticate it. You must associate an upsd host name to security rules in upsmon.conf with the directive 'CERTHOST'. -'CERTHOST' associate to an hostname a certificate name and if a SSL connection -is mandatory and if its certificate must be validated. +'CERTHOST' associates a hostname to a certificate name. It also determines +whether a SSL connection is mandatory, and if the server certificate must be +validated. CERTHOST 'hostname' 'certificate name' 'certverify' 'forcessl' -If the flag 'forcessl' is set to '1' and the upsd answer that it can not -connect in SSL, the connection closes. -If the flag 'certverify' is set to '1' and the connection is done in ssl, +If the flag `forcessl` is set to `1`, and upsd answers that it can not +connect with SSL, the connection closes. +If the flag `certverify` is set to `1` and the connection is done in SSL, upsd's certificate is verified and its name must be the specified 'certificate name'. -To prevent security leaks, you should set all 'certverify' and 'forcessl' -flags to '1' (force SSL connection and validate all certificates for all +To prevent security leaks, you should set all `certverify` and `forcessl` +flags to `1` (force SSL connection and validate all certificates for all peers). -You can specify 'CERTVERIFY' and 'FORCESSL' directive (to '1' or '0') to +You can specify `CERTVERIFY` and `FORCESSL` directive (to `1` or `0`) to define a default security rule to apply to all host not specified with a -dedicated 'CERTHOST' directive. +dedicated `CERTHOST` directive. -If a host is not specified in a 'CERTHOST' directive, its expected certificate +If a host is not specified in a `CERTHOST` directive, its expected certificate name is its hostname. upsmon (optional): certificate database and self certificate ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Like upsd, upsmon may need to authenticate itself (upsd's 'CERTREQUEST' -directive set to 'REQUEST' or 'REQUIRE'). +Like upsd, upsmon may need to authenticate itself (upsd's `CERTREQUEST` +directive set to `REQUEST` or `REQUIRE`). It must access to a certificate (and its private key) in a certificate database -configuring 'CERTPATH' and 'CERTIDENT' in upsmon.conf in the same way than upsd. +configuring `CERTPATH` and `CERTIDENT` in upsmon.conf in the same way than upsd. CERTPATH /usr/local/ups/etc/cert_db CERTIDENT 'certificate name' 'database password' @@ -506,8 +518,9 @@ Restart upsd It should come back up without any complaints. If it says something about keys or certificates, then you probably missed a step. -If you run upsd as a separate user id (like nutsrv), make sure that -user can read files in certificate directory. +If you run upsd as a separate user ID (like nutsrv), make sure that +user can read files in the certificate directory. NUT reads the keys and +certificates after forking and dropping privileges. Restart upsmon ~~~~~~~~~~~~~~ @@ -516,7 +529,7 @@ You should see something like this in the syslog from upsd: foo upsd[1234]: Client mon@localhost logged in to UPS [myups] (SSL) -If upsd or upsmon give any error messages, or the (SSL) is missing, +If upsd or upsmon give any error messages, or the `(SSL)` is missing, then something isn't right. If in doubt about upsmon, start it with -D so it will stay in @@ -525,14 +538,14 @@ like this every couple of seconds: polling ups: myups@localhost [SSL] -Obviously, if the '[SSL]' isn't there, something's broken. +Obviously, if the `[SSL]` isn't there, something's broken. Recommended: sniff the connection to see it for yourself ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Using tcpdump, Wireshark (Ethereal), or another network sniffer tool, tell it to monitor port 3493/tcp and see what happens. You should only -see 'STARTTLS' go out, 'OK STARTTLS' come back, and the rest will be +see `STARTTLS` go out, `OK STARTTLS` come back, and the rest will be certificate data and then seemingly random characters. If you see any plaintext besides that (USERNAME, PASSWORD, etc.) @@ -561,7 +574,7 @@ pair using the procedure above. Conclusion ~~~~~~~~~~ -SSL support should be considered stable but purposely underdocumented +SSL support should be considered stable but purposely under-documented since various bits of the implementation or configuration may change in the future. In other words, if you use this and it stops working after an upgrade, come back to this file to find out what changed. @@ -583,7 +596,7 @@ license change. This is actually a feature, since it means nobody can unilaterally run off with the source - not even the NUT team. Note that the replacement of OpenSSL by Mozilla Network Security Services -(NSS) is scheduled in the future, to avoid the above licensing issues. +(NSS) should avoid the above licensing issues. chrooting and other forms of paranoia diff --git a/docs/xhtml.xsl b/docs/xhtml.xsl index b84425d..e8dc331 100644 --- a/docs/xhtml.xsl +++ b/docs/xhtml.xsl @@ -11,9 +11,4 @@ - - - - - diff --git a/drivers/Makefile.am b/drivers/Makefile.am index be71e91..bf36319 100644 --- a/drivers/Makefile.am +++ b/drivers/Makefile.am @@ -44,6 +44,7 @@ USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \ USB_DRIVERLIST = $(USB_LIBUSB_DRIVERLIST) NEONXML_DRIVERLIST = netxml-ups MACOSX_DRIVERLIST = macosx-ups +LINUX_I2C_DRIVERLIST = asem # distribute all drivers, even ones that are not built by default EXTRA_PROGRAMS = $(SERIAL_DRIVERLIST) $(SNMP_DRIVERLIST) $(USB_DRIVERLIST) $(NEONXML_DRIVERLIST) $(MACOSX_DRIVERLIST) @@ -74,6 +75,9 @@ endif if WITH_MACOSX driverexec_PROGRAMS += $(MACOSX_DRIVERLIST) endif +if WITH_LINUX_I2C + driverexec_PROGRAMS += $(LINUX_I2C_DRIVERLIST) +endif else driverexec_PROGRAMS += skel endif @@ -171,7 +175,7 @@ tripplite_usb_SOURCES = tripplite_usb.c libusb.c usb-common.c tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c usb-common.c -bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) +bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm @@ -219,6 +223,10 @@ macosx_ups_LDADD = $(LDADD_DRIVERS) macosx_ups_LDFLAGS = $(LDFLAGS) -framework IOKit -framework CoreFoundation macosx_ups_SOURCES = macosx-ups.c +# Asem +asem_LDADD = $(LDADD_DRIVERS) +asem_SOURCES = asem.c + # nutdrv_qx USB/Serial nutdrv_qx_SOURCES = nutdrv_qx.c nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm @@ -232,9 +240,10 @@ nutdrv_qx_CFLAGS += -DQX_USB nutdrv_qx_SOURCES += libusb.c usb-common.c nutdrv_qx_LDADD += $(LIBUSB_LIBS) endif -NUTDRV_QX_SUBDRIVERS = nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ - nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c nutdrv_qx_mustek.c \ - nutdrv_qx_q1.c nutdrv_qx_voltronic.c nutdrv_qx_voltronic-qs.c nutdrv_qx_zinto.c +NUTDRV_QX_SUBDRIVERS = nutdrv_qx_bestups.c nutdrv_qx_blazer-common.c \ + nutdrv_qx_mecer.c nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c \ + nutdrv_qx_mustek.c nutdrv_qx_q1.c nutdrv_qx_voltronic.c \ + nutdrv_qx_voltronic-qs.c nutdrv_qx_voltronic-qs-hex.c nutdrv_qx_zinto.c nutdrv_qx_SOURCES += $(NUTDRV_QX_SUBDRIVERS) # ---------------------------------------------------------------------- @@ -252,9 +261,9 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \ safenet.h serial.h snmp-ups.h solis.h tripplite.h tripplite-hid.h \ upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \ apcsmart.h apcsmart_tabs.h apcsmart-old.h apcupsd-ups.h cyberpower-mib.h riello.h openups-hid.h \ - delta_ups-mib.h nutdrv_qx.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ + delta_ups-mib.h nutdrv_qx.h nutdrv_qx_bestups.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ nutdrv_qx_megatec.h nutdrv_qx_megatec-old.h nutdrv_qx_mustek.h nutdrv_qx_q1.h \ - nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_zinto.h \ + nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_voltronic-qs-hex.h nutdrv_qx_zinto.h \ xppc-mib.h # Define a dummy library so that Automake builds rules for the diff --git a/drivers/Makefile.in b/drivers/Makefile.in index 11a9f93..6824bc3 100644 --- a/drivers/Makefile.in +++ b/drivers/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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. @@ -19,23 +18,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -65,12 +92,14 @@ EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4) \ @SOME_DRIVERS_FALSE@driverexec_PROGRAMS = $(am__EXEEXT_7) \ @SOME_DRIVERS_FALSE@ $(am__EXEEXT_8) $(am__EXEEXT_9) \ @SOME_DRIVERS_FALSE@ $(am__EXEEXT_10) $(am__EXEEXT_11) \ -@SOME_DRIVERS_FALSE@ $(am__EXEEXT_12) $(am__EXEEXT_13) +@SOME_DRIVERS_FALSE@ $(am__EXEEXT_12) $(am__EXEEXT_13) \ +@SOME_DRIVERS_FALSE@ $(am__EXEEXT_15) @SOME_DRIVERS_TRUE@driverexec_PROGRAMS = $(DRIVER_BUILD_LIST) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_7) $(am__EXEEXT_8) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_9) $(am__EXEEXT_10) \ @SOME_DRIVERS_TRUE@ $(am__EXEEXT_11) $(am__EXEEXT_12) \ -@SOME_DRIVERS_TRUE@ $(am__EXEEXT_13) skel$(EXEEXT) +@SOME_DRIVERS_TRUE@ $(am__EXEEXT_13) $(am__EXEEXT_15) \ +@SOME_DRIVERS_TRUE@ skel$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_6 = $(SERIAL_DRIVERLIST) @SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_7 = $(SNMP_DRIVERLIST) @SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_8 = $(USB_LIBUSB_DRIVERLIST) @@ -78,18 +107,19 @@ EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4) \ @SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_10 = powerman-pdu @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_11 = nut-ipmipsu @SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__append_12 = $(MACOSX_DRIVERLIST) +@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@am__append_13 = $(LINUX_I2C_DRIVERLIST) sbin_PROGRAMS = upsdrvctl$(EXEEXT) -@WITH_SSL_TRUE@am__append_13 = $(LIBSSL_CFLAGS) -@WITH_SSL_TRUE@am__append_14 = $(LIBSSL_LIBS) -@WITH_FREEIPMI_TRUE@am__append_15 = nut-libfreeipmi.c -@WITH_SERIAL_TRUE@am__append_16 = -DQX_SERIAL -@WITH_SERIAL_TRUE@am__append_17 = $(SERLIBS) serial.o -@WITH_USB_TRUE@am__append_18 = -DQX_USB -@WITH_USB_TRUE@am__append_19 = libusb.c usb-common.c -@WITH_USB_TRUE@am__append_20 = $(LIBUSB_LIBS) +@WITH_SSL_TRUE@am__append_14 = $(LIBSSL_CFLAGS) +@WITH_SSL_TRUE@am__append_15 = $(LIBSSL_LIBS) +@WITH_FREEIPMI_TRUE@am__append_16 = nut-libfreeipmi.c +@WITH_SERIAL_TRUE@am__append_17 = -DQX_SERIAL +@WITH_SERIAL_TRUE@am__append_18 = $(SERLIBS) serial.o +@WITH_USB_TRUE@am__append_19 = -DQX_USB +@WITH_USB_TRUE@am__append_20 = libusb.c usb-common.c +@WITH_USB_TRUE@am__append_21 = $(LIBUSB_LIBS) subdir = drivers -DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(dist_noinst_HEADERS) 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 \ @@ -119,6 +149,10 @@ CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libdummy_a_AR = $(AR) $(ARFLAGS) libdummy_a_LIBADD = am_libdummy_a_OBJECTS = main.$(OBJEXT) dstate.$(OBJEXT) \ @@ -155,6 +189,9 @@ am__EXEEXT_6 = macosx-ups$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__EXEEXT_12 = \ @SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@ nut-ipmipsu$(EXEEXT) @SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__EXEEXT_13 = $(am__EXEEXT_6) +am__EXEEXT_14 = asem$(EXEEXT) +@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@am__EXEEXT_15 = \ +@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@ $(am__EXEEXT_14) am__installdirs = "$(DESTDIR)$(driverexecdir)" "$(DESTDIR)$(sbindir)" PROGRAMS = $(driverexec_PROGRAMS) $(sbin_PROGRAMS) am_al175_OBJECTS = al175.$(OBJEXT) @@ -163,6 +200,10 @@ al175_LDADD = $(LDADD) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) serial.o al175_DEPENDENCIES = $(am__DEPENDENCIES_2) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = am_apcsmart_OBJECTS = apcsmart.$(OBJEXT) apcsmart_tabs.$(OBJEXT) apcsmart_OBJECTS = $(am_apcsmart_OBJECTS) apcsmart_LDADD = $(LDADD) @@ -174,9 +215,12 @@ apcsmart_old_DEPENDENCIES = $(am__DEPENDENCIES_2) am_apcupsd_ups_OBJECTS = apcupsd_ups-apcupsd-ups.$(OBJEXT) apcupsd_ups_OBJECTS = $(am_apcupsd_ups_OBJECTS) apcupsd_ups_DEPENDENCIES = $(LDADD_DRIVERS) -apcupsd_ups_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +apcupsd_ups_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(apcupsd_ups_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_asem_OBJECTS = asem.$(OBJEXT) +asem_OBJECTS = $(am_asem_OBJECTS) +asem_DEPENDENCIES = $(LDADD_DRIVERS) am_bcmxcp_OBJECTS = bcmxcp.$(OBJEXT) bcmxcp_ser.$(OBJEXT) bcmxcp_OBJECTS = $(am_bcmxcp_OBJECTS) am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) @@ -229,7 +273,7 @@ dummy_ups_OBJECTS = $(am_dummy_ups_OBJECTS) @WITH_SSL_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) dummy_ups_DEPENDENCIES = $(LDADD_DRIVERS) ../clients/libupsclient.la \ $(am__DEPENDENCIES_4) -dummy_ups_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +dummy_ups_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dummy_ups_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_etapro_OBJECTS = etapro.$(OBJEXT) @@ -266,7 +310,7 @@ liebert_esp2_DEPENDENCIES = $(am__DEPENDENCIES_2) am_macosx_ups_OBJECTS = macosx-ups.$(OBJEXT) macosx_ups_OBJECTS = $(am_macosx_ups_OBJECTS) macosx_ups_DEPENDENCIES = $(LDADD_DRIVERS) -macosx_ups_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +macosx_ups_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(macosx_ups_LDFLAGS) $(LDFLAGS) -o $@ am_masterguard_OBJECTS = masterguard.$(OBJEXT) @@ -282,9 +326,9 @@ am_mge_shut_OBJECTS = mge_shut-usbhid-ups.$(OBJEXT) \ mge_shut-hidparser.$(OBJEXT) mge_shut-mge-hid.$(OBJEXT) mge_shut_OBJECTS = $(am_mge_shut_OBJECTS) mge_shut_DEPENDENCIES = $(am__DEPENDENCIES_3) -mge_shut_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(mge_shut_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +mge_shut_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(mge_shut_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_mge_utalk_OBJECTS = mge-utalk.$(OBJEXT) mge_utalk_OBJECTS = $(am_mge_utalk_OBJECTS) mge_utalk_LDADD = $(LDADD) @@ -306,13 +350,15 @@ am_nutdrv_atcl_usb_OBJECTS = nutdrv_atcl_usb.$(OBJEXT) \ nutdrv_atcl_usb_OBJECTS = $(am_nutdrv_atcl_usb_OBJECTS) nutdrv_atcl_usb_DEPENDENCIES = $(LDADD_DRIVERS) $(am__DEPENDENCIES_1) am__nutdrv_qx_SOURCES_DIST = nutdrv_qx.c libusb.c usb-common.c \ - nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ - nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c nutdrv_qx_mustek.c \ - nutdrv_qx_q1.c nutdrv_qx_voltronic.c nutdrv_qx_voltronic-qs.c \ + nutdrv_qx_bestups.c nutdrv_qx_blazer-common.c \ + nutdrv_qx_mecer.c nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c \ + nutdrv_qx_mustek.c nutdrv_qx_q1.c nutdrv_qx_voltronic.c \ + nutdrv_qx_voltronic-qs.c nutdrv_qx_voltronic-qs-hex.c \ nutdrv_qx_zinto.c @WITH_USB_TRUE@am__objects_2 = nutdrv_qx-libusb.$(OBJEXT) \ @WITH_USB_TRUE@ nutdrv_qx-usb-common.$(OBJEXT) -am__objects_3 = nutdrv_qx-nutdrv_qx_blazer-common.$(OBJEXT) \ +am__objects_3 = nutdrv_qx-nutdrv_qx_bestups.$(OBJEXT) \ + nutdrv_qx-nutdrv_qx_blazer-common.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_mecer.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_megatec.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_megatec-old.$(OBJEXT) \ @@ -320,6 +366,7 @@ am__objects_3 = nutdrv_qx-nutdrv_qx_blazer-common.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_q1.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_voltronic.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_voltronic-qs.$(OBJEXT) \ + nutdrv_qx-nutdrv_qx_voltronic-qs-hex.$(OBJEXT) \ nutdrv_qx-nutdrv_qx_zinto.$(OBJEXT) am_nutdrv_qx_OBJECTS = nutdrv_qx-nutdrv_qx.$(OBJEXT) $(am__objects_2) \ $(am__objects_3) @@ -328,7 +375,7 @@ nutdrv_qx_OBJECTS = $(am_nutdrv_qx_OBJECTS) @WITH_USB_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1) nutdrv_qx_DEPENDENCIES = $(LDADD_DRIVERS) $(am__DEPENDENCIES_5) \ $(am__DEPENDENCIES_6) -nutdrv_qx_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +nutdrv_qx_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(nutdrv_qx_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_oldmge_shut_OBJECTS = mge-shut.$(OBJEXT) hidparser.$(OBJEXT) @@ -417,21 +464,42 @@ am_victronups_OBJECTS = victronups.$(OBJEXT) victronups_OBJECTS = $(am_victronups_OBJECTS) victronups_LDADD = $(LDADD) victronups_DEPENDENCIES = $(am__DEPENDENCIES_2) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libdummy_a_SOURCES) $(al175_SOURCES) $(apcsmart_SOURCES) \ - $(apcsmart_old_SOURCES) $(apcupsd_ups_SOURCES) \ + $(apcsmart_old_SOURCES) $(apcupsd_ups_SOURCES) $(asem_SOURCES) \ $(bcmxcp_SOURCES) $(bcmxcp_usb_SOURCES) $(belkin_SOURCES) \ $(belkinunv_SOURCES) $(bestfcom_SOURCES) bestfortress.c \ $(bestuferrups_SOURCES) $(bestups_SOURCES) \ @@ -455,26 +523,26 @@ SOURCES = $(libdummy_a_SOURCES) $(al175_SOURCES) $(apcsmart_SOURCES) \ $(victronups_SOURCES) DIST_SOURCES = $(libdummy_a_SOURCES) $(al175_SOURCES) \ $(apcsmart_SOURCES) $(apcsmart_old_SOURCES) \ - $(apcupsd_ups_SOURCES) $(bcmxcp_SOURCES) $(bcmxcp_usb_SOURCES) \ - $(belkin_SOURCES) $(belkinunv_SOURCES) $(bestfcom_SOURCES) \ - bestfortress.c $(bestuferrups_SOURCES) $(bestups_SOURCES) \ - $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) $(clone_SOURCES) \ - $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) $(etapro_SOURCES) \ - $(everups_SOURCES) $(gamatronic_SOURCES) $(genericups_SOURCES) \ - $(isbmex_SOURCES) $(ivtscd_SOURCES) $(liebert_SOURCES) \ - $(liebert_esp2_SOURCES) $(macosx_ups_SOURCES) \ - $(masterguard_SOURCES) $(metasys_SOURCES) $(mge_shut_SOURCES) \ - $(mge_utalk_SOURCES) $(microdowell_SOURCES) \ - $(netxml_ups_SOURCES) $(am__nut_ipmipsu_SOURCES_DIST) \ - $(nutdrv_atcl_usb_SOURCES) $(am__nutdrv_qx_SOURCES_DIST) \ - $(oldmge_shut_SOURCES) $(oneac_SOURCES) $(optiups_SOURCES) \ - $(powercom_SOURCES) $(powerman_pdu_SOURCES) \ - $(powerpanel_SOURCES) $(rhino_SOURCES) $(richcomm_usb_SOURCES) \ - $(riello_ser_SOURCES) $(riello_usb_SOURCES) $(safenet_SOURCES) \ - $(skel_SOURCES) $(snmp_ups_SOURCES) $(solis_SOURCES) \ - $(tripplite_SOURCES) $(tripplite_usb_SOURCES) \ - $(tripplitesu_SOURCES) $(upscode2_SOURCES) \ - $(upsdrvctl_SOURCES) $(usbhid_ups_SOURCES) \ + $(apcupsd_ups_SOURCES) $(asem_SOURCES) $(bcmxcp_SOURCES) \ + $(bcmxcp_usb_SOURCES) $(belkin_SOURCES) $(belkinunv_SOURCES) \ + $(bestfcom_SOURCES) bestfortress.c $(bestuferrups_SOURCES) \ + $(bestups_SOURCES) $(blazer_ser_SOURCES) $(blazer_usb_SOURCES) \ + $(clone_SOURCES) $(clone_outlet_SOURCES) $(dummy_ups_SOURCES) \ + $(etapro_SOURCES) $(everups_SOURCES) $(gamatronic_SOURCES) \ + $(genericups_SOURCES) $(isbmex_SOURCES) $(ivtscd_SOURCES) \ + $(liebert_SOURCES) $(liebert_esp2_SOURCES) \ + $(macosx_ups_SOURCES) $(masterguard_SOURCES) \ + $(metasys_SOURCES) $(mge_shut_SOURCES) $(mge_utalk_SOURCES) \ + $(microdowell_SOURCES) $(netxml_ups_SOURCES) \ + $(am__nut_ipmipsu_SOURCES_DIST) $(nutdrv_atcl_usb_SOURCES) \ + $(am__nutdrv_qx_SOURCES_DIST) $(oldmge_shut_SOURCES) \ + $(oneac_SOURCES) $(optiups_SOURCES) $(powercom_SOURCES) \ + $(powerman_pdu_SOURCES) $(powerpanel_SOURCES) $(rhino_SOURCES) \ + $(richcomm_usb_SOURCES) $(riello_ser_SOURCES) \ + $(riello_usb_SOURCES) $(safenet_SOURCES) $(skel_SOURCES) \ + $(snmp_ups_SOURCES) $(solis_SOURCES) $(tripplite_SOURCES) \ + $(tripplite_usb_SOURCES) $(tripplitesu_SOURCES) \ + $(upscode2_SOURCES) $(upsdrvctl_SOURCES) $(usbhid_ups_SOURCES) \ $(victronups_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -482,12 +550,30 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(dist_noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -594,12 +680,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -644,6 +733,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -697,6 +787,7 @@ USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \ USB_DRIVERLIST = $(USB_LIBUSB_DRIVERLIST) NEONXML_DRIVERLIST = netxml-ups MACOSX_DRIVERLIST = macosx-ups +LINUX_I2C_DRIVERLIST = asem # ========================================================================== # Driver build details @@ -756,9 +847,9 @@ riello_ser_LDADD = $(LDADD) -lm # dummy dummy_ups_SOURCES = dummy-ups.c dummy_ups_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/clients \ - $(am__append_13) -dummy_ups_LDADD = $(LDADD_DRIVERS) ../clients/libupsclient.la \ $(am__append_14) +dummy_ups_LDADD = $(LDADD_DRIVERS) ../clients/libupsclient.la \ + $(am__append_15) # Clone drivers clone_SOURCES = clone.c @@ -785,7 +876,7 @@ usbhid_ups_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) tripplite_usb_SOURCES = tripplite_usb.c libusb.c usb-common.c tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c usb-common.c -bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) +bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm nutdrv_atcl_usb_SOURCES = nutdrv_atcl_usb.c usb-common.c @@ -818,7 +909,7 @@ powerman_pdu_SOURCES = powerman-pdu.c powerman_pdu_LDADD = $(LDADD) $(LIBPOWERMAN_LIBS) # IPMI PSU -nut_ipmipsu_SOURCES = nut-ipmipsu.c $(am__append_15) +nut_ipmipsu_SOURCES = nut-ipmipsu.c $(am__append_16) nut_ipmipsu_LDADD = $(LDADD) $(LIBIPMI_LIBS) # Mac OS X metadriver @@ -826,15 +917,20 @@ macosx_ups_LDADD = $(LDADD_DRIVERS) macosx_ups_LDFLAGS = $(LDFLAGS) -framework IOKit -framework CoreFoundation macosx_ups_SOURCES = macosx-ups.c +# Asem +asem_LDADD = $(LDADD_DRIVERS) +asem_SOURCES = asem.c + # nutdrv_qx USB/Serial -nutdrv_qx_SOURCES = nutdrv_qx.c $(am__append_19) \ +nutdrv_qx_SOURCES = nutdrv_qx.c $(am__append_20) \ $(NUTDRV_QX_SUBDRIVERS) -nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm $(am__append_17) \ - $(am__append_20) -nutdrv_qx_CFLAGS = $(AM_CFLAGS) $(am__append_16) $(am__append_18) -NUTDRV_QX_SUBDRIVERS = nutdrv_qx_blazer-common.c nutdrv_qx_mecer.c \ - nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c nutdrv_qx_mustek.c \ - nutdrv_qx_q1.c nutdrv_qx_voltronic.c nutdrv_qx_voltronic-qs.c nutdrv_qx_zinto.c +nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm $(am__append_18) \ + $(am__append_21) +nutdrv_qx_CFLAGS = $(AM_CFLAGS) $(am__append_17) $(am__append_19) +NUTDRV_QX_SUBDRIVERS = nutdrv_qx_bestups.c nutdrv_qx_blazer-common.c \ + nutdrv_qx_mecer.c nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c \ + nutdrv_qx_mustek.c nutdrv_qx_q1.c nutdrv_qx_voltronic.c \ + nutdrv_qx_voltronic-qs.c nutdrv_qx_voltronic-qs-hex.c nutdrv_qx_zinto.c # ---------------------------------------------------------------------- @@ -851,9 +947,9 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \ safenet.h serial.h snmp-ups.h solis.h tripplite.h tripplite-hid.h \ upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \ apcsmart.h apcsmart_tabs.h apcsmart-old.h apcupsd-ups.h cyberpower-mib.h riello.h openups-hid.h \ - delta_ups-mib.h nutdrv_qx.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ + delta_ups-mib.h nutdrv_qx.h nutdrv_qx_bestups.h nutdrv_qx_blazer-common.h nutdrv_qx_mecer.h \ nutdrv_qx_megatec.h nutdrv_qx_megatec-old.h nutdrv_qx_mustek.h nutdrv_qx_q1.h \ - nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_zinto.h \ + nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_voltronic-qs-hex.h nutdrv_qx_zinto.h \ xppc-mib.h @@ -895,10 +991,11 @@ $(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): + libdummy.a: $(libdummy_a_OBJECTS) $(libdummy_a_DEPENDENCIES) $(EXTRA_libdummy_a_DEPENDENCIES) - -rm -f libdummy.a - $(libdummy_a_AR) libdummy.a $(libdummy_a_OBJECTS) $(libdummy_a_LIBADD) - $(RANLIB) libdummy.a + $(AM_V_at)-rm -f libdummy.a + $(AM_V_AR)$(libdummy_a_AR) libdummy.a $(libdummy_a_OBJECTS) $(libdummy_a_LIBADD) + $(AM_V_at)$(RANLIB) libdummy.a install-driverexecPROGRAMS: $(driverexec_PROGRAMS) @$(NORMAL_INSTALL) @list='$(driverexec_PROGRAMS)'; test -n "$(driverexecdir)" || list=; \ @@ -908,10 +1005,12 @@ install-driverexecPROGRAMS: $(driverexec_PROGRAMS) 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; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -932,7 +1031,8 @@ uninstall-driverexecPROGRAMS: @list='$(driverexec_PROGRAMS)'; test -n "$(driverexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(driverexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(driverexecdir)" && rm -f $$files @@ -954,10 +1054,12 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS) 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; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -978,7 +1080,8 @@ uninstall-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files @@ -991,174 +1094,234 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + al175$(EXEEXT): $(al175_OBJECTS) $(al175_DEPENDENCIES) $(EXTRA_al175_DEPENDENCIES) @rm -f al175$(EXEEXT) - $(LINK) $(al175_OBJECTS) $(al175_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(al175_OBJECTS) $(al175_LDADD) $(LIBS) + apcsmart$(EXEEXT): $(apcsmart_OBJECTS) $(apcsmart_DEPENDENCIES) $(EXTRA_apcsmart_DEPENDENCIES) @rm -f apcsmart$(EXEEXT) - $(LINK) $(apcsmart_OBJECTS) $(apcsmart_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(apcsmart_OBJECTS) $(apcsmart_LDADD) $(LIBS) + apcsmart-old$(EXEEXT): $(apcsmart_old_OBJECTS) $(apcsmart_old_DEPENDENCIES) $(EXTRA_apcsmart_old_DEPENDENCIES) @rm -f apcsmart-old$(EXEEXT) - $(LINK) $(apcsmart_old_OBJECTS) $(apcsmart_old_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(apcsmart_old_OBJECTS) $(apcsmart_old_LDADD) $(LIBS) + apcupsd-ups$(EXEEXT): $(apcupsd_ups_OBJECTS) $(apcupsd_ups_DEPENDENCIES) $(EXTRA_apcupsd_ups_DEPENDENCIES) @rm -f apcupsd-ups$(EXEEXT) - $(apcupsd_ups_LINK) $(apcupsd_ups_OBJECTS) $(apcupsd_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(apcupsd_ups_LINK) $(apcupsd_ups_OBJECTS) $(apcupsd_ups_LDADD) $(LIBS) + +asem$(EXEEXT): $(asem_OBJECTS) $(asem_DEPENDENCIES) $(EXTRA_asem_DEPENDENCIES) + @rm -f asem$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(asem_OBJECTS) $(asem_LDADD) $(LIBS) + bcmxcp$(EXEEXT): $(bcmxcp_OBJECTS) $(bcmxcp_DEPENDENCIES) $(EXTRA_bcmxcp_DEPENDENCIES) @rm -f bcmxcp$(EXEEXT) - $(LINK) $(bcmxcp_OBJECTS) $(bcmxcp_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bcmxcp_OBJECTS) $(bcmxcp_LDADD) $(LIBS) + bcmxcp_usb$(EXEEXT): $(bcmxcp_usb_OBJECTS) $(bcmxcp_usb_DEPENDENCIES) $(EXTRA_bcmxcp_usb_DEPENDENCIES) @rm -f bcmxcp_usb$(EXEEXT) - $(LINK) $(bcmxcp_usb_OBJECTS) $(bcmxcp_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bcmxcp_usb_OBJECTS) $(bcmxcp_usb_LDADD) $(LIBS) + belkin$(EXEEXT): $(belkin_OBJECTS) $(belkin_DEPENDENCIES) $(EXTRA_belkin_DEPENDENCIES) @rm -f belkin$(EXEEXT) - $(LINK) $(belkin_OBJECTS) $(belkin_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(belkin_OBJECTS) $(belkin_LDADD) $(LIBS) + belkinunv$(EXEEXT): $(belkinunv_OBJECTS) $(belkinunv_DEPENDENCIES) $(EXTRA_belkinunv_DEPENDENCIES) @rm -f belkinunv$(EXEEXT) - $(LINK) $(belkinunv_OBJECTS) $(belkinunv_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(belkinunv_OBJECTS) $(belkinunv_LDADD) $(LIBS) + bestfcom$(EXEEXT): $(bestfcom_OBJECTS) $(bestfcom_DEPENDENCIES) $(EXTRA_bestfcom_DEPENDENCIES) @rm -f bestfcom$(EXEEXT) - $(LINK) $(bestfcom_OBJECTS) $(bestfcom_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bestfcom_OBJECTS) $(bestfcom_LDADD) $(LIBS) + bestfortress$(EXEEXT): $(bestfortress_OBJECTS) $(bestfortress_DEPENDENCIES) $(EXTRA_bestfortress_DEPENDENCIES) @rm -f bestfortress$(EXEEXT) - $(LINK) $(bestfortress_OBJECTS) $(bestfortress_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bestfortress_OBJECTS) $(bestfortress_LDADD) $(LIBS) + bestuferrups$(EXEEXT): $(bestuferrups_OBJECTS) $(bestuferrups_DEPENDENCIES) $(EXTRA_bestuferrups_DEPENDENCIES) @rm -f bestuferrups$(EXEEXT) - $(LINK) $(bestuferrups_OBJECTS) $(bestuferrups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bestuferrups_OBJECTS) $(bestuferrups_LDADD) $(LIBS) + bestups$(EXEEXT): $(bestups_OBJECTS) $(bestups_DEPENDENCIES) $(EXTRA_bestups_DEPENDENCIES) @rm -f bestups$(EXEEXT) - $(LINK) $(bestups_OBJECTS) $(bestups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bestups_OBJECTS) $(bestups_LDADD) $(LIBS) + blazer_ser$(EXEEXT): $(blazer_ser_OBJECTS) $(blazer_ser_DEPENDENCIES) $(EXTRA_blazer_ser_DEPENDENCIES) @rm -f blazer_ser$(EXEEXT) - $(LINK) $(blazer_ser_OBJECTS) $(blazer_ser_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(blazer_ser_OBJECTS) $(blazer_ser_LDADD) $(LIBS) + blazer_usb$(EXEEXT): $(blazer_usb_OBJECTS) $(blazer_usb_DEPENDENCIES) $(EXTRA_blazer_usb_DEPENDENCIES) @rm -f blazer_usb$(EXEEXT) - $(LINK) $(blazer_usb_OBJECTS) $(blazer_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(blazer_usb_OBJECTS) $(blazer_usb_LDADD) $(LIBS) + clone$(EXEEXT): $(clone_OBJECTS) $(clone_DEPENDENCIES) $(EXTRA_clone_DEPENDENCIES) @rm -f clone$(EXEEXT) - $(LINK) $(clone_OBJECTS) $(clone_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(clone_OBJECTS) $(clone_LDADD) $(LIBS) + clone-outlet$(EXEEXT): $(clone_outlet_OBJECTS) $(clone_outlet_DEPENDENCIES) $(EXTRA_clone_outlet_DEPENDENCIES) @rm -f clone-outlet$(EXEEXT) - $(LINK) $(clone_outlet_OBJECTS) $(clone_outlet_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(clone_outlet_OBJECTS) $(clone_outlet_LDADD) $(LIBS) + dummy-ups$(EXEEXT): $(dummy_ups_OBJECTS) $(dummy_ups_DEPENDENCIES) $(EXTRA_dummy_ups_DEPENDENCIES) @rm -f dummy-ups$(EXEEXT) - $(dummy_ups_LINK) $(dummy_ups_OBJECTS) $(dummy_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(dummy_ups_LINK) $(dummy_ups_OBJECTS) $(dummy_ups_LDADD) $(LIBS) + etapro$(EXEEXT): $(etapro_OBJECTS) $(etapro_DEPENDENCIES) $(EXTRA_etapro_DEPENDENCIES) @rm -f etapro$(EXEEXT) - $(LINK) $(etapro_OBJECTS) $(etapro_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(etapro_OBJECTS) $(etapro_LDADD) $(LIBS) + everups$(EXEEXT): $(everups_OBJECTS) $(everups_DEPENDENCIES) $(EXTRA_everups_DEPENDENCIES) @rm -f everups$(EXEEXT) - $(LINK) $(everups_OBJECTS) $(everups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(everups_OBJECTS) $(everups_LDADD) $(LIBS) + gamatronic$(EXEEXT): $(gamatronic_OBJECTS) $(gamatronic_DEPENDENCIES) $(EXTRA_gamatronic_DEPENDENCIES) @rm -f gamatronic$(EXEEXT) - $(LINK) $(gamatronic_OBJECTS) $(gamatronic_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(gamatronic_OBJECTS) $(gamatronic_LDADD) $(LIBS) + genericups$(EXEEXT): $(genericups_OBJECTS) $(genericups_DEPENDENCIES) $(EXTRA_genericups_DEPENDENCIES) @rm -f genericups$(EXEEXT) - $(LINK) $(genericups_OBJECTS) $(genericups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(genericups_OBJECTS) $(genericups_LDADD) $(LIBS) + isbmex$(EXEEXT): $(isbmex_OBJECTS) $(isbmex_DEPENDENCIES) $(EXTRA_isbmex_DEPENDENCIES) @rm -f isbmex$(EXEEXT) - $(LINK) $(isbmex_OBJECTS) $(isbmex_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(isbmex_OBJECTS) $(isbmex_LDADD) $(LIBS) + ivtscd$(EXEEXT): $(ivtscd_OBJECTS) $(ivtscd_DEPENDENCIES) $(EXTRA_ivtscd_DEPENDENCIES) @rm -f ivtscd$(EXEEXT) - $(LINK) $(ivtscd_OBJECTS) $(ivtscd_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(ivtscd_OBJECTS) $(ivtscd_LDADD) $(LIBS) + liebert$(EXEEXT): $(liebert_OBJECTS) $(liebert_DEPENDENCIES) $(EXTRA_liebert_DEPENDENCIES) @rm -f liebert$(EXEEXT) - $(LINK) $(liebert_OBJECTS) $(liebert_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(liebert_OBJECTS) $(liebert_LDADD) $(LIBS) + liebert-esp2$(EXEEXT): $(liebert_esp2_OBJECTS) $(liebert_esp2_DEPENDENCIES) $(EXTRA_liebert_esp2_DEPENDENCIES) @rm -f liebert-esp2$(EXEEXT) - $(LINK) $(liebert_esp2_OBJECTS) $(liebert_esp2_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(liebert_esp2_OBJECTS) $(liebert_esp2_LDADD) $(LIBS) + macosx-ups$(EXEEXT): $(macosx_ups_OBJECTS) $(macosx_ups_DEPENDENCIES) $(EXTRA_macosx_ups_DEPENDENCIES) @rm -f macosx-ups$(EXEEXT) - $(macosx_ups_LINK) $(macosx_ups_OBJECTS) $(macosx_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(macosx_ups_LINK) $(macosx_ups_OBJECTS) $(macosx_ups_LDADD) $(LIBS) + masterguard$(EXEEXT): $(masterguard_OBJECTS) $(masterguard_DEPENDENCIES) $(EXTRA_masterguard_DEPENDENCIES) @rm -f masterguard$(EXEEXT) - $(LINK) $(masterguard_OBJECTS) $(masterguard_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(masterguard_OBJECTS) $(masterguard_LDADD) $(LIBS) + metasys$(EXEEXT): $(metasys_OBJECTS) $(metasys_DEPENDENCIES) $(EXTRA_metasys_DEPENDENCIES) @rm -f metasys$(EXEEXT) - $(LINK) $(metasys_OBJECTS) $(metasys_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(metasys_OBJECTS) $(metasys_LDADD) $(LIBS) + mge-shut$(EXEEXT): $(mge_shut_OBJECTS) $(mge_shut_DEPENDENCIES) $(EXTRA_mge_shut_DEPENDENCIES) @rm -f mge-shut$(EXEEXT) - $(mge_shut_LINK) $(mge_shut_OBJECTS) $(mge_shut_LDADD) $(LIBS) + $(AM_V_CCLD)$(mge_shut_LINK) $(mge_shut_OBJECTS) $(mge_shut_LDADD) $(LIBS) + mge-utalk$(EXEEXT): $(mge_utalk_OBJECTS) $(mge_utalk_DEPENDENCIES) $(EXTRA_mge_utalk_DEPENDENCIES) @rm -f mge-utalk$(EXEEXT) - $(LINK) $(mge_utalk_OBJECTS) $(mge_utalk_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(mge_utalk_OBJECTS) $(mge_utalk_LDADD) $(LIBS) + microdowell$(EXEEXT): $(microdowell_OBJECTS) $(microdowell_DEPENDENCIES) $(EXTRA_microdowell_DEPENDENCIES) @rm -f microdowell$(EXEEXT) - $(LINK) $(microdowell_OBJECTS) $(microdowell_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(microdowell_OBJECTS) $(microdowell_LDADD) $(LIBS) + netxml-ups$(EXEEXT): $(netxml_ups_OBJECTS) $(netxml_ups_DEPENDENCIES) $(EXTRA_netxml_ups_DEPENDENCIES) @rm -f netxml-ups$(EXEEXT) - $(LINK) $(netxml_ups_OBJECTS) $(netxml_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(netxml_ups_OBJECTS) $(netxml_ups_LDADD) $(LIBS) + nut-ipmipsu$(EXEEXT): $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_DEPENDENCIES) $(EXTRA_nut_ipmipsu_DEPENDENCIES) @rm -f nut-ipmipsu$(EXEEXT) - $(LINK) $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(nut_ipmipsu_OBJECTS) $(nut_ipmipsu_LDADD) $(LIBS) + nutdrv_atcl_usb$(EXEEXT): $(nutdrv_atcl_usb_OBJECTS) $(nutdrv_atcl_usb_DEPENDENCIES) $(EXTRA_nutdrv_atcl_usb_DEPENDENCIES) @rm -f nutdrv_atcl_usb$(EXEEXT) - $(LINK) $(nutdrv_atcl_usb_OBJECTS) $(nutdrv_atcl_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(nutdrv_atcl_usb_OBJECTS) $(nutdrv_atcl_usb_LDADD) $(LIBS) + nutdrv_qx$(EXEEXT): $(nutdrv_qx_OBJECTS) $(nutdrv_qx_DEPENDENCIES) $(EXTRA_nutdrv_qx_DEPENDENCIES) @rm -f nutdrv_qx$(EXEEXT) - $(nutdrv_qx_LINK) $(nutdrv_qx_OBJECTS) $(nutdrv_qx_LDADD) $(LIBS) + $(AM_V_CCLD)$(nutdrv_qx_LINK) $(nutdrv_qx_OBJECTS) $(nutdrv_qx_LDADD) $(LIBS) + oldmge-shut$(EXEEXT): $(oldmge_shut_OBJECTS) $(oldmge_shut_DEPENDENCIES) $(EXTRA_oldmge_shut_DEPENDENCIES) @rm -f oldmge-shut$(EXEEXT) - $(LINK) $(oldmge_shut_OBJECTS) $(oldmge_shut_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(oldmge_shut_OBJECTS) $(oldmge_shut_LDADD) $(LIBS) + oneac$(EXEEXT): $(oneac_OBJECTS) $(oneac_DEPENDENCIES) $(EXTRA_oneac_DEPENDENCIES) @rm -f oneac$(EXEEXT) - $(LINK) $(oneac_OBJECTS) $(oneac_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(oneac_OBJECTS) $(oneac_LDADD) $(LIBS) + optiups$(EXEEXT): $(optiups_OBJECTS) $(optiups_DEPENDENCIES) $(EXTRA_optiups_DEPENDENCIES) @rm -f optiups$(EXEEXT) - $(LINK) $(optiups_OBJECTS) $(optiups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(optiups_OBJECTS) $(optiups_LDADD) $(LIBS) + powercom$(EXEEXT): $(powercom_OBJECTS) $(powercom_DEPENDENCIES) $(EXTRA_powercom_DEPENDENCIES) @rm -f powercom$(EXEEXT) - $(LINK) $(powercom_OBJECTS) $(powercom_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(powercom_OBJECTS) $(powercom_LDADD) $(LIBS) + powerman-pdu$(EXEEXT): $(powerman_pdu_OBJECTS) $(powerman_pdu_DEPENDENCIES) $(EXTRA_powerman_pdu_DEPENDENCIES) @rm -f powerman-pdu$(EXEEXT) - $(LINK) $(powerman_pdu_OBJECTS) $(powerman_pdu_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(powerman_pdu_OBJECTS) $(powerman_pdu_LDADD) $(LIBS) + powerpanel$(EXEEXT): $(powerpanel_OBJECTS) $(powerpanel_DEPENDENCIES) $(EXTRA_powerpanel_DEPENDENCIES) @rm -f powerpanel$(EXEEXT) - $(LINK) $(powerpanel_OBJECTS) $(powerpanel_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(powerpanel_OBJECTS) $(powerpanel_LDADD) $(LIBS) + rhino$(EXEEXT): $(rhino_OBJECTS) $(rhino_DEPENDENCIES) $(EXTRA_rhino_DEPENDENCIES) @rm -f rhino$(EXEEXT) - $(LINK) $(rhino_OBJECTS) $(rhino_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(rhino_OBJECTS) $(rhino_LDADD) $(LIBS) + richcomm_usb$(EXEEXT): $(richcomm_usb_OBJECTS) $(richcomm_usb_DEPENDENCIES) $(EXTRA_richcomm_usb_DEPENDENCIES) @rm -f richcomm_usb$(EXEEXT) - $(LINK) $(richcomm_usb_OBJECTS) $(richcomm_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(richcomm_usb_OBJECTS) $(richcomm_usb_LDADD) $(LIBS) + riello_ser$(EXEEXT): $(riello_ser_OBJECTS) $(riello_ser_DEPENDENCIES) $(EXTRA_riello_ser_DEPENDENCIES) @rm -f riello_ser$(EXEEXT) - $(LINK) $(riello_ser_OBJECTS) $(riello_ser_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(riello_ser_OBJECTS) $(riello_ser_LDADD) $(LIBS) + riello_usb$(EXEEXT): $(riello_usb_OBJECTS) $(riello_usb_DEPENDENCIES) $(EXTRA_riello_usb_DEPENDENCIES) @rm -f riello_usb$(EXEEXT) - $(LINK) $(riello_usb_OBJECTS) $(riello_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(riello_usb_OBJECTS) $(riello_usb_LDADD) $(LIBS) + safenet$(EXEEXT): $(safenet_OBJECTS) $(safenet_DEPENDENCIES) $(EXTRA_safenet_DEPENDENCIES) @rm -f safenet$(EXEEXT) - $(LINK) $(safenet_OBJECTS) $(safenet_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(safenet_OBJECTS) $(safenet_LDADD) $(LIBS) + skel$(EXEEXT): $(skel_OBJECTS) $(skel_DEPENDENCIES) $(EXTRA_skel_DEPENDENCIES) @rm -f skel$(EXEEXT) - $(LINK) $(skel_OBJECTS) $(skel_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(skel_OBJECTS) $(skel_LDADD) $(LIBS) + snmp-ups$(EXEEXT): $(snmp_ups_OBJECTS) $(snmp_ups_DEPENDENCIES) $(EXTRA_snmp_ups_DEPENDENCIES) @rm -f snmp-ups$(EXEEXT) - $(LINK) $(snmp_ups_OBJECTS) $(snmp_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(snmp_ups_OBJECTS) $(snmp_ups_LDADD) $(LIBS) + solis$(EXEEXT): $(solis_OBJECTS) $(solis_DEPENDENCIES) $(EXTRA_solis_DEPENDENCIES) @rm -f solis$(EXEEXT) - $(LINK) $(solis_OBJECTS) $(solis_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(solis_OBJECTS) $(solis_LDADD) $(LIBS) + tripplite$(EXEEXT): $(tripplite_OBJECTS) $(tripplite_DEPENDENCIES) $(EXTRA_tripplite_DEPENDENCIES) @rm -f tripplite$(EXEEXT) - $(LINK) $(tripplite_OBJECTS) $(tripplite_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(tripplite_OBJECTS) $(tripplite_LDADD) $(LIBS) + tripplite_usb$(EXEEXT): $(tripplite_usb_OBJECTS) $(tripplite_usb_DEPENDENCIES) $(EXTRA_tripplite_usb_DEPENDENCIES) @rm -f tripplite_usb$(EXEEXT) - $(LINK) $(tripplite_usb_OBJECTS) $(tripplite_usb_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(tripplite_usb_OBJECTS) $(tripplite_usb_LDADD) $(LIBS) + tripplitesu$(EXEEXT): $(tripplitesu_OBJECTS) $(tripplitesu_DEPENDENCIES) $(EXTRA_tripplitesu_DEPENDENCIES) @rm -f tripplitesu$(EXEEXT) - $(LINK) $(tripplitesu_OBJECTS) $(tripplitesu_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(tripplitesu_OBJECTS) $(tripplitesu_LDADD) $(LIBS) + upscode2$(EXEEXT): $(upscode2_OBJECTS) $(upscode2_DEPENDENCIES) $(EXTRA_upscode2_DEPENDENCIES) @rm -f upscode2$(EXEEXT) - $(LINK) $(upscode2_OBJECTS) $(upscode2_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upscode2_OBJECTS) $(upscode2_LDADD) $(LIBS) + upsdrvctl$(EXEEXT): $(upsdrvctl_OBJECTS) $(upsdrvctl_DEPENDENCIES) $(EXTRA_upsdrvctl_DEPENDENCIES) @rm -f upsdrvctl$(EXEEXT) - $(LINK) $(upsdrvctl_OBJECTS) $(upsdrvctl_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsdrvctl_OBJECTS) $(upsdrvctl_LDADD) $(LIBS) + usbhid-ups$(EXEEXT): $(usbhid_ups_OBJECTS) $(usbhid_ups_DEPENDENCIES) $(EXTRA_usbhid_ups_DEPENDENCIES) @rm -f usbhid-ups$(EXEEXT) - $(LINK) $(usbhid_ups_OBJECTS) $(usbhid_ups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(usbhid_ups_OBJECTS) $(usbhid_ups_LDADD) $(LIBS) + victronups$(EXEEXT): $(victronups_OBJECTS) $(victronups_DEPENDENCIES) $(EXTRA_victronups_DEPENDENCIES) @rm -f victronups$(EXEEXT) - $(LINK) $(victronups_OBJECTS) $(victronups_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(victronups_OBJECTS) $(victronups_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1173,6 +1336,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcsmart.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcsmart_tabs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apcupsd_ups-apcupsd-ups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/baytech-mib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcmxcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcmxcp_ser.Po@am__quote@ @@ -1234,12 +1398,14 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_atcl_usb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-libusb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po@am__quote@ @@ -1277,291 +1443,322 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xppc-mib.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< apcupsd_ups-apcupsd-ups.o: apcupsd-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -MT apcupsd_ups-apcupsd-ups.o -MD -MP -MF $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo -c -o apcupsd_ups-apcupsd-ups.o `test -f 'apcupsd-ups.c' || echo '$(srcdir)/'`apcupsd-ups.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo $(DEPDIR)/apcupsd_ups-apcupsd-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='apcupsd-ups.c' object='apcupsd_ups-apcupsd-ups.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -MT apcupsd_ups-apcupsd-ups.o -MD -MP -MF $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo -c -o apcupsd_ups-apcupsd-ups.o `test -f 'apcupsd-ups.c' || echo '$(srcdir)/'`apcupsd-ups.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo $(DEPDIR)/apcupsd_ups-apcupsd-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='apcupsd-ups.c' object='apcupsd_ups-apcupsd-ups.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -c -o apcupsd_ups-apcupsd-ups.o `test -f 'apcupsd-ups.c' || echo '$(srcdir)/'`apcupsd-ups.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -c -o apcupsd_ups-apcupsd-ups.o `test -f 'apcupsd-ups.c' || echo '$(srcdir)/'`apcupsd-ups.c apcupsd_ups-apcupsd-ups.obj: apcupsd-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -MT apcupsd_ups-apcupsd-ups.obj -MD -MP -MF $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo -c -o apcupsd_ups-apcupsd-ups.obj `if test -f 'apcupsd-ups.c'; then $(CYGPATH_W) 'apcupsd-ups.c'; else $(CYGPATH_W) '$(srcdir)/apcupsd-ups.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo $(DEPDIR)/apcupsd_ups-apcupsd-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='apcupsd-ups.c' object='apcupsd_ups-apcupsd-ups.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -MT apcupsd_ups-apcupsd-ups.obj -MD -MP -MF $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo -c -o apcupsd_ups-apcupsd-ups.obj `if test -f 'apcupsd-ups.c'; then $(CYGPATH_W) 'apcupsd-ups.c'; else $(CYGPATH_W) '$(srcdir)/apcupsd-ups.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/apcupsd_ups-apcupsd-ups.Tpo $(DEPDIR)/apcupsd_ups-apcupsd-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='apcupsd-ups.c' object='apcupsd_ups-apcupsd-ups.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -c -o apcupsd_ups-apcupsd-ups.obj `if test -f 'apcupsd-ups.c'; then $(CYGPATH_W) 'apcupsd-ups.c'; else $(CYGPATH_W) '$(srcdir)/apcupsd-ups.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(apcupsd_ups_CFLAGS) $(CFLAGS) -c -o apcupsd_ups-apcupsd-ups.obj `if test -f 'apcupsd-ups.c'; then $(CYGPATH_W) 'apcupsd-ups.c'; else $(CYGPATH_W) '$(srcdir)/apcupsd-ups.c'; fi` dummy_ups-dummy-ups.o: dummy-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -MT dummy_ups-dummy-ups.o -MD -MP -MF $(DEPDIR)/dummy_ups-dummy-ups.Tpo -c -o dummy_ups-dummy-ups.o `test -f 'dummy-ups.c' || echo '$(srcdir)/'`dummy-ups.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dummy_ups-dummy-ups.Tpo $(DEPDIR)/dummy_ups-dummy-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dummy-ups.c' object='dummy_ups-dummy-ups.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -MT dummy_ups-dummy-ups.o -MD -MP -MF $(DEPDIR)/dummy_ups-dummy-ups.Tpo -c -o dummy_ups-dummy-ups.o `test -f 'dummy-ups.c' || echo '$(srcdir)/'`dummy-ups.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dummy_ups-dummy-ups.Tpo $(DEPDIR)/dummy_ups-dummy-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy-ups.c' object='dummy_ups-dummy-ups.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.o `test -f 'dummy-ups.c' || echo '$(srcdir)/'`dummy-ups.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.o `test -f 'dummy-ups.c' || echo '$(srcdir)/'`dummy-ups.c dummy_ups-dummy-ups.obj: dummy-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -MT dummy_ups-dummy-ups.obj -MD -MP -MF $(DEPDIR)/dummy_ups-dummy-ups.Tpo -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dummy_ups-dummy-ups.Tpo $(DEPDIR)/dummy_ups-dummy-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dummy-ups.c' object='dummy_ups-dummy-ups.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -MT dummy_ups-dummy-ups.obj -MD -MP -MF $(DEPDIR)/dummy_ups-dummy-ups.Tpo -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dummy_ups-dummy-ups.Tpo $(DEPDIR)/dummy_ups-dummy-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy-ups.c' object='dummy_ups-dummy-ups.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dummy_ups_CFLAGS) $(CFLAGS) -c -o dummy_ups-dummy-ups.obj `if test -f 'dummy-ups.c'; then $(CYGPATH_W) 'dummy-ups.c'; else $(CYGPATH_W) '$(srcdir)/dummy-ups.c'; fi` mge_shut-usbhid-ups.o: usbhid-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.o -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usbhid-ups.c' object='mge_shut-usbhid-ups.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.o -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='usbhid-ups.c' object='mge_shut-usbhid-ups.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo '$(srcdir)/'`usbhid-ups.c mge_shut-usbhid-ups.obj: usbhid-ups.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.obj -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usbhid-ups.c' object='mge_shut-usbhid-ups.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-usbhid-ups.obj -MD -MP -MF $(DEPDIR)/mge_shut-usbhid-ups.Tpo -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-usbhid-ups.Tpo $(DEPDIR)/mge_shut-usbhid-ups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='usbhid-ups.c' object='mge_shut-usbhid-ups.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-usbhid-ups.obj `if test -f 'usbhid-ups.c'; then $(CYGPATH_W) 'usbhid-ups.c'; else $(CYGPATH_W) '$(srcdir)/usbhid-ups.c'; fi` mge_shut-libshut.o: libshut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.o -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libshut.c' object='mge_shut-libshut.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.o -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libshut.c' object='mge_shut-libshut.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.o `test -f 'libshut.c' || echo '$(srcdir)/'`libshut.c mge_shut-libshut.obj: libshut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.obj -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libshut.c' object='mge_shut-libshut.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libshut.obj -MD -MP -MF $(DEPDIR)/mge_shut-libshut.Tpo -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-libshut.Tpo $(DEPDIR)/mge_shut-libshut.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libshut.c' object='mge_shut-libshut.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libshut.obj `if test -f 'libshut.c'; then $(CYGPATH_W) 'libshut.c'; else $(CYGPATH_W) '$(srcdir)/libshut.c'; fi` mge_shut-libhid.o: libhid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.o -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhid.c' object='mge_shut-libhid.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.o -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libhid.c' object='mge_shut-libhid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.o `test -f 'libhid.c' || echo '$(srcdir)/'`libhid.c mge_shut-libhid.obj: libhid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.obj -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhid.c' object='mge_shut-libhid.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-libhid.obj -MD -MP -MF $(DEPDIR)/mge_shut-libhid.Tpo -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-libhid.Tpo $(DEPDIR)/mge_shut-libhid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libhid.c' object='mge_shut-libhid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-libhid.obj `if test -f 'libhid.c'; then $(CYGPATH_W) 'libhid.c'; else $(CYGPATH_W) '$(srcdir)/libhid.c'; fi` mge_shut-hidparser.o: hidparser.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.o -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hidparser.c' object='mge_shut-hidparser.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.o -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hidparser.c' object='mge_shut-hidparser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.o `test -f 'hidparser.c' || echo '$(srcdir)/'`hidparser.c mge_shut-hidparser.obj: hidparser.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.obj -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hidparser.c' object='mge_shut-hidparser.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-hidparser.obj -MD -MP -MF $(DEPDIR)/mge_shut-hidparser.Tpo -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-hidparser.Tpo $(DEPDIR)/mge_shut-hidparser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hidparser.c' object='mge_shut-hidparser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-hidparser.obj `if test -f 'hidparser.c'; then $(CYGPATH_W) 'hidparser.c'; else $(CYGPATH_W) '$(srcdir)/hidparser.c'; fi` mge_shut-mge-hid.o: mge-hid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.o -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mge-hid.c' object='mge_shut-mge-hid.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.o -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mge-hid.c' object='mge_shut-mge-hid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.o `test -f 'mge-hid.c' || echo '$(srcdir)/'`mge-hid.c mge_shut-mge-hid.obj: mge-hid.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.obj -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mge-hid.c' object='mge_shut-mge-hid.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -MT mge_shut-mge-hid.obj -MD -MP -MF $(DEPDIR)/mge_shut-mge-hid.Tpo -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mge_shut-mge-hid.Tpo $(DEPDIR)/mge_shut-mge-hid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mge-hid.c' object='mge_shut-mge-hid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mge_shut_CFLAGS) $(CFLAGS) -c -o mge_shut-mge-hid.obj `if test -f 'mge-hid.c'; then $(CYGPATH_W) 'mge-hid.c'; else $(CYGPATH_W) '$(srcdir)/mge-hid.c'; fi` nutdrv_qx-nutdrv_qx.o: nutdrv_qx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo -c -o nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx.c' object='nutdrv_qx-nutdrv_qx.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo -c -o nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx.c' object='nutdrv_qx-nutdrv_qx.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx.o `test -f 'nutdrv_qx.c' || echo '$(srcdir)/'`nutdrv_qx.c nutdrv_qx-nutdrv_qx.obj: nutdrv_qx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo -c -o nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx.c' object='nutdrv_qx-nutdrv_qx.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo -c -o nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx.c' object='nutdrv_qx-nutdrv_qx.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx.obj `if test -f 'nutdrv_qx.c'; then $(CYGPATH_W) 'nutdrv_qx.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx.c'; fi` nutdrv_qx-libusb.o: libusb.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-libusb.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-libusb.Tpo -c -o nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-libusb.Tpo $(DEPDIR)/nutdrv_qx-libusb.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libusb.c' object='nutdrv_qx-libusb.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-libusb.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-libusb.Tpo -c -o nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-libusb.Tpo $(DEPDIR)/nutdrv_qx-libusb.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libusb.c' object='nutdrv_qx-libusb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-libusb.o `test -f 'libusb.c' || echo '$(srcdir)/'`libusb.c nutdrv_qx-libusb.obj: libusb.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-libusb.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-libusb.Tpo -c -o nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-libusb.Tpo $(DEPDIR)/nutdrv_qx-libusb.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libusb.c' object='nutdrv_qx-libusb.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-libusb.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-libusb.Tpo -c -o nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-libusb.Tpo $(DEPDIR)/nutdrv_qx-libusb.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libusb.c' object='nutdrv_qx-libusb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-libusb.obj `if test -f 'libusb.c'; then $(CYGPATH_W) 'libusb.c'; else $(CYGPATH_W) '$(srcdir)/libusb.c'; fi` nutdrv_qx-usb-common.o: usb-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-usb-common.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-usb-common.Tpo -c -o nutdrv_qx-usb-common.o `test -f 'usb-common.c' || echo '$(srcdir)/'`usb-common.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-usb-common.Tpo $(DEPDIR)/nutdrv_qx-usb-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usb-common.c' object='nutdrv_qx-usb-common.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-usb-common.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-usb-common.Tpo -c -o nutdrv_qx-usb-common.o `test -f 'usb-common.c' || echo '$(srcdir)/'`usb-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-usb-common.Tpo $(DEPDIR)/nutdrv_qx-usb-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='usb-common.c' object='nutdrv_qx-usb-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-usb-common.o `test -f 'usb-common.c' || echo '$(srcdir)/'`usb-common.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-usb-common.o `test -f 'usb-common.c' || echo '$(srcdir)/'`usb-common.c nutdrv_qx-usb-common.obj: usb-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-usb-common.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-usb-common.Tpo -c -o nutdrv_qx-usb-common.obj `if test -f 'usb-common.c'; then $(CYGPATH_W) 'usb-common.c'; else $(CYGPATH_W) '$(srcdir)/usb-common.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-usb-common.Tpo $(DEPDIR)/nutdrv_qx-usb-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usb-common.c' object='nutdrv_qx-usb-common.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-usb-common.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-usb-common.Tpo -c -o nutdrv_qx-usb-common.obj `if test -f 'usb-common.c'; then $(CYGPATH_W) 'usb-common.c'; else $(CYGPATH_W) '$(srcdir)/usb-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-usb-common.Tpo $(DEPDIR)/nutdrv_qx-usb-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='usb-common.c' object='nutdrv_qx-usb-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-usb-common.obj `if test -f 'usb-common.c'; then $(CYGPATH_W) 'usb-common.c'; else $(CYGPATH_W) '$(srcdir)/usb-common.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-usb-common.obj `if test -f 'usb-common.c'; then $(CYGPATH_W) 'usb-common.c'; else $(CYGPATH_W) '$(srcdir)/usb-common.c'; fi` + +nutdrv_qx-nutdrv_qx_bestups.o: nutdrv_qx_bestups.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_bestups.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Tpo -c -o nutdrv_qx-nutdrv_qx_bestups.o `test -f 'nutdrv_qx_bestups.c' || echo '$(srcdir)/'`nutdrv_qx_bestups.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_bestups.c' object='nutdrv_qx-nutdrv_qx_bestups.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_bestups.o `test -f 'nutdrv_qx_bestups.c' || echo '$(srcdir)/'`nutdrv_qx_bestups.c + +nutdrv_qx-nutdrv_qx_bestups.obj: nutdrv_qx_bestups.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_bestups.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Tpo -c -o nutdrv_qx-nutdrv_qx_bestups.obj `if test -f 'nutdrv_qx_bestups.c'; then $(CYGPATH_W) 'nutdrv_qx_bestups.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_bestups.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_bestups.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_bestups.c' object='nutdrv_qx-nutdrv_qx_bestups.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_bestups.obj `if test -f 'nutdrv_qx_bestups.c'; then $(CYGPATH_W) 'nutdrv_qx_bestups.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_bestups.c'; fi` nutdrv_qx-nutdrv_qx_blazer-common.o: nutdrv_qx_blazer-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_blazer-common.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_blazer-common.c' object='nutdrv_qx-nutdrv_qx_blazer-common.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_blazer-common.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_blazer-common.c' object='nutdrv_qx-nutdrv_qx_blazer-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_blazer-common.o `test -f 'nutdrv_qx_blazer-common.c' || echo '$(srcdir)/'`nutdrv_qx_blazer-common.c nutdrv_qx-nutdrv_qx_blazer-common.obj: nutdrv_qx_blazer-common.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_blazer-common.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_blazer-common.c' object='nutdrv_qx-nutdrv_qx_blazer-common.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_blazer-common.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo -c -o nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_blazer-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_blazer-common.c' object='nutdrv_qx-nutdrv_qx_blazer-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_blazer-common.obj `if test -f 'nutdrv_qx_blazer-common.c'; then $(CYGPATH_W) 'nutdrv_qx_blazer-common.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_blazer-common.c'; fi` nutdrv_qx-nutdrv_qx_mecer.o: nutdrv_qx_mecer.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mecer.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mecer.c' object='nutdrv_qx-nutdrv_qx_mecer.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mecer.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_mecer.c' object='nutdrv_qx-nutdrv_qx_mecer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mecer.o `test -f 'nutdrv_qx_mecer.c' || echo '$(srcdir)/'`nutdrv_qx_mecer.c nutdrv_qx-nutdrv_qx_mecer.obj: nutdrv_qx_mecer.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mecer.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mecer.c' object='nutdrv_qx-nutdrv_qx_mecer.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mecer.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo -c -o nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mecer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_mecer.c' object='nutdrv_qx-nutdrv_qx_mecer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mecer.obj `if test -f 'nutdrv_qx_mecer.c'; then $(CYGPATH_W) 'nutdrv_qx_mecer.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mecer.c'; fi` nutdrv_qx-nutdrv_qx_megatec.o: nutdrv_qx_megatec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec.c' object='nutdrv_qx-nutdrv_qx_megatec.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_megatec.c' object='nutdrv_qx-nutdrv_qx_megatec.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec.o `test -f 'nutdrv_qx_megatec.c' || echo '$(srcdir)/'`nutdrv_qx_megatec.c nutdrv_qx-nutdrv_qx_megatec.obj: nutdrv_qx_megatec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec.c' object='nutdrv_qx-nutdrv_qx_megatec.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_megatec.c' object='nutdrv_qx-nutdrv_qx_megatec.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec.obj `if test -f 'nutdrv_qx_megatec.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec.c'; fi` nutdrv_qx-nutdrv_qx_megatec-old.o: nutdrv_qx_megatec-old.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec-old.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec-old.c' object='nutdrv_qx-nutdrv_qx_megatec-old.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec-old.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_megatec-old.c' object='nutdrv_qx-nutdrv_qx_megatec-old.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec-old.o `test -f 'nutdrv_qx_megatec-old.c' || echo '$(srcdir)/'`nutdrv_qx_megatec-old.c nutdrv_qx-nutdrv_qx_megatec-old.obj: nutdrv_qx_megatec-old.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec-old.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_megatec-old.c' object='nutdrv_qx-nutdrv_qx_megatec-old.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_megatec-old.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo -c -o nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_megatec-old.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_megatec-old.c' object='nutdrv_qx-nutdrv_qx_megatec-old.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_megatec-old.obj `if test -f 'nutdrv_qx_megatec-old.c'; then $(CYGPATH_W) 'nutdrv_qx_megatec-old.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_megatec-old.c'; fi` nutdrv_qx-nutdrv_qx_mustek.o: nutdrv_qx_mustek.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mustek.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mustek.c' object='nutdrv_qx-nutdrv_qx_mustek.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mustek.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_mustek.c' object='nutdrv_qx-nutdrv_qx_mustek.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mustek.o `test -f 'nutdrv_qx_mustek.c' || echo '$(srcdir)/'`nutdrv_qx_mustek.c nutdrv_qx-nutdrv_qx_mustek.obj: nutdrv_qx_mustek.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mustek.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_mustek.c' object='nutdrv_qx-nutdrv_qx_mustek.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_mustek.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo -c -o nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_mustek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_mustek.c' object='nutdrv_qx-nutdrv_qx_mustek.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_mustek.obj `if test -f 'nutdrv_qx_mustek.c'; then $(CYGPATH_W) 'nutdrv_qx_mustek.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_mustek.c'; fi` nutdrv_qx-nutdrv_qx_q1.o: nutdrv_qx_q1.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.o `test -f 'nutdrv_qx_q1.c' || echo '$(srcdir)/'`nutdrv_qx_q1.c nutdrv_qx-nutdrv_qx_q1.obj: nutdrv_qx_q1.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_q1.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_q1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_q1.c' object='nutdrv_qx-nutdrv_qx_q1.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_q1.obj `if test -f 'nutdrv_qx_q1.c'; then $(CYGPATH_W) 'nutdrv_qx_q1.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_q1.c'; fi` nutdrv_qx-nutdrv_qx_voltronic.o: nutdrv_qx_voltronic.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic.c' object='nutdrv_qx-nutdrv_qx_voltronic.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic.c' object='nutdrv_qx-nutdrv_qx_voltronic.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic.o `test -f 'nutdrv_qx_voltronic.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic.c nutdrv_qx-nutdrv_qx_voltronic.obj: nutdrv_qx_voltronic.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic.c' object='nutdrv_qx-nutdrv_qx_voltronic.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic.c' object='nutdrv_qx-nutdrv_qx_voltronic.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic.obj `if test -f 'nutdrv_qx_voltronic.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic.c'; fi` nutdrv_qx-nutdrv_qx_voltronic-qs.o: nutdrv_qx_voltronic-qs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.o `test -f 'nutdrv_qx_voltronic-qs.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs.c nutdrv_qx-nutdrv_qx_voltronic-qs.obj: nutdrv_qx_voltronic-qs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic-qs.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs.obj `if test -f 'nutdrv_qx_voltronic-qs.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs.c'; fi` + +nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o: nutdrv_qx_voltronic-qs-hex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o `test -f 'nutdrv_qx_voltronic-qs-hex.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs-hex.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic-qs-hex.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs-hex.o `test -f 'nutdrv_qx_voltronic-qs-hex.c' || echo '$(srcdir)/'`nutdrv_qx_voltronic-qs-hex.c + +nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj: nutdrv_qx_voltronic-qs-hex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Tpo -c -o nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj `if test -f 'nutdrv_qx_voltronic-qs-hex.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs-hex.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs-hex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_voltronic-qs-hex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_voltronic-qs-hex.c' object='nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_voltronic-qs-hex.obj `if test -f 'nutdrv_qx_voltronic-qs-hex.c'; then $(CYGPATH_W) 'nutdrv_qx_voltronic-qs-hex.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_voltronic-qs-hex.c'; fi` nutdrv_qx-nutdrv_qx_zinto.o: nutdrv_qx_zinto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_zinto.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_zinto.c' object='nutdrv_qx-nutdrv_qx_zinto.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_zinto.o -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_zinto.c' object='nutdrv_qx-nutdrv_qx_zinto.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_zinto.o `test -f 'nutdrv_qx_zinto.c' || echo '$(srcdir)/'`nutdrv_qx_zinto.c nutdrv_qx-nutdrv_qx_zinto.obj: nutdrv_qx_zinto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_zinto.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutdrv_qx_zinto.c' object='nutdrv_qx-nutdrv_qx_zinto.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -MT nutdrv_qx-nutdrv_qx_zinto.obj -MD -MP -MF $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo -c -o nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Tpo $(DEPDIR)/nutdrv_qx-nutdrv_qx_zinto.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutdrv_qx_zinto.c' object='nutdrv_qx-nutdrv_qx_zinto.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nutdrv_qx_CFLAGS) $(CFLAGS) -c -o nutdrv_qx-nutdrv_qx_zinto.obj `if test -f 'nutdrv_qx_zinto.c'; then $(CYGPATH_W) 'nutdrv_qx_zinto.c'; else $(CYGPATH_W) '$(srcdir)/nutdrv_qx_zinto.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -1569,26 +1766,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1600,15 +1786,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1617,6 +1799,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1761,21 +1958,21 @@ uninstall-am: uninstall-driverexecPROGRAMS uninstall-sbinPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-driverexecPROGRAMS clean-generic clean-libtool \ - clean-sbinPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-driverexecPROGRAMS \ - 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-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-driverexecPROGRAMS \ - uninstall-sbinPROGRAMS + clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-driverexecPROGRAMS 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-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-driverexecPROGRAMS uninstall-sbinPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/drivers/apc-hid.c b/drivers/apc-hid.c index 1d85621..34601d5 100644 --- a/drivers/apc-hid.c +++ b/drivers/apc-hid.c @@ -79,6 +79,8 @@ static void *general_apc_check(USBDevice_t *device) /* USB IDs device table */ static usb_device_id_t apc_usb_device_table[] = { + /* APC AP9584 Serial->USB kit */ + { USB_DEVICE(APC_VENDORID, 0x0000), NULL }, /* various models */ { USB_DEVICE(APC_VENDORID, 0x0002), general_apc_check }, /* various 5G models */ diff --git a/drivers/apcsmart.c b/drivers/apcsmart.c index 018b29d..d437467 100644 --- a/drivers/apcsmart.c +++ b/drivers/apcsmart.c @@ -1004,7 +1004,7 @@ static void apc_getcaps(int qco) /* make sure setvar knows what this is */ vt->flags |= APC_RW | APC_ENUM; - } else if (vt->flags & APC_PACK) + } else if (vt && (vt->flags & APC_PACK)) /* * Currently we assume - basing on the following * feedback: @@ -1208,7 +1208,7 @@ static int getbaseinfo(void) { unsigned int i; int ret, qco; - char *cmds, temp[APC_LBUF]; + char *cmds, *tail, temp[APC_LBUF]; /* * try firmware lookup first; we could start with 'a', but older models @@ -1243,9 +1243,16 @@ static int getbaseinfo(void) /* * returned set is verified for validity above, so just extract * what's interesting for us + * + * the known format is: + * ver.alerts.commands[.stuff] */ - cmds = strrchr(temp, '.'); - for (i = 1; i < strlen(cmds); i++) + cmds = strchr(temp, '.'); + cmds = strchr(cmds + 1, '.'); + tail = strchr(++cmds, '.'); + if (tail) + *tail = 0; + for (i = 0; i < strlen(cmds); i++) protocol_verify(cmds[i]); deprecate_vars(); @@ -1691,7 +1698,7 @@ static int setvar_enum(apc_vartab_t *vt, const char *val) return STAT_SET_HANDLED; /* FUTURE: no change */ } - for (i = 0; i < 6; i++) { + for (i = 0; i < 32; i++) { if (apc_write(APC_NEXTVAL) != 1) return STAT_SET_FAILED; diff --git a/drivers/apcsmart.h b/drivers/apcsmart.h index c0155db..8bfc914 100644 --- a/drivers/apcsmart.h +++ b/drivers/apcsmart.h @@ -143,7 +143,7 @@ #define APC_GOSMART 'Y' #define APC_GODUMB 'R' #define APC_CMDSET 'a' -#define APC_CMDSET_FMT "^[0-9]\\.[^.]*\\.[^.]+$" +#define APC_CMDSET_FMT "^[0-9]\\.[^.]*\\.[^.]+(\\.[^.]+)?$" #define APC_CAPS '\032' /* ^Z */ #define APC_NEXTVAL '-' #define APC_FW_OLD 'V' diff --git a/drivers/asem.c b/drivers/asem.c new file mode 100644 index 0000000..d5d6ea5 --- /dev/null +++ b/drivers/asem.c @@ -0,0 +1,373 @@ +/* asem.c - driver for ASEM PB 1300 hardware, accessible through i2c. + + Copyright (C) 2014 Giuseppe Corbelli + + 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 + + ASEM SPA contributed with support and documentation. + Copan Italia SPA funded the development. + + There are 2 versions of the charger. Older one is based on Max1667, + newer one is a custom solution. Both are on address 0x09. + To be compatible with both versions just read bit 15 of address 0x13 + to have online/on battery status. + Battery monitor is a BQ2060 at address 0x0B. + + Beware that the SystemIO memory used by the i2c controller is reserved by ACPI. + On Linux, as of 3.5.x kernel only a native driver (i2c_i801) is available, + so you need to boot with acpi_enforce_resources=lax option. +*/ + +/* Depends on i2c-dev.h, Linux only */ +#include +#include +#include +#include + +#include "main.h" + +#ifndef __STR__ +# define __STR__(x) #x +#endif +#ifndef __XSTR__ +# define __XSTR__(x) __STR__(x) +#endif + +#define DRIVER_NAME "ASEM" +#define DRIVER_VERSION "0.10" + +/* Valid on ASEM PB1300 UPS */ +#define BQ2060_ADDRESS 0x0B +#define CHARGER_ADDRESS 0x09 + +#define CMD_DEVICENAME 0x21 + +#define LOW_BATTERY_THRESHOLD 25 +#define HIGH_BATTERY_THRESHOLD 75 + +#define ACCESS_DEVICE(fd, address) \ + if (ioctl(fd, I2C_SLAVE, address) < 0) { \ + fatal_with_errno(EXIT_FAILURE, "Failed to acquire bus access and/or talk to slave 0x%02X", address); \ + } + +static unsigned long lb_threshold = LOW_BATTERY_THRESHOLD; +static unsigned long hb_threshold = HIGH_BATTERY_THRESHOLD; + +static char *valid_devicename_data[] = { + "ASEM SPA", + NULL +}; + +upsdrv_info_t upsdrv_info = { + DRIVER_NAME, + DRIVER_VERSION, + "Giuseppe Corbelli ", + DRV_EXPERIMENTAL, + {NULL} +}; + +void upsdrv_initinfo(void) +{ + __s32 i2c_status; + __u8 buffer[10]; + unsigned short year, month, day; + + ACCESS_DEVICE(upsfd, BQ2060_ADDRESS); + + /* Set capacity mode in mA(h) */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x03); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read BatteryMode word data"); + } + /* Clear 15th bit */ + i2c_status = i2c_smbus_write_word_data(upsfd, 0x03, i2c_status & ~0x8000); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not set BatteryMode word data"); + } + + /* Device name */ + memset(buffer, 0, 10); + i2c_status = i2c_smbus_read_block_data(upsfd, 0x21, buffer); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read DeviceName block data"); + } + upsdebugx(1, "UPS model %s", (char *) buffer); + dstate_setinfo("ups.model", "%s", (char *) buffer); + + /* Manufacturing date */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x1B); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read ManufactureDate word data"); + } + /* (Year - 1980) * 512 */ + year = (i2c_status >> 9) & 0x000000FF; + /* Month * 32 */ + month = (i2c_status >> 4) & 0x0000001F; + day = i2c_status & 0x0000001F; + upsdebugx(1, "UPS manufacturing date %d-%02d-%02d (%d)", year + 1980, month, day, i2c_status); + dstate_setinfo("ups.mfr.date", "%d-%02d-%02d", year + 1980, month, day); + + /* Device chemistry */ + memset(buffer, 0, 10); + i2c_status = i2c_smbus_read_block_data(upsfd, 0x22, buffer); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read DeviceChemistry block data"); + } + upsdebugx(1, "Battery chemistry %s", (char *) buffer); + dstate_setinfo("battery.type", "%s", (char *) buffer); + + /* Serial number */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x1C); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read SerialNumber block data"); + } + upsdebugx(1, "Serial Number %d", i2c_status); + dstate_setinfo("ups.serial", "%d", i2c_status); +} + +void upsdrv_updateinfo(void) +{ + static char online; + static char discharging; + static char fully_charged; + static unsigned short charge_percentage; + static unsigned short voltage; + static unsigned short capacity; + static signed short current; + static __s32 i2c_status; + static __s32 temperature; + static __s32 runtime_to_empty; + + ACCESS_DEVICE(upsfd, CHARGER_ADDRESS); + /* Charger only supplies online/offline status */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x13); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read charger status word at address 0x13"); + return; + } + online = (i2c_status & 0x8000) != 0; + upsdebugx(3, "Charger status 0x%02X, online %d", i2c_status, online); + + ACCESS_DEVICE(upsfd, BQ2060_ADDRESS); + i2c_status = i2c_smbus_read_word_data(upsfd, 0x16); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read bq2060 status word at address 0x16"); + return; + } + upsdebugx(3, "bq2060 status 0x04%X", i2c_status); + /* Busy, leave data as stale, try next time */ + if (i2c_status & 0x0001) { + dstate_datastale(); + upslogx(LOG_NOTICE, "bq2060 is busy"); + return; + } + /* Error, leave data as stale, try next time */ + if (i2c_status & 0x000F) { + dstate_datastale(); + upslogx(LOG_WARNING, "bq2060 returned error code 0x%02X", i2c_status & 0x000F); + return; + } + + discharging = (i2c_status & 0x0040); + fully_charged = (i2c_status & 0x0020); + + /* Charge percentage */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x0D); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read charge percentage from bq2060 at address 0x0D"); + return; + } + charge_percentage = i2c_status & 0xFFFF; + upsdebugx(3, "Charge percentage %03d", charge_percentage); + + /* Battery voltage in mV */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x09); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read voltage from bq2060 at address 0x09"); + return; + } + voltage = i2c_status & 0x0000FFFF; + upsdebugx(3, "Battery voltage %d mV", voltage); + + /* Temperature in °K */ + temperature = i2c_smbus_read_word_data(upsfd, 0x08); + if (temperature == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read temperature from bq2060 at address 0x08"); + return; + } + upsdebugx(3, "Temperature %4.1f K", temperature / 10.0); + + /* Current load in mA, positive for charge, negative for discharge */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x0A); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read current from bq2060 at address 0x0A"); + return; + } + current = i2c_status & 0x0000FFFF; + upsdebugx(3, "Current %d mA", current); + + /* Current capacity */ + i2c_status = i2c_smbus_read_word_data(upsfd, 0x0F); + if (i2c_status == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read RemainingCapacity word data"); + return; + } + capacity = i2c_status & 0x0000FFFF; + upsdebugx(3, "Current capacity %d mAh", capacity); + + /* Expected runtime capacity, averaged by gauge */ + runtime_to_empty = i2c_smbus_read_word_data(upsfd, 0x12); + if (runtime_to_empty == -1) { + dstate_datastale(); + upslogx(LOG_ERR, "Could not read AverageTimeToEmpty word data"); + return; + } + upsdebugx(3, "Expected run-time to empty %d m", runtime_to_empty); + + status_init(); + status_set(online ? "OL" : "OB"); + if (!discharging & !fully_charged) + status_set("CHRG"); + else if (discharging && current < 0) + status_set("DISCHRG"); + + if (charge_percentage >= hb_threshold) + status_set("HB"); + else if (charge_percentage <= lb_threshold) + status_set("LB"); + + /* In V */ + dstate_setinfo("battery.voltage", "%2.3f", voltage / 1000.0); + /* In mAh */ + dstate_setinfo("battery.current", "%2.3f", current / 1000.0); + dstate_setinfo("battery.charge", "%d", charge_percentage); + /* In mAh */ + dstate_setinfo("battery.capacity", "%2.3f", capacity / 1000.0); + /* In °C */ + dstate_setinfo("ups.temperature", "%4.1f", (temperature / 10.0) - 273.15); + /* In seconds */ + dstate_setinfo("battery.runtime", "%d", runtime_to_empty * 60); + status_commit(); + dstate_dataok(); +} + +void upsdrv_shutdown(void) +{ + /* tell the UPS to shut down, then return - DO NOT SLEEP HERE */ + + /* maybe try to detect the UPS here, but try a shutdown even if + it doesn't respond at first if possible */ + + /* replace with a proper shutdown function */ + fatalx(EXIT_FAILURE, "shutdown not supported"); + + /* you may have to check the line status since the commands + for toggling power are frequently different for OL vs. OB */ + + /* OL: this must power cycle the load if possible */ + + /* OB: the load must remain off until the power returns */ +} + +void upsdrv_help(void) +{ + /* Redundant */ + printf("\nASEM options\n"); + printf(" HIGH/low battery thresholds\n"); + printf(" lb = " __XSTR__(LOW_BATTERY_THRESHOLD) " (battery is low under this level)\n"); + printf(" hb = " __XSTR__(HIGH_BATTERY_THRESHOLD) " (battery is high above this level)\n"); +} + +/* list flags and values that you want to receive via -x */ +void upsdrv_makevartable(void) +{ + addvar(VAR_VALUE, "lb", "Low battery threshold, default " __XSTR__(LOW_BATTERY_THRESHOLD)); + addvar(VAR_VALUE, "hb", "High battery threshold, default " __XSTR__(HIGH_BATTERY_THRESHOLD)); +} + +void upsdrv_initups(void) +{ + __s32 i2c_status; + __u8 DeviceName_buffer[10]; + unsigned int i; + unsigned long x; + char *DeviceName; + char *option; + + upsfd = open(device_path, O_RDWR); + if (upsfd < 0) { + fatal_with_errno(EXIT_FAILURE, "Could not open device port '%s'", device_path); + } + + ACCESS_DEVICE(upsfd, BQ2060_ADDRESS); + + /* Get ManufacturerName */ + memset(DeviceName_buffer, 0, 10); + i2c_status = i2c_smbus_read_block_data(upsfd, 0x20, DeviceName_buffer); + if (i2c_status == -1) { + fatal_with_errno(EXIT_FAILURE, "Could not read DeviceName block data"); + } + i = 0; + while ( (DeviceName = valid_devicename_data[i++]) ) { + if (0 == memcmp(DeviceName, DeviceName_buffer, i2c_status)) + break; + } + if (!DeviceName) { + fatal_with_errno(EXIT_FAILURE, "Device '%s' unknown", (char *) DeviceName_buffer); + } + upsdebugx(1, "Found device '%s' on port '%s'", (char *) DeviceName, device_path); + dstate_setinfo("ups.mfr", "%s", (char *) DeviceName); + + option = getval("lb"); + if (option) { + x = strtoul(option, NULL, 0); + if ((x == 0) && (errno != 0)) { + upslogx(LOG_WARNING, "Invalid value specified for low battery threshold: '%s'", option); + } else { + lb_threshold = x; + } + } + option = getval("hb"); + if (option) { + x = strtoul(option, NULL, 0); + if ((x == 0) && (errno != 0)) { + upslogx(LOG_WARNING, "Invalid value specified for high battery threshold: '%s'", option); + } else if ((x < 1) || (x > 100)) { + upslogx(LOG_WARNING, "Invalid value specified for high battery threshold: '%s' (must be 1 < hb <= 100)", option); + } else { + hb_threshold = x; + } + } + /* Invalid values specified */ + if (lb_threshold > hb_threshold) { + upslogx(LOG_WARNING, "lb > hb specified in options. Returning to defaults."); + lb_threshold = LOW_BATTERY_THRESHOLD; + hb_threshold = HIGH_BATTERY_THRESHOLD; + } + + upslogx(LOG_NOTICE, "High battery threshold is %lu, low battery threshold is %lu", lb_threshold, hb_threshold); +} + +void upsdrv_cleanup(void) +{ + close(upsfd); +} diff --git a/drivers/bcmxcp.c b/drivers/bcmxcp.c index ad3c5eb..98553c1 100644 --- a/drivers/bcmxcp.c +++ b/drivers/bcmxcp.c @@ -9,7 +9,7 @@ Copyright (C) 2004 Kjell Claesson 2004 Tore Ørpetveit - 2011 - 2012 Arnaud Quette + 2011 - 2015 Arnaud Quette Thanks to Tore Ørpetveit that sent me the manuals for bcm/xcp. @@ -22,7 +22,7 @@ ojw0000 2007Apr5 Oliver Wilcock - modified to control individual load segments (outlet.2.shutdown.return) on Powerware PW5125. Modified to support setvar for outlet.n.delay.start by Rich Wrenn (RFW) 9-3-11. - Modified to support setvar for outlet.n.delay.shutdown by Arnaud Quette, 9-12-11 + Modified to support setvar for outlet.n.delay.shutdown by Arnaud Quette, 9-12-11 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 @@ -40,72 +40,72 @@ This program is free software; you can redistribute it and/or modify TODO List: - Extend the parsing of the Standard ID Block, to read: + Extend the parsing of the Standard ID Block, to read: - Config Block Length: (High priority) - Give information if config block is - present, and how long it is, if it exist. - If config block exist, read the config block and parse the - 'Length of the Extended Limits Configuration Block' for - extended configuration commands + Config Block Length: (High priority) + Give information if config block is + present, and how long it is, if it exist. + If config block exist, read the config block and parse the + 'Length of the Extended Limits Configuration Block' for + extended configuration commands - Statistic map Size: (Low priority) - May be used to se if there is a Statistic Map. - It holds data on the utility power quality for - the past month and since last reset. Number of - times on battery and how long. Up time and utility - frequency deviation. (Only larger ups'es) + Statistic map Size: (Low priority) + May be used to se if there is a Statistic Map. + It holds data on the utility power quality for + the past month and since last reset. Number of + times on battery and how long. Up time and utility + frequency deviation. (Only larger ups'es) - Size of Alarm History Log: (Low priority) - See if it have any alarm history block and enable - command to dump it. + Size of Alarm History Log: (Low priority) + See if it have any alarm history block and enable + command to dump it. - Maximum Supported Command Length: ( Med. to High priority) - Give info about the ups receive buffer size. + Maximum Supported Command Length: ( Med. to High priority) + Give info about the ups receive buffer size. - Size of Alarm Block: ( Med. to High priority) - Make a smarter handling of the Active alarm's if we know the length - of the Active Alarm Block. Don't need the long loop to parse the - alarm's. Maybe use another way to set up the alarm struct in the - 'init_alarm_map'. + Size of Alarm Block: ( Med. to High priority) + Make a smarter handling of the Active alarm's if we know the length + of the Active Alarm Block. Don't need the long loop to parse the + alarm's. Maybe use another way to set up the alarm struct in the + 'init_alarm_map'. - Parse 'Communication Capabilities Block' ( Low priority) - Get info of the connected ports ID, number of baud rates, - command and respnse length. + Parse 'Communication Capabilities Block' ( Low priority) + Get info of the connected ports ID, number of baud rates, + command and respnse length. - Parse 'Communication Port List Block': ( Low priority) - This block gives info about the communication ports. Some ups'es - have multiple comport's, and use one port for eatch load segment. - In this block it is possible to get: - Number of ports. (In this List) - This Comport id (Which Comm Port is reporting this block.) - Comport id (Id for eatch port listed. The first comport ID=1) - Baudrate of the listed port. - Serial config. - Port usage: - What this Comm Port is being used for: - 0 = Unknown usage, No communication occurring. - 1 = Undefined / Unknown communication occurring - 2 = Waiting to communicate with a UPS - 3 = Communication established with a UPS - 4 = Waiting to communicate with software or adapter - 5 = Communication established software (e.g., LanSafe) - or adapter (e.g., ConnectUPS) - 6 = Communicating with a Display Device - 7 = Multi-drop Serial channel - 8 = Communicating with an Outlet Controller - Number of outlets. (Number of Outlets "assigned to" (controlled by) this Comm Port) - Outlet number. (Each assigned Outlet is listed (1-64)) + Parse 'Communication Port List Block': ( Low priority) + This block gives info about the communication ports. Some ups'es + have multiple comport's, and use one port for eatch load segment. + In this block it is possible to get: + Number of ports. (In this List) + This Comport id (Which Comm Port is reporting this block.) + Comport id (Id for eatch port listed. The first comport ID=1) + Baudrate of the listed port. + Serial config. + Port usage: + What this Comm Port is being used for: + 0 = Unknown usage, No communication occurring. + 1 = Undefined / Unknown communication occurring + 2 = Waiting to communicate with a UPS + 3 = Communication established with a UPS + 4 = Waiting to communicate with software or adapter + 5 = Communication established software (e.g., LanSafe) + or adapter (e.g., ConnectUPS) + 6 = Communicating with a Display Device + 7 = Multi-drop Serial channel + 8 = Communicating with an Outlet Controller + Number of outlets. (Number of Outlets "assigned to" (controlled by) this Comm Port) + Outlet number. (Each assigned Outlet is listed (1-64)) - 'Set outlet parameter command (0x97)' to alter the delay - settings or turn the outlet on or off with a delay (0 - 32767 seconds) + 'Set outlet parameter command (0x97)' to alter the delay + settings or turn the outlet on or off with a delay (0 - 32767 seconds) - Rewrite some parts of the driver, to minimise code duplication. (Like the instant commands) + Rewrite some parts of the driver, to minimise code duplication. (Like the instant commands) - Implement support for Password Authorization (XCP spec, §4.3.2) + Implement support for Password Authorization (XCP spec, §4.3.2) - Complete support for settable variables (upsh.setvar) + Complete support for settable variables (upsh.setvar) */ @@ -117,24 +117,26 @@ TODO List: #include "bcmxcp.h" #define DRIVER_NAME "BCMXCP UPS driver" -#define DRIVER_VERSION "0.28" +#define DRIVER_VERSION "0.30" #define MAX_NUT_NAME_LENGTH 128 #define NUT_OUTLET_POSITION 7 /* driver description structure */ upsdrv_info_t upsdrv_info = { - DRIVER_NAME, - DRIVER_VERSION, - "Martin Schroeder \n" \ - "Kjell Claesson \n" \ - "Tore Ørpetveit \n" \ - "Wolfgang Ocker \n" \ - "Oliver Wilcock\n" \ - "Prachi Gandhi \n" \ - "Alf Høgemark ", - DRV_STABLE, - { &comm_upsdrv_info, NULL } + DRIVER_NAME, + DRIVER_VERSION, + "Martin Schroeder \n" \ + "Kjell Claesson \n" \ + "Tore Ørpetveit \n" \ + "Arnaud Quette \n" \ + "Wolfgang Ocker \n" \ + "Oliver Wilcock\n" \ + "Prachi Gandhi \n" \ + "Alf Høgemark \n" \ + "Gavrilov Igor", + DRV_STABLE, + { &comm_upsdrv_info, NULL } }; static int get_word(const unsigned char*); @@ -146,6 +148,7 @@ static void init_alarm_map(void); static bool_t init_command(int size); static void init_config(void); static void init_limit(void); +static void init_ext_vars(void); static void init_topology(void); static void init_ups_meter_map(const unsigned char *map, unsigned char len); static void init_ups_alarm_map(const unsigned char *map, unsigned char len); @@ -156,18 +159,20 @@ static void init_system_test_capabilities(void); static int instcmd(const char *cmdname, const char *extra); static int setvar(const char *varname, const char *val); static int decode_instcmd_exec(const int res, const unsigned char exec_status, const char *cmdname, const char *success_msg); +static int decode_setvar_exec(const int res, const unsigned char exec_status, const char *cmdname, const char *success_msg); static float calculate_ups_load(const unsigned char *data); static const char *nut_find_infoval(info_lkp_t *xcp2info, const double value, const bool_t debug_output_nonexisting); const char *FreqTol[3] = {"+/-2%", "+/-5%", "+/-7"}; -const char *ABMStatus[4] = {"Charging", "Discharging", "Floating", "Resting"}; +const char *ABMStatus[4] = {"charging", "discharging", "floating", "resting"}; +const char *OutletStatus[9] = {"unknown","on/closed","off/open","on with pending","off with pending","unknown","unknown","failed and closed","failed and open"}; /* Standard Authorization Block */ unsigned char AUTHOR[4] = {0xCF, 0x69, 0xE8, 0xD5}; int nphases = 0; int outlet_block_len = 0; const char *cpu_name[5] = {"Cont:", "Inve:", "Rect:", "Netw:", "Disp:"}; - +const char *horn_stat[3] = {"disabled", "enabled", "muted"}; /* Battery test results */ @@ -214,6 +219,8 @@ info_lkp_t command_map_info[] = { { PW_INIT_BAT_TEST, "test.battery.start", NULL }, { PW_LOAD_OFF_RESTART, "shutdown.return", NULL }, { PW_UPS_OFF, "shutdown.stayoff", NULL }, + { PW_UPS_ON, "load.on", NULL}, + { PW_GO_TO_BYPASS, "bypass.start", NULL}, { 0, NULL, NULL } }; @@ -1003,7 +1010,8 @@ int init_outlet(unsigned char len) outlet_state = answer[iIndex++]; upsdebugx(2, "Outlet state: %d", outlet_state); snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.status", num); - dstate_setinfo(outlet_name, "%s", (outlet_state & 0x01 ? "On" : "Off")); + if (outlet_state>0 && outlet_state <9 ) + dstate_setinfo(outlet_name, "%s", OutletStatus[outlet_state] ); auto_dly_off = get_word(answer+iIndex); iIndex += 2; @@ -1025,10 +1033,91 @@ int init_outlet(unsigned char len) return num_outlet; } +void init_ext_vars(void) +{ + unsigned char answer[PW_ANSWER_MAX_SIZE],cbuf[5]; + int length=0,index=0; + + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + cbuf[0] = PW_SET_CONF_COMMAND; + cbuf[1] = PW_CONF_REQ; + cbuf[2] = 0x0; + cbuf[3] = 0x0; + + length=command_write_sequence(cbuf,4,answer); + if (length <= 0) + fatal_with_errno(EXIT_FAILURE, "Could not communicate with the ups"); + if (length < 4) //UPS dont have configurable vars + return; + for( index=3; index < length; index++) { + switch(answer[index]){ + case PW_CONF_LOW_DEV_LIMIT: dstate_setinfo("input.transfer.boost.high","%d",0); + dstate_setflags("input.transfer.boost.high", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("input.transfer.boost.high", 3); + break; + + case PW_CONF_HIGH_DEV_LIMIT: dstate_setinfo("input.transfer.trim.low","%d",0); + dstate_setflags("input.transfer.trim.low", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("input.transfer.trim.low", 3); + break; + + case PW_CONF_LOW_BATT: dstate_setinfo("battery.runtime.low","%d",0); + dstate_setflags("battery.runtime.low", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.runtime.low", 2); + break; + + case PW_CONF_BEEPER: dstate_addcmd("beeper.disable"); + dstate_addcmd("beeper.enable"); + dstate_addcmd("beeper.mute"); + break; + + case PW_CONF_RETURN_DELAY: dstate_setinfo("input.transfer.delay","%d",0); + dstate_setflags("input.transfer.delay", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("input.transfer.delay", 5); + break; + + case PW_CONF_RETURN_CAP: dstate_setinfo("battery.charge.restart","%d",0); + dstate_setflags("battery.charge.restart", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.charge.restart", 3); + break; + + case PW_CONF_MAX_TEMP: dstate_setinfo("ambient.temperature.high","%d",0); + dstate_setflags("ambient.temperature.high", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("ambient.temperature.high", 3); + break; + + case PW_CONF_NOMINAL_OUT_VOLTAGE: dstate_setinfo("output.voltage.nominal","%d",0); + dstate_setflags("output.voltage.nominal", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("output.voltage.nominal", 3); + break; + + case PW_CONF_SLEEP_TH_LOAD: dstate_setinfo("battery.energysave.load","%d",0); + dstate_setflags("battery.energysave.load", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.energysave.load", 3); + break; + + case PW_CONF_SLEEP_DELAY: dstate_setinfo("battery.energysave.delay","%d",0); + dstate_setflags("battery.energysave.delay", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.energysave.delay", 3); + break; + + case PW_CONF_BATT_STRINGS: dstate_setinfo("battery.packs","%d",0); + dstate_setflags("battery.packs", ST_FLAG_RW | ST_FLAG_STRING); + dstate_setaux("battery.packs", 1); + break; + + } + } +} + + void init_config(void) { unsigned char answer[PW_ANSWER_MAX_SIZE]; - int voltage = 0, frequency = 0, res; + int voltage = 0, frequency = 0, res, tmp=0; char sValue[17]; char sPartNumber[17]; @@ -1049,11 +1138,16 @@ void init_config(void) if (frequency != 0) dstate_setinfo("output.frequency.nominal", "%d", frequency); + /*Number of EBM*/ + tmp = (int) *(answer + BCMXCP_CONFIG_BLOCK_BATTERY_DATA_WORD3); + if (tmp != 0) + dstate_setinfo("battery.packs", "%d", tmp); + /* UPS serial number */ snprintf(sValue, sizeof(sValue), "%s", answer + BCMXCP_CONFIG_BLOCK_SERIAL_NUMBER); if(sValue[0] != '\0') dstate_setinfo("ups.serial", "%s", sValue); - + /* UPS Part Number*/ snprintf(sPartNumber, sizeof(sPartNumber), "%s", answer + BCMXCP_CONFIG_BLOCK_PART_NUMBER); if(sPartNumber[0] != '\0') @@ -1064,7 +1158,6 @@ void init_limit(void) { unsigned char answer[PW_ANSWER_MAX_SIZE]; int value, res; - const char *horn_stat[3] = {"disabled", "enabled", "muted"}; res = command_read_sequence(PW_LIMIT_BLOCK_REQ, answer); if (res <= 0) { @@ -1141,6 +1234,37 @@ void init_limit(void) if (value != 0) { dstate_setinfo("ambient.temperature.high", "%d", value); } + + /*Sleep minimum load*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_SLEEP_TH_LOAD]; + if (value != 0) { + dstate_setinfo("battery.energysave.load", "%d", value); + } + + /* Sleep delay*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_SLEEP_DELAY]; + if (value != 0) { + dstate_setinfo("battery.energysave.delay", "%d", value); + } + + /* Low batt minutes warning*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_LOW_BATT_WARNING]; + if (value != 0) { + dstate_setinfo("battery.runtime.low", "%d", value); + } + + /* Return to mains delay */ + value = get_word(answer + BCMXCP_EXT_LIMITS_BLOCK_RETURN_STAB_DELAY); + if (value != 0) { + dstate_setinfo("input.transfer.delay","%d",value); + } + + /* Minimum return capacity*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_BATT_CAPACITY_RETURN]; + if (value != 0) { + dstate_setinfo("battery.charge.restart","%d",value); + } + } void init_topology(void) @@ -1168,7 +1292,7 @@ void init_system_test_capabilities(void) /* Query what system test capabilities are supported */ send_write_command(AUTHOR, 4); - + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ cbuf[0] = PW_INIT_SYS_TEST; @@ -1322,7 +1446,6 @@ void upsdrv_initinfo(void) /* Size of custom event log, always 0 according to spec */ iIndex += 2; - /* Size of topology block */ topology_block_len = get_word(answer+iIndex); upsdebugx(2, "Length of topology block: %d\n", topology_block_len); @@ -1359,6 +1482,10 @@ void upsdrv_initinfo(void) for(res = 1 ; res <= len ; res++) { snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.shutdown.return", res); dstate_addcmd(outlet_name); + snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.load.on", res); + dstate_addcmd(outlet_name); + snprintf(outlet_name, sizeof(outlet_name)-1, "outlet.%d.load.off", res); + dstate_addcmd(outlet_name); } } @@ -1384,6 +1511,8 @@ void upsdrv_initinfo(void) if (bcmxcp_command_map[PW_INIT_SYS_TEST].command_byte > 0) { init_system_test_capabilities(); } + /* Get information about configurable external variables*/ + init_ext_vars(); upsh.instcmd = instcmd; upsh.setvar = setvar; @@ -1394,7 +1523,7 @@ void upsdrv_updateinfo(void) unsigned char answer[PW_ANSWER_MAX_SIZE]; unsigned char status, topology; char sValue[128]; - int iIndex, res; + int iIndex, res,value; bool_t has_ups_load = FALSE; int batt_status = 0; const char *nutvalue; @@ -1565,7 +1694,7 @@ void upsdrv_updateinfo(void) * 03 0a d7 25 42 0a d7 25 42 00 9a 19 6d 43 cd cc 4c 3e 01 00 01 03 */ upsdebug_hex(2, "Battery Status", answer, res); - batt_status = answer[0]; + batt_status = answer[BCMXCP_BATTDATA_BLOCK_BATT_TEST_STATUS]; if ((nutvalue = nut_find_infoval(batt_test_info, batt_status, TRUE)) != NULL) { dstate_setinfo("ups.test.result", "%s", nutvalue); @@ -1574,8 +1703,125 @@ void upsdrv_updateinfo(void) else { upsdebugx(1, "Failed to extract Battery Status from answer"); } + + /*Extracting internal batteries ABM status*/ + /*Placed first in ABM statuses list. For examples above - on position BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS (18): + PW5115RM - 0 - no external strings, no status bytes, + so next byte (19) - number of ABM statuses, next (20) - first ABM Status for internal batteries. + + PW9130 - 1 - one external string, so one additional status byte (#19 - 00 - no test run), next(20) - number of ABM statuses, + next (21) - ABM Status for internal batteries. + */ + value=*(answer + BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS + *(answer + BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS)*1+2 ); + upsdebugx(2, "ABM Status = %d ",value); + if (value > 0 && value < 5) + dstate_setinfo("battery.charger.status","%s",ABMStatus[value-1]); } + + res = command_read_sequence(PW_LIMIT_BLOCK_REQ, answer); + if (res <= 0) { + upsdebugx(1, "Failed to read EXT LIMITs from UPS"); + } else + { + /* Nominal input voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_NOMINAL_INPUT_VOLTAGE)); + + if (value != 0) { + dstate_setinfo("input.voltage.nominal", "%d", value); + } + + /* Bypass Voltage Low Deviation Limit / Transfer to Boost Voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_VOLTAGE_LOW_DEV_LIMIT)); + + if (value != 0) { + dstate_setinfo("input.transfer.boost.high", "%d", value); + } + + /* Bypass Voltage High Deviation Limit / Transfer to Buck Voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_VOLTAGE_HIGE_DEV_LIMIT)); + + if (value != 0) { + dstate_setinfo("input.transfer.trim.low", "%d", value); + } + + /* Minimum Supported Input Voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_MIN_INPUT_VOLTAGE)); + + if (value != 0) { + dstate_setinfo("input.transfer.low", "%d", value); + } + + /* Maximum Supported Input Voltage */ + value = get_word((answer + BCMXCP_EXT_LIMITS_BLOCK_MAX_INPUT_VOLTAGE)); + + if (value != 0) { + dstate_setinfo("input.transfer.high", "%d", value); + } + + /* Horn Status: */ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_HORN_STATUS]; + + if (value >= 0 && value <= 2) { + dstate_setinfo("ups.beeper.status", "%s", horn_stat[value]); + } + /* AAmbient Temperature Upper Alarm Limit */ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_AMBIENT_TEMP_HIGE]; + + if (value != 0) { + dstate_setinfo("ambient.temperature.high", "%d", value); + } + + /*Sleep minimum load*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_SLEEP_TH_LOAD]; + if (value != 0) { + dstate_setinfo("battery.energysave.load", "%d", value); + } + + /* Sleep delay*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_SLEEP_DELAY]; + if (value != 0) { + dstate_setinfo("battery.energysave.delay", "%d", value); + } + + /* Low batt minutes warning*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_LOW_BATT_WARNING]; + if (value != 0) { + dstate_setinfo("battery.runtime.low", "%d", value); + } + + /* Return to mains delay */ + value = get_word(answer + BCMXCP_EXT_LIMITS_BLOCK_RETURN_STAB_DELAY); + if (value != 0) { + dstate_setinfo("input.transfer.delay","%d",value); + } + + /* Minimum return capacity*/ + value = answer[BCMXCP_EXT_LIMITS_BLOCK_BATT_CAPACITY_RETURN]; + if (value != 0) { + dstate_setinfo("battery.charge.restart","%d",value); + } + }; + + res = command_read_sequence(PW_CONFIG_BLOCK_REQ, answer); + if (res <= 0) { + upsdebugx(1, "Failed to read CONF BLOCK from UPS"); + } + else + { + /*Nominal output voltage*/ + value = get_word((answer + BCMXCP_CONFIG_BLOCK_NOMINAL_OUTPUT_VOLTAGE)); + + if (value != 0) + dstate_setinfo("output.voltage.nominal", "%d", value); + /*Number of EBM*/ + value = (int) *(answer + BCMXCP_CONFIG_BLOCK_BATTERY_DATA_WORD3); + if (value != 0) + dstate_setinfo("battery.packs", "%d", value); + + } + + dstate_dataok(); } @@ -1634,41 +1880,14 @@ static int instcmd(const char *cmdname, const char *extra) { unsigned char answer[128], cbuf[6]; char success_msg[40]; + char namebuf[MAX_NUT_NAME_LENGTH]; char varname[32]; const char *varvalue = NULL; - int res, sec; + int res, sec, outlet_num; int sddelay = 0x03; /* outlet off in 3 seconds, by default */ upsdebugx(1, "entering instcmd(%s)", cmdname); - /* ojw0000 outlet power cycle for PW5125 and perhaps others */ - if (!strcasecmp(cmdname, "outlet.1.shutdown.return") - || !strcasecmp(cmdname, "outlet.2.shutdown.return") - || !strcasecmp(cmdname, "outlet.3.shutdown.return") - ) { - send_write_command(AUTHOR, 4); - - sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ - - /* Get the shutdown delay, if any */ - snprintf(varname, sizeof(varname)-1, "outlet.%c.delay.shutdown", cmdname[7]); - if ((varvalue = dstate_getinfo(varname)) != NULL) { - sddelay = atoi(varvalue); - } - - cbuf[0] = PW_LOAD_OFF_RESTART; - cbuf[1] = sddelay & 0xff; - cbuf[2] = sddelay >> 8; /* high byte of the 2 byte time argument */ - cbuf[3] = cmdname[7] - '0'; /* which outlet load segment? Assumes outlet number at position 8 of the command string. */ - - res = command_write_sequence(cbuf, 4, answer); - - sec = (256 * (unsigned char)answer[3]) + (unsigned char)answer[2]; - snprintf(success_msg, sizeof(success_msg)-1, "Going down in %d sec", sec); - - return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, success_msg); - } /* ojw0000 end outlet power cycle */ - if (!strcasecmp(cmdname, "shutdown.return")) { send_write_command(AUTHOR, 4); @@ -1696,6 +1915,26 @@ static int instcmd(const char *cmdname, const char *extra) return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Going down NOW"); } + if (!strcasecmp(cmdname, "load.on")) { + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + res = command_read_sequence(PW_UPS_ON, answer); + + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Enabling"); + } + + if (!strcasecmp(cmdname, "bypass.start")) { + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + res = command_read_sequence(PW_GO_TO_BYPASS, answer); + + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Bypass enabled"); + } + /* Note: test result will be parsed from Battery status block, * part of the update loop, and published into ups.test.result */ @@ -1716,11 +1955,11 @@ static int instcmd(const char *cmdname, const char *extra) answer from the test. Or return, as we may lose line power and need to do a shutdown.*/ - } - + } + if (!strcasecmp(cmdname, "test.system.start")) { send_write_command(AUTHOR, 4); - + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ cbuf[0] = PW_INIT_SYS_TEST; @@ -1732,7 +1971,7 @@ static int instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "test.panel.start")) { send_write_command(AUTHOR, 4); - + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ cbuf[0] = PW_INIT_SYS_TEST; @@ -1741,6 +1980,93 @@ static int instcmd(const char *cmdname, const char *extra) res = command_write_sequence(cbuf, 3, answer); return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Testing panel now"); + } + + if (!strcasecmp(cmdname, "beeper.disable") || !strcasecmp(cmdname, "beeper.enable") || !strcasecmp(cmdname, "beeper.mute")) { + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + cbuf[0] = PW_SET_CONF_COMMAND; + cbuf[1] = PW_CONF_BEEPER; + switch (cmdname[7]){ + + case 'd': + case 'D': { + cbuf[2] = 0x0; /*disable beeper*/ + break; + } + case 'e': + case 'E': { + cbuf[2] = 0x1; /*enable beeper*/ + break; + } + case 'm': + case 'M': { + cbuf[2] = 0x2; + break; /*mute beeper*/ + } + } + cbuf[3] = 0x0; /*padding*/ + + res = command_write_sequence(cbuf, 4, answer); + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, "Beeper status changed"); + } + + strncpy(namebuf, cmdname, sizeof(namebuf)); + namebuf[NUT_OUTLET_POSITION] = 'n'; /* Assumes a maximum of 9 outlets */ + + if (!strcasecmp(namebuf, "outlet.n.shutdown.return")) { + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + /* Get the shutdown delay, if any */ + snprintf(varname, sizeof(varname)-1, "outlet.%c.delay.shutdown", cmdname[NUT_OUTLET_POSITION]); + if ((varvalue = dstate_getinfo(varname)) != NULL) { + sddelay = atoi(varvalue); + } + + /*if -1 then use global shutdown_delay from ups.conf*/ + if (sddelay == -1) sddelay=bcmxcp_status.shutdowndelay; + + outlet_num = cmdname[NUT_OUTLET_POSITION] - '0'; + if (outlet_num < 1 || outlet_num > 9) + return STAT_INSTCMD_FAILED; + + cbuf[0] = PW_LOAD_OFF_RESTART; + cbuf[1] = sddelay & 0xff; + cbuf[2] = sddelay >> 8; /* high byte of the 2 byte time argument */ + cbuf[3] = outlet_num; /* which outlet load segment? Assumes outlet number at position 8 of the command string. */ + + res = command_write_sequence(cbuf, 4, answer); + + sec = (256 * (unsigned char)answer[3]) + (unsigned char)answer[2]; + snprintf(success_msg, sizeof(success_msg)-1, "Going down in %d sec", sec); + + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, success_msg); + } + + if (!strcasecmp(namebuf,"outlet.n.load.on") || !strcasecmp(namebuf,"outlet.n.load.off")){ + send_write_command(AUTHOR, 4); + + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + outlet_num = cmdname[NUT_OUTLET_POSITION] - '0'; + if (outlet_num < 1 || outlet_num > 9) + return STAT_INSTCMD_FAILED; + + + cbuf[0] = (cmdname[NUT_OUTLET_POSITION+8] == 'n')?PW_UPS_ON:PW_UPS_OFF; /* Cmd oN or not*/ + cbuf[1] = outlet_num; /* Outlet number */ + + res = command_write_sequence(cbuf, 2, answer); + snprintf(success_msg, sizeof(success_msg)-1, "Outlet %d is %s",outlet_num, (cmdname[NUT_OUTLET_POSITION+8] == 'n')?"On":"Off"); + + return decode_instcmd_exec(res, (unsigned char)answer[0], cmdname, success_msg); + + + } upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); @@ -1813,99 +2139,337 @@ int setvar (const char *varname, const char *val) { unsigned char answer[128], cbuf[5]; char namebuf[MAX_NUT_NAME_LENGTH]; - int res, sec, outlet_num; + char success_msg[50]; + int res, sec, outlet_num,tmp; int onOff_setting = PW_AUTO_OFF_DELAY; upsdebugx(1, "entering setvar(%s, %s)", varname, val); + if (!strcasecmp(varname, "input.transfer.boost.high")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 460) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_LOW_DEV_LIMIT; + cbuf[2]=tmp&0xff; + cbuf[3]=tmp>>8; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " BOOST threshold volage set to %d V", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + + } + + if (!strcasecmp(varname, "input.transfer.trim.low")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 110 || tmp > 540) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_HIGH_DEV_LIMIT; + cbuf[2]=tmp&0xff; + cbuf[3]=tmp>>8; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " TRIM threshold volage set to %d V", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "battery.runtime.low")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 30) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_LOW_BATT; + cbuf[2]=tmp; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Low battery warning time set to %d min", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "input.transfer.delay")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 1 || tmp > 18000 ) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_RETURN_DELAY; + cbuf[2]=tmp&0xff; + cbuf[3]=tmp>>8; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Mains return delay set to %d sec", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "battery.charge.restart")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 100 ) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_RETURN_CAP; + cbuf[2]=tmp&0xff; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Mains return minimum battery capacity set to %d %%", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + + if (!strcasecmp(varname, "ambient.temperature.high")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 100 ) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_MAX_TEMP; + cbuf[2]=tmp&0xff; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Maximum temperature set to %d C", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "output.voltage.nominal")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 460) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_NOMINAL_OUT_VOLTAGE; + cbuf[2]=tmp&0xff; + cbuf[3]=tmp>>8; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Nominal output voltage set to %d V", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + } + + if (!strcasecmp(varname, "battery.energysave.load")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 100) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_SLEEP_TH_LOAD; + cbuf[2]=tmp&0xff; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Minimum load before sleep countdown set to %d %%", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + + } + + + if (!strcasecmp(varname, "battery.energysave.delay")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 255) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_SLEEP_DELAY; + cbuf[2]=tmp&0xff; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, " Delay before sleep shutdown set to %d min", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + + } + + if (!strcasecmp(varname, "battery.packs")) { + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + tmp=atoi(val); + if (tmp < 0 || tmp > 5) { + return STAT_SET_INVALID; + } + + cbuf[0]=PW_SET_CONF_COMMAND; + cbuf[1]=PW_CONF_BATT_STRINGS; + cbuf[2]=tmp; + cbuf[3]=0x0; + + res = command_write_sequence(cbuf, 4, answer); + snprintf(success_msg, sizeof(success_msg)-1, "EBM Count set to %d ", tmp); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + + + } + strncpy(namebuf, varname, sizeof(namebuf)); namebuf[NUT_OUTLET_POSITION] = 'n'; /* Assumes a maximum of 9 outlets */ - if ( (strcasecmp(namebuf, "outlet.n.delay.start")) && - (strcasecmp(namebuf, "outlet.n.delay.shutdown")) ) { - return STAT_SET_UNKNOWN; + if ( (!strcasecmp(namebuf, "outlet.n.delay.start")) || + (!strcasecmp(namebuf, "outlet.n.delay.shutdown")) ) { + + + if (outlet_block_len <= 8) { + return STAT_SET_INVALID; + } + + if (!strcasecmp(namebuf, "outlet.n.delay.start")) { + onOff_setting = PW_AUTO_ON_DELAY; + } + + send_write_command(AUTHOR, 4); + sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ + + outlet_num = varname[NUT_OUTLET_POSITION] - '0'; + if (outlet_num < 1 || outlet_num > 9) { + return STAT_SET_INVALID; + } + + sec = atoi(val); + /* Check value: + * 0-32767 are valid values + * -1 means no Automatic off or restart + * for Auto Off Delay: + * 0-30 are valid but ill-advised */ + if (sec < -1 || sec > 0x7FFF) { + return STAT_SET_INVALID; + } + + cbuf[0] = PW_SET_OUTLET_COMMAND; /* Cmd */ + cbuf[1] = onOff_setting; /* Set Auto Off (1) or On (2) Delay */ + cbuf[2] = outlet_num; /* Outlet number */ + cbuf[3] = sec&0xff; /* Delay in seconds LSB */ + cbuf[4] = sec>>8; /* Delay in seconds MSB */ + + res = command_write_sequence(cbuf, 5, answer); + snprintf(success_msg, sizeof(success_msg)-1, "Outlet %d %s delay set to %d sec", + outlet_num, (onOff_setting == PW_AUTO_ON_DELAY)?"start":"shutdown", sec); + + return decode_setvar_exec(res, (unsigned char)answer[0], varname, success_msg); + } - if (outlet_block_len <= 8) { - return STAT_SET_INVALID; - } + return STAT_SET_INVALID; +} - if (!strcasecmp(namebuf, "outlet.n.delay.start")) { - onOff_setting = PW_AUTO_ON_DELAY; - } - - send_write_command(AUTHOR, 4); - sleep(PW_SLEEP); /* Need to. Have to wait at least 0,25 sec max 16 sec */ - - outlet_num = varname[NUT_OUTLET_POSITION] - '0'; - if (outlet_num < 1 || outlet_num > 9) { - return STAT_SET_INVALID; - } - - sec = atoi(val); - /* Check value: - * 0-32767 are valid values - * -1 means no Automatic off or restart - * for Auto Off Delay: - * 0-30 are valid but ill-advised */ - if (sec < -1 || sec > 0x7FFF) { - return STAT_SET_INVALID; - } - - cbuf[0] = PW_SET_OUTLET_COMMAND; /* Cmd */ - cbuf[1] = onOff_setting; /* Set Auto Off (1) or On (2) Delay */ - cbuf[2] = outlet_num; /* Outlet number */ - cbuf[3] = sec&0xff; /* Delay in seconds LSB */ - cbuf[4] = sec>>8; /* Delay in seconds MSB */ - - res = command_write_sequence(cbuf, 5, answer); +static int decode_setvar_exec(const int res, const unsigned char exec_status, const char *cmdname, const char *success_msg) +{ if (res <= 0) { - upslogx(LOG_ERR, "Short read from UPS"); + upslogx(LOG_ERR, "[%s] Short read from UPS", cmdname); dstate_datastale(); - return -1; + return STAT_SET_FAILED; } - switch ((unsigned char) answer[0]) { + /* Decode the status code from command execution */ + switch (exec_status) { case BCMXCP_RETURN_ACCEPTED: { - upslogx(LOG_NOTICE,"Outlet %d %s delay set to %d sec", - outlet_num, (onOff_setting == PW_AUTO_ON_DELAY)?"start":"shutdown", sec); - dstate_setinfo(varname, "%d", sec); + upslogx(LOG_NOTICE, "[%s] %s", cmdname, success_msg); upsdrv_comm_good(); return STAT_SET_HANDLED; break; } case BCMXCP_RETURN_ACCEPTED_PARAMETER_ADJUST: { - upslogx(LOG_NOTICE,"Outlet %d %s delay set, but UPS adjusted parameter %d sec", - outlet_num, (onOff_setting == PW_AUTO_ON_DELAY)?"start":"shutdown", sec); - dstate_setinfo(varname, "%d", sec); + upslogx(LOG_NOTICE, "[%s] Parameter adjusted", cmdname); + upslogx(LOG_NOTICE, "[%s] %s", cmdname, success_msg); upsdrv_comm_good(); return STAT_SET_HANDLED; break; } case BCMXCP_RETURN_BUSY: { - upslogx(LOG_NOTICE, "Set [%s] failed due to UPS busy", varname); - /* TODO: we should probably retry... */ - return STAT_SET_UNKNOWN; - break; - } - case BCMXCP_RETURN_PARAMETER_OUT_OF_RANGE: { - upslogx(LOG_NOTICE, "Set [%s %s] failed due to parameter out of range", varname, val); - return STAT_SET_UNKNOWN; - break; - } - case BCMXCP_RETURN_INVALID_PARAMETER: { - upslogx(LOG_NOTICE, "Set [%s %s] failed due to invalid parameter", varname, val); - return STAT_SET_UNKNOWN; - break; - } - default: { - upslogx(LOG_NOTICE, "Set [%s] not supported", varname); + upslogx(LOG_NOTICE, "[%s] Busy or disbled by front panel", cmdname); return STAT_SET_FAILED; break; } + case BCMXCP_RETURN_UNRECOGNISED: { + upslogx(LOG_NOTICE, "[%s] Unrecognised command byte or corrupt checksum", cmdname); + return STAT_SET_FAILED; + break; + } + case BCMXCP_RETURN_INVALID_PARAMETER: { + upslogx(LOG_NOTICE, "[%s] Invalid parameter", cmdname); + return STAT_SET_INVALID; + break; + } + case BCMXCP_RETURN_PARAMETER_OUT_OF_RANGE: { + upslogx(LOG_NOTICE, "[%s] Parameter out of range", cmdname); + return STAT_SET_INVALID; + break; + } + default: { + upslogx(LOG_NOTICE, "[%s] Not supported", cmdname); + return STAT_SET_INVALID; + break; + } } - - return STAT_SET_INVALID; } /******************************* @@ -1934,4 +2498,3 @@ static const char *nut_find_infoval(info_lkp_t *xcp2info, const double value, co } return NULL; } - diff --git a/drivers/bcmxcp.h b/drivers/bcmxcp.h index 7d24f76..90c690c 100644 --- a/drivers/bcmxcp.h +++ b/drivers/bcmxcp.h @@ -77,6 +77,22 @@ #define PW_TURN_OFF_DELAY 3 #define PW_TURN_ON_DELAY 4 +/* Config vars*/ +#define PW_CONF_BYPASS_FREQ_DEV_LIMIT 0x01 +#define PW_CONF_LOW_DEV_LIMIT 0x02 +#define PW_CONF_HIGH_DEV_LIMIT 0x03 +#define PW_CONF_PHASE_DEV_LIMIT 0x04 +#define PW_CONF_LOW_BATT 0x05 +#define PW_CONF_BEEPER 0x06 +#define PW_CONF_RETURN_DELAY 0x07 +#define PW_CONF_RETURN_CAP 0x08 +#define PW_CONF_MAX_TEMP 0x0a +#define PW_CONF_NOMINAL_OUT_VOLTAGE 0x0b +#define PW_CONF_SLEEP_TH_LOAD 0x0d +#define PW_CONF_SLEEP_DELAY 0x0e +#define PW_CONF_BATT_STRINGS 0x0f +#define PW_CONF_REQ 0xff + /* Config block offsets */ #define BCMXCP_CONFIG_BLOCK_MACHINE_TYPE_CODE 0 #define BCMXCP_CONFIG_BLOCK_MODEL_NUMBER 2 @@ -97,6 +113,18 @@ #define BCMXCP_CONFIG_BLOCK_PART_NUMBER 48 #define BCMXCP_CONFIG_BLOCK_SERIAL_NUMBER 64 +/*Battery block offsets*/ + +#define BCMXCP_BATTDATA_BLOCK_BATT_TEST_STATUS 0 +#define BCMXCP_BATTDATA_BLOCK_BATT_VOLTS_T1 1 +#define BCMXCP_BATTDATA_BLOCK_BATT_VOLTS_T2 5 +#define BCMXCP_BATTDATA_BLOCK_TEST_DURATION 9 +#define BCMXCP_BATTDATA_BLOCK_UTIL_VOLT 10 +#define BCMXCP_BATTDATA_BLOCK_INPUT_CURRENT 14 +#define BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS 18 +/*BATT_TEST_STATUS for external strings (1 byte each) if BCMXCP_BATTDATA_BLOCK_NUMBER_OF_STRINGS == 0 no external test statuses at all*/ +/*next - number of ABM Statuses - at least 1 for internal batteries*/ + /* Index for Extende Limits block offsets */ #define BCMXCP_EXT_LIMITS_BLOCK_NOMINAL_INPUT_VOLTAGE 0 #define BCMXCP_EXT_LIMITS_BLOCK_NOMINAL_INPUT_FREQ 2 @@ -114,6 +142,8 @@ #define BCMXCP_EXT_LIMITS_BLOCK_BATT_CAPACITY_RETURN 24 #define BCMXCP_EXT_LIMITS_BLOCK_AMBIENT_TEMP_LOW 25 #define BCMXCP_EXT_LIMITS_BLOCK_AMBIENT_TEMP_HIGE 26 +#define BCMXCP_EXT_LIMITS_BLOCK_SLEEP_TH_LOAD 29 +#define BCMXCP_EXT_LIMITS_BLOCK_SLEEP_DELAY 30 /* Indexes for meter map */ #define BCMXCP_METER_MAP_OUTPUT_VOLTS_AB 0 /* mapped */ diff --git a/drivers/belkin-hid.c b/drivers/belkin-hid.c index 212d6f3..5396d62 100644 --- a/drivers/belkin-hid.c +++ b/drivers/belkin-hid.c @@ -29,20 +29,20 @@ #include "belkin-hid.h" #include "usb-common.h" -#define BELKIN_HID_VERSION "Belkin HID 0.16" +#define BELKIN_HID_VERSION "Belkin/Liebert HID 0.17" /* Belkin */ #define BELKIN_VENDORID 0x050d /* Liebert */ #define LIEBERT_VENDORID 0x10af -/* Note that there are at least two Liebert firmware types which both report + +/*! USB IDs device table. + * Note that there are at least two Liebert firmware types which both report * a VID:PID of 10af:0001. The newer ones tend not to have the Belkin broken * Usage Pages (and therefore use standard HID PDC paths) but they have * incorrect exponents for some fields. */ - -/* USB IDs device table */ static usb_device_id_t belkin_usb_device_table[] = { /* F6C800-UNV */ { USB_DEVICE(BELKIN_VENDORID, 0x0980), NULL }, @@ -60,6 +60,8 @@ static usb_device_id_t belkin_usb_device_table[] = { { USB_DEVICE(BELKIN_VENDORID, 0x0751), NULL }, /* F6H375-USB */ { USB_DEVICE(BELKIN_VENDORID, 0x0375), NULL }, + /* Regulator PRO-USB */ + { USB_DEVICE(BELKIN_VENDORID, 0x0f51), NULL }, /* F6C1100-UNV, F6C1200-UNV */ { USB_DEVICE(BELKIN_VENDORID, 0x1100), NULL }, @@ -67,6 +69,8 @@ static usb_device_id_t belkin_usb_device_table[] = { { USB_DEVICE(LIEBERT_VENDORID, 0x0001), NULL }, /* Liebert PowerSure PSI 1440 */ { USB_DEVICE(LIEBERT_VENDORID, 0x0004), NULL }, + /* Liebert GXT3 */ + { USB_DEVICE(LIEBERT_VENDORID, 0x0008), NULL }, /* Terminating entry */ { -1, -1, NULL } @@ -521,6 +525,22 @@ static hid_info_t belkin_hid2nut[] = { yet implemented) workaround, see the belkinunv(8) man page. -PS 2005/08/28 */ +#if 0 + /* added for debugging Liebert GXT3 : */ + { "unmapped.ups.powersummary.iserialnumber", 0, 0, "UPS.PowerSummary.iSerialNumber", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.imanufacturer", 0, 0, "UPS.PowerSummary.iManufacturer", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.ioeminformation", 0, 0, "UPS.PowerSummary.iOEMInformation", NULL, "%s", 0, stringid_conversion }, + { "unmapped.ups.powersummary.designcapacity", 0, 0, "UPS.PowerSummary.DesignCapacity", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.remainingtimelimit", 0, 0, "UPS.PowerSummary.RemainingTimeLimit", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.capacitymode", 0, 0, "UPS.PowerSummary.CapacityMode", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.rechargeable", 0, 0, "UPS.PowerSummary.Rechargeable", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.batterypresent", 0, 0, "UPS.PowerSummary.BatteryPresent", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.fullchargecapacity", 0, 0, "UPS.PowerSummary.FullChargeCapacity", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.capacitygranularity1", 0, 0, "UPS.PowerSummary.CapacityGranularity1", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.capacitygranularity2", 0, 0, "UPS.PowerSummary.CapacityGranularity2", NULL, "%.0f", 0, NULL }, + { "unmapped.ups.powersummary.iproduct", 0, 0, "UPS.PowerSummary.iProduct", NULL, "%.0f", 0, NULL }, +#endif + /* end of structure. */ { NULL, 0, 0, NULL, NULL, NULL, 0, NULL } }; diff --git a/drivers/blazer_usb.c b/drivers/blazer_usb.c index 7ba4df2..14d2af9 100644 --- a/drivers/blazer_usb.c +++ b/drivers/blazer_usb.c @@ -498,14 +498,7 @@ void upsdrv_help(void) void upsdrv_makevartable(void) { addvar(VAR_VALUE, "subdriver", "Serial-over-USB subdriver selection"); - addvar(VAR_VALUE, "vendorid", "Regular expression to match UPS Manufacturer numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); - - addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); - addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); - addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); - - addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + nut_usb_addvars(); addvar(VAR_VALUE, "langid_fix", "Apply the language ID workaround to the krauler subdriver (0x409 or 0x4095)"); diff --git a/drivers/compaq-mib.c b/drivers/compaq-mib.c index fc9fdd9..a4eacc0 100644 --- a/drivers/compaq-mib.c +++ b/drivers/compaq-mib.c @@ -83,15 +83,19 @@ #define CPQPOWER_OID_ALARM_LB ".1.3.6.1.4.1.232.165.3.7.4.0" /* UPS-MIB::upsLowBattery */ +/* Not used, as no longer supported by MIB ver. 1.76 (Github issue 118) static info_lkp_t cpqpower_alarm_ob[] = { { 1, "OB" }, { 0, "NULL" } -} ; +}; +*/ +/* Not used, as no longer supported by MIB ver. 1.76 (Github issue 118) static info_lkp_t cpqpower_alarm_lb[] = { { 1, "LB" }, { 0, "NULL" } -} ; +}; +*/ /* Defines for CPQPOWER_OID_POWER_STATUS (1) */ static info_lkp_t cpqpower_pwr_info[] = { diff --git a/drivers/cps-hid.c b/drivers/cps-hid.c index a6d64ba..78c952f 100644 --- a/drivers/cps-hid.c +++ b/drivers/cps-hid.c @@ -28,29 +28,36 @@ #include "cps-hid.h" #include "usb-common.h" -#define CPS_HID_VERSION "CyberPower HID 0.3" +#define CPS_HID_VERSION "CyberPower HID 0.4" /* Cyber Power Systems */ #define CPS_VENDORID 0x0764 -/* +/*! Battery voltage scale factor. * For some devices, the reported battery voltage is off by factor * of 1.5 so we need to apply a scale factor to it to get the real * battery voltage. By default, the factor is 1 (no scaling). */ static double battery_scale = 1; +static int might_need_battery_scale = 0; +static int battery_scale_checked = 0; + +/*! If the ratio of the battery voltage to the nominal battery voltage exceeds + * this factor, we assume that the battery voltage needs to be scaled by 2/3. + */ +static const double battery_voltage_sanity_check = 1.4; static void *cps_battery_scale(USBDevice_t *device) { - battery_scale = 0.667; + might_need_battery_scale = 1; return NULL; } /* USB IDs device table */ static usb_device_id_t cps_usb_device_table[] = { - /* 900AVR/BC900D, CP1200AVR/BC1200D */ + /* 900AVR/BC900D */ { USB_DEVICE(CPS_VENDORID, 0x0005), NULL }, - /* Dynex DX-800U? */ + /* Dynex DX-800U?, CP1200AVR/BC1200D, CP825AVR-G, CP1000AVRLCD, CP1000PFCLCD, CP1500C, CP550HG, etc. */ { USB_DEVICE(CPS_VENDORID, 0x0501), &cps_battery_scale }, /* OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U */ { USB_DEVICE(CPS_VENDORID, 0x0601), NULL }, @@ -59,12 +66,48 @@ static usb_device_id_t cps_usb_device_table[] = { { -1, -1, NULL } }; +/*! Adjusts @a battery_scale if voltage is well above nominal. + */ +static void cps_adjust_battery_scale(double batt_volt) +{ + const char *batt_volt_nom_str; + double batt_volt_nom; + + if(battery_scale_checked) { + return; + } + + batt_volt_nom_str = dstate_getinfo("battery.voltage.nominal"); + if(!batt_volt_nom_str) { + upsdebugx(2, "%s: 'battery.voltage.nominal' not available yet; skipping scale determination", __func__); + return; + } + + batt_volt_nom = strtod(batt_volt_nom_str, NULL); + if(batt_volt_nom == 0) { + upsdebugx(3, "%s: 'battery.voltage.nominal' is %s", __func__, batt_volt_nom_str); + return; + } + + if( (batt_volt / batt_volt_nom) > battery_voltage_sanity_check ) { + upslogx(LOG_INFO, "%s: battery readings will be scaled by 2/3", __func__); + battery_scale = 2.0/3; + } + + battery_scale_checked = 1; +} + /* returns statically allocated string - must not use it again before done with result! */ static const char *cps_battvolt_fun(double value) { static char buf[8]; + if(might_need_battery_scale) { + cps_adjust_battery_scale(value); + } + + upsdebugx(5, "%s: battery_scale = %.3f", __func__, battery_scale); snprintf(buf, sizeof(buf), "%.1f", battery_scale * value); return buf; diff --git a/drivers/dstate.c b/drivers/dstate.c index 2e5bd7e..20d239a 100644 --- a/drivers/dstate.c +++ b/drivers/dstate.c @@ -238,23 +238,24 @@ static void sock_connect(int sock) } /* enable nonblocking I/O */ + if (!do_synchronous) { + ret = fcntl(fd, F_GETFL, 0); - ret = fcntl(fd, F_GETFL, 0); + if (ret < 0) { + upslog_with_errno(LOG_ERR, "fcntl get on unix fd failed"); + close(fd); + return; + } - if (ret < 0) { - upslog_with_errno(LOG_ERR, "fcntl get on unix fd failed"); - close(fd); - return; + ret = fcntl(fd, F_SETFL, ret | O_NDELAY); + + if (ret < 0) { + upslog_with_errno(LOG_ERR, "fcntl set O_NDELAY on unix fd failed"); + close(fd); + return; + } } - ret = fcntl(fd, F_SETFL, ret | O_NDELAY); - - if (ret < 0) { - upslog_with_errno(LOG_ERR, "fcntl set O_NDELAY on unix fd failed"); - close(fd); - return; - } - conn = xcalloc(1, sizeof(*conn)); conn->fd = fd; diff --git a/drivers/dstate.h b/drivers/dstate.h index b4a5aa9..35a7714 100644 --- a/drivers/dstate.h +++ b/drivers/dstate.h @@ -41,6 +41,10 @@ typedef struct conn_s { extern struct ups_handler upsh; + /* asynchronous (nonblocking) Vs synchronous (blocking) I/O + * Defaults to nonblocking, for backward compatibility */ + extern int do_synchronous; + void dstate_init(const char *prog, const char *devname); int dstate_poll_fds(struct timeval timeout, int extrafd); int dstate_setinfo(const char *var, const char *fmt, ...) diff --git a/drivers/eaton-mib.c b/drivers/eaton-mib.c index b06006e..77d9e00 100644 --- a/drivers/eaton-mib.c +++ b/drivers/eaton-mib.c @@ -1,6 +1,10 @@ -/* eaton-mib.c - data to monitor Eaton Aphel PDUs (Basic and Complex) +/* eaton-mib.c - data to monitor Eaton ePDUs: + * G1 Aphel based ePDUs (Basic and Complex) + * G1 Pulizzi Monitored and Switched ePDUs + * G2 Marlin SW / MI / MO / MA + * G3 Shark SW / MI / MO / MA * - * Copyright (C) 2008 - 2012 + * Copyright (C) 2008 - 2015 * Arnaud Quette * Arnaud Quette * @@ -30,7 +34,8 @@ /* APHEL-GENESIS-II-MIB (monitored ePDU) * ************************************* - * Note: we should also be able to support this one using netxml-ups! + * Note: There is also a basic XML interface, but not worth + * implementing in netxml-ups! */ #define APHEL1_OID_MIB ".1.3.6.1.4.1.17373" @@ -212,7 +217,7 @@ static snmp_info_t eaton_aphel_revelation_mib[] = { /* Eaton PDU-MIB - Marlin MIB * ************************** */ -#define EATON_MARLIN_MIB_VERSION "0.06" +#define EATON_MARLIN_MIB_VERSION "0.10" #define EATON_MARLIN_SYSOID ".1.3.6.1.4.1.534.6.6.7" #define EATON_MARLIN_OID_MODEL_NAME ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.0" @@ -220,7 +225,7 @@ static info_lkp_t marlin_outlet_status_info[] = { { 0, "off" }, { 1, "on" }, { 2, "pendingOff" }, /* transitional status */ - { 3, "pendingOn" }, /* transitional status */ + { 3, "pendingOn" }, /* transitional status */ { 0, NULL } }; @@ -234,6 +239,7 @@ static info_lkp_t outlet_switchability_info[] = { /* Snmp2NUT lookup table for Eaton Marlin MIB */ static snmp_info_t eaton_marlin_mib[] = { + /* Device page */ { "device.mfr", ST_FLAG_STRING, SU_INFOSIZE, NULL, "EATON", SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, @@ -277,12 +283,61 @@ static snmp_info_t eaton_marlin_mib[] = { */ /* Input page */ + /* Historically, some of these data were previously published as + * outlet.{realpower,...} + * However, it's more suitable and logic to have these on input.{...} + */ { "input.phases", 0, 1, ".1.3.6.1.4.1.534.6.6.7.1.2.1.20.0", NULL, SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, - /* inputType.0.1 singlePhase (1) iso.3.6.1.4.1.534.6.6.7.3.1.1.2.0.1 */ + /* FIXME: to be implemented + * inputType.0.1 iso.3.6.1.4.1.534.6.6.7.3.1.1.2.0.1 + * singlePhase (1), ... split phase, three phase delta, or three phase wye + */ + + /* Frequency is measured globally */ { "input.frequency", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.3.1.1.3.0.1", NULL, 0, NULL, NULL }, + + /* inputCurrentPercentLoad (measured globally) + * Current percent load, based on the rated current capacity */ + /* FIXME: input.load is mapped on input.L1.load for both single and 3phase !!! */ + { "input.load", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.3.1.11.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L1.load", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.3.1.11.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L2.load", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.3.1.11.0.1.2", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L3.load", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.3.1.11.0.1.3", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + + /* FIXME: + * - Voltage is only mesured per phase, as mV! + * so input.voltage == input.L1.voltage for both single and 3phase + * - As per NUT namespace (http://www.networkupstools.org/docs/developer-guide.chunked/apas01.html#_valid_contexts) + * Voltage has to be expressed either phase-phase or phase-neutral + * This is depending on OID inputVoltageMeasType + * INTEGER {singlePhase (1),phase1toN (2),phase2toN (3),phase3toN (4),phase1to2 (5),phase2to3 (6),phase3to1 (7)*/ { "input.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.1", NULL, 0, NULL, NULL }, - /* FIXME: check multiplier */ - { "input.current", 0, 0.01, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, + { "input.L1.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.1", NULL, 0, NULL, NULL }, + { "input.L2.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.2", NULL, 0, NULL, NULL }, + { "input.L3.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.3", NULL, 0, NULL, NULL }, + + /* FIXME: + * - input.current is mapped on input.L1.current for both single and 3phase !!! */ + { "input.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, + { "input.L1.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, + { "input.L2.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.2", NULL, 0, NULL, NULL }, + { "input.L3.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.3", NULL, 0, NULL, NULL }, + /* Sum of all phases realpower, valid for Shark 1ph/3ph only */ + { "input.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.5.1.4.0.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_UNIQUE | SU_FLAG_OK, NULL, NULL }, + /* Fallback 1: Sum of all phases realpower, valid for Marlin 3ph only */ + { "input.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.4", NULL, SU_FLAG_NEGINVALID | SU_FLAG_UNIQUE | SU_FLAG_OK, NULL, NULL }, + /* Fallback 2: Sum of the phase realpower, valid for Marlin 1ph only */ + { "input.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.2", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L1.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L2.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.2", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L3.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.3", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + /* Sum of all phases apparent power, valid for 3phase only */ + { "input.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.4", NULL, SU_FLAG_NEGINVALID | SU_FLAG_UNIQUE | SU_FLAG_OK, NULL, NULL }, + /* Sum of the phase apparent power, valid for 1phase only (fallback for also publishing) */ + { "input.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L1.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.1", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L2.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.2", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, + { "input.L3.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.3", NULL, SU_FLAG_NEGINVALID | SU_FLAG_OK, NULL, NULL }, /* Ambient page */ /* We use critical levels, for both temperature and humidity, @@ -300,13 +355,12 @@ static snmp_info_t eaton_marlin_mib[] = { SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL }, { "outlet.count", 0, 1, ".1.3.6.1.4.1.534.6.6.7.1.2.1.22.0", "0", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL }, /* The below ones are the same as the input.* equivalent */ + /* FIXME: transition period, TO BE REMOVED, moved to input.* */ { "outlet.frequency", 0, 0.1, ".1.3.6.1.4.1.534.6.6.7.3.1.1.3.0.1", NULL, 0, NULL, NULL }, { "outlet.voltage", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.3.2.1.3.0.1.1", NULL, 0, NULL, NULL }, { "outlet.current", 0, 0.01, ".1.3.6.1.4.1.534.6.6.7.3.3.1.4.0.1.1", NULL, 0, NULL, NULL }, - /* There is also a .2 available (ie .1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.2) */ - { "outlet.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.2", NULL, 0, NULL, NULL }, - /* There is also a .2 available (ie .1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.2) */ - { "outlet.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.1", NULL, 0, NULL, NULL }, + { "outlet.realpower", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.4.0.1.4", NULL, 0, NULL, NULL }, + { "outlet.power", 0, 1.0, ".1.3.6.1.4.1.534.6.6.7.3.4.1.3.0.1.4", NULL, 0, NULL, NULL }, /* outlet template definition * Indexes start from 1, ie outlet.1 => .1 */ diff --git a/drivers/genericups.c b/drivers/genericups.c index bc8ddc4..9a005fa 100644 --- a/drivers/genericups.c +++ b/drivers/genericups.c @@ -39,19 +39,30 @@ upsdrv_info_t upsdrv_info = { static void parse_output_signals(const char *value, int *line) { + int old_line = *line; /* parse signals the serial port can output */ *line = 0; + upsdebugx(4, "%s: enter", __func__); + + /* Note: for future drivers, please use strtok() or similar tokenizing + * methods, such that it is easier to spot configuration mistakes. With + * this code, a misspelled control line may go unnoticed. I'd fix it + * The Right Way (tm), but these UPSes are ancient. + */ if (strstr(value, "DTR") && !strstr(value, "-DTR")) { + upsdebugx(3, "%s: override DTR", __func__); *line |= TIOCM_DTR; } if (strstr(value, "RTS") && !strstr(value, "-RTS")) { + upsdebugx(3, "%s: override RTS", __func__); *line |= TIOCM_RTS; } if (strstr(value, "ST")) { + upsdebugx(3, "%s: override ST", __func__); *line |= TIOCM_ST; } @@ -70,20 +81,32 @@ static void parse_output_signals(const char *value, int *line) if (strstr(value, "DSR")) { fatalx(EXIT_FAILURE, "Can't override output with DSR (not an output)"); } + + if(*line == old_line) { + upslogx(LOG_NOTICE, "%s: output overrides specified, but no effective difference - check for typos?", __func__); + } + + upsdebugx(4, "%s: exit", __func__); } static void parse_input_signals(const char *value, int *line, int *val) { /* parse signals the serial port can input */ + int old_line = *line, old_val = *val; *line = 0; *val = 0; + upsdebugx(4, "%s: enter", __func__); + if (strstr(value, "CTS")) { *line |= TIOCM_CTS; if (!strstr(value, "-CTS")) { + upsdebugx(3, "%s: override CTS (active low)", __func__); *val |= TIOCM_CTS; + } else { + upsdebugx(3, "%s: override CTS", __func__); } } @@ -91,7 +114,10 @@ static void parse_input_signals(const char *value, int *line, int *val) *line |= TIOCM_CD; if (!strstr(value, "-DCD")) { + upsdebugx(3, "%s: override DCD (active low)", __func__); *val |= TIOCM_CD; + } else { + upsdebugx(3, "%s: override DCD", __func__); } } @@ -99,7 +125,10 @@ static void parse_input_signals(const char *value, int *line, int *val) *line |= TIOCM_RNG; if (!strstr(value, "-RNG")) { + upsdebugx(3, "%s: override RNG (active low)", __func__); *val |= TIOCM_RNG; + } else { + upsdebugx(3, "%s: override RNG", __func__); } } @@ -107,7 +136,10 @@ static void parse_input_signals(const char *value, int *line, int *val) *line |= TIOCM_DSR; if (!strstr(value, "-DSR")) { + upsdebugx(3, "%s: override DSR (active low)", __func__); *val |= TIOCM_DSR; + } else { + upsdebugx(3, "%s: override DSR", __func__); } } @@ -122,6 +154,12 @@ static void parse_input_signals(const char *value, int *line, int *val) if (strstr(value, "ST")) { fatalx(EXIT_FAILURE, "Can't override input with ST (not an input)"); } + + if((*line == old_line) && (*val == old_val)) { + upslogx(LOG_NOTICE, "%s: input overrides specified, but no effective difference - check for typos?", __func__); + } + + upsdebugx(4, "%s: exit", __func__); } void upsdrv_initinfo(void) diff --git a/drivers/libhid.c b/drivers/libhid.c index d0ba7c5..25d4d00 100644 --- a/drivers/libhid.c +++ b/drivers/libhid.c @@ -59,6 +59,10 @@ static double exponent(double a, int8_t b); /* Tweak flag for APC Back-UPS */ int max_report_size = 0; +/* Tweaks for Powercom, at least */ +int interrupt_only = 0; +int unsigned interrupt_size = 0; + /* ---------------------------------------------------------------------- */ /* report buffering system */ @@ -148,7 +152,7 @@ static int refresh_report_buffer(reportbuf_t *rbuf, hid_dev_handle_t udev, HIDDa int id = pData->ReportID; int r; - if (rbuf->ts[id] + age > time(NULL)) { + if (interrupt_only || rbuf->ts[id] + age > time(NULL)) { /* buffered report is still good; nothing to do */ upsdebug_hex(3, "Report[buf]", rbuf->data[id], rbuf->len[id]); return 0; @@ -346,7 +350,7 @@ HIDData_t *HIDGetItemData(const char *hidpath, usage_tables_t *utab) } /* Get info on object (reportID, offset and size) */ - return FindObject_with_Path(pDesc, &Path, ITEM_FEATURE); + return FindObject_with_Path(pDesc, &Path, interrupt_only ? ITEM_INPUT:ITEM_FEATURE); } char *HIDGetDataItem(const HIDData_t *hiddata, usage_tables_t *utab) @@ -479,7 +483,7 @@ int HIDGetEvents(hid_dev_handle_t udev, HIDData_t **event, int eventsize) HIDData_t *pData; /* needs libusb-0.1.8 to work => use ifdef and autoconf */ - buflen = comm_driver->get_interrupt(udev, buf, sizeof(buf), 250); + buflen = comm_driver->get_interrupt(udev, buf, interrupt_size ? interrupt_size:sizeof(buf), 250); if (buflen <= 0) { return buflen; /* propagate "error" or "no event" code */ } diff --git a/drivers/libhid.h b/drivers/libhid.h index 0e513f9..0879c3e 100644 --- a/drivers/libhid.h +++ b/drivers/libhid.h @@ -89,6 +89,9 @@ typedef struct reportbuf_s { extern reportbuf_t *reportbuf; /* buffer for most recent reports */ +extern int interrupt_only; +extern unsigned int interrupt_size; + /* ---------------------------------------------------------------------- */ /* diff --git a/drivers/libusb.c b/drivers/libusb.c index fd8f5b9..8625ed6 100644 --- a/drivers/libusb.c +++ b/drivers/libusb.c @@ -49,6 +49,23 @@ upsdrv_info_t comm_upsdrv_info = { static void libusb_close(usb_dev_handle *udev); +/*! Add USB-related driver variables with addvar(). + * This removes some code duplication across the USB drivers. + */ +void nut_usb_addvars(void) +{ + /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ + addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); + addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); + addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); + + addvar(VAR_VALUE, "vendorid", "Regular expression to match UPS Manufacturer numerical ID (4 digits hexadecimal)"); + addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); + + addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + addvar(VAR_VALUE, "usb_set_altinterface", "Force redundant call to usb_set_altinterface() (value=bAlternateSetting; default=0)"); +} + /* From usbutils: workaround libusb API goofs: "byte" should never be sign extended; * using "char" is trouble. Likewise, sizes should never be negative. */ @@ -70,6 +87,45 @@ static inline int matches(USBDeviceMatcher_t *matcher, USBDevice_t *device) { return matcher->match_function(device, matcher->privdata); } +/*! If needed, set the USB alternate interface. + * + * In NUT 2.7.2 and earlier, the following call was made unconditionally: + * usb_set_altinterface(udev, 0); + * + * Although harmless on Linux and *BSD, this extra call prevents old Tripp Lite + * devices from working on Mac OS X (presumably the OS is already setting + * altinterface to 0). + */ +static int nut_usb_set_altinterface(usb_dev_handle *udev) +{ + int altinterface = 0, ret = 0; + char *alt_string, *endp = NULL; + + if(testvar("usb_set_altinterface")) { + alt_string = getval("usb_set_altinterface"); + if(alt_string) { + altinterface = (int)strtol(alt_string, &endp, 10); + if(endp && !(endp[0] == 0)) { + upslogx(LOG_WARNING, "%s: '%s' is not a valid number", __func__, alt_string); + } + if(altinterface < 0 || altinterface > 255) { + upslogx(LOG_WARNING, "%s: setting bAlternateInterface to %d will probably not work", __func__, altinterface); + } + } + /* set default interface */ + upsdebugx(2, "%s: calling usb_set_altinterface(udev, %d)", __func__, altinterface); + ret = usb_set_altinterface(udev, altinterface); + if(ret != 0) { + upslogx(LOG_WARNING, "%s: usb_set_altinterface(udev, %d) returned %d (%s)", + __func__, altinterface, ret, usb_strerror() ); + } + upslogx(LOG_NOTICE, "%s: usb_set_altinterface() should not be necessary - please email the nut-upsdev list with information about your UPS.", __func__); + } else { + upsdebugx(3, "%s: skipped usb_set_altinterface(udev, 0)", __func__); + } + return ret; +} + #define usb_control_msg typesafe_control_msg /* On success, fill in the curDevice structure and return the report @@ -220,8 +276,7 @@ static int libusb_open(usb_dev_handle **udevp, USBDevice_t *curDevice, USBDevice } #endif - /* set default interface */ - usb_set_altinterface(udev, 0); + nut_usb_set_altinterface(udev); if (!callback) { return 1; diff --git a/drivers/liebert-hid.c b/drivers/liebert-hid.c index cff6f1d..34f00bd 100644 --- a/drivers/liebert-hid.c +++ b/drivers/liebert-hid.c @@ -26,13 +26,18 @@ #include "liebert-hid.h" #include "usb-common.h" -#define LIEBERT_HID_VERSION "Liebert HID 0.3" +#define LIEBERT_HID_VERSION "Phoenixtec/Liebert HID 0.3" /* FIXME: experimental flag to be put in upsdrv_info */ /* Phoenixtec Power Co., Ltd */ #define LIEBERT_VENDORID 0x06da -/* USB IDs device table */ +/*! USB IDs device table. + * + * Note that this subdriver was named before the USB VendorID was determined to + * actually belong to Phoenixtec. The belkin-hid.c file covers the other + * Liebert units which share some of the same incorrect exponents as the + * Belkin HID firmware. */ static usb_device_id_t liebert_usb_device_table[] = { /* various models */ { USB_DEVICE(LIEBERT_VENDORID, 0xffff), NULL }, diff --git a/drivers/main.c b/drivers/main.c index 7c2fc55..f63d54a 100644 --- a/drivers/main.c +++ b/drivers/main.c @@ -31,6 +31,9 @@ /* for ser_open */ int do_lock_port = 1; + /* for dstate->sock_connect, default to asynchronous */ + int do_synchronous = 0; + /* for detecting -a values that don't match anything */ static int upsname_found = 0; @@ -250,7 +253,7 @@ void addvar(int vartype, const char *name, const char *desc) /* handle -x / ups.conf config details that are for this part of the code */ static int main_arg(char *var, char *val) { - /* flags for main: just 'nolock' for now */ + /* flags for main */ if (!strcmp(var, "nolock")) { do_lock_port = 0; @@ -281,6 +284,16 @@ static int main_arg(char *var, char *val) return 1; /* handled */ } + /* allow per-driver overrides of the global setting */ + if (!strcmp(var, "synchronous")) { + if (!strcmp(val, "yes")) + do_synchronous=1; + else + do_synchronous=0; + + return 1; /* handled */ + } + /* only for upsdrvctl - ignored here */ if (!strcmp(var, "sdorder")) return 1; /* handled */ @@ -309,6 +322,13 @@ static void do_global_args(const char *var, const char *val) user = xstrdup(val); } + if (!strcmp(var, "synchronous")) { + if (!strcmp(val, "yes")) + do_synchronous=1; + else + do_synchronous=0; + } + /* unrecognized */ } @@ -519,6 +539,7 @@ int main(int argc, char **argv) chroot_path = xstrdup(optarg); break; case 'u': + free(user); user = xstrdup(optarg); break; case 'V': @@ -660,6 +681,10 @@ int main(int argc, char **argv) /* The poll_interval may have been changed from the default */ dstate_setinfo("driver.parameter.pollinterval", "%d", poll_interval); + /* The synchronous option may have been changed from the default */ + dstate_setinfo("driver.parameter.synchronous", "%s", + (do_synchronous==1)?"yes":"no"); + /* remap the device.* info from ups.* for the transition period */ if (dstate_getinfo("ups.mfr") != NULL) dstate_setinfo("device.mfr", "%s", dstate_getinfo("ups.mfr")); diff --git a/drivers/mge-hid.c b/drivers/mge-hid.c index 93ccde6..dfc62c9 100644 --- a/drivers/mge-hid.c +++ b/drivers/mge-hid.c @@ -1,7 +1,8 @@ /* mge-hid.c - data to monitor Eaton / MGE HID (USB and serial) devices * - * Copyright (C) 2003 - 2012 - * Arnaud Quette + * Copyright (C) + * 2003 - 2015 Arnaud Quette + * 2015 Arnaud Quette * * Sponsored by MGE UPS SYSTEMS * @@ -36,7 +37,7 @@ #include "usbhid-ups.h" #include "mge-hid.h" -#define MGE_HID_VERSION "MGE HID 1.33" +#define MGE_HID_VERSION "MGE HID 1.38" /* (prev. MGE Office Protection Systems, prev. MGE UPS SYSTEMS) */ /* Eaton */ @@ -121,6 +122,223 @@ static int country_code = COUNTRY_UNKNOWN; static char mge_scratch_buf[20]; +/* ABM - Advanced Battery Monitoring + *********************************** + * Synthesis table + * HID data | Charger in ABM mode | Charger in Constant mode + * UPS.BatterySystem.Charger.ABMEnable | 1 | 0 + * UPS.PowerSummary.PresentStatus.ACPresent | On utility | On battery | On utility | On battery + * Charger ABM mode | Charging | Floating | Resting | Discharging | Disabled | Disabled + * UPS.BatterySystem.Charger.Mode | 1 | 3 | 4 | 2 | 6 | 6 + * UPS.PowerSummary.PresentStatus.Charging | 1 | 1 | 1 | 0 | 1 | 0 + * UPS.PowerSummary.PresentStatus.Discharging | 0 |  0 |  0 | 1 | 0 | 1 + * + * Notes (from David G. Miller) to understand ABM status: + * When supporting ABM, when a UPS powers up or returns from battery, or + * ends the ABM rest mode, it enters charge mode. + * Some UPSs run a different charger reference voltage during charge mode + * but all the newer models should not be doing that, but basically once + * the battery voltage reaches the charger reference level (should be 2.3 + * volts/cell), the charger is considered in float mode. Some UPSs will not + * annunciate float mode until the charger power starts falling from the maximum + * level indicating the battery is truly at the float voltage or in float mode. + * The %charge level is based on battery voltage and the charge mode timer + * (should be 48 hours) and some UPSs add in a value that’s related to charger + * power output. So you can have UPS that enters float mode with anywhere + * from 80% or greater battery capacity. + * float mode is not important from the software’s perspective, it’s there to + * help determine if the charger is advancing correctly. + * So in float mode, the charger is charging the battery, so by definition you + * can assert the CHRG flag in NUT when in “float” mode or “charge” mode. + * When in “rest” mode the charger is not delivering anything to the battery, + * but it will when the ABM cycle(28 days) ends, or a battery discharge occurs + * and utility returns. This is when the ABM status should be “resting”. + * If a battery failure is detected that disables the charger, it should be + * reporting “off” in the ABM charger status. + * Of course when delivering load power from the battery, the ABM status is + * discharging. + */ + +#define ABM_UNKNOWN -1 +#define ABM_DISABLED 0 +#define ABM_ENABLED 1 + +/* Internal flag to process battery status (CHRG/DISCHRG) and ABM */ +static int advanced_battery_monitoring = ABM_UNKNOWN; + +/* Used to store internally if ABM is enabled or not */ +static const char *eaton_abm_enabled_fun(double value) +{ + advanced_battery_monitoring = value; + + upsdebugx(2, "ABM is %s", (advanced_battery_monitoring==1)?"enabled":"disabled"); + + /* Return NULL, not to get the value published! */ + return NULL; +} + +static info_lkp_t eaton_abm_enabled_info[] = { + { 0, "dummy", eaton_abm_enabled_fun }, + { 0, NULL, NULL } +}; + +/* Note 1: This point will need more clarification! */ +# if 0 +/* Used to store internally if ABM is enabled or not (for legacy units) */ +static const char *eaton_abm_enabled_legacy_fun(double value) +{ + advanced_battery_monitoring = value; + + upsdebugx(2, "ABM is %s (legacy data)", (advanced_battery_monitoring==1)?"enabled":"disabled"); + + /* Return NULL, not to get the value published! */ + return NULL; +} + +static info_lkp_t eaton_abm_enabled_legacy_info[] = { + { 0, "dummy", eaton_abm_enabled_legacy_fun }, + { 0, NULL, NULL } +}; +#endif /* if 0 */ + +/* Used to process ABM flags, for battery.charger.status */ +static const char *eaton_abm_status_fun(double value) +{ + /* Don't process if ABM is disabled */ + if (advanced_battery_monitoring == ABM_DISABLED) { + /* Clear any previously published data, in case + * the user has switched off ABM */ + dstate_delinfo("battery.charger.status"); + return NULL; + } + + upsdebugx(2, "ABM numeric status: %i", (int)value); + + switch ((long)value) + { + case 1: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "charging"); + break; + case 2: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "discharging"); + break; + case 3: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "floating"); + break; + case 4: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "resting"); + break; + case 6: /* ABM Charger Disabled */ + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "off"); + break; + case 5: /* Undefined - ABM is not activated */ + default: + /* Return NULL, not to get the value published! */ + return NULL; + } + + upsdebugx(2, "ABM string status: %s", mge_scratch_buf); + + return mge_scratch_buf; +} + +static info_lkp_t eaton_abm_status_info[] = { + { 1, "dummy", eaton_abm_status_fun }, + { 0, NULL, NULL } +}; + +/* Used to process ABM flags, for ups.status (CHRG/DISCHRG/RB) */ +static const char *eaton_abm_chrg_dischrg_fun(double value) +{ + /* Don't process if ABM is disabled */ + if (advanced_battery_monitoring == ABM_DISABLED) + return NULL; + + switch ((long)value) + { + case 1: /* charging status */ + case 3: /* floating status */ + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "chrg"); + break; + case 2: + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "dischrg"); + break; + case 6: /* ABM Charger Disabled */ + case 4: /* resting, nothing to publish! (?) */ + case 5: /* Undefined - ABM is not activated */ + default: + /* Return NULL, not to get the value published! */ + return NULL; + } + + upsdebugx(2, "ABM CHRG/DISCHRG legacy string status (ups.status): %s", mge_scratch_buf); + + return mge_scratch_buf; +} + +static info_lkp_t eaton_abm_chrg_dischrg_info[] = { + { 1, "dummy", eaton_abm_chrg_dischrg_fun }, + { 0, NULL, NULL } +}; + +/* ABM also implies that standard CHRG/DISCHRG are processed according + * to weither ABM is enabled or not... + * If ABM is disabled, we publish these legacy status + * Otherwise, we don't publish on ups.status, but only battery.charger.status */ +/* FIXME: we may prefer to publish the CHRG/DISCHRG status + * on battery.charger.status?! */ +static const char *eaton_abm_check_dischrg_fun(double value) +{ + if (advanced_battery_monitoring == ABM_DISABLED) + { + if (value == 1) { + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "dischrg"); + } + else { + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "!dischrg"); + } + } + else { + /* Else, ABM is enabled, we should return NULL, + * not to get the value published! + * However, clear flags that would persist in case of prior + * publication in ABM-disabled mode */ + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "!dischrg"); + } + return mge_scratch_buf; +} + +static info_lkp_t eaton_discharging_info[] = { + { 1, "dummy", eaton_abm_check_dischrg_fun }, + { 0, NULL, NULL } +}; + +static const char *eaton_abm_check_chrg_fun(double value) +{ + if (advanced_battery_monitoring == ABM_DISABLED) + { + if (value == 1) { + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "chrg"); + } + else { + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "!chrg"); + } + } + else { + /* Else, ABM is enabled, we should return NULL, + * not to get the value published! + * However, clear flags that would persist in case of prior + * publication in ABM-disabled mode */ + snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%s", "!chrg"); + } + return mge_scratch_buf; +} + +static info_lkp_t eaton_charging_info[] = { + { 1, "dummy", eaton_abm_check_chrg_fun }, + { 0, NULL, NULL } +}; + /* The HID path 'UPS.PowerSummary.Time' reports Unix time (ie the number of * seconds since 1970-01-01 00:00:00. This has to be split between ups.date and * ups.time */ @@ -880,6 +1098,21 @@ static hid_info_t mge_hid2nut[] = { "battery.voltage.nominal", 0, 0, "UPS.PowerSummary.ConfigVoltage", NULL, "%s", HU_FLAG_STATIC, mge_battery_voltage_nominal }, { "battery.protection", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.BatterySystem.Battery.DeepDischargeProtection", NULL, "%s", HU_FLAG_SEMI_STATIC, yes_no_info }, { "battery.energysave", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].EnergySaving", NULL, "%s", HU_FLAG_SEMI_STATIC, yes_no_info }, + { "battery.energysave.load", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].ConfigPercentLoad", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + /* Current implementation */ + { "battery.energysave.delay", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].EnergySaving.ShutdownTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + /* Newer implementation */ + { "battery.energysave.delay", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].ShutdownTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + { "battery.energysave.realpower", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Input.[3].ConfigActivePower", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, + /* ABM (Advanced Battery Monitoring) processing + * Must be processed before the BOOL status */ + /* Not published, just to store in internal var. advanced_battery_monitoring */ + { "battery.charger.status", 0, 0, "UPS.BatterySystem.Charger.ABMEnable", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_enabled_info }, + /* Same as the one above, but for legacy units */ + /* Refer to Note 1 (This point will need more clarification!) + { "battery.charger.status", 0, 0, "UPS.BatterySystem.Charger.PresentStatus.Used", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_enabled_legacy_info }, */ + /* This data is the actual ABM status information */ + { "battery.charger.status", 0, 0, "UPS.BatterySystem.Charger.Mode", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_status_info }, /* UPS page */ { "ups.efficiency", 0, 0, "UPS.PowerConverter.Output.Efficiency", NULL, "%.0f", 0, NULL }, @@ -922,8 +1155,11 @@ static hid_info_t mge_hid2nut[] = { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.ACPresent", NULL, NULL, HU_FLAG_QUICK_POLL, online_info }, { "BOOL", 0, 0, "UPS.PowerConverter.Input.[3].PresentStatus.Used", NULL, NULL, 0, mge_onbatt_info }, { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.Used", NULL, NULL, 0, online_info }, - { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Discharging", NULL, NULL, HU_FLAG_QUICK_POLL, discharging_info }, - { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Charging", NULL, NULL, HU_FLAG_QUICK_POLL, charging_info }, + /* These 2 ones are used when ABM is disabled */ + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Discharging", NULL, NULL, HU_FLAG_QUICK_POLL, eaton_discharging_info }, + { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Charging", NULL, NULL, HU_FLAG_QUICK_POLL, eaton_charging_info }, + /* And this one when ABM is enabled (same as battery.charger.status) */ + { "BOOL", 0, 0, "UPS.BatterySystem.Charger.Mode", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_chrg_dischrg_info }, /* FIXME: on Dell, the above requires an "AND" with "UPS.BatterySystem.Charger.Mode = 1" */ { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit", NULL, NULL, HU_FLAG_QUICK_POLL, lowbatt_info }, /* Output overload, Level 1 (FIXME: add the level?) */ @@ -940,11 +1176,6 @@ static hid_info_t mge_hid2nut[] = { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.VoltageOutOfRange", NULL, NULL, 0, vrange_info }, { "BOOL", 0, 0, "UPS.PowerConverter.Input.[1].PresentStatus.FrequencyOutOfRange", NULL, NULL, 0, frange_info }, { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.Good", NULL, NULL, 0, off_info }, -#if 0 - /* TODO: UPS.BatterySystem.Charger.PresentStatus.Used is related to ABM */ - { "BOOL", 0, 0, "UPS.BatterySystem.Charger.PresentStatus.Used", NULL, NULL, 0, off_info }, - /* FIXME: on Dell, the above requires an "AND" with "UPS.BatterySystem.Charger.Mode = 4 (ABM Resting)" */ -#endif { "BOOL", 0, 0, "UPS.PowerConverter.Input.[2].PresentStatus.Used", NULL, NULL, 0, bypass_auto_info }, /* Automatic bypass */ { "BOOL", 0, 0, "UPS.PowerConverter.Input.[4].PresentStatus.Used", NULL, NULL, 0, bypass_manual_info }, /* Manual bypass */ { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.FanFailure", NULL, NULL, 0, fanfail_info }, diff --git a/drivers/netvision-mib.c b/drivers/netvision-mib.c index 3b31e32..31801f7 100644 --- a/drivers/netvision-mib.c +++ b/drivers/netvision-mib.c @@ -4,6 +4,7 @@ * Copyright (C) * 2004 Thanos Chatziathanassiou * 2012 Manuel Bouyer + * 2015 Arnaud Quette * * 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 @@ -24,7 +25,7 @@ #include "netvision-mib.h" -#define NETVISION_MIB_VERSION "0.3" +#define NETVISION_MIB_VERSION "0.4" #define NETVISION_SYSOID ".1.3.6.1.4.1.4555.1.1.1" @@ -46,6 +47,13 @@ static info_lkp_t netvision_batt_info[] = { { 0, "NULL" } }; +/* Battery status: upsAlarmOnBattery */ +static info_lkp_t netvision_onbatt_info[] = { + { 0, "OL" }, /* Online */ + { 1, "OB" }, /* On battery */ + { 0, "NULL" } +}; + #define NETVISION_OID_SECONDSONBATTERY ".1.3.6.1.4.1.4555.1.1.1.1.2.2.0" #define NETVISION_OID_BATT_RUNTIME_REMAINING ".1.3.6.1.4.1.4555.1.1.1.1.2.3.0" #define NETVISION_OID_BATT_CHARGE ".1.3.6.1.4.1.4555.1.1.1.1.2.4.0" @@ -119,6 +127,9 @@ static snmp_info_t netvision_mib[] = { SU_FLAG_OK | SU_STATUS_BATT, &netvision_batt_info[0] }, { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, NETVISION_OID_OUTPUT_SOURCE, "", SU_FLAG_OK | SU_STATUS_PWR, &netvision_output_info[0] }, + /* upsAlarmOnBattery */ + { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.4555.1.1.1.1.6.3.2.0", "", + SU_FLAG_OK | SU_STATUS_PWR, &netvision_onbatt_info[0] }, /* ups load */ { "ups.load", 0, 1, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_INPUT_1, NULL }, diff --git a/drivers/nutdrv_qx.c b/drivers/nutdrv_qx.c index f27e89b..8b71a31 100644 --- a/drivers/nutdrv_qx.c +++ b/drivers/nutdrv_qx.c @@ -33,7 +33,7 @@ * */ -#define DRIVER_VERSION "0.06" +#define DRIVER_VERSION "0.17" #include "main.h" @@ -62,6 +62,7 @@ /* == Subdrivers == */ /* Include all known subdrivers */ +#include "nutdrv_qx_bestups.h" #include "nutdrv_qx_mecer.h" #include "nutdrv_qx_megatec.h" #include "nutdrv_qx_megatec-old.h" @@ -69,14 +70,17 @@ #include "nutdrv_qx_q1.h" #include "nutdrv_qx_voltronic.h" #include "nutdrv_qx_voltronic-qs.h" +#include "nutdrv_qx_voltronic-qs-hex.h" #include "nutdrv_qx_zinto.h" -/* Master list of avaiable subdrivers */ +/* Master list of available subdrivers */ static subdriver_t *subdriver_list[] = { &voltronic_subdriver, &voltronic_qs_subdriver, + &voltronic_qs_hex_subdriver, &mustek_subdriver, &megatec_old_subdriver, + &bestups_subdriver, &mecer_subdriver, &megatec_subdriver, &zinto_subdriver, @@ -439,9 +443,10 @@ static int cypress_command(const char *cmd, char *buf, size_t buflen) ret = usb_control_msg(udev, USB_ENDPOINT_OUT + USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x09, 0x200, 0, &tmp[i], 8, 5000); if (ret <= 0) { - upsdebugx(3, "send: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "send: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } + } upsdebugx(3, "send: %.*s", (int)strcspn(tmp, "\r"), tmp); @@ -449,7 +454,7 @@ static int cypress_command(const char *cmd, char *buf, size_t buflen) /* Read reply */ memset(buf, 0, buflen); - for (i = 0; (i <= buflen-8) && (strchr(buf, '\r') == NULL); i += ret) { + for (i = 0; (i <= buflen-8) && (memchr(buf, '\r', buflen) == NULL); i += ret) { /* Read data in 8-byte chunks */ /* ret = usb->get_interrupt(udev, (unsigned char *)&buf[i], 8, 1000); */ @@ -457,9 +462,13 @@ static int cypress_command(const char *cmd, char *buf, size_t buflen) /* Any errors here mean that we are unable to read a reply (which will happen after successfully writing a command to the UPS) */ if (ret <= 0) { - upsdebugx(3, "read: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } + + snprintf(tmp, sizeof(tmp), "read [% 3d]", (int)i); + upsdebug_hex(5, tmp, &buf[i], ret); + } upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); @@ -490,11 +499,12 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) } if (ret < 0) { - upsdebugx(3, "flush: %s", usb_strerror()); + upsdebugx(3, "flush: %s (%d)", usb_strerror(), ret); break; } upsdebug_hex(4, "dump", tmp, ret); + } /* Send command */ @@ -508,9 +518,10 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) ret = usb_control_msg(udev, USB_ENDPOINT_OUT + USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x09, 0x200, 0, &tmp[i], 8, 1000); if (ret <= 0) { - upsdebugx(3, "send: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "send: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } + } upsdebugx(3, "send: %.*s", (int)strcspn(tmp, "\r"), tmp); @@ -518,7 +529,7 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) /* Read reply */ memset(buf, 0, buflen); - for (i = 0; (i <= buflen-8) && (strchr(buf, '\r') == NULL); i += ret) { + for (i = 0; (i <= buflen-8) && (memchr(buf, '\r', buflen) == NULL); i += ret) { /* Read data in 8-byte chunks */ /* ret = usb->get_interrupt(udev, (unsigned char *)&buf[i], 8, 1000); */ @@ -526,9 +537,13 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) /* Any errors here mean that we are unable to read a reply (which will happen after successfully writing a command to the UPS) */ if (ret <= 0) { - upsdebugx(3, "read: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } + + snprintf(tmp, sizeof(tmp), "read [% 3d]", (int)i); + upsdebug_hex(5, tmp, &buf[i], ret); + } upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); @@ -539,8 +554,8 @@ static int phoenix_command(const char *cmd, char *buf, size_t buflen) static int ippon_command(const char *cmd, char *buf, size_t buflen) { char tmp[64]; - int ret, len; - size_t i; + int ret; + size_t i, len; /* Send command */ snprintf(tmp, sizeof(tmp), "%s", cmd); @@ -551,9 +566,10 @@ static int ippon_command(const char *cmd, char *buf, size_t buflen) ret = usb_control_msg(udev, USB_ENDPOINT_OUT + USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x09, 0x2, 0, &tmp[i], 8, 1000); if (ret <= 0) { - upsdebugx(3, "send: %s", (ret != -ETIMEDOUT) ? usb_strerror() : "Connection timed out"); + upsdebugx(3, "send: %s (%d)", (ret != -ETIMEDOUT) ? usb_strerror() : "Connection timed out", ret); return ret; } + } upsdebugx(3, "send: %.*s", (int)strcspn(tmp, "\r"), tmp); @@ -563,23 +579,36 @@ static int ippon_command(const char *cmd, char *buf, size_t buflen) /* Any errors here mean that we are unable to read a reply (which will happen after successfully writing a command to the UPS) */ if (ret <= 0) { - upsdebugx(3, "read: %s", (ret != -ETIMEDOUT) ? usb_strerror() : "Connection timed out"); + upsdebugx(3, "read: %s (%d)", (ret != -ETIMEDOUT) ? usb_strerror() : "Connection timed out", ret); return ret; } - /* - * As Ippon will always return 64 bytes in response, we have to - * calculate and return length of actual response data here. - * Empty response will look like 0x00 0x0D, otherwise it will be - * data string terminated by 0x0D. - */ - len = (int)strcspn(tmp, "\r"); - upsdebugx(3, "read: %.*s", len, tmp); - if (len > 0) { - len ++; + /* As Ippon will always return 64 bytes in response, we have to calculate and return length of actual response data here. + * Empty response will look like 0x00 0x0D, otherwise it will be data string terminated by 0x0D. */ + + for (i = 0, len = 0; i < (size_t)ret; i++) { + + if (tmp[i] != '\r') + continue; + + len = ++i; + break; + } - snprintf(buf, buflen, "%.*s", len, tmp); - return len; + + /* Just in case there wasn't any '\r', fallback to string length, if any */ + if (!len) + len = strlen(tmp); + + upsdebug_hex(5, "read", tmp, (int)len); + upsdebugx(3, "read: %.*s", (int)strcspn(tmp, "\r"), tmp); + + len = len < buflen ? len : buflen - 1; + + memset(buf, 0, buflen); + memcpy(buf, tmp, len); + + return (int)len; } /* Krauler communication subdriver */ @@ -623,13 +652,12 @@ static int krauler_command(const char *cmd, char *buf, size_t buflen) if (langid_fix != -1) { /* Apply langid_fix value */ ret = usb_get_string(udev, command[i].index, langid_fix, buf, buflen); - } - else { + } else { ret = usb_get_string_simple(udev, command[i].index, buf, buflen); } if (ret <= 0) { - upsdebugx(3, "read: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); return ret; } @@ -673,7 +701,9 @@ static int krauler_command(const char *cmd, char *buf, size_t buflen) /* Replace the first byte of what we received with the correct one */ buf[0] = command[i].prefix; + upsdebug_hex(5, "read", buf, ret); upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); + return ret; } @@ -687,6 +717,219 @@ static int krauler_command(const char *cmd, char *buf, size_t buflen) return snprintf(buf, buflen, "%s", cmd); } +/* Fabula communication subdriver */ +static int fabula_command(const char *cmd, char *buf, size_t buflen) +{ + const struct { + const char *str; /* Megatec command */ + const int index; /* Fabula string index for this command */ + } commands[] = { + { "Q1\r", 0x03, }, /* Status */ + { "F\r", 0x0d, }, /* Ratings */ + { "I\r", 0x0c, }, /* Vendor infos */ + { "Q\r", 0x07, }, /* Beeper toggle */ + { "C\r", 0x0a, }, /* Cancel shutdown/Load on [0x(0..F)A]*/ + { NULL } + }; + int i, ret, index = 0; + + upsdebugx(3, "send: %.*s", (int)strcspn(cmd, "\r"), cmd); + + for (i = 0; commands[i].str; i++) { + + if (strcmp(cmd, commands[i].str)) + continue; + + index = commands[i].index; + break; + + } + + if (!index) { + + int val2 = -1; + double val1 = -1; + + /* Shutdowns */ + if ( + sscanf(cmd, "S%lfR%d\r", &val1, &val2) == 2 || + sscanf(cmd, "S%lf\r", &val1) == 1 + ) { + + double delay; + + /* 0x(1+)0 -> shutdown.stayoff (SnR0000) + * 0x(1+)8 -> shutdown.return (Sn[Rm], m != 0) [delay before restart is always 10 seconds] + * +0x10 (16dec) = next megatec delay (min .5 = hex 0x1*; max 10 = hex 0xF*) -> n < 1 ? -> n += .1; n >= 1 ? -> n += 1 */ + + /* delay: [.5..10] (-> seconds: [30..600]) */ + delay = val1 < .5 ? .5 : val1 > 10 ? 10 : val1; + + if (delay < 1) + index = 16 + round((delay - .5) * 10) * 16; + else + index = 96 + (delay - 1) * 16; + + /* shutdown.return (Sn[Rm], m != 0) */ + if (val2) + index += 8; + + /* Unknown commands */ + } else { + + /* Echo the unknown command back */ + upsdebugx(3, "read: %.*s", (int)strcspn(cmd, "\r"), cmd); + return snprintf(buf, buflen, "%s", cmd); + + } + + } + + upsdebugx(4, "command index: 0x%02x", index); + + /* Send command/Read reply */ + ret = usb_get_string_simple(udev, index, buf, buflen); + + if (ret <= 0) { + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); + return ret; + } + + upsdebug_hex(5, "read", buf, ret); + upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); + + /* The UPS always replies "UPS No Ack" when a supported command is issued (either if it fails or if it succeeds).. */ + if (!strcasecmp(buf, "UPS No Ack")) + /* ..because of that, always return 0 (as if it was a timeout): queries will see it as a failure, instant commands ('megatec' protocol) as a success */ + return 0; + + return ret; +} + +/* Fuji communication subdriver */ +static int fuji_command(const char *cmd, char *buf, size_t buflen) +{ + unsigned char tmp[8]; + char command[SMALLBUF] = "", + read[SMALLBUF] = ""; + int ret, answer_len, val2; + double val1; + size_t i; + const struct { + const char *command; /* Megatec command */ + const int answer_len; /* Expected length of the answer to the ongoing query */ + } query[] = { + { "Q1", 47 }, + { "F", 22 }, + { "I", 39 }, + { NULL } + }; + + /* + * Queries (b1..b8) sent (as a 8-bytes interrupt) to the UPS adopt the following scheme: + * + * b1: 0x80 + * b2: 0x06 + * b3: + * b4: 0x03 + * b5..bn: + * bn+1..b7: [] + * b8: + * + * Where: + * Length (in Hex) of the command (without the trailing CR) + 1 + * Command/query (without the trailing CR) + * [] 0x00 padding to the 7th byte + * Expected length (in Hex) of the answer to the ongoing query (0 when no reply is expected, i.e. commands) + * + * Replies to queries (commands are followed by action without any reply) are sent from the UPS (in 8-byte chunks) with 0x00 padding after the trailing CR to full 8 bytes. + * + */ + + /* Send command */ + + /* Remove the CR */ + snprintf(command, sizeof(command), "%.*s", (int)strcspn(cmd, "\r"), cmd); + + /* Length of the command that will be sent to the UPS can be at most: 8 - 5 (0x80, 0x06, , 0x03, ) = 3. + * As a consequence also 'SnRm' commands (shutdown.{return,stayoff} and load.off) are not supported. + * So, map all the 'SnRm' shutdown.returns (m != 0) as the corresponding 'Sn' commands, meanwhile ignoring ups.delay.start and making the UPS turn on the load as soon as power is back. */ + if (sscanf(cmd, "S%lfR%d\r", &val1, &val2) == 2 && val2) { + upsdebugx(4, "%s: trimming '%s' to '%.*s'", __func__, command, 3, command); + command[3] = 0; + } + /* Too long command */ + if (strlen(command) > 3) { + /* Be 'megatec-y': echo the unsupported command back */ + upsdebugx(3, "%s: unsupported command %s", __func__, command); + return snprintf(buf, buflen, "%s", cmd); + } + + /* Expected length of the answer to the ongoing query (0 when no reply is expected, i.e. commands) */ + answer_len = 0; + for (i = 0; query[i].command; i++) { + + if (strcmp(command, query[i].command)) + continue; + + answer_len = query[i].answer_len; + break; + + } + + memset(tmp, 0, sizeof(tmp)); + + /* 0x80 */ + tmp[0] = 0x80; + /* 0x06 */ + tmp[1] = 0x06; + /* */ + tmp[2] = strlen(command) + 1; + /* 0x03 */ + tmp[3] = 0x03; + /* */ + memcpy(&tmp[4], command, strlen(command)); + /* */ + tmp[7] = answer_len; + + upsdebug_hex(4, "command", (char *)tmp, 8); + + /* Write data */ + ret = usb_interrupt_write(udev, USB_ENDPOINT_OUT | 2, (char *)tmp, 8, USB_TIMEOUT); + + if (ret <= 0) { + upsdebugx(3, "send: %s (%d)", ret ? usb_strerror() : "timeout", ret); + return ret; + } + + upsdebugx(3, "send: %s", command); + + /* Read reply */ + + memset(buf, 0, buflen); + + for (i = 0; (i <= buflen - 8) && (memchr(buf, '\r', buflen) == NULL); i += ret) { + + /* Read data in 8-byte chunks */ + ret = usb_interrupt_read(udev, USB_ENDPOINT_IN | 1, &buf[i], 8, 1000); + + /* Any errors here mean that we are unable to read a reply (which will happen after successfully writing a command to the UPS) */ + if (ret <= 0) { + upsdebugx(3, "read: %s (%d)", ret ? usb_strerror() : "timeout", ret); + return ret; + } + + snprintf(read, sizeof(read), "read [%3d]", (int)i); + upsdebug_hex(5, read, &buf[i], ret); + + } + + upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf); + + /* As Fuji units return the reply in 8-byte chunks always padded to the 8th byte with 0x00, we need to calculate and return the length of the actual response here. */ + return (int)strlen(buf); +} + static void *cypress_subdriver(USBDevice_t *device) { subdriver_command = &cypress_command; @@ -711,31 +954,87 @@ static void *phoenix_subdriver(USBDevice_t *device) return NULL; } -/* USB VendorID/ProductID match - note: rightmost comment is used for naming rules by tools/nut-usbinfo.pl */ -static usb_device_id_t qx_usb_id[] = { - { USB_DEVICE(0x05b8, 0x0000), &cypress_subdriver }, /* Agiler UPS */ - { USB_DEVICE(0x0001, 0x0000), &krauler_subdriver }, /* Krauler UP-M500VA */ - { USB_DEVICE(0xffff, 0x0000), &krauler_subdriver }, /* Ablerex 625L USB */ - { USB_DEVICE(0x0665, 0x5161), &cypress_subdriver }, /* Belkin F6C1200-UNV/Voltronic Power UPSes */ - { USB_DEVICE(0x06da, 0x0002), &cypress_subdriver }, /* Online Yunto YQ450 */ - { USB_DEVICE(0x06da, 0x0003), &ippon_subdriver }, /* Mustek Powermust */ - { USB_DEVICE(0x06da, 0x0004), &cypress_subdriver }, /* Phoenixtec Innova 3/1 T */ - { USB_DEVICE(0x06da, 0x0005), &cypress_subdriver }, /* Phoenixtec Innova RT */ - { USB_DEVICE(0x06da, 0x0201), &cypress_subdriver }, /* Phoenixtec Innova T */ - { USB_DEVICE(0x06da, 0x0601), &phoenix_subdriver }, /* Online Zinto A */ - { USB_DEVICE(0x0f03, 0x0001), &cypress_subdriver }, /* Unitek Alpha 1200Sx */ - { USB_DEVICE(0x14f0, 0x00c9), &phoenix_subdriver }, /* GE EP series */ +static void *fabula_subdriver(USBDevice_t *device) +{ + subdriver_command = &fabula_command; + return NULL; +} + +static void *fuji_subdriver(USBDevice_t *device) +{ + subdriver_command = &fuji_command; + return NULL; +} + +/* USB device match structure */ +typedef struct { + const int vendorID; /* USB device's VendorID */ + const int productID; /* USB device's ProductID */ + const char *vendor; /* USB device's iManufacturer string */ + const char *product; /* USB device's iProduct string */ + void *(*fun)(USBDevice_t *); /* Handler for specific processing */ +} qx_usb_device_id_t; + +/* USB VendorID/ProductID/iManufacturer/iProduct match - note: rightmost comment is used for naming rules by tools/nut-usbinfo.pl */ +static qx_usb_device_id_t qx_usb_id[] = { + { USB_DEVICE(0x05b8, 0x0000), NULL, NULL, &cypress_subdriver }, /* Agiler UPS */ + { USB_DEVICE(0xffff, 0x0000), NULL, NULL, &krauler_subdriver }, /* Ablerex 625L USB */ + { USB_DEVICE(0x0665, 0x5161), NULL, NULL, &cypress_subdriver }, /* Belkin F6C1200-UNV/Voltronic Power UPSes */ + { USB_DEVICE(0x06da, 0x0002), NULL, NULL, &cypress_subdriver }, /* Online Yunto YQ450 */ + { USB_DEVICE(0x06da, 0x0003), NULL, NULL, &ippon_subdriver }, /* Mustek Powermust */ + { USB_DEVICE(0x06da, 0x0004), NULL, NULL, &cypress_subdriver }, /* Phoenixtec Innova 3/1 T */ + { USB_DEVICE(0x06da, 0x0005), NULL, NULL, &cypress_subdriver }, /* Phoenixtec Innova RT */ + { USB_DEVICE(0x06da, 0x0201), NULL, NULL, &cypress_subdriver }, /* Phoenixtec Innova T */ + { USB_DEVICE(0x06da, 0x0601), NULL, NULL, &phoenix_subdriver }, /* Online Zinto A */ + { USB_DEVICE(0x0f03, 0x0001), NULL, NULL, &cypress_subdriver }, /* Unitek Alpha 1200Sx */ + { USB_DEVICE(0x14f0, 0x00c9), NULL, NULL, &phoenix_subdriver }, /* GE EP series */ + { USB_DEVICE(0x0001, 0x0000), "MEC", "MEC0003", &fabula_subdriver }, /* Fideltronik/MEC LUPUS 500 USB */ + { USB_DEVICE(0x0001, 0x0000), "ATCL FOR UPS", "ATCL FOR UPS", &fuji_subdriver }, /* Fuji UPSes */ + { USB_DEVICE(0x0001, 0x0000), NULL, NULL, &krauler_subdriver }, /* Krauler UP-M500VA */ /* End of list */ - { -1, -1, NULL } + { -1, -1, NULL, NULL, NULL } }; +static int qx_is_usb_device_supported(qx_usb_device_id_t *usb_device_id_list, USBDevice_t *device) +{ + int retval = NOT_SUPPORTED; + qx_usb_device_id_t *usbdev; + + for (usbdev = usb_device_id_list; usbdev->vendorID != -1; usbdev++) { + + if (usbdev->vendorID != device->VendorID) + continue; + + /* Flag as possibly supported if we see a known vendor */ + retval = POSSIBLY_SUPPORTED; + + if (usbdev->productID != device->ProductID) + continue; + + if (usbdev->vendor && (!device->Vendor || strcasecmp(usbdev->vendor, device->Vendor))) + continue; + + if (usbdev->product && (!device->Product || strcasecmp(usbdev->product, device->Product))) + continue; + + /* Call the specific handler, if it exists */ + if (usbdev->fun != NULL) + (*usbdev->fun)(device); + + return SUPPORTED; + + } + + return retval; +} + static int device_match_func(USBDevice_t *hd, void *privdata) { if (subdriver_command) { return 1; } - switch (is_usb_device_supported(qx_usb_id, hd)) + switch (qx_is_usb_device_supported(qx_usb_id, hd)) { case SUPPORTED: return 1; @@ -837,7 +1136,7 @@ int instcmd(const char *cmdname, const char *extradata) return STAT_INSTCMD_INVALID; } - /* If extradata is empty, use the default value from the blazer to NUT table */ + /* If extradata is empty, use the default value from the QX to NUT table */ extradata = extradata ? extradata : item->dfl; snprintf(value, sizeof(value), "%s", extradata ? extradata : ""); @@ -1264,14 +1563,8 @@ void upsdrv_makevartable(void) #ifdef QX_USB addvar(VAR_VALUE, "subdriver", "Serial-over-USB subdriver selection"); - addvar(VAR_VALUE, "vendorid", "Regular expression to match UPS Manufacturer numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); - - addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); - addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); - addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); - - addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ + nut_usb_addvars(); addvar(VAR_VALUE, "langid_fix", "Apply the language ID workaround to the krauler subdriver (0x409 or 0x4095)"); #endif /* QX_USB */ @@ -1545,6 +1838,8 @@ void upsdrv_initups(void) { "phoenix", &phoenix_command }, { "ippon", &ippon_command }, { "krauler", &krauler_command }, + { "fabula", &fabula_command }, + { "fuji", &fuji_command }, { NULL } }; @@ -1794,7 +2089,7 @@ static int qx_command(const char *cmd, char *buf, size_t buflen) ret = ser_send(upsfd, "%s", cmd); if (ret <= 0) { - upsdebugx(3, "send: %s", ret ? strerror(errno) : "timeout"); + upsdebugx(3, "send: %s (%d)", ret ? strerror(errno) : "timeout", ret); return ret; } @@ -1803,10 +2098,11 @@ static int qx_command(const char *cmd, char *buf, size_t buflen) ret = ser_get_buf(upsfd, buf, buflen, SER_WAIT_SEC, 0); if (ret <= 0) { - upsdebugx(3, "read: %s", ret ? strerror(errno) : "timeout"); + upsdebugx(3, "read: %s (%d)", ret ? strerror(errno) : "timeout", ret); return ret; } + upsdebug_hex(5, "read", buf, ret); upsdebugx(3, "read: '%.*s'", (int)strcspn(buf, "\r"), buf); #ifdef QX_USB @@ -1833,6 +2129,22 @@ static int qx_command(const char *cmd, char *buf, size_t buflen) } upsdebugx(3, "read: '%.*s'", (int)strcspn(testing[i].answer, "\r"), testing[i].answer); + + /* If requested to do so and this is the case, try to preserve inner '\0's (treat answer as a sequence of bytes) */ + if (testing[i].answer_len > 0 && strlen(testing[i].answer) < (size_t)testing[i].answer_len) { + + size_t len; + + len = buflen <= (size_t)testing[i].answer_len ? buflen - 1 : (size_t)testing[i].answer_len; + len = len <= sizeof(testing[i].answer) ? len : sizeof(testing[i].answer); + + memcpy(buf, testing[i].answer, len); + upsdebug_hex(4, "read", buf, (int)len); + + return len; + + } + return snprintf(buf, buflen, "%s", testing[i].answer); } @@ -2038,6 +2350,10 @@ static bool_t qx_ups_walk(walkmode_t mode) batt.chrg.act = -1; } + /* Clear data from previous_item */ + memset(previous_item.command, 0, sizeof(previous_item.command)); + memset(previous_item.answer, 0, sizeof(previous_item.answer)); + /* 3 modes: QX_WALKMODE_INIT, QX_WALKMODE_QUICK_UPDATE and QX_WALKMODE_FULL_UPDATE */ /* Device data walk */ @@ -2133,15 +2449,22 @@ static bool_t qx_ups_walk(walkmode_t mode) retcode = qx_process_answer(item, strlen(item->answer)); /* ..otherwise: execute command to get answer from the UPS */ - } else + } else { + retcode = qx_process(item, NULL); + } + /* Record item as previous_item */ snprintf(previous_item.command, sizeof(previous_item.command), "%s", item->command); snprintf(previous_item.answer, sizeof(previous_item.answer), "%s", item->answer); if (retcode) { + /* Clear data from the item */ + memset(item->answer, 0, sizeof(item->answer)); + memset(item->value, 0, sizeof(item->value)); + if (item->qxflags & QX_FLAG_QUICK_POLL) return FALSE; @@ -2149,10 +2472,6 @@ static bool_t qx_ups_walk(walkmode_t mode) /* Skip this item from now on */ item->qxflags |= QX_FLAG_SKIP; - /* Clear data from the item */ - snprintf(item->answer, sizeof(item->answer), "%s", ""); - snprintf(item->value, sizeof(item->value), "%s", ""); - /* Don't know what happened, try again later... */ continue; @@ -2162,13 +2481,19 @@ static bool_t qx_ups_walk(walkmode_t mode) retcode = ups_infoval_set(item); /* Clear data from the item */ - snprintf(item->answer, sizeof(item->answer), "%s", ""); - snprintf(item->value, sizeof(item->value), "%s", ""); + memset(item->answer, 0, sizeof(item->answer)); + memset(item->value, 0, sizeof(item->value)); /* Uh-oh! Some error! */ - if (retcode == -1) + if (retcode == -1) { + + if (item->qxflags & QX_FLAG_QUICK_POLL) + return FALSE; + continue; + } + /* Set var flags/range/enum (not for ups.{alarm.status}, hence the retcode check) */ if (retcode && mode == QX_WALKMODE_INIT) { qx_set_var(item); @@ -2176,10 +2501,6 @@ static bool_t qx_ups_walk(walkmode_t mode) } - /* Clear data from previous_item */ - snprintf(previous_item.command, sizeof(previous_item.command), "%s", ""); - snprintf(previous_item.answer, sizeof(previous_item.answer), "%s", ""); - /* Update battery guesstimation */ if (mode == QX_WALKMODE_FULL_UPDATE && (batt.runt.act == -1 || batt.chrg.act == -1)) { @@ -2345,14 +2666,26 @@ int qx_process(item_t *item, const char *command) /* Send the command */ int len = qx_command(command ? command : item->command, buf, sizeof(buf)); - snprintf(item->answer, sizeof(item->answer), "%s", buf); + memset(item->answer, 0, sizeof(item->answer)); + memcpy(item->answer, buf, sizeof(item->answer) <= sizeof(buf) ? sizeof(item->answer) - 1 : sizeof(buf)); + + /* Preprocess the answer */ + if (item->preprocess_answer != NULL) { + len = item->preprocess_answer(item, len); + if (len == -1) { + upsdebugx(4, "%s: failed to preprocess answer [%s]", __func__, item->info_type); + return -1; + } + } /* Process the answer to get the value */ return qx_process_answer(item, len); } -/* Process the value we got back (set status bits and set the value of other parameters). */ -/* Return -1 on failure, 0 for a status update and 1 in all other cases */ +/* Process the value we got back (set status bits and set the value of other parameters) and execute: + * - item-specific preprocessing, if any, otherwise + * - the standard preprocessing (including trimming if QX_FLAG_TRIM is set). + * Return -1 on failure, 0 for a status update and 1 in all other cases */ int ups_infoval_set(item_t *item) { char value[SMALLBUF] = ""; @@ -2385,35 +2718,8 @@ int ups_infoval_set(item_t *item) snprintf(value, sizeof(value), "%s", item->value); /* Cover most of the cases: either left/right filled with hashes, spaces or a mix of both */ - if (item->qxflags & QX_FLAG_TRIM) { - - char buf[SMALLBUF]; - - snprintf(buf, sizeof(buf), "%s", ltrim(value, ' ')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", rtrim(value, ' ')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", ltrim(value, '#')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", rtrim(value, '#')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", ltrim(value, ' ')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", rtrim(value, ' ')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", ltrim(value, '#')); - snprintf(value, sizeof(value), "%s", buf); - - snprintf(buf, sizeof(buf), "%s", rtrim(value, '#')); - snprintf(value, sizeof(value), "%s", buf); - - } + if (item->qxflags & QX_FLAG_TRIM) + rtrim_m(ltrim_m(value, "# "), "# "); if (strcasecmp(item->dfl, "%s")) { diff --git a/drivers/nutdrv_qx.h b/drivers/nutdrv_qx.h index b904689..7672c76 100644 --- a/drivers/nutdrv_qx.h +++ b/drivers/nutdrv_qx.h @@ -71,7 +71,8 @@ typedef struct item_t { * If QX_FLAG_SETVAR is set the value given by the user will be checked against these infos. */ const char *command; /* Command sent to the UPS to get answer/to execute an instant command/to set a variable */ - char answer[SMALLBUF]; /* Answer from the UPS, filled at runtime */ + char answer[SMALLBUF]; /* Answer from the UPS, filled at runtime. + * If you expect a nonvalid C string (e.g.: inner '\0's) or need to perform actions before the answer is used (and treated as a null-terminated string), you should set a preprocess_answer() function */ const int answer_len; /* Expected min length of the answer. Set it to 0 if there’s no minimum length to look after. */ const char leading; /* Expected leading character of the answer (optional) */ @@ -87,6 +88,10 @@ typedef struct item_t { unsigned long qxflags; /* Driver's own flags */ + int (*preprocess_answer)(struct item_t *item, const int len); /* Function to preprocess the answer we got from the UPS before we do anything else (e.g. for CRC, decoding, ...) + * This function is given the currently processed item (item) with the answer we got from the UPS unmolested and already stored in item->answer and the length of that answer (len). + * Return -1 in case of errors, else the length of the newly allocated item->answer (from now on, treated as a null-terminated string). */ + int (*preprocess)(struct item_t *item, char *value, size_t valuelen); /* Function to preprocess the data from/to the UPS * This function is given the currently processed item (item), a char array (value) and its size_t (valuelen). * Return -1 in case of errors, else 0. @@ -111,11 +116,17 @@ typedef struct item_t { #define MAXTRIES 3 /* Max number of retries */ +#ifdef TESTING /* Testing struct */ typedef struct { - const char *cmd; /* Command to match */ - const char *answer; /* Answer for that command */ + const char *cmd; /* Command to match */ + const char answer[SMALLBUF]; /* Answer for that command. + * Note: if 'answer' contains inner '\0's, in order to preserve them, 'answer_len' as well as an item_t->preprocess_answer() function must be set */ + const int answer_len; /* Answer length: + * - if set to -1 -> auto calculate answer length (treat 'answer' as a null-terminated string) + * - otherwise -> use the provided length (if reasonable) and preserve inner '\0's (treat 'answer' as a sequence of bytes till the item_t->preprocess_answer() function gets called) */ } testing_t; +#endif /* TESTING */ /* Subdriver interface */ typedef struct { @@ -148,7 +159,8 @@ int setvar(const char *varname, const char *val); item_t *find_nut_info(const char *varname, const unsigned long flag, const unsigned long noflag); /* Send 'command' or, if it is NULL, send the command stored in the item to the UPS and process the reply. Return -1 on errors, 0 on success. */ int qx_process(item_t *item, const char *command); - /* Process the value we got back from the UPS (set status bits and set the value of other parameters), calling its preprocess function, if any. Return -1 on failure, 0 for a status update and 1 in all other cases. */ + /* Process the value we got back from the UPS (set status bits and set the value of other parameters), calling its preprocess function, if any, otherwise executing the standard preprocessing (including trimming if QX_FLAG_TRIM is set). + * Return -1 on failure, 0 for a status update and 1 in all other cases. */ int ups_infoval_set(item_t *item); /* Return the currently processed status so that it can be checked with one of the status_bit_t passed to the STATUS() macro. */ int qx_status(void); diff --git a/drivers/nutdrv_qx_bestups.c b/drivers/nutdrv_qx_bestups.c new file mode 100644 index 0000000..1e15b27 --- /dev/null +++ b/drivers/nutdrv_qx_bestups.c @@ -0,0 +1,705 @@ +/* nutdrv_qx_bestups.c - Subdriver for Best Power/Sola Australia UPSes + * + * Copyright (C) + * 2014 Daniele Pezzini + * Based on: + * bestups.c - Copyright (C) + * 1999 Russell Kroll + * Jason White + * + * 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 + * + */ + +#include "main.h" +#include "nutdrv_qx.h" +#include "nutdrv_qx_blazer-common.h" + +#include "nutdrv_qx_bestups.h" + +#define BESTUPS_VERSION "BestUPS 0.04" + +/* Support functions */ +static int bestups_claim(void); +static void bestups_initups(void); +static void bestups_makevartable(void); + +/* Answer preprocess functions */ +static int bestups_preprocess_id_answer(item_t *item, const int len); + +/* Preprocess functions */ +static int bestups_process_setvar(item_t *item, char *value, size_t valuelen); +static int bestups_process_bbb_status_bit(item_t *item, char *value, size_t valuelen); +static int bestups_manufacturer(item_t *item, char *value, size_t valuelen); +static int bestups_model(item_t *item, char *value, size_t valuelen); +static int bestups_batt_runtime(item_t *item, char *value, size_t valuelen); +static int bestups_batt_packs(item_t *item, char *value, size_t valuelen); +static int bestups_get_pins_shutdown_mode(item_t *item, char *value, size_t valuelen); +static int bestups_voltage_settings(item_t *item, char *value, size_t valuelen); + +/* ups.conf settings */ +static int pins_shutdown_mode; + +/* General settings */ +static int inverted_bbb_bit = 0; + + +/* == Ranges/enums == */ + +/* Range for ups.delay.start */ +info_rw_t bestups_r_ondelay[] = { + { "60", 0 }, + { "599940", 0 }, + { "", 0 } +}; + +/* Range for ups.delay.shutdown */ +static info_rw_t bestups_r_offdelay[] = { + { "12", 0 }, + { "5940", 0 }, + { "", 0 } +}; + +/* Range for number of battery packs */ +static info_rw_t bestups_r_batt_packs[] = { + { "0", 0 }, + { "5", 0 }, + { "", 0 } +}; + +/* Range for pin shutdown mode */ +static info_rw_t bestups_r_pins_shutdown_mode[] = { + { "0", 0 }, + { "6", 0 }, + { "", 0 } +}; + + +/* == qx2nut lookup table == */ +static item_t bestups_qx2nut[] = { + + /* Query UPS for status + * > [Q1\r] + * < [(226.0 195.0 226.0 014 49.0 27.5 30.0 00001000\r] + * 01234567890123456789012345678901234567890123456 + * 0 1 2 3 4 + */ + + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, + /* Status bits */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ +/* { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, *//* Beeper status: not supported; always 0 */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, bestups_process_bbb_status_bit }, /* Bypass/Boost or Buck Active - keep this one at the end as it needs the processed data from the previous items */ + + /* Query UPS for ratings and model infos + * > [ID\r] + * < [FOR,750,120,120,20.0,27.6\r] case #1: length = 26 + * < [FOR,1500,120,120,20.0,27.6\r] case #2: length = 27 + * < [FOR,3000,120,120,20.0,100.6\r] case #3: length = 28 + * < [FOR, 750,120,120,20.0, 27.6\r] after being preprocessed: length = 28 + * 0123456789012345678901234567 + * 0 1 2 + */ + + { "device.mfr", 0, NULL, "ID\r", "", 28, 0, "", 0, 2, "%s", QX_FLAG_STATIC, bestups_preprocess_id_answer, bestups_manufacturer }, + { "device.model", 0, NULL, "ID\r", "", 28, 0, "", 0, 2, "%s", QX_FLAG_STATIC, bestups_preprocess_id_answer, bestups_model }, + { "ups.power.nominal", 0, NULL, "ID\r", "", 28, 0, "", 4, 7, "%.0f", QX_FLAG_STATIC, bestups_preprocess_id_answer, NULL }, + { "input.voltage.nominal", 0, NULL, "ID\r", "", 28, 0, "", 9, 11, "%.0f", QX_FLAG_STATIC, bestups_preprocess_id_answer, NULL }, + { "output.voltage.nominal", 0, NULL, "ID\r", "", 28, 0, "", 13, 15, "%.0f", QX_FLAG_STATIC, bestups_preprocess_id_answer, NULL }, + { "battery.voltage.low", 0, NULL, "ID\r", "", 28, 0, "", 17, 20, "%.1f", QX_FLAG_SEMI_STATIC, bestups_preprocess_id_answer, NULL }, + { "battery.voltage.high", 0, NULL, "ID\r", "", 28, 0, "", 22, 26, "%.1f", QX_FLAG_SEMI_STATIC, bestups_preprocess_id_answer, NULL }, + + /* Query UPS for battery runtime (not available on the Patriot Pro/Sola 320 model series) + * > [RT\r] + * < [025\r] + * 0123 + * 0 + */ + + { "battery.runtime", 0, NULL, "RT\r", "", 4, 0, "", 0, 2, "%.0f", QX_FLAG_SKIP, NULL, bestups_batt_runtime }, + + /* Query UPS for number of battery packs (available only on the Axxium/Sola 620 model series) + * > [BP?\r] + * < [02\r] + * 012 + * 0 + */ + + { "battery.packs", ST_FLAG_RW, bestups_r_batt_packs, "BP?\r", "", 3, 0, "", 0, 1, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, bestups_batt_packs }, + + /* Set number of battery packs to n (integer, 0-5) (available only on the Axxium/Sola 620 model series) + * > [BPn\r] + * < [] + */ + + { "battery.packs", 0, bestups_r_batt_packs, "BP%.0f\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, bestups_process_setvar }, + + /* Query UPS for shutdown mode functionality of Pin 1 and Pin 7 on the UPS DB9 communication port (Per Best Power’s EPS-0059) + * > [SS?\r] + * < [0\r] + * 01 + * 0 + */ + + { "pins_shutdown_mode", ST_FLAG_RW, bestups_r_pins_shutdown_mode, "SS?\r", "", 2, 0, "", 0, 0, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, NULL, bestups_get_pins_shutdown_mode }, + + /* Set shutdown mode functionality of Pin 1 and Pin 7 on the UPS DB9 communication port (Per Best Power’s EPS-0059) to n (integer, 0-6) + * > [SSn\r] + * < [] + */ + + { "pins_shutdown_mode", 0, bestups_r_pins_shutdown_mode, "SS%.0f\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, bestups_process_setvar }, + + /* Query UPS for voltage settings + * > [M\r] + * < [0\r] + * 01 + * 0 + */ + + { "input.transfer.low", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.boost.low", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.boost.high", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.voltage.nominal", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "output.voltage.nominal", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.trim.low", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.trim.high", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + { "input.transfer.high", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%d", 0, NULL, bestups_voltage_settings }, + + /* Instant commands */ + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + + /* Server-side settable vars */ + { "ups.delay.start", ST_FLAG_RW, bestups_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, bestups_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + + /* End of structure. */ + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } +}; + + +/* == Testing table == */ +#ifdef TESTING +static testing_t bestups_testing[] = { + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00100000\r", -1 }, + { "ID\r", "FOR,750,120,120,20.0,27.6\r", -1 }, + { "RT\r", "015\r", -1 }, + { "BP?\r", "02\r", -1 }, + { "BP1\r", "", -1 }, + { "SS?\r", "0\r", -1 }, + { "SS2\r", "", -1 }, + { "M\r", "0\r", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0001\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, + { NULL } +}; +#endif /* TESTING */ + + +/* == Support functions == */ + +/* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ +static int bestups_claim(void) +{ + /* We need at least Q1 and ID to run this subdriver */ + + item_t *item = find_nut_info("input.voltage", 0, 0); + + /* Don't know what happened */ + if (!item) + return 0; + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) + return 0; + + /* Unable to process value */ + if (ups_infoval_set(item) != 1) + return 0; + + /* UPS Model */ + item = find_nut_info("device.model", 0, 0); + + /* Don't know what happened */ + if (!item) { + dstate_delinfo("input.voltage"); + return 0; + } + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) { + dstate_delinfo("input.voltage"); + return 0; + } + + /* Unable to process value */ + if (ups_infoval_set(item) != 1) { + dstate_delinfo("input.voltage"); + return 0; + } + + return 1; +} + +/* Subdriver-specific initups */ +static void bestups_initups(void) +{ + blazer_initups_light(bestups_qx2nut); +} + +/* Subdriver-specific flags/vars */ +static void bestups_makevartable(void) +{ + addvar(VAR_VALUE, "pins_shutdown_mode", "Set shutdown mode functionality of Pin 1 and Pin 7 on the UPS DB9 communication port (Per Best Power’s EPS-0059) to n (integer, 0-6)"); + + blazer_makevartable_light(); +} + + +/* == Answer preprocess functions == */ + +/* Preprocess the answer we got back from the UPS when queried with 'ID\r': make data begin always at the same indexes */ +static int bestups_preprocess_id_answer(item_t *item, const int len) +{ + int i; + char refined[SMALLBUF] = "", + rawval[SMALLBUF] = "", + *token, + *saveptr = NULL; + + if (len <= 0) + return len; + + if (len < 25 || len > 27) { + upsdebugx(4, "%s: wrong length [%s: %d]", __func__, item->info_type, len); + return -1; + } + + /* e.g.: + * 1. item->answer = "FOR,750,120,120,20.0,27.6\r"; len = 26 + * 2. item->answer = "FOR,1500,120,120,20.0,27.6\r"; len = 27 + * 3. item->answer = "FOR,3000,120,120,20.0,100.6\r"; len = 28 */ + upsdebugx(4, "read: '%.*s'", (int)strcspn(item->answer, "\r"), item->answer); + + snprintf(rawval, sizeof(rawval), "%s", item->answer); + + for (i = 1, token = strtok_r(rawval, ",", &saveptr); token != NULL; i++, token = strtok_r(NULL, ",", &saveptr)) { + + switch (i) + { + case 1: + snprintf(refined, sizeof(refined), "%s", token); + continue; + case 2: /* Output power */ + snprintfcat(refined, sizeof(refined), ",%4s", token); + continue; + case 6: /* Battery voltage at full charge (+ trailing CR) */ + snprintfcat(refined, sizeof(refined), ",%6s", token); + continue; + default: + snprintfcat(refined, sizeof(refined), ",%s", token); + } + + } + + if (i != 7 || strlen(refined) != 28) { + upsdebugx(2, "noncompliant reply: '%.*s'", (int)strcspn(refined, "\r"), refined); + return -1; + } + + upsdebugx(4, "read: '%.*s'", (int)strcspn(refined, "\r"), refined); + + /* e.g.: item->answer = "FOR, 750,120,120,20.0, 27.6\r"; len = 28 */ + return snprintf(item->answer, sizeof(item->answer), "%s", refined); +} + + +/* == Preprocess functions == */ + +/* *SETVAR(/NONUT)* Preprocess setvars */ +static int bestups_process_setvar(item_t *item, char *value, size_t valuelen) +{ + if (!strlen(value)) { + upsdebugx(2, "%s: value not given for %s", __func__, item->info_type); + return -1; + } + + double val = strtod(value, NULL); + + if (!strcasecmp(item->info_type, "pins_shutdown_mode")) { + + if (val == pins_shutdown_mode) { + upslogx(LOG_INFO, "%s is already set to %.0f", item->info_type, val); + return -1; + } + + } + + snprintf(value, valuelen, item->command, val); + + return 0; +} + +/* Bypass/Boost or Buck status */ +static int bestups_process_bbb_status_bit(item_t *item, char *value, size_t valuelen) +{ + /* Bypass/Boost/Buck bit is not reliable when a battery test, shutdown or on battery condition occurs: always ignore it in these cases */ + if (!(qx_status() & STATUS(OL)) || (qx_status() & (STATUS(CAL) | STATUS(FSD)))) { + + if (item->value[0] == '1') + item->value[0] = '0'; + + return blazer_process_status_bits(item, value, valuelen); + + } + + /* UPSes with inverted bypass/boost/buck bit */ + if (inverted_bbb_bit) { + + if (item->value[0] == '1') + item->value[0] = '0'; + + else if (item->value[0] == '0') + item->value[0] = '1'; + + } + + return blazer_process_status_bits(item, value, valuelen); +} + +/* Identify UPS manufacturer */ +static int bestups_manufacturer(item_t *item, char *value, size_t valuelen) +{ + /* Best Power devices */ + if ( + !strcmp(item->value, "AX1") || + !strcmp(item->value, "FOR") || + !strcmp(item->value, "FTC") || + !strcmp(item->value, "PR2") || + !strcmp(item->value, "PRO") + ) { + snprintf(value, valuelen, item->dfl, "Best Power"); + return 0; + } + + /* Sola Australia devices */ + if ( + !strcmp(item->value, "325") || + !strcmp(item->value, "520") || + !strcmp(item->value, "620") + ) { + snprintf(value, valuelen, item->dfl, "Sola Australia"); + return 0; + } + + /* Unknown devices */ + snprintf(value, valuelen, item->dfl, "Unknown"); + return 0; +} + +/* Identify UPS model and unskip qx2nut table's items accordingly */ +static int bestups_model(item_t *item, char *value, size_t valuelen) +{ + item_t *unskip; + + /* Best Power devices */ + + if (!strcmp(item->value, "AX1")) { + + snprintf(value, valuelen, item->dfl, "Axxium Rackmount"); + + } else if (!strcmp(item->value, "FOR")) { + + snprintf(value, valuelen, item->dfl, "Fortress"); + + } else if (!strcmp(item->value, "FTC")) { + + snprintf(value, valuelen, item->dfl, "Fortress Telecom"); + + } else if (!strcmp(item->value, "PR2")) { + + snprintf(value, valuelen, item->dfl, "Patriot Pro II"); + inverted_bbb_bit = 1; + + } else if (!strcmp(item->value, "PRO")) { + + snprintf(value, valuelen, item->dfl, "Patriot Pro"); + inverted_bbb_bit = 1; + + /* Sola Australia devices */ + } else if ( + !strcmp(item->value, "320") || + !strcmp(item->value, "325") || + !strcmp(item->value, "520") || + !strcmp(item->value, "525") || + !strcmp(item->value, "620") + ) { + + snprintf(value, valuelen, "Sola %s", item->value); + + /* Unknown devices */ + } else { + + snprintf(value, valuelen, item->dfl, "Unknown (%s)", item->value); + upslogx(LOG_INFO, "Unknown model detected - please report this ID: '%s'", item->value); + + } + + /* Unskip qx2nut table's items according to the UPS model */ + + /* battery.runtime var is not available on the Patriot Pro/Sola 320 model series: leave it skipped in these cases, otherwise unskip it */ + if (strcmp(item->value, "PRO") && strcmp(item->value, "320")) { + + unskip = find_nut_info("battery.runtime", 0, 0); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + } + + /* battery.packs var is available only on the Axxium/Sola 620 model series: unskip it in these cases */ + if (!strcmp(item->value, "AX1") || !strcmp(item->value, "620")) { + + unskip = find_nut_info("battery.packs", 0, QX_FLAG_SETVAR); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + } + + return 0; +} + +/* Battery runtime */ +static int bestups_batt_runtime(item_t *item, char *value, size_t valuelen) +{ + double runtime; + + if (strspn(item->value, "0123456789 .") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + /* Battery runtime is reported by the UPS in minutes, NUT expects seconds */ + runtime = strtod(item->value, NULL) * 60; + + snprintf(value, valuelen, item->dfl, runtime); + + return 0; +} + +/* Battery packs */ +static int bestups_batt_packs(item_t *item, char *value, size_t valuelen) +{ + item_t *unskip; + + if (strspn(item->value, "0123456789 ") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + snprintf(value, valuelen, item->dfl, strtol(item->value, NULL, 10)); + + /* Unskip battery.packs setvar */ + unskip = find_nut_info("battery.packs", QX_FLAG_SETVAR, 0); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + return 0; +} + +/* *NONUT* Get shutdown mode functionality of Pin 1 and Pin 7 on the UPS DB9 communication port (Per Best Power’s EPS-0059) as set in the UPS */ +static int bestups_get_pins_shutdown_mode(item_t *item, char *value, size_t valuelen) +{ + item_t *unskip; + + if (strspn(item->value, "0123456789") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + pins_shutdown_mode = strtol(item->value, NULL, 10); + + snprintf(value, valuelen, item->dfl, pins_shutdown_mode); + + /* We were not asked by the user to change the value */ + if ((item->qxflags & QX_FLAG_NONUT) && !getval(item->info_type)) + return 0; + + /* Unskip setvar */ + unskip = find_nut_info(item->info_type, QX_FLAG_SETVAR, 0); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + return 0; +} + +/* Voltage settings */ +static int bestups_voltage_settings(item_t *item, char *value, size_t valuelen) +{ + int index, val; + const char *nominal_voltage; + const struct { + const int low; /* Low voltage -> input.transfer.low / input.transfer.boost.low */ + const int boost; /* Boost voltage -> input.transfer.boost.high */ + const int nominal; /* Nominal voltage -> input.voltage.nominal / output.voltage.nominal */ + const int buck; /* Buck voltage -> input.transfer.trim.low */ + const int high; /* High voltage -> input.transfer.high / input.transfer.trim.high */ + } voltage_settings[] = { + /* U models voltage limits, for: + * - Fortress (750U, 1050U, 1425U, 1800U and 2250U) + * - Fortress Rackmount (750, 1050, 1425, 1800, and 2250 VA) + * - Patriot Pro II (400U, 750U, and 1000U) */ + /* M low boost nominal buck high */ + /* 0 */ { 96, 109, 120, 130, 146 }, /* LEDs lit: 2,3,4 (Default) */ + /* 1 */ { 96, 109, 120, 138, 156 }, /* LEDs lit: 1,3,4 */ + /* 2 */ { 90, 104, 120, 130, 146 }, /* LEDs lit: 2,3,5 */ + /* 3 */ { 90, 104, 120, 138, 156 }, /* LEDs lit: 1,3,5 */ + /* 4 */ { 90, 104, 110, 120, 130 }, /* LEDs lit: 3,4,5 */ + /* 5 */ { 90, 104, 110, 130, 146 }, /* LEDs lit: 2,4,5 */ + /* 6 */ { 90, 96, 110, 120, 130 }, /* LEDs lit: 3,4,6 */ + /* 7 */ { 90, 96, 110, 130, 146 }, /* LEDs lit: 2,4,6 */ + /* 8 */ { 96, 109, 128, 146, 156 }, /* LEDs lit: 1,2,4 */ + /* 9 */ { 90, 104, 128, 146, 156 }, /* LEDs lit: 1,2,5 */ + + /* E models voltage limits, for: + * - Fortress (750E, 1050E, 1425E, and 2250E) + * - Fortress Rackmount (750, 1050, 1425, and 2250 VA) + * - Patriot Pro II (400E, 750E, and 1000E) */ + /* M low boost nominal buck high */ + /* 0 */ { 200, 222, 240, 250, 284 }, /* LEDs lit: 2,3,4 */ + /* 1 */ { 200, 222, 240, 264, 290 }, /* LEDs lit: 1,3,4 */ + /* 2 */ { 188, 210, 240, 250, 284 }, /* LEDs lit: 2,3,5 */ + /* 3 */ { 188, 210, 240, 264, 290 }, /* LEDs lit: 1,3,5 */ + /* 4 */ { 188, 210, 230, 244, 270 }, /* LEDs lit: 3,4,5 (Default) */ + /* 5 */ { 188, 210, 230, 250, 284 }, /* LEDs lit: 2,4,5 */ + /* 6 */ { 180, 200, 230, 244, 270 }, /* LEDs lit: 3,4,6 */ + /* 7 */ { 180, 200, 230, 250, 284 }, /* LEDs lit: 2,4,6 */ + /* 8 */ { 165, 188, 208, 222, 244 }, /* LEDs lit: 4,5,6 */ + /* 9 */ { 165, 188, 208, 244, 270 } /* LEDs lit: 3,5,6 */ + }; + + if (strspn(item->value, "0123456789") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + index = strtol(item->value, NULL, 10); + + if (index < 0 || index > 9) { + upsdebugx(2, "%s: value '%d' out of range [0..9]", __func__, index); + return -1; + } + + nominal_voltage = dstate_getinfo("input.voltage.nominal"); + + if (!nominal_voltage) + nominal_voltage = dstate_getinfo("output.voltage.nominal"); + + if (!nominal_voltage) { + upsdebugx(2, "%s: unable to get nominal voltage", __func__); + return -1; + } + + /* E models */ + if (strtol(nominal_voltage, NULL, 10) > 160) + index += 10; + + if (!strcasecmp(item->info_type, "input.transfer.low") || !strcasecmp(item->info_type, "input.transfer.boost.low")) { + + val = voltage_settings[index].low; + + } else if (!strcasecmp(item->info_type, "input.transfer.boost.high")) { + + val = voltage_settings[index].boost; + + } else if (!strcasecmp(item->info_type, "input.voltage.nominal") || !strcasecmp(item->info_type, "output.voltage.nominal")) { + + val = voltage_settings[index].nominal; + + } else if (!strcasecmp(item->info_type, "input.transfer.trim.low")) { + + val = voltage_settings[index].buck; + + } else if (!strcasecmp(item->info_type, "input.transfer.trim.high") || !strcasecmp(item->info_type, "input.transfer.high")) { + + val = voltage_settings[index].high; + + } else { + + /* Don't know what happened */ + return -1; + + } + + snprintf(value, valuelen, item->dfl, val); + + return 0; +} + + +/* == Subdriver interface == */ +subdriver_t bestups_subdriver = { + BESTUPS_VERSION, + bestups_claim, + bestups_qx2nut, + bestups_initups, + NULL, + bestups_makevartable, + NULL, + NULL, +#ifdef TESTING + bestups_testing, +#endif /* TESTING */ +}; diff --git a/drivers/nutdrv_qx_bestups.h b/drivers/nutdrv_qx_bestups.h new file mode 100644 index 0000000..4f1e560 --- /dev/null +++ b/drivers/nutdrv_qx_bestups.h @@ -0,0 +1,29 @@ +/* nutdrv_qx_bestups.h - Subdriver for Best Power/Sola Australia UPSes + * + * Copyright (C) + * 2014 Daniele Pezzini + * + * 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 NUTDRV_QX_BESTUPS_H +#define NUTDRV_QX_BESTUPS_H + +#include "nutdrv_qx.h" + +extern subdriver_t bestups_subdriver; + +#endif /* NUTDRV_QX_BESTUPS_H */ diff --git a/drivers/nutdrv_qx_blazer-common.c b/drivers/nutdrv_qx_blazer-common.c index 1221778..04fb7ae 100644 --- a/drivers/nutdrv_qx_blazer-common.c +++ b/drivers/nutdrv_qx_blazer-common.c @@ -42,8 +42,8 @@ info_rw_t blazer_r_offdelay[] = { /* == Support functions == */ /* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ -int blazer_claim(void) { - +int blazer_claim(void) +{ /* To tell whether the UPS is supported or not, we'll check both status (Q1/QS/D) and vendor (I/FW?) - provided that we were not told not to do it with the ups.conf flag 'novendor'. */ item_t *item = find_nut_info("input.voltage", 0, 0); @@ -85,13 +85,12 @@ int blazer_claim(void) { } return 1; - } /* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. * NOTE: this 'light' version only checks for status (Q1/QS/D/..) */ -int blazer_claim_light(void) { - +int blazer_claim_light(void) +{ /* To tell whether the UPS is supported or not, we'll check just status (Q1/QS/D/..). */ item_t *item = find_nut_info("input.voltage", 0, 0); @@ -109,7 +108,6 @@ int blazer_claim_light(void) { return 0; return 1; - } /* Subdriver-specific flags/vars */ @@ -117,18 +115,28 @@ void blazer_makevartable(void) { addvar(VAR_FLAG, "norating", "Skip reading rating information from UPS"); addvar(VAR_FLAG, "novendor", "Skip reading vendor information from UPS"); + + blazer_makevartable_light(); +} + +/* Subdriver-specific flags/vars + * NOTE: this 'light' version only handles vars/flags related to UPS status query (Q1/QS/D/...) */ +void blazer_makevartable_light(void) +{ + addvar(VAR_FLAG, "ignoresab", "Ignore 'Shutdown Active' bit in UPS status"); } /* Subdriver-specific initups */ void blazer_initups(item_t *qx2nut) { - int nr, nv; + int nr, nv, isb; item_t *item; nr = testvar("norating"); nv = testvar("novendor"); + isb = testvar("ignoresab"); - if (!nr && !nv) + if (!nr && !nv && !isb) return; for (item = qx2nut; item->info_type != NULL; item++) { @@ -148,6 +156,33 @@ void blazer_initups(item_t *qx2nut) item->qxflags |= QX_FLAG_SKIP; } + /* ignoresab */ + if (isb && !strcasecmp(item->info_type, "ups.status") && item->from == 44 && item->to == 44) { + upsdebugx(2, "%s: skipping %s ('Shutdown Active' bit)", __func__, item->info_type); + item->qxflags |= QX_FLAG_SKIP; + } + + } +} + +/* Subdriver-specific initups + * NOTE: this 'light' version only checks for status (Q1/QS/D/..) related items */ +void blazer_initups_light(item_t *qx2nut) +{ + item_t *item; + + if (!testvar("ignoresab")) + return; + + for (item = qx2nut; item->info_type != NULL; item++) { + + if (strcasecmp(item->info_type, "ups.status") || item->from != 44 || item->to != 44) + continue; + + upsdebugx(2, "%s: skipping %s ('Shutdown Active' bit)", __func__, item->info_type); + item->qxflags |= QX_FLAG_SKIP; + break; + } } @@ -350,14 +385,10 @@ int blazer_process_status_bits(item_t *item, char *value, size_t valuelen) case 44: /* Shutdown Active */ - if (item->value[0] == '1') { - if (!strcasecmp(item->info_type, "ups.status")) - val = "FSD"; - else /* ups.alarm */ - val = "Shutdown imminent!"; - } else if (!strcasecmp(item->info_type, "ups.status")) { + if (item->value[0] == '1') + val = "FSD"; + else val = "!FSD"; - } break; case 45: /* Beeper status - ups.beeper.status */ diff --git a/drivers/nutdrv_qx_blazer-common.h b/drivers/nutdrv_qx_blazer-common.h index aee3864..1cab5be 100644 --- a/drivers/nutdrv_qx_blazer-common.h +++ b/drivers/nutdrv_qx_blazer-common.h @@ -26,7 +26,9 @@ /* Support functions */ void blazer_makevartable(void); +void blazer_makevartable_light(void); void blazer_initups(item_t *qx2nut); +void blazer_initups_light(item_t *qx2nut); int blazer_claim(void); int blazer_claim_light(void); diff --git a/drivers/nutdrv_qx_mecer.c b/drivers/nutdrv_qx_mecer.c index 5160343..7386754 100644 --- a/drivers/nutdrv_qx_mecer.c +++ b/drivers/nutdrv_qx_mecer.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_mecer.h" -#define MECER_VERSION "Mecer 0.02" +#define MECER_VERSION "Mecer 0.05" /* Support functions */ static int mecer_claim(void); @@ -46,7 +46,7 @@ static item_t mecer_qx2nut[] = { * 0 */ - { "ups.firmware.aux", 0, NULL, "QPI\r", "", 6, '(', "", 1, 4, "%s", QX_FLAG_STATIC, voltronic_p98_protocol }, + { "ups.firmware.aux", 0, NULL, "QPI\r", "", 6, '(', "", 1, 4, "%s", QX_FLAG_STATIC, NULL, voltronic_p98_protocol }, /* * > [Q1\r] @@ -55,23 +55,22 @@ static item_t mecer_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -80,10 +79,10 @@ static item_t mecer_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [I\r] @@ -92,49 +91,49 @@ static item_t mecer_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands * The UPS will reply '(ACK\r' in case of success, '(NAK\r' if the command is rejected or invalid */ - { "beeper.toggle", 0, NULL, "Q\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, mecer_process_test_battery }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, mecer_process_test_battery }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* == Testing table == */ #ifdef TESTING static testing_t mecer_testing[] = { - { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "QPI\r", "(PI98\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "(ACK\r" }, - { "S03\r", "(NAK\r" }, - { "C\r", "(NAK\r" }, - { "S02R0005\r", "(ACK\r" }, - { "S.5R0000\r", "(ACK\r" }, - { "T04\r", "(NAK\r" }, - { "TL\r", "(ACK\r" }, - { "T\r", "(NAK\r" }, - { "CT\r", "(ACK\r" }, + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "QPI\r", "(PI98\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "(ACK\r", -1 }, + { "S03\r", "(NAK\r", -1 }, + { "C\r", "(NAK\r", -1 }, + { "S02R0005\r", "(ACK\r", -1 }, + { "S.5R0000\r", "(ACK\r", -1 }, + { "T04\r", "(NAK\r", -1 }, + { "TL\r", "(ACK\r", -1 }, + { "T\r", "(NAK\r", -1 }, + { "CT\r", "(ACK\r", -1 }, { NULL } }; #endif /* TESTING */ @@ -145,7 +144,6 @@ static testing_t mecer_testing[] = { /* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ static int mecer_claim(void) { - /* Apart from status (Q1), try to identify protocol (QPI, for Voltronic Power P98 units) or whether the UPS uses '(ACK\r'/'(NAK\r' replies */ item_t *item = find_nut_info("input.voltage", 0, 0); @@ -198,15 +196,12 @@ static int mecer_claim(void) } return 1; - } /* Subdriver-specific initups */ static void mecer_initups(void) { - blazer_initups(mecer_qx2nut); - } diff --git a/drivers/nutdrv_qx_megatec-old.c b/drivers/nutdrv_qx_megatec-old.c index 73173de..ce39926 100644 --- a/drivers/nutdrv_qx_megatec-old.c +++ b/drivers/nutdrv_qx_megatec-old.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_megatec-old.h" -#define MEGATEC_OLD_VERSION "Megatec/old 0.02" +#define MEGATEC_OLD_VERSION "Megatec/old 0.05" /* qx2nut lookup table */ static item_t megatec_old_qx2nut[] = { @@ -37,23 +37,22 @@ static item_t megatec_old_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "D\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "D\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "D\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "D\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "D\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "D\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "D\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "D\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "D\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "D\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "D\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "D\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "D\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "D\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "D\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "D\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "D\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "D\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "D\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "D\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "D\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "D\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -62,10 +61,10 @@ static item_t megatec_old_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [I\r] @@ -74,45 +73,45 @@ static item_t megatec_old_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t megatec_old_testing[] = { - { "D\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "D\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -120,9 +119,7 @@ static testing_t megatec_old_testing[] = { /* Subdriver-specific initups */ static void megatec_old_initups(void) { - blazer_initups(megatec_old_qx2nut); - } /* Subdriver interface */ diff --git a/drivers/nutdrv_qx_megatec.c b/drivers/nutdrv_qx_megatec.c index c43a24e..f0f02f1 100644 --- a/drivers/nutdrv_qx_megatec.c +++ b/drivers/nutdrv_qx_megatec.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_megatec.h" -#define MEGATEC_VERSION "Megatec 0.01" +#define MEGATEC_VERSION "Megatec 0.04" /* qx2nut lookup table */ static item_t megatec_qx2nut[] = { @@ -37,23 +37,22 @@ static item_t megatec_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -62,10 +61,10 @@ static item_t megatec_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [I\r] @@ -74,45 +73,45 @@ static item_t megatec_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t megatec_testing[] = { - { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -120,9 +119,7 @@ static testing_t megatec_testing[] = { /* Subdriver-specific initups */ static void megatec_initups(void) { - blazer_initups(megatec_qx2nut); - } /* Subdriver interface */ diff --git a/drivers/nutdrv_qx_mustek.c b/drivers/nutdrv_qx_mustek.c index 3bdee1a..17b8eb6 100644 --- a/drivers/nutdrv_qx_mustek.c +++ b/drivers/nutdrv_qx_mustek.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_mustek.h" -#define MUSTEK_VERSION "Mustek 0.02" +#define MUSTEK_VERSION "Mustek 0.05" /* qx2nut lookup table */ static item_t mustek_qx2nut[] = { @@ -37,23 +37,22 @@ static item_t mustek_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "QS\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "QS\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "QS\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "QS\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "QS\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "QS\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "QS\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "QS\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "QS\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "QS\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "QS\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "QS\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "QS\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "QS\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "QS\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "QS\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -62,10 +61,10 @@ static item_t mustek_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [I\r] @@ -74,45 +73,45 @@ static item_t mustek_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t mustek_testing[] = { - { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "I\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -120,9 +119,7 @@ static testing_t mustek_testing[] = { /* Subdriver-specific initups */ static void mustek_initups(void) { - blazer_initups(mustek_qx2nut); - } /* Subdriver interface */ diff --git a/drivers/nutdrv_qx_q1.c b/drivers/nutdrv_qx_q1.c index b201497..be37018 100644 --- a/drivers/nutdrv_qx_q1.c +++ b/drivers/nutdrv_qx_q1.c @@ -35,7 +35,7 @@ #include "nutdrv_qx_q1.h" -#define Q1_VERSION "Q1 0.02" +#define Q1_VERSION "Q1 0.05" /* qx2nut lookup table */ static item_t q1_qx2nut[] = { @@ -47,69 +47,74 @@ static item_t q1_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t q1_testing[] = { - { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ +/* Subdriver-specific initups */ +static void q1_initups(void) +{ + blazer_initups_light(q1_qx2nut); +} + /* Subdriver interface */ subdriver_t q1_subdriver = { Q1_VERSION, blazer_claim_light, q1_qx2nut, + q1_initups, NULL, - NULL, - NULL, + blazer_makevartable_light, "ACK", NULL, #ifdef TESTING diff --git a/drivers/nutdrv_qx_voltronic-qs-hex.c b/drivers/nutdrv_qx_voltronic-qs-hex.c new file mode 100644 index 0000000..551182b --- /dev/null +++ b/drivers/nutdrv_qx_voltronic-qs-hex.c @@ -0,0 +1,415 @@ +/* nutdrv_qx_voltronic-qs-hex.c - Subdriver for Voltronic Power UPSes with QS-Hex protocol + * + * Copyright (C) + * 2014 Daniele Pezzini + * + * 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 + * + */ + +#include "main.h" +#include "nutdrv_qx.h" +#include "nutdrv_qx_blazer-common.h" + +#include "nutdrv_qx_voltronic-qs-hex.h" + +#define VOLTRONIC_QS_HEX_VERSION "Voltronic-QS-Hex 0.03" + +/* Support functions */ +static int voltronic_qs_hex_claim(void); +static void voltronic_qs_hex_initups(void); + +/* Answer preprocess functions */ +static int voltronic_qs_hex_preprocess_qs_answer(item_t *item, const int len); +static int voltronic_qs_hex_status_char_to_binary(const unsigned char value); + +/* Preprocess functions */ +static int voltronic_qs_hex_protocol(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_input_output_voltage(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_input_output_voltage(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_load(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_frequency(item_t *item, char *value, size_t valuelen); +static int voltronic_qs_hex_battery_voltage(item_t *item, char *value, size_t valuelen); + + +/* == Ranges == */ + +/* Range for ups.delay.start */ +static info_rw_t voltronic_qs_hex_r_ondelay[] = { + { "60", 0 }, + { "599940", 0 }, + { "", 0 } +}; + +/* Range for ups.delay.shutdown */ +static info_rw_t voltronic_qs_hex_r_offdelay[] = { + { "12", 0 }, + { "540", 0 }, + { "", 0 } +}; + + +/* == qx2nut lookup table == */ +static item_t voltronic_qs_hex_qx2nut[] = { + + /* Query UPS for protocol + * > [M\r] + * < [P\r] + * 01 + * 0 + */ + + { "ups.firmware.aux", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "PMV-%s", QX_FLAG_STATIC, NULL, voltronic_qs_hex_protocol }, + + /* Query UPS for status + * > [QS\r] + * < [#6C01 35 6C01 35 03 519A 1312D0 E6 1E 00001001\r] (after being preprocessed) + * 01234567890123456789012345678901234567890123456 + * 0 1 2 3 4 + */ + + { "input.voltage", 0, NULL, "QS\r", "", 47, '#', "", 1, 7, "%.1f", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_input_output_voltage }, + { "output.voltage", 0, NULL, "QS\r", "", 47, '#', "", 9, 15, "%.1f", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_input_output_voltage }, + { "ups.load", 0, NULL, "QS\r", "", 47, '#', "", 17, 18, "%d", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_load }, + { "output.frequency", 0, NULL, "QS\r", "", 47, '#', "", 20, 30, "%.1f", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_frequency }, + { "battery.voltage", 0, NULL, "QS\r", "", 47, '#', "", 32, 36, "%.2f", 0, voltronic_qs_hex_preprocess_qs_answer, voltronic_qs_hex_battery_voltage }, + /* Status bits */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QS\r", "", 47, '#', "", 41, 41, NULL, 0, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "QS\r", "", 47, '#', "", 42, 42, "%s", QX_FLAG_STATIC, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "QS\r", "", 47, '#', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '#', "", 45, 45, "%s", 0, voltronic_qs_hex_preprocess_qs_answer, blazer_process_status_bits }, /* Beeper status */ + + /* Instant commands */ + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + + /* Server-side settable vars */ + { "ups.delay.start", ST_FLAG_RW, voltronic_qs_hex_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, voltronic_qs_hex_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + + /* End of structure. */ + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } +}; + + +/* == Testing table == */ +#ifdef TESTING +static testing_t voltronic_qs_hex_testing[] = { + { "QS\r", "#\x6C\x01 \x35 \x6C\x01 \x35 \x03 \x51\x9A \x28\x02\x12\xD0 \xE6 \x1E \x09\r", 27 }, + { "M\r", "P\r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "N\r", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, + { NULL } +}; +#endif /* TESTING */ + + +/* == Support functions == */ + +/* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ +static int voltronic_qs_hex_claim(void) +{ + /* We need at least M and QS to run this subdriver */ + + /* UPS Protocol */ + item_t *item = find_nut_info("ups.firmware.aux", 0, 0); + + /* Don't know what happened */ + if (!item) + return 0; + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) + return 0; + + /* Unable to process value/Protocol not supported */ + if (ups_infoval_set(item) != 1) + return 0; + + item = find_nut_info("input.voltage", 0, 0); + + /* Don't know what happened */ + if (!item) { + dstate_delinfo("ups.firmware.aux"); + return 0; + } + + /* No reply/Unable to get value */ + if (qx_process(item, NULL)) { + dstate_delinfo("ups.firmware.aux"); + return 0; + } + + /* Unable to process value */ + if (ups_infoval_set(item) != 1) { + dstate_delinfo("ups.firmware.aux"); + return 0; + } + + return 1; +} + +/* Subdriver-specific initups */ +static void voltronic_qs_hex_initups(void) +{ + blazer_initups_light(voltronic_qs_hex_qx2nut); +} + + +/* == Answer preprocess functions == */ + +/* Preprocess the answer we got back from the UPS when queried with 'QS\r' */ +static int voltronic_qs_hex_preprocess_qs_answer(item_t *item, const int len) +{ + int i, token; + char refined[SMALLBUF] = ""; + + if (len <= 0) + return len; + + if (item->answer[0] != '#') { + upsdebugx(4, "%s: wrong leading character [%s: 0x%0x]", __func__, item->info_type, item->answer[0]); + return -1; + } + + snprintf(refined, sizeof(refined), "%s", "#"); + + /* e.g.: item->answer = "#\x6C\x01 \x35 \x6C\x01 \x35 \x03 \x51\x9A \x28\x02\x12\xD0 \xE6 \x1E \x09\r" */ + upsdebug_hex(4, "read", item->answer, len); + + for (i = 1, token = 1; i < len; i++) { + + /* New token */ + if (item->answer[i] == 0x20) { + snprintfcat(refined, sizeof(refined), "%s", " "); + token++; + continue; + } + + /* 'Unescape' raw data */ + if (item->answer[i] == 0x28 && i < len) { + + switch (item->answer[i + 1]) + { + case 0x00: /* Escaped because: CR */ + snprintfcat(refined, sizeof(refined), "%02x", 0x0D); + break; + case 0x01: /* Escaped because: XON */ + snprintfcat(refined, sizeof(refined), "%02x", 0x11); + break; + case 0x02: /* Escaped because: XOFF */ + snprintfcat(refined, sizeof(refined), "%02x", 0x13); + break; + case 0x03: /* Escaped because: LF */ + snprintfcat(refined, sizeof(refined), "%02x", 0x0A); + break; + case 0x04: /* Escaped because: space */ + snprintfcat(refined, sizeof(refined), "%02x", 0x20); + break; + default: + if (token != 10) + snprintfcat(refined, sizeof(refined), "%02x", ((unsigned char *)item->answer)[i]); + else + snprintfcat(refined, sizeof(refined), "%08d", voltronic_qs_hex_status_char_to_binary(((unsigned char *)item->answer)[i])); + continue; + } + + i++; + continue; + + } + + /* Trailing CR */ + if (item->answer[i] == 0x0D) + break; + + if (token != 10) + snprintfcat(refined, sizeof(refined), "%02x", ((unsigned char *)item->answer)[i]); + else + snprintfcat(refined, sizeof(refined), "%08d", voltronic_qs_hex_status_char_to_binary(((unsigned char *)item->answer)[i])); + + } + + if (token != 10 || strlen(refined) != 46) { + upsdebugx(2, "noncompliant reply: %s", refined); + return -1; + } + + upsdebugx(4, "read: %s", refined); + + /* e.g.: item->answer = "#6C01 35 6C01 35 03 519A 1312D0 E6 1E 00001001" */ + return snprintf(item->answer, sizeof(item->answer), "%s\r", refined); +} + +/* Transform the QS 'status' char into its binary form (as an int) */ +static int voltronic_qs_hex_status_char_to_binary(const unsigned char value) +{ + unsigned char remainder = value; + int ret = 0, + power = 1; + + while (remainder) { + + if (remainder & 1) + ret += power; + + power *= 10; + remainder >>= 1; + + } + + return ret; +} + + +/* == Preprocess functions == */ + +/* Protocol used by the UPS */ +static int voltronic_qs_hex_protocol(item_t *item, char *value, size_t valuelen) +{ + item_t *unskip; + + if (strcasecmp(item->value, "P") && strcasecmp(item->value, "T") && strcasecmp(item->value, "V")) { + upsdebugx(2, "%s: invalid protocol [%s]", __func__, item->value); + return -1; + } + + snprintf(value, valuelen, item->dfl, item->value); + + /* 'P' UPSes don't support 'T\r' command (battery test) -> leave test.battery.start.quick skipped */ + if (!strcasecmp(item->value, "P")) + return 0; + + /* Unskip test.battery.start.quick */ + unskip = find_nut_info("test.battery.start.quick", QX_FLAG_CMD, 0); + + /* Don't know what happened */ + if (!unskip) + return -1; + + unskip->qxflags &= ~QX_FLAG_SKIP; + + return 0; +} + +/* Input/Output voltage */ +int voltronic_qs_hex_input_output_voltage(item_t *item, char *value, size_t valuelen) +{ + int val; + double ret; + char *str_end, buf[SMALLBUF] = ""; + + if (strspn(item->value, "0123456789ABCDEFabcdef ") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + val = strtol(item->value, &str_end, 16) * strtol(str_end, NULL, 16) / 51; + snprintf(buf, sizeof(buf), "%06x", val); + + ret = strtol(buf + 4, NULL, 16) / 256.0; + buf[4] = '\0'; + ret += strtol(buf, NULL, 16); + + snprintf(value, valuelen, item->dfl, ret); + + return 0; +} + +/* Device load */ +int voltronic_qs_hex_load(item_t *item, char *value, size_t valuelen) +{ + if (strspn(item->value, "0123456789ABCDEFabcdef") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + snprintf(value, valuelen, item->dfl, strtol(item->value, NULL, 16)); + + return 0; +} + +/* Output frequency */ +int voltronic_qs_hex_frequency(item_t *item, char *value, size_t valuelen) +{ + double val1, val2, ret; + char *str_end; + + if (strspn(item->value, "0123456789ABCDEFabcdef ") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + val1 = strtol(item->value, &str_end, 16); + val2 = strtol(str_end, NULL, 16); + + ret = val2 / val1; + ret = ret > 99.9 ? 99.9 : ret; + + snprintf(value, valuelen, item->dfl, ret); + + return 0; +} + +/* Battery voltage */ +int voltronic_qs_hex_battery_voltage(item_t *item, char *value, size_t valuelen) +{ + int val1, val2; + char *str_end; + + if (strspn(item->value, "0123456789ABCDEFabcdef ") != strlen(item->value)) { + upsdebugx(2, "%s: non numerical value [%s: %s]", __func__, item->info_type, item->value); + return -1; + } + + val1 = strtol(item->value, &str_end, 16); + val2 = strtol(str_end, NULL, 16); + + snprintf(value, valuelen, item->dfl, (val1 * val2) / 510.0); + + return 0; +} + + +/* == Subdriver interface == */ +subdriver_t voltronic_qs_hex_subdriver = { + VOLTRONIC_QS_HEX_VERSION, + voltronic_qs_hex_claim, + voltronic_qs_hex_qx2nut, + voltronic_qs_hex_initups, + NULL, + blazer_makevartable_light, + NULL, + "N\r", +#ifdef TESTING + voltronic_qs_hex_testing, +#endif /* TESTING */ +}; diff --git a/drivers/nutdrv_qx_voltronic-qs-hex.h b/drivers/nutdrv_qx_voltronic-qs-hex.h new file mode 100644 index 0000000..e4735df --- /dev/null +++ b/drivers/nutdrv_qx_voltronic-qs-hex.h @@ -0,0 +1,29 @@ +/* nutdrv_qx_voltronic-qs-hex.h - Subdriver for Voltronic Power UPSes with QS-Hex protocol + * + * Copyright (C) + * 2014 Daniele Pezzini + * + * 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 NUTDRV_QX_VOLTRONIC_QS_HEX_H +#define NUTDRV_QX_VOLTRONIC_QS_HEX_H + +#include "nutdrv_qx.h" + +extern subdriver_t voltronic_qs_hex_subdriver; + +#endif /* NUTDRV_QX_VOLTRONIC_QS_HEX_H */ diff --git a/drivers/nutdrv_qx_voltronic-qs.c b/drivers/nutdrv_qx_voltronic-qs.c index 9b86999..fca3ed8 100644 --- a/drivers/nutdrv_qx_voltronic-qs.c +++ b/drivers/nutdrv_qx_voltronic-qs.c @@ -25,10 +25,11 @@ #include "nutdrv_qx_voltronic-qs.h" -#define VOLTRONIC_QS_VERSION "Voltronic-QS 0.01" +#define VOLTRONIC_QS_VERSION "Voltronic-QS 0.04" /* Support functions */ static int voltronic_qs_claim(void); +static void voltronic_qs_initups(void); /* Preprocess functions */ static int voltronic_qs_protocol(item_t *item, char *value, size_t valuelen); @@ -61,7 +62,7 @@ static item_t voltronic_qs_qx2nut[] = { * 0 */ - { "ups.firmware.aux", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%s", QX_FLAG_STATIC, voltronic_qs_protocol }, + { "ups.firmware.aux", 0, NULL, "M\r", "", 2, 0, "", 0, 0, "%s", QX_FLAG_STATIC, NULL, voltronic_qs_protocol }, /* Query UPS for status * > [QS\r] @@ -70,23 +71,22 @@ static item_t voltronic_qs_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "QS\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "QS\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "QS\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "QS\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "QS\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "QS\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "QS\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "QS\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "QS\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "QS\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "QS\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "QS\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "QS\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "QS\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "QS\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QS\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "QS\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "QS\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "QS\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* Query UPS for ratings * > [F\r] @@ -95,40 +95,40 @@ static item_t voltronic_qs_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, voltronic_qs_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, voltronic_qs_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, voltronic_qs_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, voltronic_qs_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* == Testing table == */ #ifdef TESTING static testing_t voltronic_qs_testing[] = { - { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "M\r", "V\r" }, - { "Q\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T\r", "" }, + { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "M\r", "V\r", -1 }, + { "Q\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -139,7 +139,6 @@ static testing_t voltronic_qs_testing[] = { /* This function allows the subdriver to "claim" a device: return 1 if the device is supported by this subdriver, else 0. */ static int voltronic_qs_claim(void) { - /* We need at least M and QS to run this subdriver */ /* UPS Protocol */ @@ -178,7 +177,12 @@ static int voltronic_qs_claim(void) } return 1; +} +/* Subdriver-specific initups */ +static void voltronic_qs_initups(void) +{ + blazer_initups_light(voltronic_qs_qx2nut); } @@ -203,9 +207,9 @@ subdriver_t voltronic_qs_subdriver = { VOLTRONIC_QS_VERSION, voltronic_qs_claim, voltronic_qs_qx2nut, + voltronic_qs_initups, NULL, - NULL, - NULL, + blazer_makevartable_light, "ACK", "(NAK\r", #ifdef TESTING diff --git a/drivers/nutdrv_qx_voltronic.c b/drivers/nutdrv_qx_voltronic.c index c6e44cf..adfb6b1 100644 --- a/drivers/nutdrv_qx_voltronic.c +++ b/drivers/nutdrv_qx_voltronic.c @@ -24,7 +24,7 @@ #include "nutdrv_qx_voltronic.h" -#define VOLTRONIC_VERSION "Voltronic 0.01" +#define VOLTRONIC_VERSION "Voltronic 0.03" /* Support functions */ static int voltronic_claim(void); @@ -195,16 +195,16 @@ static info_rw_t voltronic_r_batt_numb[] = { /* Range for Bypass Mode maximum voltage */ static info_rw_t voltronic_r_bypass_volt_max[] = { { "60", voltronic_bypass_volt_max }, /* P09 */ - { "115", voltronic_bypass_volt_max }, /* P02/P03/P10/P14/P99 ivn<200 */ + { "115", voltronic_bypass_volt_max }, /* P02/P03/P10/P13/P14/P99 ivn<200 */ { "120", voltronic_bypass_volt_max }, /* P01 ivn<200 */ { "132", voltronic_bypass_volt_max }, /* P99 ivn<200 */ - { "138", voltronic_bypass_volt_max }, /* P02/P03/P10/P14 ivn<200 */ + { "138", voltronic_bypass_volt_max }, /* P02/P03/P10/P13/P14 ivn<200 */ { "140", voltronic_bypass_volt_max }, /* P01 ivn<200, P09 */ { "230", voltronic_bypass_volt_max }, /* P01 ivn>=200 */ - { "231", voltronic_bypass_volt_max }, /* P02/P03/P10/P14/P99 ivn>=200 */ + { "231", voltronic_bypass_volt_max }, /* P02/P03/P10/P13/P14/P99 ivn>=200 */ { "261", voltronic_bypass_volt_max }, /* P99 ivn>=200 */ { "264", voltronic_bypass_volt_max }, /* P01 ivn>=200 */ - { "276", voltronic_bypass_volt_max }, /* P02/P03/P10/P14 ivn>=200 */ + { "276", voltronic_bypass_volt_max }, /* P02/P03/P10/P13/P14 ivn>=200 */ { "", 0 } }; @@ -232,12 +232,12 @@ static int voltronic_bypass_volt_max(char *value, size_t len) break; - case 115: /* P02/P03/P10/P14/P99 ivn<200 */ + case 115: /* P02/P03/P10/P13/P14/P99 ivn<200 */ if (ivn >= 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -262,12 +262,12 @@ static int voltronic_bypass_volt_max(char *value, size_t len) break; - case 138: /* P02/P03/P10/P14 ivn<200 */ + case 138: /* P02/P03/P10/P13/P14 ivn<200 */ if (ivn >= 200) return -1; - if (protocol == 2 || protocol == 2 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 2 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; @@ -295,12 +295,12 @@ static int voltronic_bypass_volt_max(char *value, size_t len) break; - case 231: /* P02/P03/P10/P14/P99 ivn>=200 */ + case 231: /* P02/P03/P10/P13/P14/P99 ivn>=200 */ if (ivn < 200) return -1; - if (protocol == 2 || protocol == 2 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 2 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -325,12 +325,12 @@ static int voltronic_bypass_volt_max(char *value, size_t len) break; - case 276: /* P02/P03/P10/P14 ivn>=200 */ + case 276: /* P02/P03/P10/P13/P14 ivn>=200 */ if (ivn < 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; @@ -348,16 +348,16 @@ static int voltronic_bypass_volt_max(char *value, size_t len) /* Range for Bypass Mode minimum voltage */ static info_rw_t voltronic_r_bypass_volt_min[] = { { "50", voltronic_bypass_volt_min }, /* P99 ivn<200 */ - { "55", voltronic_bypass_volt_min }, /* P02/P03/P10/P14 ivn<200 */ + { "55", voltronic_bypass_volt_min }, /* P02/P03/P10/P13/P14 ivn<200 */ { "60", voltronic_bypass_volt_min }, /* P09 */ { "85", voltronic_bypass_volt_min }, /* P01/P99 ivn<200 */ - { "104", voltronic_bypass_volt_min }, /* P02/P03/P10/P14 ivn<200 */ - { "110", voltronic_bypass_volt_min }, /* P02/P03/P10/P14 ivn>=200 */ + { "104", voltronic_bypass_volt_min }, /* P02/P03/P10/P13/P14 ivn<200 */ + { "110", voltronic_bypass_volt_min }, /* P02/P03/P10/P13/P14 ivn>=200 */ { "115", voltronic_bypass_volt_min }, /* P01 ivn<200 */ { "140", voltronic_bypass_volt_min }, /* P09 */ { "149", voltronic_bypass_volt_min }, /* P99 ivn>=200 */ { "170", voltronic_bypass_volt_min }, /* P01 ivn>=200 */ - { "209", voltronic_bypass_volt_min }, /* P02/P03/P10/P14/P99 ivn>=200 */ + { "209", voltronic_bypass_volt_min }, /* P02/P03/P10/P13/P14/P99 ivn>=200 */ { "220", voltronic_bypass_volt_min }, /* P01 ivn>=200 */ { "", 0 } }; @@ -389,12 +389,12 @@ static int voltronic_bypass_volt_min(char *value, size_t len) break; - case 55: /* P02/P03/P10/P14 ivn<200 */ + case 55: /* P02/P03/P10/P13/P14 ivn<200 */ if (ivn >= 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; @@ -417,22 +417,22 @@ static int voltronic_bypass_volt_min(char *value, size_t len) break; - case 104: /* P02/P03/P10/P14 ivn<200 */ + case 104: /* P02/P03/P10/P13/P14 ivn<200 */ if (ivn >= 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; - case 110: /* P02/P03/P10/P14 ivn>=200 */ + case 110: /* P02/P03/P10/P13/P14 ivn>=200 */ if (ivn < 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14) return 0; break; @@ -467,12 +467,12 @@ static int voltronic_bypass_volt_min(char *value, size_t len) break; - case 209: /* P02/P03/P10/P14/P99 ivn>=200 */ + case 209: /* P02/P03/P10/P13/P14/P99 ivn>=200 */ if (ivn < 200) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -499,11 +499,11 @@ static int voltronic_bypass_volt_min(char *value, size_t len) /* Range for Bypass Mode maximum frequency */ static info_rw_t voltronic_r_bypass_freq_max[] = { - { "51.0", voltronic_bypass_freq_max }, /* P01/P09/P02/P03/P10/P14/P99 ofn==50.0 */ - { "54.0", voltronic_bypass_freq_max }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "51.0", voltronic_bypass_freq_max }, /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==50.0 */ + { "54.0", voltronic_bypass_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "60.0", voltronic_bypass_freq_max }, /* P01/P09 ofn==50.0 */ - { "61.0", voltronic_bypass_freq_max }, /* P01/P09/P02/P03/P10/P14/P99 ofn==60.0 */ - { "64.0", voltronic_bypass_freq_max }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "61.0", voltronic_bypass_freq_max }, /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==60.0 */ + { "64.0", voltronic_bypass_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "70.0", voltronic_bypass_freq_max }, /* P01/P09 ofn==60.0 */ { "", 0 } }; @@ -525,22 +525,22 @@ static int voltronic_bypass_freq_max(char *value, size_t len) switch (val) { - case 51: /* P01/P09/P02/P03/P10/P14/P99 ofn==50.0 */ + case 51: /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; - case 54: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 54: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -555,22 +555,22 @@ static int voltronic_bypass_freq_max(char *value, size_t len) break; - case 61: /* P01/P09/P02/P03/P10/P14/P99 ofn==60.0 */ + case 61: /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; - case 64: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 64: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -598,11 +598,11 @@ static int voltronic_bypass_freq_max(char *value, size_t len) /* Range for Bypass Mode minimum frequency */ static info_rw_t voltronic_r_bypass_freq_min[] = { { "40.0", voltronic_bypass_freq_min }, /* P01/P09 ofn==50.0 */ - { "46.0", voltronic_bypass_freq_min }, /* P02/P03/P10/P14/P99 ofn==50.0 */ - { "49.0", voltronic_bypass_freq_min }, /* P01/P09/P02/P03/P10/P14/P99 ofn==50.0 */ + { "46.0", voltronic_bypass_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ + { "49.0", voltronic_bypass_freq_min }, /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "50.0", voltronic_bypass_freq_min }, /* P01/P09 ofn==60.0 */ - { "56.0", voltronic_bypass_freq_min }, /* P02/P03/P10/P14/P99 ofn==60.0 */ - { "59.0", voltronic_bypass_freq_min }, /* P01/P09/P02/P03/P10/P14/P99 ofn==60.0 */ + { "56.0", voltronic_bypass_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ + { "59.0", voltronic_bypass_freq_min }, /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "", 0 } }; @@ -633,22 +633,22 @@ static int voltronic_bypass_freq_min(char *value, size_t len) break; - case 46: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 46: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; - case 49: /* P01/P09/P02/P03/P10/P14/P99 ofn==50.0 */ + case 49: /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -663,22 +663,22 @@ static int voltronic_bypass_freq_min(char *value, size_t len) break; - case 56: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 56: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; - case 59: /* P01/P09/P02/P03/P10/P14/P99 ofn==60.0 */ + case 59: /* P01/P09/P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 1 || protocol == 2 || protocol == 3 || protocol == 9 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -710,13 +710,13 @@ static info_rw_t voltronic_r_eco_volt_min[] = { /* Range for ECO Mode minimum frequency */ static info_rw_t voltronic_r_eco_freq_min[] = { { "40.0", voltronic_eco_freq_min }, /* P01/P09 ofn==50.0 */ - { "46.0", voltronic_eco_freq_min }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "46.0", voltronic_eco_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "47.0", voltronic_eco_freq_min }, /* P01/P09 ofn==50.0 */ - { "48.0", voltronic_eco_freq_min }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "48.0", voltronic_eco_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "50.0", voltronic_eco_freq_min }, /* P01/P09 ofn==60.0 */ - { "56.0", voltronic_eco_freq_min }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "56.0", voltronic_eco_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "57.0", voltronic_eco_freq_min }, /* P01/P09 ofn==60.0 */ - { "58.0", voltronic_eco_freq_min }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "58.0", voltronic_eco_freq_min }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "", 0 } }; @@ -747,12 +747,12 @@ static int voltronic_eco_freq_min(char *value, size_t len) break; - case 46: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 46: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -767,12 +767,12 @@ static int voltronic_eco_freq_min(char *value, size_t len) break; - case 48: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 48: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -787,12 +787,12 @@ static int voltronic_eco_freq_min(char *value, size_t len) break; - case 56: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 56: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -807,12 +807,12 @@ static int voltronic_eco_freq_min(char *value, size_t len) break; - case 58: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 58: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -829,13 +829,13 @@ static int voltronic_eco_freq_min(char *value, size_t len) /* Range for ECO Mode maximum frequency */ static info_rw_t voltronic_r_eco_freq_max[] = { - { "52.0", voltronic_eco_freq_max }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "52.0", voltronic_eco_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "53.0", voltronic_eco_freq_max }, /* P01/P09 ofn==50.0 */ - { "54.0", voltronic_eco_freq_max }, /* P02/P03/P10/P14/P99 ofn==50.0 */ + { "54.0", voltronic_eco_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ { "60.0", voltronic_eco_freq_max }, /* P01/P09 ofn==50.0 */ - { "62.0", voltronic_eco_freq_max }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "62.0", voltronic_eco_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "63.0", voltronic_eco_freq_max }, /* P01/P09 ofn==60.0 */ - { "64.0", voltronic_eco_freq_max }, /* P02/P03/P10/P14/P99 ofn==60.0 */ + { "64.0", voltronic_eco_freq_max }, /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ { "70.0", voltronic_eco_freq_max }, /* P01/P09 ofn==60.0 */ { "", 0 } }; @@ -857,12 +857,12 @@ static int voltronic_eco_freq_max(char *value, size_t len) switch (val) { - case 52: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 52: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -877,12 +877,12 @@ static int voltronic_eco_freq_max(char *value, size_t len) break; - case 54: /* P02/P03/P10/P14/P99 ofn==50.0 */ + case 54: /* P02/P03/P10/P13/P14/P99 ofn==50.0 */ if (ofn != 50.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -897,12 +897,12 @@ static int voltronic_eco_freq_max(char *value, size_t len) break; - case 62: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 62: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -917,12 +917,12 @@ static int voltronic_eco_freq_max(char *value, size_t len) break; - case 64: /* P02/P03/P10/P14/P99 ofn==60.0 */ + case 64: /* P02/P03/P10/P13/P14/P99 ofn==60.0 */ if (ofn != 60.0) return -1; - if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) + if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) return 0; break; @@ -972,7 +972,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "ups.firmware.aux", 0, NULL, "QPI\r", "", 6, '(', "", 1, 4, "%s", QX_FLAG_STATIC, voltronic_protocol }, + { "ups.firmware.aux", 0, NULL, "QPI\r", "", 6, '(', "", 1, 4, "%s", QX_FLAG_STATIC, NULL, voltronic_protocol }, /* Query UPS for ratings * > [QRI\r] @@ -981,10 +981,10 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 */ - { "output.voltage.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 1, 5, "%.1f", QX_FLAG_STATIC, NULL }, - { "output.current.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 7, 9, "%.0f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 11, 15, "%.1f", QX_FLAG_SEMI_STATIC, NULL }, /* as *per battery pack*: the value will change when the number of batteries is changed (battery_number through BATNn) */ - { "output.frequency.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 17, 20, "%.1f", QX_FLAG_STATIC, NULL }, + { "output.voltage.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 1, 5, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "output.current.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 7, 9, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 11, 15, "%.1f", QX_FLAG_SEMI_STATIC, NULL, NULL }, /* as *per battery pack*: the value will change when the number of batteries is changed (battery_number through BATNn) */ + { "output.frequency.nominal", 0, NULL, "QRI\r", "", 22, '(', "", 17, 20, "%.1f", QX_FLAG_STATIC, NULL, NULL }, /* Query UPS for ratings * > [QMD\r] @@ -993,15 +993,15 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 4 */ - { "device.model", 0, NULL, "QMD\r", "", 48, '(', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.power.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 17, 23, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "output.powerfactor", 0, NULL, "QMD\r", "", 48, '(', "", 25, 26, "%.1f", QX_FLAG_STATIC, voltronic_output_powerfactor }, - { "input.phases", 0, NULL, "QMD\r", "", 48, '(', "", 28, 28, "%.0f", QX_FLAG_STATIC, NULL }, - { "output.phases", 0, NULL, "QMD\r", "", 48, '(', "", 30, 30, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 32, 34, "%.1f", QX_FLAG_STATIC, NULL }, - { "output.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 36, 38, "%.1f", QX_FLAG_STATIC, NULL }, /* redundant with value from QRI */ -/* { "battery_number", ST_FLAG_RW, voltronic_r_batt_numb, "QMD\r", "", 48, '(', "", 40, 41, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, voltronic_batt_numb }, *//* redundant with value from QBV */ -/* { "battery.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 43, 46, "%.1f", QX_FLAG_STATIC, NULL }, *//* as *per battery* vs *per pack* reported by QRI */ + { "device.model", 0, NULL, "QMD\r", "", 48, '(', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.power.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 17, 23, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "output.powerfactor", 0, NULL, "QMD\r", "", 48, '(', "", 25, 26, "%.1f", QX_FLAG_STATIC, NULL, voltronic_output_powerfactor }, + { "input.phases", 0, NULL, "QMD\r", "", 48, '(', "", 28, 28, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "output.phases", 0, NULL, "QMD\r", "", 48, '(', "", 30, 30, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 32, 34, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "output.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 36, 38, "%.1f", QX_FLAG_STATIC, NULL, NULL }, /* redundant with value from QRI */ +/* { "battery_number", ST_FLAG_RW, voltronic_r_batt_numb, "QMD\r", "", 48, '(', "", 40, 41, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, NULL, voltronic_batt_numb }, *//* redundant with value from QBV */ +/* { "battery.voltage.nominal", 0, NULL, "QMD\r", "", 48, '(', "", 43, 46, "%.1f", QX_FLAG_STATIC, NULL, NULL }, *//* as *per battery* vs *per pack* reported by QRI */ /* Query UPS for ratings * > [F\r] @@ -1010,10 +1010,10 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.1f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.1f", QX_FLAG_STATIC, NULL, NULL }, /* Query UPS for manufacturer * > [QMF\r] @@ -1022,7 +1022,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "device.mfr", 0, NULL, "QMF\r", "", 2, '(', "", 1, 0, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "QMF\r", "", 2, '(', "", 1, 0, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Query UPS for firmware version * > [QVFW\r] @@ -1031,7 +1031,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "ups.firmware", 0, NULL, "QVFW\r", "", 16, '(', "", 7, 14, "%s", QX_FLAG_STATIC, NULL }, + { "ups.firmware", 0, NULL, "QVFW\r", "", 16, '(', "", 7, 14, "%s", QX_FLAG_STATIC, NULL, NULL }, /* Query UPS for serial number * > [QID\r] @@ -1040,7 +1040,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "device.serial", 0, NULL, "QID\r", "", 2, '(', "", 1, 0, "%s", QX_FLAG_STATIC, voltronic_serial_numb }, + { "device.serial", 0, NULL, "QID\r", "", 2, '(', "", 1, 0, "%s", QX_FLAG_STATIC, NULL, voltronic_serial_numb }, /* Query UPS for vendor infos * > [I\r] @@ -1049,9 +1049,9 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "I\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "I\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "I\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Query UPS for status * > [QGS\r] @@ -1060,29 +1060,29 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 4 5 6 7 */ - { "input.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.frequency", 0, NULL, "QGS\r", "", 76, '(', "", 7, 10, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 12, 16, "%.1f", 0, NULL }, - { "output.frequency", 0, NULL, "QGS\r", "", 76, '(', "", 18, 21, "%.1f", 0, NULL }, - { "output.current", 0, NULL, "QGS\r", "", 76, '(', "", 23, 27, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "QGS\r", "", 76, '(', "", 29, 31, "%.0f", 0, NULL }, -/* { "unknown.1", 0, NULL, "QGS\r", "", 76, '(', "", 33, 37, "%.1f", 0, NULL }, *//* Unknown */ -/* { "unknown.2", 0, NULL, "QGS\r", "", 76, '(', "", 39, 43, "%.1f", 0, NULL }, *//* Unknown */ - { "battery.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 45, 49, "%.2f", 0, NULL }, -/* { "unknown.3", 0, NULL, "QGS\r", "", 76, '(', "", 51, 55, "%.1f", 0, NULL }, *//* Unknown */ - { "ups.temperature", 0, NULL, "QGS\r", "", 76, '(', "", 57, 61, "%.1f", 0, NULL }, - { "ups.type", 0, NULL, "QGS\r", "", 76, '(', "", 63, 64, "%s", QX_FLAG_SEMI_STATIC, voltronic_status }, - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 65, 65, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 66, 66, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Battery Low */ - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 67, 67, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "QGS\r", "", 76, '(', "", 67, 67, "%s", 0, voltronic_status }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "QGS\r", "", 76, '(', "", 68, 68, "%s", 0, voltronic_status }, /* UPS Fault */ -/* { "unknown.4", 0, NULL, "QGS\r", "", 76, '(', "", 69, 69, "%s", 0, voltronic_status }, *//* Unknown */ - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 70, 70, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Test in Progress */ - { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 71, 71, "%s", QX_FLAG_QUICK_POLL, voltronic_status }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "QGS\r", "", 76, '(', "", 72, 72, "%s", 0, voltronic_status }, /* Beeper status - ups.beeper.status */ -/* { "unknown.5", 0, NULL, "QGS\r", "", 76, '(', "", 73, 73, "%s", 0, voltronic_status }, *//* Unknown */ -/* { "unknown.6", 0, NULL, "QGS\r", "", 76, '(', "", 74, 74, "%s", 0, voltronic_status }, *//* Unknown */ + { "input.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "QGS\r", "", 76, '(', "", 7, 10, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 12, 16, "%.1f", 0, NULL, NULL }, + { "output.frequency", 0, NULL, "QGS\r", "", 76, '(', "", 18, 21, "%.1f", 0, NULL, NULL }, + { "output.current", 0, NULL, "QGS\r", "", 76, '(', "", 23, 27, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "QGS\r", "", 76, '(', "", 29, 31, "%.0f", 0, NULL, NULL }, +/* { "unknown.1", 0, NULL, "QGS\r", "", 76, '(', "", 33, 37, "%.1f", 0, NULL, NULL }, *//* Unknown */ +/* { "unknown.2", 0, NULL, "QGS\r", "", 76, '(', "", 39, 43, "%.1f", 0, NULL, NULL }, *//* Unknown */ + { "battery.voltage", 0, NULL, "QGS\r", "", 76, '(', "", 45, 49, "%.2f", 0, NULL, NULL }, +/* { "unknown.3", 0, NULL, "QGS\r", "", 76, '(', "", 51, 55, "%.1f", 0, NULL, NULL }, *//* Unknown */ + { "ups.temperature", 0, NULL, "QGS\r", "", 76, '(', "", 57, 61, "%.1f", 0, NULL, NULL }, + { "ups.type", 0, NULL, "QGS\r", "", 76, '(', "", 63, 64, "%s", QX_FLAG_SEMI_STATIC, NULL, voltronic_status }, + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 65, 65, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 66, 66, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Battery Low */ + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 67, 67, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QGS\r", "", 76, '(', "", 67, 67, "%s", 0, NULL, voltronic_status }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "QGS\r", "", 76, '(', "", 68, 68, "%s", 0, NULL, voltronic_status }, /* UPS Fault */ +/* { "unknown.4", 0, NULL, "QGS\r", "", 76, '(', "", 69, 69, "%s", 0, NULL, voltronic_status }, *//* Unknown */ + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 70, 70, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Test in Progress */ + { "ups.status", 0, NULL, "QGS\r", "", 76, '(', "", 71, 71, "%s", QX_FLAG_QUICK_POLL, NULL, voltronic_status }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "QGS\r", "", 76, '(', "", 72, 72, "%s", 0, NULL, voltronic_status }, /* Beeper status - ups.beeper.status */ +/* { "unknown.5", 0, NULL, "QGS\r", "", 76, '(', "", 73, 73, "%s", 0, NULL, voltronic_status }, *//* Unknown */ +/* { "unknown.6", 0, NULL, "QGS\r", "", 76, '(', "", 74, 74, "%s", 0, NULL, voltronic_status }, *//* Unknown */ /* Query UPS for actual working mode * > [QMOD\r] @@ -1091,8 +1091,8 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "ups.alarm", 0, NULL, "QMOD\r", "", 3, '(', "", 1, 1, "%s", 0, voltronic_mode }, - { "ups.status", 0, NULL, "QMOD\r", "", 3, '(', "", 1, 1, "%s", 0, voltronic_mode }, + { "ups.alarm", 0, NULL, "QMOD\r", "", 3, '(', "", 1, 1, "%s", 0, NULL, voltronic_mode }, + { "ups.status", 0, NULL, "QMOD\r", "", 3, '(', "", 1, 1, "%s", 0, NULL, voltronic_mode }, /* Query UPS for faults and their type. Unskipped when a fault is found in 12bit flag of QGS, otherwise you'll get a fake reply. * > [QFS\r] @@ -1104,7 +1104,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 4 5 6 */ - { "ups.alarm", 0, NULL, "QFS\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SKIP, voltronic_fault }, + { "ups.alarm", 0, NULL, "QFS\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SKIP, NULL, voltronic_fault }, /* Query UPS for warnings and their type * > [QWS\r] @@ -1113,7 +1113,7 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 3 4 5 6 */ - { "ups.alarm", 0, NULL, "QWS\r", "", 66, '(', "", 1, 64, "%s", 0, voltronic_warning }, + { "ups.alarm", 0, NULL, "QWS\r", "", 66, '(', "", 1, 64, "%s", 0, NULL, voltronic_warning }, /* Query UPS for actual infos about battery * > [QBV\r] @@ -1122,11 +1122,11 @@ static item_t voltronic_qx2nut[] = { * 0 1 2 */ - { "battery.voltage", 0, NULL, "QBV\r", "", 21, '(', "", 1, 5, "%.2f", 0, NULL }, - { "battery_number", ST_FLAG_RW, voltronic_r_batt_numb, "QBV\r", "", 21, '(', "", 7, 9, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, voltronic_batt_numb }, /* Number of batteries that make a pack */ - { "battery.packs", ST_FLAG_RW, voltronic_r_batt_packs, "QBV\r", "", 21, '(', "", 10, 11, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE, NULL }, /* Number of battery packs in parallel */ - { "battery.charge", 0, NULL, "QBV\r", "", 21, '(', "", 13, 15, "%.0f", 0, NULL }, - { "battery.runtime", 0, NULL, "QBV\r", "", 21, '(', "", 17, 19, "%.0f", 0, voltronic_batt_runtime }, + { "battery.voltage", 0, NULL, "QBV\r", "", 21, '(', "", 1, 5, "%.2f", 0, NULL, NULL }, + { "battery_number", ST_FLAG_RW, voltronic_r_batt_numb, "QBV\r", "", 21, '(', "", 7, 9, "%d", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT, NULL, voltronic_batt_numb }, /* Number of batteries that make a pack */ + { "battery.packs", ST_FLAG_RW, voltronic_r_batt_packs, "QBV\r", "", 21, '(', "", 10, 11, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE, NULL, NULL }, /* Number of battery packs in parallel */ + { "battery.charge", 0, NULL, "QBV\r", "", 21, '(', "", 13, 15, "%.0f", 0, NULL, NULL }, + { "battery.runtime", 0, NULL, "QBV\r", "", 21, '(', "", 17, 19, "%.0f", 0, NULL, voltronic_batt_runtime }, /* Query UPS for last seen min/max load level * > [QLDL\r] @@ -1135,8 +1135,8 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "output.power.minimum.percent", 0, NULL, "QLDL\r", "", 9, '(', "", 1, 3, "%.0f", 0, NULL }, - { "output.power.maximum.percent", 0, NULL, "QLDL\r", "", 9, '(', "", 5, 7, "%.0f", 0, NULL }, + { "output.power.minimum.percent", 0, NULL, "QLDL\r", "", 9, '(', "", 1, 3, "%.0f", 0, NULL, NULL }, + { "output.power.maximum.percent", 0, NULL, "QLDL\r", "", 9, '(', "", 5, 7, "%.0f", 0, NULL, NULL }, /* Query UPS for multi-phase voltages/frequencies * > [Q3**\r] @@ -1169,50 +1169,50 @@ static item_t voltronic_qx2nut[] = { */ /* From Q3PV */ - { "input.L1-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L2-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L3-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L1-L2.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L2-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, - { "input.L1-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, -/* { "input.L1-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ -/* { "input.L2-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ + { "input.L1-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L2-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L3-N.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L1-L2.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L2-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L1-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, +/* { "input.L1-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ +/* { "input.L2-L3.voltage", 0, NULL, "Q3PV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ /* From Q3PC */ - { "input.L1.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL }, - { "input.L2.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL }, - { "input.L3.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL }, + { "input.L1.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L2.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "input.L3.current", 0, NULL, "Q3PC\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL, NULL }, /* From Q3OV */ - { "output.L1-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L2-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L3-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L1-L2.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L2-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.L1-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, -/* { "output.L1-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ -/* { "output.L2-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ + { "output.L1-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L2-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L3-N.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L1-L2.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L2-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L1-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, +/* { "output.L1-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ +/* { "output.L2-L3.voltage", 0, NULL, "Q3OV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ /* From Q3OC */ - { "output.L1.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL }, - { "output.L2.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL }, - { "output.L3.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL }, + { "output.L1.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L2.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L3.current", 0, NULL, "Q3OC\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL, NULL }, /* From Q3LD */ - { "output.L1.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL }, - { "output.L2.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL }, - { "output.L3.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL }, + { "output.L1.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 1, 3, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L2.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 5, 7, "%.0f", QX_FLAG_SKIP, NULL, NULL }, + { "output.L3.power.percent", 0, NULL, "Q3LD\r", "", 13, '(', "", 9, 11, "%.0f", QX_FLAG_SKIP, NULL, NULL }, /* From Q3YV */ - { "output.bypass.L1-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L2-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L3-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L1-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL }, /* P09 */ - { "output.bypass.L2-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL }, /* P09 */ -/* { "output.bypass.L3-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ - { "output.bypass.L1-L2.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L2-L3.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL }, - { "output.bypass.L1-L3.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL }, + { "output.bypass.L1-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L2-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L3-N.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L1-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 1, 5, "%.1f", QX_FLAG_SKIP, NULL, NULL }, /* P09 */ + { "output.bypass.L2-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 7, 11, "%.1f", QX_FLAG_SKIP, NULL, NULL }, /* P09 */ +/* { "output.bypass.L3-N.voltage", 0, NULL, "Q3YV\r", "", 19, '(', "", 13, 17, "%.1f", QX_FLAG_SKIP, NULL, NULL }, *//* P09 *//* Commented out because P09 should be two-phase input/output UPSes */ + { "output.bypass.L1-L2.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 19, 23, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L2-L3.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 25, 29, "%.1f", QX_FLAG_SKIP, NULL, NULL }, + { "output.bypass.L1-L3.voltage", 0, NULL, "Q3YV\r", "", 37, '(', "", 31, 35, "%.1f", QX_FLAG_SKIP, NULL, NULL }, /* Query UPS for capability - total options available: 23; only those whom the UPS is capable of are reported as Enabled or Disabled * > [QFLAG\r] @@ -1221,24 +1221,24 @@ static item_t voltronic_qx2nut[] = { * 0 1 * min length = ( + E + D + \r = 4 */ - { "ups.start.auto", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, - { "battery.protection", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, - { "battery.energysave", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, - { "ups.start.battery", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, - { "outlet.0.switchable", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, voltronic_capability }, + { "ups.start.auto", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, + { "battery.protection", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, + { "battery.energysave", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, + { "ups.start.battery", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, + { "outlet.0.switchable", ST_FLAG_RW, voltronic_e_cap, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM, NULL, voltronic_capability }, /* Not available in NUT */ - { "bypass_alarm", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "battery_alarm", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "bypass_when_off", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "alarm_control", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "converter_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "eco_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "battery_open_status_check", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "bypass_forbidding", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "site_fault_detection", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "advanced_eco_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "constant_phase_angle", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, - { "limited_runtime_on_battery", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_capability }, + { "bypass_alarm", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "battery_alarm", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "bypass_when_off", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "alarm_control", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "converter_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "eco_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "battery_open_status_check", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "bypass_forbidding", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "site_fault_detection", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "advanced_eco_mode", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "constant_phase_angle", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, + { "limited_runtime_on_battery", 0, NULL, "QFLAG\r", "", 4, '(', "", 1, 0, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_capability }, /* Enable or Disable or Reset to safe default values capability options * > [PEX\r] > [PDX\r] > [PF\r] @@ -1247,25 +1247,25 @@ static item_t voltronic_qx2nut[] = { * 0 0 0 */ - { "ups.start.auto", 0, voltronic_e_cap, "P%sR\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, - { "battery.protection", 0, voltronic_e_cap, "P%sS\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, - { "battery.energysave", 0, voltronic_e_cap, "P%sG\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, - { "ups.start.battery", 0, voltronic_e_cap, "P%sC\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, - { "outlet.0.switchable", 0, voltronic_e_cap, "P%sJ\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_capability_set }, + { "ups.start.auto", 0, voltronic_e_cap, "P%sR\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, + { "battery.protection", 0, voltronic_e_cap, "P%sS\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, + { "battery.energysave", 0, voltronic_e_cap, "P%sG\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, + { "ups.start.battery", 0, voltronic_e_cap, "P%sC\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, + { "outlet.0.switchable", 0, voltronic_e_cap, "P%sJ\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_capability_set }, /* Not available in NUT */ - { "reset_to_default", 0, NULL, "PF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_reset }, - { "bypass_alarm", 0, voltronic_e_cap_nonut, "P%sP\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "battery_alarm", 0, voltronic_e_cap_nonut, "P%sB\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "bypass_when_off", 0, voltronic_e_cap_nonut, "P%sO\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "alarm_control", 0, voltronic_e_cap_nonut, "P%sA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "converter_mode", 0, voltronic_e_cap_nonut, "P%sV\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "eco_mode", 0, voltronic_e_cap_nonut, "P%sE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "battery_open_status_check", 0, voltronic_e_cap_nonut, "P%sD\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "bypass_forbidding", 0, voltronic_e_cap_nonut, "P%sF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "site_fault_detection", 0, voltronic_e_cap_nonut, "P%sL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "advanced_eco_mode", 0, voltronic_e_cap_nonut, "P%sN\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "constant_phase_angle", 0, voltronic_e_cap_nonut, "P%sQ\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, - { "limited_runtime_on_battery", 0, voltronic_e_cap_nonut, "P%sW\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_capability_set_nonut }, + { "reset_to_default", 0, NULL, "PF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_reset }, + { "bypass_alarm", 0, voltronic_e_cap_nonut, "P%sP\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "battery_alarm", 0, voltronic_e_cap_nonut, "P%sB\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "bypass_when_off", 0, voltronic_e_cap_nonut, "P%sO\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "alarm_control", 0, voltronic_e_cap_nonut, "P%sA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "converter_mode", 0, voltronic_e_cap_nonut, "P%sV\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "eco_mode", 0, voltronic_e_cap_nonut, "P%sE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "battery_open_status_check", 0, voltronic_e_cap_nonut, "P%sD\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "bypass_forbidding", 0, voltronic_e_cap_nonut, "P%sF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "site_fault_detection", 0, voltronic_e_cap_nonut, "P%sL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "advanced_eco_mode", 0, voltronic_e_cap_nonut, "P%sN\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "constant_phase_angle", 0, voltronic_e_cap_nonut, "P%sQ\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, + { "limited_runtime_on_battery", 0, voltronic_e_cap_nonut, "P%sW\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_capability_set_nonut }, /* Query UPS for programmable outlet (1-4) status * > [QSK1\r] @@ -1274,14 +1274,14 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "outlet.1.switchable", 0, NULL, "QSK1\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.1.status", 0, NULL, "QSK1\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.2.switchable", 0, NULL, "QSK2\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.2.status", 0, NULL, "QSK2\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.3.switchable", 0, NULL, "QSK3\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.3.status", 0, NULL, "QSK3\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.4.switchable", 0, NULL, "QSK4\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, - { "outlet.4.status", 0, NULL, "QSK4\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_outlet }, + { "outlet.1.switchable", 0, NULL, "QSK1\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.1.status", 0, NULL, "QSK1\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.2.switchable", 0, NULL, "QSK2\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.2.status", 0, NULL, "QSK2\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.3.switchable", 0, NULL, "QSK3\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.3.status", 0, NULL, "QSK3\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.4.switchable", 0, NULL, "QSK4\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, + { "outlet.4.status", 0, NULL, "QSK4\r", "", 3, '(', "", 1, 1, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_outlet }, /* Query UPS for programmable outlet n (1-4) delay time before it shuts down the load when on battery mode * > [QSKT1\r] @@ -1290,10 +1290,10 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "outlet.1.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT1\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay }, - { "outlet.2.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT2\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay }, - { "outlet.3.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT3\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay }, - { "outlet.4.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT4\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay }, + { "outlet.1.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT1\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay }, + { "outlet.2.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT2\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay }, + { "outlet.3.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT3\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay }, + { "outlet.4.delay.shutdown", ST_FLAG_RW, voltronic_r_outlet_delay, "QSKT4\r", "", 5, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay }, /* Set delay time for programmable outlets * > [PSK1nnn\r] n = 0..9 @@ -1302,10 +1302,10 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "outlet.1.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK1%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay_set }, - { "outlet.2.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK2%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay_set }, - { "outlet.3.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK3%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay_set }, - { "outlet.4.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK4%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_outlet_delay_set }, + { "outlet.1.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK1%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay_set }, + { "outlet.2.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK2%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay_set }, + { "outlet.3.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK3%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay_set }, + { "outlet.4.delay.shutdown", 0, voltronic_r_outlet_delay, "PSK4%03d\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_outlet_delay_set }, /* Query UPS for ECO Mode voltage limits * > [QHE\r] @@ -1314,12 +1314,12 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "input.transfer.high", ST_FLAG_RW, voltronic_r_eco_volt_max, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_eco_volt }, - { "input.transfer.low", ST_FLAG_RW, voltronic_r_eco_volt_min, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_eco_volt }, - { "input.transfer.low.min", 0, NULL, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_eco_volt_range }, - { "input.transfer.low.max", 0, NULL, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_eco_volt_range }, - { "input.transfer.high.min", 0, NULL, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_eco_volt_range }, - { "input.transfer.high.max", 0, NULL, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, voltronic_eco_volt_range }, + { "input.transfer.high", ST_FLAG_RW, voltronic_r_eco_volt_max, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_eco_volt }, + { "input.transfer.low", ST_FLAG_RW, voltronic_r_eco_volt_min, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_eco_volt }, + { "input.transfer.low.min", 0, NULL, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_eco_volt_range }, + { "input.transfer.low.max", 0, NULL, "QHE\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_eco_volt_range }, + { "input.transfer.high.min", 0, NULL, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_eco_volt_range }, + { "input.transfer.high.max", 0, NULL, "QHE\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_SKIP, NULL, voltronic_eco_volt_range }, /* Set ECO Mode voltage limits * > [HEHnnn\r] > [HELnnn\r] n = 0..9 @@ -1328,8 +1328,8 @@ static item_t voltronic_qx2nut[] = { * 0 0 */ - { "input.transfer.high", 0, voltronic_r_eco_volt_max, "HEH%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_process_setvar }, - { "input.transfer.low", 0, voltronic_r_eco_volt_min, "HEL%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_process_setvar }, + { "input.transfer.high", 0, voltronic_r_eco_volt_max, "HEH%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, + { "input.transfer.low", 0, voltronic_r_eco_volt_min, "HEL%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, /* Query UPS for ECO Mode frequency limits * > [QFRE\r] @@ -1338,8 +1338,8 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "input.frequency.high", ST_FLAG_RW, voltronic_r_eco_freq_max, "QFRE\r", "", 11, '(', "", 1, 4, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_eco_freq }, - { "input.frequency.low", ST_FLAG_RW, voltronic_r_eco_freq_min, "QFRE\r", "", 11, '(', "", 6, 9, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_eco_freq }, + { "input.frequency.high", ST_FLAG_RW, voltronic_r_eco_freq_max, "QFRE\r", "", 11, '(', "", 1, 4, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_eco_freq }, + { "input.frequency.low", ST_FLAG_RW, voltronic_r_eco_freq_min, "QFRE\r", "", 11, '(', "", 6, 9, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_eco_freq }, /* Set ECO Mode frequency limits * > [FREHnn.n\r] > [FRELnn.n\r] n = 0..9 @@ -1348,8 +1348,8 @@ static item_t voltronic_qx2nut[] = { * 0 0 */ - { "input.frequency.high", 0, voltronic_r_eco_freq_max, "FREH%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_process_setvar }, - { "input.frequency.low", 0, voltronic_r_eco_freq_min, "FREL%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, voltronic_process_setvar }, + { "input.frequency.high", 0, voltronic_r_eco_freq_max, "FREH%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, + { "input.frequency.low", 0, voltronic_r_eco_freq_min, "FREL%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, /* Query UPS for Bypass Mode voltage limits * > [QBYV\r] @@ -1358,8 +1358,8 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "max_bypass_volt", ST_FLAG_RW, voltronic_r_bypass_volt_max, "QBYV\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_bypass }, - { "min_bypass_volt", ST_FLAG_RW, voltronic_r_bypass_volt_min, "QBYV\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_bypass }, + { "max_bypass_volt", ST_FLAG_RW, voltronic_r_bypass_volt_max, "QBYV\r", "", 9, '(', "", 1, 3, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_bypass }, + { "min_bypass_volt", ST_FLAG_RW, voltronic_r_bypass_volt_min, "QBYV\r", "", 9, '(', "", 5, 7, "%.0f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_bypass }, /* Set Bypass Mode voltage limits * > [PHVnnn\r] > [PLVnnn\r] n = 0..9 @@ -1368,8 +1368,8 @@ static item_t voltronic_qx2nut[] = { * 0 0 */ - { "max_bypass_volt", 0, voltronic_r_bypass_volt_max, "PHV%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_process_setvar }, - { "min_bypass_volt", 0, voltronic_r_bypass_volt_min, "PLV%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_process_setvar }, + { "max_bypass_volt", 0, voltronic_r_bypass_volt_max, "PHV%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, + { "min_bypass_volt", 0, voltronic_r_bypass_volt_min, "PLV%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, /* Query UPS for Bypass Mode frequency limits * > [QBYF\r] @@ -1378,8 +1378,8 @@ static item_t voltronic_qx2nut[] = { * 0 1 */ - { "max_bypass_freq", ST_FLAG_RW, voltronic_r_bypass_freq_max, "QBYF\r", "", 11, '(', "", 1, 4, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_bypass }, - { "min_bypass_freq", ST_FLAG_RW, voltronic_r_bypass_freq_min, "QBYF\r", "", 11, '(', "", 6, 9, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_bypass }, + { "max_bypass_freq", ST_FLAG_RW, voltronic_r_bypass_freq_max, "QBYF\r", "", 11, '(', "", 1, 4, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_bypass }, + { "min_bypass_freq", ST_FLAG_RW, voltronic_r_bypass_freq_min, "QBYF\r", "", 11, '(', "", 6, 9, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_bypass }, /* Set Bypass Mode frequency limits * > [PGFnn.n\r] > [PSFnn.n\r] n = 0..9 @@ -1388,8 +1388,8 @@ static item_t voltronic_qx2nut[] = { * 0 0 */ - { "max_bypass_freq", 0, voltronic_r_bypass_freq_max, "PGF%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_process_setvar }, - { "min_bypass_freq", 0, voltronic_r_bypass_freq_min, "PSF%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_process_setvar }, + { "max_bypass_freq", 0, voltronic_r_bypass_freq_max, "PGF%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, + { "min_bypass_freq", 0, voltronic_r_bypass_freq_min, "PSF%04.1f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_process_setvar }, /* Set number of batteries that make a pack to n (integer, 1-9). NOTE: changing the number of batteries will change the UPS's estimation on battery charge/runtime * > [BATNn\r] @@ -1398,7 +1398,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery_number", 0, voltronic_r_batt_numb, "BATN%1.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT, voltronic_process_setvar }, + { "battery_number", 0, voltronic_r_batt_numb, "BATN%1.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE | QX_FLAG_NONUT, NULL, voltronic_process_setvar }, /* Set number of battery packs in parallel to n (integer, 01-99). NOTE: changing the number of battery packs will change the UPS's estimation on battery charge/runtime * > [BATGNn\r] @@ -1407,7 +1407,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.packs", 0, voltronic_r_batt_packs, "BATGN%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, + { "battery.packs", 0, voltronic_r_batt_packs, "BATGN%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, /* Query UPS for battery type (Only P31) * > [QBT\r] @@ -1416,7 +1416,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.type", ST_FLAG_RW, voltronic_e_batt_type, "QBT\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_p31b }, + { "battery.type", ST_FLAG_RW, voltronic_e_batt_type, "QBT\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_p31b }, /* Set battery type (Only P31) * > [PBTnn\r] nn = 00/01/02 @@ -1425,7 +1425,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.type", 0, voltronic_e_batt_type, "PBT%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, voltronic_p31b_set }, + { "battery.type", 0, voltronic_e_batt_type, "PBT%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_SKIP, NULL, voltronic_p31b_set }, /* Query UPS for device grid working range (Only P31) * > [QGR\r] @@ -1434,7 +1434,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "work_range_type", ST_FLAG_RW, voltronic_e_work_range, "QGR\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_p31g }, + { "work_range_type", ST_FLAG_RW, voltronic_e_work_range, "QGR\r", "", 4, '(', "", 1, 2, "%s", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_p31g }, /* Set device grid working range type (Only P31) * > [PBTnn\r] nn = 00/01 @@ -1443,7 +1443,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "work_range_type", 0, voltronic_e_work_range, "PGR%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_p31g_set }, + { "work_range_type", 0, voltronic_e_work_range, "PGR%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_p31g_set }, /* Query UPS for battery low voltage * > [RE0\r] @@ -1452,7 +1452,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.voltage.low", ST_FLAG_RW, voltronic_r_batt_low, "RE0\r", "", 3, '#', "", 1, 2, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE, NULL }, + { "battery.voltage.low", ST_FLAG_RW, voltronic_r_batt_low, "RE0\r", "", 3, '#', "", 1, 2, "%.1f", QX_FLAG_SEMI_STATIC | QX_FLAG_RANGE, NULL, NULL }, /* Set voltage for battery low to n (integer, 20..24/20..28). NOTE: changing the battery low voltage will change the UPS's estimation on battery charge/runtime * > [W0En\r] @@ -1461,7 +1461,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "battery.voltage.low", 0, voltronic_r_batt_low, "W0E%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, + { "battery.voltage.low", 0, voltronic_r_batt_low, "W0E%02.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, /* Query UPS for Phase Angle * > [QPD\r] @@ -1470,8 +1470,8 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "input_phase_angle", 0, NULL, "QPD\r", "", 9, '(', "", 1, 3, "%03d", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, voltronic_phase }, - { "output_phase_angle", ST_FLAG_RW, voltronic_e_phase, "QPD\r", "", 9, '(', "", 5, 7, "%03d", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT, voltronic_phase }, + { "input_phase_angle", 0, NULL, "QPD\r", "", 9, '(', "", 1, 3, "%03d", QX_FLAG_SEMI_STATIC | QX_FLAG_NONUT, NULL, voltronic_phase }, + { "output_phase_angle", ST_FLAG_RW, voltronic_e_phase, "QPD\r", "", 9, '(', "", 5, 7, "%03d", QX_FLAG_SEMI_STATIC | QX_FLAG_ENUM | QX_FLAG_NONUT, NULL, voltronic_phase }, /* Set output phase angle * > [PPDn\r] n = (000, 120, 180 or 240) @@ -1480,7 +1480,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "output_phase_angle", 0, voltronic_e_phase, "PPD%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, voltronic_phase_set }, + { "output_phase_angle", 0, voltronic_e_phase, "PPD%03.0f\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_SETVAR | QX_FLAG_ENUM | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, voltronic_phase_set }, /* Query UPS for master/slave for a system of UPSes in parallel * > [QPAR\r] @@ -1489,7 +1489,7 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "voltronic_parallel", 0, NULL, "QPAR\r", "", 5, '(', "", 1, 3, "%s", QX_FLAG_STATIC | QX_FLAG_NONUT, voltronic_parallel }, + { "voltronic_parallel", 0, NULL, "QPAR\r", "", 5, '(', "", 1, 3, "%s", QX_FLAG_STATIC | QX_FLAG_NONUT, NULL, voltronic_parallel }, /* Query UPS for ?? * > [QBDR\r] @@ -1498,167 +1498,167 @@ static item_t voltronic_qx2nut[] = { * 0 */ - { "unknown.7", 0, NULL, "QBDR\r", "", 5, '(', "", 1, 0, "%s", QX_FLAG_STATIC | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL }, + { "unknown.7", 0, NULL, "QBDR\r", "", 5, '(', "", 1, 0, "%s", QX_FLAG_STATIC | QX_FLAG_NONUT | QX_FLAG_SKIP, NULL, NULL }, /* Instant commands */ - { "load.off", 0, NULL, "SOFF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "SON\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "load.off", 0, NULL, "SOFF\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "SON\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, voltronic_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, voltronic_process_command }, - { "shutdown.stop", 0, NULL, "CS\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, + { "shutdown.stop", 0, NULL, "CS\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, - { "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, voltronic_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL }, + { "test.battery.start", 0, NULL, "T%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL }, - { "beeper.toggle", 0, NULL, "BZ%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, voltronic_process_command }, + { "beeper.toggle", 0, NULL, "BZ%s\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD, NULL, voltronic_process_command }, /* Enable/disable beeper: unskipped if the UPS can control alarm (capability) */ - { "beeper.enable", 0, NULL, "PEA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "beeper.disable", 0, NULL, "PDA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, + { "beeper.enable", 0, NULL, "PEA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "beeper.disable", 0, NULL, "PDA\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, /* Outlet control: unskipped if the outlets are manageable */ - { "outlet.1.load.off", 0, NULL, "SKOFF1\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.1.load.on", 0, NULL, "SKON1\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.2.load.off", 0, NULL, "SKOFF2\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.2.load.on", 0, NULL, "SKON2\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.3.load.off", 0, NULL, "SKOFF3\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.3.load.on", 0, NULL, "SKON3\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.4.load.off", 0, NULL, "SKOFF4\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "outlet.4.load.on", 0, NULL, "SKON4\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, + { "outlet.1.load.off", 0, NULL, "SKOFF1\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.1.load.on", 0, NULL, "SKON1\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.2.load.off", 0, NULL, "SKOFF2\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.2.load.on", 0, NULL, "SKON2\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.3.load.off", 0, NULL, "SKOFF3\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.3.load.on", 0, NULL, "SKON3\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.4.load.off", 0, NULL, "SKOFF4\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "outlet.4.load.on", 0, NULL, "SKON4\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, /* Bypass: unskipped if the UPS is capable of ECO Mode */ - { "bypass.start", 0, NULL, "PEE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, - { "bypass.stop", 0, NULL, "PDE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL }, + { "bypass.start", 0, NULL, "PEE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, + { "bypass.stop", 0, NULL, "PDE\r", "", 5, '(', "", 1, 3, NULL, QX_FLAG_CMD | QX_FLAG_SKIP, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, voltronic_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, voltronic_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, voltronic_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, voltronic_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, voltronic_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, voltronic_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* == Testing table == */ #ifdef TESTING static testing_t voltronic_testing[] = { - { "QGS\r", "(234.9 50.0 229.8 50.0 000.0 00A 369.1 ---.- 026.5 ---.- 018.8 100000000001\r" }, - { "QPI\r", "(PI01\r" }, - { "QRI\r", "(230.0 004 024.0 50.0\r" }, - { "QMF\r", "(#####VOLTRONIC\r" }, - { "I\r", "#------------- ------ VT12046Q \r" }, - { "F\r", "#220.0 000 024.0 50.0\r" }, - { "QMD\r", "(#######OLHVT1K0 ###1000 80 2/2 230 230 02 12.0\r" }, - { "QFS\r", "(14 212.1 50.0 005.6 49.9 006 010.6 343.8 ---.- 026.2 021.8 01101100\r" }, - { "QMOD\r", "(S\r" }, - { "QVFW\r", "(VERFW:00322.02\r" }, - { "QID\r", "(685653211455\r" }, - { "QBV\r", "(026.5 02 01 068 255\r" }, - { "QFLAG\r", "(EpashcjDbroegfl\r" }, - { "QWS\r", "(0000000000000000000000000000000000000000000000000000000001000001\r" }, - { "QHE\r", "(242 218\r" }, - { "QBYV\r", "(264 170\r" }, - { "QBYF\r", "(53.0 47.0\r" }, - { "QSK1\r", "(1\r" }, - { "QSK2\r", "(0\r" }, - { "QSK3\r", "(1\r" }, - { "QSK4\r", "(NAK\r" }, - { "QSKT1\r", "(008\r" }, - { "QSKT2\r", "(012\r" }, - { "QSKT3\r", "(NAK\r" }, - { "QSKT4\r", "(007\r" }, - { "RE0\r", "#20\r" }, - { "W0E24\r", "(ACK\r" }, - { "PF\r", "(ACK\r" }, - { "PEA\r", "(ACK\r" }, - { "PDR\r", "(NAK\r" }, - { "HEH250\r", "(ACK\r" }, - { "HEL210\r", "(ACK\r" }, - { "PHV260\r", "(NAK\r" }, - { "PLV190\r", "(ACK\r" }, - { "PGF51.0\r", "(NAK\r" }, - { "PSF47.5\r", "(ACK\r" }, - { "BATN2\r", "(ACK\r" }, - { "BATGN04\r", "(ACK\r" }, - { "QBT\r", "(01\r" }, - { "PBT02\r", "(ACK\r" }, - { "QGR\r", "(00\r" }, - { "PGR01\r", "(ACK\r" }, - { "PSK1008\r", "(ACK\r" }, - { "PSK3987\r", "(ACK\r" }, - { "PSK2009\r", "(ACK\r" }, - { "PSK4012\r", "(ACK\r" }, - { "Q3PV\r", "(123.4 456.4 789.4 012.4 323.4 223.4\r" }, - { "Q3OV\r", "(253.4 163.4 023.4 143.4 103.4 523.4\r" }, - { "Q3OC\r", "(109 069 023\r" }, - { "Q3LD\r", "(005 033 089\r" }, - { "Q3YV\r", "(303.4 245.4 126.4 222.4 293.4 321.4\r" }, - { "Q3PC\r", "(002 023 051\r" }, - { "SOFF\r", "(NAK\r" }, - { "SON\r", "(ACK\r" }, - { "T\r", "(NAK\r" }, - { "TL\r", "(ACK\r" }, - { "CS\r", "(ACK\r" }, - { "CT\r", "(NAK\r" }, - { "BZOFF\r", "(ACK\r" }, - { "BZON\r", "(ACK\r" }, - { "S.3R0002\r", "(ACK\r" }, - { "S02R0024\r", "(NAK\r" }, - { "S.5\r", "(ACK\r" }, - { "T.3\r", "(ACK\r" }, - { "T02\r", "(NAK\r" }, - { "SKON1\r", "(ACK\r" }, - { "SKOFF1\r", "(NAK\r" }, - { "SKON2\r", "(ACK\r" }, - { "SKOFF2\r", "(ACK\r" }, - { "SKON3\r", "(NAK\r" }, - { "SKOFF3\r", "(ACK\r" }, - { "SKON4\r", "(NAK\r" }, - { "SKOFF4\r", "(NAK\r" }, - { "QPAR\r", "(003\r" }, - { "QPD\r", "(000 240\r" }, - { "PPD120\r", "(ACK\r" }, - { "QLDL\r", "(005 080\r" }, - { "QBDR\r", "(1234\r" }, - { "QFRE\r", "(50.0 00.0\r" }, - { "FREH54.0\r", "(ACK\r" }, - { "FREL47.0\r", "(ACK\r" }, - { "PEP\r", "(ACK\r" }, - { "PDP\r", "(ACK\r" }, - { "PEB\r", "(ACK\r" }, - { "PDB\r", "(ACK\r" }, - { "PER\r", "(NAK\r" }, - { "PDR\r", "(NAK\r" }, - { "PEO\r", "(ACK\r" }, - { "PDO\r", "(ACK\r" }, - { "PEA\r", "(ACK\r" }, - { "PDA\r", "(ACK\r" }, - { "PES\r", "(ACK\r" }, - { "PDS\r", "(ACK\r" }, - { "PEV\r", "(ACK\r" }, - { "PDV\r", "(ACK\r" }, - { "PEE\r", "(ACK\r" }, - { "PDE\r", "(ACK\r" }, - { "PEG\r", "(ACK\r" }, - { "PDG\r", "(NAK\r" }, - { "PED\r", "(ACK\r" }, - { "PDD\r", "(ACK\r" }, - { "PEC\r", "(ACK\r" }, - { "PDC\r", "(NAK\r" }, - { "PEF\r", "(NAK\r" }, - { "PDF\r", "(ACK\r" }, - { "PEJ\r", "(NAK\r" }, - { "PDJ\r", "(ACK\r" }, - { "PEL\r", "(ACK\r" }, - { "PDL\r", "(ACK\r" }, - { "PEN\r", "(ACK\r" }, - { "PDN\r", "(ACK\r" }, - { "PEQ\r", "(ACK\r" }, - { "PDQ\r", "(ACK\r" }, - { "PEW\r", "(NAK\r" }, - { "PDW\r", "(ACK\r" }, + { "QGS\r", "(234.9 50.0 229.8 50.0 000.0 00A 369.1 ---.- 026.5 ---.- 018.8 100000000001\r", -1 }, + { "QPI\r", "(PI01\r", -1 }, + { "QRI\r", "(230.0 004 024.0 50.0\r", -1 }, + { "QMF\r", "(#####VOLTRONIC\r", -1 }, + { "I\r", "#------------- ------ VT12046Q \r", -1 }, + { "F\r", "#220.0 000 024.0 50.0\r", -1 }, + { "QMD\r", "(#######OLHVT1K0 ###1000 80 2/2 230 230 02 12.0\r", -1 }, + { "QFS\r", "(14 212.1 50.0 005.6 49.9 006 010.6 343.8 ---.- 026.2 021.8 01101100\r", -1 }, + { "QMOD\r", "(S\r", -1 }, + { "QVFW\r", "(VERFW:00322.02\r", -1 }, + { "QID\r", "(685653211455\r", -1 }, + { "QBV\r", "(026.5 02 01 068 255\r", -1 }, + { "QFLAG\r", "(EpashcjDbroegfl\r", -1 }, + { "QWS\r", "(0000000000000000000000000000000000000000000000000000000001000001\r", -1 }, + { "QHE\r", "(242 218\r", -1 }, + { "QBYV\r", "(264 170\r", -1 }, + { "QBYF\r", "(53.0 47.0\r", -1 }, + { "QSK1\r", "(1\r", -1 }, + { "QSK2\r", "(0\r", -1 }, + { "QSK3\r", "(1\r", -1 }, + { "QSK4\r", "(NAK\r", -1 }, + { "QSKT1\r", "(008\r", -1 }, + { "QSKT2\r", "(012\r", -1 }, + { "QSKT3\r", "(NAK\r", -1 }, + { "QSKT4\r", "(007\r", -1 }, + { "RE0\r", "#20\r", -1 }, + { "W0E24\r", "(ACK\r", -1 }, + { "PF\r", "(ACK\r", -1 }, + { "PEA\r", "(ACK\r", -1 }, + { "PDR\r", "(NAK\r", -1 }, + { "HEH250\r", "(ACK\r", -1 }, + { "HEL210\r", "(ACK\r", -1 }, + { "PHV260\r", "(NAK\r", -1 }, + { "PLV190\r", "(ACK\r", -1 }, + { "PGF51.0\r", "(NAK\r", -1 }, + { "PSF47.5\r", "(ACK\r", -1 }, + { "BATN2\r", "(ACK\r", -1 }, + { "BATGN04\r", "(ACK\r", -1 }, + { "QBT\r", "(01\r", -1 }, + { "PBT02\r", "(ACK\r", -1 }, + { "QGR\r", "(00\r", -1 }, + { "PGR01\r", "(ACK\r", -1 }, + { "PSK1008\r", "(ACK\r", -1 }, + { "PSK3987\r", "(ACK\r", -1 }, + { "PSK2009\r", "(ACK\r", -1 }, + { "PSK4012\r", "(ACK\r", -1 }, + { "Q3PV\r", "(123.4 456.4 789.4 012.4 323.4 223.4\r", -1 }, + { "Q3OV\r", "(253.4 163.4 023.4 143.4 103.4 523.4\r", -1 }, + { "Q3OC\r", "(109 069 023\r", -1 }, + { "Q3LD\r", "(005 033 089\r", -1 }, + { "Q3YV\r", "(303.4 245.4 126.4 222.4 293.4 321.4\r", -1 }, + { "Q3PC\r", "(002 023 051\r", -1 }, + { "SOFF\r", "(NAK\r", -1 }, + { "SON\r", "(ACK\r", -1 }, + { "T\r", "(NAK\r", -1 }, + { "TL\r", "(ACK\r", -1 }, + { "CS\r", "(ACK\r", -1 }, + { "CT\r", "(NAK\r", -1 }, + { "BZOFF\r", "(ACK\r", -1 }, + { "BZON\r", "(ACK\r", -1 }, + { "S.3R0002\r", "(ACK\r", -1 }, + { "S02R0024\r", "(NAK\r", -1 }, + { "S.5\r", "(ACK\r", -1 }, + { "T.3\r", "(ACK\r", -1 }, + { "T02\r", "(NAK\r", -1 }, + { "SKON1\r", "(ACK\r", -1 }, + { "SKOFF1\r", "(NAK\r", -1 }, + { "SKON2\r", "(ACK\r", -1 }, + { "SKOFF2\r", "(ACK\r", -1 }, + { "SKON3\r", "(NAK\r", -1 }, + { "SKOFF3\r", "(ACK\r", -1 }, + { "SKON4\r", "(NAK\r", -1 }, + { "SKOFF4\r", "(NAK\r", -1 }, + { "QPAR\r", "(003\r", -1 }, + { "QPD\r", "(000 240\r", -1 }, + { "PPD120\r", "(ACK\r", -1 }, + { "QLDL\r", "(005 080\r", -1 }, + { "QBDR\r", "(1234\r", -1 }, + { "QFRE\r", "(50.0 00.0\r", -1 }, + { "FREH54.0\r", "(ACK\r", -1 }, + { "FREL47.0\r", "(ACK\r", -1 }, + { "PEP\r", "(ACK\r", -1 }, + { "PDP\r", "(ACK\r", -1 }, + { "PEB\r", "(ACK\r", -1 }, + { "PDB\r", "(ACK\r", -1 }, + { "PER\r", "(NAK\r", -1 }, + { "PDR\r", "(NAK\r", -1 }, + { "PEO\r", "(ACK\r", -1 }, + { "PDO\r", "(ACK\r", -1 }, + { "PEA\r", "(ACK\r", -1 }, + { "PDA\r", "(ACK\r", -1 }, + { "PES\r", "(ACK\r", -1 }, + { "PDS\r", "(ACK\r", -1 }, + { "PEV\r", "(ACK\r", -1 }, + { "PDV\r", "(ACK\r", -1 }, + { "PEE\r", "(ACK\r", -1 }, + { "PDE\r", "(ACK\r", -1 }, + { "PEG\r", "(ACK\r", -1 }, + { "PDG\r", "(NAK\r", -1 }, + { "PED\r", "(ACK\r", -1 }, + { "PDD\r", "(ACK\r", -1 }, + { "PEC\r", "(ACK\r", -1 }, + { "PDC\r", "(NAK\r", -1 }, + { "PEF\r", "(NAK\r", -1 }, + { "PDF\r", "(ACK\r", -1 }, + { "PEJ\r", "(NAK\r", -1 }, + { "PDJ\r", "(ACK\r", -1 }, + { "PEL\r", "(ACK\r", -1 }, + { "PDL\r", "(ACK\r", -1 }, + { "PEN\r", "(ACK\r", -1 }, + { "PDN\r", "(ACK\r", -1 }, + { "PEQ\r", "(ACK\r", -1 }, + { "PDQ\r", "(ACK\r", -1 }, + { "PEW\r", "(NAK\r", -1 }, + { "PDW\r", "(ACK\r", -1 }, { NULL } }; #endif /* TESTING */ @@ -2524,8 +2524,8 @@ static int voltronic_eco_volt(item_t *item, char *value, size_t valuelen) } - /* For P02/P03/P10/P14/P99 */ - } else if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 14 || protocol == 99) { + /* For P02/P03/P10/P13/P14/P99 */ + } else if (protocol == 2 || protocol == 3 || protocol == 10 || protocol == 13 || protocol == 14 || protocol == 99) { if (ovn >= 200) { min.lower = ovn - 24; @@ -2794,6 +2794,7 @@ static int voltronic_protocol(item_t *item, char *value, size_t valuelen) case 8: case 9: case 10: + case 13: case 14: case 31: case 99: diff --git a/drivers/nutdrv_qx_zinto.c b/drivers/nutdrv_qx_zinto.c index afc50fc..62f3209 100644 --- a/drivers/nutdrv_qx_zinto.c +++ b/drivers/nutdrv_qx_zinto.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_zinto.h" -#define ZINTO_VERSION "Zinto 0.01" +#define ZINTO_VERSION "Zinto 0.04" /* qx2nut lookup table */ static item_t zinto_qx2nut[] = { @@ -37,23 +37,22 @@ static item_t zinto_qx2nut[] = { * 0 1 2 3 4 */ - { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL }, - { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL }, - { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL }, - { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL }, - { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL }, - { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL }, - { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL }, + { "input.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 1, 5, "%.1f", 0, NULL, NULL }, + { "input.voltage.fault", 0, NULL, "Q1\r", "", 47, '(', "", 7, 11, "%.1f", 0, NULL, NULL }, + { "output.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 13, 17, "%.1f", 0, NULL, NULL }, + { "ups.load", 0, NULL, "Q1\r", "", 47, '(', "", 19, 21, "%.0f", 0, NULL, NULL }, + { "input.frequency", 0, NULL, "Q1\r", "", 47, '(', "", 23, 26, "%.1f", 0, NULL, NULL }, + { "battery.voltage", 0, NULL, "Q1\r", "", 47, '(', "", 28, 31, "%.2f", 0, NULL, NULL }, + { "ups.temperature", 0, NULL, "Q1\r", "", 47, '(', "", 33, 36, "%.1f", 0, NULL, NULL }, /* Status bits */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Battery Low */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, blazer_process_status_bits }, /* UPS Failed */ - { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, blazer_process_status_bits }, /* UPS Type */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Test in Progress */ - { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, 0, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, blazer_process_status_bits }, /* Shutdown Active */ - { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, blazer_process_status_bits }, /* Beeper status */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 38, 38, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Utility Fail (Immediate) */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 39, 39, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Battery Low */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 40, 40, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Bypass/Boost or Buck Active */ + { "ups.alarm", 0, NULL, "Q1\r", "", 47, '(', "", 41, 41, NULL, 0, NULL, blazer_process_status_bits }, /* UPS Failed */ + { "ups.type", 0, NULL, "Q1\r", "", 47, '(', "", 42, 42, "%s", QX_FLAG_STATIC, NULL, blazer_process_status_bits }, /* UPS Type */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 43, 43, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Test in Progress */ + { "ups.status", 0, NULL, "Q1\r", "", 47, '(', "", 44, 44, NULL, QX_FLAG_QUICK_POLL, NULL, blazer_process_status_bits }, /* Shutdown Active */ + { "ups.beeper.status", 0, NULL, "Q1\r", "", 47, '(', "", 45, 45, "%s", 0, NULL, blazer_process_status_bits }, /* Beeper status */ /* * > [F\r] @@ -62,10 +61,10 @@ static item_t zinto_qx2nut[] = { * 0 1 2 */ - { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL }, - { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL }, - { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL }, - { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL }, + { "input.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 1, 5, "%.0f", QX_FLAG_STATIC, NULL, NULL }, + { "input.current.nominal", 0, NULL, "F\r", "", 22, '#', "", 7, 9, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL }, + { "input.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL }, /* * > [FW?\r] @@ -74,45 +73,45 @@ static item_t zinto_qx2nut[] = { * 0 1 2 3 */ - { "device.mfr", 0, NULL, "FW?\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "device.model", 0, NULL, "FW?\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, - { "ups.firmware", 0, NULL, "FW?\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL }, + { "device.mfr", 0, NULL, "FW?\r", "", 39, '#', "", 1, 15, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "device.model", 0, NULL, "FW?\r", "", 39, '#', "", 17, 26, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, + { "ups.firmware", 0, NULL, "FW?\r", "", 39, '#', "", 28, 37, "%s", QX_FLAG_STATIC | QX_FLAG_TRIM, NULL, NULL }, /* Instant commands */ - { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, blazer_process_command }, - { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, - { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL }, + { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "load.on", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "shutdown.return", 0, NULL, "S%s\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stayoff", 0, NULL, "S%sR0000\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "shutdown.stop", 0, NULL, "C\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start", 0, NULL, "T%02d\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, blazer_process_command }, + { "test.battery.start.deep", 0, NULL, "TL\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.start.quick", 0, NULL, "T\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, + { "test.battery.stop", 0, NULL, "CT\r", "", 0, 0, "", 0, 0, NULL, QX_FLAG_CMD, NULL, NULL }, /* Server-side settable vars */ - { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, - { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, blazer_process_setvar }, + { "ups.delay.start", ST_FLAG_RW, blazer_r_ondelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_ONDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, + { "ups.delay.shutdown", ST_FLAG_RW, blazer_r_offdelay, NULL, "", 0, 0, "", 0, 0, DEFAULT_OFFDELAY, QX_FLAG_ABSENT | QX_FLAG_SETVAR | QX_FLAG_RANGE, NULL, blazer_process_setvar }, /* End of structure. */ - { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL } + { NULL, 0, NULL, NULL, "", 0, 0, "", 0, 0, NULL, 0, NULL, NULL } }; /* Testing table */ #ifdef TESTING static testing_t zinto_testing[] = { - { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r" }, - { "F\r", "#230.0 000 024.0 50.0\r" }, - { "FW?\r", "#NOT_A_LIVE_UPS TESTING TESTING \r" }, - { "Q\r", "" }, - { "S03\r", "" }, - { "C\r", "" }, - { "S02R0005\r", "" }, - { "S.5R0000\r", "" }, - { "T04\r", "" }, - { "TL\r", "" }, - { "T\r", "" }, - { "CT\r", "" }, + { "Q1\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, + { "F\r", "#230.0 000 024.0 50.0\r", -1 }, + { "FW?\r", "#NOT_A_LIVE_UPS TESTING TESTING \r", -1 }, + { "Q\r", "", -1 }, + { "S03\r", "", -1 }, + { "C\r", "", -1 }, + { "S02R0005\r", "", -1 }, + { "S.5R0000\r", "", -1 }, + { "T04\r", "", -1 }, + { "TL\r", "", -1 }, + { "T\r", "", -1 }, + { "CT\r", "", -1 }, { NULL } }; #endif /* TESTING */ @@ -120,9 +119,7 @@ static testing_t zinto_testing[] = { /* Subdriver-specific initups */ static void zinto_initups(void) { - blazer_initups(zinto_qx2nut); - } /* Subdriver interface */ diff --git a/drivers/openups-hid.c b/drivers/openups-hid.c index 69a4a61..bfe386f 100644 --- a/drivers/openups-hid.c +++ b/drivers/openups-hid.c @@ -26,17 +26,53 @@ #include "main.h" /* for getval() */ #include "usb-common.h" -#define OPENUPS_HID_VERSION "openUPS HID 0.1" +#define OPENUPS_HID_VERSION "openUPS HID 0.4" /* Minibox */ #define OPENUPS_VENDORID 0x04d8 +/* constants for converting HID read values to real values */ +static const double vin_scale_d004 = 0.03545 * 100; +static const double vout_scale_d004 = 0.02571 * 100; +/* static const double vbat_scale = 0.00857 * 100; */ +static const double ccharge_scale_d004 = 0.8274 / 10; +static const double cdischarge_scale_d004 = 16.113 / 10; + +static double vin_scale = 1; +static double vout_scale= 1; +static double ccharge_scale = 1; +static double cdischarge_scale = 1; + static char openups_scratch_buf[20]; +static void *get_voltage_multiplier(USBDevice_t *device) +{ + + switch(device->ProductID) { + case 0xd004: + vin_scale = vin_scale_d004; + vout_scale= vout_scale_d004; + ccharge_scale= ccharge_scale_d004; + cdischarge_scale= cdischarge_scale_d004; + break; + case 0xd005: + vin_scale = 0.1; + vout_scale = 0.1; + ccharge_scale = 0.1; /* unverified */ + cdischarge_scale = 0.1; /* unverified */ + break; + } + + upsdebugx(1, "vin_scale = %g; vout_scale = %g\n", vin_scale, vout_scale); + return NULL; +} + + /* USB IDs device table */ -static usb_device_id_t openups_usb_device_table[] = { +static /* const */ usb_device_id_t openups_usb_device_table[] = { /* openUPS Intelligent UPS (minimum required firmware 1.4) */ - {USB_DEVICE(OPENUPS_VENDORID, 0xd004), NULL}, + {USB_DEVICE(OPENUPS_VENDORID, 0xd004), get_voltage_multiplier}, + {USB_DEVICE(OPENUPS_VENDORID, 0xd005), get_voltage_multiplier}, /* Terminating entry */ {-1, -1, NULL} @@ -45,7 +81,7 @@ static usb_device_id_t openups_usb_device_table[] = { /* Thermistor table used for temperature lookups * taken from the windows monitoring application */ -static unsigned int therm_tbl[] = +static const unsigned int therm_tbl[] = { (unsigned int)0x31, (unsigned int)0x40, @@ -83,7 +119,7 @@ static unsigned int therm_tbl[] = (unsigned int)0x3CC }; -static unsigned int therm_tbl_size = sizeof(therm_tbl)/sizeof(therm_tbl[0]); +static const unsigned int therm_tbl_size = sizeof(therm_tbl)/sizeof(therm_tbl[0]); static const char *openups_charging_fun(double value); static const char *openups_discharging_fun(double value); @@ -225,7 +261,7 @@ static const char *openups_temperature_fun(double value) unsigned int d1 = therm_tbl[pos]; unsigned int d2 = therm_tbl[pos + 1]; - float temp = (float) (thermistor - d1) * (t2 - t1) / (d2 - d1) + t1; + double temp = (double) (thermistor - d1) * (t2 - t1) / (d2 - d1) + t1; snprintf(openups_scratch_buf, sizeof(openups_scratch_buf), "%.2f", temp); } } diff --git a/drivers/openups-hid.h b/drivers/openups-hid.h index c87b3d1..ee8e06e 100644 --- a/drivers/openups-hid.h +++ b/drivers/openups-hid.h @@ -26,12 +26,7 @@ #include "usbhid-ups.h" -/* constants for converting HID read values to real values */ -static const float vin_scale = 0.03545 * 100; -static const float vout_scale = 0.02571 * 100; -static const float vbat_scale = 0.00857 * 100; -static const float ccharge_scale = 0.8274 / 10; -static const float cdischarge_scale = 16.113 / 10; +/* Don't put non-extern definitions here - this file gets included by usbhid-ups.c */ extern subdriver_t openups_subdriver; diff --git a/drivers/powercom-hid.c b/drivers/powercom-hid.c index 3f76057..fbe6332 100644 --- a/drivers/powercom-hid.c +++ b/drivers/powercom-hid.c @@ -25,7 +25,7 @@ #include "powercom-hid.h" #include "usb-common.h" -#define POWERCOM_HID_VERSION "PowerCOM HID 0.4" +#define POWERCOM_HID_VERSION "PowerCOM HID 0.5" /* FIXME: experimental flag to be put in upsdrv_info */ /* PowerCOM */ @@ -45,6 +45,7 @@ static usb_device_id_t powercom_usb_device_table[] = { { USB_DEVICE(POWERCOM_VENDORID, 0x00a6), NULL }, /* PowerCOM Vanguard and BNT-xxxAP */ { USB_DEVICE(POWERCOM_VENDORID, 0x0004), NULL }, + { USB_DEVICE(POWERCOM_VENDORID, 0x0001), NULL }, /* Terminating entry */ { -1, -1, NULL } @@ -130,12 +131,160 @@ static info_lkp_t powercom_beeper_info[] = { { 0, NULL, NULL } }; +static const char *powercom_voltage_conversion_fun(double value) +{ + static char buf[20]; + snprintf(buf, sizeof(buf), "%0.0f", value * 4); + return buf; +} + +static info_lkp_t powercom_voltage_conversion[] = { + { 0, NULL, powercom_voltage_conversion_fun } +}; + +static const char *powercom_upsfail_conversion_fun(double value) +{ + if ((long)value & 0x0001) { + return "fanfail"; + } else { + return "!fanfail"; + } +} + +static info_lkp_t powercom_upsfail_conversion[] = { + { 0, NULL, powercom_upsfail_conversion_fun } +}; + +static const char *powercom_replacebatt_conversion_fun(double value) +{ + if ((long)value & 0x0002) { + return "replacebatt"; + } else { + return "!replacebatt"; + } +} + +static info_lkp_t powercom_replacebatt_conversion[] = { + { 0, NULL, powercom_replacebatt_conversion_fun } +}; + +static const char *powercom_test_conversion_fun(double value) +{ + if ((long)value & 0x0004) { + return "cal"; + } else { + return "!cal"; + } +} + +static info_lkp_t powercom_test_conversion[] = { + { 0, NULL, powercom_test_conversion_fun } +}; + +static const char *powercom_shutdownimm_conversion_fun(double value) +{ + if ((long)value & 0x0010) { + return "shutdownimm"; + } else { + return "!shutdownimm"; + } +} + +static info_lkp_t powercom_shutdownimm_conversion[] = { + { 0, NULL, powercom_shutdownimm_conversion_fun } +}; + +static const char *powercom_online_conversion_fun(double value) +{ + if ((long)value & 0x0001) { + return "!online"; + } else { + return "online"; + } +} + +static info_lkp_t powercom_online_conversion[] = { + { 0, NULL, powercom_online_conversion_fun } +}; + +static const char *powercom_lowbatt_conversion_fun(double value) +{ + if ((long)value & 0x0002) { + return "lowbatt"; + } else { + return "!lowbatt"; + } +} + +static info_lkp_t powercom_lowbatt_conversion[] = { + { 0, NULL, powercom_lowbatt_conversion_fun } +}; + +static const char *powercom_trim_conversion_fun(double value) +{ + if (((long)value & 0x0018) == 0x0008) { + return "trim"; + } else { + return "!trim"; + } +} + +static info_lkp_t powercom_trim_conversion[] = { + { 0, NULL, powercom_trim_conversion_fun } +}; + +static const char *powercom_boost_conversion_fun(double value) +{ + if (((long)value & 0x0018) == 0x0018) { + return "boost"; + } else { + return "!boost"; + } +} + +static info_lkp_t powercom_boost_conversion[] = { + { 0, NULL, powercom_boost_conversion_fun } +}; + +static const char *powercom_overload_conversion_fun(double value) +{ + if ((long)value & 0x0020) { + return "overload"; + } else { + return "!overload"; + } +} + +static info_lkp_t powercom_overload_conversion[] = { + { 0, NULL, powercom_overload_conversion_fun } +}; + /* --------------------------------------------------------------- */ /* Vendor-specific usage table */ /* --------------------------------------------------------------- */ /* POWERCOM usage table */ static usage_lkp_t powercom_usage_lkp[] = { + { "PowercomUPS", 0x00020004 }, + { "PowercomBatterySystem", 0x00020010 }, + { "PowercomPowerConverter", 0x00020016 }, + { "PowercomInput", 0x0002001a }, + { "PowercomOutput", 0x0002001c }, + { "PowercomVoltage", 0x00020030 }, + { "PowercomFrequency", 0x00020032 }, + { "PowercomPercentLoad", 0x00020035 }, + { "PowercomTemperature", 0x00020036 }, + { "PowercomDelayBeforeStartup", 0x00020056 }, + { "PowercomDelayBeforeShutdown", 0x00020057 }, + { "PowercomTest", 0x00020058 }, + { "PowercomShutdownRequested", 0x00020068 }, + { "PowercomInternalChargeController", 0x00020081 }, + { "PowercomPrimaryBatterySupport", 0x00020082 }, + { "PowercomDesignCapacity", 0x00020083 }, + { "PowercomSpecificationInfo", 0x00020084 }, + { "PowercomManufacturerDate", 0x00020085 }, + { "PowercomSerialNumber", 0x00020086 }, + { "PowercomManufacturerName", 0x00020087 }, { "POWERCOM1", 0x0084002f }, { "POWERCOM2", 0xff860060 }, { "POWERCOM3", 0xff860080 }, @@ -268,6 +417,56 @@ static hid_info_t powercom_hid2nut[] = { { "shutdown.return", 0, 0, "UPS.PowerSummary.PCMDelayBeforeShutdown", NULL, NULL, HU_TYPE_CMD, powercom_shutdown_info }, { "shutdown.stayoff", 0, 0, "UPS.PowerSummary.PCMDelayBeforeShutdown", NULL, NULL, HU_TYPE_CMD, powercom_stayoff_info }, + { "ups.serial", 0, 0, "PowercomUPS.PowercomSerialNumber", NULL, "%s", 0, stringid_conversion }, + { "ups.mfr", 0, 0, "PowercomUPS.PowercomManufacturerName", NULL, "%s", 0, stringid_conversion }, +/* { "UPS.DesignCapacity", 0, 0, "PowercomUPS.PowercomDesignCapacity", NULL, "%.0f", 0, NULL }, is always 255 */ + { "ups.mfr.date", 0, 0, "PowercomUPS.PowercomManufacturerDate", NULL, "%s", 0, date_conversion }, + { "battery.temperature", 0, 0, "PowercomUPS.PowercomBatterySystem.PowercomTemperature", NULL, "%.0f", 0, NULL }, + { "battery.charge", 0, 0, "PowercomUPS.PowercomBatterySystem.PowercomVoltage", NULL, "%.0f", 0, NULL }, +/* { "UPS.BatterySystem.SpecificationInfo", 0, 0, "PowercomUPS.PowercomBatterySystem.PowercomSpecificationInfo", NULL, "%.0f", 0, NULL }, */ + { "input.frequency", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomInput.PowercomFrequency", NULL, "%.0f", 0, NULL }, + { "input.voltage", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomInput.PowercomVoltage", NULL, "%.0f", 0, powercom_voltage_conversion }, + { "output.voltage", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomVoltage", NULL, "%.0f", 0, powercom_voltage_conversion }, + { "ups.load", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPercentLoad", NULL, "%.0f", 0, NULL }, + /* flags: 4 - Testing, 8 - Probably mute (it's set on battery with muted beeper and sometimes during ups test) + * bit 0 UPS fault (1 = FAILT) + * bit 1 Battery status (1 = BAD, 0 = NORMAL) + * bit 2 Test mode (1 = TEST, 0 = NORMAL) + * bit 3 X + * bit 4 Pre-SD count mode (1 = ACTIVE) + * bit 5 Schedule count mode (1 = ACTIVE) + * bit 6 Disable NO LOAD SHUTDOWN (1 = ACTIVE) + * bit 7 0 + */ +/* { "UPS.PowerConverter.Output.InternalChargeController", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, "%.0f", 0, NULL }, */ + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_upsfail_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_replacebatt_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_test_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomInternalChargeController", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_shutdownimm_conversion }, + /* flags: 1 - On battery, 2 - Low Battery, 8 - Trim, 8+16 - Boost + * bit 0 is line fail (1 = INV, 0 = LINE) + * bit 1 is low battery (1 = BAT_ LOW, 0 = NORMAL) + * bit 2 X + * bit 3 AVR status (1 = AVR, 0 = NO_AVR) + * bit 4 AVR mode (1 = BOOST, 0 = BUCK) + * bit 5 Load status (1 = OVER LOAD, 0 = NORMAL) + * bit 6 X + * bit 7 SD mode display + */ +/* { "UPS.PowerConverter.Output.PrimaryBatterySupport", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, "%.0f", 0, NULL }, */ + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_online_conversion }, + /* Low battery status may not work */ + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_lowbatt_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_trim_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_boost_conversion }, + { "BOOL", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomPrimaryBatterySupport", NULL, NULL, HU_FLAG_QUICK_POLL, powercom_overload_conversion }, + { "output.frequency", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomOutput.PowercomFrequency", NULL, "%.0f", 0, NULL }, + { "ups.test.result", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomTest", NULL, "%s", 0, test_read_info }, +/* { "UPS.PowerConverter.ShutdownRequested", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomShutdownRequested", NULL, "%.0f", 0, NULL }, */ + { "ups.delay.shutdown", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomDelayBeforeShutdown", NULL, "%.0f", 0, NULL }, + { "ups.delay.start", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomDelayBeforeStartup", NULL, "%.0f", 0, NULL }, + { "load.off", 0, 0, "PowercomUPS.PowercomPowerConverter.PowercomDelayBeforeShutdown", NULL, "0", HU_TYPE_CMD, NULL }, + /* end of structure. */ { NULL, 0, 0, NULL, NULL, NULL, 0, NULL } }; @@ -307,6 +506,10 @@ static int powercom_claim(HIDDevice_t *hd) return 0; case SUPPORTED: + if (hd->ProductID == 0x0001) { + interrupt_only = 1; + interrupt_size = 8; + } return 1; case NOT_SUPPORTED: diff --git a/drivers/powercom.c b/drivers/powercom.c index 62d8683..573a234 100644 --- a/drivers/powercom.c +++ b/drivers/powercom.c @@ -64,6 +64,11 @@ * - Added support for OptiUPS VS 575C * This probably also works with others, but I don't have their model numbers. * + * rev 0.15: VSE NN + * - Fixed UPS type assignment for Powercom Imperial USB series manufactured since 2009. + * + * Tested on: IMP-625AP + * */ #include "main.h" @@ -908,17 +913,24 @@ void upsdrv_initups(void) if (!ups_getinfo()) return; /* Give "BNT-other" a chance! */ if (raw_data[MODELNAME]==0x42 || raw_data[MODELNAME]==0x4B || raw_data[MODELNAME]==0x4F){ - model=BNTmodels[raw_data[MODELNUMBER]/16]; - if (!strcmp(types[type].name, "BNT-other")) - types[type].name="BNT-other"; - else if (raw_data[MODELNAME]==0x42) - types[type].name="BNT"; - else if (raw_data[MODELNAME]==0x4B){ - types[type].name="KIN"; - model=KINmodels[raw_data[MODELNUMBER]/16]; - } else if (raw_data[MODELNAME]==0x4F){ - types[type].name="OPTI"; - model=OPTImodels[raw_data[MODELNUMBER]/16]; + /* Give "IMP" a chance also! */ + if (raw_data[UPSVERSION]==0xFF){ + types[type].name="IMP"; + model=IMPmodels[raw_data[MODELNUMBER]/16]; + } + else { + model=BNTmodels[raw_data[MODELNUMBER]/16]; + if (!strcmp(types[type].name, "BNT-other")) + types[type].name="BNT-other"; + else if (raw_data[MODELNAME]==0x42) + types[type].name="BNT"; + else if (raw_data[MODELNAME]==0x4B){ + types[type].name="KIN"; + model=KINmodels[raw_data[MODELNUMBER]/16]; + } else if (raw_data[MODELNAME]==0x4F){ + types[type].name="OPTI"; + model=OPTImodels[raw_data[MODELNUMBER]/16]; + } } } else if (raw_data[UPSVERSION]==0xFF){ diff --git a/drivers/powerware-mib.c b/drivers/powerware-mib.c index 33a5eb2..54b3628 100644 --- a/drivers/powerware-mib.c +++ b/drivers/powerware-mib.c @@ -1,9 +1,10 @@ /* powerware-mib.c - data to monitor Powerware UPS with NUT * (using MIBs described in stdupsv1.mib and Xups.mib) * - * Copyright (C) 2005-2006 - * Olli Savia - * Niels Baggesen + * Copyright (C) + * 2005-2006 Olli Savia + * 2005-2006 Niels Baggesen + * 2015 Arnaud Quette * * 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 @@ -24,7 +25,7 @@ #include "powerware-mib.h" -#define PW_MIB_VERSION "0.6.2" +#define PW_MIB_VERSION "0.7" /* TODO: more sysOID and MIBs support: * @@ -134,6 +135,7 @@ static info_lkp_t pw_mode_info[] = { { 0, "NULL" } }; +/* Legacy implementation */ static info_lkp_t pw_battery_abm_status[] = { { 1, "CHRG" }, { 2, "DISCHRG" }, @@ -143,13 +145,13 @@ static info_lkp_t pw_battery_abm_status[] = { { 0, "NULL" } } ; -static info_lkp_t pw_batt_info[] = { - { 1, "" }, - { 2, "" }, - { 3, "Battery Floating" }, /* battery floating - can we put that stuff somewhere so one actually access that information? */ - { 4, "Battery Resting" }, /* battery resting - could come handy if support asks what - state the batteries are in... pw_batt_info doesn't get used */ - { 5, "unknown" }, /* unknown */ +static info_lkp_t eaton_abm_status_info[] = { + { 1, "charging" }, + { 2, "discharging" }, + { 3, "floating" }, + { 4, "resting" }, + { 5, "unknown" }, /* Undefined - ABM is not activated */ + { 6, "disabled" }, /* ABM Charger Disabled */ { 0, "NULL" } }; @@ -200,8 +202,8 @@ static snmp_info_t pw_mib[] = { 0, NULL }, { "ups.test.result", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_BATTEST_RES, "", 0, &pw_batt_test_info[0] }, - { "vendor.specific.abmstatus", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_BATT_STATUS, "", - SU_STATUS_BATT, &pw_batt_info[0] }, + { "battery.charger.status", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_BATT_STATUS, "", + SU_STATUS_BATT, &eaton_abm_status_info[0] }, /* Battery page */ { "battery.charge", 0, 1.0, PW_OID_BATT_CHARGE, "", diff --git a/drivers/riello_ser.c b/drivers/riello_ser.c index b76be96..9ee779d 100644 --- a/drivers/riello_ser.c +++ b/drivers/riello_ser.c @@ -37,7 +37,7 @@ #include "riello.h" #define DRIVER_NAME "Riello serial driver" -#define DRIVER_VERSION "0.02" +#define DRIVER_VERSION "0.03" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -188,12 +188,13 @@ int get_ups_nominal() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get nominal Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get nominal Ko: command not supported"); - return 1; + return -1; } upsdebugx (3, "Get nominal Ok: received byte %u", buf_ptr_length); @@ -227,12 +228,13 @@ int get_ups_status() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get status Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get status Ko: command not supported"); - return 1; + return -1; } upsdebugx (3, "Get status Ok: received byte %u", buf_ptr_length); @@ -259,12 +261,13 @@ int get_ups_extended() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get extended Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* optonal */ if (!wait_packet && foundnak) { upsdebugx (3, "Get extended Ko: command not supported"); - return 1; + return 0; } upsdebugx (3, "Get extended Ok: received byte %u", buf_ptr_length); @@ -291,12 +294,13 @@ int get_ups_statuscode() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get statuscode Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* optional */ if (!wait_packet && foundnak) { upsdebugx (3, "Get statuscode Ko: command not supported"); - return 1; + return 0; } upsdebugx (3, "Get statuscode Ok: received byte %u", buf_ptr_length); @@ -333,12 +337,13 @@ int get_ups_sentr() if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get sentry Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get sentry Ko: command not supported"); - return 1; + return -1; } upsdebugx (3, "Get sentry Ok: received byte %u", buf_ptr_length); @@ -359,68 +364,74 @@ int riello_instcmd(const char *cmdname, const char *extra) delay = 0; riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cs(bufOut, gpser_error_control, delay); else length = riello_prepare_shutsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.off communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.off Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.off Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.off Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.off Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.off Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.off.delay")) { - delay_char = dstate_getinfo("ups.delay.shutdown"); + delay_char = dstate_getinfo("ups.delay.shutdown"); delay = atoi(delay_char); riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cs(bufOut, gpser_error_control, delay); else length = riello_prepare_shutsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.off delay communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.off.delay Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.off.delay Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.off.delay Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.off.delay Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.off delay Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.on")) { delay = 0; riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cr(bufOut, gpser_error_control, delay); else { length = riello_prepare_setrebsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.on communication error"); return STAT_INSTCMD_FAILED; + } riello_serialcomm(&bufIn[0], typeRielloProtocol); if (!wait_packet && foundbadcrc) { @@ -436,169 +447,184 @@ int riello_instcmd(const char *cmdname, const char *extra) length = riello_prepare_rebsentr(bufOut, delay); } - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.on communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.on Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.on Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.on.delay")) { - delay_char = dstate_getinfo("ups.delay.reboot"); + delay_char = dstate_getinfo("ups.delay.reboot"); delay = atoi(delay_char); riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cr(bufOut, gpser_error_control, delay); else { - length = riello_prepare_setrebsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + length = riello_prepare_setrebsentr(bufOut, delay); + + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.on delay communication error"); return STAT_INSTCMD_FAILED; + } riello_serialcomm(&bufIn[0], typeRielloProtocol); if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); + upsdebugx (3, "Command load.on delay Ko: bad CRC or Checksum"); return STAT_INSTCMD_FAILED; } if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on Ko: command not supported"); + upsdebugx (3, "Command load.on delay Ko: command not supported"); return STAT_INSTCMD_FAILED; } length = riello_prepare_rebsentr(bufOut, delay); } - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command load.on delay communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on.delay Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on.delay Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.on.delay Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.on.delay Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.on delay Ok"); + return STAT_INSTCMD_HANDLED; } } else { if (!strcasecmp(cmdname, "shutdown.return")) { - delay_char = dstate_getinfo("ups.delay.shutdown"); + delay_char = dstate_getinfo("ups.delay.shutdown"); delay = atoi(delay_char); riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cs(bufOut, gpser_error_control, delay); else length = riello_prepare_shutsentr(bufOut, delay); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command shutdown.return communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command shutdown.return Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command shutdown.return Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command shutdown.return Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command shutdown.return Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command shutdown.return Ok"); + return STAT_INSTCMD_HANDLED; } } if (!strcasecmp(cmdname, "shutdown.stop")) { riello_init_serial(); - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_cd(bufOut, gpser_error_control); else length = riello_prepare_cancelsentr(bufOut); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command shutdown.stop communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command shutdown.stop Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command shutdown.stop Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command shutdown.stop Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command shutdown.stop Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command shutdown.stop Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "test.panel.start")) { riello_init_serial(); length = riello_prepare_tp(bufOut, gpser_error_control); - if (ser_send_buf(upsfd, bufOut, length) == 0) + + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command test.panel.start communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], DEV_RIELLOGPSER); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command panel.start Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command panel.start Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], DEV_RIELLOGPSER); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command test.panel.start Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command test.panel.start Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command test.panel.start Ok"); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "test.battery.start")) { riello_init_serial(); - - if (typeRielloProtocol == DEV_RIELLOGPSER) + if (typeRielloProtocol == DEV_RIELLOGPSER) length = riello_prepare_tb(bufOut, gpser_error_control); else length = riello_prepare_tbsentr(bufOut); - if (ser_send_buf(upsfd, bufOut, length) == 0) + if (ser_send_buf(upsfd, bufOut, length) == 0) { + upsdebugx (3, "Command test.battery.start communication error"); return STAT_INSTCMD_FAILED; - else { - riello_serialcomm(&bufIn[0], typeRielloProtocol); - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command battery.start Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - - if (!wait_packet && foundnak) { - upsdebugx (3, "Command battery.start Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; } + + riello_serialcomm(&bufIn[0], typeRielloProtocol); + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command battery.start Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command battery.start Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command test.battery.start Ok"); + return STAT_INSTCMD_HANDLED; } upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); @@ -737,37 +763,40 @@ void upsdrv_updateinfo(void) { uint8_t getextendedOK; static int countlost = 0; + int stat; - if (countlost < COUNTLOST) + upsdebugx(1, "countlost %d",countlost); + + if (countlost > 0){ upsdebugx(1, "Communication with UPS is lost: status read failed!"); - else if (countlost == COUNTLOST) - upslogx(LOG_WARNING, "Communication with UPS is lost: status read failed!"); - else - dstate_datastale(); - - if (typeRielloProtocol == DEV_RIELLOGPSER) { - if (get_ups_status() != 0) { - if (countlost <= COUNTLOST) - countlost++; - return; - } + if (countlost == COUNTLOST) { + dstate_datastale(); + upslogx(LOG_WARNING, "Communication with UPS is lost: status read failed!"); + } + } + + if (typeRielloProtocol == DEV_RIELLOGPSER) + stat = get_ups_status(); + else + stat = get_ups_sentr(); + + if (stat < 0) { + if (countlost < COUNTLOST) + countlost++; + return; + } + + if (typeRielloProtocol == DEV_RIELLOGPSER) { if (get_ups_extended() == 0) getextendedOK = 1; else getextendedOK = 0; } - else { - if (get_ups_sentr() != 0) { - if (countlost <= COUNTLOST) - countlost++; - return; - } - else - getextendedOK = 1; - } + else + getextendedOK = 1; - if (countlost > COUNTLOST) + if (countlost == COUNTLOST) upslogx(LOG_NOTICE, "Communication with UPS is re-established!"); dstate_setinfo("input.frequency", "%.2f", DevData.Finp/10.0); diff --git a/drivers/riello_usb.c b/drivers/riello_usb.c index 89909da..34b319a 100644 --- a/drivers/riello_usb.c +++ b/drivers/riello_usb.c @@ -33,7 +33,7 @@ #include "riello.h" #define DRIVER_NAME "Riello USB driver" -#define DRIVER_VERSION "0.02" +#define DRIVER_VERSION "0.03" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -105,14 +105,14 @@ static int cypress_setfeatures() return ret; } -uint8_t Send_USB_Packet(uint8_t *send_str, uint16_t numbytes) +int Send_USB_Packet(uint8_t *send_str, uint16_t numbytes) { uint8_t USB_buff_pom[10]; int i, err, size, errno; /* is input correct ? */ if ((!send_str) || (!numbytes)) - return 1; + return -1; size = 7; @@ -130,11 +130,8 @@ uint8_t Send_USB_Packet(uint8_t *send_str, uint16_t numbytes) err = usb_bulk_write(udev, 0x2, (char*) USB_buff_pom, 8, 1000); if (err < 0) { - if (err==-13 || errno==19) - upsdebugx(3, "USB device disconnected !"); - else - upsdebugx(3, "USB: Send_USB_Packet: send_usb_packet, err = %08x %s ", err, strerror(errno)); - return 2; + upsdebugx(3, "USB: Send_USB_Packet: send_usb_packet, err = %d %s ", err, strerror(errno)); + return err; } ussleep(USB_WRITE_DELAY); } @@ -163,18 +160,15 @@ uint8_t Send_USB_Packet(uint8_t *send_str, uint16_t numbytes) err = usb_bulk_write(udev, 0x2, (char*) USB_buff_pom, 8, 1000); if (err < 0) { - if (err==-13 || errno==19) - upsdebugx(3, "USB device disconnected !"); - else - upsdebugx(3, "USB: Send_USB_Packet: send_usb_packet, err = %08x %s ", err, strerror(errno)); - return 2; + upsdebugx(3, "USB: Send_USB_Packet: send_usb_packet, err = %d %s ", err, strerror(errno)); + return err; } ussleep(USB_WRITE_DELAY); } return (0); } -uint8_t Get_USB_Packet(uint8_t *buffer) +int Get_USB_Packet(uint8_t *buffer) { char inBuf[10]; int err, size, errno, ep; @@ -185,23 +179,12 @@ uint8_t Get_USB_Packet(uint8_t *buffer) ep = 0x81 | USB_ENDPOINT_IN; err = usb_bulk_read(udev, ep, (char*) inBuf, size, 1000); - upsdebugx(3, "read: %02X %02X %02X %02X %02X %02X %02X %02X", inBuf[0], inBuf[1], inBuf[2], inBuf[3], inBuf[4], inBuf[5], inBuf[6], inBuf[7]); - - if (err == 0) { - if (err==-13 || err==-19 || errno==19) - upsdebugx(3, "USB device disconnected !"); - else { - switch (errno) { - case 11: /* resource temp. not available */ - case 16: /* device busy */ - /* ignore it */ - break; - default: - upsdebugx(3, "USB: Get_USB_Packet: send_usb_packet, err = %08x %s ", err, strerror(errno)); - break; - } - } - return (0); + if (err > 0) + upsdebugx(3, "read: %02X %02X %02X %02X %02X %02X %02X %02X", inBuf[0], inBuf[1], inBuf[2], inBuf[3], inBuf[4], inBuf[5], inBuf[6], inBuf[7]); + + if (err < 0){ + upsdebugx(3, "USB: Get_USB_Packet: send_usb_packet, err = %d %s ", err, strerror(errno)); + return err; } /* copy to buffer */ @@ -214,18 +197,18 @@ uint8_t Get_USB_Packet(uint8_t *buffer) static int cypress_command(uint8_t *buffer, uint8_t *buf, uint16_t length, uint16_t buflen) { + int loop = 0; int ret, i = 0; uint8_t USB_buff[BUFFER_SIZE]; /* read to flush buffer */ -/* ret = Get_USB_Packet(buf+i);*/ riello_init_serial(); /* send packet */ ret = Send_USB_Packet(buffer, length); - if (ret > 0) { - upsdebugx(3, "send: %s", ret ? usb_strerror() : "timeout"); + if (ret < 0) { + upsdebugx(3, "Cypress_command send: err %d", ret ); return ret; } @@ -243,7 +226,7 @@ static int cypress_command(uint8_t *buffer, uint8_t *buf, uint16_t length, uint1 * will happen after successfully writing a command to the UPS) */ if (ret < 0) { - upsdebugx(3, "read: %s", ret ? usb_strerror() : "timeout"); + upsdebugx(3, "Cypress_command read: err %d", ret ); return ret; } @@ -251,6 +234,14 @@ static int cypress_command(uint8_t *buffer, uint8_t *buf, uint16_t length, uint1 commbyte = USB_buff[i]; riello_parse_serialport(DEV_RIELLOGPSER, buf, gpser_error_control); } + + loop++; + if (loop>300){ + wait_packet=0; + upsdebugx(1, "wait_packet reset"); + } + + ussleep(10); } upsdebugx(3, "in read: %u", buf_ptr_length); @@ -302,6 +293,30 @@ static USBDeviceMatcher_t device_matcher = { }; +/* + * Callback that is called by usb_device_open() that handles USB device + * settings prior to accepting the devide. At the very least claim the + * device here. Detaching the kernel driver will be handled by the + * caller, don't do this here. Return < 0 on error, 0 or higher on + * success. + */ +static int driver_callback(usb_dev_handle *handle, USBDevice_t *device, unsigned char *rdbuf, int rdlen) +{ + /*if (usb_set_configuration(handle, 1) < 0) { + upslogx(LOG_WARNING, "Can't set USB configuration: %s", usb_strerror()); + return -1; + } */ + + if (usb_claim_interface(handle, 0) < 0) { + upslogx(LOG_WARNING, "Can't claim USB interface: %s", usb_strerror()); + return -1; + } + + /* TODO: HID SET_IDLE to 0 (not necessary?) */ + + return 1; +} + /* * Generic command processing function. Send a command and read a reply. * Returns < 0 on error, 0 on timeout and the number of bytes read on @@ -312,18 +327,23 @@ int riello_command(uint8_t *cmd, uint8_t *buf, uint16_t length, uint16_t buflen) int ret; if (udev == NULL) { - ret = usb->open(&udev, &usbdevice, reopen_matcher, NULL); + ret = usb->open(&udev, &usbdevice, reopen_matcher, &driver_callback); - if (ret < 1) { + upsdebugx (3, "riello_command err udev NULL : %d ", ret); + if (ret < 0) return ret; - } + + upsdrv_initinfo(); //reconekt usb cable } ret = (*subdriver_command)(cmd, buf, length, buflen); if (ret >= 0) { + upsdebugx (3, "riello_command ok: %u", ret); return ret; } + upsdebugx (3, "riello_command err: %d", ret); + switch (ret) { case -EBUSY: /* Device or resource busy */ @@ -354,37 +374,49 @@ int riello_command(uint8_t *cmd, uint8_t *buf, uint16_t length, uint16_t buflen) break; case -ETIMEDOUT: /* Connection timed out */ + upsdebugx (3, "riello_command err: Resource temporarily unavailable"); + + case -EOVERFLOW: /* Value too large for defined data type */ #ifdef EPROTO case -EPROTO: /* Protocol error */ #endif + break; default: break; } + return ret; } int get_ups_nominal() { - uint8_t recv, length; + uint8_t length; + int recv; length = riello_prepare_gn(&bufOut[0], gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_GN); + if (recv < 0){ + upsdebugx (3, "Get nominal err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get nominal Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get nominal Ko: command not supported"); - return 1; + return -1; } - upsdebugx (3, "Get nominal Ok: read byte: %u", recv); + upsdebugx (3, "Get nominal Ok: read byte: %d", recv); riello_parse_gn(&bufIn[0], &DevData); @@ -393,7 +425,8 @@ int get_ups_nominal() int get_ups_status() { - uint8_t recv, numread, length; + uint8_t numread, length; + int recv; length = riello_prepare_rs(&bufOut[0], gpser_error_control); @@ -406,17 +439,23 @@ int get_ups_status() recv = riello_command(&bufOut[0], &bufIn[0], length, numread); + if (recv < 0){ + upsdebugx (3, "Get status err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get status Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* mandatory */ if (!wait_packet && foundnak) { upsdebugx (3, "Get status Ko: command not supported"); - return 1; + return -1; } - upsdebugx (3, "Get status Ok: read byte: %u", recv); + upsdebugx (3, "Get status Ok: read byte: %d", recv); riello_parse_rs(&bufIn[0], &DevData, numread); @@ -425,23 +464,30 @@ int get_ups_status() int get_ups_extended() { - uint8_t recv, length; + uint8_t length; + int recv; length = riello_prepare_re(&bufOut[0], gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_RE); + if (recv < 0){ + upsdebugx (3, "Get extended err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get extended Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* optional */ if (!wait_packet && foundnak) { upsdebugx (3, "Get extended Ko: command not supported"); - return 1; + return 0; } - upsdebugx (3, "Get extended Ok: read byte: %u", recv); + upsdebugx (3, "Get extended Ok: read byte: %d", recv); riello_parse_re(&bufIn[0], &DevData); @@ -450,23 +496,30 @@ int get_ups_extended() int get_ups_statuscode() { - uint8_t recv, length; + uint8_t length; + int recv; length = riello_prepare_rc(&bufOut[0], gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_RC); + if (recv < 0){ + upsdebugx (3, "Get statuscode err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get statuscode Ko: bad CRC or Checksum"); - return 1; + return -1; } + /* optional */ if (!wait_packet && foundnak) { upsdebugx (3, "Get statuscode Ko: command not supported"); - return 1; + return 0; } - upsdebugx (3, "Get statuscode Ok: read byte: %u", recv); + upsdebugx (3, "Get statuscode Ok: read byte: %d", recv); riello_parse_rc(&bufIn[0], &DevData); @@ -475,7 +528,8 @@ int get_ups_statuscode() int riello_instcmd(const char *cmdname, const char *extra) { - uint8_t length, recv; + uint8_t length; + int recv; uint16_t delay; const char *delay_char; @@ -483,175 +537,201 @@ int riello_instcmd(const char *cmdname, const char *extra) if (!strcasecmp(cmdname, "load.off")) { delay = 0; + length = riello_prepare_cs(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.off Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.off Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command load.off err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.off Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.off Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.off Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.off.delay")) { - delay_char = dstate_getinfo("ups.delay.shutdown"); + delay_char = dstate_getinfo("ups.delay.shutdown"); delay = atoi(delay_char); length = riello_prepare_cs(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.off.delay Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.off.delay Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command load.off.delay err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.off.delay Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.off.delay Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.off.delay Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.on")) { delay = 0; + length = riello_prepare_cr(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command load.on err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.on Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.on Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.on Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "load.on.delay")) { - delay_char = dstate_getinfo("ups.delay.reboot"); + delay_char = dstate_getinfo("ups.delay.reboot"); delay = atoi(delay_char); length = riello_prepare_cr(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command load.on.delay Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command load.on.delay Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command load.on.delay err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command load.on.delay Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command load.on.delay Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command load.on.delay Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } } else { if (!strcasecmp(cmdname, "shutdown.return")) { - delay_char = dstate_getinfo("ups.delay.shutdown"); + delay_char = dstate_getinfo("ups.delay.shutdown"); delay = atoi(delay_char); length = riello_prepare_cs(bufOut, gpser_error_control, delay); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command shutdown.return Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command shutdown.return Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command shutdown.return err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command shutdown.return Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command shutdown.return Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command shutdown.return Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } } if (!strcasecmp(cmdname, "shutdown.stop")) { length = riello_prepare_cd(bufOut, gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command shutdown.stop Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command shutdown.stop Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command shutdown.stop err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command shutdown.stop Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command shutdown.stop Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command shutdown.stop Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "test.panel.start")) { length = riello_prepare_tp(bufOut, gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command test.panel.start Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command test.panel.start Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command test.panel.start err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command test.panel.start Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command test.panel.start Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command test.panel.start Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } if (!strcasecmp(cmdname, "test.battery.start")) { length = riello_prepare_tb(bufOut, gpser_error_control); recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_DEF); - if (recv > 0) { - if (!wait_packet && foundbadcrc) { - upsdebugx (3, "Command test.battery.start Ko: bad CRC or Checksum"); - return STAT_INSTCMD_FAILED; - } - if (!wait_packet && foundnak) { - upsdebugx (3, "Command test.battery.start Ko: command not supported"); - return STAT_INSTCMD_FAILED; - } - - return STAT_INSTCMD_HANDLED; - } - else + if (recv < 0) { + upsdebugx (3, "Command test.battery.start err: read byte: %d", recv); return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundbadcrc) { + upsdebugx (3, "Command test.battery.start Ko: bad CRC or Checksum"); + return STAT_INSTCMD_FAILED; + } + + if (!wait_packet && foundnak) { + upsdebugx (3, "Command test.battery.start Ko: command not supported"); + return STAT_INSTCMD_FAILED; + } + + upsdebugx (3, "Command test.battery.start Ok: read byte: %d", recv); + return STAT_INSTCMD_HANDLED; } upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname); @@ -671,6 +751,11 @@ int start_ups_comm() recv = riello_command(&bufOut[0], &bufIn[0], length, LENGTH_GI); + if (recv < 0) { + upsdebugx (3, "Get identif err: read byte: %d", recv); + return recv; + } + if (!wait_packet && foundbadcrc) { upsdebugx (3, "Get identif Ko: bad CRC or Checksum"); return 1; @@ -681,10 +766,9 @@ int start_ups_comm() return 1; } - upsdebugx (3, "Get identif Ok: read byte: %u", recv); - return 0; + return 0; } void upsdrv_help(void) @@ -755,11 +839,10 @@ void upsdrv_initups(void) fatalx(EXIT_FAILURE, "invalid regular expression: %s", regex_array[ret]); } - /* link the matchers */ regex_matcher->next = &device_matcher; - ret = usb->open(&udev, &usbdevice, regex_matcher, NULL); + ret = usb->open(&udev, &usbdevice, regex_matcher, &driver_callback); if (ret < 0) { fatalx(EXIT_FAILURE, "No supported devices found. Please check your device availability with 'lsusb'\n" @@ -894,16 +977,25 @@ void upsdrv_updateinfo(void) { uint8_t getextendedOK; static int countlost = 0; + int stat; - if (countlost < COUNTLOST) + upsdebugx(1, "countlost %d",countlost); + + if (countlost > 0){ upsdebugx(1, "Communication with UPS is lost: status read failed!"); - else if (countlost == COUNTLOST) - upslogx(LOG_WARNING, "Communication with UPS is lost: status read failed!"); - else - dstate_datastale(); - if (get_ups_status() != 0) { - if (countlost <= COUNTLOST) + if (countlost == COUNTLOST) { + dstate_datastale(); + upslogx(LOG_WARNING, "Communication with UPS is lost: status read failed!"); + } + } + + stat = get_ups_status(); + + upsdebugx(1, "get_ups_status() %d",stat ); + + if (stat < 0) { + if (countlost < COUNTLOST) countlost++; return; } @@ -913,7 +1005,7 @@ void upsdrv_updateinfo(void) else getextendedOK = 0; - if (countlost > COUNTLOST) + if (countlost == COUNTLOST) upslogx(LOG_NOTICE, "Communication with UPS is re-established!"); dstate_setinfo("input.frequency", "%.2f", DevData.Finp/10.0); @@ -963,23 +1055,23 @@ void upsdrv_updateinfo(void) /* LowBatt */ if ((riello_test_bit(&DevData.StatusCode[0], 1)) && (riello_test_bit(&DevData.StatusCode[0], 0))) - status_set("LB"); + status_set("LB"); /* Standby */ if (!riello_test_bit(&DevData.StatusCode[0], 3)) - status_set("OFF"); + status_set("OFF"); /* On Bypass */ if (riello_test_bit(&DevData.StatusCode[1], 3)) - status_set("BYPASS"); + status_set("BYPASS"); /* Overload */ if (riello_test_bit(&DevData.StatusCode[4], 2)) - status_set("OVER"); + status_set("OVER"); /* Buck */ if (riello_test_bit(&DevData.StatusCode[1], 0)) - status_set("TRIM"); + status_set("TRIM"); /* Boost */ if (riello_test_bit(&DevData.StatusCode[1], 1)) @@ -991,7 +1083,7 @@ void upsdrv_updateinfo(void) /* Charging battery */ if (riello_test_bit(&DevData.StatusCode[2], 2)) - status_set("CHRG"); + status_set("CHRG"); status_commit(); @@ -1011,7 +1103,8 @@ void upsdrv_updateinfo(void) poll_interval = 2; - countlost = 0; + countlost = 0; + /* if (get_ups_statuscode() != 0) upsdebugx(2, "Communication is lost"); else { diff --git a/drivers/solis.c b/drivers/solis.c index 78e83e0..380ecc3 100644 --- a/drivers/solis.c +++ b/drivers/solis.c @@ -40,7 +40,7 @@ #include "timehead.h" #define DRIVER_NAME "Microsol Solis UPS driver" -#define DRIVER_VERSION "0.61" +#define DRIVER_VERSION "0.62" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -610,7 +610,7 @@ static void ScanReceivePack( void ) /* Autonomy */ - if( ( Autonomy < 5 ) ) + if( Autonomy < 5 ) LowBatt = true; else LowBatt = false; @@ -618,7 +618,7 @@ static void ScanReceivePack( void ) UpsPowerFactor = 700; /* input 110V or 220v */ - if( ( InputValue == 0 ) ) { + if( InputValue == 0 ) { InDownLim = 75; InUpLim = 150; NomInVolt = 110; @@ -702,7 +702,7 @@ CommReceive(const char *bufptr, int size) int i, CheckSum, i_end; - if( ( size==25 ) ) + if( size==25 ) Waiting = 0; switch( Waiting ) @@ -727,7 +727,8 @@ CommReceive(const char *bufptr, int size) ser_flush_in(upsfd,"",0); /* clean port */ /* correct package */ - if( ( (RecPack[0] & 0xF0) == 0xA0 ) + /* 0xA0 is original solis.c; 0xB0 is for APC-branded Microsol units */ + if( ( ( (RecPack[0] & 0xF0) == 0xA0 ) || (RecPack[0] & 0xF0) == 0xB0) && ( RecPack[ 24 ] == 254 ) && ( RecPack[ 23 ] == CheckSum ) ) { @@ -742,7 +743,11 @@ CommReceive(const char *bufptr, int size) switch( SolisModel ) { - case 10: + case 10: /* Added for APC-Branded Microsol units */ + { + ScanReceivePack(); + break; + } case 11: case 12: case 13: @@ -755,6 +760,7 @@ CommReceive(const char *bufptr, int size) default: { printf( M_UNKN ); + ScanReceivePack(); // Scan anyway. break; } } @@ -884,26 +890,30 @@ static void getbaseinfo(void) switch( SolisModel ) { - case 10: + case 10: /* Added for APC-Microsol units */ + { + Model = "Back-UPS 1200 BR"; + break; + } case 11: case 12: { - strcpy(Model, "Solis 1.0"); + Model = "Solis 1.0"; break; } case 13: { - strcpy(Model, "Solis 1.5"); + Model = "Solis 1.5"; break; } case 14: { - strcpy(Model, "Solis 2.0"); + Model = "Solis 2.0"; break; } case 15: { - strcpy(Model, "Solis 3.0"); + Model = "Solis 3.0"; break; } } diff --git a/drivers/solis.h b/drivers/solis.h index 521d080..980f8d5 100644 --- a/drivers/solis.h +++ b/drivers/solis.h @@ -309,7 +309,7 @@ unsigned char DumpPack[242]; */ /* Identification */ -char Model[12]; +const char *Model; int SolisModel, imodel; int InputValue, Out220; diff --git a/drivers/tripplite_usb.c b/drivers/tripplite_usb.c index e907c12..9b06407 100644 --- a/drivers/tripplite_usb.c +++ b/drivers/tripplite_usb.c @@ -8,7 +8,7 @@ Copyright (C) 1999 Russell Kroll Copyright (C) 2001 Rickard E. (Rik) Faith Copyright (C) 2004 Nicholas J. Kain - Copyright (C) 2005-2008 Charles Lepple + Copyright (C) 2005-2008, 2014 Charles Lepple 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 @@ -125,6 +125,9 @@ * :S -- enables remote reboot/remote power on */ +/* Watchdog for 3005 is 15 - 255 seconds. + */ + #include "main.h" #include "libusb.h" #include @@ -133,7 +136,7 @@ #include "usb-common.h" #define DRIVER_NAME "Tripp Lite OMNIVS / SMARTPRO driver" -#define DRIVER_VERSION "0.20" +#define DRIVER_VERSION "0.29" /* driver description structure */ upsdrv_info_t upsdrv_info = { @@ -188,9 +191,38 @@ static enum tl_model_t { TRIPP_LITE_OMNIVS, TRIPP_LITE_OMNIVS_2001, TRIPP_LITE_SMARTPRO, - TRIPP_LITE_SMART_0004 + TRIPP_LITE_SMART_0004, + TRIPP_LITE_SMART_3005 } tl_model = TRIPP_LITE_UNKNOWN; +/*! Are the values encoded in ASCII or binary? + * TODO: Add 3004? + */ +static int is_binary_protocol() +{ + switch(tl_model) { + case TRIPP_LITE_SMART_3005: + return 1; + default: + return 0; + } +} + +/*! Is this the "SMART" family of protocols? + * TODO: Add 3004? + */ +static int is_smart_protocol() +{ + switch(tl_model) { + case TRIPP_LITE_SMARTPRO: + case TRIPP_LITE_SMART_0004: + case TRIPP_LITE_SMART_3005: + return 1; + default: + return 0; + } +} + /*!@brief If a character is not printable, return a dot. */ #define toprint(x) (isalnum((unsigned)x) ? (x) : '.') @@ -201,7 +233,7 @@ static enum tl_model_t { #define SEND_WAIT_NSEC (1000*1000*100) #define MAX_RECV_TRIES 10 -#define RECV_WAIT_MSEC 1000 /*! was 100 for OMNIVS; SMARTPRO units need longer */ +#define RECV_WAIT_MSEC 1000 /*!< was 100 for OMNIVS; SMARTPRO units need longer */ #define MAX_RECONNECT_TRIES 10 @@ -307,6 +339,36 @@ static int hex2d(const unsigned char *start, unsigned int len) return strtol((char *)buf, NULL, 16); } +/*!@brief Convert N characters from big-endian binary to decimal + * + * @param start Beginning of string to convert + * @param len Maximum number of characters to consider (max 32) + * + * @a len characters of @a start are shifted into an accumulator. + * + * We assume len < sizeof(int), and that value > 0. + * + * @return the value + */ +static unsigned int bin2d(const unsigned char *start, unsigned int len) +{ + unsigned int value = 0, index = 0; + for(index = 0; index < len; index++) { + value <<= 8; + value |= start[index]; + } + + return value; +} + +static int hex_or_bin2d(const unsigned char *start, unsigned int len) +{ + if(is_binary_protocol()) { + return bin2d(start, len); + } + return hex2d(start, len); +} + /*!@brief Dump message in both hex and ASCII * * @param[in] msg Buffer to dump @@ -349,7 +411,7 @@ enum tl_model_t decode_protocol(unsigned int proto) { switch(proto) { case 0x0004: - upslogx(3, "Using older SMART protocol (%x)", proto); + upslogx(3, "Using older SMART protocol (%04x)", proto); return TRIPP_LITE_SMART_0004; case 0x1001: upslogx(3, "Using OMNIVS protocol (%x)", proto); @@ -360,8 +422,11 @@ enum tl_model_t decode_protocol(unsigned int proto) case 0x3003: upslogx(3, "Using SMARTPRO protocol (%x)", proto); return TRIPP_LITE_SMARTPRO; + case 0x3005: + upslogx(3, "Using binary SMART protocol (%x)", proto); + return TRIPP_LITE_SMART_3005; default: - printf("Unknown protocol (%x)", proto); + printf("Unknown protocol (%04x)", proto); break; } @@ -371,7 +436,15 @@ enum tl_model_t decode_protocol(unsigned int proto) void decode_v(const unsigned char *value) { unsigned char ivn, lb; - int bv = hex2d(value+2, 2); + int bv; + + if(is_binary_protocol()) { + /* 0x00 0x0c -> 12V ? */ + battery_voltage_nominal = (value[2] << 8) | value[3]; + } else { + bv = hex2d(value+2, 2); + battery_voltage_nominal = bv * 6; + } ivn = value[1]; lb = value[4]; @@ -381,6 +454,7 @@ void decode_v(const unsigned char *value) input_voltage_scaled = 100; break; + case 2: /* protocol 3005 */ case '1': input_voltage_nominal = input_voltage_scaled = 120; break; @@ -398,16 +472,19 @@ void decode_v(const unsigned char *value) break; } - battery_voltage_nominal = bv * 6; - if( (lb >= '0') && (lb <= '9') ) { switchable_load_banks = lb - '0'; } else { - if( lb != 'X' ) { - upslogx(2, "Unknown number of switchable load banks: 0x%02x", + if(is_binary_protocol()) { + switchable_load_banks = lb; + } else { + if( lb != 'X' ) { + upslogx(2, "Unknown number of switchable load banks: 0x%02x", (unsigned int)lb); + } } } + upsdebugx(2, "Switchable load banks: %d", switchable_load_banks); } void upsdrv_initinfo(void); @@ -581,6 +658,7 @@ static int soft_shutdown(void) int ret; unsigned char buf[256], cmd_N[]="N\0x", cmd_G[] = "G"; + /* Already binary: */ cmd_N[2] = offdelay; cmd_N[1] = offdelay >> 8; upsdebugx(3, "soft_shutdown(offdelay=%d): N", offdelay); @@ -652,8 +730,22 @@ static int control_outlet(int outlet_id, int state) } else { return 1; } + break; + case TRIPP_LITE_SMART_3005: + snprintf(k_cmd, sizeof(k_cmd)-1, "N%c", 5); + ret = send_cmd((unsigned char *)k_cmd, strlen(k_cmd) + 1, (unsigned char *)buf, sizeof buf); + snprintf(k_cmd, sizeof(k_cmd)-1, "K%c%c", outlet_id, state & 1); + ret = send_cmd((unsigned char *)k_cmd, strlen(k_cmd) + 1, (unsigned char *)buf, sizeof buf); + + if(ret != 8) { + upslogx(LOG_ERR, "Could not set outlet %d to state %d, ret = %d", outlet_id, state, ret); + return 0; + } else { + return 1; + } + break; default: - upslogx(LOG_ERR, "control_outlet unimplemented for this UPS model"); + upslogx(LOG_ERR, "control_outlet unimplemented for protocol %04x", tl_model); } return 0; } @@ -664,7 +756,7 @@ static int instcmd(const char *cmdname, const char *extra) { unsigned char buf[10]; - if(tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_SMART_0004) { + if(is_smart_protocol()) { if (!strcasecmp(cmdname, "test.battery.start")) { send_cmd((const unsigned char *)"A", 2, buf, sizeof buf); return STAT_INSTCMD_HANDLED; @@ -964,7 +1056,7 @@ void upsdrv_initinfo(void) dstate_setaux("ups.delay.reboot", 3); #endif - if(tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_SMART_0004) { + if(is_smart_protocol()) { dstate_addcmd("test.battery.start"); dstate_addcmd("reset.input.minmax"); } @@ -1002,10 +1094,12 @@ void upsdrv_updateinfo(void) unsigned char b_value[9], d_value[9], l_value[9], s_value[9], m_value[9], t_value[9]; int bp, freq; - double bv; + double bv_12V = 0.0; /*!< battery voltage, relative to a 12V battery */ + double battery_voltage; /*!< the total battery voltage */ + + unsigned int s_value_1; int ret; - unsigned battery_charge; status_init(); @@ -1055,8 +1149,14 @@ void upsdrv_updateinfo(void) /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ - if(tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_OMNIVS_2001 || tl_model == TRIPP_LITE_SMART_0004) { - switch(s_value[2]) { + if(is_smart_protocol() || tl_model == TRIPP_LITE_OMNIVS_2001) { + + unsigned int s_value_2 = s_value[2]; + + if(is_binary_protocol()) { + s_value_2 += '0'; + } + switch(s_value_2) { case '0': dstate_setinfo("battery.test.status", "Battery OK"); break; @@ -1096,16 +1196,27 @@ void upsdrv_updateinfo(void) } } - /* This may not be right... */ +#if 0 + /* Apparently, this value changes more frequently when the + * battery is discharged, but it does not track the actual + * state-of-charge. See battery.charge calculation below. + */ if(tl_model == TRIPP_LITE_SMARTPRO) { + unsigned battery_charge; battery_charge = (unsigned)(s_value[5]); dstate_setinfo("battery.charge", "%u", battery_charge); } +#endif } /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ - switch(s_value[1]) { + s_value_1 = s_value[1]; + if(is_binary_protocol()) { + s_value_1 += '0'; + } + + switch(s_value_1) { case '0': status_set("LB"); break; @@ -1134,28 +1245,18 @@ void upsdrv_updateinfo(void) return; } - dstate_setinfo("input.voltage", "%.2f", hex2d(b_value+1, 4)/30.0); + dstate_setinfo("input.voltage", "%.2f", hex2d(b_value+1, 4)/3600.0*input_voltage_scaled); - bv = hex2d(b_value+5, 2)/16.0; + bv_12V = hex2d(b_value+5, 2)/16.0; - /* dq ~= sqrt(dV) is a reasonable approximation - * Results fit well against the discrete function used in the Tripp Lite - * source, but give a continuous result. */ - if (bv >= V_interval[1]) - bp = 100; - else if (bv <= V_interval[0]) - bp = 10; - else - bp = (int)(100*sqrt((bv - V_interval[0]) - / (V_interval[1] - V_interval[0]))); - - dstate_setinfo("battery.voltage", "%.2f", bv); - dstate_setinfo("battery.charge", "%3d", bp); + /* TODO: use battery_voltage_nominal, even though it is most likely 12V */ + dstate_setinfo("battery.voltage", "%.2f", bv_12V); } /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ - if( tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_SMART_0004 ) { + if( is_smart_protocol() ) { + ret = send_cmd(d_msg, sizeof(d_msg), d_value, sizeof(d_value)); if(ret <= 0) { dstate_datastale(); @@ -1164,17 +1265,19 @@ void upsdrv_updateinfo(void) } dstate_setinfo("input.voltage", "%d", - hex2d(d_value+1, 2) * input_voltage_scaled / 120); + hex_or_bin2d(d_value+1, 2) * input_voltage_scaled / 120); - bv = hex2d(d_value+3, 2) * battery_voltage_nominal / 120.0 ; + /* TODO: factor out the two constants */ + bv_12V = hex_or_bin2d(d_value+3, 2) / 10.0 ; + battery_voltage = bv_12V * battery_voltage_nominal / 12.0; - dstate_setinfo("battery.voltage", "%.2f", bv); + dstate_setinfo("battery.voltage", "%.2f", battery_voltage); /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ ret = send_cmd(m_msg, sizeof(m_msg), m_value, sizeof(m_value)); - if(m_value[5] != 0x0d) { /* we only expect 4 hex digits */ + if(m_value[5] != 0x0d) { /* we only expect 4 hex/binary digits */ dstate_setinfo("ups.debug.M", "%s", hexascdump(m_value+1, 7)); } @@ -1184,8 +1287,8 @@ void upsdrv_updateinfo(void) return; } - dstate_setinfo("input.voltage.minimum", "%3d", hex2d(m_value+1, 2)); - dstate_setinfo("input.voltage.maximum", "%3d", hex2d(m_value+3, 2)); + dstate_setinfo("input.voltage.minimum", "%3d", hex_or_bin2d(m_value+1, 2) * input_voltage_scaled / 120); + dstate_setinfo("input.voltage.maximum", "%3d", hex_or_bin2d(m_value+3, 2) * input_voltage_scaled / 120); /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ @@ -1216,8 +1319,30 @@ void upsdrv_updateinfo(void) dstate_setinfo("input.frequency", "%.1f", freq / 10.0); } - /* I'm guessing this is a calibration constant of some sort. */ - dstate_setinfo("ups.temperature", "%.1f", (unsigned)(hex2d(t_value+1, 2)) * 0.3636 - 21); + if( tl_model == TRIPP_LITE_SMART_3005 ) { + dstate_setinfo("ups.temperature", "%d", (unsigned)(hex2d(t_value+1, 1))); + } else { + /* I'm guessing this is a calibration constant of some sort. */ + dstate_setinfo("ups.temperature", "%.1f", (unsigned)(hex2d(t_value+1, 2)) * 0.3636 - 21); + } + } + + /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ + + if( tl_model == TRIPP_LITE_OMNIVS || tl_model == TRIPP_LITE_OMNIVS_2001 || + tl_model == TRIPP_LITE_SMARTPRO || tl_model == TRIPP_LITE_SMART_0004 ) { + /* dq ~= sqrt(dV) is a reasonable approximation + * Results fit well against the discrete function used in the Tripp Lite + * source, but give a continuous result. */ + if (bv_12V >= V_interval[1]) + bp = 100; + else if (bv_12V <= V_interval[0]) + bp = 10; + else + bp = (int)(100*sqrt((bv_12V - V_interval[0]) + / (V_interval[1] - V_interval[0]))); + + dstate_setinfo("battery.charge", "%3d", bp); } /* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ @@ -1232,7 +1357,7 @@ void upsdrv_updateinfo(void) switch(tl_model) { case TRIPP_LITE_OMNIVS: case TRIPP_LITE_OMNIVS_2001: - dstate_setinfo("output.voltage", "%.1f", hex2d(l_value+1, 4)/2.0); + dstate_setinfo("output.voltage", "%.1f", hex2d(l_value+1, 4)/240.0*input_voltage_scaled); break; case TRIPP_LITE_SMARTPRO: dstate_setinfo("ups.load", "%d", hex2d(l_value+1, 2)); @@ -1272,16 +1397,20 @@ void upsdrv_makevartable(void) { char msg[256]; - snprintf(msg, sizeof msg, "Set shutdown delay, in seconds (default=%d).", + snprintf(msg, sizeof msg, "Set shutdown delay, in seconds (default=%d)", DEFAULT_OFFDELAY); addvar(VAR_VALUE, "offdelay", msg); - /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ - addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); - addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); - addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); - addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ + nut_usb_addvars(); + + snprintf(msg, sizeof msg, "Minimum battery voltage, corresponding to 10%% charge (default=%.1f)", + MIN_VOLT); + addvar(VAR_VALUE, "battery_min", msg); + + snprintf(msg, sizeof msg, "Maximum battery voltage, corresponding to 100%% charge (default=%.1f)", + MAX_VOLT); + addvar(VAR_VALUE, "battery_max", msg); #if 0 snprintf(msg, sizeof msg, "Set start delay, in seconds (default=%d).", @@ -1301,6 +1430,7 @@ void upsdrv_makevartable(void) void upsdrv_initups(void) { char *regex_array[6]; + char *value; int r; /* process the UPS selection options */ @@ -1343,8 +1473,24 @@ void upsdrv_initups(void) /* link the two matchers */ reopen_matcher->next = regex_matcher; - if (getval("offdelay")) - offdelay = atoi(getval("offdelay")); + value = getval("offdelay"); + if (value) { + offdelay = atoi(value); + upsdebugx(2, "Setting 'offdelay' to %d", offdelay); + } + + value = getval("battery_min"); + if (value) { + V_interval[0] = atof(value); + upsdebugx(2, "Setting 'battery_min' to %.g", V_interval[0]); + } + + value = getval("battery_max"); + if (value) { + V_interval[1] = atof(value); + upsdebugx(2, "Setting 'battery_max' to %.g", V_interval[1]); + } + #if 0 if (getval("startdelay")) startdelay = atoi(getval("startdelay")); diff --git a/drivers/usb-common.h b/drivers/usb-common.h index ad08172..d7a3ff4 100644 --- a/drivers/usb-common.h +++ b/drivers/usb-common.h @@ -93,4 +93,6 @@ typedef struct { int is_usb_device_supported(usb_device_id_t *usb_device_id_list, USBDevice_t *device); +void nut_usb_addvars(void); + #endif /* NUT_USB_COMMON_H */ diff --git a/drivers/usbhid-ups.c b/drivers/usbhid-ups.c index cdfbad7..c3e480c 100644 --- a/drivers/usbhid-ups.c +++ b/drivers/usbhid-ups.c @@ -27,7 +27,7 @@ */ #define DRIVER_NAME "Generic HID driver" -#define DRIVER_VERSION "0.38" +#define DRIVER_VERSION "0.39" #include "main.h" #include "libhid.h" @@ -737,14 +737,12 @@ void upsdrv_makevartable(void) #ifndef SHUT_MODE /* allow -x vendor=X, vendorid=X, product=X, productid=X, serial=X */ - addvar(VAR_VALUE, "vendor", "Regular expression to match UPS Manufacturer string"); - addvar(VAR_VALUE, "product", "Regular expression to match UPS Product string"); - addvar(VAR_VALUE, "serial", "Regular expression to match UPS Serial number"); - addvar(VAR_VALUE, "vendorid", "Regular expression to match UPS Manufacturer numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "productid", "Regular expression to match UPS Product numerical ID (4 digits hexadecimal)"); - addvar(VAR_VALUE, "bus", "Regular expression to match USB bus name"); + nut_usb_addvars(); + addvar(VAR_FLAG, "explore", "Diagnostic matching of unsupported UPS"); addvar(VAR_FLAG, "maxreport", "Activate tweak for buggy APC Back-UPS firmware"); + addvar(VAR_FLAG, "interruptonly", "Don't use polling, only use interrupt pipe"); + addvar(VAR_VALUE, "interruptsize", "Number of bytes to read from interrupt pipe"); #else addvar(VAR_VALUE, "notification", "Set notification type, (ignored, only for backward compatibility)"); #endif @@ -792,7 +790,23 @@ void upsdrv_updateinfo(void) /* Get HID notifications on Interrupt pipe first */ if (use_interrupt_pipe == TRUE) { evtCount = HIDGetEvents(udev, event, MAX_EVENT_NUM); - upsdebugx(1, "Got %i HID objects...", (evtCount >= 0) ? evtCount : 0); + switch (evtCount) + { + case -EBUSY: /* Device or resource busy */ + upslog_with_errno(LOG_CRIT, "Got disconnected by another driver"); + case -EPERM: /* Operation not permitted */ + case -ENODEV: /* No such device */ + case -EACCES: /* Permission denied */ + case -EIO: /* I/O error */ + case -ENXIO: /* No such device or address */ + case -ENOENT: /* No such file or directory */ + /* Uh oh, got to reconnect! */ + hd = NULL; + return; + default: + upsdebugx(1, "Got %i HID objects...", (evtCount >= 0) ? evtCount : 0); + break; + } } else { evtCount = 0; upsdebugx(1, "Not using interrupt pipe..."); @@ -812,7 +826,7 @@ void upsdrv_updateinfo(void) } /* Skip Input reports, if we don't use the Feature report */ - item = find_hid_info(FindObject_with_Path(pDesc, &(event[i]->Path), ITEM_FEATURE)); + item = find_hid_info(FindObject_with_Path(pDesc, &(event[i]->Path), interrupt_only ? ITEM_INPUT:ITEM_FEATURE)); if (!item) { upsdebugx(3, "NUT doesn't use this HID object"); continue; @@ -948,6 +962,15 @@ void upsdrv_initups(void) upsdebugx(1, "Detected a UPS: %s/%s", hd->Vendor ? hd->Vendor : "unknown", hd->Product ? hd->Product : "unknown"); + /* Activate Powercom tweaks */ + if (testvar("interruptonly")) { + interrupt_only = 1; + } + val = getval("interruptsize"); + if (val) { + interrupt_size = atoi(val); + } + if (hid_ups_walk(HU_WALKMODE_INIT) == FALSE) { fatalx(EXIT_FAILURE, "Can't initialize data from HID UPS"); } diff --git a/include/Makefile.in b/include/Makefile.in index bd75cae..d1e2f36 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,8 +80,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include -DIST_COMMON = $(dist_noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/config.h.in $(dist_noinst_HEADERS) 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 \ @@ -83,6 +110,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -91,12 +130,31 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(dist_noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -203,12 +261,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -253,6 +314,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -317,8 +379,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -337,26 +399,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -368,15 +419,11 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -385,6 +432,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -528,18 +590,18 @@ uninstall-am: .MAKE: all check install install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags dist-hook distclean distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distdir 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 maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool cscopelist-am ctags ctags-am dist-hook distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distdir 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 \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # magic to include Git version information in NUT version string diff --git a/include/common.h b/include/common.h index fb5df62..477774e 100644 --- a/include/common.h +++ b/include/common.h @@ -120,6 +120,8 @@ char *xstrdup(const char *string); char *rtrim(char *in, const char sep); char* ltrim(char *in, const char sep); +char *rtrim_m(char *in, const char *seps); +char* ltrim_m(char *in, const char *seps); int select_read(const int fd, void *buf, const size_t buflen, const long d_sec, const long d_usec); int select_write(const int fd, const void *buf, const size_t buflen, const long d_sec, const long d_usec); diff --git a/include/config.h.in b/include/config.h.in index f255496..dd42362 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -15,6 +15,9 @@ /* Default path for configuration files */ #undef CONFPATH +/* Define processor type */ +#undef CPU_TYPE + /* Default path for data files */ #undef DATADIR @@ -51,6 +54,18 @@ /* Define to 1 if C supports variable-length arrays. */ #undef HAVE_C_VARARRAYS +/* Define to 1 if you have the declaration of `i2c_smbus_read_block_data', and + to 0 if you don't. */ +#undef HAVE_DECL_I2C_SMBUS_READ_BLOCK_DATA + +/* Define to 1 if you have the declaration of `i2c_smbus_read_word_data', and + to 0 if you don't. */ +#undef HAVE_DECL_I2C_SMBUS_READ_WORD_DATA + +/* Define to 1 if you have the declaration of `i2c_smbus_write_word_data', and + to 0 if you don't. */ +#undef HAVE_DECL_I2C_SMBUS_WRITE_WORD_DATA + /* Define to 1 if you have the declaration of `LOG_UPTO', and to 0 if you don't. */ #undef HAVE_DECL_LOG_UPTO @@ -134,7 +149,7 @@ /* Define to 1 if the system has the type `long double'. */ #undef HAVE_LONG_DOUBLE -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the header file. */ @@ -239,6 +254,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#undef HAVE_UNSIGNED_LONG_LONG_INT + /* Define to 1 if you have the `usb_detach_kernel_driver_np' function. */ #undef HAVE_USB_DETACH_KERNEL_DRIVER_NP @@ -276,9 +294,6 @@ /* Define if getopt.h is needed */ #undef NEED_GETOPT_H -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* NUT network protocol version */ #undef NUT_NETVERSION @@ -382,6 +397,9 @@ /* Define to enable Powerman PDU support */ #undef WITH_LIBPOWERMAN +/* Define to enable I2C support */ +#undef WITH_LINUX_I2C + /* Define to enable Mac OS X meta-driver */ #undef WITH_MACOSX diff --git a/install-sh b/install-sh index a9244eb..377bb86 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written @@ -156,7 +156,7 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,7 +202,7 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi @@ -240,7 +240,7 @@ fi for src do - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -354,7 +354,7 @@ do if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. + # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in diff --git a/lib/Makefile.in b/lib/Makefile.in index 0480c02..a0d827c 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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. @@ -19,23 +18,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -56,9 +83,9 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = lib -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/libnutclient.pc.in $(srcdir)/libnutscan.pc.in \ - $(srcdir)/libupsclient-config.in $(srcdir)/libupsclient.pc.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/libupsclient-config.in $(srcdir)/libupsclient.pc.in \ + $(srcdir)/libnutclient.pc.in $(srcdir)/libnutscan.pc.in README 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 \ @@ -117,6 +144,18 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -125,10 +164,12 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -235,12 +276,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -285,6 +329,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -411,11 +456,11 @@ uninstall-pkgconfigDATA: @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -554,17 +599,17 @@ uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binSCRIPTS 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-pkgconfigDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \ - uninstall-pkgconfigDATA + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-binSCRIPTS 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-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-binSCRIPTS uninstall-pkgconfigDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/ltmain.sh b/ltmain.sh index b9205ee..bffda54 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.2ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.2ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1.11" TIMESTAMP="" package_revision=1.3337 diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 02b4bbe..d7c043f 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1312,7 +1312,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1333,7 +1333,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1352,7 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) diff --git a/m4/nut_check_asciidoc.m4 b/m4/nut_check_asciidoc.m4 index 944870e..c629eab 100644 --- a/m4/nut_check_asciidoc.m4 +++ b/m4/nut_check_asciidoc.m4 @@ -35,6 +35,25 @@ if test -z "${nut_have_asciidoc_seen}"; then AC_MSG_RESULT(${DBLATEX_VERSION} found) fi - dnl FIXME check for xsltproc, xmlllint, etc for chunked HTML and man pages + AC_PATH_PROGS([XSLTPROC], [xsltproc]) + if test -n "${XSLTPROC}"; then + AC_MSG_CHECKING([for xsltproc version]) + XSLTPROC_VERSION="`${XSLTPROC} --version 2>/dev/null`" + dnl strip 'xsltproc version ' from version string + XSLTPROC_VERSION="${XSLTPROC_VERSION##* }" + AC_MSG_RESULT(${XSLTPROC_VERSION} found) + fi + + AC_PATH_PROGS([XMLLINT], [xmllint]) + if test -n "${XMLLINT}"; then + AC_MSG_CHECKING([for xmllint version]) + XMLLINT_VERSION="`${XMLLINT} --version 2>/dev/null`" + dnl strip 'xmllint version ' from version string + XMLLINT_VERSION="${XMLLINT_VERSION##* }" + AC_MSG_RESULT(${XMLLINT_VERSION} found) + fi + + AC_PATH_PROGS([SOURCE_HIGHLIGHT], [source-highlight]) + fi ]) diff --git a/missing b/missing index 86a8fc3..db98974 100755 --- a/missing +++ b/missing @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-01-06.13; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # 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 @@ -26,68 +25,40 @@ scriptversion=2012-01-06.13; # UTC # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to ." exit $? @@ -99,228 +70,141 @@ Send bug reports to ." ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` +# Run the given program, remember its exit status. +"$@"; st=$? -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/scripts/Aix/nut-aix.spec.in b/scripts/Aix/nut-aix.spec.in new file mode 100644 index 0000000..37e4934 --- /dev/null +++ b/scripts/Aix/nut-aix.spec.in @@ -0,0 +1,330 @@ +%define nut_id @RUN_AS_USER@ +%define nut_group @RUN_AS_GROUP@ + +%define _prefix /usr/local/ups +%define _docdir %{_datadir}/doc + +%define confdir %{_prefix}/etc +%define rcdir /etc/rc.d +%define initdir %{rcdir}/init.d +%define cgidir /var/www/nut-cgi-bin +%define piddir /var/run/nut + +Summary: Network UPS Tools +Name: nut +Version: @PACKAGE_VERSION@ +Release: 1 +Group: Applications/System +License: GPLv2+ +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Url: http://www.networkupstools.org/ +Source: http://www.networkupstools.org/source/@TREE_VERSION@/%{name}-%{version}.tar.gz +Source1: nut.init +#Source2: ups.sysconfig +#Source3: nut-client.tmpfiles + + +# FIXME: adjust according to what is available through RPM on Aix +BuildRequires: libtool +BuildRequires: net-snmp-devel +BuildRequires: openssl-devel +BuildRequires: pkgconfig + +# AIX BUILDERS, PLEASE NOTE: +# If building with xlc version 3.6.X rather than gcc, you must ensure +# you have the following PTF's installed on your system, or +# you will see a runtime error that says: +# "Expected but saw " +# PTFS needed: U462006 U462007 U462023 U462024 U462025 U462026 U462027 +# Refer to http://service.software.ibm.com/support/rs6000, or +# set CC=gcc to force use of the GCC compiler. +# +# %define stdlib lib +# %define liblink ../.. +# %define DEFCC xlc + +%description +Network UPS Tools (NUT) is a client/server monitoring system that allows +computers to share uninterruptible power supply (UPS) and power distribution +unit (PDU) hardware. Clients access the hardware through the server, and are +notified whenever the power status changes. + +%package client +Group: Applications/System +Summary: Network UPS Tools client monitoring utilities +#Requires(post): chkconfig +#Requires(preun): chkconfig +#Requires(pre): shadow-utils + +%description client +This package includes the client utilities that are required to monitor a +ups that the client host has access to, but where the UPS is physically +attached to a different computer on the network. + +%package devel +Group: Development/Libraries +Summary: Development files for NUT Client +Requires: %{name}-client = %{version}-%{release} webserver openssl-devel + +%description devel +This package contains the development header files and libraries +necessary to develop NUT client applications. + +%prep +%setup -q + +%build +/usr/bin/rm configure.in + +%configure \ + --with-all \ + --without-powerman \ + --without-avahi \ + --without-usb \ + --without-ipmi \ + --without-cgi \ + --datadir=%{_datadir}/%{name} \ + --with-user=%{nut_id} \ + --with-group=%{nut_group} \ + --with-statepath=%{piddir} \ + --with-pidpath=%{piddir} \ + --with-altpidpath=%{piddir} \ + --sysconfdir=%{confdir} \ + --with-cgipath=%{cgidir} \ + --with-drvpath=%{_sbindir} \ + --with-pkgconfig-dir=%{_libdir}/pkgconfig \ + --disable-static \ + --libdir=%{_libdir} \ + --program-transform-name=s,^%{_target_platform}-,, \ + LDFLAGS="$LDFLAGS -Wl,-brtl" \ +# --with-libltdl-includes=/opt/freeware/share/libtool/libltdl/libltdl/ \ +# --with-libltdl-libs=/opt/freeware/lib \ +# --with-doc \ asciidoc >= 8.6.3 is required + +# FIXME: remove rpath? +#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +make %{?_smp_mflags} + +%install +/usr/bin/rm -rf %{buildroot} + +/usr/bin/mkdir -p %{buildroot}%{_sbindir} \ + %{buildroot}%{piddir} \ + %{buildroot}%{_libdir}/ups \ + %{buildroot}%{initdir} \ + %{buildroot}%{_libexecdir} + +make install DESTDIR=%{buildroot} + +install -m 755 %{SOURCE1} %{buildroot}%{initdir}/ups + +/usr/bin/rm -f %{buildroot}%{_libdir}/*.la + +# Remove ".sample" suffix from the config filenames +#pushd conf; +#make install DESTDIR=%{buildroot} +#for file in %{buildroot}%{confdir}/*.sample +#do +# mv $file %{buildroot}%{confdir}/`basename $file .sample` +#done +#popd + +%pre +/usr/bin/test -L %{_libdir}/ups || \ +/usr/bin/mkdir -p %{_libdir}/ups +/usr/bin/grep -qc %{nut_group} /etc/group || \ +/usr/bin/mkgroup %{nut_group} +/usr/bin/grep -qc %{nut_id} /etc/passwd || \ +/usr/sbin/useradd -c "Network UPS Tools" \ + -g %{nut_group} -d %{_libdir}/ups %{nut_id} +/usr/bin/test -L %{piddir} || \ +/usr/bin/mkdir -p %{piddir} +/usr/bin/chmod 750 %{piddir} +/usr/bin/chown %{nut_id}:%{nut_group} %{piddir} + +%post +/usr/bin/test -L %{rcdir}/rc2.d/Sups || \ +/usr/bin/ln -s %{initdir}/ups %{rcdir}/rc2.d/Sups +/usr/bin/test -L %{rcdir}/rc2.d/Kups || \ +/usr/bin/ln -s %{initdir}/ups %{rcdir}/rc2.d/Kups +exit 0 + +%preun +%{initdir}/ups stop +if [ "$1" = "0" ]; then + /usr/bin/rm -f %{rcdir}/rc2.d/[SK]ups +fi +exit 0 + +%postun +if [ "$1" = "0" ]; then + /usr/bin/grep -qc %{nut_id} /etc/passwd && \ + /usr/sbin/userdel %{nut_id} + /usr/bin/grep -qc %{nut_group}: /etc/group && \ + /usr/sbin/rmgroup %{nut_group} + /usr/bin/test -L %{piddir} && \ + /usr/bin/rm -rf %{piddir} + /usr/bin/test -L %{_libdir}/ups && \ + /usr/bin/rm -rf %{_libdir}/ups +fi +exit 0 + +%pre client +/usr/bin/grep -qc %{nut_group}: /etc/group || \ +/usr/bin/mkgroup %{nut_group} +/usr/bin/grep -qc %{nut_id} /etc/passwd || \ +/usr/sbin/useradd -c "Network UPS Tools" \ + -g %{nut_group} -d %{_libdir}/ups %{nut_id} +/usr/bin/test -L %{piddir} || \ +/usr/bin/mkdir -p %{piddir} +/usr/bin/chmod 750 %{piddir} +/usr/bin/chown %{nut_id}:%{nut_group} %{piddir} + +%post client +/usr/bin/test -L %{rcdir}/rc2.d/Sups || \ +/usr/bin/ln -s %{initdir}/ups %{rcdir}/rc2.d/Sups +/usr/bin/test -L %{rcdir}/rc2.d/Kups || \ +/usr/bin/ln -s %{initdir}/ups %{rcdir}/rc2.d/Kups +#%{initdir}/ups start +exit 0 + +%preun client +%{initdir}/ups stop +remove="no" +if /usr/bin/rpm -q nut >/dev/null 2>&1; then + remove="no" +elif [ "$1" = "0" ]; then + remove="yes" +fi +if [ "$remove" = "yes" ]; then + /usr/bin/rm -f %{rcdir}/rc2.d/[SK]ups + /usr/bin/test -L %{piddir} && \ + /usr/bin/rm -rf %{piddir} +fi +exit 0 + +%postun client +remove="no" +if /usr/bin/rpm -q nut >/dev/null 2>&1; then + remove="no" +elif [ "$1" = "0" ]; then + remove="yes" +fi +if [ "$remove" = "yes" ]; then + /usr/bin/grep -qc %{nut_id} /etc/passwd && \ + /usr/sbin/userdel %{nut_id} + /usr/bin/grep -qc %{nut_group}: /etc/group && \ + /usr/sbin/rmgroup %{nut_group} +#else +# %{initdir}/ups start +fi +exit 0 + +%clean +/usr/bin/rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%attr(755,root,root) %{initdir}/ups +%doc COPYING ChangeLog AUTHORS MAINTAINERS README docs UPGRADING INSTALL NEWS +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/nut.conf.sample +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/ups.conf.sample +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/upsd.conf.sample +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/upsd.users.sample +%dir %attr(750,%nut_id,%nut_group) %{_libdir}/ups +#%ghost %{piddir} +%{_sbindir}/* +%{_bindir}/upslog +%{_bindir}/nutconf +%{_libdir}/libnutscan.so* +%{_libdir}/libupsclient.so* +%{_datadir}/%{name}/cmdvartab +%{_datadir}/%{name}/driver.list +%{_mandir}/man5/nut.conf.5 +%{_mandir}/man5/ups.conf.5 +%{_mandir}/man5/upsd.conf.5 +%{_mandir}/man5/upsd.users.5 +%{_mandir}/man8/apcsmart.8 +%{_mandir}/man8/bcmxcp.8 +#%{_mandir}/man8/bcmxcp_usb.8 +%{_mandir}/man8/belkin.8 +%{_mandir}/man8/bestfcom.8 +%{_mandir}/man8/belkinunv.8 +%{_mandir}/man8/bestfortress.8 +%{_mandir}/man8/bestups.8 +%{_mandir}/man8/bestuferrups.8 +%{_mandir}/man8/blazer.8 +%{_mandir}/man8/clone.8 +%{_mandir}/man8/dummy-ups.8 +%{_mandir}/man8/everups.8 +%{_mandir}/man8/etapro.8 +%{_mandir}/man8/gamatronic.8 +%{_mandir}/man8/genericups.8 +%{_mandir}/man8/isbmex.8 +%{_mandir}/man8/ivtscd.8 +%{_mandir}/man8/liebert.8 +%{_mandir}/man8/liebert-esp2.8 +%{_mandir}/man8/masterguard.8 +%{_mandir}/man8/metasys.8 +%{_mandir}/man8/microdowell.8 +%{_mandir}/man8/mge-utalk.8 +%{_mandir}/man8/mge-shut.8 +%{_mandir}/man8/nutupsdrv.8 +%{_mandir}/man8/oneac.8 +%{_mandir}/man8/optiups.8 +%{_mandir}/man8/powercom.8 +#%{_mandir}/man8/powerman-pdu.8 +%{_mandir}/man8/powerpanel.8 +%{_mandir}/man8/rhino.8 +#%{_mandir}/man8/richcomm_usb.8 +%{_mandir}/man8/safenet.8 +%{_mandir}/man8/snmp-ups.8 +%{_mandir}/man8/solis.8 +%{_mandir}/man8/tripplite.8 +#%{_mandir}/man8/tripplite_usb.8 +%{_mandir}/man8/tripplitesu.8 +%{_mandir}/man8/victronups.8 +%{_mandir}/man8/upscode2.8 +%{_mandir}/man8/upsd.8 +%{_mandir}/man8/upsdrvctl.8 + +%files client +%doc COPYING +%defattr(-,root,root) +%attr(755,root,root) %{initdir}/ups +%dir %{confdir} +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/upsmon.conf.sample +%config(noreplace) %attr(640,root,%nut_group) %{confdir}/upssched.conf.sample +%dir %attr(750,%nut_id,%nut_group) %{_libdir}/ups +#%ghost %{piddir} +%{_bindir}/upsc +%{_bindir}/upscmd +%{_bindir}/upsrw +%{_sbindir}/upsmon +%{_sbindir}/upssched +%{_bindir}/upssched-cmd +%{_libdir}/libupsclient.so* +%{_mandir}/man5/upsmon.conf.5 +%{_mandir}/man5/upssched.conf.5 +%{_mandir}/man8/upsc.8 +%{_mandir}/man8/upscmd.8 +%{_mandir}/man8/upsrw.8 +%{_mandir}/man8/upslog.8 +%{_mandir}/man8/upsmon.8 +%{_mandir}/man8/upssched.8 + +%files devel +%defattr(-,root,root,-) +%{_includedir}/* +%{_mandir}/man3/upscli* +%{_libdir}/libupsclient.so* +%{_libdir}/pkgconfig/libupsclient.pc + +%changelog +* Tue Jul 12 2014 Arnaud Quette - 2.7.2-1.master +- Minor adjustments + +* Tue Jul 12 2011 Arnaud Quette - 2.6.5-1.trunk +- derive from RHEL 2.6.1-2, and adapt for Aix 6.1 diff --git a/scripts/Makefile.in b/scripts/Makefile.in index c260153..fc45fe7 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,7 +79,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README 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 \ @@ -81,15 +108,28 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -97,9 +137,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -132,6 +192,7 @@ am__relativize = \ A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -238,12 +299,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -288,6 +352,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -378,22 +443,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -408,57 +476,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -474,12 +497,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -491,15 +509,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -508,6 +522,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -668,22 +697,20 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir 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 +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir 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-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/scripts/Solaris/Makefile.in b/scripts/Solaris/Makefile.in index e968d1f..c49592e 100644 --- a/scripts/Solaris/Makefile.in +++ b/scripts/Solaris/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,9 +79,9 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts/Solaris -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/nut.in $(srcdir)/pkginfo.in $(srcdir)/postinstall.in \ - $(srcdir)/preremove.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/pkginfo.in $(srcdir)/postinstall.in \ + $(srcdir)/preremove.in $(srcdir)/nut.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 \ @@ -83,6 +110,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = pkginfo postinstall preremove nut CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -90,10 +129,12 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -200,12 +241,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -250,6 +294,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -319,11 +364,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -459,15 +504,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir 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 maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir 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 \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am package: makelocal.sh pkginfo diff --git a/scripts/augeas/Makefile.in b/scripts/augeas/Makefile.in index 2c1d35c..e3271d4 100644 --- a/scripts/augeas/Makefile.in +++ b/scripts/augeas/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,12 +79,12 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts/augeas -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/nuthostsconf.aug.in $(srcdir)/nutnutconf.aug.in \ - $(srcdir)/nutupsconf.aug.in $(srcdir)/nutupsdconf.aug.in \ - $(srcdir)/nutupsdusers.aug.in $(srcdir)/nutupsmonconf.aug.in \ - $(srcdir)/nutupsschedconf.aug.in \ - $(srcdir)/nutupssetconf.aug.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/nutnutconf.aug.in $(srcdir)/nutupsconf.aug.in \ + $(srcdir)/nutupsdconf.aug.in $(srcdir)/nutupsdusers.aug.in \ + $(srcdir)/nutupsmonconf.aug.in \ + $(srcdir)/nutupsschedconf.aug.in $(srcdir)/nuthostsconf.aug.in \ + $(srcdir)/nutupssetconf.aug.in README 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 \ @@ -88,6 +115,18 @@ CONFIG_CLEAN_FILES = nutnutconf.aug nutupsconf.aug nutupsdconf.aug \ nutupsdusers.aug nutupsmonconf.aug nutupsschedconf.aug \ nuthostsconf.aug nutupssetconf.aug CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -95,10 +134,12 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -205,12 +246,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -255,6 +299,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -334,11 +379,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -477,16 +522,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - dist-hook distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ + cscopelist-am ctags-am dist-hook distclean distclean-generic \ + distclean-libtool distdir 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 \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am + tags-am uninstall uninstall-am # only call the script to generate Augeas ups.conf lens upon "make dist", diff --git a/scripts/augeas/nutupsconf.aug.in b/scripts/augeas/nutupsconf.aug.in index 1182150..70d5f67 100644 --- a/scripts/augeas/nutupsconf.aug.in +++ b/scripts/augeas/nutupsconf.aug.in @@ -60,6 +60,8 @@ let ups_fields = "driver" | "awd" | "batteryPercentage" | "battery_alarm" + | "battery_max" + | "battery_min" | "battery_number" | "battery_open_status_check" | "battext" @@ -86,11 +88,16 @@ let ups_fields = "driver" | "frequency" | "fruid" | "full_update" + | "hb" | "houroff" | "houron" | "idleload" + | "ignoresab" | "input_timeout" + | "interruptonly" + | "interruptsize" | "langid_fix" + | "lb" | "limited_runtime_on_battery" | "linevoltage" | "load.off" @@ -127,6 +134,7 @@ let ups_fields = "driver" | "output_pace" | "output_phase_angle" | "password" + | "pins_shutdown_mode" | "pollfreq" | "pollonly" | "powerup" @@ -166,6 +174,7 @@ let ups_fields = "driver" | "ups.delay.shutdown" | "ups.delay.start" | "upstype" + | "usb_set_altinterface" | "usd" | "use_crlf" | "use_pre_lf" diff --git a/scripts/devd/Makefile.in b/scripts/devd/Makefile.in index 2b564ce..cad7c1f 100644 --- a/scripts/devd/Makefile.in +++ b/scripts/devd/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,8 +81,8 @@ host_triplet = @host@ target_triplet = @target@ @WITH_DEVD_TRUE@@WITH_USB_TRUE@am__append_1 = nut-usb.conf subdir = scripts/devd -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/nut-usb.conf.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/nut-usb.conf.in README 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 \ @@ -84,6 +111,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = nut-usb.conf CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -120,10 +159,12 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(devdconfdir)" DATA = $(devdconf_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -230,12 +271,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -280,6 +324,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -367,11 +412,11 @@ uninstall-devdconfDATA: @list='$(devdconf_DATA)'; test -n "$(devdconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(devdconfdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -511,16 +556,17 @@ uninstall-am: uninstall-devdconfDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-devdconfDATA 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-devdconfDATA + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-devdconfDATA 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 maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-devdconfDATA # we should never remove this one, apart from a distclean-check #MAINTAINERCLEANFILES = nut-usbups.rules.in diff --git a/scripts/devd/nut-usb.conf.in b/scripts/devd/nut-usb.conf.in index 05b6ffa..09418de 100644 --- a/scripts/devd/nut-usb.conf.in +++ b/scripts/devd/nut-usb.conf.in @@ -8,7 +8,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0001"; match "product" "0x0000"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Hewlett Packard @@ -19,7 +19,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # T500 - bcmxcp_usb notify 100 { @@ -28,7 +28,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f01"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # T750 - bcmxcp_usb notify 100 { @@ -37,7 +37,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f02"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T750 INTL - usbhid-ups notify 100 { @@ -46,7 +46,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f06"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T1000 INTL - usbhid-ups notify 100 { @@ -55,7 +55,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f08"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T1500 INTL - usbhid-ups notify 100 { @@ -64,7 +64,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f09"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP R/T 2200 INTL (like SMART2200RMXL2U) - usbhid-ups notify 100 { @@ -73,7 +73,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1f0a"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP R1500 G2 and G3 INTL - usbhid-ups notify 100 { @@ -82,7 +82,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe0"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T750 G2 - usbhid-ups notify 100 { @@ -91,7 +91,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe1"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -100,7 +100,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe2"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # HP T1500 G3 - usbhid-ups notify 100 { @@ -109,7 +109,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe3"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # R/T3000 - usbhid-ups notify 100 { @@ -118,7 +118,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe5"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # R/T3000 - usbhid-ups notify 100 { @@ -127,7 +127,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe6"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various models - usbhid-ups notify 100 { @@ -136,7 +136,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe7"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various models - usbhid-ups notify 100 { @@ -145,7 +145,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x1fe8"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Eaton @@ -156,7 +156,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0463"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various models - usbhid-ups notify 100 { @@ -165,7 +165,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0463"; match "product" "0xffff"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Dell @@ -176,7 +176,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x047c"; match "product" "0xffff"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Riello (Cypress Semiconductor Corp.) @@ -187,7 +187,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x04b4"; match "product" "0x5500"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Minibox @@ -198,7 +198,16 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x04d8"; match "product" "0xd004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; +# openUPS Intelligent UPS (minimum required firmware 1.4) - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x04d8"; + match "product" "0xd005"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Belkin @@ -209,7 +218,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0375"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C550-AVR - usbhid-ups notify 100 { @@ -218,7 +227,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0551"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C1250-TW-RK - usbhid-ups notify 100 { @@ -227,7 +236,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0750"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C1500-TW-RK - usbhid-ups notify 100 { @@ -236,7 +245,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0751"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C900-UNV - usbhid-ups notify 100 { @@ -245,7 +254,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0900"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C100-UNV - usbhid-ups notify 100 { @@ -254,7 +263,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0910"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C120-UNV - usbhid-ups notify 100 { @@ -263,7 +272,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0912"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C800-UNV - usbhid-ups notify 100 { @@ -272,7 +281,16 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x0980"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; +# Regulator PRO-USB - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x050d"; + match "product" "0x0f51"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # F6C1100-UNV, F6C1200-UNV - usbhid-ups notify 100 { @@ -281,10 +299,19 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x050d"; match "product" "0x1100"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # APC +# APC AP9584 Serial->USB kit - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x051d"; + match "product" "0x0000"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; # various models - usbhid-ups notify 100 { match "system" "USB"; @@ -292,7 +319,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x051d"; match "product" "0x0002"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various 5G models - usbhid-ups notify 100 { @@ -301,7 +328,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x051d"; match "product" "0x0003"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Powerware @@ -312,7 +339,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0592"; match "product" "0x0002"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PW 9140 - usbhid-ups notify 100 { @@ -321,7 +348,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0592"; match "product" "0x0004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Agiler UPS - blazer_usb notify 100 { @@ -330,7 +357,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x05b8"; match "product" "0x0000"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Belkin F6C1200-UNV - blazer_usb notify 100 { @@ -339,18 +366,18 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0665"; match "product" "0x5161"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Phoenixtec Power Co., Ltd -# Online Yunto YQ450 - blazer_usb +# various models - bcmxcp_usb notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0002"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Mustek Powermust - blazer_usb notify 100 { @@ -359,7 +386,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0003"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Phoenixtec Innova 3/1 T - blazer_usb notify 100 { @@ -368,7 +395,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Phoenixtec Innova RT - blazer_usb notify 100 { @@ -377,7 +404,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0005"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Phoenixtec Innova T - blazer_usb notify 100 { @@ -386,7 +413,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0201"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Online Zinto A - blazer_usb notify 100 { @@ -395,7 +422,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0x0601"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # various models - usbhid-ups notify 100 { @@ -404,7 +431,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x06da"; match "product" "0xffff"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # iDowell @@ -415,27 +442,27 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x075d"; match "product" "0x0300"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Cyber Power Systems -# 900AVR/BC900D, CP1200AVR/BC1200D - usbhid-ups +# 900AVR/BC900D - usbhid-ups notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x0764"; match "product" "0x0005"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; -# Dynex DX-800U? - usbhid-ups +# Dynex DX-800U?, CP1200AVR/BC1200D, CP825AVR-G, CP1000AVRLCD, CP1000PFCLCD, CP1500C, CP550HG, etc. - usbhid-ups notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x0764"; match "product" "0x0501"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U - usbhid-ups notify 100 { @@ -444,7 +471,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0764"; match "product" "0x0601"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Sweex 1000VA - richcomm_usb notify 100 { @@ -453,7 +480,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0925"; match "product" "0x1234"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # TrippLite @@ -464,7 +491,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite AVR550U - usbhid-ups notify 100 { @@ -473,7 +500,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1003"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite AVR750U - usbhid-ups notify 100 { @@ -482,7 +509,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1007"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite ECO550UPS - usbhid-ups notify 100 { @@ -491,7 +518,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1008"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite ECO550UPS - usbhid-ups notify 100 { @@ -500,7 +527,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1009"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite ECO550UPS - usbhid-ups notify 100 { @@ -509,7 +536,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x1010"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite OMNI1000LCD - usbhid-ups notify 100 { @@ -518,7 +545,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2005"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite OMNI900LCD - usbhid-ups notify 100 { @@ -527,7 +554,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2007"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -536,7 +563,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2008"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite Smart1000LCD - usbhid-ups notify 100 { @@ -545,7 +572,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2009"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -554,7 +581,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2010"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -563,7 +590,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2011"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -572,7 +599,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2012"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -581,7 +608,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2013"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -590,7 +617,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x2014"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -599,7 +626,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3008"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -608,7 +635,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3009"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -617,7 +644,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3010"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -626,7 +653,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3011"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite smart2200RMXL2U - usbhid-ups notify 100 { @@ -635,7 +662,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3012"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -644,7 +671,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3013"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -653,7 +680,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3014"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -662,7 +689,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3015"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite Smart1500LCD (newer unit) - usbhid-ups notify 100 { @@ -671,7 +698,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x3016"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite SmartOnline SU1500RTXL2UA (older unit?) - usbhid-ups notify 100 { @@ -680,7 +707,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite SmartOnline SU6000RT4U? - usbhid-ups notify 100 { @@ -689,7 +716,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4002"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite SmartOnline SU1500RTXL2ua - usbhid-ups notify 100 { @@ -698,7 +725,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4003"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. TrippLite SmartOnline SU1000XLA - usbhid-ups notify 100 { @@ -707,7 +734,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -716,7 +743,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4005"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -725,7 +752,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4006"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -734,7 +761,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4007"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # e.g. ? - usbhid-ups notify 100 { @@ -743,18 +770,27 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x09ae"; match "product" "0x4008"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM # PowerCOM Vanguard and BNT-xxxAP - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x0d9f"; + match "product" "0x0001"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; +# PowerCOM Vanguard and BNT-xxxAP - usbhid-ups notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x0004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM IMP - IMPERIAL Series - usbhid-ups notify 100 { @@ -763,7 +799,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a2"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM SKP - Smart KING Pro (all Smart series) - usbhid-ups notify 100 { @@ -772,7 +808,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a3"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM WOW - usbhid-ups notify 100 { @@ -781,7 +817,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a4"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM VGD - Vanguard - usbhid-ups notify 100 { @@ -790,7 +826,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a5"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # PowerCOM BNT - Black Knight Pro - usbhid-ups notify 100 { @@ -799,7 +835,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0d9f"; match "product" "0x00a6"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Unitek Alpha 1200Sx - blazer_usb notify 100 { @@ -808,7 +844,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x0f03"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Liebert @@ -819,7 +855,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x10af"; match "product" "0x0001"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Liebert PowerSure PSI 1440 - usbhid-ups notify 100 { @@ -828,7 +864,16 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x10af"; match "product" "0x0004"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; +}; +# Liebert GXT3 - usbhid-ups +notify 100 { + match "system" "USB"; + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "vendor" "0x10af"; + match "product" "0x0008"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # GE EP series - blazer_usb notify 100 { @@ -837,7 +882,7 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0x14f0"; match "product" "0x00c9"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; # Ablerex 625L USB - blazer_usb notify 100 { @@ -846,5 +891,5 @@ notify 100 { match "type" "ATTACH"; match "vendor" "0xffff"; match "product" "0x0000"; - action "chgrp @RUN_AS_GROUP@ /dev/$device-name*; chmod g+rw /dev/$device-name*"; + action "chgrp @RUN_AS_GROUP@ /dev/$cdev; chmod g+rw /dev/$cdev"; }; diff --git a/scripts/hotplug/Makefile.in b/scripts/hotplug/Makefile.in index 4d6b47e..4e9b5e5 100644 --- a/scripts/hotplug/Makefile.in +++ b/scripts/hotplug/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +16,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,9 +81,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts/hotplug -DIST_COMMON = README $(am__dist_hotplugusb_DATA_DIST) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/libhidups.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/libhidups.in $(am__dist_hotplugusb_DATA_DIST) README 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 \ @@ -115,6 +141,18 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(hotplugusbdir)" \ "$(DESTDIR)$(hotplugusbdir)" SCRIPTS = $(hotplugusb_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -124,10 +162,12 @@ am__can_run_installinfo = \ esac am__dist_hotplugusb_DATA_DIST = libhid.usermap DATA = $(dist_hotplugusb_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -234,12 +274,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -284,6 +327,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -407,11 +451,11 @@ uninstall-dist_hotplugusbDATA: @list='$(dist_hotplugusb_DATA)'; test -n "$(hotplugusbdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(hotplugusbdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -552,16 +596,17 @@ uninstall-am: uninstall-dist_hotplugusbDATA \ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_hotplugusbDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-hotplugusbSCRIPTS 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 maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_hotplugusbDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-hotplugusbSCRIPTS \ + 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 maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags-am uninstall uninstall-am \ uninstall-dist_hotplugusbDATA uninstall-hotplugusbSCRIPTS # we should never remove this one, apart from a distclean-check diff --git a/scripts/hotplug/libhid.usermap b/scripts/hotplug/libhid.usermap index 08f25c5..d1be810 100644 --- a/scripts/hotplug/libhid.usermap +++ b/scripts/hotplug/libhid.usermap @@ -56,6 +56,8 @@ libhidups 0x0003 0x04b4 0x5500 0x0000 0x0000 0x00 # Minibox # openUPS Intelligent UPS (minimum required firmware 1.4) libhidups 0x0003 0x04d8 0xd004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# openUPS Intelligent UPS (minimum required firmware 1.4) +libhidups 0x0003 0x04d8 0xd005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Belkin # F6H375-USB @@ -74,10 +76,14 @@ libhidups 0x0003 0x050d 0x0910 0x0000 0x0000 0x00 libhidups 0x0003 0x050d 0x0912 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # F6C800-UNV libhidups 0x0003 0x050d 0x0980 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Regulator PRO-USB +libhidups 0x0003 0x050d 0x0f51 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # F6C1100-UNV, F6C1200-UNV libhidups 0x0003 0x050d 0x1100 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # APC +# APC AP9584 Serial->USB kit +libhidups 0x0003 0x051d 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # various models libhidups 0x0003 0x051d 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # various 5G models @@ -94,7 +100,7 @@ libhidups 0x0003 0x05b8 0x0000 0x0000 0x0000 0x00 libhidups 0x0003 0x0665 0x5161 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Phoenixtec Power Co., Ltd -# Online Yunto YQ450 +# various models libhidups 0x0003 0x06da 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Mustek Powermust libhidups 0x0003 0x06da 0x0003 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 @@ -114,9 +120,9 @@ libhidups 0x0003 0x06da 0xffff 0x0000 0x0000 0x00 libhidups 0x0003 0x075d 0x0300 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Cyber Power Systems -# 900AVR/BC900D, CP1200AVR/BC1200D +# 900AVR/BC900D libhidups 0x0003 0x0764 0x0005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# Dynex DX-800U? +# Dynex DX-800U?, CP1200AVR/BC1200D, CP825AVR-G, CP1000AVRLCD, CP1000PFCLCD, CP1500C, CP550HG, etc. libhidups 0x0003 0x0764 0x0501 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U libhidups 0x0003 0x0764 0x0601 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 @@ -191,6 +197,8 @@ libhidups 0x0003 0x09ae 0x4008 0x0000 0x0000 0x00 # PowerCOM # PowerCOM Vanguard and BNT-xxxAP +libhidups 0x0003 0x0d9f 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# PowerCOM Vanguard and BNT-xxxAP libhidups 0x0003 0x0d9f 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # PowerCOM IMP - IMPERIAL Series libhidups 0x0003 0x0d9f 0x00a2 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 @@ -210,6 +218,8 @@ libhidups 0x0003 0x0f03 0x0001 0x0000 0x0000 0x00 libhidups 0x0003 0x10af 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Liebert PowerSure PSI 1440 libhidups 0x0003 0x10af 0x0004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 +# Liebert GXT3 +libhidups 0x0003 0x10af 0x0008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # GE EP series libhidups 0x0003 0x14f0 0x00c9 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # Ablerex 625L USB diff --git a/scripts/python/Makefile.am b/scripts/python/Makefile.am index 2d670e5..0326725 100644 --- a/scripts/python/Makefile.am +++ b/scripts/python/Makefile.am @@ -3,6 +3,7 @@ EXTRA_DIST = README \ app/gui-1.3.glade \ app/NUT-Monitor \ + app/nut-monitor.appdata.xml \ app/nut-monitor.desktop \ app/nut-monitor.png \ app/README \ diff --git a/scripts/python/Makefile.in b/scripts/python/Makefile.in index d04e8aa..79c48e5 100644 --- a/scripts/python/Makefile.in +++ b/scripts/python/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +16,51 @@ # Network UPS Tools: data/html VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,7 +81,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts/python -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README 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 \ @@ -83,6 +110,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -90,10 +129,12 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -200,12 +241,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -250,6 +294,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -274,6 +319,7 @@ udevdir = @udevdir@ EXTRA_DIST = README \ app/gui-1.3.glade \ app/NUT-Monitor \ + app/nut-monitor.appdata.xml \ app/nut-monitor.desktop \ app/nut-monitor.png \ app/README \ @@ -326,11 +372,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -466,15 +512,16 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir 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 maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir 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 \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/scripts/python/app/NUT-Monitor b/scripts/python/app/NUT-Monitor index 91e9001..08dfaa4 100755 --- a/scripts/python/app/NUT-Monitor +++ b/scripts/python/app/NUT-Monitor @@ -23,12 +23,16 @@ # # 2010-10-06 David Goncalves - Version 1.3 # Added localisation support +# +# 2015-02-14 Michal Fincham - Version 1.3.1 +# Corrected unsafe permissions on ~/.nut-monitor (Debian #777706) import gtk, gtk.glade, gobject import sys import base64 import os, os.path +import stat import platform import time import threading @@ -44,21 +48,23 @@ gobject.threads_init() class interface : - __widgets = {} - __callbacks = {} - __favorites = {} - __favorites_file = None - __favorites_path = "" - __fav_menu_items = list() - __window_visible = True - __glade_file = None - __connected = False - __ups_handler = None - __ups_commands = None - __ups_vars = None - __ups_rw_vars = None - __gui_thread = None - __current_ups = None + DESIRED_FAVORITES_DIRECTORY_MODE = 0700 + + __widgets = {} + __callbacks = {} + __favorites = {} + __favorites_file = None + __favorites_path = "" + __fav_menu_items = list() + __window_visible = True + __glade_file = None + __connected = False + __ups_handler = None + __ups_commands = None + __ups_vars = None + __ups_rw_vars = None + __gui_thread = None + __current_ups = None def __init__( self ) : @@ -528,6 +534,9 @@ class interface : return try : + if ( not stat.S_IMODE( os.stat( self.__favorites_path ).st_mode ) == self.DESIRED_FAVORITES_DIRECTORY_MODE ) : # unsafe pre-1.2 directory found + os.chmod( self.__favorites_path, self.DESIRED_FAVORITES_DIRECTORY_MODE ) + conf = ConfigParser.ConfigParser() conf.read( self.__favorites_file ) for current in conf.sections() : @@ -573,7 +582,7 @@ class interface : # If path does not exists, try to create it if ( not os.path.exists( self.__favorites_file ) ) : try : - os.makedirs( self.__favorites_path, mode=0700 ) + os.makedirs( self.__favorites_path, mode=self.DESIRED_FAVORITES_DIRECTORY_MODE ) except : self.gui_status_message( _("Error while creating configuration folder (%s)") % sys.exc_info()[1] ) diff --git a/scripts/python/app/gui-1.3.glade b/scripts/python/app/gui-1.3.glade index 1d54fe6..eb42aba 100644 --- a/scripts/python/app/gui-1.3.glade +++ b/scripts/python/app/gui-1.3.glade @@ -1021,7 +1021,7 @@ want to delete from list... center-always normal NUT-Monitor - 1.3 + 1.3.1 Copyright (c) 2010 David Goncalves GUI to manage devices connected a NUT server. diff --git a/scripts/python/app/nut-monitor.appdata.xml b/scripts/python/app/nut-monitor.appdata.xml new file mode 100644 index 0000000..ba1d0b9 --- /dev/null +++ b/scripts/python/app/nut-monitor.appdata.xml @@ -0,0 +1,42 @@ + + + + nut-monitor.desktop + CC0-1.0 + GPL-3.0+ + NUT Monitor + GUI application to monitor UPS status + +

    + NUT Monitor is a GUI application to monitor UPS status, through NUT - + Network UPS Tools. + NUT is a client/server monitoring system that allows computers to + share uninterruptible power supply (UPS) and power distribution unit + (PDU) hardware. Clients access the hardware through the server, and + are notified whenever the power status changes. +

    +

    NUT Monitor provides the following features:

    +
      +
    • Automatically connects to local UPS if there is only one managed
    • +
    • Command line options to start hidden, load a favorite, ...
    • +
    • System tray (notification area) integration, including notifications
    • +
    • Favorites, to store different devices
    • +
    • Display all device variables
    • +
    • Modify writable variables on UPS and devices
    • +
    • Support English and French
    • +
    +

    + NUT Monitor requires that you have a running NUT system, that you can + connect to, either locally or remotely. + For more information on NUT: http://www.networkupstools.org/ +

    +
    + + http://www.lestat.st/_media/informatique/projets/nut-monitor/nut-monitor-1.png + http://www.lestat.st/_media/informatique/projets/nut-monitor/nut-monitor-2.png + http://www.lestat.st/_media/informatique/projets/nut-monitor/nut-monitor-3.png + + http://www.lestat.st/en/informatique/projets/nut-monitor + david@lestat.st + +
    diff --git a/scripts/python/module/PyNUT.py b/scripts/python/module/PyNUT.py index 98c9114..9a9399c 100644 --- a/scripts/python/module/PyNUT.py +++ b/scripts/python/module/PyNUT.py @@ -35,9 +35,16 @@ # 2012-02-07 René Martín Rodríguez - Version 1.2.2 # Added support for LIST CLIENTS command # +# 2014-06-03 george2 - Version 1.3.0 +# Added custom exception class, fixed minor bug, added Python 3 support. +# import telnetlib +class PyNUTError( Exception ) : + """ Base class for custom exceptions """ + + class PyNUTClient : """ Abstraction class to access NUT (Network UPS Tools) server """ @@ -49,8 +56,8 @@ class PyNUTClient : __timeout = None __srv_handler = None - __version = "1.2.2" - __release = "2012-02-07" + __version = "1.3.0" + __release = "2014-06-03" def __init__( self, host="127.0.0.1", port=3493, login=None, password=None, debug=False, timeout=5 ) : @@ -101,13 +108,13 @@ if something goes wrong. self.__srv_handler.write( "USERNAME %s\n" % self.__login ) result = self.__srv_handler.read_until( "\n", self.__timeout ) if result[:2] != "OK" : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) if self.__password != None : self.__srv_handler.write( "PASSWORD %s\n" % self.__password ) result = self.__srv_handler.read_until( "\n", self.__timeout ) if result[:2] != "OK" : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) def GetUPSList( self ) : """ Returns the list of available UPS from the NUT server @@ -120,7 +127,7 @@ The result is a dictionary containing 'key->val' pairs of 'UPSName' and 'UPS Des self.__srv_handler.write( "LIST UPS\n" ) result = self.__srv_handler.read_until( "\n" ) if result != "BEGIN LIST UPS\n" : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) result = self.__srv_handler.read_until( "END LIST UPS\n" ) ups_list = {} @@ -144,7 +151,7 @@ available vars. self.__srv_handler.write( "LIST VAR %s\n" % ups ) result = self.__srv_handler.read_until( "\n" ) if result != "BEGIN LIST VAR %s\n" % ups : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) ups_vars = {} result = self.__srv_handler.read_until( "END LIST VAR %s\n" % ups ) @@ -170,7 +177,7 @@ of the command as value self.__srv_handler.write( "LIST CMD %s\n" % ups ) result = self.__srv_handler.read_until( "\n" ) if result != "BEGIN LIST CMD %s\n" % ups : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) ups_cmds = {} result = self.__srv_handler.read_until( "END LIST CMD %s\n" % ups ) @@ -185,7 +192,7 @@ of the command as value self.__srv_handler.write( "GET CMDDESC %s %s\n" % ( ups, var ) ) temp = self.__srv_handler.read_until( "\n" ) if temp[:7] != "CMDDESC" : - raise + raise PyNUTError else : off = len( "CMDDESC %s %s " % ( ups, var ) ) desc = temp[off:-1].split('"')[1] @@ -207,7 +214,7 @@ The result is presented as a dictionary containing 'key->val' pairs self.__srv_handler.write( "LIST RW %s\n" % ups ) result = self.__srv_handler.read_until( "\n" ) if ( result != "BEGIN LIST RW %s\n" % ups ) : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) result = self.__srv_handler.read_until( "END LIST RW %s\n" % ups ) offset = len( "VAR %s" % ups ) @@ -237,7 +244,7 @@ rights to set it (maybe login/password). if ( result == "OK\n" ) : return( "OK" ) else : - raise Exception, result + raise PyNUTError( result ) def RunUPSCommand( self, ups="", command="" ) : """ Send a command to the specified UPS @@ -253,7 +260,7 @@ Returns OK on success or raises an error if ( result == "OK\n" ) : return( "OK" ) else : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) def FSD( self, ups="") : """ Send FSD command @@ -267,7 +274,7 @@ Returns OK on success or raises an error self.__srv_handler.write( "MASTER %s\n" % ups ) result = self.__srv_handler.read_until( "\n" ) if ( result != "OK MASTER-GRANTED\n" ) : - raise Exception, ( "Master level function are not available", "" ) + raise PyNUTError( ( "Master level function are not available", "" ) ) if self.__debug : print( "[DEBUG] FSD called..." ) @@ -276,7 +283,7 @@ Returns OK on success or raises an error if ( result == "OK FSD-SET\n" ) : return( "OK" ) else : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) def help(self) : """ Send HELP command @@ -307,7 +314,7 @@ The result is a dictionary containing 'key->val' pairs of 'UPSName' and a list o print( "[DEBUG] ListClients from server" ) if ups and (ups not in self.GetUPSList()): - raise Exception, "%s is not a valid UPS" % ups + raise PyNUTError( "%s is not a valid UPS" % ups ) if ups: self.__srv_handler.write( "LIST CLIENTS %s\n" % ups) @@ -315,7 +322,7 @@ The result is a dictionary containing 'key->val' pairs of 'UPSName' and a list o self.__srv_handler.write( "LIST CLIENTS\n" ) result = self.__srv_handler.read_until( "\n" ) if result != "BEGIN LIST CLIENTS\n" : - raise Exception, result.replace( "\n", "" ) + raise PyNUTError( result.replace( "\n", "" ) ) result = self.__srv_handler.read_until( "END LIST CLIENTS\n" ) ups_list = {} diff --git a/scripts/subdriver/gen-snmp-subdriver.sh b/scripts/subdriver/gen-snmp-subdriver.sh index b9aa44f..92d18d5 100755 --- a/scripts/subdriver/gen-snmp-subdriver.sh +++ b/scripts/subdriver/gen-snmp-subdriver.sh @@ -67,11 +67,14 @@ TMP_STRWALKFILE=`mktemp "$TMPDIR/$NAME-TMP-STRWALK.XXXXXX"` get_snmp_data() { # 1) get the sysOID (points the mfr specif MIB) - SYSOID=`snmpget -v1 -c $COMMUNITY $HOSTNAME .1.3.6.1.2.1.1.2.0 41` + SYSOID=`snmpget -v1 -c $COMMUNITY -Ov $HOSTNAME .1.3.6.1.2.1.1.2.0 | cut -d' ' -f2` + + echo "sysOID retrieved: ${SYSOID}" # 2) get the content of the mfr specif MIB + echo "Retrieving SNMP information. This may take some time" snmpwalk -On -v1 -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_NUMWALKFILE - snmpwalk -Os -v1 -M $MIBS_DIRLIST -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_STRWALKFILE + snmpwalk -Os -v1 -m ALL -M $MIBS_DIRLIST -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_STRWALKFILE } # process command line options @@ -80,7 +83,7 @@ while [ $# -gt 0 ]; do DRIVER="$2" shift 2 elif [ $# -gt 1 -a "$1" = "-M" ]; then - MIBS_DIRLIST="$MIBS_DIRLIST:$2" + MIBS_DIRLIST="+$2" shift 2 elif [ "$1" = "-k" ]; then KEEP=yes @@ -340,8 +343,8 @@ Done. Do not forget to: * bump DRIVER_VERSION in snmp-ups.c (add "0.01") * copy "${HFILE}" and "${CFILE}" to "../../drivers" -* add #include "${HFILE}" to snmp-ups.c -* add &${LDRIVER} to snmp-ups.c:mib2nut[] list, +* add #include "${HFILE}" to drivers/snmp-ups.c +* add &${LDRIVER} to drivers/snmp-ups.c:mib2nut[] list, * add ${LDRIVER}-mib.c to snmp_ups_SOURCES in drivers/Makefile.am * add ${LDRIVER}-mib.h to dist_noinst_HEADERS in drivers/Makefile.am * "./autogen.sh && ./configure && make" from the top level directory diff --git a/scripts/systemd/Makefile.in b/scripts/systemd/Makefile.in index d90e262..252ff39 100644 --- a/scripts/systemd/Makefile.in +++ b/scripts/systemd/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +16,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -57,10 +84,11 @@ target_triplet = @target@ @HAVE_SYSTEMD_FALSE@ nut-server.service.in nutshutdown.in subdir = scripts/systemd -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/nut-driver.service.in \ $(srcdir)/nut-monitor.service.in \ - $(srcdir)/nut-server.service.in $(srcdir)/nutshutdown.in + $(srcdir)/nut-server.service.in $(srcdir)/nutshutdown.in \ + README 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 \ @@ -120,6 +148,18 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(systemdsystemshutdowndir)" \ "$(DESTDIR)$(systemdsystemunitdir)" SCRIPTS = $(systemdsystemshutdown_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -128,10 +168,12 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(systemdsystemunit_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -238,12 +280,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -288,6 +333,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -419,11 +465,11 @@ uninstall-systemdsystemunitDATA: @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -564,17 +610,17 @@ uninstall-am: uninstall-systemdsystemshutdownSCRIPTS \ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir 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 \ - install-systemdsystemshutdownSCRIPTS \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir 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 install-systemdsystemshutdownSCRIPTS \ install-systemdsystemunitDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am \ + ps ps-am tags-am uninstall uninstall-am \ uninstall-systemdsystemshutdownSCRIPTS \ uninstall-systemdsystemunitDATA diff --git a/scripts/systemd/nut-server.service.in b/scripts/systemd/nut-server.service.in index edcaf10..dada977 100644 --- a/scripts/systemd/nut-server.service.in +++ b/scripts/systemd/nut-server.service.in @@ -1,7 +1,10 @@ [Unit] Description=Network UPS Tools - power devices information server After=local-fs.target network.target nut-driver.service -Requires=nut-driver.service +# We don't Require drivers to be successfully started! This would be +# a change of behavior compared to init SysV, and could prevent from +# accessing successfully started, at least to audit a system. +#Requires=nut-driver.service Before=nut-monitor.service [Service] diff --git a/scripts/udev/Makefile.am b/scripts/udev/Makefile.am index fcd6eeb..1973ccf 100644 --- a/scripts/udev/Makefile.am +++ b/scripts/udev/Makefile.am @@ -3,7 +3,7 @@ if WITH_UDEV udevrulesdir = $(udevdir)/rules.d udevrules_DATA = if WITH_USB - udevrules_DATA += 52-nut-usbups.rules + udevrules_DATA += 62-nut-usbups.rules endif if WITH_IPMI udevrules_DATA += 52-nut-ipmipsu.rules @@ -12,13 +12,13 @@ endif EXTRA_DIST = README -52-nut-usbups.rules: nut-usbups.rules - cp nut-usbups.rules 52-nut-usbups.rules +62-nut-usbups.rules: nut-usbups.rules + cp nut-usbups.rules $@ 52-nut-ipmipsu.rules: nut-ipmipsu.rules - cp nut-ipmipsu.rules 52-nut-ipmipsu.rules + cp nut-ipmipsu.rules $@ DISTCLEANFILES = nut-usbups.rules nut-ipmipsu.rules -CLEANFILES = 52-nut-usbups.rules 52-nut-ipmipsu.rules +CLEANFILES = 62-nut-usbups.rules 52-nut-ipmipsu.rules # we should never remove this one, apart from a distclean-check #MAINTAINERCLEANFILES = nut-usbups.rules.in diff --git a/scripts/udev/Makefile.in b/scripts/udev/Makefile.in index c222218..33dd60d 100644 --- a/scripts/udev/Makefile.in +++ b/scripts/udev/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,11 +79,12 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@WITH_UDEV_TRUE@@WITH_USB_TRUE@am__append_1 = 52-nut-usbups.rules +@WITH_UDEV_TRUE@@WITH_USB_TRUE@am__append_1 = 62-nut-usbups.rules @WITH_IPMI_TRUE@@WITH_UDEV_TRUE@am__append_2 = 52-nut-ipmipsu.rules subdir = scripts/udev -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/nut-ipmipsu.rules.in $(srcdir)/nut-usbups.rules.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/nut-ipmipsu.rules.in $(srcdir)/nut-usbups.rules.in \ + README 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 \ @@ -85,6 +113,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = nut-ipmipsu.rules nut-usbups.rules CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -121,10 +161,12 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(udevrulesdir)" DATA = $(udevrules_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -231,12 +273,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -281,6 +326,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -306,7 +352,7 @@ udevdir = @udevdir@ @WITH_UDEV_TRUE@udevrules_DATA = $(am__append_1) $(am__append_2) EXTRA_DIST = README DISTCLEANFILES = nut-usbups.rules nut-ipmipsu.rules -CLEANFILES = 52-nut-usbups.rules 52-nut-ipmipsu.rules +CLEANFILES = 62-nut-usbups.rules 52-nut-ipmipsu.rules all: all-am .SUFFIXES: @@ -371,11 +417,11 @@ uninstall-udevrulesDATA: @list='$(udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(udevrulesdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) @@ -516,23 +562,24 @@ uninstall-am: uninstall-udevrulesDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir 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 \ - install-udevrulesDATA installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-udevrulesDATA + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir 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 install-udevrulesDATA installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-udevrulesDATA -52-nut-usbups.rules: nut-usbups.rules - cp nut-usbups.rules 52-nut-usbups.rules +62-nut-usbups.rules: nut-usbups.rules + cp nut-usbups.rules $@ 52-nut-ipmipsu.rules: nut-ipmipsu.rules - cp nut-ipmipsu.rules 52-nut-ipmipsu.rules + cp nut-ipmipsu.rules $@ # we should never remove this one, apart from a distclean-check #MAINTAINERCLEANFILES = nut-usbups.rules.in diff --git a/scripts/udev/README b/scripts/udev/README index a3b5567..ff6a1a0 100644 --- a/scripts/udev/README +++ b/scripts/udev/README @@ -1,6 +1,6 @@ Desc: Udev script for NUT USB and IPMI drivers File: scripts/udev/README -Date: 25 July 2011 +Date: 31 July 2014 Auth: Arnaud Quette This document introduces the Linux udev script for NUT USB @@ -32,7 +32,7 @@ Manual installation To install them manually, copy the rules file(s) to /etc/udev/rules.d (or /lib/udev/rules.d on newer systems) using the command(s): -$ cp -f nut-usbups.rules /etc/udev/rules.d/52-nut-usbups.rules +$ cp -f nut-usbups.rules /etc/udev/rules.d/62-nut-usbups.rules $ cp -f nut-ipmipsu.rules /etc/udev/rules.d/52-nut-ipmipsu.rules You will need to refresh the bus to avoid a reboot for these rules to be diff --git a/scripts/udev/nut-usbups.rules.in b/scripts/udev/nut-usbups.rules.in index d8961dd..1ac601d 100644 --- a/scripts/udev/nut-usbups.rules.in +++ b/scripts/udev/nut-usbups.rules.in @@ -58,6 +58,8 @@ ATTR{idVendor}=="04b4", ATTR{idProduct}=="5500", MODE="664", GROUP="@RUN_AS_GROU # Minibox # openUPS Intelligent UPS (minimum required firmware 1.4) - usbhid-ups ATTR{idVendor}=="04d8", ATTR{idProduct}=="d004", MODE="664", GROUP="@RUN_AS_GROUP@" +# openUPS Intelligent UPS (minimum required firmware 1.4) - usbhid-ups +ATTR{idVendor}=="04d8", ATTR{idProduct}=="d005", MODE="664", GROUP="@RUN_AS_GROUP@" # Belkin # F6H375-USB - usbhid-ups @@ -76,10 +78,14 @@ ATTR{idVendor}=="050d", ATTR{idProduct}=="0910", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="050d", ATTR{idProduct}=="0912", MODE="664", GROUP="@RUN_AS_GROUP@" # F6C800-UNV - usbhid-ups ATTR{idVendor}=="050d", ATTR{idProduct}=="0980", MODE="664", GROUP="@RUN_AS_GROUP@" +# Regulator PRO-USB - usbhid-ups +ATTR{idVendor}=="050d", ATTR{idProduct}=="0f51", MODE="664", GROUP="@RUN_AS_GROUP@" # F6C1100-UNV, F6C1200-UNV - usbhid-ups ATTR{idVendor}=="050d", ATTR{idProduct}=="1100", MODE="664", GROUP="@RUN_AS_GROUP@" # APC +# APC AP9584 Serial->USB kit - usbhid-ups +ATTR{idVendor}=="051d", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROUP@" # various models - usbhid-ups ATTR{idVendor}=="051d", ATTR{idProduct}=="0002", MODE="664", GROUP="@RUN_AS_GROUP@" # various 5G models - usbhid-ups @@ -96,7 +102,7 @@ ATTR{idVendor}=="05b8", ATTR{idProduct}=="0000", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="@RUN_AS_GROUP@" # Phoenixtec Power Co., Ltd -# Online Yunto YQ450 - blazer_usb +# various models - bcmxcp_usb ATTR{idVendor}=="06da", ATTR{idProduct}=="0002", MODE="664", GROUP="@RUN_AS_GROUP@" # Mustek Powermust - blazer_usb ATTR{idVendor}=="06da", ATTR{idProduct}=="0003", MODE="664", GROUP="@RUN_AS_GROUP@" @@ -116,9 +122,9 @@ ATTR{idVendor}=="06da", ATTR{idProduct}=="ffff", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="075d", ATTR{idProduct}=="0300", MODE="664", GROUP="@RUN_AS_GROUP@" # Cyber Power Systems -# 900AVR/BC900D, CP1200AVR/BC1200D - usbhid-ups +# 900AVR/BC900D - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0005", MODE="664", GROUP="@RUN_AS_GROUP@" -# Dynex DX-800U? - usbhid-ups +# Dynex DX-800U?, CP1200AVR/BC1200D, CP825AVR-G, CP1000AVRLCD, CP1000PFCLCD, CP1500C, CP550HG, etc. - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664", GROUP="@RUN_AS_GROUP@" # OR2200LCDRM2U, OR700LCDRM1U, PR6000LCDRTXL5U - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0601", MODE="664", GROUP="@RUN_AS_GROUP@" @@ -193,6 +199,8 @@ ATTR{idVendor}=="09ae", ATTR{idProduct}=="4008", MODE="664", GROUP="@RUN_AS_GROU # PowerCOM # PowerCOM Vanguard and BNT-xxxAP - usbhid-ups +ATTR{idVendor}=="0d9f", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" +# PowerCOM Vanguard and BNT-xxxAP - usbhid-ups ATTR{idVendor}=="0d9f", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" # PowerCOM IMP - IMPERIAL Series - usbhid-ups ATTR{idVendor}=="0d9f", ATTR{idProduct}=="00a2", MODE="664", GROUP="@RUN_AS_GROUP@" @@ -212,6 +220,8 @@ ATTR{idVendor}=="0f03", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROU ATTR{idVendor}=="10af", ATTR{idProduct}=="0001", MODE="664", GROUP="@RUN_AS_GROUP@" # Liebert PowerSure PSI 1440 - usbhid-ups ATTR{idVendor}=="10af", ATTR{idProduct}=="0004", MODE="664", GROUP="@RUN_AS_GROUP@" +# Liebert GXT3 - usbhid-ups +ATTR{idVendor}=="10af", ATTR{idProduct}=="0008", MODE="664", GROUP="@RUN_AS_GROUP@" # GE EP series - blazer_usb ATTR{idVendor}=="14f0", ATTR{idProduct}=="00c9", MODE="664", GROUP="@RUN_AS_GROUP@" # Ablerex 625L USB - blazer_usb diff --git a/scripts/upower/95-upower-hid.rules b/scripts/upower/95-upower-hid.rules index 31ffec2..a407b53 100644 --- a/scripts/upower/95-upower-hid.rules +++ b/scripts/upower/95-upower-hid.rules @@ -1,7 +1,7 @@ ############################################################################################################## # Uninterruptible Power Supplies with USB HID interfaces # -# to keep up to date, monitor: http://svn.debian.org/wsvn/nut/trunk/scripts/upower/95-upower-hid.rules +# to keep up to date, monitor https://github.com/networkupstools/nut/commits/master/scripts/upower/95-upower-hid.rules # only support USB, else ignore SUBSYSTEM!="usb", GOTO="up_hid_end" @@ -50,6 +50,7 @@ ATTRS{idVendor}=="047c", ATTRS{idProduct}=="ffff", ENV{UPOWER_BATTERY_TYPE}="ups # Minibox ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="d004", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="d005", ENV{UPOWER_BATTERY_TYPE}="ups" # Belkin ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0375", ENV{UPOWER_BATTERY_TYPE}="ups" @@ -60,9 +61,11 @@ ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0900", ENV{UPOWER_BATTERY_TYPE}="ups ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0910", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0912", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0980", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0f51", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="050d", ATTRS{idProduct}=="1100", ENV{UPOWER_BATTERY_TYPE}="ups" # APC +ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0000", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0002", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0003", ENV{UPOWER_BATTERY_TYPE}="ups" @@ -114,6 +117,7 @@ ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4007", ENV{UPOWER_BATTERY_TYPE}="ups ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4008", ENV{UPOWER_BATTERY_TYPE}="ups" # PowerCOM +ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="0001", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="0004", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a2", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a3", ENV{UPOWER_BATTERY_TYPE}="ups" @@ -124,5 +128,6 @@ ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a6", ENV{UPOWER_BATTERY_TYPE}="ups # Liebert ATTRS{idVendor}=="10af", ATTRS{idProduct}=="0001", ENV{UPOWER_BATTERY_TYPE}="ups" ATTRS{idVendor}=="10af", ATTRS{idProduct}=="0004", ENV{UPOWER_BATTERY_TYPE}="ups" +ATTRS{idVendor}=="10af", ATTRS{idProduct}=="0008", ENV{UPOWER_BATTERY_TYPE}="ups" LABEL="up_hid_end" diff --git a/server/Makefile.in b/server/Makefile.in index b6c8d7d..398db3f 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +17,51 @@ # Network UPS Tools: server VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -61,7 +88,8 @@ target_triplet = @target@ sbin_PROGRAMS = upsd$(EXEEXT) EXTRA_PROGRAMS = sockdebug$(EXEEXT) subdir = server -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp 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 \ @@ -101,6 +129,10 @@ am__DEPENDENCIES_1 = sockdebug_DEPENDENCIES = ../common/libcommon.la \ ../common/libparseconf.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = am_upsd_OBJECTS = upsd.$(OBJEXT) user.$(OBJEXT) conf.$(OBJEXT) \ netssl.$(OBJEXT) sstate.$(OBJEXT) desc.$(OBJEXT) \ netget.$(OBJEXT) netmisc.$(OBJEXT) netlist.$(OBJEXT) \ @@ -110,19 +142,40 @@ upsd_LDADD = $(LDADD) upsd_DEPENDENCIES = ../common/libcommon.la ../common/libparseconf.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(sockdebug_SOURCES) $(upsd_SOURCES) DIST_SOURCES = $(sockdebug_SOURCES) $(upsd_SOURCES) am__can_run_installinfo = \ @@ -130,12 +183,30 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -242,12 +313,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -292,6 +366,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -370,10 +445,12 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS) 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; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -394,7 +471,8 @@ uninstall-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files @@ -407,12 +485,14 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + sockdebug$(EXEEXT): $(sockdebug_OBJECTS) $(sockdebug_DEPENDENCIES) $(EXTRA_sockdebug_DEPENDENCIES) @rm -f sockdebug$(EXEEXT) - $(LINK) $(sockdebug_OBJECTS) $(sockdebug_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(sockdebug_OBJECTS) $(sockdebug_LDADD) $(LIBS) + upsd$(EXEEXT): $(upsd_OBJECTS) $(upsd_DEPENDENCIES) $(EXTRA_upsd_DEPENDENCIES) @rm -f upsd$(EXEEXT) - $(LINK) $(upsd_OBJECTS) $(upsd_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(upsd_OBJECTS) $(upsd_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -435,25 +515,28 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -461,26 +544,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -492,15 +564,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -509,6 +577,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -653,19 +736,19 @@ uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-sbinPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir 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-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir 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-sbinPROGRAMS install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-sbinPROGRAMS + tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/server/upsd.c b/server/upsd.c index 2c0d1a1..7dcda1d 100644 --- a/server/upsd.c +++ b/server/upsd.c @@ -1004,9 +1004,6 @@ int main(int argc, char **argv) /* start server */ server_load(); - /* initialize SSL before we drop privileges (we may not be able to read the keyfile as non-root) */ - ssl_init(); - become_user(new_uid); if (chdir(statepath)) { @@ -1038,6 +1035,9 @@ int main(int argc, char **argv) memset(pidfn, 0, sizeof(pidfn)); } + /* initialize SSL (keyfile must be readable by nut user) */ + ssl_init(); + while (!exit_flag) { mainloop(); } diff --git a/test-driver b/test-driver new file mode 100755 index 0000000..d306056 --- /dev/null +++ b/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 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 +# the Free Software Foundation; either version 2, 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/tests/Makefile.in b/tests/Makefile.in index 1e9772c..ac73f55 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +16,51 @@ # Network UPS Tools: tests VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -56,7 +83,8 @@ target_triplet = @target@ @HAVE_CPPUNIT_TRUE@TESTS = cppunittest$(EXEEXT) @HAVE_CPPUNIT_TRUE@check_PROGRAMS = $(am__EXEEXT_1) subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(top_srcdir)/test-driver 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 \ @@ -92,22 +120,47 @@ am__cppunittest_SOURCES_DIST = example.cpp cpputest.cpp @HAVE_CPPUNIT_TRUE@ cppunittest-cpputest.$(OBJEXT) cppunittest_OBJECTS = $(am_cppunittest_OBJECTS) cppunittest_LDADD = $(LDADD) -cppunittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +cppunittest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(cppunittest_CXXFLAGS) \ $(CXXFLAGS) $(cppunittest_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f 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) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(cppunittest_SOURCES) DIST_SOURCES = $(am__cppunittest_SOURCES_DIST) am__can_run_installinfo = \ @@ -115,14 +168,234 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +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__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -229,12 +502,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -279,6 +555,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -310,7 +587,7 @@ udevdir = @udevdir@ all: all-am .SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj +.SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -350,9 +627,10 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + cppunittest$(EXEEXT): $(cppunittest_OBJECTS) $(cppunittest_DEPENDENCIES) $(EXTRA_cppunittest_DEPENDENCIES) @rm -f cppunittest$(EXEEXT) - $(cppunittest_LINK) $(cppunittest_OBJECTS) $(cppunittest_LDADD) $(LIBS) + $(AM_V_CXXLD)$(cppunittest_LINK) $(cppunittest_OBJECTS) $(cppunittest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -364,53 +642,56 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppunittest-example.Po@am__quote@ .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@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(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@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(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@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< cppunittest-example.o: example.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.o -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='example.cpp' object='cppunittest-example.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.o -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='example.cpp' object='cppunittest-example.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp cppunittest-example.obj: example.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.obj -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='example.cpp' object='cppunittest-example.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-example.obj -MD -MP -MF $(DEPDIR)/cppunittest-example.Tpo -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cppunittest-example.Tpo $(DEPDIR)/cppunittest-example.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='example.cpp' object='cppunittest-example.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi` cppunittest-cpputest.o: cpputest.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.o -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cpputest.cpp' object='cppunittest-cpputest.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.o -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpputest.cpp' object='cppunittest-cpputest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.o `test -f 'cpputest.cpp' || echo '$(srcdir)/'`cpputest.cpp cppunittest-cpputest.obj: cpputest.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.obj -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cpputest.cpp' object='cppunittest-cpputest.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -MT cppunittest-cpputest.obj -MD -MP -MF $(DEPDIR)/cppunittest-cpputest.Tpo -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cppunittest-cpputest.Tpo $(DEPDIR)/cppunittest-cpputest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpputest.cpp' object='cppunittest-cpputest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cppunittest_CXXFLAGS) $(CXXFLAGS) -c -o cppunittest-cpputest.obj `if test -f 'cpputest.cpp'; then $(CYGPATH_W) 'cpputest.cpp'; else $(CYGPATH_W) '$(srcdir)/cpputest.cpp'; fi` mostlyclean-libtool: -rm -f *.lo @@ -418,26 +699,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -449,15 +719,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -466,102 +732,187 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + color_start= color_end=; \ fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +cppunittest.log: cppunittest$(EXEEXT) + @p='cppunittest$(EXEEXT)'; \ + b='cppunittest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -619,6 +970,9 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: @@ -702,9 +1056,9 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool ctags \ - distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -714,7 +1068,7 @@ uninstall-am: installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + recheck tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/Makefile.am b/tools/Makefile.am index 0e6501e..f8add46 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -16,7 +16,8 @@ # sub-directory SUBDIRS = . nut-scanner -EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh gitlog2changelog.py nut-snmpinfo.py +EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh nut-ddl-dump.sh \ + gitlog2changelog.py nut-snmpinfo.py all: nut-scanner-deps diff --git a/tools/Makefile.in b/tools/Makefile.in index dcbf07d..d132e0d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +16,51 @@ # TODO: remove redundancies! VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,7 +81,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = tools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am 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 \ @@ -83,15 +110,28 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -99,9 +139,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -134,6 +194,7 @@ am__relativize = \ A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -240,12 +301,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -290,6 +354,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -327,7 +392,9 @@ udevdir = @udevdir@ # to have nutscan-{usb,snmp}.h built before going into the nut-scanner # sub-directory SUBDIRS = . nut-scanner -EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh gitlog2changelog.py nut-snmpinfo.py +EXTRA_DIST = nut-usbinfo.pl nut-recorder.sh nut-ddl-dump.sh \ + gitlog2changelog.py nut-snmpinfo.py + all: all-recursive .SUFFIXES: @@ -369,22 +436,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -399,57 +469,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -465,12 +490,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -482,15 +502,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -499,6 +515,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -662,12 +693,11 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive dist-hook distclean distclean-generic \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am dist-hook distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -676,8 +706,8 @@ uninstall-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 + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am all: nut-scanner-deps diff --git a/tools/nut-ddl-dump.sh b/tools/nut-ddl-dump.sh new file mode 100755 index 0000000..dce1e8a --- /dev/null +++ b/tools/nut-ddl-dump.sh @@ -0,0 +1,53 @@ +#!/bin/sh +################################################################################ +# A script to ease the generation of NUT device dumps for NUT Devices Dumps Library +################################################################################ +# Author: (C) Arnaud Quette +# License: GPL v2+ +################################################################################ +# FIXME: +# - check if a previous report exists, and increase report number +#  - we currently use the .dev format ; but also consider the NDS format +# http://www.networkupstools.org/ddl/ +################################################################################ + +strUsage="Usage: $0 " + +# Check command line parameter () +if [ -z "$1" ]; then + echo "$strUsage" + exit +else + DDL_DEVICE_NAME=$1 +fi + +# Test communication with the device +testResult="`upsc ${DDL_DEVICE_NAME} 2> /dev/null`" +if [ $? -gt 0 ]; then + echo "Can't communicate with ${DDL_DEVICE_NAME}" + exit +fi + +# Build the filename +# ________. +# Process the Manufacturer name +RAW_DDL_MFR="`upsc ${DDL_DEVICE_NAME} device.mfr 2>/dev/null`" +if [ "${RAW_DDL_MFR}" = "EATON" ]; then + RAW_DDL_MFR="Eaton" +fi +# Replace spaces with underscores +DDL_MFR="`echo ${RAW_DDL_MFR} | sed s/\ /_/g`" +# Process the Model name +# Replace spaces with underscores +RAW_DDL_MODEL="`upsc ${DDL_DEVICE_NAME} device.model 2>/dev/null`" +DDL_MODEL="`echo ${RAW_DDL_MODEL} | sed s/\ /_/g`" +# Process the driver name and NUT version +DDL_DRIVER_NAME="`upsc ${DDL_DEVICE_NAME} driver.name 2>/dev/null`" +DDL_NUT_VERSION="`upsc ${DDL_DEVICE_NAME} driver.version 2>/dev/null`" +# TODO: check if a similar file exists, to update Report nb +DDL_REPORT_NUMBER="01" +DDL_FILENAME="${DDL_MFR}__${DDL_MODEL}__${DDL_DRIVER_NAME}__${DDL_NUT_VERSION}__${DDL_REPORT_NUMBER}.dev" + +# Dump device data into the file +echo "${testResult}" > ${DDL_FILENAME} +echo "${DDL_FILENAME} generated using ${DDL_DEVICE_NAME} " diff --git a/tools/nut-scanner/Makefile.am b/tools/nut-scanner/Makefile.am index 56278ee..558cb23 100644 --- a/tools/nut-scanner/Makefile.am +++ b/tools/nut-scanner/Makefile.am @@ -12,9 +12,9 @@ libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \ nutscan-device.c nutscan-ip.c nutscan-display.c \ nutscan-init.c scan_usb.c scan_snmp.c scan_xml_http.c \ scan_avahi.c scan_eaton_serial.c nutscan-serial.c \ - $(top_srcdir)/drivers/serial.c \ - $(top_srcdir)/drivers/bcmxcp_ser.c \ - $(top_srcdir)/common/common.c + ../../drivers/serial.c \ + ../../drivers/bcmxcp_ser.c \ + ../../common/common.c libnutscan_la_LIBADD = $(NETLIBS) $(LIBLTDL_LIBS) libnutscan_la_LDFLAGS = $(SERLIBS) -version-info 1:0:0 libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include $(LIBLTDL_CFLAGS) -I$(top_srcdir)/drivers diff --git a/tools/nut-scanner/Makefile.in b/tools/nut-scanner/Makefile.in index dedf63c..3ff07cd 100644 --- a/tools/nut-scanner/Makefile.in +++ b/tools/nut-scanner/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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,23 +17,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -64,9 +91,9 @@ target_triplet = @target@ @WITH_IPMI_TRUE@am__append_7 = $(LIBIPMI_CFLAGS) @WITH_DEV_FALSE@am__append_8 = nut-scan.h nutscan-device.h nutscan-ip.h nutscan-init.h nutscan-serial.h subdir = tools/nut-scanner -DIST_COMMON = README $(am__dist_noinst_HEADERS_DIST) \ - $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(am__dist_noinst_HEADERS_DIST) \ + $(am__include_HEADERS_DIST) README 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 \ @@ -129,16 +156,23 @@ am__DEPENDENCIES_1 = @WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) libnutscan_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +am__dirstamp = $(am__leading_dot)dirstamp am_libnutscan_la_OBJECTS = libnutscan_la-scan_nut.lo \ libnutscan_la-scan_ipmi.lo libnutscan_la-nutscan-device.lo \ libnutscan_la-nutscan-ip.lo libnutscan_la-nutscan-display.lo \ libnutscan_la-nutscan-init.lo libnutscan_la-scan_usb.lo \ libnutscan_la-scan_snmp.lo libnutscan_la-scan_xml_http.lo \ libnutscan_la-scan_avahi.lo libnutscan_la-scan_eaton_serial.lo \ - libnutscan_la-nutscan-serial.lo libnutscan_la-serial.lo \ - libnutscan_la-bcmxcp_ser.lo libnutscan_la-common.lo + libnutscan_la-nutscan-serial.lo \ + ../../drivers/libnutscan_la-serial.lo \ + ../../drivers/libnutscan_la-bcmxcp_ser.lo \ + ../../common/libnutscan_la-common.lo libnutscan_la_OBJECTS = $(am_libnutscan_la_OBJECTS) -libnutscan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libnutscan_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libnutscan_la_CFLAGS) \ $(CFLAGS) $(libnutscan_la_LDFLAGS) $(LDFLAGS) -o $@ @WITH_LIBLTDL_TRUE@am_libnutscan_la_rpath = -rpath $(libdir) @@ -146,22 +180,43 @@ PROGRAMS = $(bin_PROGRAMS) am_nut_scanner_OBJECTS = nut_scanner-nut-scanner.$(OBJEXT) nut_scanner_OBJECTS = $(am_nut_scanner_OBJECTS) nut_scanner_DEPENDENCIES = libnutscan.la ../../common/libcommon.la -nut_scanner_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +nut_scanner_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(nut_scanner_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libnutscan_la_SOURCES) $(nut_scanner_SOURCES) DIST_SOURCES = $(libnutscan_la_SOURCES) $(nut_scanner_SOURCES) am__can_run_installinfo = \ @@ -174,12 +229,30 @@ am__dist_noinst_HEADERS_DIST = nutscan-usb.h nutscan-snmp.h nut-scan.h \ am__include_HEADERS_DIST = nut-scan.h nutscan-device.h nutscan-ip.h \ nutscan-init.h HEADERS = $(dist_noinst_HEADERS) $(include_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ @@ -286,12 +359,15 @@ SED = @SED@ SERLIBS = @SERLIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -336,6 +412,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +now = @now@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ @@ -363,9 +440,9 @@ libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \ nutscan-device.c nutscan-ip.c nutscan-display.c \ nutscan-init.c scan_usb.c scan_snmp.c scan_xml_http.c \ scan_avahi.c scan_eaton_serial.c nutscan-serial.c \ - $(top_srcdir)/drivers/serial.c \ - $(top_srcdir)/drivers/bcmxcp_ser.c \ - $(top_srcdir)/common/common.c + ../../drivers/serial.c \ + ../../drivers/bcmxcp_ser.c \ + ../../common/common.c libnutscan_la_LIBADD = $(NETLIBS) $(LIBLTDL_LIBS) $(am__append_2) libnutscan_la_LDFLAGS = $(SERLIBS) -version-info 1:0:0 @@ -414,6 +491,7 @@ $(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): + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -440,14 +518,36 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +../../drivers/$(am__dirstamp): + @$(MKDIR_P) ../../drivers + @: > ../../drivers/$(am__dirstamp) +../../drivers/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../../drivers/$(DEPDIR) + @: > ../../drivers/$(DEPDIR)/$(am__dirstamp) +../../drivers/libnutscan_la-serial.lo: ../../drivers/$(am__dirstamp) \ + ../../drivers/$(DEPDIR)/$(am__dirstamp) +../../drivers/libnutscan_la-bcmxcp_ser.lo: \ + ../../drivers/$(am__dirstamp) \ + ../../drivers/$(DEPDIR)/$(am__dirstamp) +../../common/$(am__dirstamp): + @$(MKDIR_P) ../../common + @: > ../../common/$(am__dirstamp) +../../common/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../../common/$(DEPDIR) + @: > ../../common/$(DEPDIR)/$(am__dirstamp) +../../common/libnutscan_la-common.lo: ../../common/$(am__dirstamp) \ + ../../common/$(DEPDIR)/$(am__dirstamp) + libnutscan.la: $(libnutscan_la_OBJECTS) $(libnutscan_la_DEPENDENCIES) $(EXTRA_libnutscan_la_DEPENDENCIES) - $(libnutscan_la_LINK) $(am_libnutscan_la_rpath) $(libnutscan_la_OBJECTS) $(libnutscan_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libnutscan_la_LINK) $(am_libnutscan_la_rpath) $(libnutscan_la_OBJECTS) $(libnutscan_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -457,10 +557,12 @@ install-binPROGRAMS: $(bin_PROGRAMS) 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; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -481,7 +583,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -494,18 +597,24 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + nut-scanner$(EXEEXT): $(nut_scanner_OBJECTS) $(nut_scanner_DEPENDENCIES) $(EXTRA_nut_scanner_DEPENDENCIES) @rm -f nut-scanner$(EXEEXT) - $(nut_scanner_LINK) $(nut_scanner_OBJECTS) $(nut_scanner_LDADD) $(LIBS) + $(AM_V_CCLD)$(nut_scanner_LINK) $(nut_scanner_OBJECTS) $(nut_scanner_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f ../../common/*.$(OBJEXT) + -rm -f ../../common/*.lo + -rm -f ../../drivers/*.$(OBJEXT) + -rm -f ../../drivers/*.lo distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-bcmxcp_ser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../../common/$(DEPDIR)/libnutscan_la-common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../../drivers/$(DEPDIR)/libnutscan_la-bcmxcp_ser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../../drivers/$(DEPDIR)/libnutscan_la-serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-nutscan-init.Plo@am__quote@ @@ -518,154 +627,158 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_snmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_usb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-scan_xml_http.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnutscan_la-serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nut_scanner-nut-scanner.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libnutscan_la-scan_nut.lo: scan_nut.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_nut.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_nut.Tpo -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_nut.Tpo $(DEPDIR)/libnutscan_la-scan_nut.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_nut.c' object='libnutscan_la-scan_nut.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_nut.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_nut.Tpo -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_nut.Tpo $(DEPDIR)/libnutscan_la-scan_nut.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_nut.c' object='libnutscan_la-scan_nut.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_nut.lo `test -f 'scan_nut.c' || echo '$(srcdir)/'`scan_nut.c libnutscan_la-scan_ipmi.lo: scan_ipmi.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_ipmi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo $(DEPDIR)/libnutscan_la-scan_ipmi.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_ipmi.c' object='libnutscan_la-scan_ipmi.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_ipmi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_ipmi.Tpo $(DEPDIR)/libnutscan_la-scan_ipmi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_ipmi.c' object='libnutscan_la-scan_ipmi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_ipmi.lo `test -f 'scan_ipmi.c' || echo '$(srcdir)/'`scan_ipmi.c libnutscan_la-nutscan-device.lo: nutscan-device.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-device.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-device.Tpo -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-device.Tpo $(DEPDIR)/libnutscan_la-nutscan-device.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-device.c' object='libnutscan_la-nutscan-device.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-device.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-device.Tpo -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-device.Tpo $(DEPDIR)/libnutscan_la-nutscan-device.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-device.c' object='libnutscan_la-nutscan-device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-device.lo `test -f 'nutscan-device.c' || echo '$(srcdir)/'`nutscan-device.c libnutscan_la-nutscan-ip.lo: nutscan-ip.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-ip.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo $(DEPDIR)/libnutscan_la-nutscan-ip.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-ip.c' object='libnutscan_la-nutscan-ip.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-ip.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-ip.Tpo $(DEPDIR)/libnutscan_la-nutscan-ip.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-ip.c' object='libnutscan_la-nutscan-ip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-ip.lo `test -f 'nutscan-ip.c' || echo '$(srcdir)/'`nutscan-ip.c libnutscan_la-nutscan-display.lo: nutscan-display.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-display.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-display.Tpo -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-display.Tpo $(DEPDIR)/libnutscan_la-nutscan-display.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-display.c' object='libnutscan_la-nutscan-display.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-display.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-display.Tpo -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-display.Tpo $(DEPDIR)/libnutscan_la-nutscan-display.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-display.c' object='libnutscan_la-nutscan-display.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-display.lo `test -f 'nutscan-display.c' || echo '$(srcdir)/'`nutscan-display.c libnutscan_la-nutscan-init.lo: nutscan-init.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-init.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-init.Tpo -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-init.Tpo $(DEPDIR)/libnutscan_la-nutscan-init.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-init.c' object='libnutscan_la-nutscan-init.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-init.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-init.Tpo -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-init.Tpo $(DEPDIR)/libnutscan_la-nutscan-init.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-init.c' object='libnutscan_la-nutscan-init.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-init.lo `test -f 'nutscan-init.c' || echo '$(srcdir)/'`nutscan-init.c libnutscan_la-scan_usb.lo: scan_usb.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_usb.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_usb.Tpo -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_usb.Tpo $(DEPDIR)/libnutscan_la-scan_usb.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_usb.c' object='libnutscan_la-scan_usb.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_usb.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_usb.Tpo -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_usb.Tpo $(DEPDIR)/libnutscan_la-scan_usb.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_usb.c' object='libnutscan_la-scan_usb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_usb.lo `test -f 'scan_usb.c' || echo '$(srcdir)/'`scan_usb.c libnutscan_la-scan_snmp.lo: scan_snmp.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_snmp.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_snmp.Tpo -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_snmp.Tpo $(DEPDIR)/libnutscan_la-scan_snmp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_snmp.c' object='libnutscan_la-scan_snmp.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_snmp.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_snmp.Tpo -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_snmp.Tpo $(DEPDIR)/libnutscan_la-scan_snmp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_snmp.c' object='libnutscan_la-scan_snmp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_snmp.lo `test -f 'scan_snmp.c' || echo '$(srcdir)/'`scan_snmp.c libnutscan_la-scan_xml_http.lo: scan_xml_http.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_xml_http.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo $(DEPDIR)/libnutscan_la-scan_xml_http.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_xml_http.c' object='libnutscan_la-scan_xml_http.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_xml_http.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_xml_http.Tpo $(DEPDIR)/libnutscan_la-scan_xml_http.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_xml_http.c' object='libnutscan_la-scan_xml_http.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_xml_http.lo `test -f 'scan_xml_http.c' || echo '$(srcdir)/'`scan_xml_http.c libnutscan_la-scan_avahi.lo: scan_avahi.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_avahi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_avahi.Tpo -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_avahi.Tpo $(DEPDIR)/libnutscan_la-scan_avahi.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_avahi.c' object='libnutscan_la-scan_avahi.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_avahi.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_avahi.Tpo -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_avahi.Tpo $(DEPDIR)/libnutscan_la-scan_avahi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_avahi.c' object='libnutscan_la-scan_avahi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_avahi.lo `test -f 'scan_avahi.c' || echo '$(srcdir)/'`scan_avahi.c libnutscan_la-scan_eaton_serial.lo: scan_eaton_serial.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_eaton_serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_eaton_serial.Tpo -c -o libnutscan_la-scan_eaton_serial.lo `test -f 'scan_eaton_serial.c' || echo '$(srcdir)/'`scan_eaton_serial.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-scan_eaton_serial.Tpo $(DEPDIR)/libnutscan_la-scan_eaton_serial.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan_eaton_serial.c' object='libnutscan_la-scan_eaton_serial.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-scan_eaton_serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-scan_eaton_serial.Tpo -c -o libnutscan_la-scan_eaton_serial.lo `test -f 'scan_eaton_serial.c' || echo '$(srcdir)/'`scan_eaton_serial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-scan_eaton_serial.Tpo $(DEPDIR)/libnutscan_la-scan_eaton_serial.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scan_eaton_serial.c' object='libnutscan_la-scan_eaton_serial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_eaton_serial.lo `test -f 'scan_eaton_serial.c' || echo '$(srcdir)/'`scan_eaton_serial.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-scan_eaton_serial.lo `test -f 'scan_eaton_serial.c' || echo '$(srcdir)/'`scan_eaton_serial.c libnutscan_la-nutscan-serial.lo: nutscan-serial.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-serial.Tpo -c -o libnutscan_la-nutscan-serial.lo `test -f 'nutscan-serial.c' || echo '$(srcdir)/'`nutscan-serial.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-nutscan-serial.Tpo $(DEPDIR)/libnutscan_la-nutscan-serial.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nutscan-serial.c' object='libnutscan_la-nutscan-serial.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-nutscan-serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-nutscan-serial.Tpo -c -o libnutscan_la-nutscan-serial.lo `test -f 'nutscan-serial.c' || echo '$(srcdir)/'`nutscan-serial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnutscan_la-nutscan-serial.Tpo $(DEPDIR)/libnutscan_la-nutscan-serial.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nutscan-serial.c' object='libnutscan_la-nutscan-serial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-serial.lo `test -f 'nutscan-serial.c' || echo '$(srcdir)/'`nutscan-serial.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-nutscan-serial.lo `test -f 'nutscan-serial.c' || echo '$(srcdir)/'`nutscan-serial.c -libnutscan_la-serial.lo: $(top_srcdir)/drivers/serial.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-serial.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-serial.Tpo -c -o libnutscan_la-serial.lo `test -f '$(top_srcdir)/drivers/serial.c' || echo '$(srcdir)/'`$(top_srcdir)/drivers/serial.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-serial.Tpo $(DEPDIR)/libnutscan_la-serial.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/drivers/serial.c' object='libnutscan_la-serial.lo' libtool=yes @AMDEPBACKSLASH@ +../../drivers/libnutscan_la-serial.lo: ../../drivers/serial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT ../../drivers/libnutscan_la-serial.lo -MD -MP -MF ../../drivers/$(DEPDIR)/libnutscan_la-serial.Tpo -c -o ../../drivers/libnutscan_la-serial.lo `test -f '../../drivers/serial.c' || echo '$(srcdir)/'`../../drivers/serial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../drivers/$(DEPDIR)/libnutscan_la-serial.Tpo ../../drivers/$(DEPDIR)/libnutscan_la-serial.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../drivers/serial.c' object='../../drivers/libnutscan_la-serial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-serial.lo `test -f '$(top_srcdir)/drivers/serial.c' || echo '$(srcdir)/'`$(top_srcdir)/drivers/serial.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o ../../drivers/libnutscan_la-serial.lo `test -f '../../drivers/serial.c' || echo '$(srcdir)/'`../../drivers/serial.c -libnutscan_la-bcmxcp_ser.lo: $(top_srcdir)/drivers/bcmxcp_ser.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-bcmxcp_ser.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-bcmxcp_ser.Tpo -c -o libnutscan_la-bcmxcp_ser.lo `test -f '$(top_srcdir)/drivers/bcmxcp_ser.c' || echo '$(srcdir)/'`$(top_srcdir)/drivers/bcmxcp_ser.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-bcmxcp_ser.Tpo $(DEPDIR)/libnutscan_la-bcmxcp_ser.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/drivers/bcmxcp_ser.c' object='libnutscan_la-bcmxcp_ser.lo' libtool=yes @AMDEPBACKSLASH@ +../../drivers/libnutscan_la-bcmxcp_ser.lo: ../../drivers/bcmxcp_ser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT ../../drivers/libnutscan_la-bcmxcp_ser.lo -MD -MP -MF ../../drivers/$(DEPDIR)/libnutscan_la-bcmxcp_ser.Tpo -c -o ../../drivers/libnutscan_la-bcmxcp_ser.lo `test -f '../../drivers/bcmxcp_ser.c' || echo '$(srcdir)/'`../../drivers/bcmxcp_ser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../drivers/$(DEPDIR)/libnutscan_la-bcmxcp_ser.Tpo ../../drivers/$(DEPDIR)/libnutscan_la-bcmxcp_ser.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../drivers/bcmxcp_ser.c' object='../../drivers/libnutscan_la-bcmxcp_ser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-bcmxcp_ser.lo `test -f '$(top_srcdir)/drivers/bcmxcp_ser.c' || echo '$(srcdir)/'`$(top_srcdir)/drivers/bcmxcp_ser.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o ../../drivers/libnutscan_la-bcmxcp_ser.lo `test -f '../../drivers/bcmxcp_ser.c' || echo '$(srcdir)/'`../../drivers/bcmxcp_ser.c -libnutscan_la-common.lo: $(top_srcdir)/common/common.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT libnutscan_la-common.lo -MD -MP -MF $(DEPDIR)/libnutscan_la-common.Tpo -c -o libnutscan_la-common.lo `test -f '$(top_srcdir)/common/common.c' || echo '$(srcdir)/'`$(top_srcdir)/common/common.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libnutscan_la-common.Tpo $(DEPDIR)/libnutscan_la-common.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/common/common.c' object='libnutscan_la-common.lo' libtool=yes @AMDEPBACKSLASH@ +../../common/libnutscan_la-common.lo: ../../common/common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -MT ../../common/libnutscan_la-common.lo -MD -MP -MF ../../common/$(DEPDIR)/libnutscan_la-common.Tpo -c -o ../../common/libnutscan_la-common.lo `test -f '../../common/common.c' || echo '$(srcdir)/'`../../common/common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../common/$(DEPDIR)/libnutscan_la-common.Tpo ../../common/$(DEPDIR)/libnutscan_la-common.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../common/common.c' object='../../common/libnutscan_la-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o libnutscan_la-common.lo `test -f '$(top_srcdir)/common/common.c' || echo '$(srcdir)/'`$(top_srcdir)/common/common.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnutscan_la_CFLAGS) $(CFLAGS) -c -o ../../common/libnutscan_la-common.lo `test -f '../../common/common.c' || echo '$(srcdir)/'`../../common/common.c nut_scanner-nut-scanner.o: nut-scanner.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.o -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nut-scanner.c' object='nut_scanner-nut-scanner.o' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.o -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nut-scanner.c' object='nut_scanner-nut-scanner.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.o `test -f 'nut-scanner.c' || echo '$(srcdir)/'`nut-scanner.c nut_scanner-nut-scanner.obj: nut-scanner.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.obj -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nut-scanner.c' object='nut_scanner-nut-scanner.obj' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -MT nut_scanner-nut-scanner.obj -MD -MP -MF $(DEPDIR)/nut_scanner-nut-scanner.Tpo -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nut_scanner-nut-scanner.Tpo $(DEPDIR)/nut_scanner-nut-scanner.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nut-scanner.c' object='nut_scanner-nut-scanner.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nut_scanner_CFLAGS) $(CFLAGS) -c -o nut_scanner-nut-scanner.obj `if test -f 'nut-scanner.c'; then $(CYGPATH_W) 'nut-scanner.c'; else $(CYGPATH_W) '$(srcdir)/nut-scanner.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs + -rm -rf ../../common/.libs ../../common/_libs + -rm -rf ../../drivers/.libs ../../drivers/_libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ @@ -688,26 +801,15 @@ uninstall-includeHEADERS: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -719,15 +821,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -736,6 +834,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -808,6 +921,10 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f ../../common/$(DEPDIR)/$(am__dirstamp) + -rm -f ../../common/$(am__dirstamp) + -rm -f ../../drivers/$(DEPDIR)/$(am__dirstamp) + -rm -f ../../drivers/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -819,7 +936,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../../common/$(DEPDIR) ../../drivers/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -865,7 +982,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../../common/$(DEPDIR) ../../drivers/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -887,20 +1004,21 @@ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ .MAKE: all check install install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-includeHEADERS uninstall-libLTLIBRARIES diff --git a/tools/nut-scanner/nutscan-snmp.h b/tools/nut-scanner/nutscan-snmp.h index c66aa96..38202a0 100644 --- a/tools/nut-scanner/nutscan-snmp.h +++ b/tools/nut-scanner/nutscan-snmp.h @@ -27,24 +27,24 @@ typedef struct { /* SNMP IDs device table */ static snmp_device_id_t snmp_device_table[] = { - { ".1.3.6.1.4.1.4555.1.1.1.1.1.1.0" , "netvision", ".1.3.6.1.4.1.4555.1.1.1"}, - { ".1.3.6.1.4.1.4779.1.3.5.2.1.24.1" , "baytech", NULL}, - { ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" , "apcc", NULL}, + { ".1.3.6.1.4.1.13742.1.1.12.0" , "raritan", ".1.3.6.1.4.1.13742"}, + { "" , "xppc", ".1.3.6.1.4.1.935"}, { "1.3.6.1.4.1.534.1.1.2.0" , "pw", ".1.3.6.1.4.1.534.1"}, + { "1.3.6.1.2.1.33.1.1.1.0" , "ietf", ".1.3.6.1.2.1.33"}, + { ".1.3.6.1.4.1.232.165.3.1.1.0" , "cpqpower", ".1.3.6.1.4.1.232.165.3"}, { ".1.3.6.1.4.1.17373.3.1.1.0" , "aphel_genesisII", ".1.3.6.1.4.1.17373"}, { ".1.3.6.1.4.1.534.6.6.6.1.1.12.0" , "aphel_revelation", ".1.3.6.1.4.1.534.6.6.6"}, { ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.0" , "eaton_epdu", ".1.3.6.1.4.1.534.6.6.7"}, { "" , "pulizzi_monitored", NULL}, { ".1.3.6.1.4.1.20677.1" , "pulizzi_switched1", ".1.3.6.1.4.1.20677.1"}, { ".1.3.6.1.4.1.20677.1" , "pulizzi_switched2", ".1.3.6.1.4.1.20677.2"}, - { ".1.3.6.1.4.1.2947.1.1.2.0" , "bestpower", NULL}, { ".1.3.6.1.4.1.3808.1.1.1.1.1.1.0" , "cyberpower", ".1.3.6.1.4.1.3808"}, - { "" , "xppc", ".1.3.6.1.4.1.935"}, - { "" , "delta_ups", ".1.3.6.1.4.1.2254.2.4"}, { ".1.3.6.1.4.1.705.1.1.1.0" , "mge", ".1.3.6.1.4.1.705.1"}, - { ".1.3.6.1.4.1.232.165.3.1.1.0" , "cpqpower", ".1.3.6.1.4.1.232.165.3"}, - { ".1.3.6.1.4.1.13742.1.1.12.0" , "raritan", ".1.3.6.1.4.1.13742"}, - { "1.3.6.1.2.1.33.1.1.1.0" , "ietf", ".1.3.6.1.2.1.33"}, + { "" , "delta_ups", ".1.3.6.1.4.1.2254.2.4"}, + { ".1.3.6.1.4.1.4555.1.1.1.1.1.1.0" , "netvision", ".1.3.6.1.4.1.4555.1.1.1"}, + { ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" , "apcc", NULL}, + { ".1.3.6.1.4.1.4779.1.3.5.2.1.24.1" , "baytech", NULL}, + { ".1.3.6.1.4.1.2947.1.1.2.0" , "bestpower", NULL}, /* Terminating entry */ { NULL, NULL, NULL} }; diff --git a/tools/nut-scanner/nutscan-usb.h b/tools/nut-scanner/nutscan-usb.h index c31466f..a35513a 100644 --- a/tools/nut-scanner/nutscan-usb.h +++ b/tools/nut-scanner/nutscan-usb.h @@ -52,6 +52,7 @@ static usb_device_id_t usb_device_table[] = { { 0x047c, 0xffff, "usbhid-ups" }, { 0x04b4, 0x5500, "riello_usb" }, { 0x04d8, 0xd004, "usbhid-ups" }, + { 0x04d8, 0xd005, "usbhid-ups" }, { 0x050d, 0x0375, "usbhid-ups" }, { 0x050d, 0x0551, "usbhid-ups" }, { 0x050d, 0x0750, "usbhid-ups" }, @@ -60,14 +61,16 @@ static usb_device_id_t usb_device_table[] = { { 0x050d, 0x0910, "usbhid-ups" }, { 0x050d, 0x0912, "usbhid-ups" }, { 0x050d, 0x0980, "usbhid-ups" }, + { 0x050d, 0x0f51, "usbhid-ups" }, { 0x050d, 0x1100, "usbhid-ups" }, + { 0x051d, 0x0000, "usbhid-ups" }, { 0x051d, 0x0002, "usbhid-ups" }, { 0x051d, 0x0003, "usbhid-ups" }, { 0x0592, 0x0002, "bcmxcp_usb" }, { 0x0592, 0x0004, "usbhid-ups" }, { 0x05b8, 0x0000, "blazer_usb" }, { 0x0665, 0x5161, "blazer_usb" }, - { 0x06da, 0x0002, "blazer_usb" }, + { 0x06da, 0x0002, "bcmxcp_usb" }, { 0x06da, 0x0003, "blazer_usb" }, { 0x06da, 0x0004, "blazer_usb" }, { 0x06da, 0x0005, "blazer_usb" }, @@ -111,6 +114,7 @@ static usb_device_id_t usb_device_table[] = { { 0x09ae, 0x4006, "usbhid-ups" }, { 0x09ae, 0x4007, "usbhid-ups" }, { 0x09ae, 0x4008, "usbhid-ups" }, + { 0x0d9f, 0x0001, "usbhid-ups" }, { 0x0d9f, 0x0004, "usbhid-ups" }, { 0x0d9f, 0x00a2, "usbhid-ups" }, { 0x0d9f, 0x00a3, "usbhid-ups" }, @@ -120,6 +124,7 @@ static usb_device_id_t usb_device_table[] = { { 0x0f03, 0x0001, "blazer_usb" }, { 0x10af, 0x0001, "usbhid-ups" }, { 0x10af, 0x0004, "usbhid-ups" }, + { 0x10af, 0x0008, "usbhid-ups" }, { 0x14f0, 0x00c9, "blazer_usb" }, { 0xffff, 0x0000, "blazer_usb" }, /* Terminating entry */ diff --git a/tools/nut-usbinfo.pl b/tools/nut-usbinfo.pl index 989cef2..51a60e1 100755 --- a/tools/nut-usbinfo.pl +++ b/tools/nut-usbinfo.pl @@ -111,7 +111,7 @@ sub gen_usb_files open my $outputUPower, ">$outputUPower" || die "error $outputUPower : $!"; print $outputUPower '##############################################################################################################'."\n"; print $outputUPower '# Uninterruptible Power Supplies with USB HID interfaces'."\n#\n"; - print $outputUPower '# to keep up to date, monitor: http://svn.debian.org/wsvn/nut/trunk/scripts/upower/95-upower-hid.rules'."\n\n"; + print $outputUPower '# to keep up to date, monitor https://github.com/networkupstools/nut/commits/master/scripts/upower/95-upower-hid.rules'."\n\n"; print $outputUPower '# only support USB, else ignore'."\n".'SUBSYSTEM!="usb", GOTO="up_hid_end"'."\n\n"; print $outputUPower '# if usbraw device, ignore'."\n".'KERNEL!="hiddev*", GOTO="up_hid_end"'."\n\n"; print $outputUPower '# if an interface, ignore'."\n".'ENV{DEVTYPE}=="usb_interface", GOTO="up_hid_end"'."\n\n"; @@ -169,7 +169,7 @@ sub gen_usb_files print $out_devd "\tmatch \"vendor\"\t\t\"$vendorId\";\n"; # print $out_devd "\tmatch \"product\"\t\t\"$productId\";\n"; - print $out_devd "\taction \"chgrp \@RUN_AS_GROUP\@ /dev/\$device-name*; chmod g+rw /dev/\$device-name*\";\n"; + print $out_devd "\taction \"chgrp \@RUN_AS_GROUP\@ /dev/\$cdev; chmod g+rw /dev/\$cdev\";\n"; print $out_devd "};\n"; # UPower device entry (only for USB/HID devices!) @@ -209,7 +209,7 @@ sub gen_usb_files sub find_usbdevs { # maybe there's an option to turn off all .* files, but anyway this is stupid - return $File::Find::prune = 1 if ($_ eq '.svn') || ($_ =~ /^\.#/); + return $File::Find::prune = 1 if ($_ eq '.svn') || ($_ =~ /^\.#/) || ($_ =~ /\.orig$/); my $nameFile=$_; my $lastComment=""; @@ -265,8 +265,8 @@ sub find_usbdevs } } - # store date (to be optimized) - # and don't overwritte actual vendor names with empty values + # store data (to be optimized) + # and don't overwrite actual vendor names with empty values if( (!$vendorName{$VendorID}) or (($vendorName{$VendorID} eq "") and ($VendorName ne "")) ) { $vendorName{$VendorID}=trim($VendorName); From 7ca12c8e253a0c3175ba4865a51213e80316b273 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 30 Apr 2015 15:58:47 +0200 Subject: [PATCH 178/300] New upstream release --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 687fd78..09d3cfc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nut (2.7.3-1) UNRELEASED; urgency=low + + * New upstream release + + -- Arnaud Quette Thu, 30 Apr 2015 15:56:50 +0200 + nut (2.7.2-2) UNRELEASED; urgency=low * debian/control: add new packages libnutclient0 and libnutclient-dev From c2a1ac8f1fbdcb98e7c9267ec5bf0ca0759b2acc Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Thu, 30 Apr 2015 16:01:34 +0200 Subject: [PATCH 179/300] Remove 0007-killpower-path.patch --- debian/changelog | 1 + debian/patches/0007-killpower-path.patch | 11 ----------- debian/patches/series | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 debian/patches/0007-killpower-path.patch diff --git a/debian/changelog b/debian/changelog index 09d3cfc..8868573 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ nut (2.7.3-1) UNRELEASED; urgency=low * New upstream release + * debian/patches/series: remove 0007-killpower-path.patch -- Arnaud Quette Thu, 30 Apr 2015 15:56:50 +0200 diff --git a/debian/patches/0007-killpower-path.patch b/debian/patches/0007-killpower-path.patch deleted file mode 100644 index 537b585..0000000 --- a/debian/patches/0007-killpower-path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/conf/upsmon.conf.sample.in -+++ b/conf/upsmon.conf.sample.in -@@ -196,7 +196,7 @@ DEADTIME 15 - # - # See the shutdown.txt file in the docs subdirectory for more information. - --POWERDOWNFLAG @CONFPATH@/killpower -+POWERDOWNFLAG /etc/killpower - - # -------------------------------------------------------------------------- - # NOTIFYMSG - change messages sent by upsmon when certain events occur diff --git a/debian/patches/series b/debian/patches/series index 5046408..14e0996 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,5 +2,4 @@ 0002-nut-monitor-paths.patch 0004-fix-systemd-service.patch 0006-ups-conf-maxretry.patch -0007-killpower-path.patch 0008-drop-w3c-icons.patch From f5439265c8b3a6c1dd4669edbdab802448c9231f Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 16 Jul 2016 10:47:56 +0200 Subject: [PATCH 180/300] debian/gbp.conf: Switch back the branch to the "debian" one --- debian/changelog | 6 +++++- debian/gbp.conf | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0088030..8db4090 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ nut (2.7.3-1) UNRELEASED; urgency=low + [ Arnaud Quette ] * New upstream release * debian/patches/series: remove 0007-killpower-path.patch * debian/control: add new packages libnutclient0 and libnutclient-dev @@ -8,7 +9,10 @@ nut (2.7.3-1) UNRELEASED; urgency=low debian/libnutclient-dev.install, debian/libnutclient-dev.manpages: created for the new packages - -- Arnaud Quette Mon, 20 Oct 2014 20:41:47 +0200 + [ Laurent Bigonville ] + * debian/gbp.conf: Switch back the branch to the "debian" one + + -- Laurent Bigonville Sat, 16 Jul 2016 10:52:14 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/gbp.conf b/debian/gbp.conf index 2e63610..6837223 100644 --- a/debian/gbp.conf +++ b/debian/gbp.conf @@ -1,5 +1,5 @@ [DEFAULT] -debian-branch = debian-jessie +debian-branch = debian upstream-branch = upstream pristine-tar = True From f07d79cd65317bc7ab50c0637fe3b753feda35b5 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 16 Jul 2016 10:57:26 +0200 Subject: [PATCH 181/300] Drop d/p/0009-fix-favorites-permissions.patch, merged upstream --- debian/changelog | 3 +- .../0009-fix-favorites-permissions.patch | 69 ------------------- debian/patches/series | 1 - 3 files changed, 2 insertions(+), 71 deletions(-) delete mode 100644 debian/patches/0009-fix-favorites-permissions.patch diff --git a/debian/changelog b/debian/changelog index 8db4090..1bdd65c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,8 +11,9 @@ nut (2.7.3-1) UNRELEASED; urgency=low [ Laurent Bigonville ] * debian/gbp.conf: Switch back the branch to the "debian" one + * Drop d/p/0009-fix-favorites-permissions.patch, merged upstream - -- Laurent Bigonville Sat, 16 Jul 2016 10:52:14 +0200 + -- Laurent Bigonville Sat, 16 Jul 2016 10:56:38 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/patches/0009-fix-favorites-permissions.patch b/debian/patches/0009-fix-favorites-permissions.patch deleted file mode 100644 index 7128250..0000000 --- a/debian/patches/0009-fix-favorites-permissions.patch +++ /dev/null @@ -1,69 +0,0 @@ -If a ~/.nut-monitor directory is found with insecure permissions, change them to 0700. ---- a/scripts/python/app/NUT-Monitor -+++ b/scripts/python/app/NUT-Monitor -@@ -29,6 +29,7 @@ - import sys - import base64 - import os, os.path -+import stat - import platform - import time - import threading -@@ -44,21 +45,23 @@ - - class interface : - -- __widgets = {} -- __callbacks = {} -- __favorites = {} -- __favorites_file = None -- __favorites_path = "" -- __fav_menu_items = list() -- __window_visible = True -- __glade_file = None -- __connected = False -- __ups_handler = None -- __ups_commands = None -- __ups_vars = None -- __ups_rw_vars = None -- __gui_thread = None -- __current_ups = None -+ DESIRED_FAVORITES_DIRECTORY_MODE = 0700 -+ -+ __widgets = {} -+ __callbacks = {} -+ __favorites = {} -+ __favorites_file = None -+ __favorites_path = "" -+ __fav_menu_items = list() -+ __window_visible = True -+ __glade_file = None -+ __connected = False -+ __ups_handler = None -+ __ups_commands = None -+ __ups_vars = None -+ __ups_rw_vars = None -+ __gui_thread = None -+ __current_ups = None - - def __init__( self ) : - -@@ -528,6 +531,9 @@ - return - - try : -+ if ( not stat.S_IMODE( os.stat( self.__favorites_path ).st_mode ) == self.DESIRED_FAVORITES_DIRECTORY_MODE ) : # unsafe pre-1.2 directory found -+ os.chmod( self.__favorites_path, self.DESIRED_FAVORITES_DIRECTORY_MODE ) -+ - conf = ConfigParser.ConfigParser() - conf.read( self.__favorites_file ) - for current in conf.sections() : -@@ -573,7 +579,7 @@ - # If path does not exists, try to create it - if ( not os.path.exists( self.__favorites_file ) ) : - try : -- os.makedirs( self.__favorites_path, mode=0700 ) -+ os.makedirs( self.__favorites_path, mode=self.DESIRED_FAVORITES_DIRECTORY_MODE ) - except : - self.gui_status_message( _("Error while creating configuration folder (%s)") % sys.exc_info()[1] ) - diff --git a/debian/patches/series b/debian/patches/series index 984c24b..14e0996 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,4 +3,3 @@ 0004-fix-systemd-service.patch 0006-ups-conf-maxretry.patch 0008-drop-w3c-icons.patch -0009-fix-favorites-permissions.patch From 85836f6836b89033697c1a283c6f7bdc98568880 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 16 Jul 2016 11:00:39 +0200 Subject: [PATCH 182/300] d/p/0002-nut-monitor-paths.patch, d/p/0006-ups-conf-maxretry.patch: Refreshed --- debian/changelog | 4 +++- debian/patches/0002-nut-monitor-paths.patch | 8 ++++---- debian/patches/0006-ups-conf-maxretry.patch | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1bdd65c..16bb9f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,8 +12,10 @@ nut (2.7.3-1) UNRELEASED; urgency=low [ Laurent Bigonville ] * debian/gbp.conf: Switch back the branch to the "debian" one * Drop d/p/0009-fix-favorites-permissions.patch, merged upstream + * d/p/0002-nut-monitor-paths.patch, d/p/0006-ups-conf-maxretry.patch: + Refreshed - -- Laurent Bigonville Sat, 16 Jul 2016 10:56:38 +0200 + -- Laurent Bigonville Sat, 16 Jul 2016 11:00:06 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/patches/0002-nut-monitor-paths.patch b/debian/patches/0002-nut-monitor-paths.patch index 00fd0de..88294d6 100644 --- a/debian/patches/0002-nut-monitor-paths.patch +++ b/debian/patches/0002-nut-monitor-paths.patch @@ -1,6 +1,6 @@ --- a/scripts/python/app/NUT-Monitor +++ b/scripts/python/app/NUT-Monitor -@@ -70,7 +70,7 @@ +@@ -76,7 +76,7 @@ class interface : ( cmd_opts, args ) = opt_parser.parse_args() @@ -9,7 +9,7 @@ self.__widgets["interface"] = gtk.glade.XML( self.__glade_file, "window1", APP ) self.__widgets["main_window"] = self.__widgets["interface"].get_widget("window1") -@@ -103,11 +103,11 @@ +@@ -109,11 +109,11 @@ class interface : # Create the tray icon and connect it to the show/hide method... self.__widgets["status_icon"] = gtk.StatusIcon() @@ -23,7 +23,7 @@ # Define interface callbacks actions self.__callbacks = { "on_window1_destroy" : self.quit, -@@ -265,8 +265,8 @@ +@@ -271,8 +271,8 @@ class interface : #------------------------------------------------------------------- # Change the status icon and tray icon def change_status_icon( self, icon="on_line", blink=False ) : @@ -34,7 +34,7 @@ self.__widgets["status_icon"].set_blinking( blink ) #------------------------------------------------------------------- -@@ -719,9 +719,9 @@ +@@ -728,9 +728,9 @@ class interface : for k,v in vars.iteritems() : if ( rwvars.has_key( k ) ) : diff --git a/debian/patches/0006-ups-conf-maxretry.patch b/debian/patches/0006-ups-conf-maxretry.patch index dd8ef93..fae5806 100644 --- a/debian/patches/0006-ups-conf-maxretry.patch +++ b/debian/patches/0006-ups-conf-maxretry.patch @@ -25,7 +25,7 @@ # # These directives are common to all drivers that support ups.conf: # -@@ -102,3 +120,6 @@ +@@ -117,3 +135,6 @@ # # To find out if your driver supports any extra settings, start it with # the -h option and/or read the driver's documentation. From e9487070937b148098e21e3cc5be732bf0c994d5 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 16 Jul 2016 11:07:56 +0200 Subject: [PATCH 183/300] debian/control: Bump Standards-Version to 3.9.8 (no further changes) --- debian/changelog | 3 ++- debian/control | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 16bb9f1..a427732 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,8 +14,9 @@ nut (2.7.3-1) UNRELEASED; urgency=low * Drop d/p/0009-fix-favorites-permissions.patch, merged upstream * d/p/0002-nut-monitor-paths.patch, d/p/0006-ups-conf-maxretry.patch: Refreshed + * debian/control: Bump Standards-Version to 3.9.8 (no further changes) - -- Laurent Bigonville Sat, 16 Jul 2016 11:00:06 +0200 + -- Laurent Bigonville Sat, 16 Jul 2016 11:07:41 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/control b/debian/control index e6a2fbe..15d8f9b 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ Build-Depends-Indep: asciidoc (>= 8.6.3), docbook-xsl, dblatex (>= 0.2.5), libxml2-utils -Standards-Version: 3.9.5 +Standards-Version: 3.9.8 Homepage: http://www.networkupstools.org/ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/nut.git;a=summary Vcs-Git: git://anonscm.debian.org/collab-maint/nut.git From b762a3580ed2169f9e494579d3c99e777db075c6 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 16 Jul 2016 11:12:54 +0200 Subject: [PATCH 184/300] debian/control: Add dh-python to the build-dependencies --- debian/changelog | 3 ++- debian/control | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a427732..03f691c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,8 +15,9 @@ nut (2.7.3-1) UNRELEASED; urgency=low * d/p/0002-nut-monitor-paths.patch, d/p/0006-ups-conf-maxretry.patch: Refreshed * debian/control: Bump Standards-Version to 3.9.8 (no further changes) + * debian/control: Add dh-python to the build-dependencies - -- Laurent Bigonville Sat, 16 Jul 2016 11:07:41 +0200 + -- Laurent Bigonville Sat, 16 Jul 2016 11:12:46 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/control b/debian/control index 15d8f9b..698cdee 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,7 @@ Build-Depends: debhelper (>= 8.1.3), cdbs (>= 0.4.122~), autotools-dev, dh-autoreconf, + dh-python, dh-systemd (>= 1.14), libgd-dev | libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, From 79b4afb095620785ef8325194a14ae772970d857 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 17 Jul 2016 18:07:49 +0200 Subject: [PATCH 185/300] Revert "Systemd units are now installed in multi-arch path" The unit files are again installed in the systemdsystemunitdir path This reverts commit 4730afcab2ecc95e00fd4ac6f3e094bd0bbf3340. --- debian/rules | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index 0c837fc..f7dfd8a 100755 --- a/debian/rules +++ b/debian/rules @@ -90,13 +90,13 @@ common-install-arch:: # Install systemd files only on systems where it's supported ifeq (linux,$(DEB_HOST_ARCH_OS)) - install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-monitor.service \ + install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-monitor.service \ $(CURDIR)/debian/nut-client/lib/systemd/system/nut-monitor.service - install -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system-shutdown/nutshutdown \ + install -D $(CURDIR)/debian/tmp/lib/systemd/system-shutdown/nutshutdown \ $(CURDIR)/debian/nut-server/lib/systemd/system-shutdown/nutshutdown - install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-driver.service \ + install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-driver.service \ $(CURDIR)/debian/nut-server/lib/systemd/system/nut-driver.service - install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-server.service \ + install -m 644 -D $(CURDIR)/debian/tmp/lib/systemd/system/nut-server.service \ $(CURDIR)/debian/nut-server/lib/systemd/system/nut-server.service # Add a symlink to mask the LSB initscript From 38537675bae2f358c547f14f303e7bca53e9b3f1 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 17 Jul 2016 18:10:22 +0200 Subject: [PATCH 186/300] Bump debhelper compatibility to 9 --- debian/changelog | 3 ++- debian/compat | 2 +- debian/control | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 03f691c..3f2b378 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,9 @@ nut (2.7.3-1) UNRELEASED; urgency=low Refreshed * debian/control: Bump Standards-Version to 3.9.8 (no further changes) * debian/control: Add dh-python to the build-dependencies + * Bump debhelper compatibility to 9 - -- Laurent Bigonville Sat, 16 Jul 2016 11:12:46 +0200 + -- Laurent Bigonville Sun, 17 Jul 2016 18:10:02 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/compat b/debian/compat index 45a4fb7..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/debian/control b/debian/control index 698cdee..b864c02 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Arnaud Quette Uploaders: Laurent Bigonville -Build-Depends: debhelper (>= 8.1.3), +Build-Depends: debhelper (>= 9), cdbs (>= 0.4.122~), autotools-dev, dh-autoreconf, From 1a30e36c57bd509f9ff7b4d544946d939228d5c1 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 17 Jul 2016 19:06:03 +0200 Subject: [PATCH 187/300] d/p/0009-fix-nutshutdown-install.patch: Install the nutshutdown script in the correct path --- debian/changelog | 4 +++- debian/patches/0009-fix-nutshutdown-install.patch | 11 +++++++++++ debian/patches/series | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0009-fix-nutshutdown-install.patch diff --git a/debian/changelog b/debian/changelog index 3f2b378..d773150 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,8 +17,10 @@ nut (2.7.3-1) UNRELEASED; urgency=low * debian/control: Bump Standards-Version to 3.9.8 (no further changes) * debian/control: Add dh-python to the build-dependencies * Bump debhelper compatibility to 9 + * d/p/0009-fix-nutshutdown-install.patch: Install the nutshutdown script in + the correct path - -- Laurent Bigonville Sun, 17 Jul 2016 18:10:02 +0200 + -- Laurent Bigonville Sun, 17 Jul 2016 19:05:43 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/patches/0009-fix-nutshutdown-install.patch b/debian/patches/0009-fix-nutshutdown-install.patch new file mode 100644 index 0000000..732cc22 --- /dev/null +++ b/debian/patches/0009-fix-nutshutdown-install.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1065,7 +1065,7 @@ dnl Override installation directory, wit + dnl prefix. This is needed for 'distcheck*' targets, otherwise + dnl files will try to get intalled to the actual system directories + if test -n "${systemdsystemunitdir}"; then +- systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" ++ systemdsystemshutdowndir=`$PKG_CONFIG --variable=systemdshutdowndir systemd` + AC_MSG_RESULT(using ${systemdsystemunitdir}) + else + AC_MSG_RESULT(no) diff --git a/debian/patches/series b/debian/patches/series index 14e0996..0b7915d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ 0004-fix-systemd-service.patch 0006-ups-conf-maxretry.patch 0008-drop-w3c-icons.patch +0009-fix-nutshutdown-install.patch From b0b61548a47b153b1ce6205bb9ce47edbb32910f Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sun, 17 Jul 2016 19:20:31 +0200 Subject: [PATCH 188/300] debian/nut-server.install: 52-nut-usbups.rules file has been renamed to 62-nut-usbups.rules --- debian/changelog | 4 +++- debian/nut-server.install | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d773150..f3f57c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,8 +19,10 @@ nut (2.7.3-1) UNRELEASED; urgency=low * Bump debhelper compatibility to 9 * d/p/0009-fix-nutshutdown-install.patch: Install the nutshutdown script in the correct path + * debian/nut-server.install: 52-nut-usbups.rules file has been renamed to + 62-nut-usbups.rules - -- Laurent Bigonville Sun, 17 Jul 2016 19:05:43 +0200 + -- Laurent Bigonville Sun, 17 Jul 2016 19:20:10 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/nut-server.install b/debian/nut-server.install index bbc50da..8ea1b3c 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -3,7 +3,7 @@ debian/tmp/lib/nut/upsd debian/tmp/sbin/upsdrvctl debian/tmp/usr/share/nut/cmdvartab debian/tmp/usr/share/nut/driver.list -debian/tmp/*/udev/rules.d/52-nut-usbups.rules +debian/tmp/*/udev/rules.d/62-nut-usbups.rules debian/tmp/etc/avahi/services/nut.service debian/tmp/etc/nut/ups.conf debian/tmp/etc/nut/upsd.conf From 237be91ad92a727fd1502f0f2eb70bc9163afbe6 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 18 Jul 2016 01:37:33 +0200 Subject: [PATCH 189/300] debian/libnutclient0.symbols, debian/libupsclient4.symbols: Adjust the .symbols files --- debian/changelog | 4 +- debian/libnutclient0.symbols | 428 +++++++++++++++++++---------------- debian/libupsclient4.symbols | 2 + 3 files changed, 235 insertions(+), 199 deletions(-) diff --git a/debian/changelog b/debian/changelog index f3f57c3..2e7094e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,8 +21,10 @@ nut (2.7.3-1) UNRELEASED; urgency=low the correct path * debian/nut-server.install: 52-nut-usbups.rules file has been renamed to 62-nut-usbups.rules + * debian/libnutclient0.symbols, debian/libupsclient4.symbols: Adjust the + .symbols files - -- Laurent Bigonville Sun, 17 Jul 2016 19:20:10 +0200 + -- Laurent Bigonville Mon, 18 Jul 2016 01:37:16 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/libnutclient0.symbols b/debian/libnutclient0.symbols index ccc230c..66c845d 100644 --- a/debian/libnutclient0.symbols +++ b/debian/libnutclient0.symbols @@ -1,199 +1,231 @@ libnutclient.so.0 libnutclient0 #MINVER# - (c++)"nut::IOException::~IOException()@Base" 2.7.2 - (c++)"nut::NutException::NutException(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::NutException::~NutException()@Base" 2.7.2 - (c++)"nut::SystemException::err()@Base" 2.7.2 - (c++)"nut::SystemException::SystemException()@Base" 2.7.2 - (c++)"nut::SystemException::~SystemException()@Base" 2.7.2 - (c++)"nut::TimeoutException::TimeoutException()@Base" 2.7.2 - (c++)"nut::TimeoutException::~TimeoutException()@Base" 2.7.2 - (c++)"nut::UnknownHostException::UnknownHostException()@Base" 2.7.2 - (c++)"nut::UnknownHostException::~UnknownHostException()@Base" 2.7.2 - (c++)"nut::NotConnectedException::NotConnectedException()@Base" 2.7.2 - (c++)"nut::NotConnectedException::~NotConnectedException()@Base" 2.7.2 - (c++)"nut::Client::getDevices()@Base" 2.7.2 - (c++)"nut::Client::hasDeviceCommand(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Client::hasDeviceVariable(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Client::getDeviceVariableValues(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Client::getDevice(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Client::hasDevice(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Client::Client()@Base" 2.7.2 - (c++)"nut::Client::~Client()@Base" 2.7.2 - (c++)"nut::Device::getCommand(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Device::getCommands()@Base" 2.7.2 - (c++)"nut::Device::getVariable(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Device::setVariable(std::basic_string, std::allocator > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 - (c++)"nut::Device::setVariable(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Device::getNumLogins()@Base" 2.7.2 - (c++)"nut::Device::getVariables()@Base" 2.7.2 - (c++)"nut::Device::executeCommand(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Device::forcedShutdown()@Base" 2.7.2 - (c++)"nut::Device::getDescription()@Base" 2.7.2 - (c++)"nut::Device::getRWVariables()@Base" 2.7.2 - (c++)"nut::Device::getCommandNames()@Base" 2.7.2 - (c++)"nut::Device::getVariableNames()@Base" 2.7.2 - (c++)"nut::Device::getVariableValue(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Device::getVariableValues()@Base" 2.7.2 - (c++)"nut::Device::getRWVariableNames()@Base" 2.7.2 - (c++)"nut::Device::login()@Base" 2.7.2 - (c++)"nut::Device::master()@Base" 2.7.2 - (c++)"nut::Device::getClient()@Base" 2.7.2 - (c++)"nut::Device::Device(nut::Client*, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Device::Device(nut::Device const&)@Base" 2.7.2 - (c++)"nut::Device::~Device()@Base" 2.7.2 - (c++)"nut::Command::getDescription()@Base" 2.7.2 - (c++)"nut::Command::execute()@Base" 2.7.2 - (c++)"nut::Command::getDevice()@Base" 2.7.2 - (c++)"nut::Command::Command(nut::Device*, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Command::Command(nut::Command const&)@Base" 2.7.2 - (c++)"nut::Command::~Command()@Base" 2.7.2 - (c++)"nut::Variable::getDescription()@Base" 2.7.2 - (c++)"nut::Variable::getValue()@Base" 2.7.2 - (c++)"nut::Variable::setValue(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Variable::getDevice()@Base" 2.7.2 - (c++)"nut::Variable::setValues(std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 - (c++)"nut::Variable::Variable(nut::Device*, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::Variable::Variable(nut::Variable const&)@Base" 2.7.2 - (c++)"nut::Variable::~Variable()@Base" 2.7.2 - (c++)"nut::internal::Socket::disconnect()@Base" 2.7.2 - (c++)"nut::internal::Socket::setTimeout(long)@Base" 2.7.2 - (c++)"nut::internal::Socket::read(void*, unsigned long)@Base" 2.7.2 - (c++)"nut::internal::Socket::read()@Base" 2.7.2 - (c++)"nut::internal::Socket::write(void const*, unsigned long)@Base" 2.7.2 - (c++)"nut::internal::Socket::write(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::internal::Socket::connect(std::basic_string, std::allocator > const&, int)@Base" 2.7.2 - (c++)"nut::internal::Socket::Socket()@Base" 2.7.2 - (c++)"nut::TcpClient::disconnect()@Base" 2.7.2 - (c++)"nut::TcpClient::setTimeout(long)@Base" 2.7.2 - (c++)"nut::TcpClient::detectError(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::deviceLogin(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::authenticate(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::deviceMaster(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::getDeviceNames()@Base" 2.7.2 - (c++)"nut::TcpClient::setDeviceVariable(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::setDeviceVariable(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::deviceGetNumLogins(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::deviceForcedShutdown(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::executeDeviceCommand(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::getDeviceDescription(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::getDeviceCommandNames(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::getDeviceVariableNames(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::getDeviceVariableValue(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::getDeviceVariableValues(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::getDeviceRWVariableNames(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::getDeviceCommandDescription(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::getDeviceVariableDescription(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::get(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::list(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::escape(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::logout()@Base" 2.7.2 - (c++)"nut::TcpClient::connect(std::basic_string, std::allocator > const&, int)@Base" 2.7.2 - (c++)"nut::TcpClient::connect()@Base" 2.7.2 - (c++)"nut::TcpClient::explode(std::basic_string, std::allocator > const&, unsigned long)@Base" 2.7.2 - (c++)"nut::TcpClient::getDevice(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::sendQuery(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"nut::TcpClient::TcpClient(std::basic_string, std::allocator > const&, int)@Base" 2.7.2 - (c++)"nut::TcpClient::TcpClient()@Base" 2.7.2 - (c++)"nut::TcpClient::~TcpClient()@Base" 2.7.2 - (c++)"nut::NutException::str() const@Base" 2.7.2 - (c++)"nut::NutException::what() const@Base" 2.7.2 - (c++)"nut::Device::isOk() const@Base" 2.7.2 - (c++)"nut::Device::getName() const@Base" 2.7.2 - (c++)"nut::Device::getClient() const@Base" 2.7.2 - (c++)"nut::Device::operator bool() const@Base" 2.7.2 - (c++)"nut::Device::operator==(nut::Device const&) const@Base" 2.7.2 - (c++)"nut::Device::operator<(nut::Device const&) const@Base" 2.7.2 - (c++)"nut::Device::operator!() const@Base" 2.7.2 - (c++)"nut::Command::isOk() const@Base" 2.7.2 - (c++)"nut::Command::getName() const@Base" 2.7.2 - (c++)"nut::Command::getDevice() const@Base" 2.7.2 - (c++)"nut::Command::operator bool() const@Base" 2.7.2 - (c++)"nut::Command::operator==(nut::Command const&) const@Base" 2.7.2 - (c++)"nut::Command::operator<(nut::Command const&) const@Base" 2.7.2 - (c++)"nut::Command::operator!() const@Base" 2.7.2 - (c++)"nut::Variable::isOk() const@Base" 2.7.2 - (c++)"nut::Variable::getName() const@Base" 2.7.2 - (c++)"nut::Variable::getDevice() const@Base" 2.7.2 - (c++)"nut::Variable::operator bool() const@Base" 2.7.2 - (c++)"nut::Variable::operator==(nut::Variable const&) const@Base" 2.7.2 - (c++)"nut::Variable::operator<(nut::Variable const&) const@Base" 2.7.2 - (c++)"nut::Variable::operator!() const@Base" 2.7.2 - (c++)"nut::internal::Socket::isConnected() const@Base" 2.7.2 - (c++)"nut::TcpClient::getTimeout() const@Base" 2.7.2 - (c++)"nut::TcpClient::isConnected() const@Base" 2.7.2 - (c++)"nut::TcpClient::getHost() const@Base" 2.7.2 - (c++)"nut::TcpClient::getPort() const@Base" 2.7.2 - (c++)"char* std::basic_string, std::allocator >::_S_construct(char*, char*, std::allocator const&, std::forward_iterator_tag)@Base" 2.7.2 - (c++)"void std::_Destroy_aux::__destroy, std::allocator >*>(std::basic_string, std::allocator >*, std::basic_string, std::allocator >*)@Base" 2.7.2 - (c++)"std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >::~pair()@Base" 2.7.2 - (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::_M_insert_aux(__gnu_cxx::__normal_iterator, std::allocator >, std::allocator, std::allocator > > >*, std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > > >, std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 - (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::~vector()@Base" 2.7.2 - (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::_M_insert_aux(__gnu_cxx::__normal_iterator, std::allocator >*, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::~vector()@Base" 2.7.2 - (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::operator=(std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(nut::Variable const&)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::allocator >, std::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::_M_insert_unique(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::allocator >, std::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::find(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::allocator >, std::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::_M_erase(std::_Rb_tree_node, std::allocator > >*)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_insert_(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > const&)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_get_insert_unique_pos(std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_erase(std::_Rb_tree_node, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >*)@Base" 2.7.2 - (c++)"std::basic_string, std::allocator > std::operator+, std::allocator >(char const*, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 2.7.2 - (c++)"typeinfo for nut::IOException@Base" 2.7.2 - (c++)"typeinfo for nut::NutException@Base" 2.7.2 - (c++)"typeinfo for nut::SystemException@Base" 2.7.2 - (c++)"typeinfo for nut::TimeoutException@Base" 2.7.2 - (c++)"typeinfo for nut::UnknownHostException@Base" 2.7.2 - (c++)"typeinfo for nut::NotConnectedException@Base" 2.7.2 - (c++)"typeinfo for nut::Client@Base" 2.7.2 - (c++)"typeinfo for nut::TcpClient@Base" 2.7.2 - (c++)"typeinfo name for nut::IOException@Base" 2.7.2 - (c++)"typeinfo name for nut::NutException@Base" 2.7.2 - (c++)"typeinfo name for nut::SystemException@Base" 2.7.2 - (c++)"typeinfo name for nut::TimeoutException@Base" 2.7.2 - (c++)"typeinfo name for nut::UnknownHostException@Base" 2.7.2 - (c++)"typeinfo name for nut::NotConnectedException@Base" 2.7.2 - (c++)"typeinfo name for nut::Client@Base" 2.7.2 - (c++)"typeinfo name for nut::TcpClient@Base" 2.7.2 - (c++)"vtable for nut::IOException@Base" 2.7.2 - (c++)"vtable for nut::NutException@Base" 2.7.2 - (c++)"vtable for nut::SystemException@Base" 2.7.2 - (c++)"vtable for nut::TimeoutException@Base" 2.7.2 - (c++)"vtable for nut::UnknownHostException@Base" 2.7.2 - (c++)"vtable for nut::NotConnectedException@Base" 2.7.2 - (c++)"vtable for nut::Client@Base" 2.7.2 - (c++)"vtable for nut::TcpClient@Base" 2.7.2 - nutclient_authenticate@Base 2.7.2 - nutclient_destroy@Base 2.7.2 - nutclient_device_forced_shutdown@Base 2.7.2 - nutclient_device_login@Base 2.7.2 - nutclient_device_master@Base 2.7.2 - nutclient_execute_device_command@Base 2.7.2 - nutclient_get_device_command_description@Base 2.7.2 - nutclient_get_device_commands@Base 2.7.2 - nutclient_get_device_description@Base 2.7.2 - nutclient_get_device_num_logins@Base 2.7.2 - nutclient_get_device_rw_variables@Base 2.7.2 - nutclient_get_device_variable_description@Base 2.7.2 - nutclient_get_device_variable_values@Base 2.7.2 - nutclient_get_device_variables@Base 2.7.2 - nutclient_get_devices@Base 2.7.2 - nutclient_has_device@Base 2.7.2 - nutclient_has_device_command@Base 2.7.2 - nutclient_has_device_variable@Base 2.7.2 - nutclient_logout@Base 2.7.2 - nutclient_set_device_variable_value@Base 2.7.2 - nutclient_set_device_variable_values@Base 2.7.2 - nutclient_tcp_create_client@Base 2.7.2 - nutclient_tcp_disconnect@Base 2.7.2 - nutclient_tcp_get_timeout@Base 2.7.2 - nutclient_tcp_is_connected@Base 2.7.2 - nutclient_tcp_reconnect@Base 2.7.2 - nutclient_tcp_set_timeout@Base 2.7.2 - strarr_alloc@Base 2.7.2 - strarr_free@Base 2.7.2 + (c++)"nut::IOException::~IOException()@Base" 2.7.3 + (c++)"nut::IOException::~IOException()@Base" 2.7.3 + (c++)"nut::IOException::~IOException()@Base" 2.7.3 + (c++)"nut::NutException::NutException(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::NutException::NutException(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::NutException::~NutException()@Base" 2.7.3 + (c++)"nut::NutException::~NutException()@Base" 2.7.3 + (c++)"nut::NutException::~NutException()@Base" 2.7.3 + (c++)"nut::SystemException::err[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::SystemException::SystemException()@Base" 2.7.3 + (c++)"nut::SystemException::SystemException()@Base" 2.7.3 + (c++)"nut::SystemException::~SystemException()@Base" 2.7.3 + (c++)"nut::SystemException::~SystemException()@Base" 2.7.3 + (c++)"nut::SystemException::~SystemException()@Base" 2.7.3 + (c++)"nut::TimeoutException::TimeoutException()@Base" 2.7.3 + (c++)"nut::TimeoutException::TimeoutException()@Base" 2.7.3 + (c++)"nut::TimeoutException::~TimeoutException()@Base" 2.7.3 + (c++)"nut::TimeoutException::~TimeoutException()@Base" 2.7.3 + (c++)"nut::TimeoutException::~TimeoutException()@Base" 2.7.3 + (c++)"nut::UnknownHostException::UnknownHostException()@Base" 2.7.3 + (c++)"nut::UnknownHostException::UnknownHostException()@Base" 2.7.3 + (c++)"nut::UnknownHostException::~UnknownHostException()@Base" 2.7.3 + (c++)"nut::UnknownHostException::~UnknownHostException()@Base" 2.7.3 + (c++)"nut::UnknownHostException::~UnknownHostException()@Base" 2.7.3 + (c++)"nut::NotConnectedException::NotConnectedException()@Base" 2.7.3 + (c++)"nut::NotConnectedException::NotConnectedException()@Base" 2.7.3 + (c++)"nut::NotConnectedException::~NotConnectedException()@Base" 2.7.3 + (c++)"nut::NotConnectedException::~NotConnectedException()@Base" 2.7.3 + (c++)"nut::NotConnectedException::~NotConnectedException()@Base" 2.7.3 + (c++)"nut::Client::getDevices()@Base" 2.7.3 + (c++)"nut::Client::hasDeviceCommand(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Client::hasDeviceVariable(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Client::getDeviceVariableValues(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Client::getDevice(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Client::hasDevice(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Client::Client()@Base" 2.7.3 + (c++)"nut::Client::Client()@Base" 2.7.3 + (c++)"nut::Client::~Client()@Base" 2.7.3 + (c++)"nut::Client::~Client()@Base" 2.7.3 + (c++)"nut::Device::getCommand(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Device::getCommands()@Base" 2.7.3 + (c++)"nut::Device::getVariable(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Device::setVariable(std::__cxx11::basic_string, std::allocator > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.3 + (c++)"nut::Device::setVariable(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Device::getNumLogins()@Base" 2.7.3 + (c++)"nut::Device::getVariables()@Base" 2.7.3 + (c++)"nut::Device::executeCommand(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Device::forcedShutdown()@Base" 2.7.3 + (c++)"nut::Device::getDescription[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::Device::getRWVariables()@Base" 2.7.3 + (c++)"nut::Device::getCommandNames[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::Device::getVariableNames[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::Device::getVariableValue(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Device::getVariableValues[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::Device::getRWVariableNames[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::Device::login()@Base" 2.7.3 + (c++)"nut::Device::master()@Base" 2.7.3 + (c++)"nut::Device::getClient()@Base" 2.7.3 + (c++)"nut::Device::Device(nut::Client*, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Device::Device(nut::Device const&)@Base" 2.7.3 + (c++)"nut::Device::Device(nut::Client*, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Device::Device(nut::Device const&)@Base" 2.7.3 + (c++)"nut::Device::~Device()@Base" 2.7.3 + (c++)"nut::Device::~Device()@Base" 2.7.3 + (c++)"nut::Command::getDescription[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::Command::execute()@Base" 2.7.3 + (c++)"nut::Command::getDevice()@Base" 2.7.3 + (c++)"nut::Command::Command(nut::Device*, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Command::Command(nut::Command const&)@Base" 2.7.3 + (c++)"nut::Command::Command(nut::Device*, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Command::Command(nut::Command const&)@Base" 2.7.3 + (c++)"nut::Command::~Command()@Base" 2.7.3 + (c++)"nut::Command::~Command()@Base" 2.7.3 + (c++)"nut::Variable::getDescription[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::Variable::getValue[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::Variable::setValue(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Variable::getDevice()@Base" 2.7.3 + (c++)"nut::Variable::setValues(std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.3 + (c++)"nut::Variable::Variable(nut::Device*, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Variable::Variable(nut::Variable const&)@Base" 2.7.3 + (c++)"nut::Variable::Variable(nut::Device*, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::Variable::Variable(nut::Variable const&)@Base" 2.7.3 + (c++)"nut::Variable::~Variable()@Base" 2.7.3 + (c++)"nut::Variable::~Variable()@Base" 2.7.3 + (c++)"nut::internal::Socket::disconnect()@Base" 2.7.3 + (c++)"nut::internal::Socket::setTimeout(long)@Base" 2.7.3 + (c++)"nut::internal::Socket::read[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::internal::Socket::read(void*, unsigned long)@Base" 2.7.3 + (c++)"nut::internal::Socket::write(void const*, unsigned long)@Base" 2.7.3 + (c++)"nut::internal::Socket::write(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::internal::Socket::connect(std::__cxx11::basic_string, std::allocator > const&, int)@Base" 2.7.3 + (c++)"nut::internal::Socket::Socket()@Base" 2.7.3 + (c++)"nut::internal::Socket::Socket()@Base" 2.7.3 + (c++)"nut::TcpClient::disconnect()@Base" 2.7.3 + (c++)"nut::TcpClient::setTimeout(long)@Base" 2.7.3 + (c++)"nut::TcpClient::detectError(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::deviceLogin(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::authenticate(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::deviceMaster(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::getDeviceNames[abi:cxx11]()@Base" 2.7.3 + (c++)"nut::TcpClient::setDeviceVariable(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::setDeviceVariable(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::deviceGetNumLogins(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::deviceForcedShutdown(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::executeDeviceCommand(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::getDeviceDescription(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::getDeviceCommandNames(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::getDeviceVariableNames(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::getDeviceVariableValue(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::getDeviceVariableValues(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::getDeviceRWVariableNames(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::getDeviceCommandDescription(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::getDeviceVariableDescription(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::get(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::list(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::escape(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::logout()@Base" 2.7.3 + (c++)"nut::TcpClient::connect(std::__cxx11::basic_string, std::allocator > const&, int)@Base" 2.7.3 + (c++)"nut::TcpClient::connect()@Base" 2.7.3 + (c++)"nut::TcpClient::explode(std::__cxx11::basic_string, std::allocator > const&, unsigned long)@Base" 2.7.3 + (c++)"nut::TcpClient::getDevice(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::sendQuery(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"nut::TcpClient::TcpClient(std::__cxx11::basic_string, std::allocator > const&, int)@Base" 2.7.3 + (c++)"nut::TcpClient::TcpClient()@Base" 2.7.3 + (c++)"nut::TcpClient::TcpClient(std::__cxx11::basic_string, std::allocator > const&, int)@Base" 2.7.3 + (c++)"nut::TcpClient::TcpClient()@Base" 2.7.3 + (c++)"nut::TcpClient::~TcpClient()@Base" 2.7.3 + (c++)"nut::TcpClient::~TcpClient()@Base" 2.7.3 + (c++)"nut::NutException::str[abi:cxx11]() const@Base" 2.7.3 + (c++)"nut::NutException::what() const@Base" 2.7.3 + (c++)"nut::Device::isOk() const@Base" 2.7.3 + (c++)"nut::Device::getName[abi:cxx11]() const@Base" 2.7.3 + (c++)"nut::Device::getClient() const@Base" 2.7.3 + (c++)"nut::Device::operator bool() const@Base" 2.7.3 + (c++)"nut::Device::operator==(nut::Device const&) const@Base" 2.7.3 + (c++)"nut::Device::operator<(nut::Device const&) const@Base" 2.7.3 + (c++)"nut::Device::operator!() const@Base" 2.7.3 + (c++)"nut::Command::isOk() const@Base" 2.7.3 + (c++)"nut::Command::getName[abi:cxx11]() const@Base" 2.7.3 + (c++)"nut::Command::getDevice() const@Base" 2.7.3 + (c++)"nut::Command::operator bool() const@Base" 2.7.3 + (c++)"nut::Command::operator==(nut::Command const&) const@Base" 2.7.3 + (c++)"nut::Command::operator<(nut::Command const&) const@Base" 2.7.3 + (c++)"nut::Command::operator!() const@Base" 2.7.3 + (c++)"nut::Variable::isOk() const@Base" 2.7.3 + (c++)"nut::Variable::getName[abi:cxx11]() const@Base" 2.7.3 + (c++)"nut::Variable::getDevice() const@Base" 2.7.3 + (c++)"nut::Variable::operator bool() const@Base" 2.7.3 + (c++)"nut::Variable::operator==(nut::Variable const&) const@Base" 2.7.3 + (c++)"nut::Variable::operator<(nut::Variable const&) const@Base" 2.7.3 + (c++)"nut::Variable::operator!() const@Base" 2.7.3 + (c++)"nut::internal::Socket::isConnected() const@Base" 2.7.3 + (c++)"nut::TcpClient::getTimeout() const@Base" 2.7.3 + (c++)"nut::TcpClient::isConnected() const@Base" 2.7.3 + (c++)"nut::TcpClient::getHost[abi:cxx11]() const@Base" 2.7.3 + (c++)"nut::TcpClient::getPort() const@Base" 2.7.3 + (c++)"std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >::~pair()@Base" 2.7.3 + (c++)"std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >::~pair()@Base" 2.7.3 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::_M_insert_aux(__gnu_cxx::__normal_iterator, std::allocator >*, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::~vector()@Base" 2.7.3 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::~vector()@Base" 2.7.3 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::operator=(std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.3 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::_M_insert_aux(__gnu_cxx::__normal_iterator, std::allocator >, std::allocator, std::allocator > > >*, std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > > >, std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.3 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::~vector()@Base" 2.7.3 + (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::~vector()@Base" 2.7.3 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(nut::Variable const&)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::_M_insert_unique(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::find(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::_M_erase(std::_Rb_tree_node, std::allocator > >*)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_get_insert_unique_pos(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_erase(std::_Rb_tree_node, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >*)@Base" 2.7.3 + (c++)"std::__cxx11::basic_string, std::allocator > std::operator+, std::allocator >(char const*, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"std::__cxx11::basic_string, std::allocator > std::operator+, std::allocator >(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++)"typeinfo for nut::IOException@Base" 2.7.3 + (c++)"typeinfo for nut::NutException@Base" 2.7.3 + (c++)"typeinfo for nut::SystemException@Base" 2.7.3 + (c++)"typeinfo for nut::TimeoutException@Base" 2.7.3 + (c++)"typeinfo for nut::UnknownHostException@Base" 2.7.3 + (c++)"typeinfo for nut::NotConnectedException@Base" 2.7.3 + (c++)"typeinfo for nut::Client@Base" 2.7.3 + (c++)"typeinfo for nut::TcpClient@Base" 2.7.3 + (c++)"typeinfo name for nut::IOException@Base" 2.7.3 + (c++)"typeinfo name for nut::NutException@Base" 2.7.3 + (c++)"typeinfo name for nut::SystemException@Base" 2.7.3 + (c++)"typeinfo name for nut::TimeoutException@Base" 2.7.3 + (c++)"typeinfo name for nut::UnknownHostException@Base" 2.7.3 + (c++)"typeinfo name for nut::NotConnectedException@Base" 2.7.3 + (c++)"typeinfo name for nut::Client@Base" 2.7.3 + (c++)"typeinfo name for nut::TcpClient@Base" 2.7.3 + (c++)"vtable for nut::IOException@Base" 2.7.3 + (c++)"vtable for nut::NutException@Base" 2.7.3 + (c++)"vtable for nut::SystemException@Base" 2.7.3 + (c++)"vtable for nut::TimeoutException@Base" 2.7.3 + (c++)"vtable for nut::UnknownHostException@Base" 2.7.3 + (c++)"vtable for nut::NotConnectedException@Base" 2.7.3 + (c++)"vtable for nut::Client@Base" 2.7.3 + (c++)"vtable for nut::TcpClient@Base" 2.7.3 + nutclient_authenticate@Base 2.7.3 + nutclient_destroy@Base 2.7.3 + nutclient_device_forced_shutdown@Base 2.7.3 + nutclient_device_login@Base 2.7.3 + nutclient_device_master@Base 2.7.3 + nutclient_execute_device_command@Base 2.7.3 + nutclient_get_device_command_description@Base 2.7.3 + nutclient_get_device_commands@Base 2.7.3 + nutclient_get_device_description@Base 2.7.3 + nutclient_get_device_num_logins@Base 2.7.3 + nutclient_get_device_rw_variables@Base 2.7.3 + nutclient_get_device_variable_description@Base 2.7.3 + nutclient_get_device_variable_values@Base 2.7.3 + nutclient_get_device_variables@Base 2.7.3 + nutclient_get_devices@Base 2.7.3 + nutclient_has_device@Base 2.7.3 + nutclient_has_device_command@Base 2.7.3 + nutclient_has_device_variable@Base 2.7.3 + nutclient_logout@Base 2.7.3 + nutclient_set_device_variable_value@Base 2.7.3 + nutclient_set_device_variable_values@Base 2.7.3 + nutclient_tcp_create_client@Base 2.7.3 + nutclient_tcp_disconnect@Base 2.7.3 + nutclient_tcp_get_timeout@Base 2.7.3 + nutclient_tcp_is_connected@Base 2.7.3 + nutclient_tcp_reconnect@Base 2.7.3 + nutclient_tcp_set_timeout@Base 2.7.3 + strarr_alloc@Base 2.7.3 + strarr_free@Base 2.7.3 diff --git a/debian/libupsclient4.symbols b/debian/libupsclient4.symbols index c72efc4..2838c57 100644 --- a/debian/libupsclient4.symbols +++ b/debian/libupsclient4.symbols @@ -10,6 +10,7 @@ libupsclient.so.4 libupsclient4 #MINVER# fatalx@Base 2.7.2 get_user_pwent@Base 2.7.2 ltrim@Base 2.7.2 + ltrim_m@Base 2.7.3 nut_debug_level@Base 2.7.2 nut_log_level@Base 2.7.2 open_syslog@Base 2.7.2 @@ -22,6 +23,7 @@ libupsclient.so.4 libupsclient4 #MINVER# pconf_line@Base 2.7.2 pconf_parse_error@Base 2.7.2 rtrim@Base 2.7.2 + rtrim_m@Base 2.7.3 select_read@Base 2.7.2 select_write@Base 2.7.2 sendsignal@Base 2.7.2 From c9cb2187eed2bd478c9c4b73fba7c36c748680bb Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Mon, 18 Jul 2016 02:11:41 +0200 Subject: [PATCH 190/300] Imported Upstream version 2.7.4 --- ChangeLog | 1100 ++++++++++++++++++++++ INSTALL.nut | 24 +- Makefile.am | 3 +- Makefile.in | 4 +- NEWS | 120 ++- UPGRADING | 18 +- clients/Makefile.in | 1 + clients/nutclient.cpp | 5 + clients/upsrw.c | 5 + common/Makefile.am | 4 +- common/Makefile.in | 14 +- common/common.c | 41 - common/str.c | 607 ++++++++++++ conf/Makefile.in | 1 + configure | 98 +- configure.ac | 11 +- data/Makefile.in | 1 + data/cmdvartab | 40 +- data/driver.list.in | 38 +- data/html/Makefile.in | 1 + docs/FAQ.txt | 4 +- docs/Makefile.am | 9 +- docs/Makefile.in | 17 +- docs/config-notes.txt | 60 +- docs/configure.txt | 8 +- docs/documentation.txt | 4 +- docs/download.txt | 12 +- docs/features.txt | 8 +- docs/images/nut_layering.png | Bin 83521 -> 231026 bytes docs/man/Makefile.in | 1 + docs/man/al175.8 | 6 +- docs/man/apcsmart-old.8 | 6 +- docs/man/apcsmart.8 | 6 +- docs/man/apcupsd-ups.8 | 6 +- docs/man/asem.8 | 6 +- docs/man/bcmxcp.8 | 6 +- docs/man/bcmxcp_usb.8 | 6 +- docs/man/belkin.8 | 6 +- docs/man/belkinunv.8 | 6 +- docs/man/bestfcom.8 | 6 +- docs/man/bestfortress.8 | 6 +- docs/man/bestuferrups.8 | 6 +- docs/man/bestups.8 | 6 +- docs/man/blazer_ser.8 | 6 +- docs/man/blazer_usb.8 | 6 +- docs/man/clone.8 | 6 +- docs/man/dummy-ups.8 | 6 +- docs/man/etapro.8 | 6 +- docs/man/everups.8 | 6 +- docs/man/gamatronic.8 | 6 +- docs/man/genericups.8 | 6 +- docs/man/hosts.conf.5 | 6 +- docs/man/isbmex.8 | 6 +- docs/man/ivtscd.8 | 6 +- docs/man/libnutclient.3 | 6 +- docs/man/libnutclient_commands.3 | 6 +- docs/man/libnutclient_devices.3 | 6 +- docs/man/libnutclient_general.3 | 6 +- docs/man/libnutclient_misc.3 | 6 +- docs/man/libnutclient_tcp.3 | 6 +- docs/man/libnutclient_variables.3 | 6 +- docs/man/libupsclient-config.1 | 6 +- docs/man/liebert-esp2.8 | 6 +- docs/man/liebert.8 | 6 +- docs/man/macosx-ups.8 | 16 +- docs/man/macosx-ups.txt | 32 +- docs/man/masterguard.8 | 6 +- docs/man/metasys.8 | 6 +- docs/man/mge-shut.8 | 6 +- docs/man/mge-utalk.8 | 6 +- docs/man/microdowell.8 | 6 +- docs/man/netxml-ups.8 | 6 +- docs/man/nut-ipmipsu.8 | 6 +- docs/man/nut-recorder.8 | 6 +- docs/man/nut-scanner.8 | 6 +- docs/man/nut.conf.5 | 6 +- docs/man/nutdrv_atcl_usb.8 | 10 +- docs/man/nutdrv_atcl_usb.txt | 12 +- docs/man/nutdrv_qx.8 | 11 +- docs/man/nutdrv_qx.txt | 2 +- docs/man/nutscan.3 | 6 +- docs/man/nutscan_add_device_to_device.3 | 6 +- docs/man/nutscan_add_option_to_device.3 | 6 +- docs/man/nutscan_cidr_to_ip.3 | 6 +- docs/man/nutscan_display_parsable.3 | 6 +- docs/man/nutscan_display_ups_conf.3 | 6 +- docs/man/nutscan_free_device.3 | 6 +- docs/man/nutscan_get_serial_ports_list.3 | 6 +- docs/man/nutscan_init.3 | 6 +- docs/man/nutscan_new_device.3 | 6 +- docs/man/nutscan_scan_avahi.3 | 6 +- docs/man/nutscan_scan_eaton_serial.3 | 6 +- docs/man/nutscan_scan_ipmi.3 | 6 +- docs/man/nutscan_scan_nut.3 | 6 +- docs/man/nutscan_scan_snmp.3 | 6 +- docs/man/nutscan_scan_usb.3 | 6 +- docs/man/nutscan_scan_xml_http.3 | 6 +- docs/man/nutupsdrv.8 | 6 +- docs/man/oneac.8 | 6 +- docs/man/optiups.8 | 6 +- docs/man/powercom.8 | 6 +- docs/man/powerman-pdu.8 | 6 +- docs/man/powerpanel.8 | 6 +- docs/man/rhino.8 | 6 +- docs/man/richcomm_usb.8 | 6 +- docs/man/riello_ser.8 | 6 +- docs/man/riello_usb.8 | 6 +- docs/man/safenet.8 | 6 +- docs/man/snmp-ups.8 | 26 +- docs/man/snmp-ups.txt | 13 + docs/man/solis.8 | 6 +- docs/man/tripplite.8 | 6 +- docs/man/tripplite_usb.8 | 6 +- docs/man/tripplitesu.8 | 6 +- docs/man/ups.conf.5 | 20 +- docs/man/ups.conf.txt | 12 +- docs/man/upsc.8 | 6 +- docs/man/upscli_add_host_cert.3 | 6 +- docs/man/upscli_cleanup.3 | 6 +- docs/man/upscli_connect.3 | 6 +- docs/man/upscli_disconnect.3 | 6 +- docs/man/upscli_fd.3 | 6 +- docs/man/upscli_get.3 | 6 +- docs/man/upscli_init.3 | 6 +- docs/man/upscli_list_next.3 | 6 +- docs/man/upscli_list_start.3 | 6 +- docs/man/upscli_readline.3 | 6 +- docs/man/upscli_sendline.3 | 6 +- docs/man/upscli_splitaddr.3 | 6 +- docs/man/upscli_splitname.3 | 6 +- docs/man/upscli_ssl.3 | 6 +- docs/man/upscli_strerror.3 | 6 +- docs/man/upscli_upserror.3 | 6 +- docs/man/upsclient.3 | 6 +- docs/man/upscmd.8 | 6 +- docs/man/upscode2.8 | 6 +- docs/man/upsd.8 | 6 +- docs/man/upsd.conf.5 | 6 +- docs/man/upsd.users.5 | 6 +- docs/man/upsdrvctl.8 | 6 +- docs/man/upsimage.cgi.8 | 6 +- docs/man/upslog.8 | 6 +- docs/man/upsmon.8 | 6 +- docs/man/upsmon.conf.5 | 6 +- docs/man/upsrw.8 | 9 +- docs/man/upsrw.txt | 9 + docs/man/upssched.8 | 6 +- docs/man/upssched.conf.5 | 6 +- docs/man/upsset.cgi.8 | 6 +- docs/man/upsset.conf.5 | 6 +- docs/man/upsstats.cgi.8 | 6 +- docs/man/upsstats.html.5 | 6 +- docs/man/usbhid-ups.8 | 6 +- docs/man/victronups.8 | 6 +- docs/net-protocol.txt | 12 +- docs/new-clients.txt | 4 +- docs/new-drivers.txt | 8 +- docs/nut-names.txt | 318 +++++-- docs/nut-qa.txt | 3 + docs/nutdrv_qx-subdrivers.txt | 77 +- docs/packager-guide.txt | 4 +- docs/scheduling.txt | 2 +- docs/snmp-subdrivers.txt | 3 +- docs/user-manual.txt | 4 + drivers/Makefile.am | 7 +- drivers/Makefile.in | 18 +- drivers/apc-ats-mib.c | 447 +++++++++ drivers/apc-ats-mib.h | 29 + drivers/apc-hid.c | 7 +- drivers/apc-mib.c | 12 +- drivers/baytech-mib.c | 8 +- drivers/bcmxcp.c | 4 +- drivers/bcmxcp.h | 1 + drivers/bcmxcp_usb.c | 76 +- drivers/bestpower-mib.c | 4 +- drivers/blazer.c | 2 +- drivers/blazer_ser.c | 2 +- drivers/blazer_usb.c | 2 +- drivers/compaq-mib.c | 14 +- drivers/cyberpower-mib.c | 4 +- drivers/delta_ups-mib.c | 8 +- drivers/dstate.c | 6 +- drivers/dummy-ups.c | 10 +- drivers/dummy-ups.h | 3 +- drivers/eaton-ats-mib.c | 245 +++++ drivers/eaton-ats-mib.h | 30 + drivers/eaton-mib.c | 334 ++++++- drivers/hidparser.c | 28 +- drivers/hidtypes.h | 11 +- drivers/huawei-mib.c | 234 +++++ drivers/huawei-mib.h | 9 + drivers/ietf-mib.c | 20 +- drivers/ietf-mib.h | 1 + drivers/libhid.c | 10 +- drivers/libshut.c | 17 +- drivers/libshut.h | 13 +- drivers/libusb.c | 30 +- drivers/macosx-ups.c | 144 +-- drivers/mge-hid.c | 8 +- drivers/mge-mib.c | 28 +- drivers/mge-xml.c | 20 +- drivers/netvision-mib.c | 8 +- drivers/nut-libfreeipmi.c | 15 +- drivers/nutdrv_qx.c | 146 ++- drivers/nutdrv_qx.h | 28 +- drivers/nutdrv_qx_bestups.c | 128 +-- drivers/nutdrv_qx_blazer-common.c | 6 +- drivers/nutdrv_qx_blazer-common.h | 6 +- drivers/nutdrv_qx_mecer.c | 82 +- drivers/nutdrv_qx_megatec-old.c | 72 +- drivers/nutdrv_qx_megatec.c | 72 +- drivers/nutdrv_qx_mustek.c | 72 +- drivers/nutdrv_qx_q1.c | 58 +- drivers/nutdrv_qx_voltronic-qs-hex.c | 219 +++-- drivers/nutdrv_qx_voltronic-qs.c | 76 +- drivers/nutdrv_qx_voltronic.c | 552 +++++------ drivers/nutdrv_qx_zinto.c | 72 +- drivers/powercom.c | 137 ++- drivers/powerp-bin.c | 2 +- drivers/powerp-txt.c | 4 +- drivers/powerpanel.c | 2 +- drivers/powerware-mib.c | 242 ++++- drivers/powerware-mib.h | 1 + drivers/raritan-pdu-mib.c | 8 +- drivers/snmp-ups.c | 872 ++++++++++++----- drivers/snmp-ups.h | 22 +- drivers/solis.c | 346 ++++--- drivers/solis.h | 108 ++- drivers/tripplite-hid.c | 71 +- drivers/tripplitesu.c | 9 +- drivers/upscode2.c | 4 +- drivers/usb-common.h | 13 +- drivers/usbhid-ups.c | 19 +- drivers/xppc-mib.c | 4 +- include/Makefile.am | 2 +- include/Makefile.in | 3 +- include/common.h | 6 +- include/config.h.in | 6 + include/str.h | 129 +++ lib/Makefile.in | 1 + lib/README | 2 +- m4/nut_check_libnss.m4 | 7 +- scripts/Makefile.in | 1 + scripts/Solaris/Makefile.in | 1 + scripts/augeas/Makefile.in | 1 + scripts/augeas/README | 2 +- scripts/augeas/nutupsconf.aug.in | 7 + scripts/augeas/nutupsconf.aug.tpl | 5 + scripts/devd/Makefile.in | 1 + scripts/devd/nut-usb.conf.in | 20 + scripts/hotplug/Makefile.in | 1 + scripts/hotplug/libhid.usermap | 6 + scripts/python/Makefile.in | 1 + scripts/subdriver/gen-snmp-subdriver.sh | 42 +- scripts/systemd/Makefile.in | 1 + scripts/systemd/nut-server.service.in | 2 +- scripts/udev/Makefile.in | 1 + scripts/udev/nut-usbups.rules.in | 6 + scripts/upower/95-upower-hid.rules | 14 +- server/Makefile.in | 1 + server/netget.c | 5 +- server/upsd.c | 2 +- tests/Makefile.in | 1 + tools/Makefile.am | 5 +- tools/Makefile.in | 6 +- tools/driver-list-format.sh | 32 + tools/nut-scanner/Makefile.in | 1 + tools/nut-scanner/README | 2 +- tools/nut-scanner/nut-scan.h | 11 +- tools/nut-scanner/nut-scanner.c | 39 +- tools/nut-scanner/nutscan-device.c | 11 +- tools/nut-scanner/nutscan-device.h | 11 +- tools/nut-scanner/nutscan-display.c | 10 +- tools/nut-scanner/nutscan-init.c | 79 +- tools/nut-scanner/nutscan-init.h | 11 +- tools/nut-scanner/nutscan-ip.c | 10 +- tools/nut-scanner/nutscan-ip.h | 11 +- tools/nut-scanner/nutscan-serial.c | 11 +- tools/nut-scanner/nutscan-serial.h | 11 +- tools/nut-scanner/nutscan-snmp.h | 43 +- tools/nut-scanner/nutscan-usb.h | 2 + tools/nut-scanner/scan_avahi.c | 208 ++-- tools/nut-scanner/scan_eaton_serial.c | 10 +- tools/nut-scanner/scan_ipmi.c | 21 +- tools/nut-scanner/scan_nut.c | 111 ++- tools/nut-scanner/scan_snmp.c | 39 +- tools/nut-scanner/scan_usb.c | 126 +-- tools/nut-scanner/scan_xml_http.c | 94 +- tools/nut-snmpinfo.py | 19 +- tools/nut-usbinfo.pl | 9 +- 290 files changed, 7473 insertions(+), 2607 deletions(-) create mode 100644 common/str.c create mode 100755 drivers/apc-ats-mib.c create mode 100755 drivers/apc-ats-mib.h create mode 100644 drivers/eaton-ats-mib.c create mode 100644 drivers/eaton-ats-mib.h create mode 100644 drivers/huawei-mib.c create mode 100644 drivers/huawei-mib.h create mode 100644 include/str.h create mode 100755 tools/driver-list-format.sh diff --git a/ChangeLog b/ChangeLog index 96dc998..2a1df65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,1090 @@ +2016-03-09 Arnaud Quette + + * configure.ac: Fix autoreconf on Debian For some reason, Automake + doesn't search the current directory correctly when searching for + helper scripts, when 'nut' is running as a git-submodule, as it is + the case with the website repository + * configure.ac: update version to 2.7.4 + * drivers/apc-ats-mib.c: snmp-ups: add APC ATS input.source + * drivers/snmp-ups.c: snmp-ups: fix the matching OID tests For both + sysOID and classic methods, we used to test one of the two OIDs + provided in the mib2nut structures. However, these two OIDs + (oid_pwr_status and oid_auto_check) tend to be redundant and + confusing. Replace these matching by an extraction of + {ups,device}.model + * drivers/nut-libfreeipmi.c: nut-ipmipsu: fix compilation warnings + * NEWS, UPGRADING, docs/FAQ.txt, docs/net-protocol.txt, docs/new- + drivers.txt, docs/nut-names.txt, docs/nutdrv_qx-subdrivers.txt, + docs/packager-guide.txt, docs/snmp-subdrivers.txt, lib/README, + scripts/augeas/README: Fix spelling and typo errors Following the + spell-checking scope expansion, do a spell-checking pass + * docs/documentation.txt: Update documentation as per the new devices + scope + * docs/features.txt, docs/user-manual.txt: Update documentation as + per the new devices scope + * docs/Makefile.am: Expand spell-checking scope Add more documents, + outside of the docs/ directory Closes: + https://github.com/networkupstools/nut/issues/222 + +2016-03-08 Arnaud Quette + + * configure.ac, tools/Makefile.am, tools/driver-list-format.sh: Check + driver.list[.in] format at make dist time Instead of checking + driver.list.in at configure time, move the checking and + modification into a script that is called at make dist time. The + script can also be called manually, and will try to fix both + driver.list.in and driver.list + +2016-03-07 Arnaud Quette + + * drivers/powerware-mib.c: Remove an erroneous test This was made + test the enumerated values registration in snmp-ups, and should not + have been committed + * data/driver.list.in: HCL: APC ATS AP7724 supported by snmp-ups + These Automatic Transfer Switch should be supported by snmp-ups, + however this was not tested at all Reference: + https://github.com/networkupstools/nut/issues/260 + * NEWS, UPGRADING: Update for release 2.7.4 + * drivers/Makefile.am, drivers/apc-ats-mib.c, drivers/apc-ats-mib.h, + drivers/snmp-ups.c: snmp-ups: support APC Automatic Transfer Switch + Following the recent extension of NUT scope and variable namespace, + to support Automatic Transfer Switch (ATS), implement SNMP support + for APC ATS (with help from "maaboo" through github) Reference: + https://github.com/networkupstools/nut/issues/260 + +2016-03-04 Arnaud Quette + + * drivers/baytech-mib.c, drivers/bestpower-mib.c, drivers/compaq- + mib.c, drivers/cyberpower-mib.c, drivers/eaton-mib.c, drivers/mge- + mib.c, drivers/netvision-mib.c, drivers/powerware-mib.c, drivers + /raritan-pdu-mib.c: snmp-ups: fix mib2nut structures Non existent + OIDs, for testing MIB selection, must be expressed as NULL and not + as empty string ("") for the algorithm to work + +2016-03-03 Daniele Pezzini + + * docs/download.txt: docs: update several download links + +2016-03-03 Arnaud Quette + + * docs/man/upsrw.txt, docs/net-protocol.txt: Clarification on NUMBER + type float values Clarify a bit more documentation on how to + express float values, when using upsrw. That is to say, using + decimal (base 10) english-based representation, so using a dot, in + non-scientific notation. So hexadecimal, exponents, and comma for + thousands separator are forbiden + * clients/upsrw.c, docs/net-protocol.txt, server/netget.c: Prefer + NUMBER to NUMERIC for variable type As per discussion on the + Github pull request, NUMBER would be more suitable than NUMERIC + +2015-11-22 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: increase timeouts in 'sgs' USB + subdriver Apparently the previously used timeouts in the 'sgs' USB + subdriver were not always enough, so increase them. + +2015-11-11 Daniele Pezzini + + * data/driver.list.in: HCL: various TS Shara UPSes supported by + nutdrv_qx Protocol: 'megatec' USB subdriver: 'sgs' + * drivers/nutdrv_qx.c: nutdrv_qx: make sure 'sgs' USB subdriver uses + only what it reads Since, in 'sgs' USB subdriver, we read only 8 + bytes at a time and we expect the first byte to tell us the length + of the data that follows, make sure we don't use more than what we + read from the device in case the first byte is not what we expect + it to be. + +2015-03-04 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: increase verbosity of 'sgs' USB + subdriver In 'sgs' USB subdriver: - be more verbose when + debugging, - always print the return code when dealing with an + error. + +2014-01-31 Daniele Pezzini + + * docs/man/nutdrv_qx.txt: nutdrv_qx: update man page for new 'sgs' + USB subdriver + +2014-01-31 Ronaldo Yamada + + * drivers/nutdrv_qx.c: nutdrv_qx: add new 'sgs' USB subdriver to + support TS Shara units + +2016-03-02 Arnaud Quette + + * data/driver.list.in: HCL: added Eaton Powerware 9125-5000g + Supported with the additional USB card, with the bcmxcp_usb driver + * docs/man/upsrw.txt, docs/net-protocol.txt: Clarification on NUMERIC + type float values Clarify documentation on how to express float + values, when using upsrw. That is to say, using decimal english- + based representation, so using a dot + * drivers/mge-xml.c: netxml-ups: fix Eaton XML published data Some + raw protocol data were wrongly published, and are now commented. + Also add some R/W flags to ambient thresholds Closes: + https://github.com/networkupstools/nut/issues/201 + * tools/nut-scanner/nut-scanner.c: nut-scanner: fix thread attachment + Add a test to have the right thread waiting for the scan to be + complete (patch from Michal Hlavinka, Red Hat) + * configure.ac, tools/nut-scanner/nutscan-init.c, tools/nut- + scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, tools/nut- + scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools/nut- + scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: nut-scanner: + don't depend on development libraries nut-scanner was previously + trying to use directly libXXX.so (libusb-0.1, libfreeipmi, + libnetsnmp, libavahi-client, libneon, libupsclient}. However, these + files are generally provided by the development packages. nut- + scanner now tries to look at some known paths, including the one + provided through --libdir, to find the correct libraries Closes: + https://github.com/networkupstools/nut/issues/233 + +2016-03-01 Arnaud Quette + + * clients/upsrw.c, docs/net-protocol.txt, server/netget.c: Default to + type NUMERIC for variables Any variable that is not STRING, RANGE + or ENUM is just a simple numeric value. The protocol documentation + (net-protocol.txt) was previously stating that "The default , + when omitted, is integer." which was not fully true, since a + variable could also be a float. Hence, the wording was changed to + advertise this, and that each driver is then responsible for + handling values as either integer or float. Moreover, instead of + returning a TYPE "UNKNOWN", return "NUMERIC", which is more + suitable, and aligned with the NUT protocol specification + * tools/nut-snmpinfo.py: SNMP subdriver generator: fix output + formatting + * tools/nut-snmpinfo.py: SNMP subdriver generator: discard commented + lines Discard any commented mib2nut_info_t declaration, which + should thus not be taken into account + +2016-02-26 Arnaud Quette + + * data/driver.list.in, drivers/Makefile.am, drivers/eaton-ats-mib.c, + drivers/eaton-ats-mib.h, drivers/snmp-ups.c: snmp-ups: support + Eaton Automatic Transfer Switch Following the recent extension of + NUT scope and variable namespace, to support Automatic Transfer + Switch (ATS), implement SNMP support for Eaton ATS. Note that this + device can also be supported through Eaton XML/PDC (XML over HTTP) + protocol, supported by the NUT netxml-ups driver + * data/cmdvartab, docs/nut-names.txt: Extend namespace for Automatic + Transfer Switch (ATS) Extend NUT namespace to support a new type + of power device: ATS - Automatic Transfer Switch. These devices + are used to setup 2 power systems, such as UPS, to power a single + power supply system, and be able to automatically transfer between + the input sources in case of failure of the primary one. The added + variable are for now limited to 'input.source' and + 'input.source.preferred', but may be extended if needed + +2016-02-25 C Fraire + + * docs/scheduling.txt: Fix docs location of upssched to sbin + +2016-02-25 Arnaud Quette + + * scripts/subdriver/gen-snmp-subdriver.sh: snmp-ups: add the last + missing element in the structure + * drivers/apc-mib.c, drivers/bestpower-mib.c, drivers/compaq-mib.c, + drivers/cyberpower-mib.c, drivers/delta_ups-mib.c, drivers/huawei- + mib.c, drivers/ietf-mib.c, drivers/mge-mib.c, drivers/netvision- + mib.c, drivers/powerware-mib.c, drivers/xppc-mib.c, + scripts/subdriver/gen-snmp-subdriver.sh: snmp-ups: fix values + lookup terminating element The terminating element should really + be NULL, and not the string "NULL", as it was originally done, back + in 2002 + * drivers/snmp-ups.c: snmp-ups: revert order of the NULL/"NULL" test + Fix a segfault when doing first the string comparison test + * drivers/snmp-ups.c: snmp-ups: register values enumerations + Whenever there is a values lookup structure for read/write data, + push the values as enumerations for upsrw + * drivers/snmp-ups.c: snmp-ups: try to lookup values for numeric + elements Numeric elements can also use the value resolution + mechanism + * drivers/snmp-ups.c: snmp-ups: counter test sysOID with a test OID + Some devices have buggy sysOID exposed. Allow to counter test + another OID, to be able to select between different mapping + structures + +2016-02-24 Arnaud Quette + + * scripts/subdriver/gen-snmp-subdriver.sh: SNMP subdriver creation + script: allow sysOID override Allow to use -s to override buggy + sysOID in some device FW. In this case, the sysOID entry in the + mib2nut structure should be set to NULL + +2016-02-11 Arnaud Quette + + * drivers/raritan-pdu-mib.c: snmp-ups: fix macaddr support for + Raritan PDU Raritan MIB was fixed to expose macaddr on + device.macaddr instead of ups.macaddr + * drivers/baytech-mib.c: snmp-ups: fix macaddr support for Baytech + PDU Baytech MIB was fixed to expose macaddr on device.macaddr + instead of ups.macaddr + * drivers/eaton-mib.c: snmp-ups: fix and complete macaddr support for + Eaton Eaton G2 and G3 can now expose the MAC address of the + device, using device.macaddr. Eaton G1 Aphel was fixed to expose + this data on device.macaddr instead of ups.macaddr + * drivers/snmp-ups.c: snmp-ups: add support for hexadecimal octet + strings + * drivers/snmp-ups.c: snmp-ups: fallback for classic MIB detection + If the sysOID matching has failed, then snmp-ups uses ups.model to + get an OID to test. In case ups.model is not available, fallback to + trying to use device.model instead + * docs/images/nut_layering.png, docs/images/nut_layering.svg: Refresh + and complete NUT architecture diagram + +2016-02-08 Arnaud Quette + + * drivers/powerware-mib.c: snmp-ups: extend Eaton 3ph outputSource + values map Add the new status values for xupsOutputSource + (.1.3.6.1.4.1.534.1.4.5.0), that maps to both ups.status and + ups.type + +2016-02-03 Arnaud Quette + + * drivers/powerware-mib.c: snmp-ups: improve support for Eaton 3ph + Improve support for temperature and humidity data, including: - + ups.temperature now available - fixing ambient.temperature + (previously pointing at a wrong OID) - ambient.humidity now + available - the following settings now available: * + ups.temperature.low * ups.temperature.high * ambient.humidity.high + * ambient.humidity.low * ambient.temperature.high * + ambient.temperature.low + +2016-02-01 Daniele Pezzini + + * data/driver.list.in: HCL: various APCUPSD-controlled APC devices + via apcupsd-ups Originally reported by GitHub user @Thermionix. + Reference: https://github.com/networkupstools/nut/pull/215 + +2016-01-31 Charles Lepple + + * docs/man/nutdrv_atcl_usb.txt: man/nutdrv_atcl_usb: point to + nutdrv_qx (fuji) for 0001:0000 Also update best guess for the USB- + to-serial converter situation. + * docs/FAQ.txt: FAQ: udevadm for fixing permissions + +2016-01-30 Charles Lepple + + * drivers/nut-libfreeipmi.c: FreeIPMI: do not split function + arguments with a conditional Alternate approach to suggestion by + Romero B. de S. Malaquias Closes: + https://github.com/networkupstools/nut/pull/250 + +2016-01-24 Charles Lepple + + * docs/config-notes.txt: Documentation: fix formatting Put syntax + examples in verbatim mode, and remove spaces from ends of lines. + * drivers/apc-hid.c: usbhid-ups: handle missing USB strings in APC + code Closes: https://github.com/networkupstools/nut/issues/258 + Might fix: + https://bugs.launchpad.net/ubuntu/+source/nut/+bug/1483615 + +2016-01-23 Charles Lepple + + * data/driver.list.in: HCL: added NHS Laser Senoidal 5000VA Source: + http://article.gmane.org/gmane.comp.monitoring.nut.devel/7123 + Closes: https://github.com/networkupstools/nut/issues/254 + +2016-01-14 Arnaud Quette + + * drivers/snmp-ups.c: snmp-ups: fix staleness detection With some + ePDUs or devices using template for outlet and outlet.group, + communication loss with the device were not detected, due to the + handling mechanism. Simply skipping commands for templates, after + the init time, is sufficient to avoid this issue + +2016-01-05 Arnaud Quette + + * drivers/snmp-ups.c: snmp-ups: improve stale communication recovery + Disable the 10 iterations to retry communicating with stale device. + This was leading up to 10 x 30 seconds, so 5mn, before being able + to get data again + * docs/new-drivers.txt, docs/nut-names.txt: Document + battery.charger.status This will in time replace the historic CHRG + and DISCHRG flags published in ups.status. Closes + https://github.com/networkupstools/nut/issues/196 + +2016-01-03 Charles Lepple + + * data/driver.list.in: HCL: Sweex model P220 via blazer_usb + Reference: https://github.com/networkupstools/nut/issues/251 + +2016-01-04 Arnaud Quette + + * drivers/ietf-mib.c, drivers/ietf-mib.h, drivers/snmp-ups.c: snmp- + ups: add support for Tripplite units on IETF mib These devices + expose ".1.3.6.1.4.1.850.1", which could be supported through this + specific MIB. For now, just link that to the IETF MIB, to provide + a first level of support Reference: + https://github.com/networkupstools/nut/issues/171 + +2015-12-30 Arnaud Quette + + * configure.ac: First stab at checking driver.list.in format + +2015-12-29 Charles Lepple + + * scripts/upower/95-upower-hid.rules: upower: update for AEG + +2015-12-29 Arnaud Quette + + * drivers/powercom.c: Fix the processing of output voltage for KIN + units The processing of output voltage requires to also take into + account the line voltage, as reported by Patrik Dufresne. This may + still need some further adjustments Reference: + https://github.com/networkupstools/nut/issues/187 + * drivers/powercom.c: Fix the processing of input voltage for KIN + units The processing of input voltage requires to also take into + account the line voltage, as reported by Patrik Dufresne. Also bump + the driver version to 0.16, since 0.15 was already used, but not + set Reference: https://github.com/networkupstools/nut/issues/187 + * drivers/mge-hid.c: Fix letter case for AEG USB VendorID The letter + case of this VendorID may be important for generated files, such as + the udev ones (reported by Charles Lepple) + +2015-12-28 Arnaud Quette + + * data/driver.list.in, drivers/mge-hid.c: HCL: AEG PROTECT B / NAS + supported by usbhid-ups Reference: + https://github.com/networkupstools/nut/issues/249 + +2015-12-17 Daniele Pezzini + + * data/driver.list.in: HCL: Legrand Keor Multiplug supported by + nutdrv_qx Reference: + https://github.com/networkupstools/nut/issues/248 + +2015-12-09 Andrey Jr. Melnikov + + * drivers/bcmxcp_usb.c: Don't call usb_close() after reset + +2015-12-08 Andrey Jr. Melnikov + + * drivers/bcmxcp_usb.c: Call usb_reset() when driver unable to claim + device + * drivers/bcmxcp.h, drivers/bcmxcp_usb.c: Refactor get_answer() + routine, make it properly deal with multi-packets responses. Lower + stack usage. + +2015-07-27 Daniele Pezzini + + * common/common.c, common/str.c, drivers/bcmxcp.c, drivers/blazer.c, + drivers/blazer_ser.c, drivers/blazer_usb.c, drivers/libhid.c, + drivers/mge-xml.c, drivers/nutdrv_qx.c, drivers/powerp-bin.c, + drivers/powerp-txt.c, drivers/powerpanel.c, drivers/tripplitesu.c, + drivers/upscode2.c, include/common.h, include/str.h, server/upsd.c, + tools/nut-scanner/scan_usb.c: common: consolidate some string- + related functions Move *trim*() functions from common to str. + Prepend the 'str_' common prefix. Bailout early if string is NULL + or empty. In *trim_m() functions, make sure the string containing + characters to be removed is not NULL and bailout early if empty. + Add new str_trim[_m]() functions to remove both leading and + trailing characters at the same time. Update all the tree + accordingly; versioning where appropriate. + * common/Makefile.am, common/str.c, include/Makefile.am, + include/common.h, include/str.h: common: add some string-related + functions + +2015-11-10 Charles Lepple + + * data/driver.list.in: HCL: Electrys UPS 2500 (nutdrv_qx and + blazer_ser) Closes + https://github.com/networkupstools/nut/issues/241 + * data/driver.list.in: HCL: Eaton E Series DX UPS 1-20 kVA uses + blazer_ser Closes + https://github.com/networkupstools/nut/issues/238 + +2015-11-09 Arnaud Quette + + * drivers/eaton-mib.c: snmp-ups: add number of outlets in Eaton ePDU + groups + * docs/nut-names.txt: Add a variable for the number of outlets in a + group Added 'outlet.group.n.count' which provides the number of + outlets in the outlet group 'n' + +2015-11-06 Daniele Pezzini + + * drivers/nutdrv_qx_voltronic-qs.c: nutdrv_qx: update 'voltronic-qs' + subdriver Since, for devices supported by 'voltronic-qs' + subdriver, in reality: - invalid commands or queries are echoed + back, - accepted commands are followed by action without any + further reply, update the subdriver interface accordingly. Also: - + change slightly the way we publish protocol as ups.firmware.aux, - + update F's reply examples and some info_type (ratings; + output.frequency) in QX to NUT table to reflect reality, - increase + version number. + +2015-10-19 Daniele Pezzini + + * drivers/nutdrv_qx_voltronic-qs-hex.c: nutdrv_qx: improve 'T' + protocol support in 'voltronic-qs-hex' subdriver Since the last + byte of the reply to the QS query (before the trailing CR) of + devices that implement the 'T' protocol holds in reality ratings + informations (nominal output frequency/voltage and nominal battery + voltage) in its bits, change the 'voltronic-qs-hex' subdriver + accordingly. Also: - change slightly the way we publish protocol as + ups.firmware.aux, - increase version number. + * drivers/nutdrv_qx_voltronic-qs-hex.c: nutdrv_qx: simplify + {in,out}put voltage conversion in 'voltronic-qs-hex' In + 'voltronic-qs-hex' subdriver, instead of calculating separately the + fractional and integer part of input and output voltage, do it at + once. Also, increase version number. + * drivers/nutdrv_qx_voltronic-qs-hex.c: nutdrv_qx: improve protocol + identification in 'voltronic-qs-hex' Since 'V' protocol, in + reality, never happens to use the encoded version of the reply to + the QS query, but it always uses the plain version already + implemented in 'voltronic-qs' subdriver, remove it from the + identification process of 'voltronic-qs-hex' subdriver. Also, + remove some non-significant entries from the testing table and + increase version number. + * drivers/nutdrv_qx_voltronic-qs-hex.c: nutdrv_qx: harmonize + declarations/definitions in 'voltronic-qs-hex' In 'voltronic-qs- + hex' subdriver, the scope of support functions is limited to the + subdriver as rightly stated in forward declarations, so correct + their definitions to reflect that. Also, increase version number. + +2015-10-09 Arnaud Quette + + * docs/nut-qa.txt: Reference Black Duck OpenHUB in QA documentation + Closes networkupstools/nut#192 + +2015-10-08 Arnaud Quette + + * drivers/snmp-ups.c: snmp-ups: also use __func__ for additional + traces + * drivers/powerware-mib.c: powerware-mib: more comments for RFC + device.event Add more comments on the need to RFC device.event for + some data that are currently published under ups.alarm + * drivers/powerware-mib.c: snmp-ups: improve Eaton 3-phase UPS alarms + reporting Eaton 3phase UPS, using the Powerware MIB, can expose + many new alarms. Also use the standard driver "X.YY" versioning, + and bump subdriver release to "0.85" + * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups: fix and improve + the ups.alarms mechanism This mechanism allows to walk a subtree + (array) of alarms, composed of OID references. The object + referenced should not be accessible, but rather when present, this + means that the alarm condition is TRUE. Both ups.status and/or + ups.alarm values can be provided + * drivers/snmp-ups.c: snmp-ups: fix on some snprintf calls Some + snprintf calls are using dynamically allocated variables, which + doesn't work with sizeof + * drivers/snmp-ups.c: snmp-ups: use __func__ in debug messages + * drivers/snmp-ups.c: snmp-ups: nut_snmp_get_oid() returns TRUE on + success + * drivers/snmp-ups.c: snmp-ups: only use snprintf calls instead of + sprintf + * drivers/eaton-mib.c, drivers/snmp-ups.c: snmp-ups: simplify + handling of other alarms outlet, outlet groups and phase alarms + are now using a simplified approach that does not require specific + lookup structure to adapt alarm messages. This applies to Eaton + ePDU G2/G3 + +2015-09-22 Arnaud Quette + + * drivers/snmp-ups.c: snmp-ups: fix a typo error in debug message + Unknown is spelled with an ending N (reported by Evgeny "Jim" + Klimov, from Eaton) + * drivers/snmp-ups.c: snmp-ups: optimize phase number extraction + efficiency Since we know that we are processing an alarm for a + phase "Lx", don't use strchr, but simply index (reported by Evgeny + "Jim" Klimov, from Eaton) + * docs/nut-names.txt, drivers/eaton-mib.c: snmp-ups: use dash- + separator for out-of-range For the sake of coherence with other + status relative to thresholds, "out of range" frequency status now + also use dash as separator, instead of space + * drivers/eaton-mib.c: Fix a spelling error in comments + * drivers/eaton-mib.c: snmp-ups: fix a typo error on Eaton ePDU G2/G3 + MIB Critical is really spelled critical, and not cricital, as used + in the various status thresholds value-lookup structures (reported + by Evgeny "Jim" Klimov, from Eaton) + * data/cmdvartab: Mention the unit for ambient humidity information + Add an explicit mention that ambient information related to + humidity use the "(percent)" unit + * data/cmdvartab, docs/nut-names.txt: Mention the unit for input + voltage information Add an explicit mention that input information + related to voltage use the "Volts (V)" unit + * data/cmdvartab: Mention the unit for ambient temperature + information Add an explicit mention that ambient information + related to temperature use the "degrees C" unit + +2015-09-18 Arnaud Quette + + * drivers/eaton-mib.c: snmp-ups: add outlet group identifier for + Eaton ePDU Eaton ePDU can now publish the parent group of each + outlet + * docs/nut-names.txt: Extend outlet collection namespace with group + ID An outlet can now publish the group to which it belongs to + * drivers/snmp-ups.c: snmp-ups: complete nut_snmp_get_{str,int} + These methods now allow to get the value of an OID returned by the + source OID (as for the sysOID). In case of failure (non existent + OID), the functions return the last part of the returned OID (ex: + 1.2.3 => 3) + * drivers/snmp-ups.c: snmp-ups: create a nut_snmp_get_oid() function + This method allows to get the value of an OID which is also an OID + (as for the sysOID), without trying to get the value of the pointed + OID. This will allow to use nut_snmp_get_{int,str}() the get the + value of the pointed OID + +2015-09-17 Arnaud Quette + + * drivers/eaton-mib.c: snmp-ups: outlet groups type handling for + Eaton ePDU Eaton ePDU can now publish the type of outlet group + * docs/nut-names.txt: Extend outlet group collection namespace with + type The type of outlet group can now be published, part of the + new outlet.group data collection + * drivers/eaton-mib.c: snmp-ups: outlet groups commands for Eaton + ePDU Eaton ePDU can now handle commands outlet groups, including + on, off and reboot (cycle) + * drivers/snmp-ups.c: snmp-ups: fix commands handling for outlet + groups The su_instcmd() function of snmp-ups is now adapted to + support outlet groups + * drivers/eaton-mib.c: Advanced outlets groups alarm handling for + Eaton ePDU Eaton ePDU can now handle alarms on outlets groups, for + voltage and current, relative to the configured thresholds + * drivers/snmp-ups.c: snmp-ups: improvements for outlet groups and + alarms Improve the code for general template management, including + outlets and outlets groups for now, and add alarm management for + outlet groups, the same way as for outlets + +2015-09-16 Arnaud Quette + + * drivers/snmp-ups.c: snmp-ups: fix set variable for outlet groups + The setvar() function of snmp-ups is now adapted to support outlet + groups + * drivers/eaton-mib.c: snmp-ups: outlet groups handling for Eaton + ePDU Eaton ePDU can now handle outlet groups, including voltage + and current (with thresholds and status relative to the configured + thresholds), along with power and realpower. A subsequent commit + will address the alarms, settings and commands. Bump subdriver + version to 0.30 + * drivers/snmp-ups.c: snmp-ups: update debug message The template + guestimation function name was changed, but the debug message was + left with the old function name + +2015-09-15 Arnaud Quette + + * docs/nut-names.txt: Extend NUT namespace with outlet.group + collection A new data collection, called "outlet.group", is now + available. It provides grouped management for a set of outlets. The + same principles and data than the outlet collection apply to + outlet.group + * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups: adapt template + mechanisms for outlet groups The template handling mechanisms, + originally created for outlets, is now adapted to also manage + outlet groups + +2015-09-14 root + + * docs/nut-names.txt: Add a note on the outlet.count variable + +2015-09-14 Arnaud Quette + + * drivers/eaton-mib.c: snmp-ups: add nominal input current for Eaton + ePDU snmp-ups now provides input.[Lx.]current.nominal for Eaton + ePDU G2/G3, both for 1phase and 3phase + * drivers/eaton-mib.c: snmp-ups: better input.power handling for + Eaton ePDUs Improve the way we declare and process input.power, as + previously done for input.realpower, in order to address the + variations between Eaton ePDUs G2 and G3 + +2015-09-11 Arnaud Quette + + * drivers/eaton-mib.c: snmp-ups: publish part number for Eaton ePDU + device.part was standardized in NUT namespace, so enable the + declaration for Eaton ePDU + * drivers/eaton-mib.c: snmp-ups: 3-phase alarm handling for Eaton + ePDU Eaton ePDU can now handle alarms on 3-phase, currently + limited to voltage and current, relative to the configured + thresholds + * drivers/snmp-ups.c: snmp-ups: implement 3-phase alarm handling + snmp-ups now allows to publish 3-phase alarms in ups.alarm, the + same way as with outlet. Declaration of such alarms are done using + "Lx.alarm". info_lkp_t structures messages are shared templates + with outlets, and use the string formats to include the context + (outlet or phase) and the number (of the outlet or phase) in alarm + messages. These alarms are then published in "ups.alarm", with the + standard mechanism for alarm publication + * docs/nut-names.txt: Extend 3-phase collection namespace with alarms + 3-phase data collection now allows to specify alarms, the same way + than with the outlet collection ("outlet.n.alarm"), but using + "Lx.alarm" (for example "L1.alarm"). These alarms are then + published in "ups.alarm", with the standard mechanism for alarm + publication + * drivers/eaton-mib.c: Advanced threshold handling for Eaton 3-phase + ePDU Eaton ePDU can now handle warning and critical thresholds + settings and status for input voltage and current on 3-phase units. + Alarms are however still to be implement + * docs/nut-names.txt: Extend 3-phase collection namespace with + threshold 3-phase data collection now allows to specify low / high + warning and critical thresholds for voltage and current. Status + relative to the thresholds also exist for these data + +2015-09-07 Arnaud Quette + + * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups: fix loss of + precision when setting values su_setvar() was losing precision + when converting and casting the provided values to send to the SNMP + agent. As an example, with an OID in millivolt (multiplier set to + 0.001), when providing 238 (V) using upsrw, the value sent to the + SNMP agent was 237999, so leaking 0.1 volt + +2015-09-04 Arnaud Quette + + * drivers/dstate.c: Extend ups.alarm internal buffer to 1024 chars + Currently, ups.alarm can hold up to 256 chars to expose alarms. + With the recent outlet alarms handling addition, the buffer may + quickly be to small. Thus, increase to 1024, which may still not + be sufficient but already provides a bit more room + * drivers/eaton-mib.c: snmp-ups: outlet alarm handling for Eaton ePDU + Eaton ePDU can now handle alarms on outlets, currently limited to + outlet voltage and current, relative to the configured thresholds + * drivers/snmp-ups.c: snmp-ups: implement outlets / PDU alarm + handling snmp-ups now allows to publish outlets and PDU alarms in + ups.alarm, the same way as with ups.status. Declaration of such + alarms are done using the outlet template mechanism + ("outlet.%i.alarm"). info_lkp_t structures messages can also use + the string formats to include the outlet number in alarm messages. + These alarms are then published in "ups.alarm", with the standard + mechanism for alarm publication + * docs/nut-names.txt: Extend outlet collection namespace with alarms + Outlet data collection now allows to specify alarms, using the + template definitions ("outlet.n.alarm"). These alarms are then + published in "ups.alarm", with the standard mechanism for alarm + publication + +2015-09-02 Arnaud Quette + + * drivers/eaton-mib.c: snmp-ups: outlet threshold handling for Eaton + ePDU Eaton ePDU can now handle warning and critical thresholds + settings and status for outlet voltage and current + * docs/nut-names.txt: Extend outlet collection namespace with + threshold Outlet data collection now allows to specify low / high + warning and critical thresholds for voltage and current. Status + relative to the thresholds also exist for these data + +2015-09-01 Arnaud Quette + + * drivers/eaton-mib.c: snmp-ups: alarms handling for Eaton ePDU + Eaton ePDU can now publish alarms, related to input status + (voltage, frequency and current) and ambient status (temperature + and humidity). Note that alarms are still published under + ups.alarms, though these should belong to either pdu.alarms or + better device.alarms + * drivers/eaton-mib.c: Advanced input threshold handling for Eaton + ePDU Eaton ePDU can now handle warning and critical thresholds + settings and status for input voltage and current, along with the + frequency status + * data/cmdvartab, docs/nut-names.txt: Extend input collection + namespace with threshold Input data collection now allows to + specify low / high warning and critical thresholds for voltage and + current. Status relative to the thresholds also exist for these + data, and for the frequency + +2015-08-31 Arnaud Quette + + * drivers/eaton-mib.c: snmp-ups: ambient dry contacts support for + Eaton ePDU Eaton ambient modules, connected on ePDU, now publish + the status of the connected dry contacts sensors + * data/cmdvartab, docs/nut-names.txt: Extend ambient collection + namespace with dry contacts Ambient data collection now allow to + specify dry contacts sensor status + * drivers/eaton-mib.c: snmp-ups: fix Eaton Pulizzi Switched PDU + multiplier As per the previous commit, to well handle integer RW + variables + * drivers/eaton-mib.c: snmp-ups: ambient threshold handling for Eaton + ePDU Eaton ePDU can now handle warning and critical thresholds and + status for both humidity and temperature + * data/cmdvartab, docs/nut-names.txt: Extend ambient collection + namespace with threshold Ambient data collection now allow to + specify warning and critical thresholds + * drivers/eaton-mib.c: snmp-ups: publish presence of Eaton ambient + sensor Publish the actual presence of ambient sensor for Eaton + ePDU G2 and G3 + * data/cmdvartab, docs/nut-names.txt: Publish the actual presence of + an ambient sensor A new data was created (ambient.present) to + publish the actual presence of an ambient sensor + +2015-10-06 Charles Lepple + + * data/driver.list.in: HCL: Asium P700, Micropower LCD 1000 and Eaton + 5E1100iUSB + +2015-10-06 Daniele Pezzini + + * data/driver.list.in: HCL: LYONN CTB-800V supported by nutdrv_qx + Protocol: 'voltronic-qs-hex' Reference: + https://github.com/networkupstools/nut/pull/230 + +2015-08-22 Mariano + + * drivers/nutdrv_qx_voltronic-qs-hex.c: nutdrv_qx: add support for + LYONN CTB-800V Small protocol validation change in 'voltronic-qs- + hex' subdriver to add support for the protocol used by the LYONN + CTB-800V UPS. + +2015-09-28 Arnaud Quette + + * docs/new-drivers.txt: Fix spacing error + +2015-09-22 Charles Lepple + + * drivers/solis.c, drivers/solis.h: solis: remove additional warnings + The "Waiting" flag is always zero, and several other variables were + not used. + * drivers/solis.c, drivers/solis.h: solis: clean up warnings Comment + out unused constants, and add 'static' and 'const' wherever + possible. + +2015-09-20 Charles Lepple + + * drivers/Makefile.am, drivers/solis.c: solis: math fixes As + mentioned here: https://github.com/networkupstools/nut/pull/235 + +2015-09-19 bsalvador + + * drivers/solis.c, drivers/solis.h: solis: patch for Microsol Back- + Ups BZ1200-BR patch for correct reading for Microsol Back-Ups + BZ1200-BR (rebased onto solis_debug branch, and cleaned up + whitespace. -- CFL) Closes + https://github.com/networkupstools/nut/pull/235 and Closes + https://github.com/networkupstools/nut/pull/236 + +2015-09-16 Arnaud Quette + + * data/driver.list.in, docs/man/snmp-ups.txt, drivers/powerware- + mib.c, drivers/powerware-mib.h, drivers/snmp-ups.c: snmp-ups: add + Eaton Power Xpert Gateway UPS Card This newer generation of SNMP + card is used for BladeUPS or other UPS, and is serving the same + XUPS MIB, as in the "pw" subdriver + * scripts/subdriver/gen-snmp-subdriver.sh: Update SNMP subdriver + generation script Complete the documentation, by adding some notes + and examples ; Fix the MIBs directories list and the "keep + temporary files" option + +2015-09-11 Arnaud Quette + + * drivers/snmp-ups.c: Improve log/debug output trace + +2015-09-08 Charles Lepple + + * drivers/solis.c: solis: resync with end-of-packet character (0.64) + Suggested by @rpvelloso in https://github.com/networkupstools/nut/i + ssues/231#issuecomment-134795747 Note that the driver could + possibly get out-of-sync after initial detection. + +2015-09-07 Charles Lepple + + * docs/man/macosx-ups.txt, drivers/macosx-ups.c: macosx-ups: + gracefully handle disconnection of UPS Tested on 10.9.5 and + 10.10.5. Returns "data stale" when UPS disappears. + +2015-09-07 Arnaud Quette + + * drivers/powerware-mib.c: Bump Powerware SNMP subdriver version + +2015-09-04 Charles Lepple + + * Makefile.am, docs/configure.txt, docs/new-clients.txt, tools/nut- + scanner/README: doc: correct remaining `--with-lib` references + Credit: Paul Vermeer + +2015-09-01 Arnaud Quette + + * drivers/snmp-ups.h: Minor updates to TODO comments + * drivers/snmp-ups.c: Implement ups.alarm for SNMP snmp-ups now + allows to publish alarms in ups.alarm, the same way as with + ups.status + +2015-08-31 Arnaud Quette + + * drivers/snmp-ups.c: Proper handling of integer RW variables RW + variables were previously supposed to always be strings. Thus, the + multiplier (using the info_len field) was not applied. Also allow + setting float values, not only integer + * drivers/snmp-ups.c, drivers/snmp-ups.h: Fix default SNMP retries + and timeout The previous patch was using the default values from + Net-SNMP, which are set to -1. When the user was not providing + overriden values, this was causing the driver to not be able to + establish the communication with the device. The default values are + now fixed, as per documented (i.e. 5 retries and timeout of 1 + second). Also bump the driver version to 0.74 + * docs/man/ups.conf.txt, drivers/dstate.c: Make more obvious the + socket write failure Document the error that require the use of + the 'synchronous' flag. Also use debug level 1 instead of 2 for the + debug message + +2015-08-23 Charles Lepple + + * drivers/solis.c: solis: Add upsdebug*() and upslogx() calls for + diagnostics + +2015-08-18 Kenny Root + + * drivers/powerware-mib.c: Add ups.start.auto for Powerware SNMP Use + the IETF UPS MIB to indicate to Powerware devices that it should + restart when mains power is applied. + * drivers/powerware-mib.c: Fix some indentation problems in PowerWare + SNMP + * drivers/powerware-mib.c: Add shutdown.return for Powerware SNMP + The Powerware MIB supports the concept of shutting down with a + delay and then returning when line power is restored. The delay is + set to 0 seconds currently. + * drivers/powerware-mib.c: Add load.{off,on}.delay for Powerware SNMP + The commands to shut down with delay have existed since the first + version of the Powerware MIB so add the newer commands + "load.off.delay" and "load.on.delay" to aid in shutdown scripts. + +2015-08-07 Arnaud Quette + + * drivers/dummy-ups.c, drivers/dummy-ups.h: Fix dummy-ups for + external value changes dummy-ups allow to change the values of the + publicated variables through the standard upsrw tool. This method + is handy to script value changes, in a controlled way, compared to + the dynamic version (using the TIMER keyword in .dev files), which + changes the values in a non controlled way. Bump driver version to + 0.14 + * m4/nut_check_libnss.m4: Fully check for a working Mozilla NSS + Rework the NSS tests so that just having runtime libraries + installed is not enough. Moreover, since GNU libc6 also provides a + nss.h header, the test now checks for both nss.h and ssl.h Closes + networkupstools/nut#184 + * docs/download.txt: Fix Red Hat / Fedora packages repository URL + +2015-08-03 Tomas Halman + + * clients/nutclient.cpp: Problem: nutclient library sometimes reads + socket closed by server. Solution: proper read return value + evaluation + +2015-08-04 Arnaud Quette + + * tools/nut-scanner/scan_snmp.c: Fix a crash on a 2nd call to + libnutscan on behalf of Tomas Halman, from Eaton Opensource Team + +2015-07-24 Nash Kaminski + + * drivers/tripplitesu.c: tripplitesu: Fix initialization when + tripplite firmware is buggy With some Tripplite SU1000RT2U (and + possibly more) UPS's, a firmware bug causes a malformed response to + the very first command that is sent after the serial port is opened + following a warm or cold boot of the system. My theory is that this + related to either the RS232 data lines or handshaking lines being + pulled high once the server's UART is powered however I have not + determined precisely if this is related to the data line being + pulled high or the handshaking lines being asserted. However, I + have been able to consistently reproduce the issue where the driver + fails to start on the first attempt after a cold/warm boot across 3 + different machines and 2 SU1000RT2U UPS's. To workaround this, the + initial enumeration is repeated a 2nd time after 300ms(to allow all + garbage data to arrive) if the first attempt fails, which allows + the driver to consistently startup successfully on the 1st attempt. + Closes networkupstools/nut#220 + +2015-07-24 Tim Smith + + * INSTALL.nut: Spelling fixes Spelling fixes and capitalization of + SUSE + +2015-07-23 Arnaud Quette + + * scripts/augeas/nutupsconf.aug.tpl: Update Augeas lens for ups.conf + Add the various missing global directives and ups fields + +2015-07-20 Daniele Pezzini + + * data/driver.list.in: HCL: fix case and spacing + +2015-07-18 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: when targeting 'UPS No Ack' + consider also the trailing CR In 'fabula' and 'krauler' USB + subdrivers, take into account also the trailing CR in the reply + while looking for a 'UPS No Ack'. + * drivers/nutdrv_qx.c: nutdrv_qx: stay true to return code in + 'fabula' USB subdriver In 'fabula' USB subdriver, when reading + 'UPS No Ack' from device, since we already mimic a timeout, also + empty the reply. + +2015-07-11 Charles Lepple + + * data/driver.list.in: HCL: Fideltronic INIGO Viper 1200 supported by + nutdrv_qx + +2015-07-02 Charles Lepple + + * drivers/usbhid-ups.c: usbhid-ups: bump version to 0.41 Both the + eaton_dual_reportdesc and usbhid_ups_input_vs_feature branches + claimed version 0.40, so let's disambiguate the merged version. + +2015-07-02 Arnaud Quette + + * drivers/libhid.c: Add a debug trace for the number of HID objects + found + * drivers/hidtypes.h: Fix testing typo MAX_REPORT is really 500 (HID + objects), not 50! + * drivers/hidparser.c: Report when there are further unprocessed HID + objects Following the last commits, and especially the MAX_REPORT + one, warn whenever there are remaining HID objects that were not + processed. This may serve + * drivers/hidtypes.h: Increase the maximum number of HID objects The + previous value (300) was causing a trim of the remaining objects. + Increase the value to 500, which should give a bit of time + * drivers/libshut.c, drivers/libshut.h, drivers/libusb.c, drivers + /usb-common.h, drivers/usbhid-ups.c: Add support for Eaton dual HID + report descriptor All devices use HID descriptor at index 0. + However, some newer Eaton units have a light HID descriptor at + index 0, and the full version is at index 1 (in which case, + bcdDevice == 0x0202). This dual report descriptor approach is due + to the fact that the main report descriptor is now too heavy, and + cause some BIOS to hang. A light version is thus provided at the + default index, solving this BIOS issues + +2015-06-27 Charles Lepple + + * drivers/macosx-ups.c: macosx-ups: fix for 10.10 (Yosemite); v1.1 + In OS X 10.9 and earlier, IOPSGetPowerSourcesInfo() returned a + CFDictionary. In 10.10 it returns a CFArray. Programmers are + supposed to use IOPSGetPowerSourceDescription() to gloss over this + distinction. However, this does not make it easy to distinguish + between a laptop battery and an UPS. So the "port" driver option no + longer has any effect. https://developer.apple.com/library/mac/doc + umentation/IOKit/Reference/IOPowerSources_header_reference/#//apple + _ref/c/func/IOPSGetPowerSourceDescription + +2015-06-22 Arnaud Quette + + * scripts/upower/95-upower-hid.rules, tools/nut-usbinfo.pl: Update + UPower HID rules and generator + +2015-06-11 Charles Lepple + + * drivers/usbhid-ups.c: usbhid-ups.c: fall back to HID Input type if + not a Feature + +2015-06-07 Charles Lepple + + * drivers/tripplite-hid.c: tripplite-hid.c: device.part is static + (version 0.82) + +2015-06-04 Daniele Pezzini + + * drivers/nutdrv_qx.c: nutdrv_qx: make sure processed item's + boundaries are not wrong + +2015-04-26 Nick Mayerhofer + + * docs/nutdrv_qx-subdrivers.txt, drivers/nutdrv_qx.c, + drivers/nutdrv_qx.h: nutdrv_qx: improve documentation for some + methods + +2015-06-04 Daniele Pezzini + + * docs/nutdrv_qx-subdrivers.txt, drivers/nutdrv_qx.c, + drivers/nutdrv_qx.h: nutdrv_qx: remove redundant comments and + update docs + +2015-04-28 Nick Mayerhofer + + * drivers/nutdrv_qx_voltronic.c: nutdrv_qx: move var declaration in + 'voltronic' subdriver Move variable declaration to fulfill + condition '3.3. Portability' of the developer guide. Bump version. + * drivers/libhid.c: libhid: replace "flush loop" with memset Move to + the C way of setting memory (memset), replacing a for loop with a + few anti-patterns in it: - for (...; ; i++) - for (...; i < + MAGIC_NUMBER; ...) - for (...) array[i] = 0 + +2015-05-18 Daniele Pezzini + + * docs/nutdrv_qx-subdrivers.txt, drivers/nutdrv_qx.c, + drivers/nutdrv_qx.h, drivers/nutdrv_qx_bestups.c, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs-hex.c, + drivers/nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_voltronic.c, + drivers/nutdrv_qx_zinto.c: nutdrv_qx: give subdrivers a last chance + to process the command Add (and document) a new function + ('preprocess_command()') to preprocess the command to be sent to + the device, just before the actual sending and, in case of instant + commands/setvars, after the 'preprocess()' function has been + triggered (if appropriate). As an example, this function can be + useful to add to all commands (both queries and instant + commands/setvars) a CRC or to fill the command of a query with some + data. Also, in qx_process(), address buf size vs item->answer size + earlier. Update all subdrivers accordingly, bump versions. + +2015-06-01 Arnaud Quette + + * docs/man/snmp-ups.txt, drivers/snmp-ups.c, drivers/snmp-ups.h: + Provide access to Net-SNMP timeout and retries Two new extra + arguments are now available to allow overriding Net-SNMP number of + retries (snmp_retries) and timeout per retry (snmp_timeout). These + respectively maps to snmpcmd "-r retries" and "-t timeout" + +2015-05-29 Arnaud Quette + + * scripts/upower/95-upower-hid.rules: Update UPower HID rules + * tools/nut-usbinfo.pl: Fix UPower device matching for recent kernels + As per the UPower patch below referenced, hiddev* devices now have + class "usbmisc", rather than "usb". See + http://cgit.freedesktop.org/upower/commit/rules/95-upower- + hid.rules?id=9f31068707fc79744961cea7258b0eb262effbf1 + +2015-05-28 Arnaud Quette + + * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, + tools/nut-scanner/nutscan-device.c, tools/nut-scanner/nutscan- + device.h, tools/nut-scanner/nutscan-display.c, tools/nut-scanner + /nutscan-init.c, tools/nut-scanner/nutscan-init.h, tools/nut- + scanner/nutscan-ip.c, tools/nut-scanner/nutscan-ip.h, tools/nut- + scanner/nutscan-serial.c, tools/nut-scanner/nutscan-serial.h, tools + /nut-scanner/scan_avahi.c, tools/nut-scanner/scan_eaton_serial.c, + tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, tools + /nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, tools/nut- + scanner/scan_xml_http.c: Fix legal information on source-code + headers Copyright and author were not mentioned as it should be. + Most of the nut-scanner copyright belongs to EATON, apart from few + parts. Files descriptions are now also in Doxygen format + +2015-05-18 Daniele Pezzini + + * docs/nutdrv_qx-subdrivers.txt, drivers/nutdrv_qx.c, + drivers/nutdrv_qx.h, drivers/nutdrv_qx_bestups.c, drivers + /nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer-common.h, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs-hex.c, + drivers/nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_voltronic.c, + drivers/nutdrv_qx_zinto.c: nutdrv_qx: make preprocessed value's + size_t a const There's no need to intervene on the passed-to-the- + function value of a preprocessed value's size_t, so clarify it is a + const. Update all subdrivers accordingly, bump versions. + * drivers/nutdrv_qx.c: nutdrv_qx: make sure an answer is not reused + if preprocess_answer() fails If an item's preprocess_answer() + function fails, the answer should not be considered valid and + inherited by the following items with the same command. Therefore, + on failure, clear the answer so that the following items are forced + to query the device and preprocess the answer anew, if appropriate. + +2015-05-13 Arnaud Quette + + * docs/download.txt: Update NUT packages for Windows to 2.6.5-6 + +2015-05-07 Arnaud Quette + + * scripts/systemd/nut-server.service.in: Restore systemd relationship + with nut-driver service The Requires directive from nut-server to + nut-driver was previously removed, since it was preventing upsd + from starting whenever one or more drivers, among several, was + failing to start. Use the Wants directive, a weaker version of + Requires, which will start upsd even if the nut-driver unit fails + to start. closes https://github.com/networkupstools/nut/issues/200 + +2015-04-23 Arnaud Quette + + * Makefile.am: Cleanup GPG signature before generation + 2015-04-22 Arnaud Quette + * configure.ac: bump version back to 2.7.3.1 * configure.ac: Restore version 2.7.3 for release * docs/security.txt: Missing link reference update The filename of the previous GPG release key was not updated, leading to pointing @@ -146,6 +1231,17 @@ historic CHRG and DISCHRG flags are not published anymore in ups.status +2015-03-26 Stuart Henderson + + * data/driver.list.in, docs/man/snmp-ups.txt, docs/snmp- + subdrivers.txt, drivers/Makefile.am, drivers/huawei-mib.c, drivers + /huawei-mib.h, drivers/snmp-ups.c: snmp-ups: new subdriver for + Huawei "Hi, the [commit] below adds a new subdriver for snmp-ups + to support Huawei UPS, based on an observed walk from a UPS5000-E + with a few bits filled in from the MIBs (copy at + http://junkpile.org/HUAWEI_UPS_MIB/)." http://news.gmane.org/find- + root.php?message_id=slrnmh6npf.tg7.stu%40naiad.spacehopper.org + 2015-03-25 Daniele Pezzini * drivers/nutdrv_qx_voltronic.c: nutdrv_qx: add support in @@ -1051,6 +2147,10 @@ * NEWS, UPGRADING, configure.ac: Update for release 2.7.2 Complete the release information for NUT 2.7.2 +2014-04-17 Stephen J. Butler + + * drivers/tripplite-hid.c: Scale for SMART1500LCDT + 2014-04-07 Arnaud Quette * drivers/compaq-mib.c: Fix erroneous status in HP/Compaq SNMP MIB diff --git a/INSTALL.nut b/INSTALL.nut index 160b558..202d1af 100644 --- a/INSTALL.nut +++ b/INSTALL.nut @@ -207,8 +207,8 @@ Debian, Ubuntu and other derivatives NOTE: NUT is packaged and well maintained in these systems. The official Debian packager is part of the NUT Team. -Using your prefered method (apt-get, aptitude, Synaptic, ...), install -the 'nut' package, and optionaly the following: +Using your preferred method (apt-get, aptitude, Synaptic, ...), install +the 'nut' package, and optionally the following: - 'nut-cgi', if you need the CGI (HTML) option, - 'nut-snmp', if you need the snmp-ups driver, @@ -233,32 +233,32 @@ Mandriva NOTE: NUT is packaged and well maintained in these systems. The official Mandriva packager is part of the NUT Team. -Using your prefered method (urpmi, RPMdrake, ...), install one of the two below +Using your preferred method (urpmi, RPMdrake, ...), install one of the two below packages: - 'nut-server' if you have a 'standalone' or 'netserver' installation, - 'nut' if you have a 'netclient' installation. -Optionaly, you can also install the following: +Optionally, you can also install the following: - 'nut-cgi', if you need the CGI (HTML) option, - 'nut-devel', if you need the development files. -[[Suse]] -Suse / Opensuse +[[SUSE]] +SUSE / openSUSE ~~~~~~~~~~~~~~~ NOTE: NUT is packaged and well maintained in these systems. -The official Suse packager is part of the NUT Team. +The official SUSE packager is part of the NUT Team. -Install the 'nut-classic' package, and optionaly the following: +Install the 'nut-classic' package, and optionally the following: - 'nut-drivers-net', if you need the snmp-ups or the netxml-ups drivers, - 'nut-cgi', if you need the CGI (HTML) option, - 'nut-devel', if you need the development files, -NOTE: Suse and Opensuse users can use the +NOTE: SUSE and openSUSE users can use the link:http://software.opensuse.org/search?baseproject=ALL&p=1&q=nut[one-click install method] to install NUT. @@ -270,13 +270,13 @@ Red Hat, Fedora and CentOS NOTE: NUT is packaged and well maintained in these systems. The official Red Hat packager is part of the NUT Team. -Using your prefered method (yum, Add/Remove Software, ...), install one of the +Using your preferred method (yum, Add/Remove Software, ...), install one of the two below packages: - 'nut' if you have a 'standalone' or 'netserver' installation, - 'nut-client' if you have a 'netclient' installation. -Optionaly, you can also install the following: +Optionally, you can also install the following: - 'nut-cgi', if you need the CGI (HTML) option, - 'nut-xml', if you need the netxml-ups driver, @@ -306,7 +306,7 @@ To install it, use the following command: You have to define WITH_NUT_CGI to build the optional CGI scripts. -Optionaly, you can also install the following ports: +Optionally, you can also install the following ports: - sysutils/nut-snmp, for the SNMP driver, - sysutils/nut-usb, for the USB drivers, diff --git a/Makefile.am b/Makefile.am index aebe618..dd9ec33 100644 --- a/Makefile.am +++ b/Makefile.am @@ -56,6 +56,7 @@ ChangeLog: tools/gitlog2changelog.py dummy-stamp # ---------------------------------------------------------------------- # Maintainers targets: distribution signature and hashes dist-sig: + rm -f nut-@PACKAGE_VERSION@.tar.gz.sig gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz dist-hash: @@ -107,7 +108,7 @@ install-cgi-man install-cgi-conf install-cgi-html: @echo "Use './configure --with-cgi' instead." install-lib: @echo "Error: 'make $@' no longer exists." - @echo "Use './configure --with-lib' instead." + @echo "Use './configure --with-dev' instead." usb build-usb install-usb: @echo "Error: 'make $@' no longer exists." @echo "Use './configure --with-usb' instead." diff --git a/Makefile.in b/Makefile.in index 44ffd6b..6b39990 100644 --- a/Makefile.in +++ b/Makefile.in @@ -273,6 +273,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBDIR = @LIBDIR@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ @@ -931,6 +932,7 @@ ChangeLog: tools/gitlog2changelog.py dummy-stamp # ---------------------------------------------------------------------- # Maintainers targets: distribution signature and hashes dist-sig: + rm -f nut-@PACKAGE_VERSION@.tar.gz.sig gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz dist-hash: @@ -976,7 +978,7 @@ install-cgi-man install-cgi-conf install-cgi-html: @echo "Use './configure --with-cgi' instead." install-lib: @echo "Error: 'make $@' no longer exists." - @echo "Use './configure --with-lib' instead." + @echo "Use './configure --with-dev' instead." usb build-usb install-usb: @echo "Error: 'make $@' no longer exists." @echo "Use './configure --with-usb' instead." diff --git a/NEWS b/NEWS index 1e6fbde..216c835 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,124 @@ If you're upgrading from an earlier version, see the UPGRADING file. For a complete and more detailed list of changes, please refer to the ChangeLog file. +--------------------------------------------------------------------------- +Release notes for NUT 2.7.4 - what's new since 2.7.3: + + - New class of device supported: ATS - Automatic Transfer Switch are now + supported in NUT. Eaton ATS are supported, and APC ones should be too. Users + are welcomed to test and provide feedback + + - NUT command and variable naming scheme: + * Document battery.charger.status, which will in time replace the historic + CHRG and DISCHRG flags published in ups.status + * Many extensions to support outlets groups, thresholds / alarms (ambient, + input, output, outlet and outlet.group) + + - support for new devices: + AEG PROTECT B / NAS + APC ATS AP7724 (should be supported) + Asium P700 + Eaton ATS + Eaton 5E 1100iUSB + Eaton E Series DX UPS 1-20 kVA + Eaton Powerware 9125-5000g + Electrys UPS 2500 + Fideltronic INIGO Viper 1200 + Legrand Keor Multiplug + LYONN CTB-800V + Micropower LCD 1000 + NHS Laser Senoidal 5000VA + Sweex model P220 + TS Shara + Various APCUPSD-controlled APC devices + + - snmp-ups: + * Improve automatic detection algorithm + * Provide access to Net-SNMP timeout and retries + * Proper handling of integer RW variables + * Implement support for alarms, through ups.alarm and outlet.n.alarm + * Improve log/debug output trace + * Fix loss of precision when setting values, using upsrw + * Support for outlets group management + * Many improvements and simplification + * Add support for Tripplite units using IETF mib + * Improve communication staleness detection and recovery + * Add devices MAC address publication + * Register values enumerations, when available + * Many improvements and fixes to the SNMP subdriver creation script + + - Eaton: + * 3ph SNMP: + Many improvements to Powerware / XUPS MIB, for data and commands + Add support for Eaton Power Xpert Gateway UPS Card + Improve support for temperature and humidity, including low / high values + Alarms handling + * ePDU (G2 and G3): + Improve support for ambient sensor, including thresholds and dry contacts + Outlet groups handling, including data, thresholds, settings and commands + Alarms handling + * XML/PDC (netxml-ups): + Fix Eaton XML published data + Add some settings (R/W flags) on ambient thresholds + + - bcmxcp_usb: improvements for device claiming and multi-packets responses + + - dummy-ups: allow any variable to be modified + + - libnutclient: Fix for reads when the socket was closed by NUT server + + - macosx-ups: + * fix for 10.10 (Yosemite), v1.1 + * gracefully handle disconnection of UPS (return "data stale") + + - nutdrv_atcl_usb: point to nutdrv_qx (fuji) for 0001:0000 + + - nutdrv_qx: + * Add new 'sgs' USB subdriver to support TS Shara units + * various improvements and simplification, to the code and documentation + + - nut-ipmipsu: improve FreeIPMI support + + - nut-scanner: + * Don't depend on development libraries, by looking at some known paths, + including the one provided through --libdir, to find the correct libraries + * Fix a crash on a 2nd call to libnutscan with SNMP method + + - powercom: fix the processing of input and output voltage for KIN units + + - solis: + * many improvements and cleanup + * resync with end-of-packet character + * fixes for Microsol Back-Ups BZ1200-BR + + - tripplitesu: Fix initialization when tripplite firmware is buggy (for + Tripplite SU1000RT2U and possibly more) + + - usbhid-ups: + * various minor improvements + * support for Eaton UPS with dual HID report descriptor in HID Parser + * handle missing USB strings in APC code + + - SSL support through Mozilla NSS: Rework the NSS tests to ensure that NSS is + actually installed and usable for enabling SSL support in NUT + + - Augeas support: Augeas lens for ups.conf was updated to add various missing + global directives and ups fields + + - scripts/systemd/nut-server.service.in: Restore systemd relationship since it + was preventing upsd from starting whenever one or more drivers, among several, + was failing to start + + - Fix UPower device matching for recent kernels, since hiddev* devices now have + class "usbmisc", rather than "usb" + + - Network protocol information: default to type NUMBER for variables that are + not flagged as STRING . This point is subject to improvements or change in + the next release 2.7.5. Refer to docs/net-protocol.txt for more information + + - As usual, more bugfixes, cleanup and improvements, on both source code + and documentation. + --------------------------------------------------------------------------- Release notes for NUT 2.7.3 - what's new since 2.7.2: @@ -323,7 +441,7 @@ Release notes for NUT 2.6.4 - what's new since 2.6.3: - bestups has also received some care, though users are encouraged to switch to blazer_ser, since bestups will soon be deprecated. - - newmge-shut has been heavilly improved. However, replacement of the + - newmge-shut has been heavily improved. However, replacement of the current mge-shut has been postponed to the next release, due to the CVE issue. diff --git a/UPGRADING b/UPGRADING index 3b14a40..03cf410 100644 --- a/UPGRADING +++ b/UPGRADING @@ -7,6 +7,22 @@ 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.7.3 to 2.7.4 +--------------------------- + +- scripts/systemd/nut-server.service.in: Restore systemd relationship since it + was preventing upsd from starting whenever one or more drivers, among several, + was failing to start + +- Fix UPower device matching for recent kernels, since hiddev* devices now have + class "usbmisc", rather than "usb" + +- macosx-ups: the "port" driver option no longer has any effect + +- Network protocol information: default to type NUMBER for variables that are + not flagged as STRING . This point is subject to improvements or change in + the next release 2.7.5. Refer to docs/net-protocol.txt for more information + Changes from 2.7.2 to 2.7.3 --------------------------- @@ -191,7 +207,7 @@ automake). Refer to packaging/debian/ for an example of migration. ie not using upsdrvctl. - Developers of external client application using libupsclient are encouraged to rename the "UPSCONN" client structure to "UPSCONN_t" -since the former will disapear by the release of NUT 2.4. +since the former will disappear by the release of NUT 2.4. Changes from 2.0.4 to 2.0.5 --------------------------- diff --git a/clients/Makefile.in b/clients/Makefile.in index 7e58b62..0a7949e 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -366,6 +366,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBDIR = @LIBDIR@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ diff --git a/clients/nutclient.cpp b/clients/nutclient.cpp index dcf0c2d..8304473 100644 --- a/clients/nutclient.cpp +++ b/clients/nutclient.cpp @@ -374,6 +374,11 @@ std::string Socket::read()throw(nut::IOException) // Read new buffer size_t sz = read(&buff, 256); + if(sz==0) + { + disconnect(); + throw nut::IOException("Server closed connection unexpectedly"); + } _buffer.assign(buff, sz); } } diff --git a/clients/upsrw.c b/clients/upsrw.c index 8113690..3a0efb4 100644 --- a/clients/upsrw.c +++ b/clients/upsrw.c @@ -366,6 +366,11 @@ static void do_type(const char *varname) } + if (!strcasecmp(answer[i], "NUMBER")) { + printf("Type: NUMBER\n"); + return; + } + /* ignore this one */ if (!strcasecmp(answer[i], "RW")) { continue; diff --git a/common/Makefile.am b/common/Makefile.am index f85244c..2bfc6e0 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -9,8 +9,8 @@ libparseconf_la_SOURCES = parseconf.c # 'dist', and is only required for actual build, in which case # BUILT_SOURCES (in ../include) will ensure nut_version.h will # be built before anything else -libcommon_la_SOURCES = common.c state.c upsconf.c -libcommonclient_la_SOURCES = common.c state.c +libcommon_la_SOURCES = common.c state.c str.c upsconf.c +libcommonclient_la_SOURCES = common.c state.c str.c # ensure inclusion of local implementation of missing systems functions # using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ diff --git a/common/Makefile.in b/common/Makefile.in index 6a5149e..8710560 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -82,8 +82,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am strerror.c \ - atexit.c setenv.c snprintf.c $(top_srcdir)/depcomp +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am atexit.c \ + snprintf.c setenv.c strerror.c $(top_srcdir)/depcomp 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 \ @@ -114,14 +114,14 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ -am_libcommon_la_OBJECTS = common.lo state.lo upsconf.lo +am_libcommon_la_OBJECTS = common.lo state.lo str.lo upsconf.lo libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libcommonclient_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ -am_libcommonclient_la_OBJECTS = common.lo state.lo +am_libcommonclient_la_OBJECTS = common.lo state.lo str.lo libcommonclient_la_OBJECTS = $(am_libcommonclient_la_OBJECTS) libparseconf_la_LIBADD = am_libparseconf_la_OBJECTS = parseconf.lo @@ -241,6 +241,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBDIR = @LIBDIR@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ @@ -382,8 +383,8 @@ libparseconf_la_SOURCES = parseconf.c # 'dist', and is only required for actual build, in which case # BUILT_SOURCES (in ../include) will ensure nut_version.h will # be built before anything else -libcommon_la_SOURCES = common.c state.c upsconf.c -libcommonclient_la_SOURCES = common.c state.c +libcommon_la_SOURCES = common.c state.c str.c upsconf.c +libcommonclient_la_SOURCES = common.c state.c str.c # ensure inclusion of local implementation of missing systems functions # using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ @@ -456,6 +457,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseconf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@ .c.o: diff --git a/common/common.c b/common/common.c index d7c74d3..6637113 100644 --- a/common/common.c +++ b/common/common.c @@ -584,47 +584,6 @@ char *xstrdup(const char *string) return p; } -/* modify in - strip all trailing instances of */ -char *rtrim(char *in, const char sep) -{ - char seps[2] = { sep, '\0' }; - - return rtrim_m(in, seps); -} - -/* modify in - strip all trailing instances of each char in */ -char *rtrim_m(char *in, const char *seps) -{ - char *p; - - if (in && strlen(in)) { - p = &in[strlen(in) - 1]; - - while ((p >= in) && (strchr(seps, *p) != NULL)) - *p-- = '\0'; - } - return in; -} - -/* modify in - strip all leading instances of */ -char* ltrim(char *in, const char sep) -{ - char seps[2] = { sep, '\0' }; - - return ltrim_m(in, seps); -} - -/* modify in - strip all leading instances of each char in */ -char* ltrim_m(char *in, const char *seps) -{ - if (in && strlen(in)) { - while ((*in != '\0') && (strchr(seps, *in) != NULL)) - memmove(in, in + 1, strlen(in)); - } - - return in; -} - /* 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). */ diff --git a/common/str.c b/common/str.c new file mode 100644 index 0000000..092efcf --- /dev/null +++ b/common/str.c @@ -0,0 +1,607 @@ +/* str.c - Common string-related functions + * + * Copyright (C) + * 2000 Russell Kroll + * 2015 Daniele Pezzini + * + * 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 + * + */ + +#include +#include +#include +#include +#include + +#include "str.h" + +char *str_trim(char *string, const char character) +{ + return str_rtrim(str_ltrim(string, character), character); +} + +char *str_trim_m(char *string, const char *characters) +{ + return str_rtrim_m(str_ltrim_m(string, characters), characters); +} + +char *str_ltrim(char *string, const char character) +{ + char characters[2] = { character, '\0' }; + + return str_ltrim_m(string, characters); +} + +char *str_ltrim_m(char *string, const char *characters) +{ + if ( + string == NULL || + *string == '\0' || + characters == NULL || + *characters == '\0' + ) + return string; + + while ( + *string != '\0' && + strchr(characters, *string) != NULL + ) + memmove(string, string + 1, strlen(string)); + + return string; +} + +char *str_rtrim(char *string, const char character) +{ + char characters[2] = { character, '\0' }; + + return str_rtrim_m(string, characters); +} + +char *str_rtrim_m(char *string, const char *characters) +{ + char *ptr; + + if ( + string == NULL || + *string == '\0' || + characters == NULL || + *characters == '\0' + ) + return string; + + ptr = &string[strlen(string) - 1]; + + while ( + ptr >= string && + strchr(characters, *ptr) != NULL + ) + *ptr-- = '\0'; + + return string; +} + +char *str_trim_space(char *string) +{ + return str_rtrim_space(str_ltrim_space(string)); +} + +char *str_ltrim_space(char *string) +{ + if ( + string == NULL || + *string == '\0' + ) + return string; + + while ( + *string != '\0' && + isspace(*string) + ) + memmove(string, string + 1, strlen(string)); + + return string; +} + +char *str_rtrim_space(char *string) +{ + char *ptr; + + if ( + string == NULL || + *string == '\0' + ) + return string; + + ptr = &string[strlen(string) - 1]; + + while ( + ptr >= string && + isspace(*ptr) + ) + *ptr-- = '\0'; + + return string; +} + +int str_is_short(const char *string, const int base) +{ + short number; + + return str_to_short(string, &number, base); +} + +int str_is_short_strict(const char *string, const int base) +{ + short number; + + return str_to_short_strict(string, &number, base); +} + +int str_is_ushort(const char *string, const int base) +{ + unsigned short number; + + return str_to_ushort(string, &number, base); +} + +int str_is_ushort_strict(const char *string, const int base) +{ + unsigned short number; + + return str_to_ushort_strict(string, &number, base); +} + +int str_is_int(const char *string, const int base) +{ + int number; + + return str_to_int(string, &number, base); +} + +int str_is_int_strict(const char *string, const int base) +{ + int number; + + return str_to_int_strict(string, &number, base); +} + +int str_is_uint(const char *string, const int base) +{ + unsigned int number; + + return str_to_uint(string, &number, base); +} + +int str_is_uint_strict(const char *string, const int base) +{ + unsigned int number; + + return str_to_uint_strict(string, &number, base); +} + +int str_is_long(const char *string, const int base) +{ + long number; + + return str_to_long(string, &number, base); +} + +int str_is_long_strict(const char *string, const int base) +{ + long number; + + return str_to_long_strict(string, &number, base); +} + +int str_is_ulong(const char *string, const int base) +{ + unsigned long number; + + return str_to_ulong(string, &number, base); +} + +int str_is_ulong_strict(const char *string, const int base) +{ + unsigned long number; + + return str_to_ulong_strict(string, &number, base); +} + +int str_is_double(const char *string, const int base) +{ + double number; + + return str_to_double(string, &number, base); +} + +int str_is_double_strict(const char *string, const int base) +{ + double number; + + return str_to_double_strict(string, &number, base); +} + +int str_to_short(const char *string, short *number, const int base) +{ + long num; + + *number = 0; + + if (!str_to_long(string, &num, base)) + return 0; + + if ( + num < SHRT_MIN || + num > SHRT_MAX + ) { + errno = ERANGE; + return 0; + } + + *number = num; + return 1; +} + +int str_to_short_strict(const char *string, short *number, const int base) +{ + long num; + + *number = 0; + + if (!str_to_long_strict(string, &num, base)) + return 0; + + if ( + num < SHRT_MIN || + num > SHRT_MAX + ) { + errno = ERANGE; + return 0; + } + + *number = num; + return 1; +} + +int str_to_ushort(const char *string, unsigned short *number, const int base) +{ + unsigned long num; + + *number = 0; + + if (!str_to_ulong(string, &num, base)) + return 0; + + if (num > USHRT_MAX) { + errno = ERANGE; + return 0; + } + + *number = num; + return 1; +} + +int str_to_ushort_strict(const char *string, unsigned short *number, const int base) +{ + unsigned long num; + + *number = 0; + + if (!str_to_ulong_strict(string, &num, base)) + return 0; + + if (num > USHRT_MAX) { + errno = ERANGE; + return 0; + } + + *number = num; + return 1; +} + +int str_to_int(const char *string, int *number, const int base) +{ + long num; + + *number = 0; + + if (!str_to_long(string, &num, base)) + return 0; + + if ( + num < INT_MIN || + num > INT_MAX + ) { + errno = ERANGE; + return 0; + } + + *number = num; + return 1; +} + +int str_to_int_strict(const char *string, int *number, const int base) +{ + long num; + + *number = 0; + + if (!str_to_long_strict(string, &num, base)) + return 0; + + if ( + num < INT_MIN || + num > INT_MAX + ) { + errno = ERANGE; + return 0; + } + + *number = num; + return 1; +} + +int str_to_uint(const char *string, unsigned int *number, const int base) +{ + unsigned long num; + + *number = 0; + + if (!str_to_ulong(string, &num, base)) + return 0; + + if (num > UINT_MAX) { + errno = ERANGE; + return 0; + } + + *number = num; + return 1; +} + +int str_to_uint_strict(const char *string, unsigned int *number, const int base) +{ + unsigned long num; + + *number = 0; + + if (!str_to_ulong_strict(string, &num, base)) + return 0; + + if (num > UINT_MAX) { + errno = ERANGE; + return 0; + } + + *number = num; + return 1; +} + +int str_to_long(const char *string, long *number, const int base) +{ + char *str; + + *number = 0; + + if ( + string == NULL || + *string == '\0' + ) { + errno = EINVAL; + return 0; + } + + str = strdup(string); + if (str == NULL) + return 0; + + str_trim_space(str); + + if (!str_to_long_strict(str, number, base)) { + free(str); + return 0; + } + + free(str); + return 1; +} + +int str_to_long_strict(const char *string, long *number, const int base) +{ + char *ptr = NULL; + + *number = 0; + + if ( + string == NULL || + *string == '\0' || + isspace(*string) + ) { + errno = EINVAL; + return 0; + } + + errno = 0; + *number = strtol(string, &ptr, base); + + if ( + errno == EINVAL || + *ptr != '\0' + ) { + *number = 0; + errno = EINVAL; + return 0; + } + + if (errno == ERANGE) { + *number = 0; + return 0; + } + + return 1; +} + +int str_to_ulong(const char *string, unsigned long *number, const int base) +{ + char *str; + + *number = 0; + + if ( + string == NULL || + *string == '\0' + ) { + errno = EINVAL; + return 0; + } + + str = strdup(string); + if (str == NULL) + return 0; + + str_trim_space(str); + + if (!str_to_ulong_strict(str, number, base)) { + free(str); + return 0; + } + + free(str); + return 1; +} + +int str_to_ulong_strict(const char *string, unsigned long *number, const int base) +{ + char *ptr = NULL; + + *number = 0; + + if ( + string == NULL || + *string == '\0' || + *string == '+' || + *string == '-' || + isspace(*string) + ) { + errno = EINVAL; + return 0; + } + + errno = 0; + *number = strtoul(string, &ptr, base); + + if ( + errno == EINVAL || + *ptr != '\0' + ) { + *number = 0; + errno = EINVAL; + return 0; + } + + if (errno == ERANGE) { + *number = 0; + return 0; + } + + return 1; +} + +int str_to_double(const char *string, double *number, const int base) +{ + char *str; + + *number = 0; + + if ( + string == NULL || + *string == '\0' + ) { + errno = EINVAL; + return 0; + } + + str = strdup(string); + if (str == NULL) + return 0; + + str_trim_space(str); + + if (!str_to_double_strict(str, number, base)) { + free(str); + return 0; + } + + free(str); + return 1; +} + +int str_to_double_strict(const char *string, double *number, const int base) +{ + char *ptr = NULL; + + *number = 0; + + if ( + string == NULL || + *string == '\0' || + isspace(*string) + ) { + errno = EINVAL; + return 0; + } + + switch (base) + { + case 0: + break; + case 10: + if (strlen(string) != strspn(string, "-+.0123456789Ee")) { + errno = EINVAL; + return 0; + } + break; + case 16: + if (strlen(string) != strspn(string, "-+.0123456789ABCDEFabcdefXxPp")) { + errno = EINVAL; + return 0; + } + break; + default: + errno = EINVAL; + return 0; + } + + errno = 0; + *number = strtod(string, &ptr); + + if ( + errno == EINVAL || + *ptr != '\0' + ) { + *number = 0; + errno = EINVAL; + return 0; + } + + if (errno == ERANGE) { + *number = 0; + return 0; + } + + return 1; +} diff --git a/conf/Makefile.in b/conf/Makefile.in index 4afc1f8..cc5884c 100644 --- a/conf/Makefile.in +++ b/conf/Makefile.in @@ -220,6 +220,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBDIR = @LIBDIR@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ diff --git a/configure b/configure index 3210ecd..f70451d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for nut 2.7.3. +# Generated by GNU Autoconf 2.69 for nut 2.7.4. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nut' PACKAGE_TARNAME='nut' -PACKAGE_VERSION='2.7.3' -PACKAGE_STRING='nut 2.7.3' +PACKAGE_VERSION='2.7.4' +PACKAGE_STRING='nut 2.7.4' PACKAGE_BUGREPORT='https://github.com/networkupstools/nut/issues' PACKAGE_URL='' @@ -652,6 +652,7 @@ RUN_AS_USER PORT SBINDIR DRVPATH +LIBDIR BINDIR CONFPATH STATEPATH @@ -1511,7 +1512,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nut 2.7.3 to adapt to many kinds of systems. +\`configure' configures nut 2.7.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1582,7 +1583,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nut 2.7.3:";; + short | recursive ) echo "Configuration of nut 2.7.4:";; esac cat <<\_ACEOF @@ -1784,7 +1785,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nut configure 2.7.3 +nut configure 2.7.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2374,7 +2375,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nut $as_me 2.7.3, which was +It was created by nut $as_me 2.7.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3493,7 +3494,7 @@ fi # Define the identity of the package. PACKAGE='nut' - VERSION='2.7.3' + VERSION='2.7.4' cat >>confdefs.h <<_ACEOF @@ -10271,32 +10272,33 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 $as_echo "${LIBS}" >&6; } - for ac_header in nss.h -do : - ac_fn_c_check_header_compile "$LINENO" "nss.h" "ac_cv_header_nss_h" "$ac_includes_default -" -if test "x$ac_cv_header_nss_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NSS_H 1 -_ACEOF - nut_have_libnss=yes -else - nut_have_libnss=no -fi - -done - - for ac_func in NSS_Init + for ac_func in NSS_Init do : ac_fn_c_check_func "$LINENO" "NSS_Init" "ac_cv_func_NSS_Init" if test "x$ac_cv_func_NSS_Init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NSS_INIT 1 +_ACEOF + nut_have_libnss=yes +else + nut_have_libnss=no +fi +done + + for ac_header in nss.h ssl.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else nut_have_libnss=no fi + done @@ -10601,32 +10603,33 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 $as_echo "${LIBS}" >&6; } - for ac_header in nss.h -do : - ac_fn_c_check_header_compile "$LINENO" "nss.h" "ac_cv_header_nss_h" "$ac_includes_default -" -if test "x$ac_cv_header_nss_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NSS_H 1 -_ACEOF - nut_have_libnss=yes -else - nut_have_libnss=no -fi - -done - - for ac_func in NSS_Init + for ac_func in NSS_Init do : ac_fn_c_check_func "$LINENO" "NSS_Init" "ac_cv_func_NSS_Init" if test "x$ac_cv_func_NSS_Init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NSS_INIT 1 +_ACEOF + nut_have_libnss=yes +else + nut_have_libnss=no +fi +done + + for ac_header in nss.h ssl.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else nut_have_libnss=no fi + done @@ -23333,6 +23336,16 @@ cat >>confdefs.h <<_ACEOF _ACEOF +conftemp="${libdir}" +eval conftemp=\"${conftemp}\" +eval conftemp=\"${conftemp}\" +LIBDIR=${conftemp} + +cat >>confdefs.h <<_ACEOF +#define LIBDIR "${conftemp}" +_ACEOF + + now=`TZ=UTC date +%Y-%m-%d` @@ -23384,6 +23397,7 @@ now=`TZ=UTC date +%Y-%m-%d` + ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upsmon.conf.sample conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/docinfo.xml docs/man/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutclient.pc lib/libnutscan.pc lib/Makefile scripts/Aix/nut-aix.spec scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/devd/Makefile scripts/devd/nut-usb.conf scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf 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 scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile tests/Makefile Makefile" @@ -24051,7 +24065,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nut $as_me 2.7.3, which was +This file was extended by nut $as_me 2.7.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24117,7 +24131,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nut config.status 2.7.3 +nut config.status 2.7.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index f87be6d..41db8d3 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,8 @@ dnl | Network UPS Tools: configure.ac | dnl +------------------------------------------------------------------+ dnl NUT version number is defined here, with a Git suffix in include/nut_version.h -AC_INIT(nut, 2.7.3, [https://github.com/networkupstools/nut/issues]) +AC_INIT(nut, 2.7.4, [https://github.com/networkupstools/nut/issues]) +AC_CONFIG_AUX_DIR([.]) AC_CONFIG_SRCDIR(server/upsd.c) AC_CONFIG_MACRO_DIR([m4]) echo "Network UPS Tools version ${PACKAGE_VERSION}" @@ -1202,6 +1203,13 @@ eval conftemp=\"${conftemp}\" SBINDIR=${conftemp} AC_DEFINE_UNQUOTED(SBINDIR, "${conftemp}", [Default path for system executables]) +dnl same for libdir +conftemp="${libdir}" +eval conftemp=\"${conftemp}\" +eval conftemp=\"${conftemp}\" +LIBDIR=${conftemp} +AC_DEFINE_UNQUOTED(LIBDIR, "${conftemp}", [Default path for system libraries]) + dnl Current date now=`TZ=UTC date +%Y-%m-%d` @@ -1239,6 +1247,7 @@ AC_SUBST(PIDPATH) AC_SUBST(STATEPATH) AC_SUBST(CONFPATH) AC_SUBST(BINDIR) +AC_SUBST(LIBDIR) AC_SUBST(DRVPATH) AC_SUBST(SBINDIR) AC_SUBST(PORT) diff --git a/data/Makefile.in b/data/Makefile.in index 5a010e3..0bd8feb 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -274,6 +274,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBDIR = @LIBDIR@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ diff --git a/data/cmdvartab b/data/cmdvartab index ef68d70..3d091f2 100644 --- a/data/cmdvartab +++ b/data/cmdvartab @@ -47,6 +47,11 @@ VARDESC input.voltage "Input voltage (V)" VARDESC input.voltage.extended "Extended input voltage range" VARDESC input.voltage.maximum "Maximum incoming voltage seen (V)" VARDESC input.voltage.minimum "Minimum incoming voltage seen (V)" +VARDESC input.voltage.status "Voltage status relative to the thresholds" +VARDESC input.voltage.low.warning "Input voltage low warning threshold (V)" +VARDESC input.voltage.low.critical "Input voltage low critical threshold (V)" +VARDESC input.voltage.high.warning "Input voltage high warning threshold (V)" +VARDESC input.voltage.high.critical "Input voltage high critical threshold (V)" VARDESC input.voltage.nominal "Nominal input voltage (V)" VARDESC input.transfer.reason "Reason for last transfer to battery" VARDESC input.transfer.low "Low voltage transfer point (V)" @@ -59,8 +64,14 @@ VARDESC input.sensitivity "Input power sensitivity" VARDESC input.quality "Input power quality" VARDESC input.current "Input current (A)" VARDESC input.current.nominal "Nominal input current (A)" +VARDESC input.current.status "Current status relative to the thresholds" +VARDESC input.current.low.warning "Input current low warning threshold (A)" +VARDESC input.current.low.critical "Input current low critical threshold (A)" +VARDESC input.current.high.warning "Input current high warning threshold (A)" +VARDESC input.current.high.critical "Input current high critical threshold (A)" VARDESC input.frequency "Input line frequency (Hz)" VARDESC input.frequency.extended "Extended input frequency range" +VARDESC input.frequency.status "Frequency status" VARDESC input.frequency.nominal "Nominal input line frequency (Hz)" VARDESC input.frequency.low "Minimum input line frequency (Hz)" VARDESC input.frequency.high "Maximum input line frequency (Hz)" @@ -72,6 +83,8 @@ VARDESC input.transfer.delay "Delay before transfer to mains" VARDESC input.load "Load on (ePDU) input (percent of full)" VARDESC input.realpower "Current sum value of all (ePDU) phases real power (W)" VARDESC input.power "Current sum value of all (ePDU) phases apparent power (VA)" +VARDESC input.source "The current input power source" +VARDESC input.source.preferred "The prefered input power source" VARDESC output.voltage "Output voltage (V)" VARDESC output.voltage.nominal "Nominal output voltage (V)" @@ -106,14 +119,31 @@ VARDESC battery.charger.status "Battery charger status" VARDESC ambient.temperature "Ambient temperature (degrees C)" VARDESC ambient.temperature.alarm "Ambient temperature alarm is active" -VARDESC ambient.temperature.alarm.maximum "Maximum allowed ambient temperature" -VARDESC ambient.temperature.alarm.minimum "Minimum allowed ambient temperature" +VARDESC ambient.temperature.status "Ambient temperature status relative to the configured thresholds" +VARDESC ambient.temperature.alarm.maximum "Maximum allowed ambient temperature (degrees C)" +VARDESC ambient.temperature.alarm.minimum "Minimum allowed ambient temperature (degrees C)" VARDESC ambient.temperature.alarm.enable "Enable ambient temperature alarm" -VARDESC ambient.humidity "Ambient humidity" +VARDESC ambient.temperature.low "Temperature threshold low (degrees C)" +VARDESC ambient.temperature.low.warning "Temperature threshold low warning (degrees C)" +VARDESC ambient.temperature.low.critical "Temperature threshold low critical (degrees C)" +VARDESC ambient.temperature.high "Temperature threshold high (degrees C)" +VARDESC ambient.temperature.high.warning "Temperature threshold high warning (degrees C)" +VARDESC ambient.temperature.high.critical "Temperature threshold high critical (degrees C)" +VARDESC ambient.humidity "Ambient humidity (percent)" VARDESC ambient.humidity.alarm "Ambient humidity alarm is active" -VARDESC ambient.humidity.alarm.maximum "Maximum allowed ambient humidity" -VARDESC ambient.humidity.alarm.minimum "Minimum allowed ambient humidity" +VARDESC ambient.humidity.status "Ambient humidity status relative to the configured thresholds" +VARDESC ambient.humidity.alarm.maximum "Maximum allowed ambient humidity (percent)" +VARDESC ambient.humidity.alarm.minimum "Minimum allowed ambient humidity (percent)" VARDESC ambient.humidity.alarm.enable "Enable ambient humidity alarm" +VARDESC ambient.humidity.low "Ambient humidity threshold low (percent)" +VARDESC ambient.humidity.low.warning "Ambient humidity threshold low warning (percent)" +VARDESC ambient.humidity.low.critical "Ambient humidity threshold low critical (percent)" +VARDESC ambient.humidity.high "Ambient humidity threshold high (percent)" +VARDESC ambient.humidity.high.warning "Ambient humidity threshold high warning (percent)" +VARDESC ambient.humidity.high.critical "Ambient humidity threshold high critical (percent)" +VARDESC ambient.present "Ambient sensor presence" +VARDESC ambient.contacts.1.status "State of the dry contact sensor 1" +VARDESC ambient.contacts.2.status "State of the dry contact sensor 2" # FIXME: the outlet collection is indexed - solve with regexs? # diff --git a/data/driver.list.in b/data/driver.list.in index a0e82fb..50f23b8 100644 --- a/data/driver.list.in +++ b/data/driver.list.in @@ -18,6 +18,7 @@ # "ups" for Uninterruptible Power Supply # "pdu" for Power Distributions Unit # "scd" for Solar Controlers Device +# "ats" for Automatic Transfer Switch # # - support level: a number from "1" to "5" (stars) meaning: # * protocol based on reverse engineering @@ -47,6 +48,8 @@ "AEC" "ups" "1" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21" "AEG Power Solutions" "ups" "2" "PROTECT HOME" "" "blazer_ser or blazer_usb" +"AEG Power Solutions" "ups" "3" "PROTECT NAS" "" "usbhid-ups" +"AEG Power Solutions" "ups" "3" "PROTECT B" "" "usbhid-ups" "APC" "ups" "2" "Back-UPS 1200BR (Microsol)" "" "solis" "APC" "ups" "2" "Back-UPS BZ2200BI-BR (Microsol)" "" "solis" @@ -70,10 +73,12 @@ "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" "ups" "3" "(various)" "APCUPSD-controlled devices" "apcupsd-ups" "APC" "pdu" "1" "Masterswitch" "940-0020 cable" "genericups upstype=12" "APC" "pdu" "1" "AP9210" "8 outlets" "powerman-pdu (experimental)" "APC" "pdu" "1" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)" "APC" "pdu" "3" "(various)" "SNMP monitoring card" "snmp-ups (experimental)" +"APC" "ats" "3" "ATS AP7724" "" "snmp-ups (experimental)" "Aphel" "pdu" "3" "various PDU" "" "snmp-ups (experimental)" @@ -93,7 +98,9 @@ "ARTronic" "ups" "2" "ARTon Platinium Combo 3.1 10/15/20 kVA" "USB" "blazer_usb" "ARTronic" "ups" "2" "ARTon Platinium RT 1/2/3/6/10 kVA" "USB" "blazer_usb" -"ASEM SPA" "UPS" "5" "PB1300 UPS" "i2c" "asem" +"ASEM SPA" "ups" "5" "PB1300 UPS" "i2c" "asem" + +"Asium" "ups" "3" "P700" "USB" "blazer_usb" # http://www.asiumpower.com/Asium-ASIUM-P700-650VA-360W/dp/B009SMEQ10 "ATEK" "ups" "2" "Defensor 1K Tower / Rack" "USB" "blazer_usb" "ATEK" "ups" "2" "Defensor 2K Tower / Rack" "USB" "blazer_usb" @@ -242,8 +249,8 @@ "Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "USB port" "usbhid-ups" "Dell" "ups" "5" "Rack 5600W HV" "USB port" "usbhid-ups" -"Dell" "ups" "5" "Various (SNMP mode)" "UPS Network Management Card " "snmp-ups" -"Dell" "ups" "5" "Various (XML/HTTP mode)" "UPS Network Management Card " "netxml-ups (experimental)" +"Dell" "ups" "5" "Various (SNMP mode)" "UPS Network Management Card" "snmp-ups" +"Dell" "ups" "5" "Various (XML/HTTP mode)" "UPS Network Management Card" "netxml-ups (experimental)" "Delta" "ups" "1" "GES602N" "" "belkin" @@ -275,6 +282,8 @@ "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" "5E650iUSB" "USB port" "usbhid-ups" +"Eaton" "ups" "5" "5E1100iUSB" "USB port" "usbhid-ups" # http://powerquality.eaton.com/5E1100iUSB.aspx?CX&GUID=8D85FE66-3102-427C-8F33-B8D56BBDD4D3 "Eaton" "ups" "5" "5S" "USB port" "usbhid-ups" "Eaton" "ups" "5" "5SC" "USB port" "usbhid-ups" "Eaton" "ups" "5" "5P" "USB port" "usbhid-ups" @@ -296,9 +305,10 @@ "Eaton" "ups" "5" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" "Eaton" "ups" "5" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" "Eaton" "ups" "5" "E Series NV UPS 400-2000 VA" "" "blazer_usb" -"Eaton" "ups" "5" "E Series DX UPS 1-20 kVA" "" "mge-utalk" +"Eaton" "ups" "5" "E Series DX UPS 1-20 kVA" "" "blazer_ser" # http://www.eaton.com/Eaton/ESeriesUPS/DXUPS/ "Eaton" "ups" "4" "NetUPS SE 450/700/1000/1500" "" "upscode2" "Eaton" "ups" "5" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)" +"Eaton" "ups" "5" "various models (SNMP mode)" "Power Xpert Gateway UPS Card" "snmp-ups (experimental)" "Eaton" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (ref 66102)" "netxml-ups (experimental)" "Eaton" "ups" "5" "various models (SNMP mode)" "NMC Minislot (ref 66102)" "snmp-ups (experimental)" "Eaton" "ups" "5" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)" @@ -308,6 +318,7 @@ "Eaton" "pdu" "5" "ePDU Switched" "" "snmp-ups" "Eaton" "pdu" "5" "ePDU Monitored" "" "snmp-ups or netxml-ups" "Eaton" "ups" "5" "Powerware 3105" "USB" "bcmxcp_usb" # http://powerquality.eaton.com/Products-services/Backup-Power-UPS/3105-eol.aspx +"Eaton" "ups" "5" "Powerware 9125" "USB card" "bcmxcp_usb" "Eaton" "ups" "5" "Powerware 9130" "" "bcmxcp or usbhid-ups" "Eaton" "ups" "5" "Powerware 9140" "" "bcmxcp or usbhid-ups" "Eaton" "ups" "5" "Powerware 5130" "" "usbhid-ups" @@ -316,10 +327,13 @@ "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" +"Eaton" "ats" "5" "Eaton ATS16" "" "snmp-ups" "Effekta" "ups" "2" "MI/MT/MH" "2502 cable" "blazer_ser" "Effekta" "ups" "2" "RM2000MH" "" "blazer_ser" +"Electrys" "ups" "2" "UPS 2500" "" "nutdrv_qx or blazer_ser" + "Energy Sistem" "ups" "2" "(various)" "" "blazer_ser" "ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7" @@ -351,6 +365,7 @@ "Fideltronik" "ups" "1" "Ares 700 and larger" "" "genericups upstype=6" "Fideltronik" "ups" "2" "LUPUS 500" "USB" "nutdrv_qx" "Fideltronik" "ups" "1" "Other Ares models" "" "genericups upstype=19" +"Fideltronik INIGO" "ups" "2" "Viper 1200" "USB" "nutdrv_qx" # http://fideltronikinigo.com/viper/viper-1200/ "Fiskars" "ups" "4" "PowerRite MAX" "" "upscode2" "Fiskars" "ups" "4" "PowerServer 10" "" "upscode2" @@ -414,9 +429,11 @@ "HP" "ups" "3" "R/T 2200 G2" "" "usbhid-ups" "HP" "ups" "3" "R/T3000" "USB port" "usbhid-ups" "HP" "ups" "3" "R5000 / R7000" "USB port" "usbhid-ups" -"HP" "ups" "4" "Various (SNMP mode)" "HP UPS Management Module " "snmp-ups" +"HP" "ups" "4" "Various (SNMP mode)" "HP UPS Management Module" "snmp-ups" "HP" "pdu" "1" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)" +"Huawei" "ups" "4" "UPS5000-E" "" "snmp-ups" + "IBM" "pdu" "1" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)" "ICS" "pdu" "1" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)" @@ -478,6 +495,8 @@ "LDLC" "ups" "2" "UPS-1200D" "" "blazer_usb langid_fix=0x4095" +"Legrand" "ups" "2" "Keor Multiplug" "" "nutdrv_qx" + "Lestar" "ups" "2" "MD-800E" "" "blazer_ser" "Lexis" "ups" "2" "X-Power Tigra 1kVA" "" "blazer_ser or bestups" @@ -491,6 +510,7 @@ "LNXI" "pdu" "1" "Icebox" "10 outlets" "powerman-pdu (experimental)" +"Lyonn" "ups" "2" "CTB-800V" "" "nutdrv_qx" "Lyonn" "ups" "2" "CTB-1200" "" "blazer_usb" "Masterguard" "ups" "1" "(various)" "" "masterguard" @@ -691,6 +711,8 @@ "Microline" "ups" "2" "C-Lion Innova Tower 6K/10K" "" "blazer_usb" "Microline" "ups" "2" "C-Lion Innova Combo 10K/20K (3/1)" "" "blazer_usb" +"Micropower" "ups" "2" "LCD 1000" "USB" "blazer_usb" + "Microsol" "ups" "4" "Solis 1.0" "1000VA" "solis" "Microsol" "ups" "4" "Solis 1.5" "1500VA" "solis" "Microsol" "ups" "4" "Solis 2.0" "2000VA" "solis" @@ -711,7 +733,7 @@ "Mustek" "ups" "2" "Powermust" "2000VA USB" "blazer_ser" "Mustek" "ups" "2" "Powermust Office 650" "USB" "blazer_usb" "Mustek" "ups" "2" "PowerMust 424 / 636 / 848" "USB" "blazer_usb" -"Mustek" "ups" "2" "Yukai PowerMust" "1000 USB (PID: 5161)" "blazer_usb" +"Mustek" "ups" "2" "Yukai PowerMust" "1000 USB (PID: 5161)" "blazer_usb" "Mustek" "ups" "2" "Various" "" "blazer_ser" "Neus" "ups" "2" "400va / 600va" "" "blazer_ser" @@ -723,6 +745,7 @@ "NHS Sistemas de Energia" "ups" "5" "Expert S Online 8000" "" "gamatronic" "NHS Sistemas de Energia" "ups" "5" "Expert S Online 10000" "" "gamatronic" "NHS Sistemas de Energia" "ups" "5" "Expert S Online 10000" "" "gamatronic" +"NHS Sistemas de Energia" "ups" "5" "Laser Senoidal 5000VA" "USB" "gamatronic" # http://www.nhs.com.br/produtos_interna/id/T0RrPQ== "Nitram" "ups" "1" "Elite 500" "" "genericups upstype=8" "Nitram" "ups" "1" "Elite 2002" "" "genericups upstype=16" @@ -936,6 +959,7 @@ "Sweex" "ups" "1" "500/1000" "" "genericups upstype=7" "Sweex" "ups" "1" "1000" "USB" "richcomm_usb" "Sweex" "ups" "2" "(various)" "" "blazer_ser" +"Sweex" "ups" "2" "INTELLIGENT UPS 1500VA P220" "USB" "blazer_usb (USB ID 0665:5161)" # http://www.sweex.com/en/notebook-pc-accessoires/ups/PP220/ "Syndome" "ups" "2" "Era 500VA" "USB" "blazer_usb" @@ -1077,6 +1101,8 @@ "Trust" "ups" "2" "UPS 1200VA Management PW-4120M" "" "blazer_ser" "Trust" "ups" "2" "UPS 1300VA Management PW-4130M" "" "blazer_ser" +"TS Shara" "ups" "4" "(various)" "" "nutdrv_qx" + "UNITEK" "ups" "2" "ALPHA 500 IC" "" "blazer_ser" "UNITEK" "ups" "2" "Alpha 1000is" "" "blazer_ser" "UNITEK" "ups" "2" "Alpha 500" "" "blazer_ser" diff --git a/data/html/Makefile.in b/data/html/Makefile.in index 8ec093f..f455c4a 100644 --- a/data/html/Makefile.in +++ b/data/html/Makefile.in @@ -213,6 +213,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBDIR = @LIBDIR@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ diff --git a/docs/FAQ.txt b/docs/FAQ.txt index 8ce0b14..81c93df 100644 --- a/docs/FAQ.txt +++ b/docs/FAQ.txt @@ -561,6 +561,8 @@ The most frequent issue is that udev has not actually applied the rule: - 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. +Instead of unplugging, you might also be able to run `udevadm trigger +--subsystem-match=usb --action=change` to fix permissions. There was a mistake in the naming of the NUT udev rules file which resulted in the rules being overridden by another udev configuration file. While this has @@ -590,7 +592,7 @@ will appear in dmesg: usbfs: process 29641 (usbhid-ups) did not claim interface 0 before use This can be a symptom of a source install conflicting with a package install. -There is a rudimetary locking mechanism in NUT, but there is a chance that the +There is a rudimentary locking mechanism in NUT, but there is a chance that the packages might not use the same directory as the NUT default, and the conflict will be reported by the kernel. diff --git a/docs/Makefile.am b/docs/Makefile.am index 8ca7afd..c587aa5 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -111,18 +111,21 @@ A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ $(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_SRC = $(ALL_TXT_SRC) ../README ../INSTALL.nut ../UPGRADING ../NEWS \ + ../TODO ../scripts/ufw/README ../scripts/augeas/README ../lib/README \ + ../tools/nut-scanner/README + spellcheck: - @for docsrc in $(ALL_TXT_SRC); do \ + @for docsrc in $(SPELLCHECK_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\ + @for docsrc in $(SPELLCHECK_SRC); do\ echo "Spell checking on $$docsrc"; \ LANG=C $(ASPELL) check -p $(NUT_SPELL_DICT) $$docsrc; \ done diff --git a/docs/Makefile.in b/docs/Makefile.in index 037296f..1a28021 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -242,6 +242,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ +LIBDIR = @LIBDIR@ LIBGD_CFLAGS = @LIBGD_CFLAGS@ LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ @@ -464,6 +465,14 @@ A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ --attribute tree_version=@TREE_VERSION@ \ -a toc -a numbered --destination-dir=. + +# 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_SRC = $(ALL_TXT_SRC) ../README ../INSTALL.nut ../UPGRADING ../NEWS \ +@HAVE_ASPELL_TRUE@ ../TODO ../scripts/ufw/README ../scripts/augeas/README ../lib/README \ +@HAVE_ASPELL_TRUE@ ../tools/nut-scanner/README + all: all-recursive .SUFFIXES: @@ -802,18 +811,14 @@ 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@ @for docsrc in $(SPELLCHECK_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@ @for docsrc in $(SPELLCHECK_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 diff --git a/docs/config-notes.txt b/docs/config-notes.txt index 021033b..62983b5 100644 --- a/docs/config-notes.txt +++ b/docs/config-notes.txt @@ -30,7 +30,7 @@ configuration directive. This may be something like MONITOR, NOTIFYCMD, or ACCESS. The case does matter here. "monitor" won't be recognized. Next, the parser does not care about whitespace between words. If you -like to indent things with tabs or spaces, feel free to do it here. +like to indent things with tabs or spaces, feel free to do it here. If you need to set a value to something containing spaces, it has to be contained within "quotes" to keep the parser from splitting up the line. @@ -45,46 +45,46 @@ configuration directive for some reason. You can do that too. NOTIFYCMD "/bin/notifyme -foo -bar \"hi there\" -baz" -In other words, *\* can be used to escape the *"*. +In other words, `\` can be used to escape the `"`. -Finally, for the situation where you need to put the *\* character into your +Finally, for the situation where you need to put the `\` character into your string, you just escape it. NOTIFYCMD "/bin/notifyme c:\\dos\\style\\path" -The *\* can actually be used to escape any character, but you only really -need it for *\*, *"*, and *#* as they have special meanings to the parser. +The `\` can actually be used to escape any character, but you only really +need it for `\`, `"`, and `#` as they have special meanings to the parser. When using file names with space characters, you may end up having tricky -things since you need to write them inside *""* which must be escaped: +things since you need to write them inside `""` which must be escaped: NOTIFYCMD "\"c:\\path with space\\notifyme\" \"c:\\path with space\\name\"" -*#* is the comment character. Anything after an unescaped *#* is ignored. +`#` is the comment character. Anything after an unescaped `#` is ignored. Something like this... identity = my#1ups -... will actually turn into "identity = my", since the *#* stops the -parsing. If you really need to have a *#* in your configuration, then +will actually turn into `identity = my`, since the `#` stops the +parsing. If you really need to have a `#` in your configuration, then escape it. identity = my\#1ups Much better. -The *=* character should be used with care too. There should be only one -"simple" *=* character in a line: between the parameter name and its value. -All other *=* characters should be either escaped or within "quotes". +The `=` character should be used with care too. There should be only one +"simple" `=` character in a line: between the parameter name and its value. +All other `=` characters should be either escaped or within "quotes". password = 123=123 - ... is incorrect. You should use: +is incorrect. You should use: password = 123\=123 - ... or : +or: password = "123=123" @@ -95,7 +95,7 @@ You can put a backslash at the end of the line to join it to the next one. This creates one virtual line that is composed of more than one physical line. -Also, if you leave the *""* quote container open before a newline, it will +Also, if you leave the `""` quote container open before a newline, it will keep scanning until it reaches another one. If you see bizarre behavior in your configuration files, check for an unintentional instance of quotes spanning multiple lines. @@ -176,9 +176,9 @@ right one for your hardware. You might need to try other drivers by changing the "driver=" value in ups.conf. Be sure to check the driver's man page to see if it needs any extra -settings in ups.conf to detect your hardware. +settings in `ups.conf` to detect your hardware. -If it says "can't bind /var/state/ups/..." or similar, then your +If it says `can't bind /var/state/ups/...` or similar, then your state path probably isn't writable by the driver. Check the <>. @@ -204,7 +204,7 @@ NOTE: Refer to the NUT user manual <> for information on how to access and secure upsd clients connections. Next, create upsd.users. For now, this can be an empty file. -You can come back and add more to it later when it's time to +You can come back and add more to it later when it's time to configure upsmon or run one of the management tools. Do not make either file world-readable, since they both hold @@ -266,7 +266,7 @@ You should see just one line in response: OL means your system is running on line power. If it says something else (like OB - on battery, or LB - low battery), your driver was probably misconfigured during the <> -step. If you reconfigure the driver, use 'upsdrvctl stop' to stop it, then +step. If you reconfigure the driver, use `upsdrvctl stop` to stop it, then start it again as shown in the <> step. Reference: man page: linkman:upsc[8] @@ -335,7 +335,7 @@ Reference: man page: linkman:upsc[8], Startup scripts ~~~~~~~~~~~~~~~ -NOTE: This step is not need if you installed from packages. +NOTE: This step is not necessary if you installed from packages. Edit your startup scripts, and make sure upsdrvctl and upsd are run every time your system starts. @@ -347,7 +347,7 @@ Configuring automatic shutdowns for low battery events The whole point of UPS software is to bring down the OS cleanly when you run out of battery power. Everything else is roughly eye candy. -To make sure your system shuts down properly, you will need to perform some +To make sure your system shuts down properly, you will need to perform some additional configuration and run upsmon. Here are the basics. [[Shutdown_design]] @@ -384,9 +384,9 @@ The exact behavior depends on the specific device, and is related to: - call their SHUTDOWNCMD - disconnect from upsd -5. The upsmon master system waits up to HOSTSYNC seconds (typically 15) - for the slaves to disconnect from upsd. If any are connected after - this time, upsmon stops waiting and proceeds with the shutdown +5. The upsmon master system waits up to HOSTSYNC seconds (typically 15) + for the slaves to disconnect from upsd. If any are connected after + this time, upsmon stops waiting and proceeds with the shutdown process. 6. The upsmon master: @@ -433,7 +433,7 @@ References: linkman:upsd[8], linkman:upsd.users[5] Reloading the data server ^^^^^^^^^^^^^^^^^^^^^^^^^ -Reload upsd. Depending on your configuration, you may be able to +Reload upsd. Depending on your configuration, you may be able to do this without stopping upsd: /usr/local/ups/sbin/upsd -c reload @@ -441,7 +441,7 @@ do this without stopping upsd: If that doesn't work (check the syslog), just restart it: /usr/local/ups/sbin/upsd -c stop - /usr/local/ups/sbin/upsd + /usr/local/ups/sbin/upsd NOTE: if you want to make reloading work later, see the entry in the link:FAQ.html[FAQ] about starting upsd as a different user. @@ -479,7 +479,7 @@ adding sensitive data in the next step. Create a MONITOR directive for upsmon ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Edit upsmon.conf and create a MONITOR line with the UPS definition +Edit upsmon.conf and create a MONITOR line with the UPS definition (@), username and password from the <> step, and the master or slave setting. @@ -655,7 +655,7 @@ to keep this running either. After stopping driver, server and client you'll have to send the UPS the command to shutdown only if the POWERDOWNFLAG is present. Note -that most likely you'll have to allow for a grace period after sending +that most likely you'll have to allow for a grace period after sending 'upsdrvctl shutdown' since the system will still have to take a snapshot of itself after that. Not all drivers support this, so before going down this road, make sure that the one you're using does. @@ -706,7 +706,7 @@ for individual hosts: A small to medium sized data room usually has one C and a bunch of Bs. This means that there's a system (type C) hooked to the UPS which depends -on it for power. There are also some other systems in there (type B) +on it for power. There are also some other systems in there (type B) which depend on that same UPS for power, but aren't directly connected to it. @@ -715,7 +715,7 @@ of the "single C, many Bs" depending on how it's all wired. Finally, there's a special case. Type A systems are connected to a UPS's serial port, but don't depend on it for power. This usually happens when -a UPS is physically close to a box and can reach the serial port, but +a UPS is physically close to a box and can reach the serial port, but the wiring is such that it doesn't actually feed it. Once you identify a system's type, use this list to decide which of the diff --git a/docs/configure.txt b/docs/configure.txt index 9b12481..aff82c1 100644 --- a/docs/configure.txt +++ b/docs/configure.txt @@ -90,9 +90,9 @@ Verbose output can be enabled using: ASCIIDOC_VERBOSE=-v make This feature requires AsciiDoc 8.6.3 (http://www.methods.co.nz/asciidoc). - --with-lib (default: no) + --with-dev (default: no) -Build and install the upsclient library and header files. +Build and install the upsclient and nutclient library and header files. --with-all (no default) @@ -227,7 +227,7 @@ Sets the base directories for the man pages. The default is --includedir=PATH -Sets the path for include files to be installed when --with-lib is +Sets the path for include files to be installed when `--with-dev` is selected. For example, upsclient.h is installed here. The default is /include. @@ -266,7 +266,7 @@ HTML files will be installed to this path. By default, this is --with-pkgconfig-dir=PATH Where to install pkg-config *.pc files. This option only has an -effect if --with-lib is selected, and causes a pkg-config file to +effect if `--with-dev` is selected, and causes a pkg-config file to be installed in the named location. The default is /pkgconfig. diff --git a/docs/documentation.txt b/docs/documentation.txt index 4483117..ab3bd2c 100644 --- a/docs/documentation.txt +++ b/docs/documentation.txt @@ -46,11 +46,13 @@ Offsite Links ------------- [[general_powerdev_info]] -These are general information about UPS and PDU. +These are general information about UPS, PDU, ATS, PSU and SCD: - link:http://tldp.org/HOWTO/UPS-HOWTO/[UPS HOWTO] (The Linux Documentation Project) - link:http://en.wikipedia.org/wiki/Uninterruptible_power_supply[UPS on Wikipedia] - link:http://en.wikipedia.org/wiki/Power_distribution_unit[PDU on Wikipedia] +- link:https://en.wikipedia.org/wiki/Transfer_switch[Automatic Transfer Switch] +- link:https://en.wikipedia.org/wiki/Power_supply_unit_%28computer%29[Power Supply Units] - link:http://en.wikipedia.org/wiki/Solar_controller[Solar controller on Wikipedia] - link:http://www.pcguide.com/ref/power/ext/ups/over.htm[UPS on The PC Guide] diff --git a/docs/download.txt b/docs/download.txt index 3991b1c..e43ce48 100644 --- a/docs/download.txt +++ b/docs/download.txt @@ -103,11 +103,11 @@ NOTE: The only official releases from this project are source code. NUT is already available in the following systems: - Linux: -link:http://aur.archlinux.org/packages.php?ID=5379[Arch Linux], +link:https://aur.archlinux.org/packages/network-ups-tools[Arch Linux], link:http://packages.debian.org/nut[Debian], link:http://packages.gentoo.org/package/sys-power/nut[Gentoo Linux], Mandriva, -link:https://admin.fedoraproject.org/pkgdb/acls/name/nut[Red Hat / Fedora], +link:https://apps.fedoraproject.org/packages/nut[Red Hat / Fedora], 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], @@ -115,16 +115,16 @@ link:https://github.com/voidlinux/xbps-packages/blob/master/srcpkgs/network-ups- - BSD systems: link:http://www.FreeBSD.org/cgi/ports.cgi?query=^nut-&stype=name[FreeBSD], -link:ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/sysutils/ups-nut/README.html[NetBSD], -link:http://www.openbsd.org/cgi-bin/cvsweb/ports/sysutils/nut/[OpenBSD], -link:http://doc.freenas.org/index.php/UPS[FreeNAS]. +link:http://pkgsrc.se/sysutils/ups-nut[NetBSD], +link:http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/sysutils/nut/[OpenBSD], +link:http://doc.freenas.org/9.3/freenas_services.html#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/package/windows/NUT-Installer-2.6.5-3.msi[Windows MSI installer 2.6.5-3] +link:http://www.networkupstools.org/package/windows/NUT-Installer-2.6.5-6.msi[Windows MSI installer 2.6.5-6] Java packages diff --git a/docs/features.txt b/docs/features.txt index 8e25259..eef38b6 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -18,10 +18,12 @@ More and more appliances manufacturers are bundling NUT... Multiple manufacturer and device support ---------------------------------------- -- Monitors many UPS, PDU and SCD models from more than 100 manufacturers with a -unified interface (link:stable-hcl.html[Hardware Compatibility List]). +- Monitors many UPS, PDU, ATS, PSU and SCD models from more than 140 +manufacturers with a unified interface +(link:stable-hcl.html[Hardware Compatibility List]). -- Various communication types are supported with the same common interface: +- Various communication types and many protocols are supported with the same +common interface: * serial, * USB, * network (SNMP, Eaton / MGE XML/HTTP). diff --git a/docs/images/nut_layering.png b/docs/images/nut_layering.png index ff451b4bc4db1e403ab32e20d4f2213fa1655862..41f650c593dc25baaa3d945432a1edaf00725704 100644 GIT binary patch literal 231026 zcmc$_19v7t*EV{`nq)G;L=!ui*tTukwr$(CZQHhShZEaAdA|33&ia1AIlb0i-Bn$^ zYS%{9uG&|J$x4gB!(ze$004L~Q9*eC0Q49D0RICG`CT&-W?l4s19#vTQ-uD$JfRIk zzsoSTqG}G`?N|OoApB$*uHTgyjzX%A3O2@$E_(Jx02db*YBOsK2LnA@BWfFalZ;DF zOaK56ASTGC=$d(+<&=sd@;cI^w6)({-K!tbq2UYg3k2u)Wwmo@={P{^S>5{8*7|2` zNK_P09M80N=d!)Fqp~B?(dFY4-Pxtk#M#(Ixqtb{?R9PKvb<%xyxRTkqNSn&#^A>v zgph$1aB~H8=>LC9ug(yI|%(DIO%S>hP|BniR=;VBXvDJY4xcHI(!__x)nMH;S z!{MOVk*NU)t0aK^NnXnXLHlox{}1CPs20$+hHSq7Y-h zi+3FUe;A4&cn{GyzQ01j9O{VdoF1P40&m#@FL;WdY>FSE8k}!qWAuNAz#^y@ZmNPJ zg_^*$6rNvYTwks3j6p%{A!#RJfd;$DXG4@_%L$#zsEGGP$fH#f^#+(B>$Lu@=W4!BUomD5=EgO;|CIQt((hYXbA@@omp z=`3n3qB*gwMw8VWvR{-(bEs>rztE!VQB~={Z}R;F<5MuA6~@NNokM#B-;J~X-~M|3 z2Fl4P#8H@2$U7CEe@2HpYg9;ZU|X0q0WNbxz){cH4es;2)dl!)5rs_6y#A}ExBys$ zj6P>a|LIJoUhQSQh_23ovE;=Nj^hX2+U#S)T5OIGM4^rO_WzjTe-xXJz*jqxn*UR3 zIisO|;_j^`k=VdV;Qd6e6Sx;pCru=Pj!4&RhQ-ck&Uri|>gZBi{M zab@$+0ZI#kuX0{vzeNUxF^Qb23huwQ{(`?~R6lr;ZA?R>rK7g#<>Qb%h3$yj7~HAq zaGp(`C|;br9Q429TChi?HLo>{{MBRxW8@aFLMxo~k1U1b7{}C+__xJoby?u(>;Ki7 zefBiGU2VUme!er$hf&0BlaB`s^@81Evl$LL?#KVdgHzrT+GFkDB{e0@c}GFn#2x}W zfZq@^srH1E&sMOhkvdbfuQ!pRoD4OQJSnkGd^|M*Q1uTBJhK4-mOl!Xm?UVH0c-9S z;XjUI^2=S}pR5plqDrze*LvciEflsdmEIkz+yPDCC#tSEYLX@?WBggGvc1tU3c1XH zDyoq=Pfq)dtS$gJVY;e*T!IvyQN{2l?41JW=GA^|TRdyqVKfnW`yxhymt zMXqw1DLcEMlt@YG#R1YFib^Y2bxi zF%0WrByO#cwD1qxvEf3tU0Ee@d*0o)Q?D{zd|F*Zld?nl#89PJIXMDCE&FEDpNG{%?}?)>Z#ou5F1?uWeV&fwbh`soA0&)2~60u%Kn zuWkEM6AgNxvz+2|Ry)q+Yb!_mq+u&cnK7X>Nmx9=Kw0aKqP^_FB<*j-zd~gVnWK`y z(g|e0>be3<+gSyr(iIk+?P2xn2eDnG7y9tnVl1+vwcLf+tCSMy?6`>>B zctZi=QFwvnn?vQ>tMNNr&D}df1J;9B_WRi9!5chQWbR8P3SO_^95~`$TPKD>!4YlH zyu4xBd5eXzeG~zzM$mOgOOLe{jvwcWwPSp!d*Fe-Vadl`$kAr#|L8F}Yue?!HSWm)#=D!@9;8Ye)P%al@M_0k(WJCRb z3-c)urnmuXY2_8JDAvOCO_Eg4$A7_Pl1c_0N-OV`;cc{B^Z+gU4D?l)$#CvRES0?4;ghl@j@8b7L&fD< z0{zi9Zs_gCb#@Y0BaKkeB8ga=&IB8o`d!rIco1(3v4I}G? zhNScxHCU1Ganwgr>goh)S6)XJ5;j0)gq0|S8Jwr)X1e|7uUo36`Stncdz=Ncri<^cu^I$*dL7%PrCX3MzYfZW z;~tZidhO`b`8?}yJplG3N4h*O&A=j%5r1FGke z(|!yufT^p;GzTAyFDj~3Gjd#PNXDN93Rg&^zz>6jMt2Ps%@xuD$q~C5mtTe0#Vbf^ zh)IY_g_h1DYFUKT6NUgO12ALc5R$m2Iu7%H4n^{RRFn$nSb)B&^BFGVq%9rp)s@3H z?*~a(9l{!@dwo$v=@}Mnvo?n##__-&EasCPHn#7vNH`tRX9y>NYb+8CnYNC=Aoheh zk}($Zu#6yg@cMv#AUNr;nh}T*8Lp5D$Ot(y3Kta6r6bbrDH8oDUA5Rs>sbb+TPmZQ z`MZn}tklvuWIaWOX)&3tC)8G;EUa#y;WS${*AW6Ho>ArFu-|yKsFF+*ZomG7{-Zdr zp2?kJ0qd2GjLG%KM=Zf8pQ))M=_Y44%P*;2v@#yzV+PtJ&d)tY5P-DF?}ibZH*sT% zp`X|bNt+)naDf6I4Qo6&YCB9+dj+^xzaZwY-LjsBug24hI>5Rm?+?yaps^Q_VF2&l zwhV8N1*qC)WxRIVLjt3bXCn)X(lCR%jyw;g<+X(SvdkMzH;5YVhvvjI9b}!SETIik zJP*||qGartR>!7|{=Rv$W~3NPq*8C=PZ$y6+=0`cdSP?)Rgv%~Y^WPfOlMU0)nBhGjmoYM(U@|a!5uQkyxdbFtJaWk2YCy4z)AeG;fGn%V zD`{14C_n1ydyjEQTBOUDGw3J^mj!M7Mr~~GckH^k$MI0I_a-`Q7K2h+R7C%-tfs0O zS&Q*M9as7{ew&kT*e1)UF_U0`Z0!K+|1zlw33S`*yJi`WN)y>!6$v?|Uphk`TMd{i z6j;Hr4r#N95v0HA-?m(vVM1`u`ZTV{c07p_ET_Q6VQ+mnoo7gc_TS*kp)(=U>Tqn? z<6+6n(;8u=*IVyhXG5ujVg5%Rg6Mz5)2f8d+|2^wyARc%>MRVxh#6k^Xm`BbLwLeg z%D`ramvCr=R{t-ekI_qzcC(%ze^o-qe9-(Mbm5eCHJP{m{BTvX{VxUO*_&zCNv3^) zk#bq7*-?0^eWr3ue&SsH-p_ra6|n%OQvzb@T@p0>MjQ>a<1EA(#%hmEf+j3$7*Ls!eck55H1!ON{uXGpkpjLAZA=Xfn6AHl1s z7h-XfuJ&17?jBCipiC>oghNvu52f31QCO=4g!Vble8SntPkt-`ISMnSp_=6KTVQ^v zZr~cT5_9?ptA+OE4@<#Q25R`Q%s{M{P({aLasp~6GI}snXlpN90Z5Iq?|uOw=!r9K+mHYOkof_jsoAJ!l7R}YzzM~1wx{(q{hQ3Zw{nvCZJrh zukCjXkSbGM$Dq{{Ro0(jE0D&VqYhrI$L$x*N?7u`wgtsC>sIBPH|lwgenvc;Qe<3}k}G#5^hX zV|Ooa(#tFnoM9q)?N=p5qoEo(buAWR_FZQ&n_~^+E%>rAEPHJNCYmntS3w1#d4_0I zT8}1VuD7E2la!x%5#6gO&2p-@AHNTWp^Bjuj1fq3db%bj$`!X(``>hvsEfSK1%dK@6 z$CGMWL)lygq9f7Fd-h|jo~@}DK$TL@`#uD=eL=A*U73!x?trMm!gR6W8>Hk6g-exI zWzwBy4`J9Lp(T?)_r*;eQ&Wv+ByoiZHwPs$J}F$-_jfhvqVw%7gcJX2zTNJpv_hvr z(rOu3KC;2+2_Z&hXKrnuQ93xhF-dXkKvL0q(o0N{xuk-))N+M5Z(uUZb=7yAT=i|Y zT1IXu332gj|B?ZS;2p|~iAC+$!remV4(tf0w+=X_N4DpU!zG+YkrJO75+=tgcLc8( zSh7BhAwf(!al4WGS8WhtXD=*@<^{5XMV0R3_tYtVOoK{FR1tK+E;=7tkiJ-#7&1=o zQoiTi?u&J&D_WK1^M2$hKW-Yp1cn_;?8KPs&qJ!h59DK}Nn2vT0E$U06uel%8s&34 zFI7>0Tj+|Qrsr1I+L?~ae0SySTC2QFelT$`5x>Y3C!+bFPoxGkH&*Rv7&edJ>R1N3 z$rNE$?VEbuBAaC1>2i_T&di^XWqZ2^{wt6nv7qTJWoQyQsWp}=t~ZhKn=i6pY`ee3 z>F>`mHZ###7Lc9rd0Fxbl<962WO(tXHhEPc+n=bi2xaCOti$AuejNzJqaVNtDtB+o zq;AcOk2(CQ=DgZ0CUyJLqAiW{dFwQ9F^QPJ486Oa>6n1JQqoLHK8~qjH=T7stdd+@ zG{SGO_Pumx4Y27v%>5%cCYiWl1Ql8uwe1g~LnEhr;cTzBPg_Fb(xBgl!F5c@3fM?g6dQ>lpmwuSK7b%Z>h3-X+t4G zb~AZ9us$B&+F#lnIbzd|lyvVgZWNC>4R9sC-HI07NMa%E4kPeSmi*?C-}2l*!SM;O z#5wGITfd?=_@M%17Oq{r2U&nv?{V!jh5$_Ga5XOfRxOA`XDVZ1>tsp5=8DCx&F`7k zsR8iL_+^c%VCf)TdE8L2J8IhKM=?WKX9zFMIxIJb&70aO+0$bn6T=ok&=4j4?!ums zl~P|1zNUJwDtsPLExGe$qJAM)iE^lxHhmk36wCXM;HXplCyc)iH0uZkCfZ_+f?0Hc z1YBQ}m@t4#H{DX*1~Y+kHwt#w)%;^tLPyA7r_8^~H6%MRAQPB(Zg?}MbNTem8Sx)H zj}+mvv;zhgRZSb=qs$;%G}r?Wm8iJfzG(@`A<3{_+8HDd7#gzi85a)A zc;CrlkV!i=H|N;O|pB>*M@u36Q-z9l_>4`*!Y)cv~c#0Lfi1+^2kCRZId z;hqHz|MaK7zzIjTS+=KrD$2AKAoT0c9cK5ZeU9hFgI7>=R{kiq%gMbg0WTBzjIz4jtiY#$bl) zGs4kS2SI_7qsWWV?Rspi@hbO`kzyEncynUX`(=*ZX!i)~E^yu#I$32?4WKky11Y?nn=t{3@dn+S54{7N5D$De%e<8dH>jdQzb!la?8zqAoi7X zBWEZyJv`Lwy?#n)mfR`5i?r~Ds#8i>t`F-5VZ>WPv%`l?a+&;L(xP+>EsQbSM<7nA z=Hq@0+1$O!bN3%S(ac?q35K8B7jObaO_}y>{TCy3AChyKL^rS!eabzPp@;@zv!X?m z8e_tHQ~k=IJ?KuEd?m(5*!{yshs?rfV>u-MOL_E^iGg+2w;*)0mK%LCWt#gn~AM;0IrH{ z9i#PZl4LWKad6qwrg(h-d6I_UT*x2`k~!bch58d}rtUiw!Xz3A=!nB7JB?Ai_Le5V z)#PjUj~ zJxbzvyf=o%!v)^#?Zouhe$VLC{LSt`0KX)sS@;)ObR>x_x$YuH@btNl`8t^C6I7a@ zzQI(^mEpTwEHiLyQpYC%trq{pZ!g&obZ~6X=8WGKC#QO$PY+kNQhd)s>J4r0de{~L zJ%8d{ENX}Xy)^qf5}ou)1m!tLIu z@%#i{)E}jYb6Ke>Hi8TYJK?2hvCbrUl?S$AWBRLXr{hbf&PPqRxv^%w?OioB_nR*z zkm{t9m^%^RbRSZhU4#on_F}VyhB1xXcsggf_D%XZj^$&ICp(F}Q@EeN8yq9IOecJ5 zw&k>)_3v2s?4MO1qff{|ZbOW*s@={h*2`2x z>McKEAIBDO$>S#=Kq19_D{!&|O19VoG;e1A+*3Xx@d!Vx-T~bh$Eo zn#cnN^;jCfzqQ~R)NnD%eC|!N&!qTY~WO>a1`P;HfIuoGjVh)2LFBu%yCo zwI%oB?w8xx&OMx#9<7WmHmSH}C<8XYecqp3P7MhGu^Ad;MC7ZnE=N z_ZoVDrt<*V(hGNwXM@^W?Jch=nA3GCj^R$}WnpD2QVrL8nx@(%mw`Ys%AXA%iqOfO z<~)NK1jF~qI-(~-YHs&e10nmREahSJ?$4DJac^au;pt4?NaX^Z&jk^Nn<kq5S;#d@!QJTU zQI^BLQfCbBm*CQWs0;zIsg@7xKo?yOP=G};t|I5*;-cBia)M+sYN1oK3YE*&?S~!| zX8V&2A)xlOgi2gV$PkT#0MHIE355^Nv2v+jKj9Nx`ge@A{sWOP5wA_59C-7A<-(wL z>w}l(wb=FUELrca!H8xCN!Wg>rEfG=B1gsLt*(z;njm9m2JQcSitKDMAy-nnv&CAH z;(#NL1u3zx`aYGk%-|*PCS`CJqCNbztwE*ZIV9_T3E^d`EF3o;L|%(vk$i4U9E3`% zcCUK7Wh@jY(4h+zAP-8>itXE3nVwR=NZ>sMg8S5WY{eV^FcjP7iPuN|ylPZlX_}%* zTgD`#c*R@RP3vWBmlkJ@yOCYUX5EbrB_+*(#{cp6m{w2J>L{C#S`3z+;e$sMrPDIE zu@Dm>GTM2w;2as?FtOkt!v2a-NODaB~Y|*k5!6doUS@1?s;JG&xOL#gF^59fn_)jI*4yTh$*ZVhv!b%$ zg1*1rv&+eFv^ii`(L)u`((*;;Q$m|a&o6V96%9egkl5LG4^6`Gygw7n4^T{0-jDeC z8EfO=T5o&uKv?GPc51|dO|40PZWb0;Sn#&`L8Hy*^68dZrPUcF#{CPMudwy-ssW<+ zLul@OL5SN5sk@+hxj63v8$MhR^6wJ%I@A z%u?>B=)+oT@U&P>noIQ(tf(||!onIV9~dq6d?h%bo_->g0HPyIC8bZ*wM*Q_k%vk3 z{y}+2PK%+4Z8m-H(}*3L8ob%W+&PYKwl(KRsZbf%5nOahcQ6CO{ihVv>fDxyoC~)8 zbtehku7kx`Nhx$GlDs*4uGZ{P2)fBkad`|-zldz%Ibq^?!{}pR9In)-s%dCJ1 zpWV$-U2Vc5Ex?us_>c3ucd zj%T(rx?I9E_aRgD+k?M$A7T^5bmA&VQczXa=-P8)al|lOsvciUeoxbo`0_^Yd>b73QE8y!@vUa zjR9x>SRh%V3#&iCa3SwrC1e}&#o)7t>1Bz=6mr~e(z%7FJGW%`5yTgL^sfKn$+r0= z1jQ7r2f5i)UBiCFw)dDDEjG45QICE)*U(3tfL!#%XJsaxooJ>!@%Y>~1emP2$k%<#ik!zu#Cf%nV;P&k{qGT-N z7!|a0UflXjYK-L5FjGWyf9K{M@pEP`?8FZFabllzUisXaa(Fpd934@ z2!uSvQNpAe`D#`OXgUyI)`TYIF0$QMF>(9sK^Mk!dCRNAQBtUDg@k6v%Xpwj=Mz(C zTF@;O(ua<{@22qGrZctqW3uTCKmAYEIc#)J$62-alpYJmvW_WhvMNA)X}C9tO)|+I zZu#w{JB|vTPBReacDb*zn#L1PypEGtA`3NGGG&=7*$-Aoj3aQyE(%8Dy!?9H{~(;D zT4MtXa-j+G*NO(y&fMWV~{p zrAzPwbKhdKSzFy~0?yB`)l^qa3B`b0P4kg%&ix3B zkGHW@7tj$Zxx$#A2#(81xx{9I%~r1Z(Zra?6R!lr5R%EF%E;APIV$4@qwJgu{QUAb z+xL)+H_YT#>y^%#tcmJ`D7WysKo@_VJbB$~zbPA}VP zW)fLz;K)gv!o0so;eCCS$PEMlr-7tBFIQ3ZHIq#h(zWFjXu>g41wGZBd<`Zl2nj?G zJ=E(Zl{yamH&RzMHSN`FX+!5#DLyH&Mlh(jRHQsAlmgJp|WJ zRgzFi{IX;?_9*Le@>u>QhT9Oub_`OYYRf5$!a-i6Y7}PimCVpuuo(*%XwrUtL|cy4 zvt!@+0OOFX|_{B4uIWqbLl+Aq9jdt*ocA_QaNQ_W34YXfau_ZVvgi6?A zyv5>g6b|4vMwU+eunY@p!?(}*bFe5OG$h{8$Ei#bxNPANz;XI8qf`^;bE?SJu~(0) z<+9Bro61&^LF+Eb!TwDE-@lZso~5xLM^RJrR}#_W<}ufBaOJC6Eblw*7ukCJDfj5~ zhyB)x^8Ozl_G_<9r2eNnH7zV~+`!5|s|iy$UYGoO?}^!t-_$fhBsLr^MY{T$1SQ}O zGq-XH4y*ZRJE_l_;|t;>`=|ynIPy$t{>`~mN?uz%?221;?@5qO729)cY;@=&0XMeB zZ4Z;(d6>;`d8?tT-UxT1e|`oHiU~4rebir}4YPpzU^h`7`ZUsPsYUcmz<2<3@B1UtG6 z8gnx)b&ez@jUPfqJj27yZzU0~tihks;#(!0EwrNstQngS*k{#dBUSF>%r46llrXDCdV^IMvNBp+zFPtD9XONdJe4 z^iLJSl{d||7}S|g<%r*09>cTa;-nnzt*LBT@h0i*bd#wnz`Nxcg_ib@z|vD*&WC^; z&L{2!v4}?Mx9l&J&N&BL1pb=NmQze2N;0M;Etax;klXc z;Td=|q=@P!UM1PoJe0P7Eh^yoSoN3MMC1fQNO|I*;d97AZ8^ozaQd_UGm%BS*GGkR z*cn`W?t9y3g2NMpn`vR7sB}et8VLrv-4?XqEBIitZx|dmLL*iv?VW0WDuwfx0Gm~$ zi)H0knKf&BnP6ckFa~iPCMwtJ8V%=&shq{iu!4L2#L-s##s4pAcs@Fo=@grEVB8@R z-z-sC_c1o~-h;@4D%pz#IgN|{UGW0!bSF4wc_w5cwxS6zKq(2~9GEm@p4kfk#bkU0 zGm6hdiaxJW<12Qi^Ml;8X+TlKUmIz#dv#5ok&6?m8$Z}o} zFEo;qu=2%fO+#owg}Qo9v+v&&If`fRGPNq6z;>F|PthY7mMD{U+qce|4-0IAVsG_^ zY^jnADU>`>w)ADKFVSCZ?9Fsg*rwA6{N#N_DNaleScoN25e(2!KT$fED|xJdwcI62 zJyU-ti2d<~+X!qr35`}Y*5zy@am}M6#@0@2L-rE|+cTTPlnRMtsDHa=F#e<_S3wyB zPa3waOu#u;6|iyCSVw>w2d=-F8`R+Xa9QR1N7DQuL?O}akU_k+T zsHRIjpDwn%Zc)nCU-j)tCa5lbr8SnT9EHr-rwHlVI9$h{s8tBRtO3&nI}4`IcJ zj@Q2eilW}@iY1Z5;G)%EhlQ60=IG?>zhHyw+y30zj@yKDR-sh@?A58w2+@|4M~Dx@ z{7K@1ju=G<(zh3--C2J^yA zo_D)|?|K_F2iaLlY5rX?_Wq_IP{5hxAYvZ_&YW$C1|BA-YBONLl_WuWZD zZ#5%YViCrfHy(EI&Znd1vm3VLgW=y~r(xj(M(kU`Z))*iO-@9vgECm?`%y{f)qw9X zcP6or=-gFjlpXb+bXHwLfYKHT>;F)xJw_aVR4U~qwg_)=&+IN)j{}g-sZLz3nQ(r_ zk-0Kn(4?=Zz_6{M>v)W*JcYVc)4Cq#X+}{|5`zV3x(Luzj1k3)9wU!MF_Fc~1M76@ z1;So_SIUhP=UY0f)n=X$9x_WqKP8An5 z(43inp7*?|FVzbqLIVK9ns|cy4lL-c`%A#;A6@Q3$bi+Jn$Q;JHa~wP9#gGNh&>2gGmr)w#{O?0z4~50 zQXTz3sfQ_%(*=0eoNq!0=9f~RtsM<3^y93qm6OrWcBMKUO_vvFG?iA{guBP2lg$MbW*7HYOx@?UOkEm>O4=x@){S|}J?b_{_7 zB${I2vlovJ2_o);k)cVNJQ#eu4#(sE*3SLd8R)wG^b%^yw(4*;wqJ~d9c)V0%c;kH?W9iE#%er6}MC@)rJZ z9=KDtgxs_R62X>Y!GC%E=<(@E!(Mj~KZGpjF6rb$>q2~FVW|>|VRz4F0By*2kM*>j z2(Wy*&9?9qH+vCoap3wX+ccuDd9sTcjKD!^ZV~=u1e`y|v%b*cpdv6;? z$x<>;39o=IZJa1(X9t<5#nDjAR6Rir%Pf=}9)>sUabYv*Iq>CS9;&Kz*zbXRp2W34 zOoBf8u=0Rn{&=yPJ;Q9tdch_Vg$TIVNIPj-dH9WRPNR?OU0bouW*L`xhpwwKde+Xe z1oL>o(S3+6#Xi|>?Wnr2if}#}`}2bBP)FXjU>)<-Hqf!O!os2y1yK2M%aQ4_(Uf}A z@;27Jbe8tFjLlX`APqd!JtHS;pAlZ2PTgMg#XYd~(G~2dFr+csg_SfD{DbAXZ`hGy zhI_4b8e_Jb$tmZj828QVQf_YMC1yaBpW6R#+ PO+v}>q@;jv?~MTX{jOs z$dQGZuMQn*YUf(r7+)MW!&+L0e=-lOJ8{vof!U8YZ$5GGknrKK6atfrv8G;z2PlUr z`_XGQ6TU|UdNOR6Ko)LWZfwqWEb>Xpfk$`|Mc8i~73ZQs-y;)C6(5w1CIYFl*CTw! z=XI9hb7e%W_h-K`WykDc;81+&Yhf(18>4=vq7hH%b$(smg@i;yY$6IWn|mQT#Ea5j z)%Be>0XCfQE`9uBxI|L<#TD`2qeGZZ76LB^YVVXjhi23L7j_3I5;&kBIvLXB8xP&-!7(iBiPnLj9hg?4O zo~weg+(k8VSqvw-{)>~h$)FpNR+EEN3*ZX@#C}Limp8F=aHvQfz%TImVr4fH$JDAn z5acE8%63ciZV&S2sGy!<_{#fusgySUID8X{AaL@#NiJY!SvZWZb9oc{x2=PWTHR5L zNSn!HL5A@yEIT&hci=_NsL)H5wO$@c|J$F&$JpuOE1$kbD4UVv3gftkJ2d8qIkF@o z#c^t)(|M%}bkbYXAy+l~kKHF60k6BxrI{F)Z8isYXqN3&jpsMuvKVlZr?>ME(s@20 zCQ5c#&b9+Ho9jvPOsgjub3nKOhsOH`eTpk7Mq`BMPan-CWXHeHCbATwV{nU#dlv%u zoPcfJR1bYu!ZB8DiicC|3T$>xwVZ7#aZb-#RZ!nW=ihqQvx3+FMdkKHrwRsa^TVRz zbO-?1XiYp}o=hR#+1omt1lq=C1&eEX@O8lnIXMZvwIwWe z%cbg6z)u9E6sieZ3VYLOOZOI2`jgIR$I)4$_)JR@e^I+zLGq1ms*tHS*O2pCiE?{J zOc0hWW>Iu@&LkpYjnQqbHp`3C{qdOy1hOYCdUa7z`UIbk{hwv6wU>n9Pn?{>qLTFc zO-Cx@Mny~7P9=#u^%jtG_=M{T)LVO^ZfRg52nTgScP?Ze&W2^e#UjyX{KndBsl~-Y z$Pq#zxAYwL_2O&E@FT1KGt89rL@y=^ar+-EjP3}>yf~hE%>clc_pOH8*YuAi6NhC} zWaDkx?BXYDk##3=UOj8_=*t?F^jC+$k)_w$~$N(bp)B;iiy) zXicA%oR-0WeO)7}EMsTxO)Ev*V22-}fDpqVmZv z$~pG}gd;7supeo(p@SqNNc=G45#x5ZvtrG=DNd_R#-w+a8Qw=f@V?tXz?g{*S~BI; zSAs&Qy;uT+vz|YEdYE-zMGb~+j@=~eZ*2`1oC{;nBNwx`V!OV03CH2143?H?Puf|b zO$E+@t+rCtV)#K2-Y%>~dEgk1 ze-*d9J)g16*)0Ueqg{HcsP!0nF#HU(jj)jHF=ZDgg2_jxY=YrH>ibU&$wlvy|Mg}l zGX#O=#4ImD1ZLmy67#w{mIU;!;{GGZbHyX-gJ?`5Ox%gUjh0FGMa_1{Rz4_>5 z8jrtXu24_vGiXm3`D7Cb4Qt7-EJSK6fmM5>4lBH>tv=W^6F7!*@gcg}b}eP@!h=m^ zbRZ(9D)05f9vKa&+2XCBD3{CB39j~ z@V8cF&F)o@`i!ZO1H)EYCo+p$-1YllB9X8oX8E*i&g^Dc@7KJ?Jo>@mGeHZEDG;g5uoO@DVP2Vz-jV4n6Q;UIEOASqVo+T$37F zKfZ!$HC}YNZi?+VuGL|)n`xxY{AKL)2AKn0Umw0d>j}Qz4X38kmb|9x*`!QeEk$Rm zz!`Qj*h#J2VNnAtY_1`^0rnHigf_-m-u#{o)4kAWFjNp0(BX`>s3A9uuKjkTe3BqD zy|C$V#k(6KBw|$3;0^V#@dA~YL`k0r_6BEe6Pjnu&0qVuuW^XehMjTpJ!(a^djb9#z=Q@EU$|vOhr!Mw8oRw z`ybV~%d<5);hL{&n9S-OyA6cdVD}f~?X%u{jla!_b!u~wLHsNe1d4GPgXytlN zZRi+@4fkD$a20bi2a8JiSXS5b?+nrC3 z%rR*ATO$$@*v}gVltuUg2}}#djs-KEZAb_q8j6~oewyw=HhjsboQ^X#^4{88a5-ly zhGbXWFD38C3H#H5HRy6VcWNp})F*a^>yzAzhw(SF7jTE~oww@-6KJ@y?2h4mT0diu zFWoHtZO;yK!~n6|3~{pJwMGLl%?@{C>t^WSzFq5K#60KaVa+VHKCU{I=Ig-#*PWNN z#+6>i_yo1V?2aR!dIHMw3HHs~W5+(z<^6#aA6f4Ycdmeu)1MJXH6~i_O(x&a3F0Fi z=J5CD9wqH4L5T3LsSi1|4p$2+D4KD~p_CdLeVJ~bpBRkQH7Nnycgb+2RLkL6XHWGr z+Hb;TV}xx)??*R3ld3=17aA`w#tJ89h$VVdhXHt1BA6h)#5(WMw|n+9TXzk&u{lX9 z8qOh?W_XFZz+kTP-sBHF95e-!Ca^Of%`Mpq%)A>7pBuLk1^}Rpt6iwwmZsbY!$M+Q z)&AX!`0{h*H+6Yc2-!mDc>R3QZ!LZm)Q&R_(ybLpD1>Mo#wuiNo@(rme;Wd~|Dx8K zm`#??FCCvl4cWgcyl&?PhR)N^-k_NlAY#68962)^MV9Xj3T0wBvAP65IoZXJ*Qt^L zy;CkfP>r>hJ09mgN3N{pzcbO5UZ(5AdO$Sit|k#oMn}^JI8sRj}M(x<9S|e zl2U2~Vi8!En1uJ(i`jxB=yfI{BpO|YJQ^+U0FQ&06Ga=uv56QTnu*J+Pd*d~&c|EH zKJ5!bhaC0NADC-FkvZ!r_c*D-C_%fACk{pc(X({XVaZE@SNIElB>8+ib8thW1B0(e zWXnF0iL`=sxr&Is!V#?*O<|88=aK;3*CyoAQ86%4DUSF1HG5~rC%a;nQ`?aS2U9aW zjDKD4O**v$rgVGp8Z?Dkua3g->b-Og~~s= zgrQJ}np8>m9~V-M>{Qa1Jj1`cZ`dX{()KkXfiDPAv%}5?=aC9>wvFr22y$T9RZGAy zqPR+f@6<2h3uG(NnCoX5Q<2T5g@Rj-H%$5)ND zAgyHFNGyEkjYx`Dez9_Xzm0}8wK4%!E&;u87j(uUGI|*V5FT;c80YOg=dMFivclMN3H z+e+krps)L7GSp$I^}IqSbiE1`7VufKF;rs+m1r|Zu2*Ea-Y&}|*6)ee>}N-&u5Mfa zd|Kw7jKBfC?L{1`jcf*DDccuHE94q=$KTU>$de&0AXFyoCVs_4@F$>mZ$_n5*>y~X zamC{)*njsnhK%zzG_h;SN*9d1!v8sW?iW`tSGOKMk8;HN!%)n)QjfF^k*rQ_jT)_GlVp^eQ(z9g*ubwH7);Ld5sX7qo@1@)g!S#MhXyURUp7?*GK)`R181ho z1UJz&>SiBVj27w@dOb0otF~dVaC%_PVcd^$Bn7lOhnWHk2r(SDp>N-d zep0GI#Z+WIEst!EQ>6X?D~I`|woyy^ygH{cNh6gwRLRy* zQPyc+_Lok;6G{_SN=EfI4;6D)gl)Ru>|$zA69DAq&mTH%MzwcdY}~EZ8)1wWikaOf zYrMkN%xqyY`UC3{qBb3Xh`at}T4bn;8ca=DMaz6PImX|(Cb#_z$abpi7QMMb0SyR0x>20~ZnI4i4%-lby-~sk9q4+H{3=UT1#R zAWB43)LI|v8SUeWtmRbvq%`Vq>6GbVyMInQuf*A6;%v zJIo91H*G5DFC#?EPOPQA{##koGzyV`J|fRX$!Q3ey}>CQN!>@mBOPP= z#p5_`xBu3NG|{5^y-!K*63}aVX9X4%f`d)Yc|8iPcd|DSPBb>ks@*>f|23*~7k~WG z^5yxDcrLw+;Sx2!l=phwrx;GFV*=O$=+TZ<`5_?qooiU&^&iFC!R~6H@*t3ZA5(94)?N4Shl+#5ne2IhR)wxH|e3=gjFb(3INy`a`OYm5>{h6Y*nMU4yyHyi-oBsAjHla#5i9AFS zlBUbb-DN~*uP}N0?pi5vU;O%Wk&?wDecznQ=tmK`)|PbshI4#B(k39cw*5*EU&HZFO{%KAe-;*SZk{GtNGh-FOU?>1uVMCN}chdW1Km zt7xg+dsa+;W0nnAnfe`NYMM|Na$&%jki=&_>vi4D`D7waBO}!iJ)xJU)(=g)bIk)~ zxp?kia>N9iuxOy~GQi_jXDR~Yxl^!LD^B)r|FdX`AJlp;OS(h#kd3v6{Q9;5tt=MQ zv2gzOKFfIjc0iDj8if0LO1P$S0)8{8xSm}k_`GchNY%`kFOXh$?~eU9GQ(em)I2yg z+#SKOE&!ArMncg~M?#`axMy;E(o3DCM~snaxxdt)U?$BH<^THDoAmLTYHQFDpk-X1 z>~qpDDtDh);9GmK`I>g$iFqP3grs~8%vhZBzUD$nt0bCnSJmc)vd^1O(Jy8TW-BiZUJq>&R83#?|u?<8eO>Ie-ggjQF6( zt6}Ci?k|G4f#yHtwamy=2SJk&`oGEdm0=%9Z-@b>s(Q(k#F%MLmP182IPSYMDYI7Q{8M0cf@Zhpr za;La_%##bUp;+TEqSX9J6T~+Gxps!@t7(5L6mowf=io>U^O>vS3tXj1|HIMWTE~kdhVT}@C5Ncq9sLwozi&=F zzKs@qQcNI#NEa1ATirH`gsidJ9(2r%2?^acQO#fF)J&yXF0?Z{9IV%z@#-vbN4eLH zrV5XkNiZ0p@UN6{!JipJ@qB5))(FPe=tEp6Xow7XI6hw)!?^+}B8+ot?wAKVLLs9@ z`RF$T_0sM(r}I^V{M%zJ2IsS1WWMhnD@;5$e~X_5@PRv#w%1~_ytAWKhu;Z#belG^ zi=s0-)|hB3v}3loI>!xBr|)FviWrA_e((N9gYpv=Q7Mt9LNDs|Y=}1^Tg6by|8jgV zIgHT{;pY>eY#ryhFLMzi6hX;QT9!^dRHo?pRs3|Gv0Sq~s^W9wzud*t_34GzyEwmqso@VB|wej*&`GeV&+_f*s1}oYR~?Zo`s z35d_S;X_a~?`?SCXX`SRCywi5ypMlO3tz`bUYUVzaET@KmKrYcM={1wHc*C}@BT1b zveynj_CVMp6NiXSIQn=;guujU$$DSTbr$HKf4g%L_(EEt!Vd9ozfJtx;u`y{Y~VD% z90=8oNyQ}C)siFTsdZC}D%^V>3L;%VZOp3Bqhwh~OFcSG554-P(D^UL;s#%ke6m2Y zyMWpqd5a!B=yU>Z#jbSZDKQ}t4uac*8$-0;%#>K5A0m1eG+g?0!{(%RqNJ}H_8Dg~ zYcUWb169z9X-=9@LP|@csqhMr_l;a%pVYn2&N*}@#)xRp4s2brV3hk zDc6(~)o&9Nl^T1PXo-p|xa^z>Qr_Qwm0Z*qK0%Q3mHB%=_4{b$y(IyO=gFDkI5{knkUy>e6b_A0)iIik1;c(&QOC9WaRiwRH-3 ze_jp}nm|PuO!z{yBc)eOtNS#ce2u^ng{&$yh<}*}j8yox;~nk39}iyeqdG;;K8r_S zuWoG^h}p_4S?m4AMZ!AKG?u3@r%&C#pyvS*iG;)b)#ljwU7>!(Hly2GH;jMem$Y9% zjzDxc)Sq$|f7myozq(8L3H^kl5R&Y|h1=sWOtp=0xDcyl(5eOUOD&F`xBC|BEqAQ) zW!MDVzdWrSoV%K3reriu3f!EYYS1lI3*hk@JFi0eQHTA$1J4Z|9BF0G;N|Z?`qj;% zVK+t56pfLZumAp%;y%N^H#!{uFM@!v8;?sDQb*oQGkGC<@Q6z{Y}URRQ9O-;ek|Us zzlWf*>vQuHXVP1UVJk$3;I0-(3}TLd^j@S2dsI+iLvYONfL<1?#R#MoI6lzyiD-=# zN_A*0t9#q~`$UaiFqn_~7Y8mZcCh#2U}u;J?m{PM?#Mlvfj4=K7gtUjH$wXm3E&JQ zetBT8ErqHmpXBJ8I`BD+*|=uMMI{yGC*+@+>xjpsK1E0C zp1oEeYBGIMe}?cvxg~0VFq+f;F0JEaSj0_J=Q%24hYcVp$v#Y49>VL!C8PQFwdS^V zlL?T1l}P_fn;4 zJ}rd3v%3j;Q{@C2uEU;8DXLBKuAWj8Ysl`W^T77+gikO38tf*5#e*0VaAIsZEJ})H zO7a~jbtN`oXpoZ}mF`VG+8OrXGWbNGMoW>5_R`$CA;&r|ov-%@J_hf7+c2cF<9o4C zHpL;bfd@Vd>oXe$`T@g#M~T515M3J_1j$8ZA07^xwXDC7dfm_=mR{ef#*QMvG5BsX zHV|EzObfKMG61jKzfGyBntlXl3}f#x8Hik-<8FTK^%NixIp2jgy|m(Kc5_9hNCF%8 zTvjV<-sPcbyj`vbUwT4Xdm{)0yqk_nM{+NMp^cJ5? zr>9W%CguRI+pN276%-~Mw0lLm-$#)M#$j=(lRrjLpW9j*6ZRs8D3_tNiZ|T2X}#5j zu_3Y>DzTs#nMHc17uW=B8tM>NJ=S>zPTV_3C3#B9PmBt(Wf*!XLh2p!0;hLapEvzx z6*n33ukB7O4Ck<5rJd|7%j}*!&ANQQS{@}K1d0nntVmd=rFq|bR5Y77z-O@Vr`fD- z;5+uzOmt9{=k(etD|G4$|5~QLC>uSi8zJv?p<|p4_`N5|!d@d3zUAqJtuCB2f^0 z4t*R?g6)a_omWznxvH~$#yz95kQ<{#+JT}f2gpg51$=u#p?I)J#9i zHr#J18sA2LYv6X29BdhQI`M(-xW{Q2#E0vpir3nS#?|Hn)C&l_^vi8*jaAtObdtSA z{_g4Sx#w}8q=HKK4{BXnYa$M2HIFL}9ft}oc!&=hF7Xj#m|RZas{m62;-Cpqwgb!< zVrYJ!7G#p+D~Bwn>*6m=iKzRTyy91N!Z8skOFRCLXGxxUKP+7EBk1Yk*t4N^05a@?2`nA zOgt(Khf?TIemY)=;z-jLy$|QJ7M}IQ`XWX$v;7_F%0CTdW@8*MYT29C*%l#h=?OR& zT;MnRD?(&jx4WACU$l=`Hl?l0+Z57b-pINQlj*J3J?IoVB^sNJr6CBIBsx@%>5uDfj&8Taq&U2~>*DDl9NwvXo~UfxZIi z*!5M~ivafLy_}w%7hf~_dZ#t--vro<+(NRNd2u?pdM8~fejWl?@&vgxDNO}M^wjva_9o1ykoSDs|!Z85mGH4%tyIJ*LM zT4_2N@>CrceF=U>I14x%-x7$lE5ez4y=J(|NCI~q!jnl}CF?4JV(-QI$^@qTt}{aL z`u^MsRFR<2dn#i>PTTuY9A2Tl_16xHeMfyuRCQ}Yh}yizaX6ieG1(3LwHqlI>>spS}=>BVLO466SemKuEqB~gY8qYVz0nwTduO=UG=sNow zzB;G*k6|VTKZa45s?mVPRYbWt~&}E>)jB+py2)LYS1&~>r?3}?w5eM#3(05-ZY4=Mf-Bxxj;0-AK-HfbI)}7 z-9m$@1f$GF&&9{}w2)u~UICS%hK%X;h3j|?ALAN>EGjMhi-Uj$263xHgcoTnmr8-jdJi;Z&iO z{HsvFVt{?yS~>Xz@{5~NlN59b;KHad8!A-)Z>GDQ)H4l&G{u8nDodNt!ySm^Kq{zz zXH)^jqqVJFues zJZ9h;ow)yHZ{Y~hus2woW#Kq@5Th>`>CW4JA>Pku@Sd{K*fS2b#95vA*ibEm*Q8vY z-+86uu-+5z$fdFU-;7kez%LoD?X1ZP>=&=Oo$2X)AqgEWf@qqz-{yw`myS4@&&TR>8cp{d zNQuJ*XwYbFoT@{uo1clfr-;W`(+KgJT0inxDP)&syINIZt9t$1T>{-Rp~zJ;VCj7x zyOFGXO<5X=`Ijy{Jszjm%RM7~i(j#n?}-7#f;VyWqQMlIg)Eupn zod&qw|CM3Nl-<aMxbfdhzAT%w;NPnzFDiS^w0PV4K%%m zbywE6dKRZ+0@@U65dHjk>!XN7}Tg|Kyh|CqM$&~ABvGtT|{SrV-Q zClyF3)tr&)bUKoyx!vntFZq%bd;nhs%YmCl>fE$hx~_|+8EyL;}K%-q$z0lwYwH!s4vcZYo`+&JW|ot+k?ICjzyEH8|>!$fk+VHufON8 zHQUHo!~C+qnTd~ezWL!Tsx}oz(Fgmmq~w-Q_c*q5LNq9%1tSw|*|=Dm^{?tg)5yBG zLm?@~rNWSPJgoJ~{dRi1XOJXI!56s7ey-8^%n3&=_#{dzWtpK}&a3M-i+J8?e}Q!Z zx&_=-%{yuWuSB2gU={Wt{yi0SCfsEanDmN0^$q4#lS8#N5*yirZzF#Rs-k1{`~;2A zYZ4j|*0Js-Vn;*i+;8tBZ6u`HnvQZ{LJOR=(izIuZId*;r}r=ED{)$9QU7w0AmBT6 z{LZwqUFke)qtMPyJ4oWu$d&=%s7(ysOmVutz~P?2zTt^C>GdlrKV8h5bib7`&f7 z7|`VdytD3M%4+t@1d8MF+(oc%yFOjsneUy}glyobpLzXtbM_#8pgceHK!LzrC|?`i z$f}dq1>Si9&-7#t8{8PaOx;WbOW6Brr8im7(oheBN>go5?rX4^yhalB+oIE*?)=|* zAKw%*F;?;O8#4%pUQ;}?%qQfjCfbjk9Vgk`0_Qge6gX=Se6N~REu5h2KBdgcpz@_R zd03sJMS^9kYKj1iybu?;=5KC7u-o;aM|El8*;O z(N|CKI*2C6xwuw_)~(#mogr5bw4NU}yu$elqn%aQgVdog4sBbQ!dMgP8J;{ zeB8w0qMQ9YpJq1);kQcUmp3|E>ogvy4B5%_w-eB!?|##xMico-Vv`AJSKc&t!`T&gh1kbHfkD zHakPjla1VLS=e2?jm9TBHKs0?Wm_*u%d5T!S%xNH?xsna7GyLuv;z5%dxw-P$+-q4 zX;ECN?>V^;E@Ti33O@Ht29}DPm3NF23GCwrbPwfKPf5?PMUom)Z?2B%BHL@?)z-=- zb8|#R;Kzy4s}ot;9-B4H6WOd5T47%z9FDR%-Z9gy2Hwh&@px4Sh5G+(_oCa-b7L~7 zDf+YS{$BUffH)qKY79@xznk>lro`+ou6d3rW16;T(F8G4o|pvkS%oncUzwJK3{IHD z9x2(NG>Fi~Fym|;%{WuIXpyvt6zWI|`zO4jQ*|Z}Z)^7zA>}x}%&R^L@+o&;&p}n@ zEyYeav(>d^tU+pc>X$eo($PM&GOb;vJI6x6t2Fidq46Luo_sy#ZJI-{Zwd*51L zc_?)>es!j6erqMe?E;-6pSmukDCuAh)n{&1;||DN=oDRNAXqbPHGSD4x3KtR3 zY&l}jn^Q!I(e`bHQT*s3w}VJ#eVVRxiD_#NJizne$CdP*)k8SCYhubKX>ZZ;+Rl0C zI|Td~CFQAVW^`Ymnom8m5z?iOX4_23n1Fv^(M=zPHn`cN(RsuWWd>vpFZ$kIv zXVH4Y{M5`-%<=|U*SLWJonZkQvS1*3speQ-s)Kc?in3px2@dgOLA}n!y6mM%;Pgs3 zO1&{5&cXm!c2i2u0GSCkj+;{#xAcY|c(=6cWGtfrTXyeEHqJfIM|+`Nq#uU^SlLs= z1KI?K3S{E*f$9NSm2C3jz-J1`f|w|2sfHF^L0p@)?qH-oJf&D+>>Wry%~m#mCPL7;XehSp705DJMjL`~I89`|-wJ02BY@G;H(xPju={w~QPx3^ZPEQ-*DM&mPvz z4AY6K#(u7psR4oOH(pZYq#EFwAxi|3CZaK4`yVrKi)Um>&6W~>0i_wcys7vsyV+C} z4*V9{YS=7^cy4ckrY%T3{k@r-~Ijx4TqMWan7?fR5_j!L5Y>isu5-RosHw(G~Z{Wmsw`tLj*>c46aYaGtLt82`H z6h7KSY%EVBlF3bORG49YFdRE#yY}b*UPChD;L0rTE4kyo^6*4p!z*kX+|4>WO|hQy zpiG_X@O9Mu?3n^~w1bcVlw6vr9$Gk~&H1B8WizfG_b0q7?-eLt&+zk%AlYz>{+jKm z4%{4tna7E)-e_vh!scLg3jHq^VD{k0EV9@~LTm{rt`B$Q868g~ZZg!$4X4DBFNN(e zNX_7wi@@xOGGF1=^6A#-p-~{=H)3kLq1J}NiVo39B+^|}a%3Uin3*1_6}yLHVk9*T zL8dHW$)k@isJd;p%FVHG8U!8FM^KMq{*P!;@?gjbZ$8_8K~W zGIvSzcdQ4Cmm(B(alo?l4X^$ydQ`|Y&FCoFZTI;@HrYS%xXEx{1sr!P6Ks(bDmw32 zw|pO2zk8jLgi*Dp_c+^>g9-M@+j_nxTHl>MgWiH>@(&SMK)S6TuGf@Vp_!Dky zX%F~$v?M&s3s?pBYS(^3coMmuIxHDYVL!2zC$%`<<-L|L#Yxi#C;7`OySeq=U?%CZ zt-FuQ)ycI$FBHG&B~%0Fzg)Oh8x>_s5h82RhoizOulSi63@7LqFC}zM5cm- z5J=!$m65Ur>Q}s!ifH`Q(@-)R{f_EABG5DX9L)jonnt;MqD7%u8uk5@JYxI~qY92F zKZp0?yfR0wi2%~q05Bu{L^jI3AAxHpfvpb{FQmTnlV0GLvEpG==hXIWeVttrbGn-& z4jwf1>zxx_RS*ext|?EV$2s9Bps81<#MZ&f*vj6ZvPOG96#It05UHm0f%!5?k}y1i zP7p_OI3`J~2b_Q>-!t1sD`K-Js4Rc_WGkun9IV;s_?0qudNpz#B)_ohM7GX8%Fk;L z_B1>Zb(v7|w-Q#sFK|1(dU~>#Z_;P&It;j&tRV(=ne67!ho;Vw0gKNc<_hU!Gh7FGECL^z)}2&vH1xDi(F*#iTT zLaM#2==>2SHh>g^!TBOnfP#cD$>-?VcggO!XQ(s?(+Eo_NzkaLjlTCcp6!w^SKo6| zYb8M(@d+vLkwOWcy;Cy+o!k`RH30P4%1E`PYckgvZ`zpzMp{f@q-bfNGoMKJs1tmhmhkFE zmN(S@@mHTVOaL8|Uli3_)kOaX+&Vd~MS;M6p8p{kBBauz&mlP;?{eq^MoDcn_m+sv zHXV_Ou+i8Das=$q|Kq{nwlV>j!%U{&4dMys z0zJLZkJcr2JaY4BE-b#Qos(kx!-Bko|Kctt=;cqM&jJxe+C>3Z-hUtz{e{xDW-~kM zY;=_HXwkZM-ds!BuQgm|hB+D&;L`s13LgyKq|@Kr_u1AcBOC@_hI+Xj1Q{bMaQtg% zInK|$CZf2v!=|Mb`65AG{ygKSW`Gaz4-!}R9cE+4em@{L4F+m_?!aj_`>;^BTO=Si zb1E(- zlt83|?ilPhy&Q4YzYxjsY+Qux%g#>iQd9k}DGz)`lPY)77Um&3W5Z33{NVl4J6*B= zG1F#|zt6e3`BFj9-kTG_Lh|4Q0zMXvxDf`I|NXrxxU9IXnH(NU`4WEttIGB&y|G!= zfR{He%i&jz>uPYSQD;(1*#FqbrTAxZO^IcVqO(YX-2Su;^MJ*bY4LiO#aO-JcqDix zcc)k4>8$bJvy1KV1+|WEXG@N+kI#1M?46!p|K-~7PJOCi@{MiTZWzz35)}MbR(6iM zl1fxsTbcVm##*lUiS!D0!AboI9}S3N;K*`&x_$4MYT(V(b(xhKD6`|G$>9nYaGdm9 z&uVWQ#Stw0@AZX^T*=Zpj|l`P_-}}m8a#OdhLx56YdoCA*thvo{S|UXExe!E#3=FyQ~b-b7JF04nDn%jN#xF4~-Y z@i| zTP&}(**xiENnGgi$aB?ulD}2idrI}c&foJCqV=A#93e+yqn5ZjF|VwC-DlF!EQoia zu_{{$9MEoyPPEJoPn4fU%LT3$|JS?(|Ks~O+JwhUiNsU|LHp9mi;o3+@#5_t5V zzt4yeBE3Dt_8+=Cxjd*c74wJ3YNkr+q#yOt$^vL;WB>1uVEMWJ=}TM)hp9U*4>Ne* zjRdD#h$&OI@Xoduxr0IuSV(W9#f_S3F0L5S{igdJy+5$TowyLpC-KuOpT~lE>mkGX zuO%4E9d8Kolw;nio(1@H&r==4f5C-%cfW8v*yq6d1IC6=Q0U6NcH-+OZ<`%2w-k?! zv(FoR0iOy_OYj2J@D;M-ZoVN;FmbnJAD($CwsevOKS&-q#R_U*qcOR&d>PunTAwUtbdsO zqN`U-Yh6$`_G4^&fIFgvap6=rRI>7tS%^_g35!DMzdaD+;UkOz=IAb|<%X>eu?mx` z$}bQyvCbYRkD2#}`?x})l!`G(^nGGcY)AJ>=n7!)&z(L5*yj}r{WMf&#h-ZJ@hSby z@h2#8>&5;c?q~}Br$vFB=Da_D4`OLXZg5_tb;FRW;`nu77ehCFTr;?*yg+tPM>7kZs8qL%JStJyM46$M z9Y2DVnRRgFuMFy;&!Ve}#|b4_9;cD$%8w-BI3L+c$nnZ=dU<7QhHR6f4(E3f=si8F zzK_{OfN!_rn8!$S439?(=V}WgdiX}7&&$aC_WZQiE(TM=bf?w~yl)nE4 zOE+IUKCY41N%$rEwLM&HrqB#|uQZOJGf%jf;tmq2H6NXPv=W2gG z$~dr#Dv@z!ajc|{nsphq_46Syh%31)q~wM1q5T^78Lu>Ty0mp+>p9kSBDEIcm??J% zS)Bbs@^nMxPu+8`U$%+QfPBCwQ!94O#3b>Dwp8a$_Kwo=nlYDyR4SCC86U;l81FL! z&9QwR_Ca=zzMrchv94+}<{j1ca4)^rmb%j$%{<(;yi-wgoQClQT zue*t<-Y|PQ&o414OK+-YK{dp?rO-tC?FQx>Ko}x6I%dCED_ zHY819uS!M9@ruolImkFmTE|)(R#MO{x}GnFwG9^>a#Z5 z=D;y{Jrc9JveRWUh1DoADI6Sel<+5p?j^z*><`9 zmw>M*@1p7=nj;R*bu_-Q(vzOUjb$+SZPLw-8&g)yBlgc9Bi~gVvl#rA=_f9h%;RT~ z?0;Jd9(2G-hoD4fbUIzopEEivg&z`SAkQ1Aafl2<)@T-Sel6=wt5OU8Y=WeQIbqKv zb(PQ|e-njOS{c`YAkm_6BPi_nFOo|NNB0Tm7!C{#VXNYQOn+>-f?|ZsEL&kgsOd?j z1)HvFxcF`U`CYEc(pdej3Xz4wi*{q9;6$;gwyDinqgZ=Q$*C~nJ;v`CO!{s4R;NM3 zJPiC9b{CbL>@FCw_8I)-(yd*P`MJgwQrVWeMjN&f_k#FDR;FLc_ZyL1EDP3ccIAj`Z{g9Fc8`(Ou z7}w6UmjUpI@*v_bsb>^jY}<1dw<75Rc{i_0E~10-7w0At2xlNt%T7#qL_Do^)Qp42 z8deki9F*TAf#HeZs*|iMC90<1sm;?=?sU}tw>m~c!g-SLU&YiyB5?AP)zK-GD4kV% z4AzRb1zwPAi|++IWN(DIpG&4$#|^uIJUB6?!$WR~G6Pmrhi~EKwRZr9V-xLxL>-=^ z7sPDk*geoF$AsX4c!JbcFQnJTeUx(E8!tw_n;+uA{|4Nfg(1dj3gX0$@ZS|rzI|e( zLL&na%7pLOb~-n{6(NK#<0)E;(XZ)gq7{@H84ut*6H6p+!KT2>M7wQ*QxctrhIV5I zSY9w!fXgSsr7Yk*?4|D8Jnq}vt_0!Nf&aYH8@qqv^APG zawBt=E;wvLieMYKx%f&_X7GDT^)94zB2ql#>Z{ch7TXbP$iuF{S<3g=d6 zi6|wG4@NG*=mtItuk;nfNqc*W({;m3r%RQ5+KXV|AmbYt7524wTxDle!bLGW_+cYWW+_Lj40PkhwM=LGC5)C^uzXypV~uQGPKg_2^xJ%&FjtKt>wE0pVc{Np zw-%nbo!X1^=+Y@d8*B^@ME30BkOtpKByJ4@oc>QCO#^8ZA6q%!f=PDpa5iEtT=gA#ZNQ+gUR`L3sU~0jBL>Dq0iJ(aqReaKul*lHRpvVlXOc z-xfUSG~>c>W{{Z*CbHJ;2N&KGMy&@sUdJcMeM7&_SUD-z)rw83C?I4UVjzFgEpv67 z)miZSC%t@}>gY|!f%usd3*`%N{hjRQciFBu0BpHm)u8Z?8=-`WJLT7EJ#N0d?*RXW zO!BpzRmLZZC~2K-rj8XJ%@xyqJL7k}3JLo@F7a!GJF`-ZhD;@|J5(L1;`DJWg8W6q z76GbRp3-~7OgH3Ts@eGhRz4B)bubK4 ztc_raLQ`kT=Eij>2g6B7wYI!e$^yBHlEjNPKGVl{vH_R-a{H zwLcU2`@6dWrQtHlw{!YdN#oAe^-x8i7JpA z?N_%9iy?jMJsrx5w0AHeQ**~Wa@xiN<0&%5%$dPXHS})NqJuK$jDk-E+?JzH4jebx zgH&&So785HSBl12aSfu>36iPW&A#( z6>XPIcUBg;Q#4vq^Tetz1XsPUI{r zPFc_BbMz586P#C^rRAKfCyvX|+P#D!s;{*UsUiPJz|utWB)dn zp7I%pTzcDW*wQ1h{Gzv zdZpHR5czPDz)hJ*Nt0kumE4n7(k;_!@C!&xI}D~LUxOgO9D1bu3;z>!nniwvc<8!r zP-T;tPI$h+)*dO^<{%m2cg>Vgm zV!%dM?o8c;a$u9q4mZd-H)GE1P_b6b0ceuUe~A{7n6smPwQgYarAs=!Lq@I6b4gf^ zb!EJ5RgwiWr0ljxQ~@RFqNc$E*NZb>T9g-OC4H|CT_eq4XjU5tthQwkgabF>5`GERSc4Ewk0DD!uXS98e~(* z_8GbJ)xbsJjDD{fMI39*ygW>p?HuWc@+vnq%SfxV{6Kh0{+hN28lRe8pBG9M@qJT8 zrl3JsbJNseqnD&Yli3T~kCi^WLbN!`M&P&#ym4y3^fz}L14{#Qz=EmLNOfw0#ZkwhQ=3J1;My^rJyD)tY^!C!#ad!&Gaj7z}h+XC>@sm>3E=dVAUwwlhaf*0-&( z)eiUI42vJpBLm3|origfdq64jb_yh{$zL%6tO z0Kk$D!(C`Rfrm}CH#KWV$`12Hmql5da@^tF#CgRIk^fLpK?WI5Ck?}eVO3PkHl>b1 ziQR{)ox#6|3RRQpVg; zK3QX-({$U~_jzh{dWHhB>j-CJUOt7-b;{-8D(%Dzi?1|fcfKCkmw-x{zi4qkv}4qo zJaZE#1}VHD9tThG7&jC^>^aQ2!CIPIz`e`~DnLc_aa61oO$PRY5)NX<+e+4TiiW3f zhMxKPpoj>ohGD-5Pdfg#@OVzz6_FP-YZHGzvgwfG)Sxd=#0#)4 zih<$hh0FW%}J{!6%H&0p85!;f>pjNcmhLymNoBoww}2cTHZHpEJ~ z_@+TkD2nmS-W8jjA)#{j`Sq7u_0<`;Cny)eXk!yxNp}Oa?dO~^mmk}mJuGb08cE6H zs4_en^1qBNTl*!|>(7~Y@g-<|f}tSpSGfq-oP2s<2D*iG#G~T=aC=K*g>w^Yz3aCq zEl!IP!z9{8iB^_eFV0)wvCPWAhyKNBTF1O2YDxPuN3#{$yw6NOB1x9zT+TT@)HW1T z`$IH=>OTXv-V<>GhB;_^veirf!$;?$@-L|MuKn znejY!d!to8tYh^vI#n~5>6QP(SdMze@>f9=6`fDJ3GO$UpI*vU`B|}MYV6QcV`5hgkOaynH24-)9~HHPodiR z&lz%Te-u~@+JzjtD~~w8KF&N17r;|oxk}ll1s(`)6jSY;?X?mbmz4VxW4`s#xHkiA z!GQx99s%T7*lqMNcld2`JA(-dR7v^*0K8yV5F%4rrt(rVgahp9T>ho0O#{fWLfil* zk}@f1G)~>Q;Gj};g$lbS;a2mE;3Jhbi<4c?OH7Y(a>+rZd%ANYIId{+dw|>2XCO?; zH6iE4TKtk-)<;eX49)s8Yki|E*s2PWDF>ji9Tc4#Hk~HBe$8l?_a@#dW|=a6-q*aV@2=6CuKNm!5KTMi;|+X< z9{9$c`@dX(V{T=oK7VHdp0%e6VUqwLUK3)8r=+u{))dAS%JaVjCT{}uv%}6ds|st3 zml^O&5AEg(3Kz=rL|I|3u;d;16k_UFAeRM?s$YBN{DWvUOu$b!iXa_Juf@fSy5evX zXMlj6`&6KuMXN}>gHy*)_~&2Yg`l4scS5C|Lkt&GE57j^3|DQ^newn2ZWtui5#dv) zeqzrlw`7arj%9?`M`Whttv@M~4z5BIpsoVv=6oL^i_T2ROc3@`iGiQ^WB+nuWHx0^oLbf>sDZcg%Fr(A-3R1>i#8suH0&N z@>9Iz`>w^S_vz<)g|8>ZxArt0KSQzj(MuW=bk?OSu=K#P($~-DMq3{7cn$RvH7Xjv z_`e?md2m%pZu6DSw`Vlh={eQ8Le}-~T>d?mQr3V=X(*cXMI3Uh?-#6Xj;N&cZwp>k z_u`!kf1`)F(BGTn+O%+MXNF{|Vt9x|Y6!%u8J~jLeg}#y}0wJ%*7fu}*uf(HzX{1y#A?<&ar? zM(IEihj@}Ywkau&R&-QWLzAQ`!6z_@Cu0IJY)zG*^nrYfhl(~lK>uJY_GtF^z4t@5 z(dIifG!X=4GJF2GQ{ZIyPVm%j<@`R@207%6cZS$pr!xY%YozqR8QXN)Kh42-+9N23 zz23aNk$!%k0XN!Y>$-n;g^qe9F51#qx2mk4R4ZIyA_;htM5C+Uk|U+#V5Ml2S}Ae& znEu`O{{i7Z9=|f6N0IP+6U{GP{&I1o@;quBt9-*Sa2!O@Lqryg>J#n0c3!6&6%xDu z{w<=-Vky{iNKW*TePK{CBT@}@Tc=E}i8A6BJydF(cKKR)jc$~rq8Cw?7;O|uybFB) zZv}0mOj(dFYf4F2UY=G%T)uj(RK2%(n>0H81Q|tKuI{DkD-}e}pGxPk*b1fmk)t|S z4l0ily_R%)k4Uy*->1{p%xiSTAvas`S27~Qqszue=qD_x=WIKC{4 z7z{kAt?6L)4o{S90-$tM2COz6X>ICe&5d1Q;ghBn5=w!?2b!42I3Ps5ZsV@Y07CiDg^x;whj-q?;k8_QXDduLc0YlamCCE4(M z{5Vp67yytzvH)YJkHv^FMP%3N&8*>24RVX~5b$_VS6&&FUry-=nA0sFjG<=dp5A62 zsFSq3T%_e^!`sz`wyG+L68Dg<(ZCzDb5i}g&DW+eo5xD7Fox4Nuf?-sD;q-t$CMd8 z;>(YJ{MgQwgUcgRqk%inPGikc^{yI?!E`DMKW8~5T{=8+Zj-C?$m^(d+{CV>(dCIw z7bz>UOhcihD;XEbkXu@a5#x$cTV92>BMnK*8EiTFm}t_H8rLDsDBJXuSP7WW}D#L~`1`XNluF*s)=s^ZTh=u{FeJI9Y(&CdX4{!i*{dvy{HHVrd zTlRh+p0EBHOZNUw_{mGpPuFUU4r4fQzTxE}nVWd~*4%XOrxL3;+OQj2zrq zg+JZ>oY;IMS~joYaltJY;;d^H6Kkd|EKC$cRPCz3Uw`^2vo}VkEtxVN%O1Ih6i*%x z$_*?g2K|1NuiJ>_4?TkJ=9a`OC4>SUPikFFyp)3O7QEEPr^%*$;_1b7)R+wN>jys* z-&?*%ay;Mj(CKvkX`{(Y&#q(7|9N#-QnZwXIDkZ=6Mcx{r+mQ@PfI7pTEG?{C8b{+S!X{;wOK&nbaPv#X}c8 zz#e?*7i7YmNdswwAQ6K>_RF{bm-xLt+;+l+Oz?;ALV4@+kCK9MJu5wrE?LGJDh`H) zU--*=F>T2iSpDKZ@zL)em#sSh;2`Z8;S>DC#+jKqMIQg?sYnDCARN(1Hdd>*Nt2g3 zQPHG!){@a=@sd##06tlHNc`-RLy|J@edtu0lWWGGANyKttRJ}P{lz1Ts4Y#8XP#Ii zHq>@WB}Hz&6?Z*&I(0gI`28&d_W=Wpz@SKjSEZZI36Gw9&z?1m7Cxif7_8D}(NOLLVrl?r+)8DHEY#w5;PYFo8jwr{0C6R9|(s&-ephLpyL_uUMKe6}HMt@i+q46}@ zo@s}YOB^`1&}wb_xLosJRXOEG5p1ent-h*Z#* z+`0@G-18$sIS#JQE*#lifsXn{WEAG1Xwo=LUU&*V&CMCKf^OnC1Vopl6;SN2q4=v! z(yyFHL>%BFAwM{sCgJ!4|@oYW^rZ_r}) zDdR{%Q3lepEO2(YU~lV2`HpIKsdgbh7xIF$4f+%*yA!UR@pZdVA*YQ0w@~r;Q{dN2TNC=QokY`aVGn zKUg$|OVG-hT1NPc@8jJb!5>w6G^Atjo<&`BV=ZqvFMyh2^m%Q@2X}0cyi!> ztd;43@YvTMCD(tsG}37!>w9oq`Rm)s{EN@RQ`g_e_O4MfwnNL2JO++~jtaylxQL!J zrsRZ_zH3Jb!%RU3ls4$)x1Xn5aM4MF-s?OTFF(56v+464Db>(?f`?c*OTf$7s_{3v;REzDXTe9FPVQ@mKEn-a~hd@`c#rrmt<%jXXGq1D#-)xhuTgq`bxay`B8f?xEj43=~Y`jqomA9;~|`szm@5Yh8u5)qUD<7Z7oXG=#| zK4WK1!G%A+i4a2Y&D;Nn<-h$C^Sj-ky=gfPWXkEMpu4p_;d6+@Kq&%(SHgD{UMSt zw_o^_z47#iy{=JWe;vK_yEmBGVvx))wZ5isMxd{(-zFZ z#Q8Hw`M2BqPo!+#OaMT`fhrV?8-?-nW|Oa8{&#=)h>7E2OtV1<22r(XYuxkZ3BZ^T z_Asd3*UV}4<9h2ox(=89a4Nn2rs?#HRh8_{TR#$|;w)M+jy&+2(`otMX0~kUKf}h< z9S@vNPhB*Qy!Q9?Y|X0u?CF1AP0bcvSo#fX4zSN?rtY2>xW=?Ydt!owK@a&k>r z_QR?4r5CnJwy|7V`Qy^@wr;3qXP@|_FyLO>^ZDO@TusZS6p%kW_@21otBU?}AYcdv zf-z;rJ}##l4$YjMsG|PatM6moicgtGf$QPXVyr=n7I&?t*fK6fru)?0xC|==JrN)D zv`h;rD9s(xhiFY^eabER0ntZz&IBO(T;u!N^;q7Tn`6*M|9LP9-x=9#5XU_jR`E z%h08JhRhrro_yy4nwDh&(Br1iSknTN#enR>OyrEnB3_pVHlxpJP`&bR$`G_1ORbhrJt?bSp+q8;?8w z@jv9{dmm?8{%>{E`DPU6;f6o|l9Ws>0|5Bk9yr?V$R9fj`C~_6%A!-T;x~_D`-dM# zr5$(5ydD|FMY#OQKO%oZ8G=3^0v-=6IXNg>vF6mV zG3Sg~Wb(`g+l$ZM_#{dmV+<9Wb|X|CNcW_uEgu#cK8+mh2Pz z*6(1`7R(_N=g+{q|NBz^@d+o-A^`C5UteR_{QiD2cJB1vRi>VMvhgRM2mq+ru?s%8 zJMIn#I!X`}eMHOY`wQU_yp-3aGr3hG>6a5BA}qeaqik{>F1l(aZEJDhKQFBpn;SY& zHaVZ1d+AJa;t$4=zpc21yWzaQ2m$|qiF($_uxHC*?AuYzs`l4IZ_pqo zKMivhOdquxidt|SLE)%;%vm&pWEEsdo|DOH z!o&aiEwN?Vu=1t%(Nf#QMvN&U3$8p1rISYE#>eg^pTGJ6yY0D$NzL9v*!|T;IPG0* z!o2C^ghlhP=!Q$taG(D>=;c*}N}(ruWwcoDAo%af>B z^EKjO;y45Z=@lrq;Gr5rR#d)y$UPVH#b;G);i8e`##?666>shlySu%R8-LQPS<&&N z{u2O!fPnT^XUH7Xvy)sf*mFbU=<=Yw)zN=kuH5nFA&%==Ar%Da)nc7N3%^H+7e`Ni zdZP|L_rMLLQVYD!po8Dzm5t?dd*OF`5NpL;Nf`+t(CYOFc%q-piHF`|fzRnc@9wrp z<0)zMcgB3y;aD-O6!hM^J%#-ub(_u0=FtD-Zz^R*JXaDLqQH6{JC3Z5M&}w;HeCK6k$qh?! z%Eb%eb9=~wE6>8aPrbob|9d4o4kxVX7Tolwdr8@e({TP>*OG0YtYu<^Md<3^-%CoS zmci?E;kBRtj_qH&0Za^%%n^B5_SnN1HFFxS{NpcCzjq&6tEwey_L4vT4&5y+`1=*h z(6D8D`J&&R?$@5H}vy;U-8BG8C_Gk(qZ`w2B#NX^&{Lft2wXi1W#N+eJ}iMC#-|S+SYj^5A)-Y-(}; zyy13v(QS9anr_B*_g+9=_}yEq_Mp^iSAQN+qSw8@R<>k&zv*#nDV;nPMynZ~?rs3U zgn2W-L=pSeZp6XOJ2B}8C!%E9L{hzNCjemFyk7T~ZnTBi`KcDVeyznP`YA`v zkx~20&m!isWL^B`%pXOztUt`|yX8Nk$K?Y7!^(HIu}}ZIgFN-x^|W+M4lY>9z zwswZBBr*K+_irG-Bq!`V`zW0_5>>k^asSzOF{iz&udlMoT@|?b@w>_N(@(^>S(C}y z<)7m9ho54i5Cj3k7yn$ru7B)aGXK)Ean_HoBI}ob6jn(Se{d3+c-lOOf`}Jyxd(f{ zSlwTqwJ*JjE1virW}bg;+kJ@;d1eJk-di_x_82)6~a-igvhNezx?&GIGPs zGq|UoSTFX)RW<=6J4edKjWcJ4AN%3$XOdGEPb1I%_8k$Th-E)Li%gn1k_Z6-o7U`Q z|9WO6`+xSXGfa-+XumxhZ!hQ5olepzMbjX(VqoPFmnu=?HivE}ncIQKXIhl(kakyBcV z_wT(QtKWPRK=4d-udCCPDqGAr2R#XBRo=gU|GMYjzkgkMDwraq+9Hs4G3xo%YNW;U z?#Us|VZ(jbzd-B0-xWTasj;pN_h0v%@cd`L=8DSlaOsU_vgaRuH_UX@qzVQA?>+k& z?b@(kUXi{ypr4_51vI`-#_S%IVWs(V!BXe#Lxz^pCe` z;dAeWd3Q9o;pJaHNsoN>A}c5_!SE^Lv3vEVFwZfwPr!)jlK=oO-ugS*y<%;+9yM3i z;9pnYhI>Bw4+@72!nt?fikELvUcPwXL!KNPn-c^CWPEtg>VC*RW6?>Auork#Kwi3eRE9*nbeh0Cox=w04c4zD`gq!3Q1IT8#j8JGvgBJ+dSpZ=6?e&7;z{OmF8 z+0TE^_U|}?b>D8G^-H(Vj2jLKaH(caXGto$5|o-q*{7JY}} zigM%*D8ivFJK=0?$FAjTY24fyY}AQUad7=6n5|X}Jz+8cVE6KsadZ%bontH@co{>) zAoucKW;JERcpCH=;_?QRq}L_jFMs$rY}=+;}qk;I(DM z^Ff|vg9{h{to&w&XjL&9ZOt8`w9dQoR903|j6i_LU+;cVXlZDZk%drmuvR2TG+wy> zIqGO>7d>D8;WxPAz8m1kN(b-vlzICkDoX0d(S zDzRem7Mgkb1a|8AQ(48xQg-`Aj|;#4>osi514f*HLkK5t}$`JRW-M0rukWUZF*Aeksc5kTDhLZ0o?) z4_wFQUUVw9uiSz|I}T#pjPaOu_K6rUw2b}s+*>HRAI{3pLHU@W$jl4A&`$)^>^p+A z3HHSmY~xY)B#wRJiNcGY0r_q!>UCg2a?qt})a0G#@RsiMA3=xWSm6~(da znD~-U^TTI9lmrkFwy)e0PW!W$K9Iy~scl5<{$S%S98@X_n|8q&3;+&p+JRjwLVI5$ z$?$$ZzJB4q0D!TloCHU9maJ^6-gq1Cwsy($J>Nz=zu5x@$i~%!G!q9e?+Ty2?GwBl z$2nBIG;#)FEJWVYP#G}!u_-aHQd4aUWWWHhrrIU~fTDqs5BmtbfX8omgw`)v3jin` zHV_xx@l*Eu_nu(StbT)C^T%6RPEnqSS<&D!06=?V3;f>bEr;E=yvbzx9lzk?7)uN1 z4=Qz9PQExFyoqY7KyyPUQ|b?z8#@RHdSavZJ%9A-H}ufW&(Xf^!S^DDjw#2*H=e^D zdE-~yYpedo&A;+=#+f)#Iw7>TNb5MFR`7@jJ63E20F0e=JPZC0?myqLELfI1mj$;m zjXrT|F#RbLVX@obbGdP7!)BGdM_^+>K=6t5?h|~R$&?YPzj1ve6!Tvjwr{SY1AFSl zZKdme;k#=I0CEd5P%`{!9IXx#d zRIgeaTCso2-k7HZo)4h@NDTmB$I8v{xTISN8lsNL%P%ht$7LLcK@-LR09L*Cv241| zmR4+A{I#N7(cl!uI{^S==GgH`=8~3kbyWx6d1DLN)6BT(w&@CrR(DjysW=f*<#W~1 zl^0!Uhj8(Ar?AKV?{&KK$A1$Zx${-}>8$&NO)Ga(#pp6T|Ji+9Ms^ymKl4H1(c533 zJ1%@gc0h{E42u=WlfPyjy7hmc1w+H5k+8ov4}zJ`ljO zw>?C=RtMYkr_cVEp1*GMn23|Fx)|*ZO?dpmYw`R|cjL`_ z|Aa@*z7(t9Ux57bGFsTTeOX04Fer2EsTLm4n7g2yQg#4zFJWKT;9(1(TCbiB=9^2L*l#RpyY+tvZ03a>h zj_kb5aM-40LGRJoKbgyZ|I%&jlnZCFjO=tdHi#bdL#W&%|Dt6}T{8hd!;!kKy?D~N z9nC?{bzW(aC`%!Oeb4HR3UUCuSF8!&=a-ks(p2x*A^Y6#@r1qRnMFm4X=nulgFwN3 z=%FjRl$7d+xEv#OB({9j_US4;<2WuZjXiuSh_u?+(t=@br`S+vu4~4hum2O>Huna4 z?V%TF?V=U%dws~v&B7@^J{ylNeu0$^9~7o{cLY6U_Vkc3+I@z32y$%|5Wu2b*5du; zvBtR4J;7=GrUN7tO0p6H6Tc03ZNK zL_t(^NU*P}++Q1S(k7dy`Xlnkq5?o?*A}w+!!@$uKDQ@a78$t_r$kP10nC=*>QKWW z`4{H_pjqQf@k-;Jy!k>=dXjfch4TK~GiwB=(}y2jGLDrG&X$CS_(`9M!{XCvfmpuy z=>gv?+(6%du_?SV+S%^LvPD5dx1_uPPv8G0b+$)d#$5H)X6k5lB0E15#RCh%I+=0$ zWL7@B6bE)3#{17N6s58L+l^TI(K6W5Y&h?_bD5lcuRi<|HC8o*e|udXEPj0<0l=_{ zqnO-Ss~2bg;z|Yppa1g}s@W6y{(->rc<;eK!|QZn;=I#QGGeGCuCt{DAO7J_;QjK) zt_JfWFr|8?_e$lM(yt8kV;vmhp!6Z*-atc*@>Y$8n#cfFQXV<>?2W%KpmpDFCB`uv zH**ZT*8lAmHp2vV)`Azx^K4-09_m3o->+fst$UQa{g0QitX#3PqNwY8 z0nPQw{hAv5K6#@BKzJ+(`233XG&Ip*QExb87e`*)>}+b5#0jCJQQIj=Oy=7Se!<5$ zE`Fb)hL&bGUU^}IU^a8O_0E|`oh`I!b?nLquysxFZ1MCV&NNh$l=YpB$bFMtya?X{fTSiSD zW=e#|)Ke#hc^r4**o1h*yUff)pa5c*W!1fM$~3W1Uk{eXC5r7>N%l7C6g0S<9{lmf zf6@b2{#E$&^{?sho@y}0Fm&8tTzcyT>~Ej_kxe;eQd~K;BmNS0Xz&T)oZ|ohRr@0^D=L+6LYL~D{>2SBy{n0MQAuui-se?LHwK>FJq3Z4D4IC zrEA+!kk_u|L4#rP*{7j=d~nOe?ymFCwUmdC2?Z!DwsRwv9B6VCbZEcVBj zZsE+~tuKVe+Mr>cTbM1IUe6+!c6&p_D9^}~P7XukNP3>~gj^a&&QlpllZE@J$TR7E z;E`cb5K|duQoyxObNRhI@PI zZ@IUZ-pkGV(bSke0BEX{I-^>fg7rx}VT;6R>k1F8NHP%0DoOwV^;Pl?r25LBQ>1vX zWZNk^+dAO)N+)@~uD#<{TeQyCy_hD@^hy{8~hXi^cZ4_3}f0^bS!oujt8bof9c0l--oPL@zvZDw45 z&$%(TxPc%d{P&+l;`6~c4$hWVRPT_UCZPn609ZH+ z#ps@-`i`{qwzlY13;B96Xh?3{iZP%py6+R~y`(HRT(_zZH_ImC>U3kpl5OpOnjsD5w{; z{x}pQCu6{;^?381u)*}9U!CG2o_TA-mA|L`nW-i z$u?oa=;MN3Rj=C@p7krC?r=T+_pgQ6y>TBs@X{|?Ms_*|j~;}b>*P-1h{%(?c@-4B z@klj>95)&jlgBAi4xe^>_`dOQ?;7X?COQqp%2`Pe>M5Ec`hT=HO3O-0Fir&TzPub$ zXAQ@!Q^&AhKJ){8^5#l%cDONWd>OmujjJJI8@p^QYk_xBrjfr@cM zF=qNWOrJjo0I+`1GEs&;e(GhKcHXHhyD$$AeD)gq_{o3M-qjn>Qdx=Ik|GS6FbcDN zd?DU{@G%_OvMsJI;vu#?B03bGv(934^1rvY(9dp~iu?ix-um!z(_8=9AktomR*TfS%mRUfKHb8QRChZSS=Y+3Smg1E)-$wY0zO z%Qw)ROV44UiS3T>*NVa$4pnx2-8J~)^qv)K6w{M~MK7Lo3`uI&;^x~e)7?E3}{ z$zdjrg|}~ocvvhPX3icG)AvcscKqalY~bKLsyfspk$2vOlNkWCx4BSP)gqB0mTw@y z84AG78ij}y;2p1nFCkD6+v=}94$SARdLZiEQDfXeN= zF=)aVO#9({*=dEDlbjD-TL1UP^tdsQw*l#I^IE5)igkBK0p;erbNhf_3v7}O>*1fSc3w)#fo6c-|^Fdyyp(ru2pWxYaj~__0|0?l*yRuRB{9IJ}IT zbHOb0YmdCaxt*TWl_mfSXC+>6!EBO#iH^noR7knDGUyeXFr}QOIjrP%iD#hG=Zs*( zMwi5uWyJV_m@suHwyfDNdd`_RoPXsU1_0kKSgVwOiJlv4B1@;d%$MuB3u`}FLMO~W zm5rD-34)r7PfSl^%80QxJ&2U=r1HtJw-(a4|65ub0cz z5ovKP|9U5V@!&z^r*^vvDq#3Mhvk*<0C z*KE{`<8jITcXV5E@kC(EB-`(BAl1>$;|bvI+ZG6a{@Z-6pfDZ3xNCNJ#dFWD2D;^{ zH-!fto6n6xxKw1hz5d)%+P$qBSKoRnJN>+gqOf;g{Dz);^dpg8JuV;GTRKrXqzD(? zaF&Fp$L+<3uYQR)p8Q`@eb)LuD@X_3e(EaXx(l{+rI-K3ATZhXBeyqQI>;%QODsa_5Ab;A$>qYI{xXld{hpJ= zd%>dk?b+Etr=2yDops(A_TjsmD2gha$eHJk3vLkhcuf^{~(RJx4@0FG?ijhx~_OgZ;-_Vr6|iozV(Sr{{C zCIFyj*B;$z`-xy;W=h7kiv~-@oTUr>%Rq;|J$f_FIw7o|MgRTMpY#k%AS`}siT~>R zuCUqD?QHVg<4h|)U8U_v0*$bnY~<%Vnc3usyC+X>hRpyh{c;!m;#a4!>>LN~e&}5G z`27pW+g$Vcqc;{b>!bYRX#PH+?zvULa^F4jPa839_GyqUkmWOM8^J4}C_o*M)rmeF` zMN8TG%?j*YvkAkePQ=fjdz8I$=kICns^Ic`Ms5x+f8qfY53hj03s~^yzo#I@#NiSI z*i1H&*N_1KNvj#tb+7KZeE65|(wgsfWBS~YC?8V5stz^LmNonE&8M5Fy`=+hKfi?R zb_*&G)GIckrrH+#>c@`>C!KQw8$Ed_D=9C;ft`o3dD&K4ws1v^7m2Xsov(0s=K&f& zb36u*8O(ADb74=nqq(LD^@pmk^u0w?xnrNK_o=C>7JvQe9dyF{lQDGCSXMf6C^B-h z(N^Dp+THuG@w3G^vSoYH^~WO!uy9sI54!xSMdaDK)s=M7Ij{1w<_uxOhUc-iHVPukPhss z4(lhB*Q$f{xOD2Tgo=?R7&UPS%P+}BR!%xv8{5!O*?0z)1F>~t-Ph~!;7@-~ zURUJoVm1A>H?`uCOKvBN#RPXp2S|{9xpl#l&tdfk3&DXnj(zsQMhbpOv=kR#HG`#R+EG*4g8#j?oT7Q$@%syz&3*}6 z`uS!$xVsuPhZ~WTmw_>p2V>@`;~4<#+;kATHy`Sf8Sr_1_~-B5pa-7&1)DT`9G?E{ zVfM`j%W!b#Vd6LrCFO;fan=c}rJ)56U-PKUDjLGPQi)BAzQx|v>oI)V@woZ5f8x8> z-U@$7bn^T&F>Lx&>{|LgM$MTWmzR=v)52LG2rihoG)Pwif#@+U-j6ub)B_ zCl6o(AKiCG?%#ZMEnRxWWK2782)pWr>Fhr*tfJ@_t1rE3Dw}o62-eZ&!J99xr0Bj% zAC$+`SUN4`7Eg{asl3cI&uv0%z4vr()qLCae45`i=mHE$@593 z4mBL9ApmUb>=W4PkG~|ZQ~Z+kr_a1X6HcAQ=G}ZX_N-io%I(3`bBoQ2OCP=$HirWn z7JPxaeFt>Q(GdtB&77wA4G#SvQ_dd@gD z_pC9juDT6{C0VdoOjz*FT5>ymxcHhA8ASZV{9pgaBAR*HIQH0UH*qZu9cXWLqI_r( zI1>lIFMy}-dy^V!nnew2(1=p}?A}Y*&+feh?Jb>XsA@vNfIMV(eR`bdc|3LJKPli> zQd?^GfQ9hJy-(1!fBPL9IA%C*dG#sgY;A|DtsMn}%D@Si9gWtXuFUF%aW)#MO#U zo`=npPI7tRSgh{lUfvD1$AuqlC#hZudw11?by*4O0}P@1P!nnnHPGUZ)<@}8Zejos z2{^E;3I}&p5~99J$%T(2lcv|&(2DkkW{K|9^tgB3wyyjLvM)rn*4Cq~whmlEWx^zS zw{sT3$9I@v&Xt+a1phzw&^JOsVLCTuY8m_S6_Xe+i2;Di<;N}8y(bJEo{yk`9*M(Z z>hiXYm3Z;#Z|JWt{FL4Kz&RqZH?KX2`)__-@Pt<;gYoLBS}=CTj-7p9-_Pcave8x%pm;m=kp_3>%yK*(i1-<+KNk|5C6R8HeC6a z2Qg{hX*l`X%W?9xmjejy6MpmVdtr0f;~MBbL4cXF$hMy}Q<@M6G;=0vsmO2?mxa>y z7IE7n0{-^I_w>vQ7c$NiOC6-?X!qcc_kAw>;qi01+wM7qyX>kHaA02(ksx63&;nLc zngzGpk4NucNUbeSSqGR@zED_f-Hx3=DUEAtZ9>~PNCM$s_rFT_{re7f*&RP*)6blO zgWC_Gw4wx~jvoO&z~iL{U!mX^YUA@xq#mvMcrh-#>sm}XdoCuQIh!>esR0QBp1<{e zs@ky!2R3ZQm;e4R&ba=k_~pAVV9%=caJ9B#__X7ZTUvtp1BdX@qfaJ~a+iT_a>&-P zM3BmtMEjM2uGe@g8C=2vK+S;~3MibRsTcJ}>I9$H2dmAB0Yi#Yz64fc&*!(hc9^pq zW4fNmd(YKoM<--FvyeM3K*V$~`@fB>yh!QwE+}N}22)*(2XS8dh*q9Xr!awePohD2lfzihg zWBJ877&d+|1YSU6brUu&+lGZNe@@j0YDDqeoi6NH6YE_QmvwVZBX+LYhRU4>74i*K z?K%L9&4R`wHImFU9InD&F1eZJ-E=t{J$ot!jHp1tpfWTasY2EE-T3_P&!c|-LD|mf z!0L4%5ImjIrRNZiY}gR|ifD`cTk2Y|&*P_jdubrHJj{%UC=lFkA!7t;`z;ryUXSAQ zNfzBRAxjl%y?)BF7D&ni034iI;Q3C@Yzi&)t9$vBY2=U!ooGp0OZoQ>h=pDdjlga) z!_9}Kvnc2p5RkUecCAm61ICP*12lh4yu1>FP{1Dc! zJU|!Beu5@U8py^^E{EIY#r92=*t+%rNzZa8{Nkd&3x&m5m@u`1m6YWouOJg1w-@zQ zP1w42A64$F1t48z0DyzLD)Gx7JVe7M491X=Wf(ZDgn8XwG}biH=H**af4EK*@4Jt_ z!=4Sh$l2DRsE0Qnd65?6yoJWYwX)#=@YEG|5yu73t&fGz?ZHdG_!Wjs8iyeh$04hz z0F|4!;?RbTXs@e7c5xvZ_U(gDrC)Rl0<4@>QjP%NFx$u(Xo1bD{32=)!MIgb?O40I zimEExNiO`mZw}Ch?`@^>t}RS1XY}!s!P_N^cGLFF&+|9lF^3y_+yG2Ep_~E0k%P@x z`2J>k{;6-MwyISWCzb~Q?A}&Q0YA@Lo1H2RMZUdN?ytw@)qBz28j2gC^ZNqWvU(3H z57f!>t=wOWt*dv5R;K}A=lVUk&bU%|JHpH zUfWh}g~uuPGHh^6-nn`!j_ek%bT?JkW7n$9Xs!`&x9V(Z#{*|wMRPAZpOp+PM`nHw z7-QfAk*%!nKk_v8uiJ!EulX@5CXa_bBOP`758|7b-@t;u`~!ZMOT@Fip$Yp|twqye z_4D>Scpf%$I-j~eD|LMzi`{ROFe8@tb6`m}pne2iZ(?Njf?*T${__*9^sn#uPlnZI z#rh@d1CRdfv6Q{g`Ooj3aTJslaCI8wXsAid?qU=tJ_5>0L(Vi~? zF-8>Sl?u(`qkjhn1G9<2!~uRkA4L=W5{sDkGauZ_4I5pGfBfMC`t;4^6biT7E%1B& z;o}NJFUhee9#Q-m0AysP!Q*s+cyZdH+=@M(B#|$e7iqYNE-Viz@DU`>IF2!k%>uvM zEgK%qhZChQ$kL<=|EX!B=_O}4O-y{c$@aE=R(IMQv%@}!q`E*%9>Uu%7$b^$@mM|& zQr*Rd2g{k0l!Jf~oGnqKteChMTmbC{YZ6&hBM%s=ddWqhOBY+c?jkH{(Iuz3~2nuBqtz)694hRZ- zV`+u1@Q4SjEfB!64!eI;?qrb_UFEDaAD}_joUD^5THn$AN+{nX`&>*DDTAOMo_OvO zHs|zF?6qgVr++>EB}v;xbU6mgOug@k^plZ3Invk0lpzzxk?W&l%SEowiYZr$7gt0t zD?{`>Cz3g)Zp5^wN{MNdOQi~EOH+ygV-@d zJVwTP35}LYBWtO9fMk)V$+k3uX1$`GV&?WNYj_&6ZN0e zc`3C8#ME!~_z_t+35|5DUfkSDY4&lR632j)yx8XDvzk6W{O^Cpr@S@*yu5^n6u*Gj zACFmNS}!3GTspRqfI>{QPf_bZ(i4qP`bqKDDMf;L)dr^kvYD)qYpZ$I918eCo~dZ5N$#0k z8(~sf^|ma3uL_lZBOVg24@s9tt=ESvTOl8-^L%^0;P>o?vfdQ`E9hUTzA8a$8N}^t zb;zN=91EA###tJYB~PSLzofJs`8t-E4VI!@qn~YY5zk!XqrJI}?CExvUy`3P zrJKwqWaMTr0BCP&PvMIR5tKRd19i?F7F+hr@UuwmrkLNM@aS)ll5A^Wh;4B4bm~y= zaJ2GcioCSMJ2tW3?M6{rX+W+{<=Jw0U*|ypbGn|$>s?K`Sl0E?FR=M zBw?{>D)Wu)FQn;eEtk|onRm61r=rYUAy&3DlZ^ykyp2q$zG!I+@gT2n{WNO*CW}iK zuZ*Pey4505NK+1#9zP~$gilIEFs+ULnHmJQ`MW>gzk>0n)TKRm`dcDZ9W(%<|lXpj2iJ)H@=s{># zUSo9=6_pobK*azquOyc>*UEoXLJ!7F8)FK6T&1bHfx2S=8<1Aa?`zy<$;+M*^)#M` zE*46IcDz}Cs=WfK&`)<733|}Ia_n~bsUl~9>|Q!EGl2;%nOIsqh;m5A0}~9ZuWG_y z?|wP_@}qX%iO7=*XiuZg=R=k?Pjzo22cJS8pw?dFl}+&ZXYX&I$TkQ$zVXsKdeIgj z8f>=9>egYh2m!vGnN6YdthKfQwQ@?tLmQ7qOJABw^sRCy06yZ##5gF)HrP?*uX3)l zL!=Qncl}O?)bN#$FDSm8|fR&oBOTZ|rP6c7`0; z^A<}Jp<^<9VrTu$^&M1S-3oW7{D&k$Jk&e|T0Ja?nPIFIGtq6B%a6E zPXvKkNlE7eY+1b9y@$!^OHLQ^_wt_Cw_ja_hkx}UE%|I4$%V(p4Lz6dXT?y{pZK|a zpQx>`l{mOEA3;&^-X>pRvTO8;!DHipnsKLd93Zu@m4O)c-ZUmP^qIhkYXDwW!dXz2D(11 zTf8Q0pr3!^g_fM6_@8)I!_W!CxY<9LYX*WxH*Q<8rQ5!?b6n0aUqka3y|T)5|Ic5d zt4@1F`1+IeeR(>4OksIz2aU)cr}|Cf;TZ$`9UUwB*2?2Cj7C2w(~_ZjcGu91l7Q1F zlaykw%Z;M6a>Zk}iqrCWpIhIV>RPdO`2kw+-bUKBwWeG6_a_{7`zYUDqIwLm-DD#x z3y?q1tVU+QfCRN(FVf8!f;r|ug}#J-WuQl9m)fo)I}Zx$zgo)!fFskv?tSe6dv;zX z)59Zll?^TB?s@UIcFq)3`R6Y$2>9F{-F&oO`L-N^6IunIzd@pdAmlxp`n_ZE>C|T6 zTJ}%IpW$nTl4nUTA9eJ!wbjYOA@$TMdDOM&UC$g$edQ%S zePVGE^#UeSj)y%S9Y7j-g_)fBVR(>9D)j_&SA@%{o8O5_LT;rZ{_1gbm|D0Tjl6#3)0fvp;_Xxk`o{M7UUYr3#2@oh zJx=PaqhGhQ(U_cZzEs;@#uk@^L4eLTa^L#%Ykr?6cv9EEk%PELKYKE5`q?whjDx25 z7OR=fyL!Im;g26r%Pz=a0MK09M4vqOen77*dasF8y>(a|P0%>FKyXd4-~@LP+#yJi z#ogWAT?2vO?(P=cf;)@51b25?WU<@#`|j>{_s8tB&rJ7pRdtt6bv3WpE121UtvE*X zHGR!xAA@nSXNDR(srrNI3}Fgd71BtI(t7BA6$uBMPm}>L`?KNHUUm*#-Tp_oSKxM_ zt4Na3A5~1%Svk|1;sdse=9{&ZR=;*3aF({Z==gZU}y=0)KlXj3HZpQZgSz>vOb6Zl?A&Q%U&hp46h+<<;Mo2eb zKO~2K9gSaPT(^>K~FeCR(odnHMxj!!?W&aT1?5v9hn?WJb<3b z^D~pnp@g22mR)ybjf4eq+Z1r+&8JtsT2>SYs}s}HbU|5DL&{~N^vDYr-iVbXHu9)` z(>UfqC*ze6KpKE$gfg`|RuFoTyZ(?wy-A9cHzdiy*R41gh8JpqhQwr}Wj|VrdF)+a zYC7yQw@cu4^UR)n8mHWLeV6*%AN%+mTN*@*bQPCwn{_9~>-;%GA4hYwuFrI;`zwQ7 z>vsb$5sg%pRT=SzrR6;h?wy$n_tx@(Z{qh%IG`nkHj{1 zF{XyEU24+r?^+&PG!Y%IKxDiW4B6bo71o+a>(xKU%e|DJZh@%F9X6A5#oeK!-rkT!P^Y9jsmuho z8K(__SNRm*|NWuu(aiY0X;ts+ZTa zZNt%A;ufcEe${mG}_0VNtLc9dx`aTm zg78jqfIx<7iow+4uVQ8r4ya;QaA<2?l^sx7 z)44A&+GXOP3`p{DTW@Hthw(rnPK+7*KEOy+Y@uzL)R(|KW@-vO7A=QPj$x+=fiwt& z2zKMBGK|nTw|(sjc{9ty4pO?&=|06&-|eK;M+G1`(qN>wYB518d)?o099VlKG*n?{ z+mYa$TUiKR8sZvxUm(5XyN&UNHKD~+zaG`Gdmg_@9?J^CN)wmJGCt^5N=oT-H4PPa zu`1A`BMT<3(P4c}w^$Ef6akEBXS+I&Fc}npy^QbkdUir3O3Y9fCRtKZLeuZWy) zU^Eb_J6DU0b6V+y?PTfKrvRS$b=>@0J1)A3iU{1ecNCTX6`<4~<{oygZmb8YqHlrs z(yIg~&L&IqcI}Yk5~5G-k4jeA(b^V`Et0je&CjLaaW>8Db(hbFJ(~>D@zQEs z;CyQQY2fx&TOBiG7JGfD(?A#hrp5TV*dEcPdu3;q1j`e~E*e_8rzYXvVS^G{HKZga z#eKFNy`;VO8wM?I)U_H{$DppzZq!C0?u5VaMvX&BIXuWGk+*wcT=sLaK9;4eUXtiB zg!M)Iv29R#*LjF8r<(+GIR#Co@W+iOW~p+c32C-3z-LV$nIGZktvcivyNR!Pcz5~! zoW5J$XF#(nAN>?p;M7-k^Btm$4bIVd0CXSqkT-)98XB7GK!9*DYd+K; zDHpoDv216XuyXaD`QRYe@AId>lXVD=;!tn;faEtuAT^ZQ$=D_H0*>yo|mDSmffD(93Yg%K(r zNTkYX=xB}Z&JC#(rm}BX?2bz(k43Ga80d^iZoz9L3DoJc)TQc1E-AO3eVWmG*>|_& zONs@VUL=!aZAT8_@d-H?_Z<>oI^o=8y#u@oiScDfojGHh5@Jli%$uwU2!zbt`({Tp ztlnv1%B_P2L8yI$xBq632anG3-&CXARGh;g=RsnkF001F$GrN_hKeVddt*@})5BFc zbkU_Ue${K2;ua)zUJ1a`!;YgBPsRmiK|gTI1iGPa$yb_6iVF{VWw&CK*HID7pAhi= z*X5(Ao$!r=MTz;fR;^I@Uk%S$>@4tkT9eQX=OR zp8h4ZP{}(5MUQ$m?5LlcnVCbtrigXIRIWm9e4OaO#?~9vze~?#RQtr*15Di+K7Tku zi}YBQA5U`-^B{rNwO5mfG6Xr>U{+ndBKuL)TwC0-amsvZ3K8h+ZYoMgfv65%c5&@s zfAH1RkRUBWEZK_&7gy+8{Z(#uo|{6u+jua3_%$|^el%Wyte@-Bq`2Pk8+m&Y*i|$}^D3(L@d{R$P|0gHP<-L{e*(>UFmwcJ&qWLlVbFTTlYHKz3x6IItI|lJjvnHf zeFabCiicxY`m_p!-Cu(mUg*I1tO!6}YuU>g-w0Aciy-RCb^}0#vqQ@zH@H~MU42AF7vT)rISZwf0D@caG#xHjXDA=n;Fp>_oIz=E)NhPLIWB4N~*W0oMtVL9n3~IHPM*Vn?o?JeWAS5NXM3^^Hi(!KzP+ z9vygRnzQXj_04ptF^@5$cQL3Zv1{}u62iK@MtK$%N}%|NU7x|0Ut-hh zH#A#osP)^8_)=(N)J%ZY+m)9QggsVOE;o>ry5Wvf^ne13$GJF@clZ5mwz0$hax=nK z%hmn*!zOn$nbrzFQ1kl*uPOWCm*%dqmXG^F^4f3LAZgcyU;mtxtYoPP1R0ZC8Z{Pn zC1SaUh8~JeiET_0WE$n+XLcTpC4hoYBjOfGvbS2i>}~D(BSCfZUenOeRvRQhdJrrV zahO#r?i*KkVwIJ?;WZY>c@Ff2+mA|1E{0CV4(JJqpYEwn>^elZ6Lb>%8K@_Z@7^Xr z)gueqkGeh7VyAz)YYH~$8Sg-O&za<#+gM4RXw_nmKmRPBU)}O-dR)a-&bdyWt$>9365Y!7wWoorSo5{%>tV zl(Hcd0zC5)_1N#8PN5$k+4mhgF{m>&pDJwis|>9{i%zXTrwsTtUz z`BY=^9CaUvS*c@P&e=0JkhL9T>{A`b$NMSBD3A8T(C=dBfa$tW;>h4hI>Oys6o2<= zue4Qz?wNu9KId6U%607znY`HQDhQuZGmusu{tn$n{Ky%Z8H^=j_2cx{j&Ji81MtDY zxL)~lKz#r0J16GKem;Axm`hIZbGp(1rrgw_hr8`pGTZl@3J%Al!Y64 zyF4j;Hbzqi-4o@&%Zue0sDTRy1#;cqhIgcxlnbFJuvk(YG*s zehn}*n{ z{Fq?b%{CpB`766&`eEciuPXA!X4-0_cxP|i|KE_-* zh&s2bHH;o71cXqI#N=5y_tDxt)VbTpf~cD=7*uv6 zQFSdtU%c(S+u!BQX0#fh=QIGu2X<8dd202VlhAzECj$k6^m^?He}R1cs60kfIPMVW!fIgQ+u)EJc5q%$ekXLB~C9O3Ki$_ru9_fg1m=S3*}aSbBwvFw=M^Z&F_G`!dit6)o&b~ zziXse_a599)7`l{tesH>fC@xGvLH{H7IfHzGKZ0*Lee&ITG0A(LR(~uNQkxrKStY% z;<0_HYeROZMbfp(Z3JXq=vMWhdz0X(Q?Q+H#c+3=gRL+Gk=*J-$MsDH%Li!YOGuX% zD?wny9c&jxC%Nw1ho2&TDjTZbyZ%6a{uQP(esL-uG4~Bdfr_E&* z{Sze{T5}f=)jd)*1X;%l=X?Y%?= z8f-ZY_yyWHo$qLSvEE+6AZ>kiBZ(+!F2KJulikPPYqGnZ#WSdst-m(a$fv;hKxC0G z>q2OjLE>usCek~p)rRy8O|>y24&_0y{9Q;605JR0x*+hSM>?3x8vx`trdB+KU2cU+ z_Oc?n<>(3Mst9Q(X}{^O++f#Kk9}kRhG9j+$SbSvoMxM3E+baQoEciYO20}0>0>&L z^!t!^|Eb#ljuB4qcb8Tf0@~-VhIyC$eNNCY5FOxa3Kr+~5wVL4GsY+`(JusVTuGqP zX9VxQqd65%xc_O~69@w*NgXA4gd99gbZAWY)$qSN&__IrMp-)vSQM=C&{zK7_rAvQ zefF8g4t+fO`hR*OD8u!OD0~h@T>syW(AFXqP*HI4ccpjy{~ZJR=g8=e5tEPgAMF3X z>336%pZ>$)e+MM?yF!kcRJ}gYK=4j<@ND1y&i#Ktv3?90kNKZx zZJATx>sn9Qt7RV@y#E6j2xCoD-lxJ7%m_yUc==hlKJJAM_x}NMbnD<24b!{e3MKvA zO4minVazDc;yYligG_z{q#LyL4oxAFBsaJ9MxkhYjqJhV8(Z)+5@Yr5<^p%Jo%&_p zu?{SGY*tcg&v2h8SAZ>yXn4l)WVp4qze>EhoE>t$NM*E7x=NEgiUyX=|g)r5*?C9jx; zlH0SUDl!>EV5WoqMK)R<^%9Ae204*JDB4%^kE}S=OfqqHvuhEbS$&eT6&rH$WBAK} zctsf2<-fKFQ1pBN69Q!5@@Qat<`_i7?pencJ77u|>} zYauj2Xblt=zSut-6YR}JFCpxiO&2jDXY&P^ZCtxmG;Po_2K#4692?&j>a!Zp%~O;T zXJ=LKty1*TA|0XqRXV*Cp(P7s$NKNL-?ZdQjBbVFo^lRnmBY9^T3Nvgdn=1t2P8YF zYsw39-y4HV3vMPxXhUT7$6Q@l9=&hnC%{A&{f$)Z9_2`LtKXR4(BsT(r{i$mi!+y890M8!AJ)DCk`;7&`uln zL?l&5vZwU!$c(g?)mV%3s|xq@{^JP2(G50hIT{s_LggRDyg6>^IPR__(`mkKDJo$I zEpq%l!5A4|EfAl( zjsaP|fM62dzS=thhB~v)L*8T|jEagX=e%9KYA^p`+~D#SpLmmdRO?thzL7F0axzVD zW#k1E)Y#o^J^Qn)sw@D5=Yk=Dz*)7ClY ziG#DEU-|Z@2&b(7M+2F{v+ofCshj>E8G|#72$1J&?89j25}0Wjf(sX!KYv_q9KqdO z%|!8PEF#Fw6%wpmV0<+!c!%6pUD9d!c_VrEB{HL0WzT?=_?%=^mqtXga#dyWCS&Q> zXj9~GbQ?u>fw5Y(D#%%dG`Z=XrMBM>!6 zEWPZ3#xq73dmhJK@AbhfDv47Q-ac6u4ygvU9xQfm-DZT5vh0vzL=r#>*JgvcCnSLY zLq)~OVa!;Bh|t&mUfK^mHPeT5-&8gn1=(#)nKkm!G{G|Nw+yfBC@@Fng)v7%=i&og z6Eofose_m0>M9X5mrc^%kIkxhu3?E+d-H@h@dl^H`v|C#I}(=_6i-M-5$O)1-vFX$3uH^$e2%6_NoBUOX67>lW6>stK(EKnNS&T$0 zwB8#DN;JJS0=oN>42SN!JUD;?o{`;Y6RMBTftl_~HBD}&pQ=GWF20`RG65}Jip{2o z!b2o9Md6oKc;%1MUo=VsDQ*fQd9)LrzRJ-T^B%T*g1Du$yT5j5B2|;bJd%qS-CY`s z66qiXvYlbdnIyt2^n(>C*7muT6IVqKJ^MSi)~Q^Zo$5aHR+8PE(=di&&k7G*&!OjN z*+WLUez!L$0z%a_+cGFMB^)}f&OsIA13>1e!TiL?Qd&Dsh`6U!yqbf5<1|fS%|(J9 zefC96>TlA7@X`U=<;Rh$xZS1H_!9vexylyTxur2NbV)J46Psa<%VH&5pT*zDO`@mVPxZ!@Wqj=KXfptp8kyO>A$yiR}^gIfXv>AIdm z8&8&246~+&%(~k}q;rNOYvYK+=i?c= zre!B%c?`UHGB!O`Wh3I=G-DpPUutBFucra)>7hn(u$t@Muai|I!kW{o4c~S@8R+n7 zYoX^3M%?&gl^&`Q^(6Pv1=VU2G~LX>HhHdpyBbL3{P;>YLsf{)d<`DPj*V4!#qU-< z<@mU6v!828P+FmX$B~fSPCK1yb}D@bc0M79ni>`_pNP2Bw$^fpJp|3}W6!P%l|3I; zvIuRKw#eS~e4TE;GTS9nCw7|BTwHxlk7D$M{{X|dqOB#py^nJ$JhO|4bPdFrVJoKS z6!#n~j9ti9-|#k@rVLZ3qVQ3mRBBBKPp#m~WXe_jvS7BV=T=O6YUr@|)U|Oi@5pgS z;D_wua_cy~(7W=|rBAjL`wK`Oc^DZg+%>yJw4UGo)wN*L!6|&`*=>rYqvNh%4fgb+ zu9F!U06J+lPf7lUZmxn*l!HZmDJ5`eLSYmhm?z-s8WvR~S~$o^Z)JgE{cElJn4SQBO(D30$q2TtE( z{L()6pRMUaJ>{`UX2O5n$?;T3S+#%mo4Fs_Xe8Oam@BMMy`sl&5m&+dQR8&&#Y=D0WOx2!CDk13(h(4(5 zXwaM*IhpBb0$+N&77rLOhqj$r?-%^?@hB=qOcK}aJT5CO&{s(Ithk;fQ^+=`h(6DG z7?qg=&TnamRh%BpL|tSx-pNHtPxWLpbE%)Y%>XjjK(A;6!3K`5{&O#<@Aeme9}N|X zt!$mbzX#g(wKuV{XwKa?w0vMADs8{(1N+%9j*STg^GudhO{?bbeb4{UXKW_NCC`+- zQR^vyEg_KO?Uu*cMQXWFPU`guU4crj>PR}g(8JAhWo3LEIh5sfV<&`EO zC8#S<<>scgu{G!P{QA|hV+F1_Y@@>K^-|C(3oaBP2O`ZWVl5QeMB5TStI!z;G+v-QThVp_+PIAJV3qJ(7{VYk$8JmF|{gBbNE%DbDV z7|%xVu_p9PDC6G&zwR%OgVY@a^Y#UzuvqDf-D}!76vETU!oB^QP8AqRKd}lL*euWn zX9?{58%fe)YFow6D7#3M^dS8E@s(jAe!gg<^9PiP2U5EOk1SHcptseg--R?USS476?JUQ7GiM+k*H1NG z3BQ*po3cPJDVR_|J0RFH;8&E4fmJUbo%6*JQqpTQMezdyo56kbHqF0S%!p{a8~+* zpH}nUSGM&a!D@MR;|9|9^m!yGsg}3Mnr`!a7AMiqQ!m|b;MXDBUpl{{-F z^tqpXx47)u-KCp+4+=1E)=hPtE!RpgYxN)^`f6yKam*}Yj1=BNH;*lgQ$`0D+%KeutQwzjdc z(aKY%`zMX9x6b@Wo3@hSZZAi&1o3C!E)V+8^Do%djZaedyUG8YT|8m- zMEFfe^-*0a4x|d!0ljYjf*ZcUEVlM&Tx}MA6PPNp9$5Q-AOPRdLLc4?lmaAT< z4nNZPbX>lj&F#5K`EHgk^55-l1Vq}a@!TAw?sekP;IBffhkZEevsDI~N_9!>%VqVx%yrIL@YyBKg$cplZIDr7MzMMN0qI*tQ7(`ph?RE^;U~l;$Q-USED>KCRgB?Y!q6;SkkO>8w|59CZMItRW$p1^VD<}tds5eErni> zX!A2h7fC@a++%|Q_hFHGfShtQCyfe;y22qf;(z1kNr82dsEU)wr{FvN)JE zCg`O!vRH_2TSCQcR5VlUE4jF<7$f~27g-8hzwi{nQLYjbR=+N`VgNkflP7-YxLlRx zqN>UT^;?;UB89vdwULvX{0K#e&S%TUfNV#@xNF^Mi0UjWo3^JGD_p)+ivSxF z5Z^5O{qxvnhniKK z=B=V@Z-W}}{w0&syT^XYRcE&*$yXD&(`H-Vvy^zWG8-jz0VeD)Ct@)8r&2@v4{MnKmcS^U-d!Hr|q>k{1-`MT7l1;d-(eY+S8#y zC*IlRGyg+|6$lJr=tQ>JE1lY2ewymfNMO^c{Q;GBJvC5qbOQvK)G8Ws= zQC2Wz(jEo{fjktikSN~vX705AE|IAjD)Y&SV_W3SJ1aNaiPh)AksnS@Je>EZ@9keH zp(wz;l|7y-Y+CyGEmTWAfEn(&b&{Vm|7aNeBlX%YpV(dvaC0BcnwmX#8$xtAKmTiJ z2)Mf26h?VH4zKKNh-I8+>Av?oyp0VYEMME4ubGdH+48*w?bng5cNA3lY#8U6t;DAiL9@VJ^Qgx1kztx;41ZuwKgX8(7u zZYZcD)C@%ca`+JZ{`|nm{u!=ha#ZCRJMWY$8CPLa9cHU@$$bcNg2PZO4pce8NY~v? z<6|_)=Akqo;NGa5SLe|3X<5>2Z_&t1@j9}BubJwnof_Amk)2SRWnceOS1otJTJ?>) zX4PgC#$8=*%C+HVf-OAYq%uRo#LguacD92>ovl!WK3yq~M-W53t8$cK-M6Qr##-iY zys({rc!ELJ1dNChZwYH!QRC&uuK>hKLNgUTm)LXj93D0L9PK>QeG4{r^PWxOxcy?a z#Yu2`RZt1pN73PY#XxzaFL17doG#e_MU@3}!H2yAf4M-T^lMKC@`;6KnNxns?mlGw zV&T=JHWan!*gSqCXZP-AX>(ntlAA&wp~D=$cJgfxvkiSJHh5&@Pr_Lip_c(&K`zWWxK8+-Tr7FShdm+S$4WBu9Lt^_83 z_aMd1tZVM^dM#Fh?loq}e>wu(_Ku(5h(4+>0bg&f9op5H^;s1{BiCDZxI7-tb2<)x z4ZC1=e1Z>@Ziq~-c|YKjoJn$$elX)8PF`YtF&EKJng${f2;k&liw*;Da4qOspGe^W z>fL|YZ3!hEdg8ML6b^N9qOd>w8?_>vRKTSv)q zAof3Hto5^1g4Is=4-Z{>3e-nOQe+Vw~gp*wy< z|B<~Nj^vqXW@CR{zYgGTlh@{wOcdRDeYgFcY`^00D_Duw?ZR_^oKe1>xf?9t<6jrM zdAkncV=Yn_y0R`Z_0D(Rsc+S$!bxTozE}UV%ZmWraOXz@_&b|*cK_V9Gd_BI1F85? zXSdE`v)Sy-_$gv|d<{*=?M>Wlqr5?NC}AQ}8tF?|EUYV(K?09m+HU468MI?h90Lyx zgjyOXm)_RVUndJ6m-=nQT3)VfTWHsNNuMs4I((X!G8|qlbX;E%pQAeYPi2knNlrKK zUK{i<}YuGOM zw~q6+(~9)if#r;&?Au*r0P@+2;^LE6$J;of=jkRHQTGdIX&uPI2QB40nDH-0;XVy2 zL~`G;1+(a`y+e|B3$RIeDo}GzDkUY-a3ypUPThUVO22K;CC(or(D^;R~?4L zegDB8{t3F8JlV6e4<}9vvGQCd6*bS)x}J8;E`Ze;mmdPFP8p-mi7Fu^c{RRgg;%2> zAr!a0T!ozU(v7>$2HgO^i;}3rB|p~F(tx+D!#h-SYLXo%NQWpmq*%oj;JKH>ElSes z71maPcYXEVMF<<{6-i@#tB^78)teB%Z?547c0~kq+&!)gXDqB5OBHmLNQn2<3Blbl zb~lf|Ww+NjJN??O5jG$=L7L>JV*uehbkD;86ke`{b1=1+BX=>Df{@hPl|N)eYGI+QFs6sLF&tU+9wfp8uMdaS>);^6yKK_BN7Efd#O{ zW-|+VgxVdqvfJV_8DKq6oKL}LoWNyYnyh4bPI}q6NOe4qE*8PuLyBeKekDR{JjWVn%#Z^NU*=)=XIXO#yWeUaq77H` zb>5J_>`5v8k3^gnq?=;AqVsVl71;SAu)^=g28a_axHc4lR(8_9>{ciAyC=&HiB6+l z?t!Gj0%V{{vAt#S1I&j`A?{ouZUa5n6&$-`FLv8weOd#@QSn#A?)JXdS0d6=Srr0q zAr+WFXd%e>lL8T$@X^<3^&csjhxlgh2wf7`yOf2EoM9o|Wb{lUz7HO`9&%aV=J<0E^jmr^X79&B!Tr|8OLC9^{d+G-E+VT{ATSlXq>n zq!^Cwb`2uX%IWvV?0#C@?bUhPG@C4t<{fp=SUY*!ZVEu=m~W=~&@%zPUP6JVxCvG9 zpY=z~W6Zhat(JMI`^ZU!;7LnC95pN%@G84kw<&;~?Y>53HaRl4Fo>U%hbue2t8$>A z>i_ompy#3cR%y7OV~sM4{3SS)?|-CA$j{IhS35Htz+{_YMPV6_iK6yQY*R!%LS> zDA}dTh5j|Vg1(Q9mj|MZ%?B(6qmj`uL#Uj^1lLHyoI3~^W&Fb_iu?C;OnRFB?!yZ? zzYQRK+`ei5`C~rN9C|{Bn+5f`BM_<_BL7D@kkcQ~+kq8Xmmk_jRh+A@<#arDsBmgi~ zuKs<0WIx>t-bz|$mfer#ty0(^;qCO9Wn%jLL2@^9o(6{ z%EkR*uOYyP6&8>haIO0Mb1*Rx;ZZ*~%q{9ZK?Z0d^0w9X{93FtIx(Kb;s1bb@F1I( zve_Cd*WXvz?eh%{fUnmw?>_2vt5QO=kNfmEzDxTcb^NC$rsaiw@~fA;)9jS}eL;DJ zgRc4PrgYe9uX!$q9(-U$Cuh4pYWs5P zauN;uH~;=Uh6}k}*IRi@20{;oRYyFj(2;nseCpk-##nFP0cwxT>w>$I4S)u(FQLOh zf{0Z+(#xZ~sjRinH?y8h*29Pw5QVY_8)0zI>h|E__-th99z(bH>1F@bhf& zo1hLO6Ts7CzwICW;pAM5uw9A!Gns>9Re(o)o!Pp5Lv_89=WI4pDS4torttS{w;faP zpyWn`yR7O5XzA6HfsLyD#iHfiWU}{j^`)Guef9kuLR4kr^ONYIP>+_3QeDRm_xl?a z@C4b}SC8sVlLa*nBzAM-(GFza$q{zd*rf@I{4!sc{fwl30jO=Tod9FSRs!>((cRjCk4&HV{lK2%5Zzdq`c?LI{zP!$S&?`IUXM_7>N-E*{xxI$ zbd-;bx*DVjnmZ4mrH=)#&@6lZS?ZE`B84>7U>y2AK-z2UywALrZ49WNlXhc0EfB{C z+&)u<7-ln=yp_oX$hy#%OKlr^N}X-EW3}kMwM=7Pwyu4%@@DCV*p%|N zJLoi5%D+IGE&37N$@b7HHkxRu3qFQB==uj74PEA%wBMo99s?&c3t4#`KAY$sRb&UB z`(4m|1|M&X)%VcXu6LGTYg(Rl_aZM z;D6VS7kEGVY|g`@HgrXuCZwlB#iHU?K0E!&M@vtgmK5@YV)8y|Jvps*Sp6D=6EJ2E zdJyS07@3s5HiKo`ZXb&~%bITQNUB*rCHCMs90>s{cR8fj6EA|gP9O-hUFIj=-)iR% zdD9`Hd}iTHZil;F4w>KudI7LX`GXqB2iT>yB$ML`Xn_1#IU)yy06wg~W14&o1Mx-t zGn@z<(mc=z|EgGxlX0t%rK=B{Jz0YUB+SCWU+5dL`C`*V>0V zQec<7ZznXS_qOoGDEHo*1?)8a;6%CYTAs!W0ucnxlE@WQaiV-3!ElTEiXfZ4ZE~wH zY_iPDQnHGps@6C%`pR7I>Jx1H2a~#kOi$yh&v#O|!1~!A%dcZ71Yy z%%>fW{d)wwwl{aS2V-uO?5l$>RYqR5E3p|7c&*2U&h%~Y;hn-{2*_$`UrpY4xSX^x zh`2W*S0c>M*0mTt>?%@1XM7$X?D5gg&GvB3YDd^_mDo7LTGzNZ=9`Q*C$(Fx*8S<3 zXP&epM!(u@dkz84R#fQ=KT;YAmu37+M~xsL|A;(T>jNx4>x!Z650`Ejs)OowrT|}> zpLRwZOV4!(lK+M%knKGT`y=UImfVo`4sNq&0zGT>VW@bQ zF`&sAM@c)*dpH1g7$$K6zhA^Dus}^Q$B$4mBP8mJKd>h*F~$>NPiY|9vu%nA;13{! zp_4FX9QX!}8E=~aN?>?ku5s|3#Zj28IPdK>X+p3>hsmwERO!v~-HtdxRG5Jc0AfT# zlEC`>3MBZWuu`m^Pk@d5>fs|LQ)wlI|11P7XPl-qSy-GrGEthqTbOwmPkfQrx@tf) z1)C!(Ko=He5;0vviXab=jU|f28}U*CP?Vx)c}+y!at6%Bf>Bjaz2B_>DKK;dClOKl z86i0TL6MhYPPL!hG~v3gE#O!3cbClI4q6M)eNxg7L+`$s#jrFgCZnAN+3c z|KtLok|h3zfD%?MljbaaP~(?#0I%o-!W98=A`0AK|M*Eow2Kvs4z)5Zd;MYBS;HHmK~K-dck8zd7ou zHpGIlkw?=M%@&Kzfd>!=Ymq})A{+KZ@SDIeS<}$Z%GO50<6ClQV~pUqPYxUs5~?r7 zPEasLtv>JFS)xq0@4sw$2s{b1BDuGEmQ6b0WN-6;PHXtk{McB zxM$l~ULK%xtSG-4a4fNLf?2&>Eu5o(Rxxur0mfjqtZO%oTp;ZLm#IjgMY%_ zu>?1(jBLfGE%db(v5S zJ(;JSUa3=+wJ5v%-DK#xJr?U>tE*?BDlk?fiL*d=^BYR@MN_s=Lh;-w1N&-@;VD-O ze70=^)>@ zs~hKYAN{3_qb!3N>Y6R*m=4g=ka294cxAqKS7=4?Z{5 z<$b*6eo;-P;F-szfDRWLLQSpjV43W|ZAPS2*P8M3)~NT_cT2${fFBm<4;3harP#Nl zH$rcAQQM;d4_Tm6WEQIi+HWX^BnUwIhlj2ikrhdNP?9q+mIj@G^fN+!AszhDH6sZd zth86AL4-mjrCq#~&3bB+fk@<_dPl6>#*BjH zVfI2}2}(y9+p<#$Wxkz%39zmx(~{vMB}r2YK$lKDYrk<4`{%Ai7erT(w6X^iUWB@A zFH~g3ee8E2{D+M)MgsFC104?5A`IP042y@KZQhMCOdJM6o@ccunGBDx_tTvI{hw`k zwl&YyAI48F!nBI{-!2kSrV?~V5_G|$O6lLw-3wZx=+aW z`+8CFQ%?4sIDeRUm&=IV1eMl-Q6L<-5r9vJ6zn|-Q5Z97TkloI~R9n zZ~m>V+J|{Lbo>S#=>{)C-XTM9yK1LUD4nkf6|*n z;)Fv)pf26IYczqJu9yn`2bK6X{F4qir;lpqq0jb_q%^ny?1WHwKVK@N`re|=L^$>0 z$WSxGx|bH3X<+?F`?LqDEZo9D8=$UKhUQ#PFQua}W)hK(OD-khC7?~BGp_*x;} zdLtV#pNI<8QXTx^G1RYoev&gz=677z{))Nx2IPHlIWMq+tGkTme=FfsnT(PM1U=JVz>w{4VeR9_|hQo5|&DC)jv^a4Mbb zHm?f#-yCo_$CQEs!pO+d9WT{rFup8P4W|e)o!ULD(Qb4?n#MJ@lfR~P??`ij=`%x0md{Xgz^8yC?GTag{EZEXmGzP5H;+vW zAkC89r^&@5g{D9&hVH}b$ve_i>81`#ly$fDAD$X~C$s$SRY$coD-Thpk2xgNtT?q+ z-wl?HUUTS4gj2lxsJ*Rmf~A4g=46y*b?u_St$e@h7+vkH`wi`?j_b1KhNoN@ zN=lgBzm?R6viRZPWZVUHeYU<~7HE`_T`hAYCo1%J`#ZV{wR^9xO1%!ba!;gnZ6m~e zfz$$xK}E*h6a#yR55bK=<@sp{4-#+P|6)>qAs!EKfyL^$%qJLAGeo>oLk6bdFSJ7- za_%Ney>61+uki&p-}AMIHoNc?U3{v6KH^R~%ERZYSCc&*yZ$0ho&;yB;pbmT)*(HJ z+jRnc3)l{@oa3bH>Eq4Wey~(Nb`fFZe)ccPMlgNxif?XUjLV`+8i=5K8Dj{!MuMtq zO4fq?%sf{2d@iV|J2`=C+rU9k!Ho{4i~`Jne)FdqZrLfHc_tpmfQcfQRtz1wrTAhx z9QK(8q6ae}V0;NevAmHX>v}oLOXanEHSwU`Z&@&9s{ih(+ut7vJav?TqM=5!P?*kp zs9&UsDp2A9&unD1HU5VSnt?k-&Z}SPh&vadtY52xiii+gtd(|kBmdE=YE)S+sEI>f z|Mc?#j;cW@+sS{fRvN%l#98LhYl>Iavl9Uyj};d`e*Uw@SBK|;c!8I(eEGiOJSI79~^&V+_#4L$Qfo81jkNG z?qg+S=@!3$e|aG}K9wp-Vg0wne>hQCG|_(2VgG~f)nuXJwu-wgidtB-TiY`s{s3{A zqgghxsef(fuU4eA6Jh8-P9zz`*;VBt(DhK*xV@cV^?blKR?9zivn}iFSE)dD)``Zl z5E77d!neA&lDc^!b#3phs7PydsY1g&@%ZxZ`}wq8U6)s<-sU<^^f?RuK_+sh5v3}7 z^4}bcHgi#dV&Jv#JZR6p-_;Dw$a0U=ty<~ei|M)lM5fa_FTLnGKWiSEIhbm8BKBqQ zS)RrYyX8~;hj*D(vl4Hb&L|MOl8P832AL?b$XhJfL`v&;6Isf+V-$V)#WQ6`&btNT z@6x7HtKV%LFNx~u+bFx<-4D}xeLl312|K_2!w4j^YvVC@JaR3|C0E!91s#q=I4vXD z)a$X-7Jt$T$i++WZiRZdE+2Q}PS1PYHE_Uff_@^OZA>U_xVS%?)6FdmegbHFlx_23 zIsXF?qVZJ6s|}lUZS%G8_YIW65bKfYNeqg^%MBN!EFnZN@#Cno?o_m_YLX1MA14hYI%@=v{j^W>pw9vHVQp>@>h` z8#RN1?;l|(k3yFdw%?8cs0d8%%f^!dQv#bG%1JXbZit>9ZF@L4tnHBC&6?Scm_5IW zbR@`i(w3#$7~~27FOB?Na`ghsV}z z@{ck}6!tbsbXlHi%tdrQGuMF`A>0Z>bHB>D>R z6Z{!c@WoVTUj@yyVS4pnw20bK{aENo1rCc%g)7ms3!SN?&19@5%@7sM5oNie!R6uX zzEH5x-*a$|x|{pkQ|V`;Cr`u!^=g)=Fa-|d5gTsQ`TOu-?RQuUEY!Trbpc147ptaq zE2=qnU|8U{ay%E!rtlx#=46X!P3EX4Y8`%xJE}t;xsVM~L|;lo{;!76NikC@35Os= znk~`FTAiDZx*X#J&uxUN&9N^>!r%B)GVI~RrHl}KovnRWB=@gI4K)d8Wj^2y?rf5^Q7l<&R>@Ss|415nYi z*jdljNU=#dPs8a;iZJgU2V&r%Jm2OejemoSGgDq?av9W_`tK{uqABXp_$NtP()LL5 zqSHk!8>y5^a-mjkS=X|Ai@v*0hvJABmug>~@W<^^qE6Jp=pJkqunwYJ)ACKF$Fom0 z&}0`a(%vGCuj;>q9lRPYE{8Lzg&|=^&Zmkml74q@S*1Bq_dJxP*!C`UkFQJG7vlu=hFwZ8T}=hf zDIR@$pg!Bhu8ND#iOviAiJ2_F?3f3 zt5qvQscHXeb95}a?nmFwyaOd2g%DE5#m7HVGH7VTZ#pGx^Ph7{37oNxO*65Q0M^tBs#YLzctWP|SEdgB-;|F24{UCi6lwa+SkxQKVx-idfLpC0RwW~$8biCTM! zbx2)-ae{|;@8S1d9VI#u?CZYgMQa{SfqC5;_Z4sFk%xfwF{M;;x$!ne?q0r4JIiIr z_&j2dfE5l_gUGkF)K6$%ziLGSQ+spX(zS z*mVHE_5F;se&^Cqyal4uzQ9wc!}HCkRsMw(_~2^H{)Y@qu{w^hPq=T%%=(u;vfX59 zbsWXvgQYXXynzQ)gVuzdMp{a0#oDU`xjZU5D;Vvc06|Q9Jj{iOV9)~yNW5Y{OM2Oy zhX`YkZKY&qv-T(JB_iv49X~b+2H)^meG1$i2w%L_D&9nuP|e9G@ggg9Kt{vUU5AC( zSXNv!X}AVa`0y!jrJBKyKrp)7Z#!?F$fqgdQ!AzCJM)T6T_C+q4YzZDH|9ka^B0lS z_vfA(ZStMP&$?z8@a6s7)evW3Ab$#| zrO-RkezBnSe)XAdY0)DvHqNRZrgBlGQQMyTp{!gp53(^lu_}`Zo=Pc3I{Ac)3L>}W z5G^N#&*r>NgkH|88uX+)W<2B=26|}h*kyyc=Wojf>8Qy-wqnKF!ZS@`EYY4v5qkgs;>K$C1UR&o0n9*YTO+8rO@0Z?Lr(KvlnXv3$dPcV!p<(ntX2f^Cys7 zEsdJA3~o*=h0ZBG>Ql6p!k0=_>0iS8eD!j&ms$EwQ=S)9JsL)s+!X5T-2svI7@QOu zRaG(_^JYh1av#Wv^(7&aR^zNQ^i_kKEQIRQcvLn+PnZtn4f-tLhTro6z*xTLQY^1i zCOWqj^W?L=1iIC^vgCt1;c3>eVsi4)(UzwTPszOrj`>iw@9lJ`!iwmCji#cax4tTK z+Z75q7+GG0{NM77IdTaa8f~{vPR9<$h*W79;G=*c<_z4bTiu;B2B0P1Y1RyFp2eUq z9N%fa>5zLSWmu)1>UKlWCL|Z(m7h);uP>Y_$iBKGZrjzPMX_I+H7JCM(#(q+1)M*8 zeAj`i`CTa`tf>112H~iZXMCT#Jov5@_i1wPtCzXvD~x-^7oqfpZj9#@J9H@DQpU?Q zzh-A&=fO8cW_ZRQKO!Z>S$|}>Ws}s1>1P^FowLYKHjw#jlnri*4BtM$Y15hOdyZ)W zJwe~9=FQ~)nBao!$sltlI5~G9oiYr-iBLO*pEkU;!n)p?n0IWTzX+oYVNHNKN%~Ay z^?9y-&@*&v>ra0#+0*t*tRyKt#ZpIc28w+hR9>=jPcDwC&y=-s>J|+9agvmr%wbhk zrS>GvG8*{kB|oYKXVNy@K7Hjro%VCm#Xaf|e{Io9qE*p$*r`OZWFg z%uLA*H0(IFXr{`}Wx(b+OI`_|DVv&Up2v5&`GCpJ_o#HK2~_m88>EzYV%Bp&kFohG ztcS?0ufa&%qK@n@ETyyoX|6i%a1;;&7`Y(X?n`<+b9C$uR@HwzFQN_MAI9ob4Maj- z{SutLuB@!I4A8x}6B zyvQ)o)o_qS+BzB*N(t37l3eaOr6erb@5MjS{Sc*F)HMJ$Jw^jeo9=m^+;r|?*^xkV z1tPUHOjwNgB-Db0+3SU3sg^Zt+Wa|%K#Aeh>3*H+43>!S=&A09jnAhQYL*V$!mFX& zPcc6;JqxEEkbQn_lSIiLuDVQqJ%C_92FZpQhE3^~n0Xl$laTgdLzyB4i)U*jU5sM@ zAX91gzUtcy!mOUR}5H8vo;#=Kne=1?3 zGlwsoxq24MefVEwxk_vMbW(F=35l_)(6Ix%y4l@%rARV!k`eK+r>g=<@J$W+p%p@y zM-pfNTXE~Qpc*w>RRNo&Dl6+~LQ^E99B@HZ>0fwL_-u90*l>?%`(E z3q{q$PBYKk+p9q0bXcu8%eH}@T7lm`UrM*hw3I5-IR?s~+Jcjs8j+_swJi=pWtR-! zKv;~G@+e>aXZb5sI8UQ4iOX?96$@MMMI z0NCPE?JLbr$E)|S1OV13ZjWek`o$z-l`JcE4!u~CexOXx@my~XQutUz3`e@5km`zR zpVX=aCu)v_lj`6n#L(t^AJc{F;c%esktL|P6g+N2$2bjB53`)-3}JJsdNeZ~HTD9Y z56>)dcRqG%YPKpnYCerY=2&>Xf)ww#$;2QMfXIqGvHt%rkjCUh?b|A*8QKSNpEiXZ zO;f|VUXo?Pov3@ps0c~uQ~4v?TNCjeq-Rmum^3}bLrfx!{@@`u1y22wyyMwC<_i4v zunmt$c+(n(3En_xF~6zw0-65Cu$xuZ`g*hfxW zS1%Isyp4CHsR@`-(`SOfR>_H@lV_p(>i|g$RY;AFlG~ zfbHoNsSSmuN|ay?k$!zHl#<)!tSn=EBr$n#Yay?8F_WcCw7O0tN=37(#y1GVZ{X5Fv8y{JepP>mhrYr`4&*5i5Hg=%B5 z3B2gEB_|eoF(Tr*>}x%cqM`ddh(S@SWZVy50{|&PB>gAf8`lcljf?5D`X6Mx^1s6e z7n?!ZvZcExTW9XeGw-a9Jvt)Cee))2(LvUNIIoXtcEDGnOG!6o6Rk*$ogS<^B}<;< zt20Ci2#5pnl7FWi;-5A8`&U7Z3SzpehUZ>o$dsH^%qzRN+GFTJ?Uf}mq?oVy_+DKy z_ohB2D}nzGcw=n3`l#;A2~uZ|uZH+dbvOI}qFkDPVI??`S`C7*G;4(s_xHs2Z*n*? z$5L?5xf}yg0Fe+B*=Eafywi1??i9>=o-)XMPlZ@s`<0Y(ptYN4apUjv+?4~zG~`5Ilr$r>XB<*IXq`4Mk3)E z%M(C@eLSETpSib)uk99CbPg&XPg5S2&TOC#hx*lC`mQCXD)ldu%bh&(k1v~I9bn%b zi3c2suxLR;gC($eL$g@N0X~a*2x0J)nGW1hbkb)J+C`oOi`Yo~Z_T7alOZgJ_brLm zSR~GQxfFx*0^eOC*5yn4jFuOF*_u;A-2FqhSY1e6c3^Dw>HTI=mdlFe{i zq2vU|fQ$VU5$zHt#6eb>cFxN38^g#qYU@%E81rjUcAsOX@oJPVY8$rjzi7RRT{u^a=V%Ou?jhPYqmY zE}4Nt2k|SptR_Z;P}h6gH(fAgRcaO~wjmOWR7aZ{^PNARsL_dXU`u4`Sgdfo)-FxW z_z7@)cD4qa-cZm-0n&^Aortz`(l+-l(rg|mEWpwGxeN{XY|eIhJF8jRnx;7kk3-MQ z+_m5NVk4lY^7qG&!i0S7uSTa0+Ekw@1)0bS(S@VA5&puCl$B^URn)L+f7P>Uo0&Bh zp4IvZ&5;9CMdp8R!CLCfFu@=*dR#8T!sMg-+nXJ2Y5 z0*CVk4iZVWw~OcbEn7t8V9{e4Dvm&Itp^#jv9?` zzh=T2x|T?26ab#)!e!yO%Ky#a?yi%?PlxDsh|l&qr)04e^tHi`Gt=oi1K6Q$Sl?-? z*OsU`DPfVRhu2h@6zvwGz^r*@X8x;2RfTdskH|7o6nvSW@R*%zI)T{KcrWxR?aAMH zO!p2~!9=2`faiDv7l#$>?2NZwbvxDjn1PhzFAF+3!EUTZWzP31B=qTkpQL)|=q^kY zH29jK5Op*5C;1MU0s5$55y<0GYOAc~2oRrjKCb6NWtTa%wmc}Rl5s0?$hrQz6H$Ot zWQnw(XXPbR6Z2{LEh0tCNz|}DzE=orc(-gpnx19zC925|i|=2(_BroHO?b6LtzA!x z$-FL`(kN5;<-A#WOV27UPBDHuZvz2&0GX~E4NI?2(0tzz&Rb0zMMB-=>Bxx4pbqhH zaBSkz(&&q2GW0Pq_KJ98paY2S-(Ltx?5I`e?|iy7>R_KNU(q0LJ3~Hq3z#h-=*) zvmgN!nezS9md|6>tK}-oLp|pes=&}z#}aHcZF||JZM$1_d(gt!%FR^wY2<)GR$N#< zW#~XYEmj0I9i7Z*7m(+!u1;rgKgDNa6S%7XJ4j9C?6ly(KC@zYN)I)Q4YcArtHEgn ztg+n!Cv3a8G&MRMAIHI?7h|($NDUgmSXx;8!o-A~o5&Do!Y?g3U|}&pF5%8d@sY zc*tXr9#P6&?i-l4<*Yf!0X+qG3^K;9S|mP34={~f-!{)vaCIA*us*k84(`Vs>dd$! zAyQpB40t$;D5W_tu8l$vEpB5X))#Az4dUD0(!V5?KipbRcqU2><=`eL?o_QbYX1Bk z9#RGOvM{bCyxgQ+TVfqkmuH^PBp?s&|0a+SYiCKIv6rczmE@zqD)K-kvs4kGOldn; z*)ace6qA^2%n?J&kwrGbWOYcZqMX1f+EKbucB-BKmrZi|rR-fo@!?t2v;&zzBU5`k zx#OwQL_&Qxh66QMA|B`PKM&)y*`l+PIaN_BD)Y6K(&0ozRGR0)(-V%tWad>dsy0F| zFa`yS@dU{re}otBHG=Y3)YI)yAF_>x82U6VTPpf-I;$96CX3ME7gu9x^z zu6f(|k4P_gT8v(@Ogwl3Ubq$g`~@E9|dcpng{z2w9n2KzL6wPZ4XkokhE; zPq*XS+)ym{QtuWTo0}b&yOl`ZgsY22DYpbIS{VDijk>ATrpB|&00f;&(=W`{^Utp? zl)E^ewDPPxy<>XZ_4GrYy`Dr+l&~w8*w)7zqR^{qJ-XTs6b?@#i)shWl6F)(;bky$ zSouvq3a{LGOv`DVCYf}~JyAs5@ zyZaBCk{I=usglc`^Zdp;!-k^oxJ*0(?>ifyw6ao#8}hciToW2F7{kD2iGZ&6}T{2JNdA-Oire5;IPKSL9A%WK0GiM7hUP0}dw8=YScpUj}V9OQHyE zBcJpza~MQQEjps|^74vqn)665I`Z+bkjw0BT9J z?3v|N^>8rnvy2->WQ?ZiyJ|lGPnMOKw|uR8G^)W$$UFJ%%i-`({xD4a_G~gpW0CVx(@-9wbD= zUJBJkoN6?2mt~{60{#Uiz@0xY``QQr^zGwz6B(w+i-Z`$;%Ksmx@-)#<3opVL4U?s zcR4=s5ttsv*xA@LK?CmYkVl)WR~z~)z7zUNB+wrve{|WWvU|8e{}t@cDfk=o^XGz| zoCaFE@u1aBVJ6szZYL=vX=QD*_4#xyccalf$^=QDb|JVlC#VX0tf^$=yPARQV`78w z_5vQWnW%ck7je!nGEx~!rYoVbke;uei7~hf=C%vf3wjm0#-5!fNfU`Mq@e;9$P!oFVydzRB8Z zH4NANGw;22!o(*RyG(4|F8I>95@X{8RcPirI`XOq{%SSbc$)4C+t{cP)w*4UO@qbR zkuV(Z&3JuvL&G8-i|J&vOgiiO@EA>)8 zTqUoA%`$NqmXIB)yOihM ze2g`?5V-rmcv=E?K#ae?7pQKG9-&I}uABrdtgfj^waew~+sjI$f-{^K9`PkxuOu!xGq`hBU>3q5-H8&oRg98y$kbd zH!-;7PnZMs&y92-G1(@osZ`0P>d}M{bMPMA*St+F(fz7LL}ZAbl+Ll{R*6ZJFHA&| zJM-zUZMP0t0h&=q4b_`Tr@j7W`?=##0n`cEiM#3iDz;N}HHpUnzrfWklpMt!hEn_m zEB6I+D`%jm7>|epPFoozbBTMd(PJ;p&P6x-bb6-Vt=3qtW2x?;IdZ+dwbm}L!sF6X z4DL80kz7e^DeY36_hD_Q$>-xm2^W=+N5`pM=fZ(&k8M#Kb;h|$%=GWm&EX)qY^IU- z^@u3&;e6dfMJ0*4D9~7g(@wv}WvfTm`tA9%)nSg03?ql@pD!^cMdq?N5sgBj+bbM` zP>k9j(dc9{_n!-G&lVe~$37+3+G1@0-(oX^XUUL*)Eo%ksqE>wJP2md_aCBx{po$Xj(n9ciMT3GNM0ICnh;LM$>|$7a>=8 zD*c7T7k2MP;&90Yq$(VIU$6!VeeBUMTS@&+##(!1a$qfP+LPbVdT=a#=NTZV@xOwv zp7jj&KOW-m2)TFUMKJa3+K-M)$E31XE%CnHqUX2S$fcW{U$qRFm(WGgYB;n-{*YGH z(WyvGI#X~xT`K2bo2LPL`$iENUe|%^&aMq79w)0$A>WIBaN>1i)|glSN*Devq|+jr z^T^v?*4V#OM$j6aJ=Cl;Pljp~6-PAYdVAWCX6z_cQa<)9j?05udie7^JBwCol{(S) zi;2xV@hq!ax7<&2Rrp|)jUu>2(UBwea0zt5JT_0Q#( z6}nl5$kxV3tDK2ifL7}VA2MK)N}V;=iAwLq)zEMj##!QgCiTxwt#i+9eF{xZ;}~g4 zxVC2=8<}-9nCQ7-I5z?p+_D(CT)E}|X!5G}P9aoG0L z!UUAR%~s#8U&S>={rLM5JkGiU#iW0b&IFsPi7zhFF1Vlp1$LAa} zesExC>YJUF)wZvpz{y%gLn$!R4x8zi>3%Sfm&L`Ff=(hn3dHnm6pa5 zVjk@p1&JZ=%Rk!CZ*Zz-Z2X#5$4oY6lj4q&GS})KES{PKyK7E4J5%3pDrIsHCqFfw zV+EX%FXL_ZDR@>KP-PQwl?<|feQg>0esyS?rjh7buyWO-Jrgoc{7!1kbd= zwVNykDN3^m+AQB_zVYFuXOjsYXFpJ$?XPffc-gSq zJ>Tv8VnwDJtgA0UwZ#E)H~bfnz@~A?)CaH8Em*>LBd&@0Q1JS2GoA1wM`COG#TP`q zl2QXP`NEDm>&KG<`IXP{79(m)R_WuZNGW1J>iBYC3O3oOg$WKrKT|9tuLa%EsYZp=fr8C#*(JPKd0H*Dbp7bW~Kptd{GV zd~)1&kWmFD|L%6_rj|x0FVSM|sLwy}WKXP8@HA$aMyOikD5pIgEo?vaEawRO8I9LF zMEc_xMq;G6c7s{13ji>2e&J9f2{>rmy(Ix^(RBY+ZMz9NeUAE0{K z(df@6xaoE$2Pv4F67Jhfj7nWy417{Wl*g;`B6Rt!kqOlkDXBlMtAE3}WoC7;I=XEq z%W-;dWGm!n*Ks+^PfYrwZ`_2fqT(ige+)6md^VpOBZx-rpd6w{A5}vGDnX^fu*J01?xbc8REATzjm;Gsbtnq1+trAD}xcAz^A;b~j;YrcH5!KHoOwkn=<`!Gj%8Y~xp7b!|?^U8f%sk>G5-qX&j0Twr!b>Ng_f4-YiI%q6blc)Wg+ z_7&@nxg?s?YF)DOvgD#v3OtU6NHk2yza{pXUjPJ7wLj%14otBooy#URYj|h6c?!J-OTjMv;;KOdrz@O;?_UG4|mwrr|@IYdbN(c4S?4+dD;XDyG zr;qn=n3{T(Y!-@EvE3#R$lB@d#QDS-#BRQ`vs1XWg-S(9sT@x#YGGkJx~ERY4{LP>&2x0Mrn5 zfW4+G|F0Iln;}%26OBE}0s%}?-*_(rA&7z04lK+@cM%M2;H>f_R_n3r>lMUHGAZ5z zT${^ufc~kv$aWlwcA+C@Nw&fUpC_e}h6E3`nY`rXjMVNLp;v6h`}G*_d>2sV4|r6q z8T$(|`FPj4ZvWXPkc9V8T#CkyJ4hnM!Ng1wmX(dBrl2TUcND3ZuZ@fxsfI_Nw0Blj zbAOt4k;N8&XS*lN{A9N+m8C^W!l1S zt!cu!8wpT80yJnsaI7cp@O`{~+KeM%S5!Bn*x$GLhEZrZJxxxY~=xAYmOHzN)G!3jf^T5u+rTVj?Pj{&@;G&Fg>w&263`kpWES6_ZTlKC zObQR_ljNzJBN8{RzN7FbZU`c9rP3Apt@e7qjvxAikXv#YeuN3Wa;EGIj=lUJAgn;D zoCALJ=8=)Qle1BuIHsA8NPa*e_0;5`z@vT9yj4nzqz~6F8%@o`xendMX6r`H z{m4jtjW5$tRNvs!KQ4UuIyb(9oEB6;Y?WiA5=U{$F(uKOqw0LnXl|j1A$`XxkUw%i zfKZpStUWZ4mgF=(bP~hR=eOuS*+sA@YzOjF7tSm^TV*9{LLQyW7iT{2Bn$6PQ|al0 zAxT3b+`wC_71EZ$$T-&H5lC=Wev`*qM($}?oE(g>G+@{M zY&c+e2NEE1)`M#cS-f&@OpMv1l|z%qXzlKRv}Ji@B+a$b&i*V`V`_9Dor3~kx53bk z;a{PhlncznBRkJjBqA3@iA6yVVfp))v6*My^GLqie&694An_~33LuF*Q7n2!krj3U%LT z0)P{42hgS>Ycs;O{F2nunpM%RJ_xJ#4``?V9fFdSJ`=5?ipGB#+IK8MO}$as_U5AG zd-!EL)56HTU^w-250b0i>K_G@qYif+rq1(b;kK)#wZpeek-Li{ zA6jmn!Ua#t9=wr~Xs`@xAMa_d_cdnmGwcOg%cxP&7Ruyv)5+YkOe-En;!#Bah{gn6 z*rx&}w{Pioc{MZ)c`MXDtCt`TeI}SPR2|IT-?#y69~!bd6fTHV%hZl0cAs+7NwDkg zD=Uz!>fP9OYh1!Wf|+NYE<5l_1!yYvFg#wkAv*PNx9BO8@3!OqS4q)m{!fsup$K30 zsN^3$S3FrlC6&9)axy9Dy8ca5d%&ZY-Z8e+<<-(nkDx)1R)~dJplr}G)1WHfv3?Z7 z=a}#~tdhVRQ*!|^nJC)c-#r@p%N6v_RbO9Lvb%@?pPny0jIrbalq~mEbUGnSTc8>h z7l62A{QML@sBQ+`Y(5rMR1Y|hIm6j=+xL0CX`?Z*Z#xq^!0YEvpVE(ALRgzq5;39V zdKH2x0otCMHBSPfN*b4V=8{0i-N?$S2knylR2=JHhQg7rD}2bIi#dldzPvALD_u=R z3~;_n1OcB&O(Db-eKSkDnu>XN?-GmeoR@! zhySX3G|zV(N$R z4g1ehdy*ijPYxQ9S3(Id^H*mkVPVN3ngOzp!p$$dkIWCb)XIkXjs_vmE~;2Fd@2Kfm^|qu zm_kO-g<(hF2T^eVPkQO>VCjvfsi_=MQmCA3 ze#?gkgH-$L!b|&&rkX=XtJXj7CvWA%$$4FFeMIJ-`|QrubZU0bc%;jjV6}*U$W}gq z1V8}Spx|N9HL1l(XXps{H+-F^E5~6j)NAnv0NglLrETH`oFjyL$9Fof5@MJq>;L-BV zlBJ7DhRjZHp*ffvo>iWL>%qfc^@0Cd?MWQmd3R|)-%pZvJ>D@$ssa4466gR;=6 zN(M_h$HaM>5VbJQ?Ko!Ey6}33s?)bbd|I)nE4Q9;>ru8hqoryF*MoHyzhvymkmtk4 z$wo*kCPf#L5@*}R3Z)YI`s7MU4sM@@!~f9!iltJ&AFexzSld*=QW(SIXW-J*6Y`bOg3r#=dE0S8>3Cxk3n~&*3uVs6%BWUt6+?_S2UMZeH+|S2@@q9Xx(Rd_@;B zXxKEb1bjJ)F@dyPfa;coKJP@Zql11=Twhdm4!Q$DKdiMr$2V`f1fhH@M8d-S)MKXH zv4^~Itt$6)YIV|iLapO&VzM~P0#+IuqGRRds>!;p>yM>LG}ff_(GOz4y58)Wu=`-HaiJ8GnMOz0$Li%66i7>_Xl$dUE-b5Bho!n&}6rbP#S+; z#OjU$e=|yOUi~r}ZeIM$U6aAfZjnqef@rk?PFDn2H&e|!d-h;p0dh^NLFt3|#+1Z>X5B%JIGljv3wPS?c8 z&o#wbsW-!3$*Y~fn^pLiC}Z6I-eRLo;Bm}SBXxrIDP_LES6~UB$<&vwQBOU!qv5ag zky@vC7C5_iqx`338>H`=uR$)B0}f0iN3=1jjI51^$>A5QV%F{RdFgKEy5nde3i#A4 z^2r)E87)nxd~dczHMoBo%bdwoJZb@fPRU&GWRHn2+o25#*2oqV5;!L>^R=$X4 z=yYpKH)}6T8jX#Ic)cJXlTnj?J7`{QCSqDofy$lf6ag|ru9Jnm$>zd_Y8_QjZsouA z9PtTu;;1{Y#5&Q~9WVE+8~S}s@Kb|vet!^g)4Ldm#`iaUbrZS5cQvD7w?@-Ofi-s( zcH`AwZALr?CjzU=rs`83>}2-A8yOVV)!B|6j8E6Ex4S3y9mgPLoPDVnQj+nbcpJBx zIF{j!51w}u=I;1gcY?u(Yj~7x8;80T7e}R-sJnV=#m~VmNnpiZ%UlwHv2><03cs6R zyq3zn!82Uw79?Xq*UoC+Aor6p9FMI(cV?@uKMZ_$+z-bKobKA^w>}});yBFH;_0pUHAVr zCjf9Nrj(^)bN8{#F|WV^sLKaaw^;b{R?J37+9mRK#S;#D&nw70E7T$q<;NpB`+g~M zc(%{dnz{#Tn6!}{^fisjy$uEqoea5)!O}UDeRD{OP_CtzXPtsZ#cQNn%$NBs=(o!; zO}98hd4@v}g*qpDi>rKv23YD4lN%M;NuK}jNMPT3-6fGcq#P0wyU~r;==C>dvKuQv zZk_rU-8D_!A6+Z-aDu}Al?cej%2hB_3=}i9hRP1y?wp7rvp(1tRP-Clb#~jQmlWBh z81$X2g0J5)34&_5HFbbmv7}kY2B)=cT}`IBiU*O&l?F+AOscyIP8AaCopwP^6=6XZ z11{*^6gbGV?bX?dTsow^`rO-XQ5JE?^`gUcG|Ea4V0FgT-jx}REMc{{EY2<_MY#r6 zFN+-T)-YT8*4eqm)R7j%leol0*aif&m|T)(VfBeHmYN}9g{exw@0c1=JUhq%q{avo z!M~Cf&J;O^PGF_>tA+C>wdS2fXq*q=_z%e7gSYwXxutDZ<@;z&J@4l$|0Z&OewmLR zDaP^c>yIH8A`?qjvi%RD%lZSmgD11*O^ zN=4(TL|?+A5~gKodGQ{}Xf$)WOL>gH+x#w*|EHmO&^ehv%-^Taj*O+4R7MZZ*3|Lx zQ5zQ*+uZ15)eK^#O+fZEyR0AxUl9k6vma3<*=|M*%0GH;UIb>ET(-fLB~fw`0D?j7 zby@O_;R`OS(-lb4G-hd9F6i~xbFx-i1B^I;wfKUOXbZVA003*+hqg-vpX>|j5>Q3i zg#Rx)l#a|vG^|od>OreyX8W8*6CrC9Waow!QDXZ;c~m(zl{U`;=whq%TgN5;!I8_L zXLBJ8Ncc!G7nKMS`1*zDk(3Xs;KpMR3nirQD#UMou9E(3^CS7w*+%Ew<@Ffa&JN@r z*61-gSl^aBx3ztatb6?hJ>|UdkjQPwgW+z{m@jkIbe~GC4BTFL?hSh!H{iFcp?)`BO*RJv|LAkaA58WvT!G0L zU%&TlH+JqGe@7#dONsFTSt5F5fKlS?jFGcATtWATY-ek$*MdAs$%l}BeW!A#_3G1P ztK$bYucr$#@K&M6VEY%t8*+(bQB(PeaXqPwEAzb;)nESiB*&9w9j+0e#0(F)kFk*E zK6k~9xa8@exp0fB#1$oKIIhyy790}&+(;(KK}u}#0N7Mvlg{Sd1(>PU32?nwirx5= zuzubjg&qsodfxe{@<{C2p!d!Ll68eux%9k)G5n|dq;HboYwnqgHg;wtHm&K96M6LO zc?+xjWTrkuf}fs`#~!cZAO9d$Z-Gs++3SZk?(YnG)ef{8`DJy>E1${t?Ku4q4eNE1 zl0w4yKVE@-qe(tZy3R=A1#>vo9S+d{*(MC z*^ntpkaDz3=f*G9I0z!HyOPBSlq#Y+qUru}zPr8D&cwl!7xGQl-=%w;3=RYeBhrvU zpgaI{G>{s=SV7Weys1B{{qVk0)Q0!s5T%Pr+`7;Gtt4j~tE_ds#aHyCQ-d1tJG8G2 z_*Y6>={Ip;~zIp2#d zDH=JU$Z>*2v>wdo${im?ZglcVjAH3K6A*x56k)*SK7#zKUr|!GKb#jgS z)x5-_IS2JG79+hY&IVb{nW86(z_NqmY!sc1A>w7HE>Nmr=TWj{nFKyVkh$nHcSXfo zrw$z|KH_ZlG@YOBid^TRU=PAA;U7O+7^v1f!C#c}hA@K!pOWcpJJ)K6eM2Bk2pNmo znyb>eRV==7UA@0pXqk?6-Nw_XSEvNGkV4dSQ7?2|hpX!;|0sNP(`Y&PR&&+$!mBFj zck85)DX>}c^6rT_MbNW-s|DvvmHqq-9v;eS%6O`0n;&5tW@~wQ4dVKhlBk~;ekh3A z{r+arI3s6Tc}D@RZ<(QJyE-*F`i;;fl1f%o;I8>)!skuKx%R;Me|Wma=*YUI-7zP& zt%+?uiy9H`~B#(POo*&>8ia;yPoQ*ciUmZ_sX+1 zo42laLFaD$-m|KLgnf#LNl$3;7o5m=3d;a=_bxncpP+SNBhyi9%_?dw){3=~#SZS# zkrZt15yfHal4Q^U=^x|4m2{!}u2-wvRcvNe!FBe%DO?^A{|wXesu&?^wnQeClK-c! z@>}tx{l@o)o%YF}!nh>7e|U!lSnlbl70AeCf?Nxy3nSuBeS-gxm<|Vuf#r@hNFF4~ z1aZIfr$!uiEKt)pKs~J8_y)PO;LkUcp?M?Jj)6zcHZj2gx-Ib4+70(b8?`z8JNI8H0H93%CkJOq1q#3zZRVXG zIkR_fGYX~(0jA5;gv7{kPgwfk?$G6cqGnT8Fb9+RM4b+R5v4pLANbX>KUW4k4bCVR z0Q-AgX_NU_<@>K&zJh2MHs%92+`@0TV5UhdO6-W+kXmAdC^)7+>c2#BRzfhtMzQ=Y zXKb6rTGT30q2iF^oWdLX$?uxPTTv=JUmKyZLZ6NsFvBd>=s}#p+w`S*G&)cgA3B*e zH_wI!@CR?n(l(IFODBo;V&{4x5#B8z7gf$Nj#q(9iGw(F2+2{*Ypk-(;J{tD4yv%M z3J12cKGIv)zDfPN!9=XKPE~OVv{y1`Qu4cT6zX}U@0ixHR&^HMqd}8&7F`_`-|QcS zqPa_^Xp^cXl8aKA3k_}s26pWZdq%9)yKC?{za?7pf}-FGpo&1T`l z32`J95>auhgJn*jtQ;zsuw0MN#n?_Jyn)cQ(Z>02yDwPs>U>PEpI;D6K3npFyyI0R zu}UCwQV7{1f0%r4(*Bt>crc%jE=R8+G_jPae7JwcuLNvc{JJKcZyY0ASd3KB2!sz3 z9hR|)`p`?&&LVU1nF}JUj=fka2!}9>D~$w?#O8>+yGGm2F6z}}0-(D(cW!ot0-U06 zeO78W8<|;Eilg)S_&S^de5ZI+RH;oLekRZD-Q-|OrvwoDsqp}WOCaEoY=MjZAjF3| zGeELyiLNK%F&Hr}i5y>0&O1mT-`WEKKL@ zokb&U5{(gJotB4dgc~d01IXu>3_)fajfCia&;ks~VeF}a6KuQ(Vjv{sU6VSS3KIhQ z2&|)0*wxxj2M2dFJ;VzOGhU&~us~8)zM#+dUH$l;Vq%(F{zf@GyuQ3#=9*8PG4vnu zAi}S1tLvv@KL?n}en@t3O}HT;r(}rHaR5j2Fv^PAUi!kOE zrp)FzriM^bs<-18&Py4}4ZWrV{85kBLTGY!D0|(;(+7C~1WXw!Y8?%YqgPTT|_uwcZ=E2qNO?lluuhN5}^ zNZXf=vDLc0cFwE*o1l#Fh zWTBb!38AA?+5B$}7RDHt<+?PU2A(-t2bPL?H+>z za6m=!>@e|@)>=v|;n#4dqt|rku#e}xa0KTX?8?s0yJc6BeF0_CxiA_-jfRnWxcAT6(*V1q!K zU+bO~!+$HQ&XsKq(`%N~M%7mKv8clNE%g;s9v zWbjfN%zL!>wo>`6kCsNw@1liiP;Kwn*lAo={$AHioVEu?EKwxCDpzpu zI@olXd4&2G&zWL8nEMXS*oIQug5$e3dlpfJwLKe|f!*q$Yp1h35{UfsXSTPBDuWA3 z)b3q?0I*W)t{*uov?Yve-NweO8&DT~TAXe>=b&lE z*~uO#wdktkxb70bhM`~so|jy=$1R1w;ncby#t}f#zu>k~mAuz?$o2ZM`o|stvP0HO zPe4xfRw21*T7Y`7O8;vss2@TJv7jDWV#4qC!l38+`qHPSrTGW1N7&)X9v-J+MO9^y z!U%Y>g?SW@BZchG%ztgn9w}P{7t*F?OP5JGFkblyI`qeQn+mb8lw5DXDx_i_TjLzP z$2;L4PnzqrxNTj3bu1$_E-Niucs+N%ZRW;Ob!hR}go8mNh*HRTU7Z?iH7M(M! zm12M#RNU;O3kZk-ZSy_q_qq^4_S=A5>7AYvGl^U|(9~xtX0o_605rV6|LB(kB`WTO zwA{BT8XOuNSO`_$RQyG|%1D+m9Gaxjc$yhz=>)_8mXM(bFbVucFdRq_MyH;-{sY0P zQk7P9w*IZU2 z$N`>>rCuzjHMaZ(Z3~TLf4id?u8wsqi+Kj35yOSXYNROczBG2yN~%csb9uD34i5e0@KUC-`ioL&WM1GiX_o6gUg;1GGbLMKZSW9NrG5D1I~ zUDt6B6cxdha$Cd){b?7*i2wBm1XDLFdYl_wZPuP1t<_pM#O=y#yv~u|#b*?vmCfV>|MOp~O6w#cEkw{UaMNEWO8|*j zmLm7?duB3Sq?r6?Lwid4piW<9b%AGcAi|TXe=OX@$sB7cJ!@)V{8=Y-8>pw7dMm?U zVFY6yA~3Rlb90aLbwh25xUTt*{BB{SC-; zbP3N`X6+^XqkjYnTYJe1mFt+K$sJ_RI9v+CDE?RIj_3hLOfV)yVBd3)-%vJ}upIt% z0igR!B0ve~EnjfG7jjS++P4f<Lj zY@OqMNoHDf{Vj$ddSYOHR#lBVBN@HAZg)@it|a$<4fOY$Qg$qZ=Zxn^XP%4$+5m32ufOTqA=!4JKGeZaU64%9p zP0NfAUZ?w;3#19Blld06r?ou4One*aAY^*a>E=YC9*De+H+jdcEFD;YKmlwrPCjM$ zAkf=7F4Z_4|MxlEdOTplp7_POoU6OJ~kT{&+^mC}U$zaR5r~{;O^N0}Y!EAJhrb!{JbdX+f zs9?`t!u41!{V7~Vi+!wBsaC+QNymY$suX{)pr)59b03>C%S|N9mdU9x-qoB(;F9u2 z7QN&f6GWz5#_Jl4p9@Foi6On2 zSc`S7nVN|a)mi-`a9jfQ0#1qygW9fN(PBUyzUtLAsgjA{@Xrt3E6yj8Ef`6ZgC+F^ zO}sL^x-6JF6TP5yqzdRm1U33K4V_pitiIrb>;tOo7yBu!?P=WrRO&XTf}a7YhML{e z43}mimm*h7YASI(I(ft8ZT)3l31=;7N?|rRRj|hRO z8yeJgp=SVrCkZHMK~VRDV{)f|kW?TtxC!zDWT5w0?(E*~FV+a925Y7*i(^!mw02(Po9(l8c%>Ry;<)k>ixqRB$oxVZ)5M@%yknE>LRm zsOPZ`Y!F}qT!vQAB)P(&@!=i8xy8=OB^prY`Nw}j6X?(xX@rFro)VT{jTMWx9Uzb4 zPM!U67f@ib&lIPkhK_|&8o9KB;HHj1j1z)_E7z<%y!LZ)nEHo1FvU)V*op#%`O0=G zITFP*P*DMx0@tuYa|nWSaAr5BzY|$2Ea{PWY150R>T-{FkWTA=Vgnd|^{OEkmOgf! zyM%8P2x1;17CGBsGs-$wjHo1}j33uZMio%Y_>jvB!-l^0g!T>=fg*hUV7ZXOW?V~0 znc%Q(ylU(Nu)O2McqZr1lmB|+ObKxrhi^&2zN+mCIeVRKBf|!jmsT0jIBiNp9NFw( zR5Jn?t)}4DgU-2BuyGyRJH#yrt?nn%)^9Ye!pK^%FB#uZzJALBm5u`bwc83XC;;rB zj1k~BV*IaN1shTNN5`Pop$MRDfjVl@pzoBhMNBWn?RfpdZ?ZA4LF7=;ScF&`} z3MG<0qY~#_{_a09EQ|@GvMewS?<>5pQU%9Tu83P8~#vMl!W zRD`Y7KDY9MhE)K(2&ilOyU+MQwjQwNHueQpxq!nBCtZcAfXzb4tso_72i&6M@*^63 z0rz#MLQ#f_qT`k(KL@x%;CLlG*n1`k{1m-HWC`ltCKrbxTKvm3FmyWFiLgrp@NQ<; ztS)nO@g%`A%pv>H1nzoK8rNdSVAphxsY$7tsQnFK^i(b50X+PRbe8V;9YY=;OHL-@ z{5;goNvFt29v4r%cseW(&>w0?9LJx1`0)^&N;NmbOjuU#TvsE+_t)}tu@0Slw3KBh zi6ul)Xd;Q=5na|0AJ>M$iAl~f-M90m|KhgK_AWPnq7UhU$zmZHV$I{>=?NPFIuROq z>p8yB)Mk;k$G^!Fm5q@=c2AWI1s7kg(G!&;nR8xkes3n5zuE2%RYP6Ft$gyQq_`fA z$87@)EkKX&G&W(a58c6D0V$Bg$ha`TSH;`7Rd-VxaloG1?5ZA92I-!N6r>Rs=mDlT zV^8z_ylT zY0>lgd8-5#prpI^SfvwxrCAsnbUGqrm{r!S#qoT3M_%85DWD+Bj-L9X@8U_0`|=IW zL(*!wej0hi@ZGNGyf)_;ayT>F=!_S9SJKdOl4;@d{7Kig7cNVi2l=fH^ZckNW4W$U<$H}28T*(h*`64S z<)VE8FKc#KI=}-X+hn2-YXCVqlwKP0?P1??+&(eDx_YC+VH{uFXiR$Ae)MKs;{KWg zgT$@qmigeW(&l5ZZ9O3M=Sqw47)dTGhPxTv^`4@D(F7QP91wIbteBb}mV=(oFhhQ4#8|Ta@zpAt zXMKsW)=2=PsW%GG$IPH&puSd6_WI|tI3~dR{lwT~ZuO6W@(=Z71^&Acypv0OziTl6 zS&H4flJ5j=hVtLPNJPhyTH>OL7hGf$Q}RxU4#~@t#Itx93Fvlpzv|Nhx3Yy z{>}hh@-6OW4kl4Vj66)j4IJ0LLrUp4Tmcm_m9cV)?UFI`8A=w83}8DnmUE0qb2zKV zRGX4!?Jyr46X%bG9K{cd-1iM7a!7>`oV#isoF#w+w7!qFnub!4%cF0Kd2D%-uCVD@^wMTNlE zoHEk1!1(rZLi=l!KEHKjDBI7|swT%GW9gtFS;%a(;gE6;wSau|7;e^VY4MLMkk>(n zzwPLTEqEEyDzP+$GGwBQ@;oh6L&ifJ^I|cLpFEuZVeF-R^(S@5kFm4v;HB82NLxHf zG4d#Rm&(tBu($axAsM6&e5y#SCw_+*W*-GQOvs|?-MdluyBw?i>CMg4mIBB3thtjy z+))Z1hJ-jQ#~c=;r6GdHT|?g_guAyM%xCAjF1iBg$YI-;oJJ=f*E!a3+MWFaJ6lXZ zNbp|HLv%)poNenB0bUl$dSmeJ8{K29mryG5<=E9<4^$!>%IFaIpLuIL_@GVW67WRL z;`BqD{gHug93vAt^1oVu>36Oxy#m5xCV&?E27pgiJ{Ou^M0PwtmQgS zCa;$dw}YugyKvf(Ft1M_b$U{^aDaN`(wq8kaa zoxod4W=7iDea5WGfZt+|TzD>hDlvs)-t z>BuQ4FhEOxut0@d?b4NJHlHeZCJ!mztHaGkALC2@AOGv=M?W)w5X5ova~FVHlw21v zhl#V95np5N%|{i6lsX0)JB9*KBycjt18$^?yg1BbEI41`qG~QW`4-}rem5Gbtzuah zc;ZaA?mB#J;4t{U7jDyCj|PK)w2%<`!7JTlWDK9>sX=d!_`DW~Ptj3jA!fz98;zYl zc(vbvwz}bE*Y1>m{l#M_A@$Q#jlH%Yb-)mC<~SP&%4 z0Iw7Y-gb+;cS0DONx5u8RH^SPKDDkt0Wdl}$9P>zWl}mpBr|xqr(0-rQnA$dj;jm2 zBW)vTNiS2wXc6E}H0X5C+_LzSuRE0+7%CoD2|;PSaT|CZTEur?W7Uv0e$w}wR(gMu z*cKI};Li{9k@@gHm4!Rz1LR#R><>LawZBXTRAG3SEA6i+Yi)v&Jl3}2gD{DH-nTHM zu1Z>|`KA%Kbm>8Nm65}4U+byJ7$KRw-Ex@E{z{9ZK$_W(f3N7-{Bw(h$r7j?`%U(6 zmRd+hl%xF-_Z*h8b+2vk{zKC)PZ@5fl&-9=+3=}e-O$=7Z7qhGPD!rAh%E1ZfT%AX zZpVH1PBLhIHc)!1Tkmmy_edxF?(3zt6tVA>FJ3C1tW0dO@m;L$@{oCk)=HftMIq(( z%`|aI;*q@VPZ;ThxF%|ZeaE_5D684w>?zyP7 zL36gv^D9?Mn*&oKC9Y*+$X#dLyT6jMc;S$Izybe}<@7av(shafDS-bNi#WFh0tv!? zVzu2`O+eU;vS@esG953X*9fJ!WX&n^Ne9O)CBG67nGuc-q}@o}ENLsaJFzHLyENg(vRpR518BxN`K6CWHl*Ziubo zRrdE!8`4LmC5YSl920nM?SguK;JF{EV*f=p(4q8u-P$svqAivj(7Jw#wM8Q{2^>*( zn<(__u{wcUx^VTZGgqg|VE>whh@T;~sr8au`v}yxzIf^Y1r{-&%*XyJaH>T4Ca<)j zerHs7Gb#3b)I1vKv-k^c|FHyXw$UMQ6pCwtBB$q8wSxDEK3!r;k2zi{A!_>buIp{V z&(HRlnHdFu*9EP57)>5UxRsQo960)3^BJE0D{8sk8wQk~=Q6J;c~Ry%oj`Q#o4gC# zPrQCKy&661)(IW*gc31I-Rg+TbnDl1oGe(16R>h)lk9>}$Us*#d@tmG3b`A}hpDEZ zGrNqFsP%P{sPv_W#$iOhu*Vk zS}Dr(7{_f>M&3)>L{faGtP2rj*E13CRDbqc=G)D12bXmvJrNHw<&Bc-Wd23Hg z<1d0f?_AIT(_$*OwoOgqPaWQrs&fl9Z`iiCNA3G$;wyB))i=!rF(yOV>27y^7VY;E zLpdT;$tiA4)GRx}n`CcyMT4)DU56P})+=5WxB$KTQ0;kw^|#w4G?PEcZid2O+a<_L zwM>TZW%@W#Ydb^b(@PC0z_VDmqbO3pk8Q!9@T|MTPrk-Xj2`lj?HOCorSo+3zRxo7 z0K>NBU%=Et6}_ z>J%Z}dyojPfIlWb()&I)q>-wf9R=u&)EHtg^1;4sl)-n%aF(Rlf!ccRYBbRFPg-*Z z-yfzL1`myTdzYchEECcQH%U5*yK9PzH~IUo0SiPzZYi{W+0WIlV7+a3XvZ_g8|WUx zLDvQQIp1~NoY|S1hRnbIXBnwkIZt=uF`+%pl<>aUS)a9My6TqFwG`A(AOXT68k!j{lU{YOZyS=ApMMW*GghsQJP`w9 zeS{iI{6T#z%Oy2o3N?}!b`-HYNqnCFOgnzWAI_&78bMIyB#NZ)dqMeFJ&^y&9H(xv znvSASb1bk}d$Z1FIA42uKkqK&v|s%A?R7!# zxFp-6+*JApMv*C5$lKGh!~J2v7>_+?_Mb2a zv8?eku!&nD$>_z%WJgSRVy5VUsA#qn5>7zo#p7p^`T~3i*1LxHD>oMppSdfMJSr8( zN~;rE9|O3YuE&bE6{{XH`qhYg2WbiyaROX6ADU=s_`s>$z6(YALg)sCkJCwYc^Ao{ zP!zxjpWffR)Q;kOB6ag7*ziU&R>8`Xr(=qPZ+6-ul-8ipRc(0H9>=V_XSXK zz|Eu<#;v}$1@whl2CpoLIVKe_ebDf=+oW5bI>&#>77=&I&Kyb;=Krk})5;X`9Kjr#b zoHzd8ZoY{0Q!s);9WG+=Udi&Uk)u@+xc*OwUVa6^Mw*z)@(nqdkka;^iHZy7aWKga>T; zyt~oT>q#=UvIlPhk0BQhU4l2WrwHayg8;J*GGqNi($N4C-s%?(6^(U=Hy?)pvhFWb zU*xbDPOWr9<9G=Tm=8by#N+eVxMq~}zvAmZHBK5Si2751b}0SkXA1`ScWp-3@9LyD zl_J`KSs;?T z3ABXaF?iCqn%r}Xhp9WFsiin)XXaJbMg)uNNQ+xbC0<9%DM2@CV7Le^ zy|1LolLKl^7i^ndUSg2W!ezoJ07i{C_LE|fF|thoeMniU=EVclA4 z5X6Q=;P*I#yh!V3^(#PrN7#{&xk7F<*jJ_u{2JF^`HP=G4y=2xiaZ<#8_H&3fP}VX zL)aJOr345d-{T)kcJL@FmyU;+;S~9z+u{ex+x@cm`zfGgd3E=GYGRBCDWv;b8||;n zT#3bTjQkcm(dZ}pX|w~zPJ1iBRB2reV&jAwht6V?Q@@_~z&L*TdPA4; zmZ~W;JE6O*&i$3IrKReo*VkJ0J}y)cfD(P&pb7znP%(=cVeRgh8}k|`nlsKMmryQZ zpj7wGO~vv4-4MENRaW=ivt)hGX7%ueF+d6we|7>}kj(+PzWm40Im3}2S7Bmn$lE(@ zZsXzP(8lv=1*5gJxD+1FbYzM74x<8^@eWSZi6u;4T8|zIKFc^IXIg4>Ql%jL_Q-z- z$_OT@HduT$Oog$nnbJ=Dyrm;U7Ho5PUBrMVJ1%rnAp@rFg!!n3*cT-@ekJ zmszq;z`a>0{w3Q9{c^zy{u{FvVmR;oU?MEo;{ zt!q2%wpoB?J;De7kxe>5cwgjqc*<2k!uJ0H5QL5k7vzsC zfq?=?6@8v01KhZqC1HHsyiRM#=k2na;H54u~%|o3AF8nd83e@2BttDe0mwh81N8Q^EpPCUG&IlG~AHKsr zQfGfRNGj;uks1x77BT+ba~6}ynsgksI&_fXJ1wLK34n!XGkqSIx6SEY^IaMI@K_tK zA3hjN!AoF60j`w%uc_Q%otr6yLpFOMG} z?5$&xdbWK}2rUA!jpIh&JoM#Tk{|3K+*(O`48nbOAGFaIf45vS?-xR0A49x(AzF;m znLcl|Ou?f)TBV=6^)OZA-3&zLtlilqr%hwZR<=3ZF_cJyzHTjpQQD$Jq?<{TD3 ztqxPtpK7fSc`IN~1mRH#R7;y|sUhOe*h>HsSd7#y!3;oz+w+g_P9>HXPkh?)<^uEi z@TnWV3c&Zpa)*PgJ2(KrX5u)~`H#l|;^pkgM;pNj!1ih=qb1tShVj#?&-s<#bIZA7 zD~rb_q~npFZ3)BoTXAg>o<*O6iARtAy~wiBpXarVA}B^kwi`srgJa^~`r`X)gI=aL z=d{<`OEHaWY1S$kFV3*nGOLZyAOTQ%xeyCV;xAl)&ENzS3KGYGr+$=Fe+h8=${jmG zeea|ybW*00Y@hcR<(I!-q33e9F9&ZJ+d1WN*hqgh zBHCC+R&54S6R*&8JulKPoZlrJM_f4_mmlzKz`L~FmpkidpFo1;&Q*Z&$D(SL;S`AQ zWV~69WvR)_D~6Xkq~^rs)~WG(b5E}0sRmgh{RL6`Sv5?WUHA9AmQRbK#d8%b59bt) zcN>XNfaP|Ng3$2`fl{xa!fs??|$*1YUGhe~ph*2GX!d~# zqKSl=oV^40I?V#So&!+y@~`fplaRHb6!KL?u1hjQV^KHZD=gvP`n}PYr3tFC6}al_ zlxdrkXq&D}EzU@Ys}H9{Z{VlFRF>a`UjCd_>leF=T=@kCb_T9^y@yBysYMLU*72q6 z=jE#>_m|nH{SqOsI7Q+d(T~?b;%Ap>U#e8%%KWSlg#jwbM2EQ{lM~RCRUo6g`02wD z@>@P8pZxnUg$Sy>snNkV*`s*SF&TH`?eLJuE0&n11e6F z5vJ+gG;$ZY-jh)nA?}BBWjleB*g+layXrW4&$T$<+r6?l$%=toCZb{2-geF&0o#*# zUWF6N(U>n@`C?*|`sYB;AMpz^w z|4sFl$q6T<=SS6SO%!Lz2{d;}?CBNr>3Y=M9B}_1Tuy}0s#5N1G-(|s@M#@n*D|RJ zpu-~+^6xeNl`E(E%~Ydi#(q-!`II;o$tbGi;7JDXqb<8x2=$BHSI+pfH- z9_TaN33PMoea3G~6Yr_B?6S9q_qK?Lw%`Ck2nqncCji%57#luZuRRPpE=GuQZi{8W z;&1d4K5d=Ao^gUKWQ0O_aA_N>jy7{YJT<+Kka@6kL{`QaX7J@_up9(@GQvoc+bO|4Fi1}$MxpJvlL3%#D%%3aP?^EFX|K& z$Ip+h8G8DbjzkQW=t7=76T8l1>{=^ln{+HE4>HyEiisPTVY5BiheM1v@mm+x(_?U& z0AZghZOA+W+4xifPHw|@#X2~^ITE!?i`92m?w-eooQZszy<|V^bT8zwyAaU0pjh9v z6{RIwG;mfykA`6{Ec&9_HStw**O|rd4Qh_H(myLNu5rkU zHp2y)m(-d^-70-6Yz{CJIoc9;F>zN|e)UuRy)BqDnXUeL)RGaq>O=e;kbBrF;tdSG zV&JSGAE6hH=;9kAa9cGMQ`=qTVGf5)aIV!J8=8Ju1Y3Z__RXj z+jKjh&g5+eleY~NV3yV+^R8>T3aJzLN0SpAUR5&n9KUr=HOl?*jD~jj2nJ8{rU(@85L5K@;iwQ3EV|8 z0nNp(Iu4~OufFe$$_buJW^Bzae`7!2)A|>P$Xq@dFK_9P2vdnVc394$?kr#dBdsTG z-Z!pGy5)!IRIjNVv1`SQX+uXCW_NJ7;d*K&>?fzpb1^AMIyb6moo;isqcbzRZfMqi zZWUUs=BY`1HU!vdDDsWQyrQro^3p|!O0Q#fpC=R9f(Bz*Eb);bEYX;yI(T69RQHGc zsKd*eOGc4`m}IW+()3yJ(bdTo%v+6apZMA6w%3@_mQ3Jo#=dg~RfFKOR_+ayjf z3U8e7pbw@vnH@|wlG8UL#DT$a|7k2_8FR2S4ajqCF6RTb5WGJOU2^C=Y}#e|%fqmq zSIxZz3;~d@;gSgua3-Mi{?4W3)njqp1q=RN11lL^UhxPos=8~O`nMEzS^nZ4Pl^!tSY7+BwtNw(fjY*W zJqNaSjZp=xjd|%_H^bL<0h_Fa@n2gdX1062K6DpnKkMDtRdmli*dFnBBy8QZjU%xC z+O$~liOK~MyFDSJc|&$7;zN5ucDc!s`DeZ3i6Gl=qJkSKmY^EqYWN~`Hls(OZhuF0 zf3T9VoKZgwb%1=In*?wo8~PwZ2lg2;;~);5z}y9V2VMO8T>@1um+imTI0dj&Gr0e~ zFG?8_{rLZ%q4@>p{NLxHO)>g38VJZ>uP8`qB}Lim)OB3csx)wC3spm!eqiQ76V^1+ zNvw9yN)1XLNZXs8aKvMtZkDR{iNU;vN+J;atUBVO^a*mfqtxP-n5OUvj=4k1z@*7y zf}A(i%&j$|`0@K2Bx2s7e#zF&jBuT|BEeAfuY1e{1|@B8eyempc(>3Xf{^$fguYmRy^-PRWsYpT zs)ry}-1c3~+G48Ix6|(vt9x8f{H4#tU1R+|y7xNqP{*XS++zUr0lFD3b^11z8UFq@ zZT7AUsOmAsnw8YedcNzOLtV8P(L&~f=_8_p;qF?ugw}b4ivjgBI#+yKCw4@e?$TPz zX)O7gAhze6p5IO|gcDgHP(A)#s#z;TmEkbm;X57eul03F7`a?zvWPg&Z-0I@(JCjl z6onQN$sHtXJV>oM^X5e`hlXcq6rq^xODis0eny&IRSEV6C!;+ZbgrNLXo-Vo1n{58 zANh<6)zy;wPdn22YL0K;SXt)kbd4jmZcw)!eHpwv_Gy4Nl%8)P6tH9WfptbkhZqz= z4q9rL7rCSl_-3(Xb6_5olO+<90ewLZHjz&x>SaV$2g*)9vE_YO{u&NKQga2&iU{~M z2tNQ1@2*PTv5vv+9>nBcGnd}ckNb!_VJ}Qc>vHoqy)^wy^?+DgOnIkGe9t#f%`1kv zPak}6B4>5{T0M97v}(XHv0qnbCwLI($JxkkzBX5GWUo1MALdUEHs^EMf)|MNrJ-7a zKld_B?{PU7W)@j_;|cIG+J2fO@AUqO2)WQ);+~8zu)UF@no&d*vBFScdb4mH2qHXL z4XQVb!G2FU{-0DwA-NZ+6Q(p#Q`1{1Dy&jYOQnR=HC==rs;l|8 zl@@iU9&J7UbVSFh6p)Aai%A-YZV!kwE(&>KV`m3JQVUko3{S5GG=-o`?o<*Rv9t|A7>h-Cp<$t z%>lvM=hWc{TcBRW6=zHqyP17B+!`4Wa1J|WL-%sFH*M&@4BWnFv!(D^w4d2649Di$PPpiFtO)=svI|$2;JsvyNISf$0%q zAS%GXQq^4lDKweX6v@x<^%Wf$TCr(NB+^0)=vaNAj`6G;ujqL0gsIj_YTeG_k;_CD z2ojr7@{XFz@%e_y3ZNJWO?+-;?zsy``PDgUNl?^_jgMdspc#=xc8?y**j?S6w=Q%6 z4Oq-N+|K*i{=U}lNC`5}5rcts=Ra(g0?ABdLZv;>4E;mwQWi+mXfzBVV=u*Mneo+y$k~n&*xA6j&Y%pjC?$1~QCSA49OnA5xI_dT|<;`S?L zuV{&2ugk6=A-h56o)+*68>+W0Q>#G%p%nMzI-?y7$8o~1FA#$V_nL0+b6+{_N(~~9 z47(Lc2m;FHevNDL9~aiQz(wUrAko-ZO0fI4Ar!nF_tJnc0+YO z$08rZF8MB8Wju9KsOd>Q;HNKeLY^uot^kUQU|{4C4ya-{_@3RS51Ce@cfpas6?dA(L_b zYdIsBzxB{2{Rr|xnm-~Rvw{V2$8Lu=Y9cP^Bji(^%pI6u8en9jmr*K?a_lx+RIl>(4OCDeO zFsvT0cU&ZZuivcAZKv!s`M6#CdWF8ZG}+n5t=;RSmm#E0%S}T`LI%-02V7+M?Z&r9 z>*w@puk)*UlhaQKMpOIaASrd!a^svNZz_}oM{b)xS)Xio+fJVk!~%HYzlD*7hYtKk zqo>vqxc<6k+LZqBkj6?ACZ>a@Dzg9dJjDxE=_>$*yIj@+G)oIDbL*Avj(zpgZ})HP zwil5?s(Nlf*{P7?DSxhY>Al3ZH9NiDrslMhqmHrt5GwLXxmZ$#I=`itKf83P!qaz8 zVs5}3Y)s8D&J1+QA{Xb~XN-h2RN1ldj82KIjhrV;BI0Y)vmt?$6E2l@GX z^CorVLPCKPX>2ikeuHY&b!DK8Bj)EZ%hRSCoZrnL8xP>w6(|D2uuav+h$`mw%ORW?M%?vYSI{uZ6_1kdUF5X_kS=a-)j!` zUK>lFwbz4@vPhLO?9)>8BW#70lQ;&YPrF~Mo^xB4TIZXyzsC<@Spq|_Cfu4j+sos-*qG5i= zPWqA)eXYI-z-TK@^q1!rnzc0-83$i1L%S;rkHfte1qXeq_kPRg{V4>OkSBfXQ$r~v zz}^3zT%hTd1TzKv=175(>&+ag)ncti1UFPpUTFy8^ZA>_dBgT83g_%$mSoJR%{wbd} zpwgPKha3CF$l;8#1^Ok4W801?_1syB4NCPe5mxeM2tShAKS;rSS)$$-(rZqfMN#__ zD^{j|KEwvPJs1vC;fbWivp~6zwQemQS~OsT7KRtYF!|@nANTVdQ5hg*=cVfCkZ__` zitP>O>o=$M#dE3sPv2cNV7EmI&ocV$#~EW~0&}+~Uiw!6a@V+DIyoF)*5Gk}rs$nX zGh=s`&g<(4{2>v_rDt|HX;0kucrE4Pbe|p?iUW(z{(8r|?I?eXq}tmAh!GzDL~n)E3nLrBH`_L#Q=PxdrLnoTVh;~{K?So zA@^-v?X+Z*a$W>3ApPSyk)U!3u}K>YKzj^VQqvK+={7-LRM`Ib)B7F9aQxHYky-@5 z=x?Yd)8XQur_A((je0Mx_x#MynvqP zr#D+?qes%0{rArVTP%ElX8!M5>w#tu{lAQQJn`9$wp4|3=BNx9XCf;P2|cv5rD5D9K`mYu=nAa|3H5wf2yzLf z|I-!>_jx>+%zGQnq&1zXq=W<*c6SN)px-A^9sIveT?<8_W70>tr#=twPYwN=(Upzmd~b^{*Tf@;DP`Bu={@g zyrt{@T*+~TdCBNGYhnLQw}ygGXjMA4y1U0qUY3mM<5?jDHHeGYE6wk523m9I!u`|y zocivA>+>(AX^HU;N7cw8*QUwGbbrJOtq9?0d=w^|lBVk9=cA~LLQTEd)L2;|O@65M zop82t*~FiV!h?`xtfrPIyV2-l*h|DYb+z)7N@?1Q~r0`xt{jy zf!X6VyL0rC$cmYPw>@J521P?n$?4*-y0v8#P%u}Kn1XTe;|Ph1VHcK^hDTLQe|J4Q z{o}QCeiiSjI#~4Y-s&m#EuhZn-M-y1-=hgJyg$++|CgaNw>YTZwaxbaE$=j*LG6s0 z&P5?3H*e2PpDrU!0kGZtX`cW_;&0uu^zn9aH|QE((2(bnZ3h%Y`Zm%lYS( z(kN{)|DhAY@bwo$%R1rD0V+s)ta$P<%7u}7zI84W3L8Mq?rfq=EKb%*( zThT-+dh?ij3i-aq7#wE~A^5Q-hXF|2Y|8p_*l@!sf;C;v3PBj#o{3ZK$E`ug`XH8_0ZRL?py z&sR(g%(-*!^=6}nwSCSMp{dHS$-}jIX4+8j%+U^Z`g$?ovCnq$6VIli2Id%K>I%XpSm6SR&wV%Cl z`1zr%X~SbPADG0z@Su8NQtHD*H!eQxqW_H1{go9*R2uIyj?5zx|dg5Ljnc{ zq#m@xR4asiR1tBxD5K@GvgD`~CMZk1^#lZYs4V|v?YT8o)U4Fn%cWxy+SQE4OKe>N zllDI~dg>PsL`&6a(TFe?8}$p-No}00|jsAj&H?>b4vEPg~vI zuCGnh8M}o%231>Mi9Gy}4#{9MY@tgFuyoa-C_&=Sxt&yMg{(ImxIn5gk;~55TS#vJ zD!8{p+C6hxwoCaf%Yg|K6T;b9js%<==Md;8L6(L^-u@My&S=(N66Cj&9wUkpeH}hn z0*eyy>1Mshx!PQ!&gSEPe7(AI+KMOU_r{?PW|BCl!;g14sjENRWr?7m4*LcuudqQ` ztw9EceA#IV3Xx=^k!WC{y1xCr`m#PNn(DL`C4*lD2fw7IH;lW>+Zv?gbr{@Jh-?bl zc_Jyu1=3Q89ZD`{T(Nlt7v>R zm!R!9a`Dx_>aeNI);~_}-ZH?raDuzL`v-|mgccO%&IUi}6j|6OAXULI{!~#epU2}t z#`RN`mq*z%=1@_d9IqN4IXpt_wR`P2SFzuPJ1E3ZyL7nL~VqqoxSjrtfkpGAHGL4#z`pwl)&G+hi zAXRauq*5uK8#TXnm)st8XJ&LMNAwnmNi}5$F^8c;sEnze{;OegJ z)U6b%SE1%&NYNpqFdTZx5r5Op?tC1ipuV%63q37Fa8Y>D_dJluaN9vgnWDUWYhdV{ ztZy<^e|L2yF=tUsVvUB{NuGzukLiV#-XA#scApsv!#fV+VV94F0pc)$ZtWUT(+T6a z9UC@BBWql;C6_-#oLq0~rjaM)Oj9tx72hqohXkyycD{76wBr0@=b(%l7z}~t$L8f_ z1Tst`MAIK*R!xei8bd}#FC-s+8Skf9r=fyBzeS^{kA5vWlhEB>tg47dN%~8e`|7+Y zKdmmo!}cC{V3V0=TO4c<{h6J&_m$;0JCTP$*Jy9KbR^$)Xj~or;cpx7y6qJ;)SGNRKE(EcV6Zeaw@5$bhj@!A{ zy27L0Uoc@Y1vUY7Jy``wHU@Kqa{0uREMY8z@7Y(PU+wV}r3`zjs+@sr8NS^^UU31# zRD%yblli$zwXb5*TCgnaxaESPD0v<$Hnz9%dAn50f4aQXMt8@jZmSv_C!{&Mt|PbZ z>*r9rkRLxlCEVfzFA{1zq`6_+C=XP@;}TNDgkYkuG^JlG!sSZ7i{j_10(KcSs4@LJ zbTqkYIspsY-TwPBjsdFT?vTMfD5h^%aD_GFph2d{Q2`N2K_EkL*8O`x26%Pz&7K&V zbWaf6ok&UPS}h-$-rCUwD_tK)$BHpdN1erM$NMxKSlMA|a#FEdM9g$z$BX;w`s{Ht znU;zZRQE}g_E(^d{0rlOxaoYKL5Nngzk4(Nj@MaEF}m%AytC6$a2#~b*3{-R$DxCX z0S`7w(#OR*i-|X7boFS)yy+doq%9bWAwNa6!HaN!T6l$p>oWCOA@&Q&Ym~=XajsqWo?;$3C~!7hG6ZV%taZy0r)|pH zQd~>JRMFwWVBm?!H5i_+W5nl zS?@0nYGI~?Hp?96nZrtFkyqUqfk>d=fh5V2xRsDlYY9xRREz?rk3-4#BA^cyo&cCG5!oJonAs(KwJd0WQAGxXgq;?i z@bU5xEfac%x;$EX+1S%;E}!KYyS(PSUoQB0?8h!H9Cyr@~Pyj^Z#Gm)+{yg$|OA zC5UrI2}%?29CpygE5uW_YhRb_XM8HW1eGRxHjg!XjwjBBeRb9d9ZbDhj^X}eBuh7A zl~My06-D=ca>lOh)KwH|Za$DWt}y}1RPT7Cc%M>Ao1N9kN_x8l0t3>#B;Hf!J^ip;($;$Ff|(V|Wz#u$8sgD3ycIErFjX7@0*sYSKB{_t+UiH9Koz( zx#wxD9cw8@G8Hhfbo}PMCVOe4E+RS}g};9BIHm5Px|R~qc9o>9cfox*LL1b(muILy zR5cHu!OQsMxZy4YwzWDdVpFA0emTzU%9y6Ue7?9lbbjb;@c01{I&7-_;FmUSy})hp zAiis`J(8|{3q%c^oR>J;+8(liW(C4<4f|u0OG%L_~p_}VD zR3%11vG?YbnG{gxwt;48%JBSOpvUg5l0h|127j3Mt)WfIDc2{(!hG}0 zSM2&?HuYK0Gb1gd^X%y;+7RV=7xU}DG|1C(ixw=<%}g(g;0MdUFl-u1FdK3}@K&D| z7L_k=VValIGFBJswqT5pryaQT_=9Bs6p$pJog2uwKAc^fegs9X#|x!QXEr)Rz{jF& zt&!Gh@dV4s#!>lue=zMtEBPnLA#2V>L?|<8@rU9I{XIy!If=%nR6}h|D)Jq+yvfia zgXRB?#TQ3#XCGeF%@lZ%H?7lEJ71gI#LMAzcgz=(R_5N}qRUcUYgaUZbS^C)Ny@V~ zH}dP@@#pABdg5}JFESe zR)e=Unt+AKHW!B2#7-Z%>)fj@=w@MjBx`GZWa2A4jCDa%qR_0MY_kv{6Ct9bNH?0F zt>o_C98I+DTL9dkmyMgd>{*vN$`OiRzd!11hnu6G73=gbf-eP!x&8O`_LKn2z|4gLJ<9^b$_(c0usu&eeS% zxs|Z)QdVH9i3VAUo_we<++=pE*Y|lIZ>3w@nrD)$)r(2 zC6&bIV6g4>aVexlFLd`bY%Ers_~4*FoeZ2am3Y3U%1S-HVPx7g#JuBTy1~`n()9FM zewz~T+O2;qVQNIGV#*z?ZZqO--3>Yxcs1~{N_K53Nt?_`#lOlrag1o&TkMJKdAT=x z>!W;LFV*~ai>Jtr*Lk%>y_vdRKMkSM)|z6_W{nKk7IxxErMN7aP&jX@X$hsG9CrOO zHt%iJfNCXnUnJ^)M8XeE#=F z{AKOo{Cp(NPiHhoXuXTN9qE(9N(@bBI2nE2ytO%~EXKq^3^dTy2yM;(CG&BP5bvz{ zd179BQz<)k9d9T|mCYyrx8ZTr+ut{`g`;JAeE~bcD?M+iF;_K8DbG9C-p5M6_ts-i z&cb&qlt2k^*p#wouGi%K7GQSo_c*z?dFZR7 zV%RPRz6x0FUhZ(H-ZX<*zerwp5zRcBfe4VLG@5OrV4^2a`)VR0^FsljkoW_wbPDJ z$R1Ip3bUlLA+x19vs`LLK*G$7GU@u;P{P2M!DXPKghKdR3bzaL|5$*sd$(%!+9l(& zWk|9pbU)s0zj6}4cXo2NKvOfy#HJX}*_9cI@o{`mqF8EEm3Jb=mWi{!MpY^f*Cfa6 z=KOqI7;id$l7*q{lsv`HpS;Qd82F9)n)g>9Ssi{{A<|g!!4Pr={t#EZ&gpf_g3!*m zX?HQ|p!=S@mK&>AP=+H#Y$SOa6T+BmWram{$6TmXh_U=HbSK^%n&*o3es@jYQrXBA z1O#bk9sWddI5W!ByX75tYunQh1LCOpdKqyHiIg+u+Y^5{+Ik8)PV^y8a%=jNE<_Jq z9(NyJ6&v;PD(iytYC@9vMjPcTew0=a6Q7=W9oQ$(1I=bp^|uv_NJuEjR}vwjC}MUO z{ls7KQ9$O-B7VL9|MFumt0tdmZiT!_Jha)SierJGuN=`|)s%A~(Ok~(t!n_r@wbM; z*>Y(UGbD}&@#@0qW3j9F^Ghed)oZkUa(3kjYJOTwy_&O(=pha}L9K}P4C$)gkF{iA zt8Km)BpsCMuo)>SdFntZrI<7CPg^T7mmf&7j~Hs2(n?!0MS{Z{b6?fOF4L!0N_=_T zxtc5UT(L)wy^o2)J@J|=>{`6=yKYvG(o07ntAcUizkm<{9;>GZSNNhj#W(DE*my&z z%GWcsTt9rBJiN9l?6Cqhd&*L~&<-5LqDmnGQ z!2TMYT!E$*E%ZB zB1qrh^@j@(Kag)JW~7iiJ|tm+76%|-tb}LLb4T^;RGT!rfN}rYk|f-I{zugmqtFB> z#VR;Ip;xo;=0E46PzSZRC^sEw;}1$qXLuS|{mA8}G+|HhRkPHc`6jiefW-Hl5aK0Y z@*hhWa8B${NcoC98#dMj?lH7 zHeWEIx@yiW#newMP&xy|pB%O;pAhgM*m67J7_ba=xbs#1tcfnc10SkcT*M)5C97*R9UXp}pXuGGxnzG{Z4sbu8ThLcXb00KHQJfh zF9`g-5pVg3!C(u;vz2SkD<=d>6Vm$6g6-7+?)SZ)ws^e+@J&MiDd)h)G>D^3lz(mL z<$M(?jz7eM&FkXhSej^DbM&qp#UX$jd+aG)6v|cuK$icplq__0vgnH~3*&ZsrsE+n zCipyojMD6?<;5op)QSsSKqm}r*?j1(q&X13oi z4bs(BZCC97ILn-cCSC&1ab@~&y%MXbE}lMNMH4pH_Eks zqyO6^mZD`CgZhN7>D6LHueT#WX5!HXTBdQaK6Y zjUJ-y_NgL$f?Gc#v!?z;HDu_f8J`^g(cwo}yf&p(U*k#@+W!WBO>oXSbFN>_ZrU}* z`&_x~ZpJ-zXr3#QQ>LPq!g@8}*INK)pm(tPaHvi-Jtf$54evDD9d$Ul=We#bcS@#! zlql*sMkj-tG~#plADiklq+-)(tg9IaMnO*!YiR>FTrgD`~S${5^-tqRHPEHveG$$@!xH>|cL`M-A>Gr=dw#={nrg6)# z%$$(NWa)DGmsQ8t$ha$NI*jZ4#aHyP_3W{EwMZ zeT$h=Va-9t?`g^XFc7V5#b`*l)*%re@s=CUMF%-cjgTzBk)2e=B zfzY9(mW>sbLV~oaSYz57a*%SszWFK~nUG{jA{7#hgb697X~)InX~%z}GqPIH zFln|DGtFtORcu?PcmlQe%MttNIa2mgso#~Cgd&9)reY{S={t>um%PW)N_%c=VyM3b z!iN5QGL)8h5@kN5{rurZ)ad_1l;`rk)*t&M(2PEi(WR41d3#fz+#3D=2RMUSU=bTpUTjPP zh|yv4l&AtkV46+>7rz&}-_@xxyF_c-E8jaE-rc2VJzW%#+73 zl-BHb@90O^>>^#q(avUvx3#L&vU-m_lvf=!dgy54&KD!^Vs?h0iwc}xR3x{x-mgkV z#uI+AIrp-sV_W#wArA!D_xv@Rys+i1`gyP3YXju5^a5~t9!j|+fWrA6#VL~zO@kAr zPQKZc{EdNOWN_&a(LnRmj_92RWX1i1%vmpLD>(`yBEGi*OlbyxK?FgW*<2#Z5t3t9)b(@GqC$3Y0 z`ZM*}kshjjpJxgNx5=?z689l$@Y1OUI%dlPwB zKA;wjd_;Z}QkprzN)jMT^%SC=zUZyYD>8h*XxeD;6lA|6o$j1-Zw*Wre)L3jiZrgZ zyJ$IIkz7Y%5a>%U@K$rkoqq)z*0*R4G(e#d;Pj3-&I>QhGYJ81Tr?56DNpU)F|4JQ z@d?15H)o^6gXbv=I}4mYJwnKC*zMjI2=n{H1gI_rhg6*d!bw!ZNk-j6rO)A2S`g5i z>BX(F#aC#h&ve-2bB0v(T+NLZ+_x791A2K8gIUJvTIGCn>wl2r62Moep%dgLk!YLs zeM1#-+~8gJtbp^}!V&0slF~qVAl+W_1D+BJQuqRITgI34daD02sk8US1+>7>1)$Q& z)vU499_n2u_j}3^GDfI);Z;#-7>x(ylj%?&7LNB@&rHYM$oeRjmh6g_91 z8n+J=?{I4!j$n&!7~`%cQI_Uckp{1Aq<`N+L{;wGM!#Sp-FjWAaU5gCr^jIr(=Gtw z1;ixh{Ht&V6k?IA0RB}%+cU$6u2|~?N3;)B)HO#06^rf8P{MzY4zf)0td~2axz|+i zwaO^~T5fj*BAkRBT z1=8)_84^zFoh!Ruw1PU~bT|@sQhsYGTD~}on(Xr6VGhgi3Mf^a3NV$DBy?^as|Jj1 zkVmETb?44rJWe@Zy32OYslW?g5M?-N?-8YbxPQ@zO%MEzH?zKC*@I<*&bQ z+-E-RU(;><@b}74T7}OxLK5ns)V-bQunOMK2E?A4Slc^r!Y+c zI#dxl)E^7+&G&rex327!A*#5JDHym~C9Y0OPizNDuN8@qN#CS&c3w}|4WgNG98pLlDX}CkAd}2aOisDvSc7uooaBs- z?cBVt8M463uWVLcB@^66vfs&?jfG5HvXMzL3dj>FlHu<1;pMa3v`h3uffq2|iw202 z#Hgs{gz$>z>W(Vrxd4EoL76^Xr|G;lMe-^W%jd&~3tng2cg3_82#sbhO^b|qCOWJf zgkLkY0ak2q2W><@X&<8u@>LY>Vm$k#3Ob?M{B;}xFDPTY$F7%=pWu%+n}~{|yN|c^ z^DOWT@w-|dV>D(9Q9&0CaBli-!eFU@%4v9G&!|sO{RBhuiGaJ?LHf|uEVRmW{EwC7 zv=ct5>S%DNtRA-TCI_xC{g$j^F8!y+@S~-DW{1grAQ(lJumz^}t`>;bf>*ba z0zuHlUy68wd3q&bVpq?XbnnCCiKFx28g)4J!tJnoA5CcjxK_&$$7o4Zo=kV^YSr*b zI`@h*TdY|)Bk*^IKJ{be7Qam_9;e?F{8vgO^x@N+ONXGfo?w=J8aILoy@GmkhG{Kv zv~v2UDwM8yylTSYCZGX>9XpoYR}`Z*fHA%uqmYRUBX$F=ChmY5mr5QrqK z(5$_qFxMZom-CmtB`ksm{Js`%1o}%WC30+Q1eN2++2qEZ6rmO=Xwd!1hwk*6I&-x1 zEw1+=CGJuKDzF4U=)F*IFBqo10THYf|oc~b;Gs<9U_JWy7}Tan9zV~ z4_OrO0F@a$S`Nl_TznvA_zgR%X`FbLn`ntPwQB`|s=jIGTn(z!gs)xGU&t5jfNBYh zEFp*J7_^)*E`tIbuE4ve7FJ1W0u%}*wKa5LrQL9=?t+lO90qo3?YXRW4VTkcBK~y= z8D;Y+qROas=SgOBPENwV(Ti5Zm^l~&8OxW-?br=!rxeE1jgM{y<@wUAhpTi#< zWXspYzz(EVuf-}*b4uY8^SS2h%-L5q>r`GaJ*32?pb}*?qdYCuPBtbCap8h5{8NY% zEah~qxD-#r1eB#C5;iH${3FUa3vw+F$BX={Sml$2RLzzS2)#|Gw)C02c6?f%&| zSDSWAXx?d=_#7^v+3mDjzdEk%e3$iE7-y{4G$c*dz1XKz(j*@`j#Ql*=dmGM%kl%w zVhODfaDDg}=}J}0Es)ebd8Yg6bTgV#bl4SZlSwEjIyWhV&^*FZ1wx4aAm~%)Ki~oQ zfp@<)N|j44dEEIt^5zjeMhVX(_&|0TBD#IL61hFbA)ONBUYIDT<{81x4&~r zlE=#-CXzJ)r9zrlH4u7kf#y(C-}Wsec!2TI?#@1!ym5baA7g?5PS?CFOoHN&g$ZT_ zg)^3IOyq+{!w7@pdr_p7US|M9wcKWJ?M1VGvParTx5D zVL?po;W&K1pycpAEyD%KovPFgeMNx4=gZp<7jkHTVXT;0T<`ZOuUlePHks2#GtaMg zpG`+F*5RRJ{P6}^=z{GmpPv77U}9GL%iXx%c41`6tRi0}r>?Xkx0^F6PNK=wwSyz9 zd0|kDalYbA%io=9g;+dH9$_LA}`(ksXzBzyX~#x@bxoS;4s+I%za zU$_}t8FkOqnb{b+`-izt9pDHFCsSxFnq=V0Eq(rEqpN7BvQy@cG`CneW0_!EB! z?;f6N`W@Fi@Wc6In^}F|TnFtNh{?9PNcr8_M;jjSZ6Su>jrQGtS)@yW#X z^uoV6JbjTjReMRI1?^(sSuym1EV{+S#d{zB(oxl#${WI^3_YvHRlc3M<$3zHdZq(qUmU;Z&Lz85VhhZ|D81;0eKE1+*tM`kfx?i$BSD$6u&RN>`F9$`J&v}Zt_nN>yz0HG zh;@egoc*34y|o6Qw+L>=xDWM(8zx9~`*c^bv~W(OMmxn^jULK9`V0kf#t`B*%f;0?$rT+2GO`#tK+DMg z{PsBM>Z}=>C5n!*TX>{nT=vG>VpYeShFma%es9=^hqr~so2CE8p2 zFWLpRpX5#_#{J@!*d~?Dxp+Xr3yy4Z5>x~XA#rs5NNTECJy9GCLy13`%FH*8j9kjC zchQi{`f?il*AR>@D^gX;Vf@-5xpPjtbA_s49>t^oEp*SIKVEl|jMCbFiVkHe?jpuE zS7~F&8ahP(Yv-x7s~bzrO;PWjCwRSM3n?pOYfWoJD$PrGafr1RcoVg8-E`Q?!XPcC z9yqcrYSX63PhA^T_{Q!mOM~(&ti5jDeK~T5D)AbwL*)HkOr5{mRi~@5VPUNMNuk+# zFh$G4y2*XyMawrkbxm)%pzCCvy;Ec2@%0y#ENf1YJO+H8v)CKz&*sSeZ2jhwpvd~T zWy@+vfHw+zg|IMCG0p=Z>{1oVEVx{f#YI0@sc}obxR9iJKiM{bdY!F+*^v`D^H9?C z{Q*@7GDp%+$V|s*5Z-9$y*CawVBM~B75?`oq|eLf$SRk!GH$tFJI_OAkM!FU9Jw8m zNgHk_>-+#%iM!fSfkHr)UopqaLpCj!4H3RMuP&Uz4_-B9cs3%R8p^PSg^q4VX^hV= zNyOoZ^Ruf_$HN^cwf}opaKCB1XY5l6Hkn84@%Jhbds>==9#l@v$Er?r;PZ&_H7r$m z`dueOit<-lSidTCP4!Cz?mx2>s_-((eZ5`U4?R9tuse2M@fHg34}%w|k}e+?t8~|@ z1v<`@WvX_sRDx&UyBCZO{Fl{gTh<2AF3E#}ildoE*wcwv%dP2R#1^F{%@rX6H%lNj zn8B$&u$J2ZsGWR4eQ-ISNRA+x?Ty+%?%{|mo}l?2hlmcR)bcjR16&TzejGru1JdPp z4BcisnBOOAjN{6t3-Z#gG_^gMbt-d>Im^d7(SrI`wXb9RwlhkSe4L59%$?QiURLnG z?zuS#e-~isBg@9M@=DrKqtF-DPPYv^KZNc%ApLXMgYY zionX2Mkcyc4za{=b&xqNSjB|(jY!&b9fVZVY4~Vz!X<^&Y9s6SIdiP4JoJS5b{zbV z1`9+*)aJ&S@T|N2m3r}Rz1pTQ`iSqXp$;srbckXg98sKLZn?9$p^XI=PRMb5V<^-6?JkT zdN-3aLgi^|w6lJ4Xy@!ZN`&XjIqCv)*|G@zLR(wb+L)@60Rd_$GL3)7bZs|_H&ehT zpb;ESoDZl83Q0-f$MQp}tD))ro8}9+Rc9-0t(u>@C($G_n_6@{RZ=47Xp^%}6btXl zMXWga+BkzbwomgFi*wmp))b$tM<{36CWevm)$bQ_I?n$q)skRNY$9B3U=_n!-X4W%Cg4betT;a!O zdL`?JN&fxmm!x# zjW&%{i&K&OUo;XvN%AdT`o&D53cPwYAvQ(o;NIt#*5*q5!_wvFWFG+$u-{v21zqNU zab8Cig*SXlBodR+sp8}iu=k4DZ!W|b$0Co>42strYM2)!Ln{tWnMN8s?LU_~VZ_W8 z;~JTBbB*`7MYp!}%Ia6dFKSMyvejjmf;Tj`mdaZ%E7Z2!55(2V72!;Px!xBG#_vC{ zk1~cWB<|OMuM=+JqE(f#pHrLK!z(JepPxKOF$Ry_r)j2p7vO=yvlJm%;j`ddswbk) z3l*w=81Mb$V$t7ZIf*m&tC}njvj~gJ3BoDsxlu>Q_n6>9y{ zbDsaX5bacB1yW%W9`i~h%Wj;cYRbnt>5WO$mr+R)c^c)roOjGFFLEi4SDKS_Din-s z>{D_IdH;J5YMroqc&G7>Nr>VCemK>r=wLvOZ9L;JP(nM!`93f=YF$F zUnT*S_+0@A0@YJ}i~{4ATe`g$wc5#;&j)v6mz1$Edd3!JN<+yRrRZI~fKXO_1^(UcM1DFL+ zt`2Vg+w;JWQmi9vL50K(`!aQQ8S3v!iW*(0PU1>cUDd*%M|G?H_wsXpKMQj^meCmh zLQ1ETmAW})T(Z7rm)x8<<#IXYwx1`x48WtTZwh#`w800@$H%bg*jgawP4KU`5_fUI zMrj!q=@y?D+W$rJm`YaJ@KUa?0~qMvEEq^Q*gV zCUHmYF+m)s)Pqx@Zq+SJk}ZGqX*HJy+O+f}QoxH+0w;z%UXkVG1UB+uZm~_Nx7G|O zi3OKQ{^jgx;^Cw3pJl@K*w5{c7`-$){;(%utQq=07T_(EI*zyD_8gB_6K(#8wwPj? z>lN%zJ+jf1ymS?4y9(xMKN{e14)Gnh;vIyGi2l0QGR1GHGo`@Fb}VZ#USZKcd7S^i zacA)=9ZL5vBQW4d!GktA&q*mcNx>UE$v^R+3w9ESxIOjy0iqlcj;FemA{{CSubU32DY*d7X-lpx2`69Z0WeLOK=}~ z{-aL;`$5Su-%fVBK-ak8`x9VOU^x4^t*Cg3&FL2ApnM^LLr#-pgF$6!ksDzQr-AOBlTsfQtk zB|S4}{Or3p|33r{oiV+Z-QBxk5QV;O8@rxzsV8m~f=pm7j;Eo8Ja zAvohW24W0=+m_-!6%MALVKUPBJ*zgom5peB%6P{JR}GmJvyYXW*SFoYj$Lbiy(#b29mVB?V(NrHCuIXX zu)yjT_jHT_Tmle|FF?TK1pswuvg#E_k_V^JcV9Gltq~ z+M(3xV-`63yjAuCYAk2ez;3Eu(qKXLW7PmCKD9U~Ey{u_Z2fSZ>)R~4YQ7G+u9q>wQg zvUCkEe{hO)TI4F&ptzPTtx7(v#NNSRCF zVcd;;eAia9E*`u{iGS%&UdBd1(q5AcGGjOm*@(Cx}lx-CxNXMc&iY zwR!fxu-=yyAX{_hm!Aw%A3$;8dHpN=9lT0fi>8KDiWyhkJ>Pc69J4(v1j@2@q_wg z*MN+eNe~7WcT>m9#q+c`IBCGjZ9|g7AHUVC?91t{KY>u;=0&z?N<3Yy23ei#uU(Ge z_{fsl1@!2>?Ra~|Vl@TaL=o!ceQ)iEKl!^<_?ZQyuHSn~_fPOyIG|ph1_TsT;{?%f z?wa*)FG3Cu6#@YNWSgjb_j1Xp@g6DmBblc2g-VOF%i{Hn%GLU8-Gz;IC?s}Ftw-## zshgV*Q$I#*!*`Nky?3-yYItyDpZDLYm%dbC6p$Dic2kuZd4bPa^5%2Shp zqeLX_-Q`fZ+ay0FDaXsRW4~sXlFTi7{HnAA$`VCpK{5%u!WaMpc(`qgRSs(7>OzU4hqsj};*R z1-C5#0D)wkQ`X!v_e80O!N+-XyVc%+85=)z$q9KZT{}^xU{7a_W-F2`n5sl1^w!z| z8w4Hza9SGM9DSQIiCot1SLJk1NeQ=Tzb9PxOQohyhc7AJjLo^xwt7npCWNHTQroW+ zCyg?$T3b88+%Auct-xI{ZOej%$>2wVwEnk>Me)QsFPDat_OD;dgReofir((*Y8=Qh z;;s(?VXxblm9JHE6gk{7Md2~85!-?Nfy#6Ulbm7NzZI(BHx@@v<3aji%#@$}S43eLXj)A<=4V{1a>h>XG?4q^Y6WT) z<45A~V*l?jT4o$c~Wk z@Dy(#Bwq)CNPiWHT;2<6ib0P~vKT(ezra}homU2hPLnZ;z$v0|?Umlwj{q{7J|z<#j(T8@(*S0`)>!eAmL z+!x&iwPXalfXw_29&C_XHfQJ=9F1la^TSF%Eywl_z!{*3Q_@u#`8^S-X-{Ncv52yf zxj+Q>9dEnQ!VSnAh+)I^9W5}p9ii@vFF1=&s+Iv~&TZ+YoM*aL!H;dAhQI8tF&TYr zBSJ1m?mjg2dgGT5HR8`ducTyx08D*i%5++~eDA0+k5gWVK&oi3g;VLLb_?|FV??=9 zzOux&xgsc=r3J6n8%tNnMsrEs2- zrd7%Jd%=EyD6iG5&Xqwe|5PO0_7>ilO`velh*c ziDFN`kENO(LeUN}j`J~%YxVgiq99Q0BBNpC{Xw@3b4c9eL($jWHAKj>mH)h0!MamR zw^21K(5kYR`z#@CSkoGVMMF>KZ3Jr^`yBy@Z|Hfq$6ZpEuC^0*B`KYZfw1Kpo`qri_joi4k`k53z>wZm@mgONL~PFtoWd#ixc&6b0Eq3rs0rjOyLDy0w}b4t(x zI$sTm(Ce8E@ASE@EGYBZpw_tX{tc53#`V&{utFkIwRp7rw|Rt`QV?qFysFJ*bZ6-8 z-aY6Lz-e8vUKlmy4+8uHQ=K2>_gtE!NKEsNQ=k82EhL%8q|y+Odx2%MrpPjm#@d6d zaD;{|RWq9Z?Dn)|WXGPz9krk^qb&3-n7u=E(3!2mo;o6sa1mvL_<@Sr2nm@ybtcob z&SC7nFmnd)@pFJ8d`%S#Vv`YSTV0n(YJ8sYX_h#g{W=@Tx8T=p{HWY_3+b$YyONH! z6K;An-V88BK+`?3sqZsONAZK=RaM=uovjZIVCzSkl4Rt87fs~j4I7h>3Z95SH;K`T zYjocFy&02~7Ikp%d2*IKRS!H;*)IH->cAv89>B2or+)jfwvyL_lGyv1hsmPD=Nw9t z5Aw!c#$fknDKQD8gN981U6>KXeoB!ZtiK&v9qdOC z%F1WGT17VvlX3wocfZf-%;7 zQ*DfJfwk$zGp2!rhO!*dMd>lPo!G`G;EXn$F?H{0aK( zs0dXRgH|t6V#9j3vmo*4P&#qxmhj+kZl^IZktSf3VB5c>3Wo1VV`9RsL2!8kvfutU z!{u4;79N-iN(VuA$ztMbOxKOIr-#rA4Ue*zzt{dVPMV3eoq)FG_3Rd+1~RQ<8iNBA z{TY)>{Pr466&Hq!r-rbf?#zwg3 z3!pmTujJnew3406iegh|_gUcxPz|*=c{K5Yh@7Bzxg3~-ib^3cu;aQTWrnDN`SKEzi z3g8gKJ+6l0zXdY^%nGlfyIv+#X45k$i6FsD0ODs5Jy$8Q@TvRMAoS9i zGi%Ue=-4E*`lY{-y4NL>qam!Y#Qf^gl@)L!(yNK)+LG=0y@-^mr~2nv&TAjv(hz_j&$;jsORk>Y%6& zQBu3!Ger34V@^5SV&(AU=edz>1ak|+h1ywQ+~-qaj((q^$7^spA4-M3M^%_oBcdSw zj)Gy<`UiiimDQ33F$Xa*T@0uc;4}`a89TMb$pa2Rma#0YrV`p*SEJ+qd}kVqN1IrG zNKJNQfq4+)EZ-J&HmoNvl=5?naq&7(`l26XDHbFk_Nabt3^2L|kG7^fKeSNS7;KPi z2HQWA2{_To@vv&A2^MjT=k+JhYi&+!Ha=HlVI0@RI z2llr!6Yg@$8AV}>-+S9uwG!tu0x~RENgULi<%;ZVgiM+90y4gwR(Vmyq|&Dd7+z$j zW82QkXv#Au#iZ<5CiXN_Q6HG2iTP)vuYaQ~Fgbk?r1cd~7YR1K#c|=mJ6Y7zEyP+o z^pnn}bNvd1{qH)hoy@%o*y2NE9sVaZwN<7(eOGMT$S2bu# zsm0tLoa+2E8eswnDb~#QP1oGSn5J(M>3r4Xl1Ndx-CIdbtkX5_V(K{gJ4*Dkx`{2` zHQ$B^LHi93>BQLAtOyQR*7^|VP2}t*4CpMX=e&vuZQiM&|49E@Jfi2rQS0-I66_~R zkp-T^yUMvu@wY5ks0?a_0G#2Jg(+#iF-bv7k^`t|u&8sGmH93Rh8~aC1FmGW0RUYv zS)Ef#|7{={sA5AwJ5sOZo ziQ?&VmSZ!0|KD{@;ZI$zvae4$9BI+V)DKwCOHtGf?zIf}1zY}jQ8WFV7=~vcqU)JR-N43jU9X!5Q5#UM_HBSK<9CkHtRCk^*odE2I3kz7u!<8FXmMUtwUj?G6}#H1cnjEl|-Z89K5BSk>7=`akd*-lKYjt8_?< z1u(QZxT}?2)8%_;a&O;nDyOTZK-?mz24>IHWWGur6^{@&4QF8(@ShYuh9iEmCs}<} zAKRM7Y77Ax|C9lA!;a>6KFWGGehA7Y5FW?}0dAvF_`HAb@bOUUH@crcmkkOdYyeQ&bm^;JwsP%q-dB@%+zKk|-zjlj*lij7KJ~E+?WJN0gBvm`h~5SVXm-vo*o|-@Q{ODmVKo_P;cm}g65&3VZEf0LIyud2DfDnX+znx3<>L_(upZ^tz>ZGtq zWAonEKs=^4XEns62nu+$Xi;XI|4iKK^)!|hvx?*Ba8_?Od$8R%Ljf{c zilRmAZKx>3Shi zjVoigRJk>% z_;|u`QR2m5b^VRK$x{M2jb4^R(SMnr>&PO1Jr=AEXV&>W*&UNB4#xrgNPVWE5+2fj zq=$b1Of*kQykuz|WR3L9G}9*me58FfTr` zQVyf>`)az+2x`c9b=Za%TCocRTC)#9VLdVv-LXgyQQI2B=c=YzbFYcjx3vsJkF2YST#Xh{y#PqXXi9Zvru z;>goIbg~AZQ#ZMFo>UI-TQ7P|k1p!v-H0N=+zg42h^c`cDjONX9~I~%aIBahYsTYq z2>yXwe9My*F3i7o=eCj)rJriSLUN*FWcraCPwH-Gy4Is?F-(COj@I42&5~nvwD%Sa zIjF^EIwu{z?f$*!%|<6B0X_=H(7}JiN=RxbE$FFYR5KF zwslkpNEA9fb*n3-)TA1Rb>C>cC<}-)^^O}mSKF|>4qx^b%NMCD>c*Qjt`Nd8Y-@p) znIms&<@CJ5*xE1))Asf`_cHIl`G)2qu`c!0nm@Y_+a z+25rXE~{xtn#NyV;_;YtKe5N|%`}WNBmus!h1^$D!nA4dmG6MQC~!g;z}6dA%?o&h z+v6P>Zcp4NVX23|ItGxy{J9BSm z@z>KiLddgU*bQ1<9GhN`lrkOiHAZINv}Lj9>%~5L=(IO%LC$iIDx1YMj1#PO!N9R8 z!kxGBflYf9qwH8@Qh%dF6p4vi2RS+ftn$(5JZ9uM986T9?AO`ir5g-6F?>Bthqt)I zkAtVFlJp^fO|S_bKH#3gnny&u5p-0NHI@>}HF0`g& zJq<4ASadpN<=_uXdGB^6!-6vakgCu)$D7*IfeGyLXBNj_nUh5r4ZJeN`O$hAhZreR zc^55gf%;P{28@#w*t*X?@*DM7CJI+|n_Ks*tG-Or>q<4GLw{2ke@%^o_f;RyHe+w8 zI*s7iqp7aCqoX^=U=``i3kS*{enSVvn8L>759b(nv2JZbR8WSn6mL<>o-h9U6bemm zgx~4liczjYF}T9=Od{PogaU2@)8doMr-1@)lMAkS^CmCF{)0BF2=VtPp9uqOO#w%@-sV~2=K&$y`-`l`qK9aWq2z} zj6$}D|B`6Jrh|J4H3Lr?p!$dDMr_@Nu<~s2XRry8wOO*6;I2?|%gwGG#tKx?OFq_GV5t6T_pGV+T#G;YGm#?*CY)_^2y*_ebW%NRYep0J|<)~8> z&(R|%+_9Vc&k*wdMe>_kxqZzoY#Qy%Pz+Gsg90guVE<~{C->>+NM8zb0m!i)<6874 zN&4w9?^C5b(=ZI!rW$ay#ITVceakP5vZO(VP9E~&t*cG5*z%)@JcQzOjQZd?i7i6) zd6z`h=PKIfpixV*BeB(2muO1lkf-sqi< zgQra@T9?rj9`mKq2%p<pph6eN~>NvW+jx&He z8N#OgKNlb{G!)UqD8EngG>PxtKK43y!|lC@rK3#_w}q^e{m*t-#IMDP?+B8X0fs_N zug$3n(i}BZ?2chS5@vQ^s!B-ZN-TS00^tD23df~fN&Tr+RFOx}cH)`10y=0XhxVe3 z;Cc#EwCK?`l<4Z$VU0z#=Xq5d*Q#oG*j{!+fXx->Rqq)yvJF)FGz3JIJfxsDb$Cud z55gDtP1Wd+wXL5Fl*@)FlGdVI8qIu#fn&88P2u|NWM{8z02El3P~^fok z-+gsifp;cZEt`~RhJf&64@U42QUC)0AdSIrI`KXR4`|-#wITRIwS@0lefU{N@!Z7Ra`rxohssoL_pv&C&4yj!Y4!mtmgPLuHdf$8sn_>ExPBZl^_{!+*L|G0+G1l!F#7(+w<^YSbX3FS-`>G`b$LOXGr#y z+g3n}*IBa4VwnrLloEc1Orq4c|Dt4!{K5=tN?AhUwzl)VNj)|Pay0L(707S;I<9K% z^*v4H8qECD&bCmvfIw@?N&zd(HRNLLLJ%Ty4me~H5eN?=mOlB{)(xr}x)8FXjMx8K ze|2W=`QXf7z_1Jns|nkX@;bHK9Q?Gkp+RmSK`P#b54m(xmz4zo@?L%u|1j7&)fg;` z6rPUC9~aqPVENfrnwP44m%Xe>Tx)O{V;n*_(Fp}GG$|YRZzPH7ZYxSR)q-7frVdI4 z)yMaJPI2O7mqA7KP6r9J<`QzL!k?iVYOuTlOTx|BKsR{QtkcwGjohmJA4fV?GXDar zC`k5aspL(f3{GdvuXmvQFEstY{T>7;iUva6Nydo&7PkNq7y551aVwn8qHyh=(qa6! zH?;lbb7H-#cq?K{|31kk$xhY&^t#M}M|kL`c{_VCQ{inBBMi>49DmX}{-xafIDA&} z=Zt|?8n|Dnpr#k&`?l$^#?nFriF~gWi^ISWJ(0FA-8@| z3a?5#E7SL7V$S)9U4wp7j{ios^}(WhWd{@LUkbyBT%~SGu5KG8#mm1j3cBw13HKjE zMvCZobb48to_=R1U=-|Fv<{ulqo+vP54%+MjRLi<$iV+XcPo(Bdvvx*=Ykx)T9*7P%}9#&Ivu2t0{t9 z?BFWAes7@$+N86GrqtbDJqh^xtyXoiGJLo`FQ%wg&^>t3*@Fqbk%uc>lx^=LJ)+YO%x)LpxCY`Nt#Vd#Dem4P>;`#R0p;z6x!>|Fq=3*)CH>MV=oHxB%_=WvTMCD}oeP8&W0MS+VH*Jb2TD`em} z7TynHV(t(CL-*=feYUvMA)JI~R~6I|aHA#q(OG)RyJLt(LxRef-(e9^^yw!A%CQl3 zyy3l!zrqb_eph$@wG^d2A!sWljaPK*2VfDwWU&WvUl0#q36aO$Le+zxjx*PIZ(EW~ z!G~ZRa=QZierMV(LGa7GJuw%}S8d#!h|$GPIAy6)I=3qK=H4BdQ?V4kEQlP$@-iS( z4!azOh|qE@*+2XC8B`uuX~=7RXsP>+%5Hg~q%tR@f%`@9dLMU9cT^rY_ayYa>=Pa( z23zHx__YTtCr$5d45p=jh8pK|rhNk}>*TIL6;psPn!H$~zo7tz`8byLmmE2H3A==C z5E;Z6GFrM;;Y)v_;YR8V0IX-}$Jl*9GsX3H zGvXvK@7%#=SQvixHDN6z^R*NH9JwdB%875;#DSSde?sha`f$i~tjL9ql3;vYfpf>} z>joduhV#e&Gbo;f8GbcqwAwTglBW9mzZt;S6fS8X6d$wFfG z;OU4wNg`64$l-F)9N%kE)rWPar5S|kz#9$8{znvYtJ6V`o(?k;*^)h>;Ptf)#%$vc zbW$#R&kJoYE%o4h;N7=lpIKFOm`o0mJonEo8My3=Ej^rHf|~Br=B|^$hycQASvZjC6lR{_yMDt$*GwEI6q16Ts6RQ;m`FUKdK>$4;ZLeAVJ`q{+9B6lG_V0hS{yH7O$=02*UhZ*g zPfS^lZr6~w_&!c_*fqU!n@I4`-QPO$B6Ki@lIhTeyLYkQf#(8=;CO@z|FMJug=clD zPdjXSe9nVL-cBRDKbY*5?!u3lFw*L7a)8kN*qkaqTw?w0>dGOZpq5`g$FE>rN%K^B zOxB6tHVyOMMNswoT(0e#GXx+|1MznYW>I?OVYXM7-(5yt z*J}o`UW>Ql20J!6rk+_OL&qqp1AGXc74VbioL18TDIY&7<321Pov!J?!pP#lD$MzI zN0G)w4`XC4j%;RTqj|4UEUp zIQ%XXl=&-gq2*vUp}(G|yx)&PXZRcDQK=nR75PUnQ((43ZgQVdXywQD9~g%Fi%T7}Kr);s2+=UEIh=9NCj~DyxYC5P_>UL74Va%n`>&-KBu0t9qc;8Vh znb{-N&UE)<2EV0feoM820DE5a$>@4;yDMOpQo1o6PWOrD6P^^=x|6-e+Rl`rb@j+b ze7ca@#;?Q9xKC`c&g<^hqGAF$i9Aj(u1Ui0{ibl#$_k0$}lQ``%m8W;^ia zI^tf>?Awdz&u+ec?KtOFq{t02iznoNbeBCTwDoS#TExnOf}Gt6aG4}V!871M)-NY} zi{Ez_ko*E$(tSTozW9o_C6Fkt>vZGk$1&67(f}&R!K7K!GdZI$D;n4XMPTqB*LApR z``3YU3_wUOefWtRZFFb^Ryai^Jff@fnmrLFjAn}zNXWW=rp$3Bsr^+2lH|t(FhQTL zJ9{h4cEri-S!#C~kCjgz>$kWfV32m)jCbXuiMefN?c|3vHFwkyTbAVU1rppKR)QH2 z6TNjFo`F8fh1Uqd&EDsEn$c__2a}DO3hfoj@-N6W!r)r17cTZsS_;|lcQbkhz3+}t zKqq;;>h5Y8#xBiU|GO}VTD|<}j;~BNXU;f=4RhaI+s}5cZ&q@A=%!Q(s6D*N@Ch#2 zDId%54R~f@moCXjxsQ~s6FNeCukKCth~zuZA&QM!+jRVg++!n_GMtl#)qQI?&sQas z{I+RhxC{kJkVCH$4A!Ailpk;&y%RCmLuH(nO7?dJEJ*6TAFrSf77woyxI@zDlr>Gs zX$qVeuANaZP|b6X7_CK;K$abK!AiWvg$`El&19yiPb(<26c)Mp1JpdDGDAMTXo%iH zFz#~WJL}+|IM3sCqEKde7}B4u`U?lx=5xGZUMB`D{#(}v-ypp{2a_(o?5q`6 zL4?HD%6__YeaQ@$RMxc0Q>Y2fG@3hRf(-eWSi_L!7IF|E zq?!M>L|!6b182ags_!%s5Qq#(kHUgjh(HYQhGKkjTC=uwkx>)v)il<0G9gJkf z=M~NaC!B|kKr97uV)t6!XcaAJsNIyTU(YC$=rzu*GfEMKS}%!PFR5EHRoE^#rCM5A zA$WDa!U(<5?^)uvN_SjY55>1puqpP}0{Ixv4*1T|3m_ya6^~{!3ZZopp(tj&f(O}N z{F8MPc|hmg+V|WHkCLNAm#h29@3e{dT=(JAktrgDyGc0#iQS(U7MXfD?ESW1-jF>; zuYVLIGl1p)ss$QbWE}2UTZ<$5^eO*kjM@U;HUM<4T`j~SI>$2!B$sIOYi(E zU3hSXwtsV`Fhl06$7d|2Q1wi@AoOeMs#?h^$NVOO2M}z1A1rCCTmB()tpCF

    CI;rR@7Wy;t%s@Yik^~G@FPy&aKr&?}w>%~A8UPdl8 z^(JQ4^fy{ub4%&q^m>i?!tNdCl2>D_1LYm}L| z&jg+e<$T#Yp8Z`iuLRZ(Ao=6CvI43Tq=zdP6BnZrGU6#n#vLtFj)JE46AdGS zwZ0w!7PP%!h%T1p9>654Y(Y`Tj(A4|U?O@o4!x<2| z;VBxYqI=^yJmV}HAH~ik-1U;uZ~0_JD}>TR^`j)m+3BL1KVkAWg%FoRmh&Yf$tC2$ zx|F!C)F>BP&yBdolnGj5WM~kT3Rf_7$E50{AzX<{@?82Tj_iS}^u$mP*8uu48kP=! z4Tc|m`)dgjdwak`fYeJ40h4CatZ!HhM=6+M7ne0p7nu==fFC{HvWSm&!AYZ$UfMER zS3%?6PsgDYUvslSa7$qR=hD(J^K*Uu`&ROs66ewS+-L6CWnF5X*vUao?6EzAS4axY z-xn!(#GD=IBs8D{>-CkWlxYDZb89SJfvT9fE>l$twFSGFHI|e`4p0J{DGi*Ts~*o`#DyZo zLb!n@%zq%*dgV|6bE*=6D!lNR?}{l5^dxymWC6s>f8JD1+!aL=cpVA$G|7_K*=UX0 z6@MfLxoIN;E~-x|?UeH}1Gr9;q8J*p8r_2$?bgk5n-1Gv2Af-#8r*)k$rGjBnq8%3 z9^;E4 zlM1%RYEw}J_&|@VY!LAv!Z?-~0_bC)N&qFa;UEHRAO^eYO>taVV1md<_CK~K z@rhGBh34e${Vx#G`46b=*-dQf#s$^1CFD1rG2OjNw0n?eTXC1&V635^j8FbCr9n+j zH-MXmLu5AhdqIXCZd=A50nNxI%k@2;y_9YNmAseW|&L}pgbyq`lw5mn>Zv?8%)H15_39N?D5{EQ0HaO;+It0ue%hx`D*I$uva=-!opwaRZY-uuy9OUG z{9eE=9XdzW^h@FzdhO$1YDuk*!*rS<3;z}DpAKrcbVB;gl^$V6oh+4Nl>Rmj!v1?= zu_Z>q$41#I!qDH6+!%@nX8m2YGEP!s0uVjd?)S|9mOpF`*)P_}2HcZoY9i72@Rr~= zi&16%geK>VAmWT9YKb87j^MvQ>w=!~`!qFU0*!RaH1H2zvB_Q67l=tl-yZD60(1v| z0eXSEix4rp87`6$#$E(dY(kodo}=(bt+q*QE6oyKZM(UQN)x@dVo4A$p1a^4S7F=P=q-iFDrlM*_33BgfD8cv1)VIFSZZ9i1X%L4_PGQ@` z(9G~s>1qEPrXY841Oo}9{=>e`mbSB(X@pO&Kcb<==k*vO|Ly6$rReUFAoq?5EbZr~xJ(gR(ayEmIIyxK3VguTx-&J08a zV?0nrY-1h%LUK*8sK}#^$i5jFGwc2bi!{A>y54@hLA(H!!3dMHPGp~3yxEoW2pwy))rSz$%B`M@liZUEP)@N`nU?iVplvN@vG5ZDb(; zXIUmyCIZlUD#uFML8t{GKM}x$d)EGf4&zQ5E&0dY0i**#yH)@+gb5(uSuEx}R;xfF z(b*mGmkfh2>+k4vj=)k1L4@$|Ib>)D@=Q|G+Pw^&~^Llqr0=&mu^Q`s1oLnn|`vL_x1a=|yZ zt8@e`VnTD++cvV{GeBMgox=QyZl90S%eLQlesjQnRb%)E{6u*JIr$Oze<&uszCb3r zrU3%LN^utJ(Df07N&e+!`{d!yORGTh5Xn!_LSB;Ph{G)p4H4Ux>3iUJ4DIm4I4@~gArV^ z-q=kuc{Wt(Xzz(UhWlfKK4x{YF;h{xv3Ip!)j%;jUp*RKDZ{OR_2+tgH>edq=fEYl z@;}gd09~OoaWD@Bo9{+zWba0CPe}sT_2M$7xg=^^Skw|FHis)l0SAkyR`nM1Da*sO z|0^*MBjR>7aIhEG*wXk{=yr)m_!DYRf)krsq>&*cs}_RkY)D`V+lCz$4!|7xj3t8T z=>6#}K^o9WQV<4WT9o~+zdeX3e3sUTwuvge-}n_7DfM3f1T#LSP4AQ@0RVh0KUEwC zMYw=2Vl88T2MF%cE|0D`$wtR4H@M#A|5<)^9-gp*)^E$0PBs|w9#N%=cWQI}!|j$6 z#MQqKC>aBj|Aq_($TKV?u_dLlUQhfz#Y@mMRN>akCnAlme+c7}GBXvq2_jH%bWNY@ zH^TKEeae(>fWNvvv1p_nHv~JLoxgvNHP!3@+}xpdok`;@(ryYU{m{9|1VN0 zaCM2~F{QZ=c*ZY%oGgH*`p>Q7IXy-Xl7eZ}{*iT{g6*<@kM5Es6HL0=y;0NUg(