Changeset 22310


Ignore:
Timestamp:
2010-07-20T11:20:56+02:00 (7 years ago)
Author:
kerneis
Message:

[packages] babel: use uci_get_state

Signed-off-by: Gabriel Kerneis <kerneis@…>

Location:
packages/net/babel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/babel/Makefile

    r21668 r22310  
    1010PKG_NAME:=babeld 
    1111PKG_VERSION:=1.0.1 
    12 PKG_RELEASE:=3 
     12PKG_RELEASE:=4 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/net/babel/files/babeld.init

    r21667 r22310  
    88 
    99listen_ifname() { 
    10         local name="$1" 
     10        local ifname=$(uci_get_state network "$1" ifname "$1") 
    1111        local switch="$2" 
    12         local _uciname=`uci get -q -P /var/state network.$name.ifname` 
    13         append args "$switch ${_uciname:-$name}" 
    14         append interfaces "${_uciname:-$name}" 
     12        append args "$switch $ifname" 
     13        append interfaces "$ifname" 
    1514} 
    1615 
     
    2221        config_get _name "$section" "$option" 
    2322        [ -z "$_name" ] && return 0 
    24         local _uciname=`uci get -q -P /var/state network.$_name.ifname` 
    25         append args "$switch ${_uciname:-$_name}" 
     23        local ifname=$(uci_get_state network "$_name" ifname "$_name") 
     24        append args "$switch $ifname" 
    2625} 
    2726 
Note: See TracChangeset for help on using the changeset viewer.