From 3c571e259ea33befdc6dff62ea6024415cbdcb7e Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Wed, 15 Jun 2005 10:41:53 +0000 Subject: [PATCH] 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 --- autodns.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- 2.39.2