aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2010-12-17 17:16:08 +0200
committerWarren Baker <warren@decoy.co.za>2010-12-17 17:16:08 +0200
commit881326313a595caee4219d272e759a6df811f23d (patch)
tree863cdfd94cb0f62bb449e03ec4d134b049bc1eb3 /config/unbound
parent42331c7db6c9300277416ee64daeabff78117b3e (diff)
downloadpfsense-packages-881326313a595caee4219d272e759a6df811f23d.tar.gz
pfsense-packages-881326313a595caee4219d272e759a6df811f23d.tar.bz2
pfsense-packages-881326313a595caee4219d272e759a6df811f23d.zip
Make sure filesystem is writable at install time and when root files are been downloaded.
Diffstat (limited to 'config/unbound')
-rw-r--r--config/unbound/unbound.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index ac1b0e53..d044f739 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -33,6 +33,9 @@ if(!function_exists("get_nameservers"))
function unbound_initial_setup() {
global $config, $g;
+ // Make sure read-write
+ conf_mount_rw();
+
if (!array($config['installedpackages']['unbound']['config']))
$config['installedpackages']['unbound']['config'] = array();
@@ -75,6 +78,8 @@ function unbound_initial_setup() {
// Write out the XML config
write_config();
+ // Back to read-only
+ conf_mount_ro();
}
function unbound_anchor_setup() {
@@ -382,6 +387,7 @@ function fetch_root_hints() {
$destination_file = "/usr/local/etc/unbound/root.hints";
if (filesize($destination_file) == 0 ) {
+ conf_mount_rw();
$fout = fopen($destination_file, "w");
$url = "ftp://ftp.internic.net/domain/named.cache";
@@ -395,6 +401,7 @@ function fetch_root_hints() {
fwrite($fout, $data);
fclose($fout);
+ conf_mount_ro();
return ($http_code == 200) ? true : $http_code;
} else {