new upstream 2.8.0

This commit is contained in:
lagertonne 2022-06-29 12:37:36 +02:00
parent fc7f4b43c1
commit b2b0c9995a
836 changed files with 137090 additions and 30018 deletions

View file

@ -1,16 +1,49 @@
EXTRA_DIST = gen-nutupsconf-aug.py nutupsconf.aug.tpl \
EXTRA_DIST = gen-nutupsconf-aug.py.in nutupsconf.aug.tpl \
README tests/test_nut.aug
PYTHON = @PYTHON@
# only call the script to generate Augeas ups.conf lens upon "make dist",
# and if Python is present
# and if Python is present; the distributed gen-nutupsconf-aug.py.in template
# is assumed to only differ from a generated gen-nutupsconf-aug.py by the
# @PYTHON@ shebang.
dist-hook:
@if python -c "import re,glob,codecs"; then \
echo "Regenerating Augeas ups.conf lens."; \
$(distdir)/gen-nutupsconf-aug.py $(distdir)/; \
@if [ -n "$(PYTHON)" ] && $(PYTHON) -c "import re,glob,codecs"; then \
echo "Regenerating Augeas ups.conf lens with '$(PYTHON)'."; \
$(PYTHON) $(distdir)/gen-nutupsconf-aug.py.in $(distdir)/; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Python is not available."; \
echo "Skipping Augeas ups.conf lens regeneration."; \
echo "Skipping regeneration of Augeas lens for ups.conf parsing." ; \
echo "----------------------------------------------------------------------"; \
fi
# This needs augparse from augeas-tools
if HAVE_AUGPARSE
check-local:
@echo "augparse proceeding to lenses verification job..."; \
echo "DISABLED for now due to https://github.com/networkupstools/nut/issues/657"
endif
# FIXME
# augparse -I $(srcdir)/ $(srcdir)/tests/test_nut.aug
if WITH_AUGLENS
# Now "make install" should cover delivery of Augeas lenses...
# The "auglensdir" value should be set up by configure
# The *.aug files are generated by rule above or by autogen.sh and/or configure
auglens_DATA = \
nuthostsconf.aug nutupsconf.aug nutupsdusers.aug nutupsschedconf.aug \
nutnutconf.aug nutupsdconf.aug nutupsmonconf.aug nutupssetconf.aug
endif
MAINTAINERCLEANFILES = Makefile.in .dirstamp
CLEANFILES = *-spellchecked
# Can be re-generated by configure script and/or make:
DISTCLEANFILES = gen-nutupsconf-aug.py
# Generated by autogen.sh and needed to run the configure script:
MAINTAINERCLEANFILES += nutupsconf.aug.in
DISTCLEANFILES += *.aug

