Hi,

We are getting ready to deploy a universal imaging solution for our
site with zenworks 6.5 imaging. We are using a bash script to kick off
the imaging process when a users PXEboots. The script is located below:

#!/bin/bash
# Ver 6.5-sp2-0.9

getvar ()
{
clear
if [ -z $TFTPIP ]
then
gettftpip
fi
cd /etc
tftp $TFTPIP < /bin/runzen.tftp >> /tmp/runzen/tftpoutput 2> /dev/null
if [ -z "$(grep -i Received /tmp/runzen/tftpoutput)" ]
then



image2 ()
{
export imgtest=$(cat /tmp/runzen/imgoutput | grep -i successful| wc -m)
if [ $imgtest -eq 0 ]
then
clear
cat /tmp/runzen/imgoutput
exit
fi
img restorep $PROXYADDR //$PROXYADDR/$imgpath/$prodname
img restorep $PROXYADDR //$PROXYADDR/$imgpath/NovellClient
img restorep $PROXYADDR //$PROXYADDR/$imgpath/ZfdAgent
reboot -f
exit
}

gettftpip ()
{
echo
echo
echo "Is the TFTP Server the same as the IMAGING Server."
echo "Type Y or N and press Enter."
read line4
case "$line4" in
"Y" | "y" | "yes" | "YES" | "Yes" )
export TFTPIP=$PROXYADDR
getvar
;;
"N" | "n" | "no" | "No" | "NO" )
entertftp
;;
*)
echo "Invalid User Input."
sleep 3
clear
gettftpip
;;
esac
}

entertftp ()
{
echo
echo
echo "Please enter tftp server address: --->"
read TFTPIP
echo
echo "Is "$TFTPIP" the correct server address?"
echo "Type Y or N and press Enter."
read line5
case "$line5" in
"Y" | "y" | "yes" | "YES" | "Yes" )
getvar
;;
"N" | "n" | "no" | "No" | "NO" )
gettftpip
;;
*)
echo "Invalid User Input."
sleep 3
clear
entertftp
;;
esac
}


challenge ()
{
echo "Please type the password and hit enter."
setterm -foreground black
setterm -background black
read userpass
setterm -foreground white
if [ "$userpass" = "$password" ]
then
question1
fi
echo "Invalid Password..."
exit
}

##### Call the first function #####
getvar


I want to add a question in the script
"is this machine a novanet machine" and if the answer is yes, I would
like it to apply an addon image of novanet.zmg in addition to the two
already being applied (novellclient,zfdagent.zmg). If the answer is no,
then continue as normal. How would I add this? I've never programmed in
bash before, can someone point me in the right direction?