mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
netifd: implement find_config()
SVN-Revision: 30947
This commit is contained in:
parent
c00b53f3d0
commit
adff0183ca
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user