From 37598f182c269770fe899cf067c92cceb24db5a6 Mon Sep 17 00:00:00 2001 From: Chiradeep Vittal Date: Tue, 18 Jan 2011 17:20:54 -0800 Subject: [PATCH] bug 3981: Add more logs for long running operations, only for systemvm initial install status 3981: resolved fixed --- scripts/storage/secondary/createtmplt.sh | 10 ++++++---- scripts/storage/secondary/installrtng.sh | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/storage/secondary/createtmplt.sh b/scripts/storage/secondary/createtmplt.sh index f73a9876fe7..f018db5305b 100755 --- a/scripts/storage/secondary/createtmplt.sh +++ b/scripts/storage/secondary/createtmplt.sh @@ -3,7 +3,7 @@ # createtmplt.sh -- install a template usage() { - printf "Usage: %s: -t -n -f -c -d -h [-u] \n" $(basename $0) >&2 + printf "Usage: %s: -t -n -f -c -d -h [-u] [-v]\n" $(basename $0) >&2 } @@ -97,7 +97,7 @@ create_from_file() { local tmpltimg=$2 local tmpltname=$3 - echo "Moving to /$tmpltfs/$tmpltname...could take a while" >&2 + [ -n "$verbose" ] && echo "Moving to /$tmpltfs/$tmpltname...could take a while" >&2 mv $tmpltimg /$tmpltfs/$tmpltname } @@ -112,7 +112,7 @@ cleanup=false dflag= cflag= -while getopts 'uht:n:f:s:c:d:S:' OPTION +while getopts 'vuht:n:f:s:c:d:S:' OPTION do case $OPTION in t) tflag=1 @@ -142,6 +142,8 @@ do ;; u) cleanup="true" ;; + v) verbose="true" + ;; ?) usage exit 2 ;; @@ -166,7 +168,7 @@ if [ -n "$cksum" ] then verify_cksum $cksum $tmpltimg fi -is_compressed $tmpltimg +[ -n "$verbose" ] && is_compressed $tmpltimg tmpltimg2=$(uncompress $tmpltimg) rollback_if_needed $tmpltfs $? "failed to uncompress $tmpltimg\n" diff --git a/scripts/storage/secondary/installrtng.sh b/scripts/storage/secondary/installrtng.sh index 09ec4241e5c..9ba33d04195 100755 --- a/scripts/storage/secondary/installrtng.sh +++ b/scripts/storage/secondary/installrtng.sh @@ -158,7 +158,7 @@ then fi -installrslt=$($(dirname $0)/createtmplt.sh -s 2 -d 'SystemVM Template' -n $localfile -t $destdir/ -f $tmpfile -u) +installrslt=$($(dirname $0)/createtmplt.sh -s 2 -d 'SystemVM Template' -n $localfile -t $destdir/ -f $tmpfile -u -v) if [ $? -ne 0 ] then