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
This commit is contained in:
frank 2011-11-30 13:49:25 -08:00
parent d9f70b754d
commit 7eddef60fe
1 changed files with 6 additions and 8 deletions

View File

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