Otherwise, the `linenum=` line gets two line numbers.
Signed-off-by: David Galloway <david.galloway@ibm.com>
fogfilename="/undionly.kpxe"
macaddr=$(sed -n "/host ${host}-front/,/}/p" $dhcpconfig | grep 'hardware ethernet' | awk '{ print $3 }' | tr -d ';')
ipaddr=$(sed -n "/host ${host}-front/,/}/p" $dhcpconfig | grep 'fixed-address' | awk '{ print $2 }' | tr -d ';')
-linenum=$(grep -n $host $dhcpconfig | cut -d ':' -f1)
+linenum=$(grep -n $host $dhcpconfig | grep -v "host-name" | cut -d ':' -f1)
if [ -z "$macaddr" ]; then
echo "No MAC address found for $host"