<feed xmlns='http://www.w3.org/2005/Atom'>
<title>packages/net/nut/files/nut-service.sh.functions, branch master</title>
<subtitle>Mirror of packages feed</subtitle>
<id>https://git.openwrt.org/feed/packages/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/feed/packages/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/'/>
<updated>2026-07-15T07:34:39Z</updated>
<entry>
<title>nut: split interface_triggers function</title>
<updated>2026-07-15T07:34:39Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-07-07T02:08:01Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=4638c42055946ac424d208f6e92aadc9eb8dd884'/>
<id>urn:sha1:4638c42055946ac424d208f6e92aadc9eb8dd884</id>
<content type='text'>
Using add_interface_triggers and check_interface_up is a
better separation of concerns and the code has little in
common (no duplication of code concerns).

While we are at it make both nut-monitor and nut-server failure of
add_interface_triggers non-fatal with a logged error message.

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: simplify/improve consistency for RUNAS and STATEPATH</title>
<updated>2026-07-15T07:34:39Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-07-06T22:23:52Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=0ebfb5b3e00c413ad001198d7d2f01675757f7ff'/>
<id>urn:sha1:0ebfb5b3e00c413ad001198d7d2f01675757f7ff</id>
<content type='text'>
We claimed we only supported a single upsd section named 'upsd' and a
single uspmon section named 'upsmon', but when determining RUNAS
and STATEPATH we were using overly-complex functions as we were
attempting to support multiple upsd and upsmon sections.

Simplify the logic by adhering to our stated support.

While were are at it we make RUNAS handling more consistent between
nut-server (upsd) and nut-monitor (upsmon).

We no longer try to limp along if RUNAS is not set by find_runas; to do
this properly would require over-complicated logic when setting file
and directory permissions and ownership.

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: minor fixes found via automated code review</title>
<updated>2026-07-15T07:34:39Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-07-03T21:05:14Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=bb320e47d786e73270820cf2ed2db03b9b295a3c'/>
<id>urn:sha1:bb320e47d786e73270820cf2ed2db03b9b295a3c</id>
<content type='text'>
* Fixes a missing word in a comment
* Fixes inconsistent indentation in sample configurations
* Drops redundant default assignment in find_statepath()

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: do not trigger on interface activity by default</title>
<updated>2026-07-15T07:34:39Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-07-02T22:50:40Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=0bd44d9b9de2d79ca685d715cddcf1f82ff75738'/>
<id>urn:sha1:0bd44d9b9de2d79ca685d715cddcf1f82ff75738</id>
<content type='text'>
The defaults were triggiering on any activity on the network, which
caused excessive restarts. So default to no interface trigger, with
'all' (or specific interfaces) as an option.

See https://github.com/openwrt/packages/pull/29607#discussion_r3463553192

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: fix hard-coded trigger scripts for interface triggers</title>
<updated>2026-07-15T07:34:39Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-07-02T22:35:06Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=ce009de85f3946392138fdcb443198456afa6dbc'/>
<id>urn:sha1:ce009de85f3946392138fdcb443198456afa6dbc</id>
<content type='text'>
The trigger script and instance to reload should depend on which
initscript is calling interface_triggers. It wasn't, so we fix that.

See https://github.com/openwrt/packages/pull/29607#discussion_r3463544231

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: fix erroneous validation of STATEPATH</title>
<updated>2026-07-15T07:34:39Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-07-02T22:16:00Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=c9cb2cfaa8ed55f1a01beafc458708988fbf7436'/>
<id>urn:sha1:c9cb2cfaa8ed55f1a01beafc458708988fbf7436</id>
<content type='text'>
We should fallback to the default if one is not specified. In addition
find_statepath is the wrong place to check for its existence - it should
be created by the initscript if it does not exist.

See https://github.com/openwrt/packages/pull/29607#discussion_r3462976647

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.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>
</feed>
