I am trying to script an image for the Tuxera driver imaging ISO for our Windows 7 machines. The errors I am getting are the following:

command not founde 3:
line 18: syntax error near unexpected token 'elif'
line 18: 'elif cat /tmp/hwinfo.bios |grep -i "Lenovo M77"

I've used a script just like this for a few years now with Windows XP and haven't had any problems until I tried this new "enhanced driver" boot cd. What am I missing here?


Here's the script with the problem line in bold....

hwinfo --bios > /tmp/hwinfo.bios
ifconfig > /tmp/net.config

if cat /tmp/net.config | grep -i "10.40.*.*"; then
IMGSVR=gerald.owensville.k12.mo.us
else
IMGSVR=zcm11.owensville.k12.mo.us
fi

echo "Loading Base Image"
img rp $IMGSVR "/var/opt/novell/zenworks/content-repo/images/win7.zmg"

echo "Loading driver sets"
if cat /tmp/hwinfo.bios |grep -i "ThinkPad Edge E430"
then
img rp $IMGSVR "/var/opt/novell/zenworks/content-repo/images/drivers/lenovo/e430.zmg"
img rp $IMGSVR "/var/opt/novell/zenworks/content-repo/images/settings/win7/wificonfig.zmg"
elif cat /tmp/hwinfo.bios |grep -i "Lenovo M77"
then
img rp $IMGSVR "/var/opt/novell/zenworks/content-repo/images/drivers/lenovo/m77.zmg"
else
echo "This machine is not compatible with this Windows 7 imaging script!"
reboot -f
fi

echo "Loading script files."
img rp $IMGSVR "/var/opt/novell/zenworks/content-repo/images/settings/win7scripts.zmg"

zisedit -c
reboot -f