From 7eddef60fe2b4196047f7107437ca3b1ee900b3d Mon Sep 17 00:00:00 2001 From: frank Date: Wed, 30 Nov 2011 13:49:25 -0800 Subject: [PATCH] Bug 11926 - Need parameter check before execution of cloud-install-sys-tmplt make the check for mount point a litter earlier status 11926: resolved fixed --- scripts/storage/secondary/cloud-install-sys-tmplt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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/