From 2de9d5fe1776a076f92d28f53a55a0d5bac0f3cd Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Fri, 11 Dec 2020 17:40:40 +0100 Subject: [PATCH 1/2] Fix typo --- site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh b/site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh index f95865c..a815f0a 100644 --- a/site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh +++ b/site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh @@ -83,7 +83,7 @@ if [ "$1" != '' ]; then if [ "$READ_MASK" != '' ]; then ZT_NETWORK_IP_LOCAL_ROUTE_MASK=$READ_MASK else - echo -e "${RED}==> Please enter a vaild submask${NC}"; + echo -e "${RED}==> Please enter a valid submask${NC}"; exit 1; fi else -- 2.25.1 From c4dbed8d6579904090796b862a7b11609f0e1cc6 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Fri, 11 Dec 2020 17:40:48 +0100 Subject: [PATCH 2/2] Fix zerotier network creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using outdated/invalid rules syntax. Remove the property entirely, so the API will create the default rule (which is the same) on creation. Co-authored-by: Greg Karékinian --- site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh b/site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh index a815f0a..6a498f0 100644 --- a/site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh +++ b/site-cookbooks/kosmos_zerotier/files/zerotier-ctl.sh @@ -100,7 +100,7 @@ if [ "$1" != '' ]; then fi # Huge JSON file ahead # Do not change this JSON string! - ZT_NETWORK_CONFIG="{\"auth\":\"${ZT_AUTHTOKEN}\",\"name\":\"${ZT_NETWORK_NAME}\",\"private\":${ZT_NETWORK_PRIVATE},\"allowPassiveBridging\":${ZT_NETWORK_BRIDGING},\"v4AssignMode\":\"${ZT_NETWORK_V4_ASSIGN_MODE}\",\"v6AssignMode\":\"${ZT_NETWORK_V6_ASSIGN_MODE}\",\"routes\":[{\"target\":\"${ZT_NETWORK_IP_LOCAL_ROUTE}/${ZT_NETWORK_IP_LOCAL_ROUTE_MASK}\",\"via\":null,\"flags\":0,\"metric\":0}],\"ipAssignmentPools\":[{\"ipRangeStart\":\"${ZT_NETWORK_IP_START}\",\"ipRangeEnd\":\"${ZT_NETWORK_IP_END}\"}],\"rules\":[{\"ruleNo\":10,\"action\":\"accept\"}]}" + ZT_NETWORK_CONFIG="{\"auth\":\"${ZT_AUTHTOKEN}\",\"name\":\"${ZT_NETWORK_NAME}\",\"private\":${ZT_NETWORK_PRIVATE},\"allowPassiveBridging\":${ZT_NETWORK_BRIDGING},\"v4AssignMode\":\"${ZT_NETWORK_V4_ASSIGN_MODE}\",\"v6AssignMode\":\"${ZT_NETWORK_V6_ASSIGN_MODE}\",\"routes\":[{\"target\":\"${ZT_NETWORK_IP_LOCAL_ROUTE}/${ZT_NETWORK_IP_LOCAL_ROUTE_MASK}\",\"via\":null,\"flags\":0,\"metric\":0}],\"ipAssignmentPools\":[{\"ipRangeStart\":\"${ZT_NETWORK_IP_START}\",\"ipRangeEnd\":\"${ZT_NETWORK_IP_END}\"}]}" echo '> Do you wish to add this network?' select ZT_ADD_NET_YN in 'Yes' 'No'; do case $ZT_ADD_NET_YN in -- 2.25.1