This commit is contained in:
Casey Bisson 2017-06-03 08:58:09 -07:00
parent f320fb4799
commit f265bb9b58

View File

@ -74,12 +74,12 @@ function currentProfile () {
echo "Executing in '$(echo "${triton_account}" | awk 'NR == 1 {print $2}')' (${profile_source})" echo "Executing in '$(echo "${triton_account}" | awk 'NR == 1 {print $2}')' (${profile_source})"
# Check if CNS is enabled, require it # Check if CNS is enabled, require it
if [ ! "true" == "$(echo "${triton_account}" | awk -F": " '/cns/{print $2}')" ] if [ ! "true" == "$(echo "${triton_account}" | awk -F": " '/^triton_cns_enabled:/{print $2}')" ]
then then
echo echo
tput rev # reverse tput rev # reverse
tput bold # bold tput bold # bold
echo 'Error! Triton CNS is not enabled.' echo 'Warning! Triton CNS is not enabled.'
tput sgr0 # clear tput sgr0 # clear
echo echo
echo 'Please run the following to activate:' echo 'Please run the following to activate:'
@ -108,7 +108,7 @@ function cnsEnvVars () {
fi fi
# Get the user's UUID # Get the user's UUID
local triton_account_uuid="$(echo "${triton_account}" | awk -F": " '/id:/{print $2}')" local triton_account_uuid="$(echo "${triton_account}" | awk -F": " '/^id:/{print $2}')"
# Get current data center name # Get current data center name
# Note: this makes assumptions that work in our public cloud, but might not work elsewhere # Note: this makes assumptions that work in our public cloud, but might not work elsewhere