Author: noodles
Date: 2004/04/08 10:45:44
Don't try to write files with / in the name - convert to : instead.
git-archimport-id: noodles@earth.li--pie/autodns--mainline--1.0--patch-2
# 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.3 2004/04/08 10:45:44 noodles Exp $
#
use strict;
print REPLY "Adding domain $domain\n";
$zones{$domain}=1;
+ my $df = $domain;
+ $df =~ tr,/,:,;
+
open (DOMAINSFILE, ">>$conffile");
print DOMAINSFILE "
### Domain added for '$user'
zone \"$domain\" {
type slave;
masters { $server; };
- file \"secondary/$user/$domain\";
+ file \"secondary/$user/$df\";
allow-transfer { none; };
allow-query { any; };
};\n";