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

Bug #1731871

Change-Id: I1d9c96db891dafdc31454ea53c20f2c2ba28255a
Signed-off-by: Wojciech Dec <wdec@cisco.com>
This commit is contained in:
Wojciech Dec 2017-11-13 10:57:35 +01:00
parent 23de84ffcd
commit b862cd25ee
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."