Commit 9be7eadd authored by Franco Fichtner's avatar Franco Fichtner

unbound: fix write on var /MFS

parent 3a28b5a3
...@@ -93,9 +93,13 @@ function unbound_optimization() { ...@@ -93,9 +93,13 @@ function unbound_optimization() {
} }
function unbound_generate_config() { function unbound_generate_config()
{
global $config, $g; global $config, $g;
/* bootstrap unbound root (needed for /var MFS */
@mkdir($g['unbound_chroot_path']);
// Setup optimization // Setup optimization
$optimization = unbound_optimization(); $optimization = unbound_optimization();
...@@ -647,9 +651,10 @@ function unbound_acls_config() { ...@@ -647,9 +651,10 @@ function unbound_acls_config() {
} }
} }
} }
// Write out Access list // Write out Access list
@mkdir($g['unbound_chroot_path']);
file_put_contents("{$g['unbound_chroot_path']}/access_lists.conf", $aclcfg); file_put_contents("{$g['unbound_chroot_path']}/access_lists.conf", $aclcfg);
} }
// Generate hosts and reload services // Generate hosts and reload services
...@@ -661,4 +666,3 @@ function unbound_hosts_generate() { ...@@ -661,4 +666,3 @@ function unbound_hosts_generate() {
unbound_control("reload"); unbound_control("reload");
} }
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment