I have this in %pre<br><br>ETH=`grep DEVICE /tmp/netinfo | cut -d = -f 2`<br>IP=`ifconfig $ETH | grep "inet " | cut -d : -f 2 | cut -d " " -f 1`<br>NETMASK=`ifconfig $ETH | grep "inet " | cut -d : -f 4`
<br>GATEWAY=`route | grep default | cut -b 17-32 | cut -d " " -f 1`<br>HOSTNAME=`grep HOSTNAME /tmp/netinfo | cut -d = -f 2 | cut -d . -f 1`<br><br>cat << EOF > /tmp/buildnet<br>network --device $ETH --bootproto static --ip=$IP --netmask=$NETMASK --gateway=$GATEWAY --hostname=$HOSTNAME
<br>EOF<br><br>That code setting shell variables is really ugly and I had to fix it.<br><br>    ipv6 info from ifconfig caused problems, <br>    and possibly something else I have forgotten<br><br>According to the wiki:<br>
<br>    $ip_address and $mac_address are kickstart variables<br><br>But I still need values for $ETH, $NETMASK, and $GATEWAY<br><br>A snippet one liner would be nice.<br>--<br>Drew Einhorn