domain should be called zone
authorHeiko Schlittermann <hs@schlittermann.de>
Sun, 23 Jan 2011 22:22:57 +0100
changeset 94 54252e5987f2
parent 93 c14527ff4d1f
child 95 cb92affcf59f
domain should be called zone
bin/zone-mk
templates/named.config
templates/named.zone
--- a/bin/zone-mk	Sun Jan 23 00:33:32 2011 +0100
+++ b/bin/zone-mk	Sun Jan 23 22:22:57 2011 +0100
@@ -40,33 +40,33 @@
     die "$cf{master_dir}: $!"    if not -d -r -x $cf{master_dir};
     die "$cf{zone_conf_dir}: $!" if not -d -r -x $cf{zone_conf_dir};
 
-    # legt fuer jede domain in @ARGV ein verzeichnis in $master_dir an.
+    # legt fuer jede Zone in @ARGV ein verzeichnis in $master_dir an.
     # schreibt aus den angegebenen templates die dateien $zonefile und $config
     # in die entsprechenden verzeichnisse.
-    for my $utf8domain (@ARGV) {
+    for my $utf8zone (@ARGV) {
 
-        my $domain     = idn_to_ascii($utf8domain, $CHARSET);
-        my $zonefile   = "$cf{master_dir}/$domain/$domain";
-        my $configfile = "$cf{zone_conf_dir}/$domain";
+        my $zone     = idn_to_ascii($utf8zone, $CHARSET);
+        my $zonefile   = "$cf{master_dir}/$zone/$zone";
+        my $configfile = "$cf{zone_conf_dir}/$zone";
         my $now        = time;
 
         make_path dirname $zonefile;
 
         if (-f $zonefile and not $opt_force) {
-            say "skipping $utf8domain: zone file '$zonefile' exists.";
+            say "skipping $utf8zone: zone file '$zonefile' exists.";
             next;
         }
 
         if (-f $configfile and not $opt_force) {
-            say "skipping $utf8domain: config file '$configfile' exists.";
+            say "skipping $utf8zone: config file '$configfile' exists.";
             next;
         }
 
-        say "domain $utf8domain ($domain) for $customer.";
+        say "zone $utf8zone ($zone) for $customer.";
 
         my %vars = (
-            domain     => $domain,
-            utf8domain => $utf8domain,
+            zone     => $zone,
+            utf8zone => $utf8zone,
             now        => $now,
             zonefile   => abs_path($zonefile),
             customer   => $customer,
@@ -93,11 +93,12 @@
 
 =head1 SYNOPSIS
 
-    zone-mk [-f|--force] <customer-id> <domain>...
+    zone-mk [-f|--force] <customer-id> <zone>...
 
 =head1 DESCRIPTION
 
-B<zone-mk> creates a new DNS zone file and the config snipped.
+B<zone-mk> creates a new DNS zone file and the config snipped. Nothing
+else (especially no DNSSEC, and no bind integration) is done.
 
 =head1 OPTIONS
 
--- a/templates/named.config	Sun Jan 23 00:33:32 2011 +0100
+++ b/templates/named.config	Sun Jan 23 22:22:57 2011 +0100
@@ -1,8 +1,8 @@
 [% USE iso = date(format => '%Y-%m-%dT%H:%M:%S') -%]
-zone "[% domain %]" {
+zone "[% zone %]" {
 // Start: [% iso.format(now) %]
 // Invoice: [% customer %]
-// UTF8: [% utf8domain %]
+// UTF8: [% utf8zone %]
 	type master;
 	file "[% zonefile %]";
 	allow-transfer { localhost; slaves; };
--- a/templates/named.zone	Sun Jan 23 00:33:32 2011 +0100
+++ b/templates/named.zone	Sun Jan 23 22:22:57 2011 +0100
@@ -1,6 +1,6 @@
 [% USE iso = date(format => '%Y-%m-%dT%H:%M:%S') %]
 [% USE serial = date(format => '%Y%m%d00') -%]
-$ORIGIN [% domain %].
+$ORIGIN [% zone %].
 $TTL 1d
 @               IN SOA [% primary %]. [% hostmaster %]. (
                 [% serial.format(now) %]	; serial
@@ -12,7 +12,7 @@
 
                 IN TXT          "invoice: [% customer %]"
                 IN TXT          "start: [% now %] [% iso.format(now) %]
-                IN TXT          "utf8: [% utf8domain %]"
+                IN TXT          "utf8: [% utf8zone %]"
 
                 IN NS           [% primary %].
                 IN NS           [% secondary %].