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

@ -3,14 +3,35 @@ EXTRA_DIST = README
if HAVE_SYSTEMD
systemdsystemunit_DATA = \
nut-driver.service \
nut-driver-enumerator.service \
nut-driver-enumerator.path \
nut-driver@.service \
nut-monitor.service \
nut-server.service
nut-server.service \
nut-driver.target \
nut.target
systemdsystemshutdown_SCRIPTS = nutshutdown
systemdtmpfiles_DATA = \
nut-common.tmpfiles
EXTRA_DIST += nut-driver.target nut.target
systemdshutdown_SCRIPTS = nutshutdown
libexec_SCRIPTS = ../upsdrvsvcctl/nut-driver-enumerator.sh
sbin_SCRIPTS = ../upsdrvsvcctl/upsdrvsvcctl
else
EXTRA_DIST += nut-driver.service.in nut-monitor.service.in \
nut-server.service.in nutshutdown.in
EXTRA_DIST += \
nut-driver@.service.in nut-monitor.service.in \
nut-server.service.in nutshutdown.in nut-driver.target nut.target \
nut-driver-enumerator.path.in nut-driver-enumerator.service.in
# NOTE: Do not EXTRA_DIST nut-common.tmpfiles.in - it is generated per build
endif
MAINTAINERCLEANFILES = Makefile.in .dirstamp
# Generated by autogen.sh and needed to run the configure script:
MAINTAINERCLEANFILES += nut-common.tmpfiles.in

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,
@ -16,7 +16,17 @@
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 \
?) ;; \
@ -80,26 +90,31 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@HAVE_SYSTEMD_FALSE@am__append_1 = nut-driver.service.in nut-monitor.service.in \
@HAVE_SYSTEMD_FALSE@ nut-server.service.in nutshutdown.in
@HAVE_SYSTEMD_TRUE@am__append_1 = nut-driver.target nut.target
@HAVE_SYSTEMD_FALSE@am__append_2 = \
@HAVE_SYSTEMD_FALSE@ nut-driver@.service.in nut-monitor.service.in \
@HAVE_SYSTEMD_FALSE@ nut-server.service.in nutshutdown.in nut-driver.target nut.target \
@HAVE_SYSTEMD_FALSE@ nut-driver-enumerator.path.in nut-driver-enumerator.service.in
subdir = scripts/systemd
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/nut-driver.service.in \
$(srcdir)/nut-monitor.service.in \
$(srcdir)/nut-server.service.in $(srcdir)/nutshutdown.in \
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 \
@ -108,15 +123,23 @@ 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 = nut-driver.service nut-monitor.service \
nut-server.service nutshutdown
CONFIG_CLEAN_FILES = nut-common.tmpfiles nut-driver@.service \
nut-monitor.service nut-server.service \
nut-driver-enumerator.service nut-driver-enumerator.path \
nutshutdown
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@ -145,9 +168,12 @@ am__uninstall_files_from_dir = { \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(systemdsystemshutdowndir)" \
"$(DESTDIR)$(systemdsystemunitdir)"
SCRIPTS = $(systemdsystemshutdown_SCRIPTS)
am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" \
"$(DESTDIR)$(systemdshutdowndir)" \
"$(DESTDIR)$(systemdsystemunitdir)" \
"$(DESTDIR)$(systemdtmpfilesdir)"
SCRIPTS = $(libexec_SCRIPTS) $(sbin_SCRIPTS) \
$(systemdshutdown_SCRIPTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@ -167,8 +193,16 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
DATA = $(systemdsystemunit_DATA)
DATA = $(systemdsystemunit_DATA) $(systemdtmpfiles_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(srcdir)/nut-common.tmpfiles.in \
$(srcdir)/nut-driver-enumerator.path.in \
$(srcdir)/nut-driver-enumerator.service.in \
$(srcdir)/nut-driver@.service.in \
$(srcdir)/nut-monitor.service.in \
$(srcdir)/nut-server.service.in $(srcdir)/nutshutdown.in \
README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
A2X = @A2X@
ACLOCAL = @ACLOCAL@
@ -177,6 +211,7 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUGPARSE = @AUGPARSE@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -187,6 +222,7 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFPATH = @CONFPATH@
CPP = @CPP@
CPPCHECK = @CPPCHECK@
CPPFLAGS = @CPPFLAGS@
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
CPPUNIT_LIBS = @CPPUNIT_LIBS@
@ -200,6 +236,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@
@ -212,6 +249,7 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GDLIB_CONFIG = @GDLIB_CONFIG@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@ -229,6 +267,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@
@ -239,21 +279,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@
@ -273,6 +321,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@
@ -286,6 +337,7 @@ STATEPATH = @STATEPATH@
STRIP = @STRIP@
SUN_LIBUSB = @SUN_LIBUSB@
TREE_VERSION = @TREE_VERSION@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
XMLLINT = @XMLLINT@
@ -303,6 +355,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@
@ -316,6 +369,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@
@ -341,12 +397,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@
@ -356,13 +414,27 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
udevdir = @udevdir@
EXTRA_DIST = README $(am__append_1)
EXTRA_DIST = README $(am__append_1) $(am__append_2)
@HAVE_SYSTEMD_TRUE@systemdsystemunit_DATA = \
@HAVE_SYSTEMD_TRUE@ nut-driver.service \
@HAVE_SYSTEMD_TRUE@ nut-driver-enumerator.service \
@HAVE_SYSTEMD_TRUE@ nut-driver-enumerator.path \
@HAVE_SYSTEMD_TRUE@ nut-driver@.service \
@HAVE_SYSTEMD_TRUE@ nut-monitor.service \
@HAVE_SYSTEMD_TRUE@ nut-server.service
@HAVE_SYSTEMD_TRUE@ nut-server.service \
@HAVE_SYSTEMD_TRUE@ nut-driver.target \
@HAVE_SYSTEMD_TRUE@ nut.target
@HAVE_SYSTEMD_TRUE@systemdsystemshutdown_SCRIPTS = nutshutdown
@HAVE_SYSTEMD_TRUE@systemdtmpfiles_DATA = \
@HAVE_SYSTEMD_TRUE@ nut-common.tmpfiles
@HAVE_SYSTEMD_TRUE@systemdshutdown_SCRIPTS = nutshutdown
@HAVE_SYSTEMD_TRUE@libexec_SCRIPTS = ../upsdrvsvcctl/nut-driver-enumerator.sh
@HAVE_SYSTEMD_TRUE@sbin_SCRIPTS = ../upsdrvsvcctl/upsdrvsvcctl
# NOTE: Do not EXTRA_DIST nut-common.tmpfiles.in - it is generated per build
# Generated by autogen.sh and needed to run the configure script:
MAINTAINERCLEANFILES = Makefile.in .dirstamp nut-common.tmpfiles.in
all: all-am
.SUFFIXES:
@ -378,14 +450,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/systemd/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu scripts/systemd/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
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)
@ -396,20 +467,26 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
nut-driver.service: $(top_builddir)/config.status $(srcdir)/nut-driver.service.in
nut-common.tmpfiles: $(top_builddir)/config.status $(srcdir)/nut-common.tmpfiles.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nut-driver@.service: $(top_builddir)/config.status $(srcdir)/nut-driver@.service.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nut-monitor.service: $(top_builddir)/config.status $(srcdir)/nut-monitor.service.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nut-server.service: $(top_builddir)/config.status $(srcdir)/nut-server.service.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nut-driver-enumerator.service: $(top_builddir)/config.status $(srcdir)/nut-driver-enumerator.service.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nut-driver-enumerator.path: $(top_builddir)/config.status $(srcdir)/nut-driver-enumerator.path.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nutshutdown: $(top_builddir)/config.status $(srcdir)/nutshutdown.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-systemdsystemshutdownSCRIPTS: $(systemdsystemshutdown_SCRIPTS)
install-libexecSCRIPTS: $(libexec_SCRIPTS)
@$(NORMAL_INSTALL)
@list='$(systemdsystemshutdown_SCRIPTS)'; test -n "$(systemdsystemshutdowndir)" || list=; \
@list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(systemdsystemshutdowndir)'"; \
$(MKDIR_P) "$(DESTDIR)$(systemdsystemshutdowndir)" || exit 1; \
echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
@ -428,17 +505,87 @@ install-systemdsystemshutdownSCRIPTS: $(systemdsystemshutdown_SCRIPTS)
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(systemdsystemshutdowndir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(systemdsystemshutdowndir)$$dir" || exit $$?; \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
} \
; done
uninstall-systemdsystemshutdownSCRIPTS:
uninstall-libexecSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(systemdsystemshutdown_SCRIPTS)'; test -n "$(systemdsystemshutdowndir)" || exit 0; \
@list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
dir='$(DESTDIR)$(systemdsystemshutdowndir)'; $(am__uninstall_files_from_dir)
dir='$(DESTDIR)$(libexecdir)'; $(am__uninstall_files_from_dir)
install-sbinSCRIPTS: $(sbin_SCRIPTS)
@$(NORMAL_INSTALL)
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n' \
-e 'h;s|.*|.|' \
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
if (++n[d] == $(am__install_max)) { \
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
else { print "f", d "/" $$4, $$1 } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
} \
; done
uninstall-sbinSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir)
install-systemdshutdownSCRIPTS: $(systemdshutdown_SCRIPTS)
@$(NORMAL_INSTALL)
@list='$(systemdshutdown_SCRIPTS)'; test -n "$(systemdshutdowndir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(systemdshutdowndir)'"; \
$(MKDIR_P) "$(DESTDIR)$(systemdshutdowndir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n' \
-e 'h;s|.*|.|' \
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
if (++n[d] == $(am__install_max)) { \
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
else { print "f", d "/" $$4, $$1 } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(systemdshutdowndir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(systemdshutdowndir)$$dir" || exit $$?; \
} \
; done
uninstall-systemdshutdownSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(systemdshutdown_SCRIPTS)'; test -n "$(systemdshutdowndir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
dir='$(DESTDIR)$(systemdshutdowndir)'; $(am__uninstall_files_from_dir)
mostlyclean-libtool:
-rm -f *.lo
@ -466,6 +613,27 @@ uninstall-systemdsystemunitDATA:
@list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir)
install-systemdtmpfilesDATA: $(systemdtmpfiles_DATA)
@$(NORMAL_INSTALL)
@list='$(systemdtmpfiles_DATA)'; test -n "$(systemdtmpfilesdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(systemdtmpfilesdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(systemdtmpfilesdir)" || 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)$(systemdtmpfilesdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(systemdtmpfilesdir)" || exit $$?; \
done
uninstall-systemdtmpfilesDATA:
@$(NORMAL_UNINSTALL)
@list='$(systemdtmpfiles_DATA)'; test -n "$(systemdtmpfilesdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(systemdtmpfilesdir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
@ -473,7 +641,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)'; \
@ -507,7 +678,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(systemdsystemshutdowndir)" "$(DESTDIR)$(systemdsystemunitdir)"; do \
for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(systemdshutdowndir)" "$(DESTDIR)$(systemdsystemunitdir)" "$(DESTDIR)$(systemdtmpfilesdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@ -540,6 +711,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
@ -560,14 +732,14 @@ info: info-am
info-am:
install-data-am: install-systemdsystemshutdownSCRIPTS \
install-systemdsystemunitDATA
install-data-am: install-systemdshutdownSCRIPTS \
install-systemdsystemunitDATA install-systemdtmpfilesDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-exec-am: install-libexecSCRIPTS install-sbinSCRIPTS
install-html: install-html-am
@ -605,8 +777,9 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-systemdsystemshutdownSCRIPTS \
uninstall-systemdsystemunitDATA
uninstall-am: uninstall-libexecSCRIPTS uninstall-sbinSCRIPTS \
uninstall-systemdshutdownSCRIPTS \
uninstall-systemdsystemunitDATA uninstall-systemdtmpfilesDATA
.MAKE: install-am install-strip
@ -615,15 +788,19 @@ uninstall-am: uninstall-systemdsystemshutdownSCRIPTS \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip install-systemdsystemshutdownSCRIPTS \
install-systemdsystemunitDATA installcheck installcheck-am \
install-html-am install-info install-info-am \
install-libexecSCRIPTS install-man install-pdf install-pdf-am \
install-ps install-ps-am install-sbinSCRIPTS install-strip \
install-systemdshutdownSCRIPTS install-systemdsystemunitDATA \
install-systemdtmpfilesDATA 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-systemdsystemshutdownSCRIPTS \
uninstall-systemdsystemunitDATA
uninstall-libexecSCRIPTS uninstall-sbinSCRIPTS \
uninstall-systemdshutdownSCRIPTS \
uninstall-systemdsystemunitDATA uninstall-systemdtmpfilesDATA
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View file

@ -4,5 +4,10 @@ Service Manager.
These files are automatically installed, upon detection (at configure time)
of a systemd enabled system.
Contributed by Michal Hlavinka <mhlavink@redhat.com>
This also uses the nut-driver-enumerator.sh (service and implementation
method) and upsdrvsvcctl (tool) to manage NUT drivers as service instances
located in ../upsdrvsvcctl/ source subdirectory.
Contributed by Michal Hlavinka <mhlavink@redhat.com>
Updated 2016-2018 by Michal Hrusecky and Jim Klimov <EvgenyKlimov@eaton.com>

View file

@ -0,0 +1,5 @@
# State file (e.g. upsd to driver) and pidfile location for NUT:
d @STATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
X @STATEPATH@/nut
d @PIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
X @PIDPATH@/nut

View file

@ -0,0 +1,7 @@
# Trigger restart of nut-driver-enumerator.service whenever ups.conf is edited
[Path]
PathModified=@CONFPATH@/ups.conf
[Install]
WantedBy=nut.target

View file

@ -0,0 +1,30 @@
[Unit]
# This unit starts early in system lifecycle to set up nut-driver instances.
# End-user may also restart this unit after editing ups.conf to automatically
# un-register or add new instances as appropriate.
Description=Network UPS Tools - enumeration of configure-file devices into systemd unit instances
After=local-fs.target
Before=nut-driver.target
PartOf=nut.target
[Service]
### Script needs privileges to restart units
#User=@RUN_AS_USER@
#Group=@RUN_AS_GROUP@
User=root
SyslogIdentifier=%N
# it is expected that the process has to exit before systemd starts follow-up
# units; it should not be a problem for those
Type=oneshot
# Currently systemd does not support restarting of oneshot services, and does
# not seem to guarantee that other services would only start after the script
# completes, for a non-oneshot case. The script itself handles restarting of
# nut-server which is the primary concerned dependency at the moment, so we
# don't want it to fail the unit (when it can't restart).
Environment=REPORT_RESTART_42=no
EnvironmentFile=-@CONFPATH@/nut.conf
ExecStart=@NUT_LIBEXECDIR@/nut-driver-enumerator.sh
ExecReload=@NUT_LIBEXECDIR@/nut-driver-enumerator.sh
[Install]
WantedBy=nut.target

View file

@ -1,10 +0,0 @@
[Unit]
Description=Network UPS Tools - power device driver controller
After=local-fs.target network.target
StopWhenUnneeded=yes
[Service]
ExecStart=@SBINDIR@/upsdrvctl start
ExecStop=@SBINDIR@/upsdrvctl stop
Type=forking

View file

@ -0,0 +1,8 @@
[Unit]
Description=Network UPS Tools - target for power device drivers on this system
After=local-fs.target
# network.target
PartOf=nut.target
[Install]
WantedBy=nut.target

View file

@ -0,0 +1,67 @@
[Unit]
Description=Network UPS Tools - device driver for %I
After=local-fs.target
# Note: If the "Before" line below is uncommented, the target unit
# would only become initialized after the driver units are all in
# a final state (active, failed, ...) and would allow nut-server
# (upsd) to start up and represent those devices on the network.
# With this constraint commented away, the nut-server should start
# earlier, but may initially report some devices as Not connected
# (they should appear when drivers complete their initialization -
# e.g. snmp walks of large MIBs can take a while):
#Before=nut-driver.target
# Propagate stopping of the target:
PartOf=nut-driver.target
# Note: The choice of "network.target" allows to schedule this unit
# roughly when the network stack of this OS is ready (e.g. that the
# subsequent `upsd` will have a `0.0.0.0` or a `localhost` to bind
# to); however this target does not ensure availability of a real
# connection or final IP addresses. Drivers that require network as
# a media for interaction with UPSes (snmp-ups, netxml-ups, ipmi etc.)
# may want to extend this unit with `Requires=network-online.target`
# instead. Also note that *generally* this should not be a problem,
# since the drivers have a few retries with timeouts during startup,
# and typically by the time the box gets an IP address, the driver
# is still retrying to start and will succeed.
# Extending the unit does not require *this* file to be edited, you
# can instead drop in an additional piece of configuration, e.g. add
# a `/etc/systemd/system/nut-driver@.service.d/network.conf` with:
# [Unit]
# Requires=network-online.target
# After=network-online.target
# If your `upsd` requires specific IP addresses to be available before
# starting, a `/etc/systemd/system/nut-driver.target.d/network.conf`
# can be used in a similar manner.
# Finally note that "nut-driver-enumerator.service" should take care of this.
[Service]
EnvironmentFile=-@CONFPATH@/nut.conf
SyslogIdentifier=%N
ExecStart=/bin/sh -c 'NUTDEV="`@NUT_LIBEXECDIR@/nut-driver-enumerator.sh --get-device-for-service %i`" && [ -n "$NUTDEV" ] || { echo "FATAL: Could not find a NUT device section for service unit %i" >&2 ; exit 1 ; } ; @SBINDIR@/upsdrvctl start "$NUTDEV"'
ExecStop=/bin/sh -c 'NUTDEV="`@NUT_LIBEXECDIR@/nut-driver-enumerator.sh --get-device-for-service %i`" && [ -n "$NUTDEV" ] || { echo "FATAL: Could not find a NUT device section for service unit %i" >&2 ; exit 1 ; } ; @SBINDIR@/upsdrvctl stop "$NUTDEV"'
# Restart really always, do not stop trying:
StartLimitInterval=0
Restart=always
# Protract the "hold-off" interval, so if the device connection is
# lost, the driver does not reapidly restart and fail too many times,
# and then systemd would keep the unit failed without further retries.
# Notably, this helps start "dummy-ups" drivers retranslating local
# devices (so getting a chicken-and-egg problem for driver-upsd-driver
# orderly series of initializations). More details in NUT issue #779.
RestartSec=15s
Type=forking
# Note: If you customize the "maxstartdelay" in ups.conf or in your
# NUT compilation defaults, so it exceeds the default systemd unit
# startup timeout (typically 90 sec), then make sure to set a slightly
# longer systemd timeout for the nut-driver unit instances. You can
# do this by populating a drop-in configuration, so it is not later
# overwritten by updates to your NUT package -- create a dir+file:
# /etc/systemd/system/nut-driver@.service.d/timeout.conf with lines:
# [Service]
# TimeoutStartSec=190s
[Install]
WantedBy=nut-driver.target

View file

@ -1,11 +1,26 @@
[Unit]
Description=Network UPS Tools - power device monitor and shutdown controller
After=local-fs.target network.target nut-server.service
# Note: We do not specify Requires nut-server.service because
# the `upsd` daemon(s) may be running on a different machine
# (connected to the UPSes) than the `upsmon` shutdown protector.
# The "Wants" directive would try to start the nut-server but
# would not abort if that attempt fails for whatever reason.
Wants=nut-server.service
# Extending the unit does not require *this* file to be edited, you
# can instead drop in an additional piece of configuration, e.g. add
# a `/etc/systemd/system/nut-monitor.service.d/network.conf` with:
# [Unit]
# Requires=network-online.target
# After=network-online.target
PartOf=nut.target
[Service]
ExecStart=@SBINDIR@/upsmon
EnvironmentFile=-@CONFPATH@/nut.conf
SyslogIdentifier=%N
ExecStart=@SBINDIR@/upsmon -F
ExecReload=@SBINDIR@/upsmon -c reload
PIDFile=@PIDPATH@/upsmon.pid
Type=forking
[Install]
WantedBy=multi-user.target
WantedBy=nut.target

View file

@ -1,15 +1,29 @@
[Unit]
Description=Network UPS Tools - power devices information server
After=local-fs.target network.target nut-driver.service
After=local-fs.target network.target nut-driver.target
# We don't Require drivers to be successfully started! This would be
# a change of behavior compared to init SysV, and could prevent from
# accessing successfully started, at least to audit a system.
Wants=nut-driver.service
Wants=nut-driver.target
# The `upsd` is a networked service (even if bound to a `localhost`)
# so it requires that the OS has some notion of networking already.
# Extending the unit does not require *this* file to be edited, you
# can instead drop in an additional piece of configuration, e.g. add
# a `/etc/systemd/system/nut-server.service.d/network.conf` with:
# [Unit]
# Requires=network-online.target
# After=network-online.target
Requires=network.target
Before=nut-monitor.service
PartOf=nut.target
[Service]
ExecStart=@SBINDIR@/upsd
Type=forking
EnvironmentFile=-@CONFPATH@/nut.conf
SyslogIdentifier=%N
# Note: foreground mode by default skips writing a PID file (and
# needs Type=simple); can use "-FF" here to create one anyway:
ExecStart=@SBINDIR@/upsd -F
ExecReload=@SBINDIR@/upsd -c reload -P $MAINPID
[Install]
WantedBy=multi-user.target
WantedBy=nut.target

View file

@ -0,0 +1,8 @@
[Unit]
Description=Network UPS Tools - target for power device drivers, data server and monitoring client (if enabled) on this system
After=local-fs.target nut-driver.target nut-server.service nut-monitor.service
Wants=local-fs.target nut-driver.target nut-server.service nut-monitor.service
# network.target
[Install]
WantedBy=multi-user.target

23
scripts/systemd/nutshutdown.in Normal file → Executable file
View file

@ -1,2 +1,23 @@
#!/bin/sh
@SBINDIR@/upsmon -K >/dev/null 2>&1 && @SBINDIR@/upsdrvctl shutdown
# This script requires both nut-server (drivers)
# and nut-client (upsmon) to be present locally
# and on mounted filesystems
[ -x "@SBINDIR@/upsmon" ] && [ -x "@SBINDIR@/upsdrvctl" ] || exit
if @SBINDIR@/upsmon -K >/dev/null 2>&1; then
# The argument may be anything compatible with sleep
# (not necessarily a non-negative integer)
wait_delay="`/bin/sed -ne 's#^ *POWEROFF_WAIT= *\(.*\)$#\1#p' @CONFPATH@/nut.conf`" || wait_delay=""
@SBINDIR@/upsdrvctl shutdown
if [ -n "$wait_delay" ] ; then
/bin/sleep $wait_delay
# We need to pass --force twice here to bypass systemd and execute the
# reboot directly ourself.
/bin/systemctl reboot --force --force
fi
fi
exit 0