From e4970bf008930854e4d3a6250929fecbab936fb5 Mon Sep 17 00:00:00 2001 From: Max Erenberg Date: Fri, 20 Aug 2021 18:34:29 +0000 Subject: [PATCH] remove search option from resolv.conf --- .drone/auth1-setup.sh | 5 +++++ .drone/phosphoric-acid-setup.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.drone/auth1-setup.sh b/.drone/auth1-setup.sh index 79721ac..7891770 100755 --- a/.drone/auth1-setup.sh +++ b/.drone/auth1-setup.sh @@ -2,6 +2,11 @@ set -ex +# don't resolve container names to *real* CSC machines +sed -E '/^(domain|search)[[:space:]]+csclub.uwaterloo.ca/d' /etc/resolv.conf > /tmp/resolv.conf +cat /tmp/resolv.conf > /etc/resolv.conf +rm /tmp/resolv.conf + add_fqdn_to_hosts() { hostname=$1 ip_addr=$(getent hosts $hostname | cut -d' ' -f1) diff --git a/.drone/phosphoric-acid-setup.sh b/.drone/phosphoric-acid-setup.sh index 7e10fae..0a0be57 100755 --- a/.drone/phosphoric-acid-setup.sh +++ b/.drone/phosphoric-acid-setup.sh @@ -2,6 +2,11 @@ set -ex +# don't resolve container names to *real* CSC machines +sed -E '/^(domain|search)[[:space:]]+csclub.uwaterloo.ca/d' /etc/resolv.conf > /tmp/resolv.conf +cat /tmp/resolv.conf > /etc/resolv.conf +rm /tmp/resolv.conf + add_fqdn_to_hosts() { hostname=$1 ip_addr=$(getent hosts $hostname | cut -d' ' -f1)