Fix systemd-resolved race conditions

1. systemd-resolved should be removed/disabled before the symlink is
2. `domain` is redundant with the FQDN and replaced by `search`
3. correct resolv.conf EOL formatting issue

Change-Id: If7f8037c0623d9b1eb43171f09e492985a66b351
This commit is contained in:
Anderson, Craig (ca846m)
2020-01-25 10:15:04 -08:00
parent c7366c8ecf
commit 704e818eda
2 changed files with 8 additions and 5 deletions

View File

@@ -1,14 +1,16 @@
# Disable overwriting our resolv.conf
#
if [ -h /etc/resolv.conf ]; then
log "=== Removing resolv.conf symlink ==="
rm -f /etc/resolv.conf
fi
systemctl disable systemd-resolved.service
systemctl stop systemd-resolved.service
systemctl mask systemd-resolved.service
if [ -h /etc/resolv.conf ]; then
log "=== Removing resolv.conf symlink ==="
rm -f /etc/resolv.conf
touch /etc/resolv.conf
fi
CURATED_DIRS=(
/etc/kubernetes
/var/lib/etcd