summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/system.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 9a310f1..3fd47a9 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -55,15 +55,18 @@ function system_resolvconf_generate($dynupdate = false) {
/* get dynamically assigned DNS servers (if any) */
$ns = get_nameservers();
foreach($ns as $nameserver) {
- $resolvconf .= "nameserver $nameserver\n";
- $havedns = true;
+ if($nameserver) {
+ $resolvconf .= "nameserver $nameserver\n";
+ $havedns = true;
+ }
}
}
if (!$havedns && is_array($syscfg['dnsserver'])) {
foreach ($syscfg['dnsserver'] as $ns) {
- if ($ns)
+ if ($ns) {
$resolvconf .= "nameserver $ns\n";
- $havedns = true;
+ $havedns = true;
+ }
}
}
OpenPOWER on IntegriCloud