list_iface(): Skip ifaces in a bonding
BTW, I doubt that this function is in use really. Should be considered to drop it later.
This commit is contained in:
@ -648,12 +648,14 @@ list_eth()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Is this function really used anywhere?
|
||||||
list_iface()
|
list_iface()
|
||||||
{
|
{
|
||||||
netdev_list|
|
netdev_list|
|
||||||
while read iface; do
|
while read iface; do
|
||||||
[ "$iface" != "lo" ] || continue
|
[ "$iface" != "lo" ] || continue
|
||||||
[ -z "$(netdev_find_bridge "$iface")" ] || continue
|
[ -z "$(netdev_find_bridge "$iface")" ] || continue
|
||||||
|
[ -z "$(netdev_find_bond "$iface")" ] || continue
|
||||||
local tf="/sys/class/net/$iface/type"
|
local tf="/sys/class/net/$iface/type"
|
||||||
[ ! -f "$tf" ] || [ "$(cat "$tf")" != 801 ] || continue
|
[ ! -f "$tf" ] || [ "$(cat "$tf")" != 801 ] || continue
|
||||||
echo "$iface" 2>/dev/null
|
echo "$iface" 2>/dev/null
|
||||||
|
Reference in New Issue
Block a user