]> git.99rst.org Git - openwrt-packages.git/commit
nut: simplify/improve consistency for RUNAS and STATEPATH
authorDaniel F. Dickinson <redacted>
Mon, 6 Jul 2026 22:23:52 +0000 (18:23 -0400)
committerJosef Schlehofer <redacted>
Wed, 15 Jul 2026 07:34:39 +0000 (09:34 +0200)
commit0ebfb5b3e00c413ad001198d7d2f01675757f7ff
tree5e23f8da1607ea5238eac4e9b17a0671a60427c5
parentbb320e47d786e73270820cf2ed2db03b9b295a3c
nut: simplify/improve consistency for RUNAS and STATEPATH

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 <redacted>
net/nut/files/nut-common.sh.functions
net/nut/files/nut-monitor.init
net/nut/files/nut-server-config.sh.functions
net/nut/files/nut-server.init
net/nut/files/nut-service.sh.functions
git clone https://git.99rst.org/PROJECT