diff --git a/scripts/mkcloud b/scripts/mkcloud index f2120e9699..0f8f8e45e2 100755 --- a/scripts/mkcloud +++ b/scripts/mkcloud @@ -15,6 +15,12 @@ # 2. This tool relies on the script qa_crowbarsetup.sh # 3. Please 'export' environment variables according to your needs. +: ${cloud:=cloud} +: ${log_dir:=/var/log/mkcloud/$cloud} +mkdir -p "$log_dir" +log_file=$log_dir/`date -Iseconds`.log +exec > >(tee -ia $log_file) +exec 2> >(tee -ia $log_file >&2) if [[ $debug_mkcloud = 1 ]] ; then set -x @@ -88,7 +94,6 @@ cpuflags='' working_dir_orig=`pwd` : ${artifacts_dir:=$working_dir_orig/.artifacts} start_time=`date` -: ${cloud:=cloud} : ${cloudvg:=cloud} needcvol=1 : ${vdisk_dir:=/dev/$cloudvg}