summaryrefslogtreecommitdiffstats
path: root/etc/inc/unbound.inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2011-10-01 20:19:30 +0200
committerWarren Baker <warren@decoy.co.za>2011-10-01 20:19:30 +0200
commit291492467fad88158d0b092e7b40ac71ac4fa29b (patch)
treeeea67916573839857ce0e4eab40ae64a8590566b /etc/inc/unbound.inc
parent5b24d6459f7da74176df54393c1ee371713373bb (diff)
downloadpfsense-291492467fad88158d0b092e7b40ac71ac4fa29b.zip
pfsense-291492467fad88158d0b092e7b40ac71ac4fa29b.tar.gz
Add static host entries to separate file and include in main config
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r--etc/inc/unbound.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc
index e6d8ad0..a960ff7 100644
--- a/etc/inc/unbound.inc
+++ b/etc/inc/unbound.inc
@@ -286,6 +286,9 @@ interface: ::0
{$private_addr}
{$private_domains}
+# Static host entries
+include: {$g['unbound_chroot_path']}/etc/host_entries
+
###
# Remote Control Config
###
@@ -303,7 +306,7 @@ EOD;
}
function unbound_add_host_entries() {
- global $config;
+ global $config, $g;
/* XXX: break this out into a separate config file and make use of include */
$syscfg = $config['system'];
@@ -394,7 +397,9 @@ function unbound_add_host_entries() {
}
$unbound_entries .= $host_entries;
}
- return $unbound_entries;
+
+ /* Write out entries */
+ file_put_contents("{$g['unbound_chroot_path']}/etc/host_entries", $unbound_entries);
}
?> \ No newline at end of file
OpenPOWER on IntegriCloud