<feed xmlns='http://www.w3.org/2005/Atom'>
<title>packages/net/nut/Makefile, branch master</title>
<subtitle>Mirror of packages feed</subtitle>
<id>https://git-03.infra.openwrt.org/feed/packages/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/feed/packages/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/'/>
<updated>2026-07-19T09:23:51Z</updated>
<entry>
<title>nut: manage logging</title>
<updated>2026-07-19T09:23:51Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-07-18T22:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=95e3d348f8dac1fff73f1e506b0c46ca17adafa4'/>
<id>urn:sha1:95e3d348f8dac1fff73f1e506b0c46ca17adafa4</id>
<content type='text'>
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 &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: bump PKG_RELEASE for fixes</title>
<updated>2026-07-15T07:34:39Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-07-02T23:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=35012ec0626d139a4706809ccd1da6646257a45a'/>
<id>urn:sha1:35012ec0626d139a4706809ccd1da6646257a45a</id>
<content type='text'>
Script executables have changed, therefore bump PKG_RELEASE

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: rewrite scripts</title>
<updated>2026-07-02T04:43:08Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-05-08T01:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=5e6b6943f3137bc31a818aa82fb70f41ddc5e0ca'/>
<id>urn:sha1:5e6b6943f3137bc31a818aa82fb70f41ddc5e0ca</id>
<content type='text'>
The scripts were a mess. Attempting even a simple update caused many
Copilot complaints. So we rewrite the scripts to be cleaner and
resolve the issues found by automated code review (such as Copilot).
Made extensive use of Qwen3.6-27B, LATE, and llama.ccp for local AI
code reviews during development.

In the process we deduplicate the nut-server and nut-monitor
initscripts and split them into several files, for easier automatic
and human review.

Incorporates and supersedes: #28308
Should supersede #21014

Closes: #28298

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: belatedly add migration for nut-monitor changes</title>
<updated>2026-07-02T04:43:08Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-05-30T22:23:15Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=76a13bfdfba699b248bc0bc236e2ba5e46c094d8'/>
<id>urn:sha1:76a13bfdfba699b248bc0bc236e2ba5e46c094d8</id>
<content type='text'>
Add previously missed migration script (uci-defaults) for changes
to nut-monitor initscript.

Created with the help of iterative code reviews by
Qwen3.6-27B (LLM model) running on llama.cpp (local LLM server),
controlled by LATE.

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: bump OpenWrt copyright for files with it</title>
<updated>2026-07-02T04:43:08Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-05-09T15:27:18Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=041783b5c0705c699c98c88da908e1503d1ffc56'/>
<id>urn:sha1:041783b5c0705c699c98c88da908e1503d1ffc56</id>
<content type='text'>
For files with an existing OpenWrt copyright notation,
update to include 2026 for scripts which have been
updated this year.

Per https://github.com/openwrt/packages/pull/29390#discussion_r3213318908

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: move drivers to libexec</title>
<updated>2026-07-02T04:43:08Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-05-10T02:33:24Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=b0b686fe240209be36611220db097aed65e74846'/>
<id>urn:sha1:b0b686fe240209be36611220db097aed65e74846</id>
<content type='text'>
They are executables not libraries, so move the UPS drivers
to /usr/libexec/nut.

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: bump to 2.8.5</title>
<updated>2026-07-02T04:43:08Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-05-09T08:49:52Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=48a9a2bd62dd9554f824d0bce72230280a7f7123'/>
<id>urn:sha1:48a9a2bd62dd9554f824d0bce72230280a7f7123</id>
<content type='text'>
Bump version to latest stable release. Adjust configure
and drivers as needed.

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>treewide: cleanup URLs</title>
<updated>2026-05-08T20:28:27Z</updated>
<author>
<name>Yanase Yuki</name>
</author>
<published>2026-01-02T09:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=b0d8a3d384915c2de1c5b473fcfb8b3996bb849b'/>
<id>urn:sha1:b0d8a3d384915c2de1c5b473fcfb8b3996bb849b</id>
<content type='text'>
This commit converts plain HTTP URLs to HTTPS, and updates
old or outdated URLs.

