From 7dad8bcba480cefeabd0b2a9f5923dd5e3c2e1cd Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Tue, 14 Nov 2017 12:46:02 +0100 Subject: [PATCH] Unlink systemd-resolved symlink /etc/resolv.conf --- src/etc/one-context.d/loc-11-dns##one | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/etc/one-context.d/loc-11-dns##one b/src/etc/one-context.d/loc-11-dns##one index 464c12e..1a51eba 100755 --- a/src/etc/one-context.d/loc-11-dns##one +++ b/src/etc/one-context.d/loc-11-dns##one @@ -40,7 +40,11 @@ searchdomains=$( [ -z "$nameservers" ] && exit 0 -echo -n '' > /etc/resolv.conf +if [ -L /etc/resolv.conf ]; then + unlink /etc/resolv.conf +else + echo -n '' > /etc/resolv.conf +fi for nameserver in $nameservers; do echo nameserver $nameserver >> /etc/resolv.conf