When using serial-port based UPSes with NUT, it is handy to be able to
configure a USB serial port to have be set tot the NUT runas user, so
that NUT can access the serial port automagically.
Closes#6997
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Closes#6997 - Allows upsd to runas a non-privileged user.
If any driver is running as non-privileged user, the last driver's
user will be used as the server non-privileged user, otherwise the
user specified in config upsd, otherwise nut. Previously the
localisation of RUNAS variable was in the wrong locations.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
A short while after 3.2.2 was tagged, it was superseded by 3.2.3 with a
minor fix for aligned memory allocation for 32-bit arch
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* remove the "--spider" download option from captive portal
detection to make the heartbeat function more robust.
Keep the uplink connection 'alive' with all sorts of portals.
Signed-off-by: Dirk Brenken <dev@brenken.org>
Adds support for acl_plugin, and acl_opt_* options.
acl_opt_* requires some care as it relies on the internal behaviour of
cfg_load setting environment variables in a certain form. However,
given that _all_ of the cfg_load infrastructure relies on that, we can
be pretty sure that it won't change in a way that will hurt us.
Originally reported as: https://github.com/openwrt/packages/pull/7434
Signed-off-by: Karl Palsson <karlp@etactica.com>
This is to correct the variable name CONFIGSTR in the export_bool
sub-routine: the variable in line 26 was written CONFIGSTRING instead
of CONFIGSTR.
Signed-off-by: Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
Fixes compilation without deprecated OpenSSL APIs
Switched to codeload for simplicity and to fix package upgrades.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This prevents updates from failing if multiple instances of the
script are running in parallel. This fixes#7492.
Signed-off-by: Martin Konrad <info@martin-konrad.net>
Avoid specifying variables that are not specificy set in order to avoid breaking
drivers for which those variables do not exist. Closes: #7096.
As part of these fixes make sure we have all the variables we need. Closes: #7001.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Various path and permissions fixes to properly allow nut-server and nut-monitor to
start properly.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Serial drivers don't add much to main NUT and appear to be common,
so make it possible for users to use NUT with serial UPS drivers without
a custom build.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
The mechanism for making sure hotplug doesn't execute during forced shutdown
was interfering with initial start of hotplug script due to checking for path
that doesn't exist at initial start. This fixes that and closes#6966.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Leading zeroes left in ProductId results in some UPS hardware not being matched
by the hotplug script lead to bad permissions and driver not starting.
Closes: #6966
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* support multiple WAN interfaces in iptables rules,
set 'ban_iface' option accordingly (as space separated list)
or use the LuCI frontend
* add new "refresh" mode while triggered by fw changes (no download)
* add required ip dependency
* fix wrong 'settype' definition for firehol1 in config
Signed-off-by: Dirk Brenken <dev@brenken.org>
This is to change the init script to a procd init script
This also enable some additional parameters in the binary that
were present but not enabled:
The export file (option export_file)
The import file (option import_file)
The daylog (option daylog_file)
These are disabled by default. Also, the option to run as a daemon
is removed, as not compatible with procd.
There is no change in the binary.
Signed-off-by: Jean-Michel Lacroix <lacroix@lepine-lacroix.info>