I need some help with the following script. This is just a basic script to force a rename of existing laptops from the old student name to a new student name. Every year we have around a hundered laptops that are reimaged that need the name changed. I try to do this all during the image process. I tried the follwoing script which seems to work all the way up to when the system is told to reboot. then it fails saying I should try shutdown instead. Yet this command doesn't work either (shutdown -r now).
Can anyone give me an idea on what I am doing wrong with this script? I used this for a long time in a bash script that was not part the the preboot scripting but in the tftp folder instead. This is a cut out copy of the section I need working.

#! /bin/bash
zisedit -r
zisedit DHCP=On
if [ -n "$(zisview ComputerName)" ]; then
WSNAME=$(zisview ComputerName)
WGNAME=$(zisview WindowsWorkGroup)
echo -e "No Safedata"
while test ! $WSNAME; do
echo -n "Please enter the workstation name:"
read WSNAME;

zisedit Computername=$WSNAME
zisedit DNSHostName=$WSNAME
zisedit WindowsWorkGroup=USD405

img rp <Servername> /var/opt/novell/zenworks/content-repo/images/w7x86.zmg

Thanks for the help.