mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
commit
e00236fb31
4 changed files with 11 additions and 9 deletions
|
@ -11,7 +11,7 @@
|
|||
function device_notvirtual(dev)
|
||||
for _, iface in ipairs(net:get_networks()) do
|
||||
local ifacen = iface:name()
|
||||
local ifacename = uci:get("network",ifacen,"ifname")
|
||||
local ifacename = uci:get("network",ifacen,"device")
|
||||
local ifacetype = uci:get("network",ifacen,"type") or ""
|
||||
local ifaceproto = uci:get("network",ifacen,"proto") or ""
|
||||
--if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then
|
||||
|
|
|
@ -39,7 +39,7 @@ omr_intf_set() {
|
|||
uci -q set network.$1.modalias="$(cat /sys/class/net/${ifname}/device/uevent | grep MODALIAS | cut -d '=' -f2 | tr -d '\n')-$mac"
|
||||
uci -q set network.$1.product="$(cat /sys/class/net/${ifname}/device/uevent | grep PRODUCT | cut -d '=' -f2 | tr -d '\n')"
|
||||
elif [ -n "$devicepath" ] && ([ "$(echo ${devicepath} | grep virtual)" != "" ] || [ "$(echo ${devicepath} | grep virtual)" = "" ] && [ "$(cat /sys/class/net/${ifname}/device/uevent | grep PRODUCT)" = "" ] || [ "$(cat /sys/class/net/${ifname}/device/uevent | grep PCI_SLOT_NAME)" != "" ] || [ "$(cat /sys/class/net/${ifname}tmp/device/uevent)" != "" ]); then
|
||||
uci -q delete network.$1.device
|
||||
#uci -q delete network.$1.device
|
||||
uci -q delete network.$1.modalias
|
||||
uci -q delete network.$1.product
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue