Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion net/nut/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=nut
PKG_VERSION:=2.8.4
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.networkupstools.org/source/2.8/
Expand Down
15 changes: 10 additions & 5 deletions net/nut/files/nut-server.init
Original file line number Diff line number Diff line change
Expand Up @@ -195,22 +195,27 @@ build_driver_config() {
config_list_foreach "$cfg" override defoverride override
config_list_foreach "$cfg" default defoverride default

other() {
do_other() {
local othervar="$1"
local othervarflag="$2"
local otherval

if [ "$othervarflag" = "otherflag" ]; then
config_get_bool otherval "${othervarflag}_${othervar}" value
config_get_bool otherval "${cfg}" "${othervarflag}_${othervar}" value
[ "$otherval" = "1" ] && echo "${othervar}" >>"$UPS_C"
else
config_get otherval "${othervarflag}_${othervar}" value
config_get otherval "${cfg}" "${othervarflag}_${othervar}" value
[ -n "$otherval" ] && echo "${othervar} = $otherval" >>"$UPS_C"
fi
}

config_list_foreach "$cfg" other other other
config_list_foreach "$cfg" otherflag other otherflag
# For each entry in the list "other", get the variable "other_${entry}",
# and if not empty, write "${entry} = ${value of other_${entry}}" to the config file.
config_list_foreach "$cfg" other do_other other

# For each entry in the list "otherflag", get the variable "otherflag_${entry}",
# and if true, write "${entry}" to the config file.
config_list_foreach "$cfg" otherflag do_other otherflag
echo "" >>$UPS_C
havedriver=1
}
Expand Down
Loading