summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-12-10 19:55:04 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-12-10 19:55:04 +0000
commit91fe3ef2185032e114c1a98539b70de0fc78196b (patch)
treec1574904803d46066907271d34a609810ffcd2f6 /etc/inc/pfsense-utils.inc
parentb9b168e5cb48fc1fe0f0e84787c238ab313e2812 (diff)
downloadpfsense-91fe3ef2185032e114c1a98539b70de0fc78196b.zip
pfsense-91fe3ef2185032e114c1a98539b70de0fc78196b.tar.gz
If "/var/etc/nameservers.conf" doesn't exist then simply return the dns servers gathered up to this point
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index cc92f6c..6351727 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -53,6 +53,8 @@ function get_dns_servers() {
if (preg_match("/nameserver (.*)/", $dns, $matches))
$dns_servers[] = $matches[1];
}
+ if(!file_exists("/var/etc/nameservers.conf"))
+ return $dns_servers;
$dns = `cat /var/etc/nameservers.conf`;
$dns_s = split("\n", $dns);
foreach($dns_s as $dns)
OpenPOWER on IntegriCloud