From 8b0f729315980f7b66ac616dc429305d8cd1dffd Mon Sep 17 00:00:00 2001 From: nkinkade Date: Tue, 5 May 2020 14:22:12 -0600 Subject: [PATCH] Extracts site name from hostname in a v1-v2-friendly way for the CoreOS configure_tc_fq.sh script. Fixes #176. (#177) --- configs/stage3_coreos/resources/cloud-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/stage3_coreos/resources/cloud-config.yml b/configs/stage3_coreos/resources/cloud-config.yml index 13dffed7..fc0d42a6 100644 --- a/configs/stage3_coreos/resources/cloud-config.yml +++ b/configs/stage3_coreos/resources/cloud-config.yml @@ -227,7 +227,7 @@ write_files: owner: root:root content: | #!/bin/bash - SITE=$(dnsdomainname | cut -d. -f1) + SITE=${HOSTNAME:6:5} SPEED=$(curl --silent --show-error --location \ https://siteinfo.mlab-oti.measurementlab.net/v1/sites/switches.json \ | jq -r ".${SITE}.uplink_speed")