Fix is_bridge() in case of empty type
This commit is contained in:
parent
d075e8a4b2
commit
d42c8d1a60
@ -32,8 +32,9 @@ is_bridge()
|
|||||||
{
|
{
|
||||||
local name="$1"; shift
|
local name="$1"; shift
|
||||||
local ifacedir="$(ifacedir_with_cache "$cachedir" "$name")"
|
local ifacedir="$(ifacedir_with_cache "$cachedir" "$name")"
|
||||||
|
local iftype="$(read_iface_option "$ifacedir" TYPE)"
|
||||||
|
|
||||||
if list_bridge_types | grep -qF "$(read_iface_option "$ifacedir" TYPE)"; then
|
if [ -n "$iftype" ] && list_bridge_types | grep -qF "$iftype"; then
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
if netdev_is_up "$name"; then
|
if netdev_is_up "$name"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user