One of the issues that I'd run across is that we have a long script that
we're using for all of our images. All image scripts are exactly the same,
except for the actual name of the image file itself.

I wanted a way to make the whole script self contained, and only put the
system specific stuff in the actual script in the image object.

I came up with the following solution, while it may not be the most elegant,
it serves our purpose and I thought others might find it of some use.

Also, employing this method did not require me to modify the linux.2 image.
I use tftp to transfer my standard scripts and only set the image filename
as a variable in the actual script.

For better, or worse, here is the solution that I came up with.

************ BEGIN NDS Object Script

#------- Set Baseline Image Filename
export IMAGE="//apollo/vol1/images/PCimage.zmg"
#------- Download imaging scripts
tftp -c get $TFTPIP:imagePC /bin/imagePC
tftp -c get $TFTPIP:addons /bin/addons
#------- Start imaging process
bash /bin/imagePC

************ END NDS Object Script

************ BEGIN imagePC

#------- Assign Workstation name if not set
ZISNAME=`zisview Name`
if test ! $ZISNAME; then
echo -e "*********** WARNING ***********"
echo -e
echo -ne "Continue? (YES/NO) (must be YES to continue) "
read AGREE;
if [ $AGREE != "YES" ] ; then
shutdown -r now
echo -e "No image-safe data found."
echo -e "Assumed to be a new workstation.\n"

while test ! $WSNAME; do
echo -n "Enter the workstation name: "
read WSNAME;
#------- Clear existing partitions
img pd1
img pd2
img pd3
img pd4
#------- Create single NTFS partition
img pc1 ntfs
#------- Activate partition
img pa1
#------- Restore baseline image
img rp $TFTPIP $IMAGE a1:p1
#------- Set workstation name in ZIS
if test $WSNAME; then
zisedit Name=$WSNAME;
#------- Restore add-on images
bash /bin/addons

************ END imagePC

************ BEGIN addons

#------- Restore add-on images
img rp $TFTPIP "//apollo/vol1/App Images/Adobe Reader 6.zmg"
img rp $TFTPIP "//apollo/vol1/App Images/Cisco VPN Client.zmg"
img rp $TFTPIP "//apollo/vol1/App Images/Meeting Maker.zmg"
img rp $TFTPIP "//apollo/vol1/App Images/Microsoft Journal Viewer.zmg"
img rp $TFTPIP "//apollo/vol1/App Images/Microsoft Office 2000.zmg"
img rp $TFTPIP "//apollo/vol1/App Images/Mozilla.zmg"
img rp $TFTPIP "//apollo/vol1/App Images/Symantec AntiVirus.zmg"

************ END addons

Charlie Silverman
Sr. Systems Administrator
Globalstar, LLC