summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc16
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;
- }
}
}
OpenPOWER on IntegriCloud