From 382f4bea92ce567164b5460f484e1fc54cf6805a Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Mon, 22 Aug 2016 16:30:46 -0400 Subject: [PATCH] Set default/fix version numbers in upgrade script This commit does the following: 1. Sets a default for I_REALLY_KNOW_WHAT_I_AM_DOING Without this default, the script will error due to an unbound variable. This happens as we have a 'set -u' specified in the script. 2. Updates version numbers from 12->13 to 13->14 Change-Id: I97c02d44722342b1867b4400921a66e6b2ea8a48 (cherry picked from commit d3aaab4745207507fb28e212394734da668b0747) --- scripts/run-upgrade.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/run-upgrade.sh b/scripts/run-upgrade.sh index 6596656cf9..af04b8fbb5 100755 --- a/scripts/run-upgrade.sh +++ b/scripts/run-upgrade.sh @@ -24,6 +24,7 @@ set -e -u -v export SCRIPTS_PATH="$(dirname "$(readlink -f "${0}")")" export MAIN_PATH="$(dirname "${SCRIPTS_PATH}")" export UPGRADE_PLAYBOOKS="${SCRIPTS_PATH}/upgrade-utilities/playbooks" +export I_REALLY_KNOW_WHAT_I_AM_DOING=${I_REALLY_KNOW_WHAT_I_AM_DOING:-"false"} ## Functions ----------------------------------------------------------------- @@ -106,7 +107,7 @@ function pre_flight { # Notify the user. echo -e " - This script will perform a v11.x to v12.x upgrade. + This script will perform a v13.x to v14.x upgrade. Once you start the upgrade there's no going back. Note, this is an online upgrade and while the @@ -120,7 +121,7 @@ function pre_flight { # Confirm the user is ready to upgrade. read -p 'Enter "YES" to continue or anything else to quit: ' UPGRADE if [ "${UPGRADE}" == "YES" ]; then - echo "Running Upgrade from v11.x to v12.x" + echo "Running Upgrade from v13.x to v14.x" else exit 99 fi