View file

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.16.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -13,8 +13,19 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@ -79,23 +90,24 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = scripts/augeas
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/nutnutconf.aug.in $(srcdir)/nutupsconf.aug.in \
$(srcdir)/nutupsdconf.aug.in $(srcdir)/nutupsdusers.aug.in \
$(srcdir)/nutupsmonconf.aug.in \
$(srcdir)/nutupsschedconf.aug.in $(srcdir)/nuthostsconf.aug.in \
$(srcdir)/nutupssetconf.aug.in README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
$(top_srcdir)/m4/ax_c_pragmas.m4 \
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/ax_run_or_link_ifelse.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_cppcheck.m4 \
$(top_srcdir)/m4/nut_check_headers_windows.m4 \
$(top_srcdir)/m4/nut_check_libavahi.m4 \
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
$(top_srcdir)/m4/nut_check_libgd.m4 \
$(top_srcdir)/m4/nut_check_libltdl.m4 \
$(top_srcdir)/m4/nut_check_libmodbus.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libnss.m4 \
@ -104,16 +116,22 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_check_libwrap.m4 \
$(top_srcdir)/m4/nut_check_os.m4 \
$(top_srcdir)/m4/nut_check_pkgconfig.m4 \
$(top_srcdir)/m4/nut_check_python.m4 \
$(top_srcdir)/m4/nut_compiler_family.m4 \
$(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \
$(top_srcdir)/m4/nut_report_feature.m4 \
$(top_srcdir)/m4/nut_stash_warnings.m4 \
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
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_FILES = nutnutconf.aug nutupsdconf.aug nutupsdusers.aug \
nutupsmonconf.aug nutupsschedconf.aug nuthostsconf.aug \
nutupssetconf.aug gen-nutupsconf-aug.py nutupsconf.aug
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@ -134,7 +152,43 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(auglensdir)"
DATA = $(auglens_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(srcdir)/gen-nutupsconf-aug.py.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 README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
A2X = @A2X@
ACLOCAL = @ACLOCAL@
@ -143,6 +197,7 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUGPARSE = @AUGPARSE@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -153,6 +208,7 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFPATH = @CONFPATH@
CPP = @CPP@
CPPCHECK = @CPPCHECK@
CPPFLAGS = @CPPFLAGS@
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
CPPUNIT_LIBS = @CPPUNIT_LIBS@
@ -166,6 +222,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DOC_BUILD_LIST = @DOC_BUILD_LIST@
DOC_CHECK_LIST = @DOC_CHECK_LIST@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
@ -178,6 +235,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GDLIB_CONFIG = @GDLIB_CONFIG@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@ -195,6 +253,8 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@
LIBIPMI_LIBS = @LIBIPMI_LIBS@
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
LIBLTDL_LIBS = @LIBLTDL_LIBS@
LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@
LIBMODBUS_LIBS = @LIBMODBUS_LIBS@
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
LIBNEON_LIBS = @LIBNEON_LIBS@
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
@ -205,21 +265,29 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
LIBS = @LIBS@
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
LIBSSL_LIBS = @LIBSSL_LIBS@
LIBSSL_REQUIRES = @LIBSSL_REQUIRES@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
LIBUSB_CONFIG = @LIBUSB_CONFIG@
LIBUSB_LIBS = @LIBUSB_LIBS@
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
LIBWRAP_LIBS = @LIBWRAP_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LN_S_R = @LN_S_R@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NETLIBS = @NETLIBS@
NET_SNMP_CONFIG = @NET_SNMP_CONFIG@
NM = @NM@
NMEDIT = @NMEDIT@
NUT_DATADIR = @NUT_DATADIR@
NUT_LIBEXECDIR = @NUT_LIBEXECDIR@
NUT_NETVERSION = @NUT_NETVERSION@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
@ -239,6 +307,9 @@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PORT = @PORT@
PYTHON = @PYTHON@
PYTHON2 = @PYTHON2@
PYTHON3 = @PYTHON3@
RANLIB = @RANLIB@
RUN_AS_GROUP = @RUN_AS_GROUP@
RUN_AS_USER = @RUN_AS_USER@
@ -252,6 +323,7 @@ STATEPATH = @STATEPATH@
STRIP = @STRIP@
SUN_LIBUSB = @SUN_LIBUSB@
TREE_VERSION = @TREE_VERSION@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
XMLLINT = @XMLLINT@
@ -269,6 +341,7 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
auglensdir = @auglensdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@ -282,6 +355,9 @@ datarootdir = @datarootdir@
devddir = @devddir@
docdir = @docdir@
driverexecdir = @driverexecdir@
dummy_PKG_CONFIG = @dummy_PKG_CONFIG@
dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@
dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
@ -307,12 +383,14 @@ pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
systemdsystemshutdowndir = @systemdsystemshutdowndir@
systemdshutdowndir = @systemdshutdowndir@
systemdsystemunitdir = @systemdsystemunitdir@
systemdtmpfilesdir = @systemdtmpfilesdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
@ -322,9 +400,26 @@ 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 \
EXTRA_DIST = gen-nutupsconf-aug.py.in nutupsconf.aug.tpl \
README tests/test_nut.aug
# FIXME
# augparse -I $(srcdir)/ $(srcdir)/tests/test_nut.aug
# Now "make install" should cover delivery of Augeas lenses...
# The "auglensdir" value should be set up by configure
# The *.aug files are generated by rule above or by autogen.sh and/or configure
@WITH_AUGLENS_TRUE@auglens_DATA = \
@WITH_AUGLENS_TRUE@ nuthostsconf.aug nutupsconf.aug nutupsdusers.aug nutupsschedconf.aug \
@WITH_AUGLENS_TRUE@ nutnutconf.aug nutupsdconf.aug nutupsmonconf.aug nutupssetconf.aug
# Generated by autogen.sh and needed to run the configure script:
MAINTAINERCLEANFILES = Makefile.in .dirstamp nutupsconf.aug.in
CLEANFILES = *-spellchecked
# Can be re-generated by configure script and/or make:
DISTCLEANFILES = gen-nutupsconf-aug.py *.aug
all: all-am
.SUFFIXES:
@ -340,14 +435,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
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);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@ -360,8 +454,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(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
@ -374,12 +466,37 @@ 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)/$@
gen-nutupsconf-aug.py: $(top_builddir)/config.status $(srcdir)/gen-nutupsconf-aug.py.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)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-auglensDATA: $(auglens_DATA)
@$(NORMAL_INSTALL)
@list='$(auglens_DATA)'; test -n "$(auglensdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(auglensdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(auglensdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(auglensdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(auglensdir)" || exit $$?; \
done
uninstall-auglensDATA:
@$(NORMAL_UNINSTALL)
@list='$(auglens_DATA)'; test -n "$(auglensdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(auglensdir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
@ -387,7 +504,10 @@ ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@ -420,10 +540,15 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
@HAVE_AUGPARSE_FALSE@check-local:
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
all-am: Makefile
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(auglensdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@ -446,14 +571,17 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
@ -474,7 +602,7 @@ info: info-am
info-am:
install-data-am:
install-data-am: install-auglensDATA
install-dvi: install-dvi-am
@ -518,36 +646,46 @@ ps: ps-am
ps-am:
uninstall-am:
uninstall-am: uninstall-auglensDATA
.MAKE: install-am install-strip
.MAKE: check-am install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
cscopelist-am ctags-am dist-hook distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags-am uninstall uninstall-am
.PHONY: all all-am check check-am check-local clean clean-generic \
clean-libtool cscopelist-am ctags-am dist-hook distclean \
distclean-generic distclean-libtool distdir dvi dvi-am html \
html-am info info-am install install-am install-auglensDATA \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am uninstall-auglensDATA
.PRECIOUS: Makefile
# only call the script to generate Augeas ups.conf lens upon "make dist",
# and if Python is present
# and if Python is present; the distributed gen-nutupsconf-aug.py.in template
# is assumed to only differ from a generated gen-nutupsconf-aug.py by the
# @PYTHON@ shebang.
dist-hook:
@if python -c "import re,glob,codecs"; then \
echo "Regenerating Augeas ups.conf lens."; \
$(distdir)/gen-nutupsconf-aug.py $(distdir)/; \
@if [ -n "$(PYTHON)" ] && $(PYTHON) -c "import re,glob,codecs"; then \
echo "Regenerating Augeas ups.conf lens with '$(PYTHON)'."; \
$(PYTHON) $(distdir)/gen-nutupsconf-aug.py.in $(distdir)/; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Python is not available."; \
echo "Skipping Augeas ups.conf lens regeneration."; \
echo "Skipping regeneration of Augeas lens for ups.conf parsing." ; \
echo "----------------------------------------------------------------------"; \
fi
# This needs augparse from augeas-tools
@HAVE_AUGPARSE_TRUE@check-local:
@HAVE_AUGPARSE_TRUE@ @echo "augparse proceeding to lenses verification job..."; \
@HAVE_AUGPARSE_TRUE@ echo "DISABLED for now due to https://github.com/networkupstools/nut/issues/657"
# 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:

View file

@ -57,7 +57,7 @@ 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
source directory ('nut/scripts/augeas'). The latter is to be preferred for
the time being.
@ -240,7 +240,7 @@ a.set(("/files/etc/nut/upsd.users/%s/instcmds" % user), "ALL")
monuser = "monuser"
monpasswd = "******"
a.set(("/files/etc/nut/upsd.users/%s/password" % monuser), monpasswd)
a.set(("/files/etc/nut/upsd.users/%s/upsmon" % monuser), "master")
a.set(("/files/etc/nut/upsd.users/%s/upsmon" % monuser), "primary")
# Generate upsmon.conf
a.set("/files/etc/nut/upsmon.conf/MONITOR/system/upsname", device_name)
@ -250,7 +250,7 @@ a.set("/files/etc/nut/upsmon.conf/MONITOR/system/upsname", device_name)
a.set("/files/etc/nut/upsmon.conf/MONITOR/powervalue", "1")
a.set("/files/etc/nut/upsmon.conf/MONITOR/username", monuser)
a.set("/files/etc/nut/upsmon.conf/MONITOR/password", monpasswd)
a.set("/files/etc/nut/upsmon.conf/MONITOR/type", "master")
a.set("/files/etc/nut/upsmon.conf/MONITOR/type", "primary")
# FIXME: glitch on the generated content
a.set("/files/etc/nut/upsmon.conf/SHUTDOWNCMD", "/sbin/shutdown -h +0")

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!@PYTHON@
# Copyright (C) 2010 - Arnaud Quette <arnaud.quette@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
@ -18,6 +18,8 @@
# This program extracts all drivers specific variables, declared
# using 'addvar()' and output a complete ups.conf lens for Augeas
from __future__ import print_function
import sys
import re
import glob
@ -57,11 +59,11 @@ def grep(string,list):
if __name__ == '__main__':
rawCount = 0
global finalCount
#global finalCount
variableNames = []
specificVars = ""
global inLensContent
global finalLensContent
#global inLensContent
#global finalLensContent
Exceptionlist = ['../../drivers/main.c', '../../drivers/skel.c']
outputFilename = 'nutupsconf.aug.in'
templateFilename = 'nutupsconf.aug.tpl'
@ -69,7 +71,7 @@ if __name__ == '__main__':
if (len(sys.argv) == 2):
dirPrefix = sys.argv[1]
print dirPrefix
print(dirPrefix)
# 1/ Extract all specific drivers parameters, in a sorted list with unique entries
# 1.1/ List all drivers implementation files

View file

@ -47,14 +47,42 @@ let ups_fields = "driver"
| "ignorelb"
| "maxstartdelay"
| "synchronous"
| "BYPASS"
| "CHRG_addr"
| "CHRG_noro"
| "CHRG_regtype"
| "CP"
| "CS"
| "Could not addvar(%s)"
| "DISCHRG_addr"
| "DISCHRG_noro"
| "DISCHRG_regtype"
| "FSD_addr"
| "FSD_noro"
| "FSD_pulse_duration"
| "FSD_regtype"
| "HB_addr"
| "HB_noro"
| "HB_regtype"
| "ID"
| "LB"
| "LB_addr"
| "LB_noro"
| "LB_regtype"
| "LowBatt"
| "OB_addr"
| "OB_noro"
| "OB_regtype"
| "OL"
| "OL_addr"
| "OL_noro"
| "OL_regtype"
| "OffDelay"
| "OnDelay"
| "RB"
| "RB_addr"
| "RB_noro"
| "RB_regtype"
| "SD"
| "advanced_eco_mode"
| "advorder"
@ -83,12 +111,23 @@ let ups_fields = "driver"
| "community"
| "constant_phase_angle"
| "converter_mode"
| "cshdelay"
| "daysoff"
| "daysweek"
| "dev_slave_id"
| "device"
| "device_mfr"
| "device_model"
| "do_convert_deci"
| "dumbterm"
| "eco_mode"
| "explore"
| "fake_lowbatt"
| "fault_1"
| "fault_2"
| "fault_3"
| "fault_4"
| "fault_5"
| "flash"
| "frequency"
| "fruid"
@ -96,8 +135,10 @@ let ups_fields = "driver"
| "hb"
| "houroff"
| "houron"
| "i2c_address"
| "idleload"
| "ignoresab"
| "input_fault_voltage"
| "input_timeout"
| "interruptonly"
| "interruptsize"
@ -115,6 +156,7 @@ let ups_fields = "driver"
| "max_bypass_freq"
| "max_bypass_volt"
| "max_load"
| "max_polls_without_data"
| "maxreport"
| "methodOfFlowControl"
| "mfr"
@ -123,21 +165,31 @@ let ups_fields = "driver"
| "min_bypass_volt"
| "mincharge"
| "minruntime"
| "mod_byte_to_s"
| "mod_byte_to_us"
| "mod_resp_to_s"
| "mod_resp_to_us"
| "model"
| "modelname"
| "nobt"
| "nohang"
| "nombattvolt"
| "nominal_cell_voltage"
| "norating"
| "noscanlangid"
| "notification"
| "notransferoids"
| "novendor"
| "nowarn_noimp"
| "numOfBytesFromUPS"
| "number_of_battery_cells"
| "offdelay"
| "oldmac"
| "ondelay"
| "onlinedischarge"
| "output_pace"
| "output_phase_angle"
| "output_voltages"
| "password"
| "pins_shutdown_mode"
| "pollfreq"
@ -151,20 +203,31 @@ let ups_fields = "driver"
| "productid"
| "protocol"
| "rebootdelay"
| "recharge_time"
| "reset_to_default"
| "rio_slave_id"
| "runtime_full"
| "runtime_half"
| "runtimecal"
| "sdtime"
| "sdtype"
| "secLevel"
| "secName"
| "semistaticfreq"
| "ser_baud_rate"
| "ser_data_bit"
| "ser_parity"
| "ser_stop_bit"
| "serial"
| "serialnumber"
| "series"
| "shutdownArguments"
| "shutdown_delay"
| "shutdown_duration"
| "shutdown_timer"
| "silent"
| "site_fault_detection"
| "slave_address"
| "snmp_retries"
| "snmp_timeout"
| "snmp_version"
@ -173,6 +236,7 @@ let ups_fields = "driver"
| "stayoff"
| "subdriver"
| "subscribe"
| "symmetrathreephase"
| "testing"
| "testtime"
| "timeout"

View file

@ -39,6 +39,8 @@ let comment = Util.comment
let path = word
let upsd_maxage = [ opt_spc . key "MAXAGE" . sep_spc . store num . eol ]
let upsd_trackingdelay = [ opt_spc . key "TRACKINGDELAY" . sep_spc . store num . eol ]
let upsd_allow_no_device = [ opt_spc . key "ALLOW_NO_DEVICE" . 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 ]
@ -49,13 +51,15 @@ let upsd_certfile = [ opt_spc . key "CERTFILE" . sep_spc . store path . eol ]
(************************************************************************
* MAXAGE seconds
* TRACKINGDELAY seconds
* ALLOW_NO_DEVICE Boolean
* 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_other = upsd_maxage | upsd_trackingdelay | upsd_allow_no_device | upsd_statepath | upsd_listen_list | upsd_maxconn | upsd_certfile
let upsd_lns = (upsd_other|comment|empty)*

View file

@ -67,7 +67,7 @@ let upsd_users_instcmds = [ del_spc
let upsd_users_upsmon = [ del_spc
. key "upsmon" . sep_spc
. store /master|slave/ . eol ]
. store /master|primary|slave|secondary/ . eol ]
let upsd_users_title = IniFile.indented_title IniFile.record_re

View file

@ -27,6 +27,8 @@ test NutUpsConf.ups_lns get ups_conf =
let upsd_conf = "
MAXAGE 30
TRACKINGDELAY 600
ALLOW_NO_DEVICE 1
LISTEN 0.0.0.0 3493
MAXCONN 1024
"
@ -34,6 +36,8 @@ MAXCONN 1024
test NutUpsdConf.upsd_lns get upsd_conf =
{ }
{ "MAXAGE" = "30" }
{ "TRACKINGDELAY" = "600" }
{ "ALLOW_NO_DEVICE" = "1" }
{ "LISTEN"
{ "interface" = "0.0.0.0" }
{ "port" = "3493" } }
@ -50,13 +54,13 @@ let upsd_users = "
instcmds = test.panel.start
instcmds = test.panel.stop
[monmaster]
[upswired]
password = blah
upsmon master
upsmon primary
[monslave]
[observer]
password = abcd
upsmon slave
upsmon secondary
"
test NutUpsdUsers.upsd_users_lns get upsd_users =
@ -73,16 +77,16 @@ test NutUpsdUsers.upsd_users_lns get upsd_users =
{ "instcmds" = "test.panel.start" }
{ "instcmds" = "test.panel.stop" }
{ } }
{ "monmaster"
{ "upswired"
{ "password" = "blah" }
{ "upsmon" = "master" }
{ "upsmon" = "primary" }
{ } }
{ "monslave"
{ "observer"
{ "password" = "abcd" }
{ "upsmon" = "slave" } }
{ "upsmon" = "secondary" } }
let upsmon_conf = "
MONITOR testups@localhost 1 monmaster blah master
MONITOR testups@localhost 1 upswired blah primary
MINSUPPLIES 1
SHUTDOWNCMD /sbin/shutdown -h +0
@ -103,9 +107,9 @@ test NutUpsmonConf.upsmon_lns get upsmon_conf =
{ "upsname" = "testups" }
{ "hostname" = "localhost" } }
{ "powervalue" = "1" }
{ "username" = "monmaster" }
{ "username" = "upswired" }
{ "password" = "blah" }
{ "type" = "master" } }
{ "type" = "primary" } }
{ }
{ "MINSUPPLIES" = "1" }
{ "SHUTDOWNCMD" = "/sbin/shutdown -h +0" }