From 0f18e5d2a994fbbd1f37f1e6cdc0c4b9f7c4d91b Mon Sep 17 00:00:00 2001 From: BenjiReis Date: Fri, 16 Jun 2023 10:22:19 +0200 Subject: [PATCH] Write resolver file if dns or searchdomain have specified The file should always be written if the fileds have been filled. Signed-off-by: BenjiReis --- netutil.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/netutil.py b/netutil.py index a1863f01..4c4f4169 100644 --- a/netutil.py +++ b/netutil.py @@ -92,12 +92,11 @@ def writeResolverFile(configuration, filename): for iface in configuration: settings = configuration[iface] - if (not settings.isDynamic()) and settings.dns: - if settings.dns: - for server in settings.dns: - outfile.write("nameserver %s\n" % server) - if settings.domain: - outfile.write("search %s\n" % settings.domain) + if settings.dns: + for server in settings.dns: + outfile.write("nameserver %s\n" % server) + if settings.domain: + outfile.write("search %s\n" % settings.domain) outfile.close()