diff --git a/install.sh b/install.sh index ad3f5c5..3d37a9e 100644 --- a/install.sh +++ b/install.sh @@ -76,8 +76,6 @@ BASEDIR=$(dirname $0) . ${BASEDIR}/shared/utils.sh -initialize - # parse options PARAMS="" while (( "$#" )); do @@ -126,6 +124,8 @@ done eval set -- "$PARAMS" +initialize + # for backwards compatibility evaluate positional parameters like previous 2.0.x and 2.1.x releases # this will be removed in the future if [ ! -z "$PARAMS" ]; then diff --git a/shared/utils.sh b/shared/utils.sh index 631ac81..d1a216e 100644 --- a/shared/utils.sh +++ b/shared/utils.sh @@ -34,7 +34,7 @@ function get_metadata() { if [ ! -z "$IMDSV2" ]; then local token=$(curl -s -X PUT "http://$metadata_ip/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 60") - local token_wrapper=`-H "X-aws-ec2-metadata-token: $token"` + local token_wrapper='-H "X-aws-ec2-metadata-token: $token"' fi echo `curl -s $token_wrapper http://$metadata_ip/latest/meta-data/$key`