Add list_bond() function.

This commit is contained in:
Mikhail Efremov 2014-12-23 20:38:44 +03:00
parent 31e0778e0a
commit 45bc5a923d

View File

@ -511,6 +511,18 @@ list_ppp()
done
}
list_bond()
{
local dir="${1:-$etcnet_iface_dir}"
for i in `find "$dir" -mindepth 1 -maxdepth 1 -type d`; do
local name="${i##*/}"
[ "$name" != "lo" -a "$name" != "default" -a "$name" != "unknown" ] || continue
[ "$(read_iface_option $i TYPE)" = "bond" ] || continue
echo "$name"
done
}
list_eth()
{
netdev_list|