Imported Upstream version 2.6.0

This commit is contained in:
arnaud.quette@free.fr 2011-01-26 10:35:08 +01:00
parent 26fb71b504
commit 459aaf9392
510 changed files with 40508 additions and 18859 deletions

View file

@ -17,7 +17,8 @@ RedHat/upsmon \
RedHat/upsmon.in \
Solaris8/S99upsmon \
subdriver/path-to-subdriver.sh \
upower/95-upower-hid.rules \
Windows/halt.c \
Windows/Makefile
SUBDIRS = hal hotplug python udev
SUBDIRS = augeas hal hotplug python udev

View file

@ -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,
@ -37,12 +37,13 @@ target_triplet = @target@
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_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 \
@ -52,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
@ -104,9 +106,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@
@ -119,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@
@ -137,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@
@ -148,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@
@ -278,10 +283,11 @@ RedHat/upsmon \
RedHat/upsmon.in \
Solaris8/S99upsmon \
subdriver/path-to-subdriver.sh \
upower/95-upower-hid.rules \
Windows/halt.c \
Windows/Makefile
SUBDIRS = hal hotplug python udev
SUBDIRS = augeas hal hotplug python udev
all: all-recursive
.SUFFIXES:
@ -329,7 +335,7 @@ clean-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]*);; \
@ -354,7 +360,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]*);; \

View file

@ -4,8 +4,10 @@ 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.
- Perl client module,
- Augeas support lenses and modules for NUT.
They have either been contributed by users of the software, or by the NUT Team
itself.

View file

@ -0,0 +1,16 @@
EXTRA_DIST = gen-nutupsconf-aug.py nutupsconf.aug.tpl \
README tests/test_nut.aug
# 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 \
echo "Regenerating Augeas ups.conf lens."; \
$(distdir)/gen-nutupsconf-aug.py $(distdir)/; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Python is not available."; \
echo "Skipping Augeas ups.conf lens regeneration."; \
echo "----------------------------------------------------------------------"; \
fi

457
scripts/augeas/Makefile.in Normal file
View file

@ -0,0 +1,457 @@
# 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 = 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
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 = nutnutconf.aug nutupsconf.aug nutupsdconf.aug \
nutupsdusers.aug nutupsmonconf.aug nutupsschedconf.aug \
nuthostsconf.aug nutupssetconf.aug
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@
EXTRA_DIST = gen-nutupsconf-aug.py nutupsconf.aug.tpl \
README tests/test_nut.aug
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/augeas/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu scripts/augeas/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):
nutnutconf.aug: $(top_builddir)/config.status $(srcdir)/nutnutconf.aug.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nutupsconf.aug: $(top_builddir)/config.status $(srcdir)/nutupsconf.aug.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nutupsdconf.aug: $(top_builddir)/config.status $(srcdir)/nutupsdconf.aug.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nutupsdusers.aug: $(top_builddir)/config.status $(srcdir)/nutupsdusers.aug.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nutupsmonconf.aug: $(top_builddir)/config.status $(srcdir)/nutupsmonconf.aug.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nutupsschedconf.aug: $(top_builddir)/config.status $(srcdir)/nutupsschedconf.aug.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nuthostsconf.aug: $(top_builddir)/config.status $(srcdir)/nuthostsconf.aug.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nutupssetconf.aug: $(top_builddir)/config.status $(srcdir)/nutupssetconf.aug.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
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
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
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 \
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
# 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 \
echo "Regenerating Augeas ups.conf lens."; \
$(distdir)/gen-nutupsconf-aug.py $(distdir)/; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Python is not available."; \
echo "Skipping Augeas ups.conf lens regeneration."; \
echo "----------------------------------------------------------------------"; \
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.
.NOEXPORT:

205
scripts/augeas/README Normal file
View file

