Make sure we force shutdown of UPS only when we should, and when
we should that shutdown happens.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
The server and driver were not starting/restarting reliably. In
addition on interface changes NUT got very confused. So we fix
handling of restarts and add a reload trigger for interface
changes.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Extra parameters for the UPS driver were not being handled correctly.
Fix that (was wrong variable name).
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
The statepath was getting the wrong permission and/or not created
at the right time. This commit includes fixes for handling the
statepath (typically /var/run/nut).
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Running as non-root was failing due to misplace local keyword
causing runas to be unset from calling value.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
1) For upsmon start and stop were at wrong position in rc.d
2) Stop needs more than just killing the procd instead but rather
needs a stop command to be issued.
3) Interface up/down was causing not to enter a crashloop (we fix this
with procd trigger on interface changes).
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Running as non-root was failing due to misplace local keyword
causing runas to be unset from calling value.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
CONFIG_ARGS has --without-wrap so libwrap as a dependency is
extraneous as it is not actually used.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
This project seems abandoned. Updated to latest version.
Also cleaned up the Makefile quite a bit.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from dff6d2639e)
Fixes CVEs:
CVE-2018-5738
CVE-2018-5740
CVE-2018-5743
CVE-2018-5744
CVE-2018-5745
CVE-2019-6465
CVE-2019-6471
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[mention fixed CVEs;patches: refreshed and removed those which are in
upstream now]
Do not inlcude <netinet/in.h> when using glibc to avoid various
redefinitions.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
(cherry-picked from 0c995cabe7)
To return the number of connected clients.
At present this can be partially inferred by using a count() over one of
the existing metrics, however this doesn't handle the case when there
are no connected clients. When that happens, the count() will return no
data instead of 0.
Signed-off-by: Alex Tomlins <alex@tomlins.org.uk>
(cherry picked from commit 1237e196b4)
These output a count of the number of packets transmitted/received, so
should be tracked as a counter. As it stands, promtool is warning that
these shouldn't be named ending _total if they're a gauge.
Signed-off-by: Alex Tomlins <alex@tomlins.org.uk>
(cherry picked from commit a45c702baa)
If the /proc/sys/net/netfilter/nc_conntrack_* files are not present,
this exporter was outputting a blank value, which is invalid. These
files will not be present when using an image that doesn't include the
iptables and firewall packages (eg a minimal access-point type image).
This updates the collector to only output the metrics if the
corresponding /proc files are present.
Signed-off-by: Alex Tomlins <alex@tomlins.org.uk>
(cherry picked from commit 0100a2cb26)
we should pass -DUNSUPPORTED_POSIX_THREADS_HACK to CFLAGS to openssh
to prevent function redefine, I don't know why pam module use
micro UNSUPPORTED_POSIX_THREADS_HACK to detect whether define
pthread functions, but not detect whether define
UNSUPPORTED_POSIX_THREADS_HACK.
Signed-off-by: Guo Li <uxgood.org@gmail.com>
ac_cv_header_libunwind_h needs to be set to 0, as ac_cv_have_libunwind_h
overwritten based on the former's value.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
(cherry-picked from ec317934b2)
DEPENDS:=@!arc is causing a recursive dependency because of the optional
selection of libseccomp by util/lxc. The workaround hides the package
in Package/libseccomp/config instead.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
(cherry-picked from e29483d7e2)
libseccomp does not compile for arc, so we can't show that option for
arc.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
(cherry-picked from 57b4d94d98)
Otherwise one gets a failure if the libraries (e.g. Python
header file) exist in the build system. Worse in some cases
is host headers being found if one doesn't specifically
disable a library search in autotools. It is especially
important that Python is disabled by default.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
(cherry-picked from cc039d801e)