Skip to content

Commit

Permalink
Addresses #136 - set +e doesn't seem to work. Will return 0 or TEN_RANGE
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisferry authored and micahhausler committed Jan 8, 2019
1 parent 8a1d7c0 commit 44d18b7
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 44d18b7

Please sign in to comment.