iface_has_host: Handle VLAN interfaces too
VLAN interface always has host. And skip HOST variable in VLAN's configs.
This commit is contained in:
parent
75a465583f
commit
b8192ace2d
@ -468,8 +468,16 @@ iface_has_host()
|
||||
local name="$1"; shift
|
||||
local ifacesdir="${1:-$etcnet_iface_dir}"
|
||||
|
||||
# VLAN interface always has host
|
||||
if [ "$(read_iface_option "$ifacesdir/$name" TYPE)" = "vlan" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
for i in $(find "$ifacesdir" -maxdepth 2 -mindepth 2 -name options); do
|
||||
if egrep -qs "^HOST=[\"']?([[:alnum:]]+[[:blank:]])*$name([[:blank:]][[:alnum:]]+)*[\"']?[[:blank:]]*$" $i; then
|
||||
if [ "$(read_iface_option "${i%/options}" TYPE)" = "vlan" ]; then
|
||||
continue
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user