1
0
Fork 0
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:
suyuan168 2022-04-06 20:55:49 +08:00
parent b76bbb581c
commit 5930a09dfc
38 changed files with 1918 additions and 68 deletions

View file

@ -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