aboutsummaryrefslogtreecommitdiffstats
path: root/config/bind/bind.inc
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2013-10-25 20:20:09 -0200
committerMarcello Coutinho <marcellocoutinho@gmail.com>2013-10-25 20:20:09 -0200
commit939c9a2b93a9bffa2bff95641740c666caec8e80 (patch)
tree52864152d097d7ddfa9ed8e3ad60a5e48615f8e0 /config/bind/bind.inc
parent48a5d68e30e1f1568dae307feb30f5490615993e (diff)
downloadpfsense-packages-939c9a2b93a9bffa2bff95641740c666caec8e80.tar.gz
pfsense-packages-939c9a2b93a9bffa2bff95641740c666caec8e80.tar.bz2
pfsense-packages-939c9a2b93a9bffa2bff95641740c666caec8e80.zip
bind - include custom zone records field
Diffstat (limited to 'config/bind/bind.inc')
-rw-r--r--config/bind/bind.inc16
1 files changed, 10 insertions, 6 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc
index 21e88e15..009befff 100644
--- a/config/bind/bind.inc
+++ b/config/bind/bind.inc
@@ -396,18 +396,19 @@ EOD;
if($zone['allowtransfer'] == '')
$zoneallowtransfer = "none";
else
- $zoneallowtransfer = str_replace(',','; ',$zone['allowtransfer']);
- $zone_conf = "\$TTL $zonetll\n;\n";
+ $zoneallowtransfer = str_replace(',','; ',$zone['allowtransfer']);
+ $zone_conf = "\$TTL {$zonetll}\n;\n";
+ $zone_conf .= "\$ORIGIN {$zonename}.\n\n";
$zone_conf .= ";\tDatabase file {$zonename}.DB for {$zonename} zone.\n";
$zone_conf .= ";\tDo not edit this file!!!\n";
$zone_conf .= ";\tZone version {$zoneserial}\n;\n";
if($zonereverso == "on" || $zonetype =="redirect")
- $zone_conf .= "@\t IN SOA $zonenameserver. \t $zonemail. (\n";
+ $zone_conf .= "@\t IN SOA $zonenameserver. \t $zonemail. (\n";
else
- $zone_conf .= "$zonename.\t IN SOA $zonenameserver. \t $zonemail. (\n";
+ $zone_conf .= "$zonename.\t IN SOA $zonenameserver. \t $zonemail. (\n";
- $zone_conf .= "\t\t$zoneserial ; serial\n";
- $zone_conf .= "\t\t$zonerefresh ; refresh\n";
+ $zone_conf .= "\t\t$zoneserial ; serial\n";
+ $zone_conf .= "\t\t$zonerefresh ; refresh\n";
$zone_conf .= "\t\t$zoneretry ; retry\n";
$zone_conf .= "\t\t$zoneexpire ; expire\n";
$zone_conf .= "\t\t$zoneminimum ; default_ttl\n\t\t)\n\n";
@@ -431,6 +432,9 @@ EOD;
$zone_conf .= "$hostname \t IN $hosttype $hostvalue \t$hostdst\n";
}
+ if ($zone['customzonerecords']!=""){
+ $zone_conf .= "\n\n;\n;custom zone records\n;\n".base64_decode($zone['customzonerecords'])."\n";
+ }
file_put_contents(CHROOT_LOCALBASE."/etc/namedb/$zonetype/$zoneview/$zonename.DB", $zone_conf);
$config["installedpackages"]["bindzone"]["config"][$x][resultconfig]=base64_encode($zone_conf);
$write_config++;