Not sure if this code will post neatly, but here it goes.. I've recently set up ZCM and am testing imaging now with my old script. I changed the UNC paths and placed my image files in \content-repo\images and \addon-image subdirs. Created the non-registered device hardware rules to apply my image, and testing with a VM where Ram > 0mb. Booted up to PXE Maintenance Mode, and typed "img auto", then ran the "sh /bin/zenAdvancedScript" command, which resulted in the 'zisedit help' screen pop up. I'm not sure why I'm getting this.. if i type "zisedit -c" in the linux prompt, it works fine.. whys it choking? :\

#Clear ZISD
zisedit -c
#Detect type of drive and set HDD variable
HDD=`img p | grep -E ^1 | awk '{print $2}'`
#Delete all partitions and create temp
if echo $HDD | grep hda ; then hdparm -d1 /dev/hda ; fi
img pdall
if echo $HDD | grep hda ; then hdparm -d1 /dev/hda ; fi
img pc1 fat16 10
if echo $HDD | grep hda ; then hdparm -d1 /dev/hda ; fi
if echo $HDD | grep hda ; then
sleep 30
echo w> /tmp/test
fdisk /dev/hda < /tmp/test

mkfs.msdos $HDD

#Restore sysprep.inf template
img rp $PROXYADDR sysprep_template.zmg
mount $HDD /mnt/harddisk

#Search sysprep for MYNAME and replace with Service Tag
sed -i s/MYNAME/$(zhw -serial)/g /mnt/harddisk/sysprep/sysprep.inf
umount /mnt/harddisk

#Create image of sysprep changes in local temp location
img ml /tmp/$(zhw -serial).zmg

img pd1
img pc1 ntfs
img pa1

#Restore base image, Enable DMA if IDE hard drive
if echo $HDD | grep hda ; then hdparm -d1 /dev/hda ; fi
#img rp $PROXYADDR //$PROXYADDR/vol1/images/basexp.zmg
#img rp $PROXYADDR //$PROXYADDR/vol1/images/newxp745.zmg
img rp $PROXYADDR xpapps.zmg a1:p1

#Non-destructively restore sysprep.inf over one in base image
img rl /tmp/$(zhw -serial).zmg a1:p1

#Restore drivers for specific model computer
hwinfo --bios > /tmp/hwinfo.bios
if cat /tmp/hwinfo.bios | grep -i "Optiplex GX620" ; then
img rp $PROXYADDR addon-images/gx620driver.zmg
elif cat /tmp/hwinfo.bios | grep -i "OptiPlex 760" ; then
img rp $PROXYADDR addon-images/opti760driver.zmg
elif cat /tmp/hwinfo.bios | grep -i "Optiplex 745" ; then
img rp $PROXYADDR addon-images/gx745driver.zmg
elif cat /tmp/hwinfo.bios | grep -i "OptiPlex GX270" ; then
img rp $PROXYADDR addon-images/gx270driver.zmg
elif cat /tmp/hwinfo.bios | grep -i "Latitude D620" ; then
img rp $PROXYADDR addon-images/d620driver.zmg
elif cat /tmp/hwinfo.bios | grep -i "Latitude D610" ; then
img rp $PROXYADDR addon-images/d610driver.zmg
elif cat /tmp/hwinfo.bios | grep -i "Latitude D600" ; then
img rp $PROXYADDR addon-images/d600driver.zmg
elif cat /tmp/hwinfo.bios | grep -i "OptiPlex GX260" ; then
img rp $PROXYADDR addon-images/gx260driver.zmg
elif cat /tmp/hwinfo.bios | grep -i "OptiPlex GX280" ; then
img rp $PROXYADDR addon-images/gx280driver.zmg
elif cat /tmp/hwinfo.bios | grep -i "OptiPlex 755" ; then
img rp $PROXYADDR addon-images/gx755driver.zmg

#Set computer name in ZISD as Service Tag
zisedit ComputerName=$(zhw -serial)