]> the.earth.li Git - autodns.git/blobdiff - autodns.pl
cscvs to tla changeset 4
[autodns.git] / autodns.pl
index afc6c5bb8d732488430b63fba646e4a985fc57ea..2b973ee4efe39c52273c1e31e9465d7c72e8537b 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/perl -Tw
-# autodns 0.0.6
-# Copyright 1999-2003 Project Purple. Written by Jonathan McDowell
+# autodns 0.0.7
+# Copyright 1999-2004 Project Purple. Written by Jonathan McDowell
 # See ACKNOWLEDGEMENTS file for full details of contributors.
 # http://www.earth.li/projectpurple/progs/autodns.html
 # Released under the GPL.
 #
-# $Id: autodns.pl,v 1.2 2003/06/04 17:27:00 noodles Exp $
+# $Id: autodns.pl,v 1.4 2004/04/08 10:48:35 noodles Exp $
 #
 
 use strict;
@@ -19,7 +19,7 @@ my ($user, $server, $inprocess, $delcount, $addcount, $reload_command);
 my ($domain, @MAIL, @GPGERROR, @COMMANDS, %zones);
 my ($me, $ccreply, $conffile, $domainlistroot, @cfgfiles, $VERSION);
 
-$VERSION="0.0.6";
+$VERSION="0.0.7";
 
 #
 # Local configuration here (until it gets moved to a config file).
@@ -205,7 +205,7 @@ print REPLY <<EOF;
 Subject: $subject
 
 AutoDNS $VERSION
-Copyright 1999-2001 Project Purple. Written by Jonathan McDowell.
+Copyright 1999-2004 Project Purple. Written by Jonathan McDowell.
 Released under the GPL.
 
 EOF
@@ -316,6 +316,9 @@ foreach (@COMMANDS) {
                        print REPLY "Adding domain $domain\n";
                        $zones{$domain}=1;
 
+                       my $df = $domain;
+                       $df =~ tr,/,:,;
+
                        open (DOMAINSFILE, ">>$conffile");
                        print DOMAINSFILE "
 ### Domain added for '$user'
@@ -323,7 +326,7 @@ foreach (@COMMANDS) {
 zone \"$domain\" {
        type slave;
        masters { $server; };
-       file \"secondary/$user/$domain\";
+       file \"secondary/$user/$df\";
        allow-transfer { none; };
        allow-query { any; };
 };\n";