1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-28 12:52:05 +02:00

netifd: implement find_config()

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30947 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2012-03-15 09:49:26 +00:00
parent 263a705cc6
commit 24f6c7010a

View File

@ -4,7 +4,20 @@
. /usr/share/libubox/jshn.sh
find_config() {
return
local device="$1"
for ifobj in `ubus list network.interface.\*`; do
interface="${ifobj##network.interface.}"
(
json_load "$(ifstatus $interface)"
json_get_var ifdev device
if [[ "$device" = "$ifdev" ]]; then
echo "$interface"
exit 0
else
exit 1
fi
) && return
done
}
unbridge() {