From: Rosen Penev Date: Sat, 19 Sep 2020 23:52:58 +0000 (-0700) Subject: nut: fix _ handling X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=df1c29679e9cae6ffbd0b818a4f8e536e1ef2a7a;p=feed%2Fpackages.git nut: fix _ handling Taken from https://github.com/openwrt/packages/issues/13359 Signed-off-by: Rosen Penev (cherry picked from commit 4d39346fb4ca38e7c4b2f20735efb09b9eccb587) --- diff --git a/net/nut/Makefile b/net/nut/Makefile index 68049b5ea3..de22f3d849 100644 --- a/net/nut/Makefile +++ b/net/nut/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nut PKG_VERSION:=2.7.4 -PKG_RELEASE:=20 +PKG_RELEASE:=21 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/ diff --git a/net/nut/files/nut-server.init b/net/nut/files/nut-server.init index a03d6b9cf8..7d550bda08 100755 --- a/net/nut/files/nut-server.init +++ b/net/nut/files/nut-server.init @@ -179,11 +179,11 @@ build_driver_config() { defoverride() { local overvar="$1" local defover="$2" - local overtype="$(echo "$overvar" | tr '.' '_')" + local overtype="$(echo "$overvar" | tr '_' '.')" local overval - config_get overval "${defover}_${overtype}" value - [ -n "$overval" ] && echo "${defover}.${overvar} = $overval" >>"$UPS_C" + config_get overval "${defover}_${overvar}" value + [ -n "$overval" ] && echo "${defover}.${overtype} = $overval" >>"$UPS_C" } config_list_foreach "$cfg" override defoverride override