diff --git a/snippets/post_install_network_config b/snippets/post_install_network_config index 32966b5..615f344 100644 --- a/snippets/post_install_network_config +++ b/snippets/post_install_network_config @@ -139,6 +139,9 @@ echo "ONBOOT=yes" >> $devfile ## virtual interfaces don't get MACs echo "HWADDR=$mac" >> $devfile IFNAME=\$(ifconfig -a | grep -i '$mac' | cut -d ' ' -f 1) +if [ -z \$IFNAME ]; then + IFNAME=\$(ifconfig -a | grep -i -B 2 '$mac' | sed -n '/flags/s/:.*$//p) +fi ## Rename this interface in modprobe.conf ## FIXME: if both interfaces startwith eth this is wrong if [ -f "/etc/modprobe.conf" ] && [ \$IFNAME ]; then diff --git a/snippets/pre_install_network_config b/snippets/pre_install_network_config index 8bb3495..d8c1cc8 100644 --- a/snippets/pre_install_network_config +++ b/snippets/pre_install_network_config @@ -79,6 +79,9 @@ if ifconfig -a | grep -i $mac then IFNAME=\$(ifconfig -a | grep -i '$mac' | cut -d " " -f 1) + if [ -z \$IFNAME ]; then + IFNAME=\$(ifconfig -a | grep -i -B 2 '$mac' | sed -n '/flags/s/:.*$//p) + fi echo "network --device=\$IFNAME $netinfo" >> /tmp/pre_install_network_config #for $route in $static_routes #if $routepattern.match($route)