diff --git a/scripts/storage/secondary/cloud-install-sys-tmplt b/scripts/storage/secondary/cloud-install-sys-tmplt index 48a203bfcfb..624b045bddc 100755 --- a/scripts/storage/secondary/cloud-install-sys-tmplt +++ b/scripts/storage/secondary/cloud-install-sys-tmplt @@ -54,6 +54,12 @@ then failed 2 fi +if [ ! -d $mntpoint ] +then + echo "mount point $mntpoint doesn't exist\n" + failed 4 +fi + if [[ "$fflag" == "1" && ! -f $tmpltimg ]] then echo "template image file $tmpltimg doesn't exist" @@ -80,17 +86,9 @@ else usage failed 2 fi - - localfile=$(uuidgen).$ext -if [ ! -d $mntpoint ] -then - echo "mount point $mntpoint doesn't exist\n" - failed 4 -fi - mntpoint=`echo "$mntpoint" | sed 's|/*$||'` destdir=$mntpoint/template/tmpl/1/$templateId/