Merge "Exclude 'vnet' interfaces from being candidates for running a dhcp client."

This commit is contained in:
Zuul 2018-01-03 22:00:51 +00:00 committed by Gerrit Code Review
commit aad6322f09
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ cat > /etc/os-net-config/dhcp_all_interfaces.yaml <<EOF_CAT
network_config:
EOF_CAT
for iface in $(ls /sys/class/net | grep -v ^lo$); do
for iface in $(ls /sys/class/net | grep -v -e ^lo$ -e ^vnet$); do
local mac_addr_type="$(cat /sys/class/net/${iface}/addr_assign_type)"
if [ "$mac_addr_type" != "0" ]; then
echo "Device has generated MAC, skipping."