tinc: use 'uci_get_state' instead of 'uci -P /var/state get'
authorEtienne Champetier <champetier.etienne@gmail.com>
Thu, 12 Aug 2021 20:41:05 +0000 (16:41 -0400)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Tue, 30 Aug 2022 08:50:46 +0000 (10:50 +0200)
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
(cherry picked from commit 440d3c04505719df09e39706e6af7c470a49d458)

net/tinc/Makefile
net/tinc/files/tinc.init

index 945693925ff30531e01460f433f2303227cbcdf1..54936d19afeed675ba6a6b0c5045c3c9d5bfbeaf 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tinc
 PKG_VERSION:=1.1-git
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=http://tinc-vpn.org/git/tinc
index af2c3bcac0d1d0d4dc352fda076cf19d82a45052..ba2134fe0f680807bc2f20f7f05ec876351dbb3e 100644 (file)
@@ -61,7 +61,7 @@ append_conf_params() {
                for v in $v; do
                        # Look up OpenWRT interface names
                        [ "$p" = "BindToInterface" ] && {
-                               local ifname=$(uci -P /var/state get network.$v.ifname 2>&-)
+                               local ifname=$(uci_get_state network "$v" ifname "")
                                [ -n "$ifname" ] && v="$ifname"
                        }