diff options
-rw-r--r-- | src/etc/inc/system.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 882a2da..4a40a18 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -126,6 +126,7 @@ function system_resolvconf_generate($dynupdate = false) { $resolvconf .= "nameserver $dns_ns\n"; } + $ns = array(); if (isset($syscfg['dnsallowoverride'])) { /* get dynamically assigned DNS servers (if any) */ $ns = array_unique(get_searchdomains()); @@ -134,8 +135,8 @@ function system_resolvconf_generate($dynupdate = false) { $resolvconf .= "search {$searchserver}\n"; } } - } else { - $ns = array(); + } + if (empty($ns)) { // Do not create blank search/domain lines, it can break tools like dig. if ($syscfg['domain']) { $resolvconf .= "search {$syscfg['domain']}\n"; |