since there is not vhd-util, we need to check if it is there

This commit is contained in:
anthony 2010-09-01 21:01:50 -07:00
parent fea31133a3
commit 0bb3237ad7
1 changed files with 6 additions and 3 deletions

View File

@ -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