ispman/bin/functions dnsset.functions.pl,1.6,1.7
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/bin/functions
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv2137/bin/functions
Modified Files:
dnsset.functions.pl
Log Message:
added check for complete SOA
Index: dnsset.functions.pl
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/functions/dnsset.functions.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dnsset.functions.pl 30 May 2006 20:38:56 -0000 1.6
+++ dnsset.functions.pl 6 Jun 2006 09:47:08 -0000 1.7
@@ -43,6 +43,7 @@
}
else {
print "$opts{'d'}: Set SOA record @ARGV \n" if defined $opts{'v'};
+
$soa = {
'primary' => $ARGV[0],
'rootmail' => $ARGV[1],
@@ -53,6 +54,15 @@
'minimum' => $ARGV[5]
};
}
+
+ foreach ('primary', 'rootmail', 'refresh', 'retry', 'expire', 'minimum') {
+ if (! defined($soa->{$_})) {
+ print "FATAL: the SOA record is incomplete (missing $_). Aborting!\n";
+ print "Hint: Add a complete SOA first.\n";
+ return;
+ }
+ }
+
$ispman->setDNSsOARecord( $opts{'d'}, $soa );
#dns set SOA primary rootmail refresh retry expire minimum