nut: minor fixes found via automated code review

* 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 <dfdpublic@wildtechgarden.ca>
This commit is contained in:
Daniel F. Dickinson authored and Josef Schlehofer committed 2026-07-15 09:34:39 +02:00
1 parent 35012ec062
commit bb320e47d7
3 files changed
+4 -5

No files matched your search

+1 -2
View 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
+2 -2
View 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
+1 -1
View 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