Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
initialize call moved
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodeOcean committed Oct 31, 2022
1 parent 5ea3967 commit 06e1f1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ BASEDIR=$(dirname $0)

. ${BASEDIR}/shared/utils.sh

initialize

# parse options
PARAMS=""
while (( "$#" )); do
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion shared/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 06e1f1b

Please sign in to comment.