mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 7288: report errors and bail
status 7288 resolved fixed
This commit is contained in:
parent
2188450fb0
commit
f1880942c3
@ -147,7 +147,6 @@ if [ -n "$cksum" ]
|
||||
then
|
||||
verify_cksum $cksum $tmpltimg
|
||||
fi
|
||||
|
||||
tmpltimg2=$(uncompress $tmpltimg)
|
||||
rollback_if_needed $tmpltfs $? "failed to uncompress $tmpltimg\n"
|
||||
|
||||
@ -156,10 +155,10 @@ rollback_if_needed $tmpltfs $? "tar archives not supported\n"
|
||||
|
||||
if [ ${tmpltname%.vhd} != ${tmpltname} ]
|
||||
then
|
||||
if which vhd-util 2>/dev/null
|
||||
if which vhd-util &>/dev/null
|
||||
then
|
||||
vhd-util check -n ${tmpltimg2} > /dev/null
|
||||
rollback_if_needed $tmpltfs $? "vhd tool check $tmpltimg2 failed\n"
|
||||
rollback_if_needed $tmpltfs $? "vhd check of $tmpltimg2 failed\n"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@ -89,6 +89,7 @@ mkdir -p $destdir
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
printf "Failed to write to mount point $mntpoint -- is it mounted?\n"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
if [ "$Fflag" == "1" ]
|
||||
@ -120,6 +121,7 @@ touch $tmpfile
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
printf "Failed to create temporary file in directory $(dirname $0) -- is it read-only or full?\n"
|
||||
exit 4
|
||||
fi
|
||||
|
||||
if [ "$uflag" == "1" ]
|
||||
@ -139,15 +141,17 @@ then
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
printf "Failed to create temporary file in directory $(dirname $0) -- is it read-only or full?\n"
|
||||
exit 6
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
$(dirname $0)/createtmplt.sh -s 2 -d 'SystemVM Template' -n $localfile -t $destdir/ -f $tmpfile -u &> /dev/null
|
||||
installrslt=$($(dirname $0)/createtmplt.sh -s 2 -d 'SystemVM Template' -n $localfile -t $destdir/ -f $tmpfile -u)
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed to install system vm template $tmpltimg to $destdir"
|
||||
echo "Failed to install system vm template $tmpltimg to $destdir: $installrslt"
|
||||
exit 7
|
||||
fi
|
||||
|
||||
if [ "$ext" == "ova" ]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user