@ -0,0 +1,205 @@
NUT configuration management with Augeas
========================================
Introduction
------------
Configuration has long been one of the two main NUT weaknesses. This is
mostly due to the framework nature of NUT, and its many components and
features, which make NUT configuration a very complex task.
In order to address this point, NUT now provides configuration tools and
manipulation abstraction, to anybody who want to manipulate NUT configuration,
through Augeas lenses and modules.
From link:http://augeas.net[Augeas homepage]:
"Augeas is a configuration editing tool. It parses configuration files in their
native formats and transforms them into a tree. Configuration changes are made
by manipulating this tree and saving it back into native config files."
In other words, Augeas is the dreamed Registry, with all the advantages
(such as a uniform interface and tools), and the added bonus of being
free/libre open source software and letting liberty on configuration file
format.
Requirements
------------
To be able to use Augeas with NUT, you will need to install Augeas,
and also the NUT provided lenses, which describe NUT configuration
files format.
Augeas
~~~~~~
Having link:http://augeas.net[Augeas] installed.
You will need at least version 0.5.1 (prior versions may work too, reports
are welcome).
As an example, on Debian and derivatives, do the following:
$ apt-get install augeas-lenses augeas-tools
And optionaly:
$ apt-get install libaugeas0 libaugeas-dev python-augeas
On RedHat and derivatives, you have to install the packages 'augeas' and
'augeas-libs'.
[[augeas_user]]
NUT lenses and modules for Augeas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These are the *.aug files in the present directory.
You can either install the files to the right location on your system,
generally in '/usr/share/augeas/lenses/', or use these from NUT
source directory ('nut/scripts/augeas'). The latter is to be prefered for
the time being.
Create a test sandbox
---------------------
NOTE: for now, it's easier to include an existing /etc/nut/ directory.
$ export AUGEAS_ROOT=./augeas-sandbox
$ mkdir $AUGEAS_ROOT
$ sudo cp -pr /etc/nut $AUGEAS_ROOT
$ sudo chown -R $(id -nu):$(id -ng) $AUGEAS_ROOT
Start testing and using
-----------------------
Augeas provides many tools and
link:http://augeas.net/download.html[languages bindings] (Python, Perl,
Java, PHP, Ruby, ...), still with the same simple logic.
This chapter will only illustrate some of these. Refer to the language
binding's help and link:http://augeas.net/docs/index.html[Augeas documentation]
for more information.
Shell
~~~~~
Start an augeas shell using:
$ augtool -b
NOTE: if you have not installed NUT lenses, add '-I/path/to/nut/scripts/augeas'.
From there, you can perform different actions like:
- list existing nut related files:
augtool> ls /files/etc/nut/
nut.conf/ = (none)
upsd.users/ = (none)
upsmon.conf = (none)
ups.conf/ = (none)
upsd.conf/ = (none
+
or using:
+
augtool> match /files/etc/nut/*
/files/etc/nut/nut.conf = (none)
/files/etc/nut/upsd.users = (none)
/files/etc/nut/upsmon.conf = (none)
/files/etc/nut/ups.conf = (none)
/files/etc/nut/upsd.conf = (none)
NOTE: if you don't see anything, you may search for error messages by using:
+
augtool> ls /augeas/files/etc/nut/*/errors
and
augtool> get /augeas/files/etc/nut/ups.conf/error/message
/augeas/files/etc/nut/ups.conf/error/message = Permission denied
- create a new device entry (in ups.conf), called 'augtest':
augtool> set /files/etc/nut/ups.conf/augtest/driver dummy-ups
augtool> set /files/etc/nut/ups.conf/augtest/port auto
augtool> save
- list the devices using the 'usbhid-ups' driver:
augtool> match /files/etc/nut/ups.conf/*/driver dummy-ups
C
~
A library is available for C programs, along with pkg-config support.
You can get the compilation and link flags using the following code
in your configure script or Makefile:
CFLAGS="`pkg-config --silence-errors --cflags augeas`"
LDFLAGS="`pkg-config --silence-errors --libs augeas`"
Here is an code sample using this library for NUT configuration:
--------------------------------------------------------------------------------
augeas *a = aug_init(NULL, NULL, AUG_NONE);
ret = aug_match(a, "/files/etc/nut/*", &matches_p);
ret = aug_set(a, "/files/etc/nut/ups.conf/augtest/driver", "dummy-ups");
ret = aug_set(a, "/files/etc/nut/ups.conf/augtest/port", "auto");
ret = aug_save(a);
--------------------------------------------------------------------------------
Python
~~~~~~
The `augeas` class abstracts access to the configuration files.
$ python
Python 2.5.1 (r251:54863, Apr 8 2008, 01:19:33)
[GCC 4.3.0 20080404 (Red Hat 4.3.0-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import augeas
>>> a = augeas.augeas()
>>> a.match("/files/etc/nut/*")
['/files/etc/nut/upsd.users', '/files/etc/nut/upsmon.conf', '/files/etc/nut/ups.conf', '/files/etc/nut/upsd.conf']
>>> a.set("/files/etc/nut/ups.conf/augtest/driver", "dummy-ups")
True
>>> a.set("/files/etc/nut/ups.conf/augtest/port", "auto")
True
>>> a.save()
True
>>>
$ grep -A 2 augtest /etc/nut/ups.conf
[augtest]
driver=dummy-ups
port=auto
Perl
~~~~
The Perl binding is available through CPAN and packages.
use Config::Augeas;
my $aug = Config::Augeas->new( root => $aug_root ) ;
my @a = $aug->match("/files/etc/nut/*") ;
my $nb = $aug->count_match("/files/etc/nut/*") ;
$aug->set("/files/etc/nut/ups.conf/augtest/driver", "dummy-ups") ;
$aug->set("/files/etc/nut/ups.conf/augtest/port", "auto") ;
$aug->save ;
Test the conformity testing module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Existing configuration files can be tested for conformity. To do so, use:
$ augparse -I ./ ./test_nut.aug

View file

@ -0,0 +1,119 @@
#!/usr/bin/env python
# Copyright (C) 2010 - Arnaud Quette <arnaud.quette@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# This program extracts all drivers specific variables, declared
# using 'addvar()' and output a complete ups.conf lens for Augeas
import sys
import re
import glob
import codecs
# Return a sorted list of unique entries, based on the input 'list'
def sortUnique(list):
newVarList = []
prevVar = ''
# sort the list
list.sort()
for curVariable in list:
if curVariable != prevVar:
newVarList.append(curVariable)
prevVar = curVariable
return newVarList
# Grep for 'string' pattern in the text 'list',
# excluding C/C++ styles comments
# Return the list of matching lines
def grep(string,list):
matchList = []
expr = re.compile(string)
for text in list:
match = expr.search(text)
if match != None:
# Exclude comments
exprComment = re.compile('(/\*([^*]|(\*+[^*/]))*\*+/)|(//.*)')
if (exprComment.search(match.string) == None):
matchList.append(match.string)
return matchList
if __name__ == '__main__':
rawCount = 0
global finalCount
variableNames = []
specificVars = ""
global inLensContent
global finalLensContent
Exceptionlist = ['../../drivers/main.c', '../../drivers/skel.c']
outputFilename = 'nutupsconf.aug.in'
templateFilename = 'nutupsconf.aug.tpl'
dirPrefix = ''
if (len(sys.argv) == 2):
dirPrefix = sys.argv[1]
print dirPrefix
# 1/ Extract all specific drivers parameters, in a sorted list with unique entries
# 1.1/ List all drivers implementation files
for filename in glob.glob('../../drivers/*.c'):
# 1.2/ Exclude main.c, which defines addvar() and skel.c (example driver)
if filename not in Exceptionlist:
fd = codecs.open(filename, encoding='utf-8')
# 1.3/ Grep for the "addvar(..." pattern
matchResults = grep ('.*addvar[\ ]*\(.*(VAR_FLAG|VAR_VALUE)*,.*', fd)
# 1.4/ Extract variable names
for line in matchResults:
row = line.split(',')
if len(row) >= 2:
# Absence of quotes indicate that we have a #define
# Let's grep in .ch related files
if (row[1].find('"') == -1):
for defFilename in glob.glob(filename.replace('.c', '.[ch]')):
defFd = codecs.open(defFilename, encoding='utf-8')
matchString = '^#define.*' + row[1].replace('"', '').lstrip() + '.*'
matchResult = grep (matchString, defFd)
for varDefine in matchResult:
# Now search for a string
defRow = re.findall(r'"([^"]*)",?', varDefine)
if (len(defRow) == 1):
variableNames.append(defRow[0])
else:
# Remove quotes
variableNames.append(row[1].replace('"', '').lstrip())
# Filter multiply defined variables
variableNames = sortUnique(variableNames)
# Create the formated list of specific variables
for name in variableNames:
specificVars += " | \"%s\"\n" %(name)
# 2/ Load the template lens
tplFd = codecs.open(dirPrefix + templateFilename, encoding='utf-8')
# 2.1/ Search for the pattern to replace
outputText = tplFd.read()
outputText = outputText.replace('@SPECIFIC_DRV_VARS@', specificVars)
# 3/ Output final lens
outFd = codecs.open(outputFilename, mode='w', encoding='utf-8')
outFd.write(outputText)

View file

@ -0,0 +1,45 @@
(*
Module: NutHostsConf
Parses @CONFPATH@/hosts.conf
Author: Frederic Bohe <fredericbohe@eaton.com>
About: License
This file is licensed under the GPL.
About: Lens Usage
Sample usage of this lens in augtool
* Print all monitored upsd
> print /files@CONFPATH@/hosts.conf/MONITOR
About: Configuration files
This lens applies to @CONFPATH@/hosts.conf. See <filter>.
*)
module NutHostsConf =
autoload hosts_xfm
(************************************************************************
* Group: HOSTS.CONF
*************************************************************************)
(* general *)
let del_spc = Util.del_opt_ws ""
let sep_spc = Util.del_ws_spc
let eol = Util.eol
let word = /[^"#; \t\n]+/
let empty = Util.empty
let comment = Util.comment
let quoted_string = del "\"" "\"" . store /[^"\n]+/ . del "\"" "\""
let hosts_notify = [ del_spc . key "MONITOR" . sep_spc
. [ label "system" . store word . sep_spc ]
. [ label "description" . quoted_string ] . eol ]
let hosts_lns = (hosts_notify|comment|empty)*
let hosts_filter = ( incl "@CONFPATH@/hosts.conf" )
. Util.stdexcl
let hosts_xfm = transform hosts_lns hosts_filter

View file

@ -0,0 +1,48 @@
(*
Module: NutNutConf
Parses @CONFPATH@/nut.conf
Author: Frederic Bohe <fredericbohe@eaton.com>
About: License
This file is licensed under the GPL.
About: Lens Usage
Sample usage of this lens in augtool
* Print NUT MODE start-up configuration:
> print /files@CONFPATH@/nut.conf/MODE
About: Configuration files
This lens applies to @CONFPATH@/nut.conf. See <filter>.
*)
module NutNutConf =
autoload nut_xfm
(************************************************************************
* Group: NUT.CONF
*************************************************************************)
(* general *)
let def_sep = IniFile.sep IniFile.sep_re IniFile.sep_default
let sep_spc = Util.del_opt_ws ""
let eol = Util.eol
let comment = Util.comment
let empty = Util.empty
let nut_possible_mode = "none"
| "standalone"
| "netserver"
| "netclient"
let nut_mode = [ sep_spc . key "MODE" . def_sep . sep_spc . store nut_possible_mode . eol ]
let nut_lns = (nut_mode|comment|empty)*
let nut_filter = ( incl "@CONFPATH@/nut.conf" )
. Util.stdexcl
let nut_xfm = transform nut_lns nut_filter

View file

@ -0,0 +1,159 @@
(*
Module: NutUpsConf
Parses @CONFPATH@/ups.conf
Author: Raphael Pinson <raphink@gmail.com>
Frederic Bohe <fredericbohe@eaton.com>
Arnaud Quette <arnaud.quette@gmail.com>
About: License
This file is licensed under the GPL.
About: Lens Usage
Sample usage of this lens in augtool
* Print all drivers used
> print /files/@CONFPATH@/ups.conf/*/driver
About: Configuration files
This lens applies to @CONFPATH@/ups.conf. See <filter>.
*)
module NutUpsConf =
autoload ups_xfm
(************************************************************************
* Group: UPS.CONF
*************************************************************************)
let ups_comment = IniFile.comment IniFile.comment_re IniFile.comment_default
let ups_sep = IniFile.sep IniFile.sep_re IniFile.sep_default
let ups_global = "chroot"
| "driverpath"
| "maxstartdelay"
| "pollinterval"
| "user"
let ups_fields = "driver"
| "port"
| "sdorder"
| "desc"
| "nolock"
| "maxstartdelay"
| "CP"
| "CS"
| "ID"
| "LB"
| "LowBatt"
| "OL"
| "OffDelay"
| "OnDelay"
| "SD"
| "authPassword"
| "authProtocol"
| "batteryPercentage"
| "battext"
| "baud_rate"
| "baudrate"
| "bus"
| "cable"
| "cablepower"
| "chargetime"
| "community"
| "daysoff"
| "daysweek"
| "dumbterm"
| "explore"
| "fake_lowbatt"
| "flash"
| "frequency"
| "full_update"
| "houroff"
| "houron"
| "idleload"
| "input_timeout"
| "linevoltage"
| "load.off"
| "load.on"
| "load.status"
| "loadPercentage"
| "login"
| "lowbatt"
| "manufacturer"
| "max_load"
| "methodOfFlowControl"
| "mfr"
| "mibs"
| "mincharge"
| "minruntime"
| "model"
| "modelname"
| "nohang"
| "nombattvolt"
| "norating"
| "notification"
| "notransferoids"
| "novendor"
| "nowarn_noimp"
| "numOfBytesFromUPS"
| "offdelay"
| "oldmac"
| "ondelay"
| "output_pace"
| "password"
| "pollfreq"
| "pollonly"
| "powerup"
| "prefix"
| "prgshut"
| "privPassword"
| "privProtocol"
| "product"
| "productid"
| "protocol"
| "rebootdelay"
| "runtimecal"
| "sdtime"
| "sdtype"
| "secLevel"
| "secName"
| "serial"
| "serialnumber"
| "shutdownArguments"
| "shutdown_delay"
| "silent"
| "snmp_version"
| "startdelay"
| "status_only"
| "subdriver"
| "subscribe"
| "testtime"
| "timeout"
| "type"
| "ups.delay.shutdown"
| "ups.delay.start"
| "upstype"
| "usd"
| "use_crlf"
| "use_pre_lf"
| "validationSequence"
| "vendor"
| "vendorid"
| "voltage"
| "wait"
let ups_entry = IniFile.indented_entry (ups_global|ups_fields) ups_sep ups_comment
let ups_title = IniFile.indented_title IniFile.record_re
let ups_record = IniFile.record ups_title ups_entry
let ups_lns = IniFile.lns ups_record ups_comment
let ups_filter = (incl "@CONFPATH@/ups.conf")
. Util.stdexcl
let ups_xfm = transform ups_lns ups_filter

View file

@ -0,0 +1,58 @@
(*
Module: NutUpsConf
Parses @CONFPATH@/ups.conf
Author: Raphael Pinson <raphink@gmail.com>
Frederic Bohe <fredericbohe@eaton.com>
Arnaud Quette <arnaud.quette@gmail.com>
About: License
This file is licensed under the GPL.
About: Lens Usage
Sample usage of this lens in augtool
* Print all drivers used
> print /files/@CONFPATH@/ups.conf/*/driver
About: Configuration files
This lens applies to @CONFPATH@/ups.conf. See <filter>.
*)
module NutUpsConf =
autoload ups_xfm
(************************************************************************
* Group: UPS.CONF
*************************************************************************)
let ups_comment = IniFile.comment IniFile.comment_re IniFile.comment_default
let ups_sep = IniFile.sep IniFile.sep_re IniFile.sep_default
let ups_global = "chroot"
| "driverpath"
| "maxstartdelay"
| "pollinterval"
| "user"
let ups_fields = "driver"
| "port"
| "sdorder"
| "desc"
| "nolock"
| "maxstartdelay"
@SPECIFIC_DRV_VARS@
let ups_entry = IniFile.indented_entry (ups_global|ups_fields) ups_sep ups_comment
let ups_title = IniFile.indented_title IniFile.record_re
let ups_record = IniFile.record ups_title ups_entry
let ups_lns = IniFile.lns ups_record ups_comment
let ups_filter = (incl "@CONFPATH@/ups.conf")
. Util.stdexcl
let ups_xfm = transform ups_lns ups_filter

View file

@ -0,0 +1,65 @@
(*
Module: NutUpsdConf
Parses @CONFPATH@/upsd.conf
Author: Raphael Pinson <raphink@gmail.com>
Frederic Bohe <fredericbohe@eaton.com>
Arnaud Quette <arnaud.quette@gmail.com>
About: License
This file is licensed under the GPL.
About: Lens Usage
Sample usage of this lens in augtool
* Print all network interface upsd will listen to
> print /files@CONFPATH@/upsd.conf/LISTEN
About: Configuration files
This lens applies to @CONFPATH@/upsd.conf. See <filter>.
*)
module NutUpsdConf =
autoload upsd_xfm
(************************************************************************
* Group: UPSD.CONF
*************************************************************************)
(* general *)
let sep_spc = Util.del_ws_spc
let opt_spc = Util.del_opt_ws ""
let eol = Util.eol
let ip = /[0-9A-Za-z\.:]+/
let num = /[0-9]+/
let word = /[^"#; \t\n]+/
let empty = Util.empty
let comment = Util.comment
let path = word
let upsd_maxage = [ opt_spc . key "MAXAGE" . sep_spc . store num . eol ]
let upsd_statepath = [ opt_spc . key "STATEPATH" . sep_spc . store path . eol ]
let upsd_listen = [ opt_spc . key "LISTEN" . sep_spc
. [ label "interface" . store ip ]
. [ sep_spc . label "port" . store num]? ]
let upsd_listen_list = upsd_listen . eol
let upsd_maxconn = [ opt_spc . key "MAXCONN" . sep_spc . store num . eol ]
let upsd_certfile = [ opt_spc . key "CERTFILE" . sep_spc . store path . eol ]
(************************************************************************
* MAXAGE seconds
* STATEPATH path
* LISTEN interface port
* Multiple LISTEN addresses may be specified. The default is to bind to 0.0.0.0 if no LISTEN addresses are specified.
* LISTEN 127.0.0.1 LISTEN 192.168.50.1 LISTEN ::1 LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344
*
*************************************************************************)
let upsd_other = upsd_maxage | upsd_statepath | upsd_listen_list | upsd_maxconn | upsd_certfile
let upsd_lns = (upsd_other|comment|empty)*
let upsd_filter = (incl "@CONFPATH@/upsd.conf")
. Util.stdexcl
let upsd_xfm = transform upsd_lns upsd_filter

View file

@ -0,0 +1,83 @@
(*
Module: NutUpsdUsers
Parses @CONFPATH@/upsd.users
Author: Raphael Pinson <raphink@gmail.com>
Frederic Bohe <fredericbohe@eaton.com>
About: License
This file is licensed under the GPL.
About: Lens Usage
Sample usage of this lens in augtool
* Print all users granted to send commands to UPS
> /files@CONFPATH@/upsd.users/fred/actions/SET
About: Configuration files
This lens applies to @CONFPATH@/upsd.users. See <filter>.
*)
module NutUpsdUsers =
autoload upsd_users_xfm
(************************************************************************
* Group: UPSD.USERS
*************************************************************************)
(* general *)
let del_spc = Util.del_opt_ws ""
let sep_spc = Util.del_ws_spc
let eol = Util.eol
let ip = /[0-9A-Za-z\.:]+/
let num = /[0-9]+/
let word = /[^"#; \t\n]+/
let empty = Util.empty
(* let netblock = /[0-9A-Za-z\.:\/]+/ *)
let netblock = word
let path = word
let upsd_users_comment = IniFile.comment IniFile.comment_re IniFile.comment_default
let upsd_users_sep = IniFile.sep IniFile.sep_re IniFile.sep_default
let upsd_users_fields = "password"
| "instcmds"
let upsd_users_entry = IniFile.indented_entry upsd_users_fields upsd_users_sep upsd_users_comment
let upsd_users_actions_entry = [ key /SET|FSD/ ]
let upsd_users_actions = [ del_spc
. key "actions" . upsd_users_sep
. del_spc
. upsd_users_actions_entry
. ( sep_spc . upsd_users_actions_entry )*
. ( upsd_users_comment|eol ) ]
(* FIXME: NEEDED? can be all, or a list of instant commands *)
let upsd_users_instcmds_entry = [ key /ALL|FSD/ ]
let upsd_users_instcmds = [ del_spc
. key "instcmds" . upsd_users_sep
. del_spc
. upsd_users_instcmds_entry
. ( sep_spc . upsd_users_instcmds_entry )*
. ( upsd_users_comment|eol ) ]
let upsd_users_upsmon = [ del_spc
. key "upsmon" . sep_spc
. store /master|slave/ . eol ]
let upsd_users_title = IniFile.indented_title IniFile.record_re
let upsd_users_record = IniFile.record upsd_users_title (upsd_users_entry|upsd_users_actions|upsd_users_upsmon)
let upsd_users_lns = IniFile.lns upsd_users_record upsd_users_comment
let upsd_users_filter = ( incl "@CONFPATH@/upsd.users" )
. Util.stdexcl
let upsd_users_xfm = transform upsd_users_lns upsd_users_filter

View file

@ -0,0 +1,122 @@
(*
Module: NutUpsmonConf
Parses @CONFPATH@/upsmon.conf
Author: Raphael Pinson <raphink@gmail.com>
Frederic Bohe <fredericbohe@eaton.com>
About: License
This file is licensed under the GPL.
About: Lens Usage
Sample usage of this lens in augtool
* Print all notification messages
> print /files@CONFPATH@/upsmon.conf/NOTIFYMSG
About: Configuration files
This lens applies to @CONFPATH@/upsmon.conf. See <filter>.
*)
module NutUpsmonConf =
autoload upsmon_xfm
(************************************************************************
* Group: UPSMON.CONF
*************************************************************************)
(* general *)
let del_spc = Util.del_opt_ws ""
let sep_spc = Util.del_ws_spc
let eol = Util.eol
let num = /[0-9]+/
let word = /[^"#; \t\n]+/
let empty = Util.empty
let comment = Util.comment
let quoted_string = del "\"" "\"" . store /[^"\n]+/ . del "\"" "\""
(* UPS identifier
* <upsname>[@<hostname>[:<port>]]
*
* There might be a cleaner way to write this
* but I'm stuck with (hostname | hostname . port)?
*)
let hostname = [ label "hostname" . store /[^ \t\n:]+/ ]
let port = [ label "port" . store num ]
let identifier = [ label "upsname" . store /[^ \t\n@]+/ ]
. ( ( Util.del_str "@" . hostname )
| ( Util.del_str "@" . hostname
. Util.del_str ":" . port ) )?
let upsmon_num_re = "DEADTIME"
| "FINALDELAY"
| "HOSTSYNC"
| "MINSUPPLIES"
| "NOCOMMWARNTIME"
| "POLLFREQ"
| "POLLFREQALERT"
| "RBWARNTIME"
let upsmon_num = [ del_spc . key upsmon_num_re . sep_spc . store num . eol ]
let upsmon_word = [ del_spc . key "RUN_AS_USER" . sep_spc . store word . eol ]
let upsmon_file_re = "NOTIFYCMD"
| "POWERDOWNFLAG"
| "SHUTDOWNCMD"
let sto_to_eol = IniFile.sto_to_eol
(* here we should support both quoted and not quotted
* string but I can't manage to find the right way of doing this
*)
let upsmon_file = [ del_spc . key upsmon_file_re . sto_to_eol . eol ]
(* MONITOR system powervalue username password type *)
let upsmon_monitor = [ del_spc . key "MONITOR" . sep_spc
. [ label "system" . identifier ] . sep_spc
. [ label "powervalue" . store num ] . sep_spc
. [ label "username" . store word ] . sep_spc
. [ label "password" . store word ] . sep_spc
. [ label "type" . store word ] . eol ]
let upsmon_notify_type = "ONLINE"
| "ONBATT"
| "LOWBATT"
| "FSD"
| "COMMOK"
| "COMMBAD"
| "SHUTDOWN"
| "REPLBATT"
| "NOCOMM"
| "NOPARENT"
let upsmon_notify = [ del_spc . key "NOTIFYMSG" . sep_spc
. [ label "type" . store upsmon_notify_type . sep_spc ]
. [ label "message" . quoted_string ] . eol ]
let flags = "IGNORE"
| "SYSLOG"
| "WALL"
| "EXEC"
let plus = [ del /\+*/ "" ]
(*let entries = /IGNORE|SYSLOG|WALL|EXEC+/*)
let record = [ seq "record" . plus . store flags ]
let upsmon_notify_flag = [ counter "record"
. del_spc . key "NOTIFYFLAG" . sep_spc
. [ label "type" . store upsmon_notify_type . sep_spc ]
. record+ . eol ]
let upsmon_record = upsmon_num|upsmon_word|upsmon_file|upsmon_monitor|upsmon_notify|upsmon_notify_flag
let upsmon_lns = (upsmon_record|comment|empty)*
let upsmon_filter = ( incl "@CONFPATH@/upsmon.conf" )
. Util.stdexcl
let upsmon_xfm = transform upsmon_lns upsmon_filter

View file

@ -0,0 +1,75 @@
(*
Module: NutUpsSchedConf
Parses @CONFPATH@/upssched.conf
Author: Raphael Pinson <raphink@gmail.com>
Frederic Bohe <fredericbohe@eaton.com>
About: License
This file is licensed under the GPL.
About: Lens Usage
Sample usage of this lens in augtool
* Print the command script:
> print /files@CONFPATH@/upssched.conf/CMDSCRIPT
About: Configuration files
This lens applies to @CONFPATH@/upssched.conf. See <filter>.
*)
module NutUpsschedConf =
autoload upssched_xfm
(************************************************************************
* Group: UPSSCHED.CONF
*************************************************************************)
(* general *)
let sep_spc = Util.del_ws_spc
let eol = Util.eol
let num = /[0-9]+/
let word = /[^"#; \t\n]+/
let empty = Util.empty
let comment = Util.comment
(* Variable: quoted_word *)
let word_space = /"[^"\n]+"/
let quoted_word = /"[^" \t\n]+"/
(* Variable: word_all *)
let word_all = word_space | word | quoted_word
let upssched_re = "CMDSCRIPT"
| "PIPEFN"
| "LOCKFN"
let upssched_opt = [ key upssched_re . sep_spc . store word_all . eol ]
let upssched_start_timer = [ key "START-TIMER" . sep_spc
. [ label "timername" . store word ] . sep_spc
. [ label "interval" . store num ] ]
let upssched_cancel_timer = [ key "CANCEL-TIMER" . sep_spc
. [ label "timername" . store word ]
. ( sep_spc . [ label "cmd" . store word_all ])* ]
let upssched_execute_timer = [ key "EXECUTE" . sep_spc
. [ label "command" . store word_all ] ]
let upssched_command = (upssched_start_timer|upssched_cancel_timer|upssched_execute_timer)
let upssched_at = [ key "AT" . sep_spc
. [ label "notifytype" . store word ] . sep_spc
. [ label "upsname" . store word ] . sep_spc
. upssched_command . eol ]
let upssched_lns = (upssched_at|upssched_opt|comment|empty)*
let upssched_filter = ( incl "@CONFPATH@/upssched.conf" )
. Util.stdexcl
let upssched_xfm = transform upssched_lns upssched_filter

View file

@ -0,0 +1,46 @@
(*
Module: NutUpssetConf
Parses @CONFPATH@/upsset.conf
Author: Raphael Pinson <raphink@gmail.com>
Frederic Bohe <fredericbohe@eaton.com>
About: License
This file is licensed under the GPL.
About: Lens Usage
Sample usage of this lens in augtool
* Print the string declaring secured cgi directory:
> print /files@CONFPATH@/upsset.conf/auth
About: Configuration files
This lens applies to @CONFPATH@/upsset.conf. See <filter>.
*)
module NutUpssetConf =
autoload upsset_xfm
(************************************************************************
* Group: UPSSET.CONF
*************************************************************************)
(* general *)
let sep_spc = Util.del_opt_ws ""
let eol = Util.eol
let comment = Util.comment
let empty = Util.empty
let upsset_key_word = "I_HAVE_SECURED_MY_CGI_DIRECTORY"
let upsset_key = [ label "auth" . sep_spc . store upsset_key_word . eol ]
let upsset_lns = (upsset_key|comment|empty)*
let upsset_filter = ( incl "@CONFPATH@/upsset.conf" )
. Util.stdexcl
let upsset_xfm = transform upsset_lns upsset_filter

View file

@ -0,0 +1,187 @@
(* Tests for the Nut module *)
module Test_nut =
let nut_conf = "
MODE=standalone
"
test NutNutConf.nut_lns get nut_conf =
{ }
{ "MODE" = "standalone" }
let ups_conf = "
[testups]
driver = dummy-ups
port = auto
desc = \"Dummy UPS\"
"
test NutUpsConf.ups_lns get ups_conf =
{ }
{ "testups"
{ "driver" = "dummy-ups" }
{ "port" = "auto" }
{ "desc" = "\"Dummy UPS\"" } }
let upsd_conf = "
MAXAGE 30
LISTEN 0.0.0.0 3493
MAXCONN 1024
"
test NutUpsdConf.upsd_lns get upsd_conf =
{ }
{ "MAXAGE" = "30" }
{ "LISTEN"
{ "interface" = "0.0.0.0" }
{ "port" = "3493" } }
{ "MAXCONN" = "1024" }
let upsd_users = "
[admin]
password = upsman
actions = SET FSD
instcmds = ALL
[pfy]
password = duh
instcmds = test.panel.start
instcmds = test.panel.stop
[monmaster]
password = blah
upsmon master
[monslave]
password = abcd
upsmon slave
"
test NutUpsdUsers.upsd_users_lns get upsd_users =
{ }
{ "admin"
{ "password" = "upsman" }
{ "actions"
{ "SET" }
{ "FSD" } }
{ "instcmds" = "ALL" }
{ } }
{ "pfy"
{ "password" = "duh" }
{ "instcmds" = "test.panel.start" }
{ "instcmds" = "test.panel.stop" }
{ } }
{ "monmaster"
{ "password" = "blah" }
{ "upsmon" = "master" }
{ } }
{ "monslave"
{ "password" = "abcd" }
{ "upsmon" = "slave" } }
let upsmon_conf = "
MONITOR testups@localhost 1 monmaster blah master
MINSUPPLIES 1
SHUTDOWNCMD /sbin/shutdown -h +0
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 30
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
"
test NutUpsmonConf.upsmon_lns get upsmon_conf =
{ }
{ "MONITOR"
{ "system"
{ "upsname" = "testups" }
{ "hostname" = "localhost" } }
{ "powervalue" = "1" }
{ "username" = "monmaster" }
{ "password" = "blah" }
{ "type" = "master" } }
{ }
{ "MINSUPPLIES" = "1" }
{ "SHUTDOWNCMD" = "/sbin/shutdown -h +0" }
{ "POLLFREQ" = "5" }
{ "POLLFREQALERT" = "5" }
{ "HOSTSYNC" = "30" }
{ "DEADTIME" = "15" }
{ "POWERDOWNFLAG" = "/etc/killpower" }
{ "RBWARNTIME" = "43200" }
{ "NOCOMMWARNTIME" = "300" }
{ "FINALDELAY" = "5" }
let upsset_conf = "
I_HAVE_SECURED_MY_CGI_DIRECTORY
"
test NutUpssetConf.upsset_lns get upsset_conf =
{ }
{ "auth" = "I_HAVE_SECURED_MY_CGI_DIRECTORY" }
let upssched_conf = "
CMDSCRIPT /upssched-cmd
PIPEFN /var/state/ups/upssched/upssched.pipe
LOCKFN /var/state/ups/upssched/upssched.lock
AT COMMBAD * START-TIMER upsgone 10
AT COMMOK myups@localhost CANCEL-TIMER upsgone
AT ONLINE * EXECUTE ups-back-on-line
"
test NutUpsschedConf.upssched_lns get upssched_conf =
{ }
{ "CMDSCRIPT" = "/upssched-cmd" }
{ "PIPEFN" = "/var/state/ups/upssched/upssched.pipe" }
{ "LOCKFN" = "/var/state/ups/upssched/upssched.lock" }
{ "AT"
{ "notifytype" = "COMMBAD" }
{ "upsname" = "*" }
{ "START-TIMER"
{ "timername" = "upsgone" }
{ "interval" = "10" }
}
}
{ "AT"
{ "notifytype" = "COMMOK" }
{ "upsname" = "myups@localhost" }
{ "CANCEL-TIMER"
{ "timername" = "upsgone" }
}
}
{ "AT"
{ "notifytype" = "ONLINE" }
{ "upsname" = "*" }
{ "EXECUTE"
{ "command" = "ups-back-on-line" }
}
}
let hosts_conf = "
MONITOR myups@localhost \"Local UPS\"
MONITOR su2200@10.64.1.1 \"Finance department\"
MONITOR matrix@shs-server.example.edu \"Sierra High School data room #1\"
"
test NutHostsConf.hosts_lns get hosts_conf =
{ }
{ "MONITOR"
{ "system" = "myups@localhost" }
{ "description" = "Local UPS" }
}
{ "MONITOR"
{ "system" = "su2200@10.64.1.1" }
{ "description" = "Finance department" }
}
{ "MONITOR"
{ "system" = "matrix@shs-server.example.edu" }
{ "description" = "Sierra High School data room #1" }
}

View file

@ -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 = scripts/hal
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_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
@ -89,9 +91,11 @@ am__base_list = \
am__installdirs = "$(DESTDIR)$(halfdidir)"
DATA = $(halfdi_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@
@ -104,8 +108,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@
@ -122,7 +128,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@
@ -133,22 +138,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@

View file

@ -35,6 +35,20 @@
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- HP T1000 INTL -->
<match key="usb_device.product_id" int="0x1f08">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- HP T1500 INTL -->
<match key="usb_device.product_id" int="0x1f09">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- HP R/T 2200 INTL (like SMART2200RMXL2U) -->
<match key="usb_device.product_id" int="0x1f0a">
<append key="info.category" type="string">battery</append>
@ -42,6 +56,20 @@
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- HP R1500 G2 INTL -->
<match key="usb_device.product_id" int="0x1fe0">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- HP T750 G2 -->
<match key="usb_device.product_id" int="0x1fe1">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
</match>
<!-- Eaton -->
@ -149,6 +177,13 @@
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- various 5G models -->
<match key="usb_device.product_id" int="0x0003">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
</match>
<!-- Powerware -->
@ -205,6 +240,17 @@
</match>
</match>
<!-- iDowell -->
<match key="usb_device.vendor_id" int="0x075d">
<!-- iDowell -->
<match key="usb_device.product_id" int="0x0300">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
</match>
<!-- Cyber Power Systems -->
<match key="usb_device.vendor_id" int="0x0764">
<!-- 900AVR/BC900D, CP1200AVR/BC1200D -->
@ -269,6 +315,20 @@
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. TrippLite ECO550UPS -->
<match key="usb_device.product_id" int="0x1009">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. TrippLite ECO550UPS -->
<match key="usb_device.product_id" int="0x1010">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. TrippLite OMNI1000LCD -->
<match key="usb_device.product_id" int="0x2005">
<append key="info.category" type="string">battery</append>
@ -283,6 +343,83 @@
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x2008">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. TrippLite Smart1000LCD -->
<match key="usb_device.product_id" int="0x2009">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x2010">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x2011">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x2012">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x2013">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x2014">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x3008">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x3009">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x3010">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x3011">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. TrippLite smart2200RMXL2U -->
<match key="usb_device.product_id" int="0x3012">
<append key="info.category" type="string">battery</append>
@ -291,12 +428,26 @@
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x3013">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x3014">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x3015">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. TrippLite SmartOnline SU1500RTXL2UA (older unit?) -->
<match key="usb_device.product_id" int="0x4001">
<append key="info.category" type="string">battery</append>
@ -318,6 +469,41 @@
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. TrippLite SmartOnline SU1000XLA -->
<match key="usb_device.product_id" int="0x4004">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x4005">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x4006">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x4007">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<!-- e.g. ? -->
<match key="usb_device.product_id" int="0x4008">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
</match>
<!-- PowerCOM -->

View file

@ -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 @@ DIST_COMMON = README $(am__dist_hotplugusb_DATA_DIST) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/libhidups.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
@ -94,9 +96,11 @@ DIST_SOURCES =
am__dist_hotplugusb_DATA_DIST = libhid.usermap
DATA = $(dist_hotplugusb_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@
@ -109,8 +113,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 +133,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 +143,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@

View file

@ -14,8 +14,16 @@ libhidups 0x0003 0x03f0 0x1f01 0x0000 0x0000 0x00
libhidups 0x0003 0x03f0 0x1f02 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# HP T750 INTL
libhidups 0x0003 0x03f0 0x1f06 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# HP T1000 INTL
libhidups 0x0003 0x03f0 0x1f08 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# HP T1500 INTL
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
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
# Eaton
# various models
@ -50,6 +58,8 @@ libhidups 0x0003 0x050d 0x1100 0x0000 0x0000 0x00
# APC
# various models
libhidups 0x0003 0x051d 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# various 5G models
libhidups 0x0003 0x051d 0x0003 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# Powerware
# various models
@ -67,6 +77,10 @@ libhidups 0x0003 0x06da 0x0003 0x0000 0x0000 0x00
# various models
libhidups 0x0003 0x06da 0xffff 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# iDowell
# iDowell
libhidups 0x0003 0x075d 0x0300 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# Cyber Power Systems
# 900AVR/BC900D, CP1200AVR/BC1200D
libhidups 0x0003 0x0764 0x0005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
@ -86,20 +100,60 @@ libhidups 0x0003 0x09ae 0x1003 0x0000 0x0000 0x00
libhidups 0x0003 0x09ae 0x1007 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite ECO550UPS
libhidups 0x0003 0x09ae 0x1008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite ECO550UPS
libhidups 0x0003 0x09ae 0x1009 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite ECO550UPS
libhidups 0x0003 0x09ae 0x1010 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite OMNI1000LCD
libhidups 0x0003 0x09ae 0x2005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite OMNI900LCD
libhidups 0x0003 0x09ae 0x2007 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x2008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite Smart1000LCD
libhidups 0x0003 0x09ae 0x2009 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x2010 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x2011 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x2012 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x2013 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x2014 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x3008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x3009 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x3010 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x3011 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite smart2200RMXL2U
libhidups 0x0003 0x09ae 0x3012 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x3013 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x3014 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x3015 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite SmartOnline SU1500RTXL2UA (older unit?)
libhidups 0x0003 0x09ae 0x4001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite SmartOnline SU6000RT4U?
libhidups 0x0003 0x09ae 0x4002 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite SmartOnline SU1500RTXL2ua
libhidups 0x0003 0x09ae 0x4003 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. TrippLite SmartOnline SU1000XLA
libhidups 0x0003 0x09ae 0x4004 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x4005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x4006 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x4007 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# e.g. ?
libhidups 0x0003 0x09ae 0x4008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
# PowerCOM
# PowerCOM IMP - IMPERIAL Series

View file

@ -1,11 +1,17 @@
# Network UPS Tools: data/html
EXTRA_DIST = README \
app/gui.glade \
app/gui-1.3.glade \
app/NUT-Monitor \
app/nut-monitor.desktop \
app/nut-monitor.png \
app/README \
app/pixmaps/var-rw.png \
app/pixmaps/on_line.png \
app/pixmaps/warning.png \
app/pixmaps/on_battery.png \
app/pixmaps/var-ro.png \
app/locale/fr/LC_MESSAGES/NUT-Monitor.mo \
module/PyNUT.py \
module/test_nutclient.py

View file

@ -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 @@ target_triplet = @target@
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_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
@ -66,9 +68,11 @@ 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@
@ -81,8 +85,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@
@ -99,7 +105,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@
@ -110,22 +115,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,11 +227,17 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
udevdir = @udevdir@
EXTRA_DIST = README \
app/gui.glade \
app/gui-1.3.glade \
app/NUT-Monitor \
app/nut-monitor.desktop \
app/nut-monitor.png \
app/README \
app/pixmaps/var-rw.png \
app/pixmaps/on_line.png \
app/pixmaps/warning.png \
app/pixmaps/on_battery.png \
app/pixmaps/var-ro.png \
app/locale/fr/LC_MESSAGES/NUT-Monitor.mo \
module/PyNUT.py \
module/test_nutclient.py

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,658 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.4.5 on Tue Jun 24 14:36:50 2008 -->
<glade-interface>
<widget class="GtkWindow" id="window1">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<signal name="destroy" handler="on_window1_destroy"/>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkMenuBar" id="menubar1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkMenuItem" id="menuitem1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">_File</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkImageMenuItem" id="imagemenuitem2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">gtk-about</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_imagemenuitem2_activate"/>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="imagemenuitem5">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">gtk-quit</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_imagemenuitem5_activate"/>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label_xalign">0.5</property>
<child>
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="top_padding">2</property>
<property name="bottom_padding">2</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<widget class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<child>
<widget class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Host / Port : </property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">UPS : </property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spinbutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="adjustment">3493 0 65535 1 10 10</property>
<property name="numeric">True</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_text">Get list of UPSs from server</property>
<property name="label" translatable="yes">gtk-refresh</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_button1_clicked"/>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="entry1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<signal name="changed" handler="on_entry1_changed"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="combobox1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="items" translatable="yes">&lt;None&gt;
</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="checkbutton1">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Use authentication</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_checkbutton1_toggled"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Login / Password : </property>
</widget>
</child>
<child>
<widget class="GtkEntry" id="entry2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<signal name="changed" handler="on_entry2_changed"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="entry3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="visibility">False</property>
<signal name="changed" handler="on_entry3_changed"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkHSeparator" id="hseparator1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="padding">4</property>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkButton" id="button2">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip" translatable="yes">Connect to the selected UPS</property>
<property name="label" translatable="yes">gtk-connect</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_button2_clicked"/>
</widget>
<packing>
<property name="expand">False</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button4">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">gtk-disconnect</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_button4_clicked"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label7">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Delay between refresh : </property>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spinbutton2">
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_text">Delay in seconds between refreshs</property>
<property name="adjustment">0.5 0.5 10 0.10000000000000001 10 10</property>
<property name="digits">1</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">4</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes"> NUT Server </property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label_xalign">0.5</property>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="top_padding">2</property>
<property name="bottom_padding">2</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="n_rows">5</property>
<property name="n_columns">2</property>
<child>
<widget class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkComboBox" id="combobox3">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="items" translatable="yes">&lt;None&gt;
</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="button3">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">gtk-apply</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_button3_clicked"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">UPS Commands : </property>
</widget>
<packing>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame5">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
<widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">4</property>
<child>
<widget class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_RIGHT</property>
</widget>
<packing>
<property name="expand">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
<child>
<placeholder/>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_padding">2</property>
<property name="y_padding">2</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">UPS informations : </property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkProgressBar" id="progressbar1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="show_text">True</property>
<property name="text" translatable="yes">0 %</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Battery charge : </property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">UPS Load : </property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkProgressBar" id="progressbar2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="show_text">True</property>
<property name="text" translatable="yes">0 %</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">0:00</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
</widget>
</child>
<child>
<placeholder/>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_padding">2</property>
<property name="y_padding">2</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Time remaining : </property>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes"> UPS Status </property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="padding">2</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkStatusbar" id="statusbar1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">2</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</child>
</widget>
<widget class="GtkAboutDialog" id="aboutdialog1">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">About UPS Monitor</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="has_separator">False</property>
<property name="program_name">NUT Monitor</property>
<property name="version">0.1beta</property>
<property name="copyright" translatable="yes">Copyright (c) David Goncalves</property>
<property name="comments" translatable="yes">GUI to manage UPS trough a NUT server</property>
<property name="website">http://www.lestat.st</property>
<property name="website_label" translatable="yes">www.lestat.st</property>
<property name="license" translatable="yes">Copyright (C) 2008 David Goncalves &lt;david@lestat.st&gt;
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 &lt;http://www.gnu.org/licenses/&gt;.</property>
<property name="authors">David Goncalves - &lt;david@lestat.st&gt;</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">2</property>
<child>
<placeholder/>
</child>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2008 David Goncalves <david@lestat.st>
@ -21,6 +21,13 @@
#
# 2008-06-09 David Goncalves
# Added 'GetRWVars' and 'SetRWVar' commands.
#
# 2009-02-19 David Goncalves
# Changed class PyNUT to PyNUTClient
#
# 2010-07-23 David Goncalves - Version 1.2
# Changed GetRWVars function that fails is the UPS is not
# providing such vars.
import telnetlib
@ -35,8 +42,8 @@ class PyNUTClient :
__timeout = None
__srv_handler = None
__version = "1.0"
__release = "2008-06-09"
__version = "1.2"
__release = "2010-07-23"
def __init__( self, host="127.0.0.1", port=3493, login=None, password=None, debug=False, timeout=5 ) :
@ -98,7 +105,7 @@ if something goes wrong.
def GetUPSList( self ) :
""" Returns the list of available UPS from the NUT server
The result is a dictionnary containing 'key->val' pairs of 'UPSName' and 'UPS Description'
The result is a dictionary containing 'key->val' pairs of 'UPSName' and 'UPS Description'
"""
if self.__debug :
print( "[DEBUG] GetUPSList from server" )
@ -121,7 +128,7 @@ The result is a dictionnary containing 'key->val' pairs of 'UPSName' and 'UPS De
def GetUPSVars( self, ups="" ) :
""" Get all available vars from the specified UPS
The result is a dictionnary containing 'key->val' pairs of all
The result is a dictionary containing 'key->val' pairs of all
available vars.
"""
if self.__debug :
@ -185,7 +192,7 @@ of the command as value
def GetRWVars( self, ups="" ) :
""" Get a list of all writable vars from the selected UPS
The result is presented as a dictionnary containing 'key->val' pairs
The result is presented as a dictionary containing 'key->val' pairs
"""
if self.__debug :
print( "[DEBUG] GetUPSVars from '%s'..." % ups )
@ -200,10 +207,14 @@ The result is presented as a dictionnary containing 'key->val' pairs
end_offset = 0 - ( len( "END LIST RW %s\n" % ups ) + 1 )
rw_vars = {}
for current in result[:end_offset].split( "\n" ) :
var = current[ offset: ].split( '"' )[0].replace( " ", "" )
data = current[ offset: ].split( '"' )[1]
rw_vars[ var ] = data
try :
for current in result[:end_offset].split( "\n" ) :
var = current[ offset: ].split( '"' )[0].replace( " ", "" )
data = current[ offset: ].split( '"' )[1]
rw_vars[ var ] = data
except :
pass
return( rw_vars )

View file

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This source code is provided for testing/debuging purpose ;)

View file

@ -247,15 +247,15 @@ cat >> "$CFILE" <<EOF
{ NULL, 0, 0, NULL, NULL, NULL, 0, NULL }
};
static char *${LDRIVER}_format_model(HIDDevice_t *hd) {
static const char *${LDRIVER}_format_model(HIDDevice_t *hd) {
return hd->Product;
}
static char *${LDRIVER}_format_mfr(HIDDevice_t *hd) {
static const char *${LDRIVER}_format_mfr(HIDDevice_t *hd) {
return hd->Vendor ? hd->Vendor : "${DRIVER}";
}
static char *${LDRIVER}_format_serial(HIDDevice_t *hd) {
static const char *${LDRIVER}_format_serial(HIDDevice_t *hd) {
return hd->Serial;
}

View file

@ -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 = scripts/udev
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_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
@ -89,9 +91,11 @@ am__base_list = \
am__installdirs = "$(DESTDIR)$(udevrulesdir)"
DATA = $(udevrules_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@
@ -104,8 +108,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@
@ -122,7 +128,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@
@ -133,22 +138,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@

View file

@ -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"
SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"
LABEL="nut-usbups_rules_real"
# Krauler UP-M500VA - blazer_usb
@ -16,8 +16,16 @@ ATTR{idVendor}=="03f0", ATTR{idProduct}=="1f01", MODE="664", GROUP="@RUN_AS_GROU
ATTR{idVendor}=="03f0", ATTR{idProduct}=="1f02", MODE="664", GROUP="@RUN_AS_GROUP@"
# HP T750 INTL - usbhid-ups
ATTR{idVendor}=="03f0", ATTR{idProduct}=="1f06", MODE="664", GROUP="@RUN_AS_GROUP@"
# HP T1000 INTL - usbhid-ups
ATTR{idVendor}=="03f0", ATTR{idProduct}=="1f08", MODE="664", GROUP="@RUN_AS_GROUP@"
# HP T1500 INTL - usbhid-ups
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
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@"
# Eaton
# various models - usbhid-ups
@ -52,6 +60,8 @@ ATTR{idVendor}=="050d", ATTR{idProduct}=="1100", MODE="664", GROUP="@RUN_AS_GROU
# APC
# various models - usbhid-ups
ATTR{idVendor}=="051d", ATTR{idProduct}=="0002", MODE="664", GROUP="@RUN_AS_GROUP@"
# various 5G models - usbhid-ups
ATTR{idVendor}=="051d", ATTR{idProduct}=="0003", MODE="664", GROUP="@RUN_AS_GROUP@"
# Powerware
# various models - bcmxcp_usb
@ -69,6 +79,10 @@ ATTR{idVendor}=="06da", ATTR{idProduct}=="0003", MODE="664", GROUP="@RUN_AS_GROU
# various models - usbhid-ups
ATTR{idVendor}=="06da", ATTR{idProduct}=="ffff", MODE="664", GROUP="@RUN_AS_GROUP@"
# iDowell
# iDowell - usbhid-ups
ATTR{idVendor}=="075d", ATTR{idProduct}=="0300", MODE="664", GROUP="@RUN_AS_GROUP@"
# Cyber Power Systems
# 900AVR/BC900D, CP1200AVR/BC1200D - usbhid-ups
ATTR{idVendor}=="0764", ATTR{idProduct}=="0005", MODE="664", GROUP="@RUN_AS_GROUP@"
@ -88,20 +102,60 @@ ATTR{idVendor}=="09ae", ATTR{idProduct}=="1003", MODE="664", GROUP="@RUN_AS_GROU
ATTR{idVendor}=="09ae", ATTR{idProduct}=="1007", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite ECO550UPS - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="1008", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite ECO550UPS - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="1009", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite ECO550UPS - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="1010", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite OMNI1000LCD - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="2005", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite OMNI900LCD - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="2007", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="2008", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite Smart1000LCD - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="2009", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="2010", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="2011", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="2012", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="2013", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="2014", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="3008", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="3009", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="3010", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="3011", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite smart2200RMXL2U - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="3012", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="3013", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="3014", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="3015", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite SmartOnline SU1500RTXL2UA (older unit?) - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="4001", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite SmartOnline SU6000RT4U? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="4002", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite SmartOnline SU1500RTXL2ua - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="4003", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. TrippLite SmartOnline SU1000XLA - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="4004", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="4005", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="4006", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="4007", MODE="664", GROUP="@RUN_AS_GROUP@"
# e.g. ? - usbhid-ups
ATTR{idVendor}=="09ae", ATTR{idProduct}=="4008", MODE="664", GROUP="@RUN_AS_GROUP@"
# PowerCOM
# PowerCOM IMP - IMPERIAL Series - usbhid-ups

View file

@ -0,0 +1,110 @@
##############################################################################################################
# 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
# only support USB, else ignore
SUBSYSTEM!="usb", GOTO="up_hid_end"
# if usbraw device, ignore
KERNEL!="hiddev*", GOTO="up_hid_end"
# if an interface, ignore
ENV{DEVTYPE}=="usb_interface", GOTO="up_hid_end"
ATTRS{idVendor}=="03f0", ENV{UPOWER_VENDOR}="Hewlett Packard"
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}=="075d", ENV{UPOWER_VENDOR}="iDowell"
ATTRS{idVendor}=="0764", ENV{UPOWER_VENDOR}="Cyber Power Systems"
ATTRS{idVendor}=="09ae", ENV{UPOWER_VENDOR}="TrippLite"
ATTRS{idVendor}=="0d9f", ENV{UPOWER_VENDOR}="PowerCOM"
ATTRS{idVendor}=="10af", ENV{UPOWER_VENDOR}="Liebert"
# Hewlett Packard
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"
# Eaton
ATTRS{idVendor}=="0463", ATTRS{idProduct}=="0001", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="0463", ATTRS{idProduct}=="ffff", ENV{UPOWER_BATTERY_TYPE}="ups"
# Dell
ATTRS{idVendor}=="047c", ATTRS{idProduct}=="ffff", ENV{UPOWER_BATTERY_TYPE}="ups"
# Belkin
ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0375", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0551", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0750", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0751", ENV{UPOWER_BATTERY_TYPE}="ups"
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}=="1100", ENV{UPOWER_BATTERY_TYPE}="ups"
# APC
ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0002", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0003", ENV{UPOWER_BATTERY_TYPE}="ups"
# Liebert
ATTRS{idVendor}=="06da", ATTRS{idProduct}=="ffff", ENV{UPOWER_BATTERY_TYPE}="ups"
# iDowell
ATTRS{idVendor}=="075d", ATTRS{idProduct}=="0300", ENV{UPOWER_BATTERY_TYPE}="ups"
# Cyber Power Systems
ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0005", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0501", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0601", ENV{UPOWER_BATTERY_TYPE}="ups"
# TrippLite
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="1003", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="1007", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="1008", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="1009", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="1010", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2005", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2007", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2008", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2009", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2010", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2011", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2012", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2013", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2014", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3008", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3009", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3010", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3011", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3012", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3013", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3014", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3015", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4001", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4002", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4003", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4004", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4005", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4006", ENV{UPOWER_BATTERY_TYPE}="ups"
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}=="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"
ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a5", ENV{UPOWER_BATTERY_TYPE}="ups"
ATTRS{idVendor}=="0d9f", ATTRS{idProduct}=="00a6", ENV{UPOWER_BATTERY_TYPE}="ups"
# Liebert
ATTRS{idVendor}=="10af", ATTRS{idProduct}=="0001", ENV{UPOWER_BATTERY_TYPE}="ups"
LABEL="up_hid_end"