From 0bb3237ad7386b1ca0028e79142eefe236648070 Mon Sep 17 00:00:00 2001 From: anthony Date: Wed, 1 Sep 2010 21:01:50 -0700 Subject: [PATCH] since there is not vhd-util, we need to check if it is there --- scripts/storage/secondary/createtmplt.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/storage/secondary/createtmplt.sh b/scripts/storage/secondary/createtmplt.sh index e5820db2a5a..cafa704fb47 100755 --- a/scripts/storage/secondary/createtmplt.sh +++ b/scripts/storage/secondary/createtmplt.sh @@ -161,10 +161,13 @@ rollback_if_needed $tmpltfs $? "failed to uncompress $tmpltimg\n" tmpltimg2=$(untar $tmpltimg2) rollback_if_needed $tmpltfs $? "tar archives not supported\n" -if [ ${tmpltname%.vhd} = ${tmpltname} ] +if [ ${tmpltname%.vhd} != ${tmpltname} ] then - vhd-util check -n ${tmpltimg2} > /dev/null - rollback_if_needed $tmpltfs $? "vhd tool check $tmpltimg2 failed\n" + if which vhd-util 2>/dev/null + then + vhd-util check -n ${tmpltimg2} > /dev/null + rollback_if_needed $tmpltfs $? "vhd tool check $tmpltimg2 failed\n" + fi fi # need the 'G' suffix on volume size