Signed-off-by: Yanase Yuki &lt;dev@zpc.st&gt;
</content>
</entry>
<entry>
<title>nut: ensure correct upsmon settings names</title>
<updated>2026-04-27T08:42:36Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-03-17T02:54:39Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=0c88118ad4bb303b811975925641357e69f6736b'/>
<id>urn:sha1:0c88118ad4bb303b811975925641357e69f6736b</id>
<content type='text'>
Prompted by
https://github.com/openwrt/luci/pull/8420#issuecomment-4071252681
we update upsmon configs to ensure they are correct according to
upstream. We reorder the options so that they match upstream
documentation at
&lt;https://networkupstools.org/docs/man/upsmon.conf.html&gt; to be sure
we have not missed any items.
While at it, we add configuration options from the upstream
documentation that are not currently present in the UCI configs.

Some years ago upstream changed the names the primary/secondary
UPS system/monitor from master/slave to primary/secondary. It
is uncertain how much longer these deprecated names will be
accepted by NUT.
Therefore update naming to match upstream documentation and
configuration. See
&lt;https://networkupstools.org/docs/man/upsmon.html&gt;,
&lt;https://networkupstools.org/docs/man/upsmon.conf.html&gt;, and
&lt;https://networkupstools.org/docs/man/upsd.users.html&gt;.

At the same time, prompted by
https://github.com/openwrt/packages/pull/28875#issuecomment-4079307540
we simplify the configuration and add checks to avoid bad configs
due to misspellings/typos of configuation options by users.

A sample config

config upsmon 'upsmon'
       option notifycmd '/usr/bin/logger -t nut-monitor-exec '

config monitor
        option type primary
        option upsname upsname
        option hostname localhost
        option username upsuser
        option password upspassword

config notifications 'ONLINE'
        option message "UPS %s is on line power"
        option flag "SYSLOG"

config notifications 'ONBATT'
        option message "UPS %s is on battery power"
        option flag "SYSLOG+EXEC"

In order to iterate through the notifications, we use named
'notifications' sections and compare the section name to list of
notification events defined by NUT. If they don't match, warn
during initscript startup.

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: fix driver, server, and monitor reload/stop</title>
<updated>2026-03-03T18:53:14Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-01-11T10:41:48Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=90d3d1e9d013e9cc3fec755f46826d8feab94cfa'/>
<id>urn:sha1:90d3d1e9d013e9cc3fec755f46826d8feab94cfa</id>
<content type='text'>
Updated configuration was not being applied after config change. This
was due to the means used to do the daemon reloads.

Closes #28298 "Drivers not restarted on config change"

Enable creating PID files for the server, driver, and monitor daemon
processes. This allows to use NUT's built-in facilities for signalling
the daemon's.

For server, when reloading:
1. Check if upsd is running
   1. If not, start it.
   2. If it is send reload signal to upsd
2. For each driver:
   1. Check if the driver is running
      1. If it is, send reload-or-exit signal to driver
      2. If driver is not running, start it
3. Attempt to start server (upsd and drivers) if service was stopped.

For server, when stopping:
1. Check if upsd is running
   1. If it is send stop signal to upsd
   2. Ensure it really is stopped
2. For each driver:
   1. Check if the driver is running
      1. If it is, send stop signal to driver
      2. If driver is still running, stop it.
3. If the server process is active (even with not upsd or drivers),
   stop it.

For monitor, send the reload signal on config change, with fallback to
stopping and starting the daemon.

Change the names of variables and functions to make it more clear what
is being acted on, configured, or otherwise touched.

Avoid confusing messages in syslog

* Avoid attempting to remove a procd server instance that does not exist
  as doing so results in confusing/scary messages in syslog, such as:

  Command failed: ubus call service delete
  { "name": "nut-server", "instance": "upsd" } (Not found)

In NUT some models of UPS use shutdown_delay rather than offdelay, and
yet others use usd for the same purpose. shutdown_delay and usd were
previously not available in the list of available driver options, so
add them.

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
</feed>
