]> git.99rst.org Git - openwrt-packages.git/commit
nut: manage logging
authorDaniel F. Dickinson <redacted>
Sat, 18 Jul 2026 22:24:21 +0000 (18:24 -0400)
committerJosef Schlehofer <redacted>
Sun, 19 Jul 2026 09:23:51 +0000 (11:23 +0200)
commit95e3d348f8dac1fff73f1e506b0c46ca17adafa4
tree9bcd051b91572ec3a688ef4b486317aab0354500
parentb9f1de40dc1f716b94e40383458e192c040619bc
nut: manage logging

NUT (upstream) logging has changed. With the introduction of
NUT_DEBUG_SYSLOG we can set it to "stderr" and have NUT's messages
go to stderr only.

This avoid most duplicate messages when procd sends stderr to syslog.

The reverse (syslog only from NUT) is not a current configuration
option. See the section for NUT_DEBUG_SYSLOG at
https://networkupstools.org/docs/man/nut.conf.html#_directives

This is needed because we use '-FF' so that the daemons remain in the
foreground, which is required for procd to manage them. When using
'-FF' logging behaves differently in NUT than when backgrounded.

Unfortunately, there is still some work to be done upstream to
completely eliminate duplicate messages, so some message continue to
appear twice, though not neccessarily with the same facility.priority.

See also
https://github.com/jimklimov/nut/blob/0c3eed09b89cce1e5c0c65ca03d05b4612371cb8/UPGRADING.adoc#changes-from-282-to-283
and
https://github.com/openwrt/packages/pull/29896#issuecomment-5012737643

Conversely, the log messages the initscripts emit are now configured to
emit only to syslog and not to stderr. This avoids duplicates messages
caused by procd's automatic (not configurable) behaviour of sending
the initscript's stderr to syslog, while preserving the syslogid,
facility and priority we want.

Signed-off-by: Daniel F. Dickinson <redacted>
14 files changed:
net/nut/Makefile
net/nut/files/add_nut_httpd_conf.default
net/nut/files/libhid-ups.hotplug
net/nut/files/nut-cgi.init
net/nut/files/nut-common.sh.functions
net/nut/files/nut-monitor.init
net/nut/files/nut-notify-exec.default
net/nut/files/nut-sched.default
net/nut/files/nut-sendmail-notify
net/nut/files/nut-sendmail-notify.default
net/nut/files/nut-serial.hotplug
net/nut/files/nut-server.init
net/nut/files/nut-service.sh.functions
net/nut/files/nutshutdown
git clone https://git.99rst.org/PROJECT