From: Gabriel Kerneis Date: Tue, 20 Jul 2010 09:20:56 +0000 (+0000) Subject: babel: use uci_get_state X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=297469305c5a1b6942416cb4e420a5fcbe9611cf;p=openwrt%2Fsvn-archive%2Fpackages.git babel: use uci_get_state Signed-off-by: Gabriel Kerneis SVN-Revision: 22310 --- diff --git a/net/babel/Makefile b/net/babel/Makefile index 64479da09..dcc96d44c 100644 --- a/net/babel/Makefile +++ b/net/babel/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=babeld PKG_VERSION:=1.0.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/ diff --git a/net/babel/files/babeld.init b/net/babel/files/babeld.init index c938248e9..73c0c16fc 100755 --- a/net/babel/files/babeld.init +++ b/net/babel/files/babeld.init @@ -7,11 +7,10 @@ EXTRA_COMMANDS="status" EXTRA_HELP=" status Dump Babel's table to the log file." listen_ifname() { - local name="$1" + local ifname=$(uci_get_state network "$1" ifname "$1") local switch="$2" - local _uciname=`uci get -q -P /var/state network.$name.ifname` - append args "$switch ${_uciname:-$name}" - append interfaces "${_uciname:-$name}" + append args "$switch $ifname" + append interfaces "$ifname" } append_ifname() { @@ -21,8 +20,8 @@ append_ifname() { local _name config_get _name "$section" "$option" [ -z "$_name" ] && return 0 - local _uciname=`uci get -q -P /var/state network.$_name.ifname` - append args "$switch ${_uciname:-$_name}" + local ifname=$(uci_get_state network "$_name" ifname "$_name") + append args "$switch $ifname" } append_bool() {