diff options
author | Marcello Coutinho <marcellocoutinho@gmail.com> | 2013-10-25 20:20:09 -0200 |
---|---|---|
committer | Marcello Coutinho <marcellocoutinho@gmail.com> | 2013-10-25 20:20:09 -0200 |
commit | 939c9a2b93a9bffa2bff95641740c666caec8e80 (patch) | |
tree | 52864152d097d7ddfa9ed8e3ad60a5e48615f8e0 /config/bind/bind.inc | |
parent | 48a5d68e30e1f1568dae307feb30f5490615993e (diff) | |
download | pfsense-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.inc | 16 |
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++; |