mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fix netift
This commit is contained in:
parent
b76bbb581c
commit
5930a09dfc
38 changed files with 1918 additions and 68 deletions
|
@ -6,13 +6,13 @@
|
|||
find_config() {
|
||||
local device="$1"
|
||||
local ifdev ifl3dev ifobj
|
||||
for ifobj in $(ubus list network.interface.\*); do
|
||||
for ifobj in `ubus list network.interface.\*`; do
|
||||
interface="${ifobj##network.interface.}"
|
||||
(
|
||||
json_load "$(ifstatus $interface)"
|
||||
json_get_var ifdev device
|
||||
json_get_var ifl3dev l3_device
|
||||
if [ "$device" = "$ifdev" ] || [ "$device" = "$ifl3dev" ]; then
|
||||
if [[ "$device" = "$ifdev" ]] || [[ "$device" = "$ifl3dev" ]]; then
|
||||
echo "$interface"
|
||||
exit 0
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue