diff options
author | Ermal <eri@pfsense.org> | 2011-08-08 17:19:13 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-08-08 17:19:27 +0000 |
commit | 8e8662170a6d2ed58764d4652c80998a9f50d2e1 (patch) | |
tree | f361f3546927b9524d9f5b31d26ba5bc73b4cc41 /etc/inc/system.inc | |
parent | 8ac329daa06dbc88748df5ca7158d44edd5936f8 (diff) | |
download | pfsense-8e8662170a6d2ed58764d4652c80998a9f50d2e1.zip pfsense-8e8662170a6d2ed58764d4652c80998a9f50d2e1.tar.gz |
When clicked allow overriding of dns servers by dynamic WANs still configure the other dns servers so in multi-WAN environments dns has a chance to work still.
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index cd2c44a..c8f13d2 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -90,33 +90,25 @@ function system_resolvconf_generate($dynupdate = false) { if($syscfg['domain']) $resolvconf = "domain {$syscfg['domain']}\n"; - $havedns = false; - $resolvconf .= "nameserver 127.0.0.1\n"; if (isset($syscfg['dnsallowoverride'])) { /* get dynamically assigned DNS servers (if any) */ $ns = array_unique(get_searchdomains()); foreach($ns as $searchserver) { - if($searchserver) { + if($searchserver) $resolvconf .= "search {$searchserver}\n"; - $havedns = true; - } } $ns = array_unique(get_nameservers()); foreach($ns as $nameserver) { - if($nameserver) { + if($nameserver) $resolvconf .= "nameserver $nameserver\n"; - $havedns = true; - } } } - if (!$havedns && is_array($syscfg['dnsserver'])) { + if (is_array($syscfg['dnsserver'])) { foreach ($syscfg['dnsserver'] as $ns) { - if ($ns) { + if ($ns) $resolvconf .= "nameserver $ns\n"; - $havedns = true; - } } } |