From f71bba6a3466abb5e204de21c5de8d3617c58c1d Mon Sep 17 00:00:00 2001 From: Gabriel Kerneis Date: Tue, 20 Jul 2010 09:20:56 +0000 Subject: [PATCH] [packages] babel: use uci_get_state Signed-off-by: Gabriel Kerneis SVN-Revision: 22310 --- net/babel/Makefile | 2 +- net/babel/files/babeld.init | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/net/babel/Makefile b/net/babel/Makefile index 64479da09a..dcc96d44c3 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 c938248e92..73c0c16fcd 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() { -- 2.30.2