Browse Source

nut: fix _ handling

Taken from https://github.com/openwrt/packages/issues/13359

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 4 years ago
parent
commit
4d39346fb4
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      net/nut/Makefile
  2. +3
    -3
      net/nut/files/nut-server.init

+ 1
- 1
net/nut/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=nut PKG_NAME:=nut
PKG_VERSION:=2.7.4 PKG_VERSION:=2.7.4
PKG_RELEASE:=20
PKG_RELEASE:=21
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/ PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/


+ 3
- 3
net/nut/files/nut-server.init View File

@ -179,11 +179,11 @@ build_driver_config() {
defoverride() { defoverride() {
local overvar="$1" local overvar="$1"
local defover="$2" local defover="$2"
local overtype="$(echo "$overvar" | tr '.' '_')"
local overtype="$(echo "$overvar" | tr '_' '.')"
local overval 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 config_list_foreach "$cfg" override defoverride override


Loading…
Cancel
Save