From 3c9f1a23ae73b727023724487ecba58c9b631829 Mon Sep 17 00:00:00 2001 From: kvaps Date: Thu, 4 May 2017 12:37:40 +0200 Subject: [PATCH] add: dns configuration --- src/etc/one-context.d/loc-11-dns##one | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/etc/one-context.d/loc-11-dns##one b/src/etc/one-context.d/loc-11-dns##one index 7409267..d195f56 100755 --- a/src/etc/one-context.d/loc-11-dns##one +++ b/src/etc/one-context.d/loc-11-dns##one @@ -46,7 +46,14 @@ for nameserver in $nameservers; do echo nameserver $nameserver >> /etc/resolv.conf done +if [ -f /etc/sysconfig/network/config ]; then + sed -i '/^NETCONFIG_DNS_STATIC_SERVERS=/ s/=.*$/="'$nameservers'"/' /etc/sysconfig/network/config +fi + [ -z "$searchdomains" ] && exit 0 echo search $searchdomains >> /etc/resolv.conf +if [ -f /etc/sysconfig/network/config ]; then + sed -i '/^NETCONFIG_DNS_STATIC_SEARCHLIST=/ s/=.*$/="'$searchdomains'"/' /etc/sysconfig/network/config +fi