It appears that fedora 17 changed the output of ifconfig command. That broke two snippets that use it - pre_install_network_config and post_install_network_config. IFNAME variable is not set as a result.

I made some patch to fix it, but it might need more testing - checked the rendered ks file, but did not do actual installation. Also, I am not sure if fedora 16 is affected also, so first I try to use original script, if the value is not set I assume it is fedora 17 and up and assign it differently. I did not bother with github on this - I have some problem forking, so the patch is attached here

--
Leon
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)
_______________________________________________
cobbler-devel mailing list
cobbler-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel

Reply via email to