If during execution of this snippit $IFNAME is empty, the the script
will end up executing:
grep $IFNAME /etc/modprobe.conf
which will be:
grep /etc/modprobe.conf
this never will return and results in a hung kickstart. Now the only
reason IFNAME would be null is if at provisioning time, an interface
specified in the system record wasn't present. This might be an 'error
case', but it would be more ideal to simply ignore the interface than to
hang.
Here's the patch:
index e6839f7..7191087 100644
--- a/snippets/post_install_network_config
+++ b/snippets/post_install_network_config
@@ -100,7 +100,7 @@ fi
IFNAME=\$(ifconfig -a | grep -i '$mac' | cut -d ' ' -f 1)
## Rename this interface in modprobe.conf
## FIXME: if both interfaces startwith eth this is wrong
-if [ -f "/etc/modprobe.conf" ]; then
+if [ -f "/etc/modprobe.conf" ] && [ $IFNAME ]; then
grep \$IFNAME /etc/modprobe.conf | sed "s/\$IFNAME/$iname/" >>
/etc/modprobe.conf.cobbler
grep -v \$IFNAME /etc/modprobe.conf >> /etc/modprobe.conf.new
rm -f /etc/modprobe.conf
--
Justin Sherrill, RHCA 1801 Varisty Drive.
Software Engineer Raleigh, NC 27603
Red Hat, Inc.