Hello Support

I created a Script for using with image. Unfortunatelly this script doesn't
work and i don't find the cause of the error. Somebody can help me to find
the error?

Here the script

Thanks in advance for your help
Ramon



while test ! $WSLOCA; do
echo -n -e "";
echo -n -e "Location list";
echo -n -e "----------------------";
echo -n -e "be Bern";
echo -n -e "bs Basel";
echo -n -e "fr Fribourg;
echo -n -e "ge Genf";
echo -n -e "gr Graubnden";
echo -n -e "ju Jura";
echo -n -e "lu Luzern";
echo -n -e "sg St. Gallen";
echo -n -e "so Solothurn";
echo -n -e "sz Schwyz";
echo -n -e "ti Ticino";
echo -n -e "vd Vaud";
echo -n -e "vs Wallais";
echo -n -e "zh Zrich";
echo -n -e "";
echo -n "Please enter your location. Example lu for Luzern";
read WSLOCA;
done;

if [ "$WSLOCA" = "be" ]; then
IMGSVR=192.168.25.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg


elif [ "$WSLOCA" = "bs" ]; then
IMGSVR=192.168.20.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "fr" ]; then
IMGSVR=192.168.40.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "ge" ]; then
IMGSVR=192.168.41.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "gr" ]; then
IMGSVR=192.168.23.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "ju" ]; then
IMGSVR=192.168.60.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "lu" ]; then
IMGSVR=192.168.24.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "sg" ]; then
IMGSVR=192.168.22.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "so" ]; then
IMGSVR=192.168.21.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "sz" ]; then
IMGSVR=192.168.54.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "ti" ]; then
IMGSVR=192.168.26.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "vd" ]; then
IMGSVR=192.168.42.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "vs" ]; then
IMGSVR=192.168.43.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

elif [ "$WSLOCA" = "zh" ]; then
IMGSVR=192.168.100.140
img pd1
img pd2
IMG_HARDDISK_MIN_SIZE="30000"
IMG_PARTITION_SIZE_MIN[1]="101"
IMG_PARTITION_SIZE_MAX[1]="101"
IMG_PARTITION_TYPE[1]="NTFS"
IMG_PARTITION_SIZE_MIN[2]="80000"
IMG_PARTITION_SIZE_MAX[2]="150000"
IMG_PARTITION_SIZE_TYPE[2]="NTFS"
IMG_EXTEND_LAST_PARTITION="1"

img -rp W7Master01.zmg
img -rp SysprepWin7.zmg
img -rp ZCM-AgentWin7.zmg

fi

reboot