]> git.99rst.org Git - openwrt-packages.git/commitdiff
nut: minor fixes found via automated code review
authorDaniel F. Dickinson <redacted>
Fri, 3 Jul 2026 21:05:14 +0000 (17:05 -0400)
committerJosef Schlehofer <redacted>
Wed, 15 Jul 2026 07:34:39 +0000 (09:34 +0200)
* 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 <redacted>
net/nut/files/nut-service.sh.functions
net/nut/files/nut_monitor
net/nut/files/nut_server

index fda69ce608260e2f95cf59c4ea4eaf7480c48f33..7ca0da4f153e4597e5c7068551a5d49940d4d70c 100644 (file)
@@ -210,7 +210,6 @@ find_statepath() {
        local nut_value_via_foreach=""
 
        find_foreach_value "$section_type" "$package" statepath "$NUT_BASE_STATEPATH" || return 1
-       [ -n "$nut_value_via_foreach" ] || nut_value_via_foreach="$NUT_BASE_STATEPATH"
 
        # shellcheck disable=2034
        STATEPATH="$nut_value_via_foreach"
@@ -299,7 +298,7 @@ interface_triggers() {
                        for interface in $interfaces; do
                                # We use the variadic third and fourth parameters of procd_add_interface_trigger to
                                # restart instead of reload on interface up/down events. Additionally the variadic
-                               # fifth and parameters of procd_add_interface_trigger are passed through to
+                               # fifth and following parameters of procd_add_interface_trigger are passed through to
                                # the <script>, so the trigger action becomes e.g. /etc/init.d/<script> restart <variadic_vars>.
                                procd_add_interface_trigger "interface.*.up" "$interface" "/etc/init.d/$initscript" "restart" "$@" || trigger_failed="true"
                        done
index 088cd7bdef011c1e201cdcf9fb8ff587f8121dfb..c27f709e17659b4ffa1fb46015bc338a1a22a599 100644 (file)
@@ -33,8 +33,8 @@
 #      option forcessl 0
 #      option debugmin 0
 #      option defaultnotify SYSLOG
-# option interface_reload_delay 3000 # in milliseconds
-# option triggerlist all # not configured by default
+#      option interface_reload_delay 3000 # in milliseconds
+#      option triggerlist all # not configured by default
 
 #config monitor
 #      option type primary
index 9d62f63ea15dc1dbb3631a8d1ffb6c5880279a40..b45062b61abe75ea38ea471d0311626b145817a6 100644 (file)
@@ -39,4 +39,4 @@
 #      option interface_reload_delay 3000 # in milliseconds
 # NB: certificates only apply to SSL-enabled version
 #      option certfile /usr/local/etc/upsd.pem
-# option triggerlist all # not configured by default
+#      option triggerlist all # not configured by default
git clone https://git.99rst.org/PROJECT