aboutsummaryrefslogtreecommitdiffstats
path: root/config/bind/bind.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/bind/bind.inc')
-rw-r--r--config/bind/bind.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc
index 4d579689..d5af73b6 100644
--- a/config/bind/bind.inc
+++ b/config/bind/bind.inc
@@ -346,7 +346,7 @@ EOD;
$custom_root_zone = true;
}
$zonetype = $zone['type'];
- $zoneview = $zone['view'];
+ $zoneviewlist = explode(',', $zone['view']);
$zonecustom = base64_decode($zone['custom']);
$zoneipslave = $zone['slaveip'];
$zoneforwarders = $zone['forwarders'];
@@ -358,8 +358,10 @@ EOD;
// Ensure zone view folder exists
if ($zonetype != "forward") {
- if (!(is_dir(CHROOT_LOCALBASE."/etc/namedb/$zonetype/$zoneview"))) {
- mkdir(CHROOT_LOCALBASE."/etc/namedb/$zonetype/$zoneview", 0755, true);
+ foreach ($zoneviewlist as $zoneview) {
+ if (!(is_dir(CHROOT_LOCALBASE."/etc/namedb/$zonetype/$zoneview"))) {
+ mkdir(CHROOT_LOCALBASE."/etc/namedb/$zonetype/$zoneview", 0755, true);
+ }
}
}
@@ -383,7 +385,8 @@ EOD;
$zoneallowtransfer = str_replace(',', '; ', $zone['allowtransfer']);
}
- if ($zoneview == $viewname) {
+ if (in_array($viewname, $zoneviewlist)) {
+ $zoneview = $viewname;
// Add zone name
if ($zonereverso == "on") {
if ($zonereversv6o == "on") {