Skip to content
This repository was archived by the owner on Jun 12, 2021. It is now read-only.

Commit 0b7a480

Browse files
committed
fixing my_location_in_list
1 parent c28d208 commit 0b7a480

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

boot-scripts/install_docker.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ source /etc/profile.d/cluster
99
name="$(echo $MY_IPADDRESS | perl -pe 's{\.}{}g')"
1010
all_nets="$(python ./lib/generate_network_blocks.py --master-cidr-block ${KUBE_NODE_IP_CIDRS} --cidr-divider ${KUBE_NODE_IP_CIDRS_SUBDIVIDER})"
1111

12+
asg_addresses=$(echo "$CLUSTER_ADDRESSES , $MY_IPADDRESS" | perl -pe 's{,}{}g; s{ }{\n}g' | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n)
13+
1214
my_location_in_list=0
13-
for ip in $CLUSTER_ADDRESSES; do
15+
for ip in $asg_addresses; do
1416
if [ "$ip" = "$MY_IPADDRESS" ]; then
1517
break;
1618
fi

0 commit comments

Comments
 (0)