Skip to content

Commit

Permalink
Addresses awslabs#136 - set +e doesn't seem to work. Will return 0 or…
Browse files Browse the repository at this point in the history
… TEN_RANGE
  • Loading branch information
chrisferry committed Jan 7, 2019
1 parent b46b99a commit 329ab02
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions files/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ kubectl config \

MAC=$(curl -s http://169.254.169.254/latest/meta-data/network/interfaces/macs/ -s | head -n 1)
CIDRS=$(curl -s http://169.254.169.254/latest/meta-data/network/interfaces/macs/$MAC/vpc-ipv4-cidr-blocks)
set +e
TEN_RANGE=$(echo $CIDRS | grep -c '^10\..*')
set -e
TEN_RANGE=$(echo $CIDRS | grep -c '^10\..*' || : )
DNS_CLUSTER_IP=10.100.0.10
if [[ "$TEN_RANGE" != "0" ]] ; then
DNS_CLUSTER_IP=172.20.0.10;
Expand Down

0 comments on commit 329ab02

Please sign in to comment.