X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=tools%2F2genesis.sh;h=0da6f9206614deb064572f281f63ce2233967740;hb=fbb206730195c6f03ded7658d08f1ef708ebf88b;hp=0b70cd489119dd2fdde14c0e34e307d8fb6d24ae;hpb=ff41a884070ac6afe843d14c4e9dd44a4a411125;p=yaml_builds.git diff --git a/tools/2genesis.sh b/tools/2genesis.sh index 0b70cd4..0da6f92 100755 --- a/tools/2genesis.sh +++ b/tools/2genesis.sh @@ -15,10 +15,12 @@ # limitations under the License. # ############################################################################## -set -x -TIMESTAMP=$(date +"%Y%m%d%H%M") -echo "Logging to /var/log/yaml_builds/2genesis_$TIMESTAMP.log" -exec > /var/log/yaml_builds/2genesis_$TIMESTAMP.log +set -xe +LOGDIR="/var/log/akraino" +mkdir -p $LOGDIR +LOGFILE="$LOGDIR/${1}_$(date +"%Y%m%d%H%M%z")_$(basename $0|cut -d. -f1)" +echo "logging to $LOGFILE" +exec 1> >(tee -a $LOGFILE) exec 2>&1 source $(dirname $0)/setenv.sh @@ -44,7 +46,7 @@ source $(dirname $0)/env_$SITE.sh cd $YAML_BUILDS # Install OS on Genesis python $YAML_BUILDS/scripts/jcopy.py $SITE.yaml $YAML_BUILDS/tools/j2/serverrc.j2 $YAML_BUILDS/tools/"$GENESIS_NAME"rc -/opt/akraino/tools/install_server_os.sh --rc /opt/akraino/yaml_builds/tools/"$GENESIS_NAME"rc --skip-confirm +/opt/akraino/redfish/install_server_os.sh --rc /opt/akraino/yaml_builds/tools/"$GENESIS_NAME"rc --skip-confirm scp $YAML_BUILDS/tars/promenade-bundle-$SITE.tar $GENESIS_HOST:/tmp/ ssh $GENESIS_HOST << EOF @@ -56,4 +58,9 @@ ssh $GENESIS_HOST << EOF tar -xmf promenade-bundle-$SITE.tar EOF # Update BIOS Setting -python $YAML_BUILDS/scripts/update_bios_settings.py $SITE.yaml +#python $YAML_BUILDS/scripts/update_bios_settings.py $SITE.yaml + +exec 2>&- +exec 1>&- +exit 0 +