netifd: implement find_config()
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30947 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
6189648864
commit
e6721f01b5
|
@ -4,7 +4,20 @@
|
||||||
. /usr/share/libubox/jshn.sh
|
. /usr/share/libubox/jshn.sh
|
||||||
|
|
||||||
find_config() {
|
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() {
|
unbridge() {
|
||||||
|
|
Loading…
Reference in New Issue