diff --git a/src/etc/inc/unbound.inc b/src/etc/inc/unbound.inc index 0e83055212..d8eb35b48b 100644 --- a/src/etc/inc/unbound.inc +++ b/src/etc/inc/unbound.inc @@ -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"); } -?>