From 77cb74f31603bc076d223cf816efb7b7c332febd Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sun, 16 Oct 2022 16:57:22 +0200 Subject: [PATCH] Fix bash scripts not having been updated with new bootstrap layout --- dnsmasq/bin/dnsmasq-entrypoint | 8 ++++---- garage/src/bin/garage-apply-layout-diff | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dnsmasq/bin/dnsmasq-entrypoint b/dnsmasq/bin/dnsmasq-entrypoint index 2b989bb..242dbec 100644 --- a/dnsmasq/bin/dnsmasq-entrypoint +++ b/dnsmasq/bin/dnsmasq-entrypoint @@ -11,17 +11,17 @@ tmp="$(mktemp -d -t cryptic-net-dnsmasq-entrypoint-XXX)" ( trap "rm -rf '$tmp'" EXIT - tar xzf "$_BOOTSTRAP_PATH" -C "$tmp" ./nebula/hosts + tar xzf "$_BOOTSTRAP_PATH" -C "$tmp" ./hosts thisHostName=$(tar xzf "$_BOOTSTRAP_PATH" --to-stdout ./hostname) - thisHostIP=$(cat "$tmp"/nebula/hosts/"$thisHostName".yml | yq '.ip') + thisHostIP=$(cat "$tmp"/hosts/"$thisHostName".yml | yq '.nebula.ip') echo "listen-address=$thisHostIP" >> "$conf_path" - ls -1 "$tmp"/nebula/hosts | while read hostYml; do + ls -1 "$tmp"/hosts | while read hostYml; do hostName=$(echo "$hostYml" | cut -d. -f1) - hostIP=$(cat "$tmp"/nebula/hosts/"$hostYml" | yq '.ip') + hostIP=$(cat "$tmp"/hosts/"$hostYml" | yq '.nebula.ip') echo "address=/${hostName}.hosts.cryptic.io/$hostIP" >> "$conf_path" done diff --git a/garage/src/bin/garage-apply-layout-diff b/garage/src/bin/garage-apply-layout-diff index 3a718ad..5375cc9 100644 --- a/garage/src/bin/garage-apply-layout-diff +++ b/garage/src/bin/garage-apply-layout-diff @@ -5,10 +5,10 @@ tmp="$(mktemp -d -t cryptic-net-garage-apply-layout-diff-XXX)" ( trap "rm -rf '$tmp'" EXIT - tar xzf "$_BOOTSTRAP_PATH" -C "$tmp" ./nebula/hosts + tar xzf "$_BOOTSTRAP_PATH" -C "$tmp" ./hosts thisHostName=$(tar xzf "$_BOOTSTRAP_PATH" --to-stdout ./hostname) - thisHostIP=$(cat "$tmp"/nebula/hosts/"$thisHostName".yml | yq '.ip') + thisHostIP=$(cat "$tmp"/hosts/"$thisHostName".yml | yq '.nebula.ip') firstRPCPort=$(cat "$_DAEMON_YML_PATH" | yq '.storage.allocations[0].rpc_port')