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 d3aaab4745)
This commit is contained in:
Matt Thompson 2016-08-22 16:30:46 -04:00 committed by Jesse Pretorius (odyssey4me)
parent 8b2cdb3cc1
commit 382f4bea92

View File

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