I was lucky enough to get some extra help this summer with re-imaging laptops. The group I have are not techs but good enough that they can follow the instructions I leave. I wanted to make things a little easier by prompting for a computer name for the new computers we just got in instead of having them type out the zisedit commands required for my pre image tasks. I am having a little problem when I put the script in the Imaging script section within my preboo task for ZCM. I was able to get my original lines to run which wasn't all that great just a img command and a reboot. Here is what I am trying to do now and the script seems to cycle through without running the script like I expected.

#! /bin/bash
if [ -n "$(zisview ComputerName)" ]; then
WSNAME=$(zisview Computername)
echo "No Image safe data found. Workstation Name required."
while test ! $WSNAME; do
echo -n "Please enter the workstation name: "
if [ ${#WSNAME} -gt 15 ] ; then
echo "Workstation name must be 15 characters or less."
zisedit -c
zisedit Computername=$WSNAME
zisedit DNSHostName=$WSNAME
zisedit WindowsWorkGroup=WG1
zisedit DHCP=ON
if [`hwinfo --bios|grep -c -i "HP ProBook 4540s"` != 0]
img rp <IP ADDRESS> /var/opt/novell/zenworks/content-repo/images/w7x86a.zmg
img rp <IP ADDRESS> /var/opt/novell/zenworks/content-repo/images/w7x86.zmg

Two Questions.
1. What i am trying to do is possible using the Imaing Script inside ZCC correct?
2. If so can anyone tell what I did wrong with the script that is causing this to fail?

Thanks for the assistance!