diff options
-rw-r--r-- | config/bind/bind.inc | 16 | ||||
-rw-r--r-- | config/bind/bind_zones.xml | 30 |
2 files changed, 34 insertions, 12 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++; diff --git a/config/bind/bind_zones.xml b/config/bind/bind_zones.xml index d3adf630..7fde01a7 100644 --- a/config/bind/bind_zones.xml +++ b/config/bind/bind_zones.xml @@ -172,7 +172,7 @@ <description>You can put your own custom options here.</description> <type>textarea</type> <cols>75</cols> - <rows>8</rows> + <rows>5</rows> <encoding>base64</encoding> </field> <field> @@ -384,18 +384,36 @@ </rowhelper> </field> <field> - <type>listtopic</type> - <name>Zone config file</name> - <fieldname>temp03</fieldname> + <type>listtopic</type> + <name>Custom Zone Domain records</name> + <fieldname>temp02</fieldname> + </field> + <field> + <fielddescr></fielddescr> + <fieldname>customzonerecords</fieldname> + <description><![CDATA[Paste any custom zone records to include on this zone.<br> + This can be used for a fast migration setup.]]></description> + <type>textarea</type> + <cols>84</cols> + <rows>10</rows> + <encoding>base64</encoding> + <dontdisplayname/> + <usecolspan2/> + </field> + <field> + <type>listtopic</type> + <name>Resulting Zone config file</name> </field> <field> - <fielddescr>Resulting config file</fielddescr> + <fielddescr></fielddescr> <fieldname>resultconfig</fieldname> <description>Resulting bind config file for this zone.</description> <type>textarea</type> - <cols>75</cols> + <cols>84</cols> <rows>15</rows> <encoding>base64</encoding> + <dontdisplayname/> + <usecolspan2/> </field> </fields> <custom_php_after_form_command> |