unbound: fix write on var /MFS

This commit is contained in:
Franco Fichtner 2015-07-27 09:16:05 +02:00
parent d28c004a8a
commit 136bf48b87

View file

@ -88,9 +88,13 @@ function unbound_optimization() {
}
function unbound_generate_config() {
function unbound_generate_config()
{
global $config, $g;
/* bootstrap unbound root (needed for /var MFS */
@mkdir($g['unbound_chroot_path']);
// Setup optimization
$optimization = unbound_optimization();
@ -642,9 +646,10 @@ function unbound_acls_config() {
}
}
}
// Write out Access list
file_put_contents("{$g['unbound_chroot_path']}/access_lists.conf", $aclcfg);
// Write out Access list
@mkdir($g['unbound_chroot_path']);
file_put_contents("{$g['unbound_chroot_path']}/access_lists.conf", $aclcfg);
}
// Generate hosts and reload services
@ -656,4 +661,3 @@ function unbound_hosts_generate() {
unbound_control("reload");
}
?>