Add list_vlan() and list_vlan_with_cache()
This commit is contained in:
parent
17a65794b0
commit
33a627dff7
@ -624,6 +624,13 @@ list_bond()
|
||||
list_etcnet_iface_filtered "$dir" __filter_iface_type "bond"
|
||||
}
|
||||
|
||||
list_vlan()
|
||||
{
|
||||
local dir="${1:-$etcnet_iface_dir}"
|
||||
|
||||
list_etcnet_iface_filtered "$dir" __filter_iface_type "vlan"
|
||||
}
|
||||
|
||||
list_eth()
|
||||
{
|
||||
netdev_list|
|
||||
@ -814,6 +821,16 @@ list_bond_with_cache()
|
||||
} | sort -u | __filter_out_removed_ifaces "$cachedir"
|
||||
}
|
||||
|
||||
list_vlan_with_cache()
|
||||
{
|
||||
local cachedir="$1"; shift
|
||||
|
||||
{
|
||||
[ -d "$cachedir" ] && list_vlan "$cachedir"
|
||||
list_vlan "$etcnet_iface_dir"
|
||||
} | sort -uV | __filter_out_removed_ifaces "$cachedir"
|
||||
}
|
||||
|
||||
# list_static_iface [ ip_version ]
|
||||
list_static_iface_with_cache()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user