From: Jonathan McDowell Date: Wed, 15 Jun 2005 10:41:53 +0000 (+0000) Subject: cscvs to tla changeset 6 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=3c571e259ea33befdc6dff62ea6024415cbdcb7e;p=autodns.git cscvs to tla changeset 6 Author: noodles Date: 2005/04/08 11:37:16 Ensure the domain list file exists for a user. git-archimport-id: noodles@earth.li--pie/autodns--mainline--1.0--patch-5 --- diff --git a/autodns.pl b/autodns.pl index 67377a3..a2b4dd9 100755 --- a/autodns.pl +++ b/autodns.pl @@ -5,7 +5,7 @@ # http://www.earth.li/projectpurple/progs/autodns.html # Released under the GPL. # -# $Id: autodns.pl,v 1.5 2005/03/21 15:11:01 noodles Exp $ +# $Id: autodns.pl,v 1.6 2005/04/08 11:37:16 noodles Exp $ # use strict; @@ -336,6 +336,13 @@ foreach my $cfgfile (@cfgfiles) { getzones($cfgfile); } +# Force existance of the $domainlistroot$user file +if (! -e $domainlistroot.$user) { + open (DOMAINLIST, ">>$domainlistroot$user") or + &fatalerror("Couldn't create domains file.\n"); + close DOMAINLIST; +} + foreach (@COMMANDS) { # Remove trailing CRs and leading/trailing whitespace chomp;