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

Vnet interfaces are not supported by the dhcp client.

Bug #1731871

Change-Id: I8c0d6b0885f7e5fac94f78c8d6b6a6bf198ff424
Signed-off-by: Wojciech Dec <wdec@cisco.com>
This commit is contained in:
Wojciech Dec 2017-11-13 17:47:37 +01:00
parent 5840413021
commit ce2f5b838b
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,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."