ispman/bin/functions dnsdump.functions.pl,1.2,1.3 dnsload.functions.pl,1.3,1.4 dnsset.functions.pl,1.3,1.4 dnsshow.functions.pl,1.2,1.3

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-cvs1.sourceforge.net:/tmp/cvs-serv30799/bin/functions

Modified Files:
	dnsdump.functions.pl dnsload.functions.pl dnsset.functions.pl 
	dnsshow.functions.pl 
Log Message:
code reformatting by perltidy conforming perl style guide


Index: dnsdump.functions.pl
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/functions/dnsdump.functions.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dnsdump.functions.pl	8 May 2002 23:00:53 -0000	1.2
+++ dnsdump.functions.pl	30 May 2004 23:35:32 -0000	1.3
@@ -1,69 +1,67 @@
 #!/usr/bin/perl
 
-
 sub dump_ns {
-   my $domain=shift;
-   my $nsrecords=$ispman->getDNSnSRecords($domain);
+    my $domain    = shift;
+    my $nsrecords = $ispman->getDNSnSRecords($domain);
 
-   for (@$nsrecords) {
-      print join " ", ( "NS",$domain, $_->{'origion'},  $_->{'host'});
-      print "\n";
-   }
+    for (@$nsrecords) {
+        print join " ", ( "NS", $domain, $_->{'origion'}, $_->{'host'} );
+        print "\n";
+    }
 }
 
-   
 sub dump_mx {
-   my $domain=shift;
-   my $mxrecords=$ispman->getDNSmXRecords($domain);
+    my $domain    = shift;
+    my $mxrecords = $ispman->getDNSmXRecords($domain);
 
-   for (@$mxrecords) {
-      print join " ", ( "MX",$domain, $_->{'origion'}, $_->{'pref'},   $_->{'host'});
-      print "\n";
+    for (@$mxrecords) {
+        print join " ",
+          ( "MX", $domain, $_->{'origion'}, $_->{'pref'}, $_->{'host'} );
+        print "\n";
 
-   }
+    }
 }
 
-
-sub  dump_a {
-   my $domain=shift;
-   my $arecords=$ispman->getDNSaRecords($domain);
-   for (@$arecords) {
-      print join " ", ( "A",$domain, $_->{'host'},  $_->{'ip'});
-      print "\n";
-   }
+sub dump_a {
+    my $domain   = shift;
+    my $arecords = $ispman->getDNSaRecords($domain);
+    for (@$arecords) {
+        print join " ", ( "A", $domain, $_->{'host'}, $_->{'ip'} );
+        print "\n";
+    }
 }
 
-
 sub dump_cname {
-   my $domain=shift;
-   my $cnames=$ispman->getDNScNAMERecords($domain);
-   for (@$cnames) {
-      print join " ", ( "CNAME",$domain, $_->{'alias'},  $_->{'host'});
-      print "\n";
-   }
+    my $domain = shift;
+    my $cnames = $ispman->getDNScNAMERecords($domain);
+    for (@$cnames) {
+        print join " ", ( "CNAME", $domain, $_->{'alias'}, $_->{'host'} );
+        print "\n";
+    }
 }
 
 sub dump_soa {
-   my $domain=shift;
-   my $soa=$ispman->getSOA($domain);
-   print  join " ", ("SOA", $domain, $soa->{'primary'}, $soa->{'rootmail'}, $soa->{'refresh'},$soa->{'retry'},$soa->{'expire'}, soa->{'minimum'});
-	print "\n";
+    my $domain = shift;
+    my $soa    = $ispman->getSOA($domain);
+    print join " ",
+      (
+        "SOA", $domain, $soa->{'primary'}, $soa->{'rootmail'},
+        $soa->{'refresh'}, $soa->{'retry'}, $soa->{'expire'}, soa->{'minimum'}
+      );
+    print "\n";
 }
 
-
 sub dump_all {
-	return dump_any(@_);
+    return dump_any(@_);
 }
 
 sub dump_any {
-   &dump_soa(@_);
-   &dump_ns(@_);
-   &dump_mx(@_);
-   &dump_a(@_);
-   &dump_cname(@_);
+    &dump_soa(@_);
+    &dump_ns(@_);
+    &dump_mx(@_);
+    &dump_a(@_);
+    &dump_cname(@_);
 }
 
-
-
 1;
 

Index: dnsshow.functions.pl
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/functions/dnsshow.functions.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dnsshow.functions.pl	30 Jul 2002 02:56:26 -0000	1.2
+++ dnsshow.functions.pl	30 May 2004 23:35:33 -0000	1.3
@@ -1,72 +1,69 @@
 #!/usr/bin/perl
 
-
-
 sub show_ns {
-   my $domain=shift;
-   my $nsrecords=$ispman->getDNSnSRecords($domain);
+    my $domain    = shift;
+    my $nsrecords = $ispman->getDNSnSRecords($domain);
 
-   for (@$nsrecords) {
-      print join "\t", ($_->{'origion'}, "IN", "NS",  $_->{'host'});
-      print "\n";
-   }
+    for (@$nsrecords) {
+        print join "\t", ( $_->{'origion'}, "IN", "NS", $_->{'host'} );
+        print "\n";
+    }
 }
-   
+
 sub show_mx {
-   my $domain=shift;
-   my $mxrecords=$ispman->getDNSmXRecords($domain);
+    my $domain    = shift;
+    my $mxrecords = $ispman->getDNSmXRecords($domain);
 
-   for (@$mxrecords) {
-      print join "\t", ($_->{'origion'}, "IN",  "MX",  $_->{'pref'},   $_->{'host'});
-      print "\n";
+    for (@$mxrecords) {
+        print join "\t",
+          ( $_->{'origion'}, "IN", "MX", $_->{'pref'}, $_->{'host'} );
+        print "\n";
 
-   }
+    }
 }
 
-
-sub  show_a {
-   my $domain=shift;
-   my $arecords=$ispman->getDNSaRecords($domain, @ARGV);
-   for (@$arecords) {
-      print join "\t", ($_->{'host'}, "IN", "A",  $_->{'ip'});
-      print "\n";
-   }
+sub show_a {
+    my $domain = shift;
+    my $arecords = $ispman->getDNSaRecords( $domain, @ARGV );
+    for (@$arecords) {
+        print join "\t", ( $_->{'host'}, "IN", "A", $_->{'ip'} );
+        print "\n";
+    }
 }
 
-
 sub show_cname {
-   my $domain=shift;
-   my $cnames=$ispman->getDNScNAMERecords($domain);
-   for (@$cnames) {
-      print join "\t", ($_->{'alias'}, "IN", "CNAME",  $_->{'host'});
-      print "\n";
-   }
+    my $domain = shift;
+    my $cnames = $ispman->getDNScNAMERecords($domain);
+    for (@$cnames) {
+        print join "\t", ( $_->{'alias'}, "IN", "CNAME", $_->{'host'} );
+        print "\n";
+    }
 }
 
 sub show_soa {
-   my $domain=shift;
-   my $soa=$ispman->getSOA($domain);
-   print  "@ IN SOA $soa->{'primary'}  $soa->{'rootmail'} (\n";
-   for (qw(serial refresh retry expire minimum)) {
-      print  "\t $soa->{$_} ; $_\n";
-   }
-   print  ")\n\n";
+    my $domain = shift;
+    my $soa    = $ispman->getSOA($domain);
+    print "@ IN SOA $soa->{'primary'}  $soa->{'rootmail'} (\n";
+    for (qw(serial refresh retry expire minimum)) {
+        print "\t $soa->{$_} ; $_\n";
+    }
+    print ")\n\n";
 }
 
 sub show_all {
-   return show_any(@_);
+    return show_any(@_);
 }
 
 sub show_any {
-   &show_soa(@_);
-   print "\n\n";
-   &show_ns(@_);
-   print "\n\n";
-   &show_mx(@_);
-   print "\n\n";
-   &show_a(@_);
-   print "\n\n";
-   &show_cname(@_);
+    &show_soa(@_);
+    print "\n\n";
+    &show_ns(@_);
+    print "\n\n";
+    &show_mx(@_);
+    print "\n\n";
+    &show_a(@_);
+    print "\n\n";
+    &show_cname(@_);
 }
 
 1;

Index: dnsload.functions.pl
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/functions/dnsload.functions.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dnsload.functions.pl	10 May 2002 12:55:41 -0000	1.3
+++ dnsload.functions.pl	30 May 2004 23:35:33 -0000	1.4
@@ -1,30 +1,29 @@
 
 sub set_ns {
-   my $domain=shift;
-   $ispman->newDNSRecord($domain, "nSRecord", @_);
+    my $domain = shift;
+    $ispman->newDNSRecord( $domain, "nSRecord", @_ );
 }
-   
+
 sub set_mx {
-   my $domain=shift;
-   $ispman->newDNSRecord($domain, "mXRecord", $_[0], join " ", ($_[1], $_[2]));
+    my $domain = shift;
+    $ispman->newDNSRecord( $domain, "mXRecord", $_[0], join " ",
+        ( $_[1], $_[2] ) );
 }
 
-
-sub  set_a {
-   my $domain=shift;
-   $ispman->newDNSRecord($domain, "aRecord", $_[0], $_[1]);
+sub set_a {
+    my $domain = shift;
+    $ispman->newDNSRecord( $domain, "aRecord", $_[0], $_[1] );
 }
 
-
 sub set_cname {
-   my $domain=shift;
-   $ispman->newDNSRecord($domain, "cNAMERecord", $_[0], $_[1]);
+    my $domain = shift;
+    $ispman->newDNSRecord( $domain, "cNAMERecord", $_[0], $_[1] );
 }
 
 sub set_soa {
-   my $domain=shift;
-   $ispman->setDNSsOARecord($domain, join (" ", $_[0], $_[1], time(), $_[2], $_[3], $_[4], $_[5] ));
+    my $domain = shift;
+    $ispman->setDNSsOARecord( $domain,
+        join( " ", $_[0], $_[1], time(), $_[2], $_[3], $_[4], $_[5] ) );
 }
 
-
 1;

Index: dnsset.functions.pl
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/functions/dnsset.functions.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dnsset.functions.pl	24 Apr 2003 21:31:42 -0000	1.3
+++ dnsset.functions.pl	30 May 2004 23:35:33 -0000	1.4
@@ -1,38 +1,47 @@
 
 sub set_ns {
-   print "$opts{'d'}: Adding NS record @ARGV \n" if defined $opts{'v'};
-   $ispman->newDNSRecord($opts{'d'}, "nSRecord", @ARGV);
-   #dns set ns origion  host
-}
-   
-sub set_mx {
-   print "$opts{'d'}: Adding MX record @ARGV \n" if defined $opts{'v'};
-   $ispman->newDNSRecord($opts{'d'}, "mXRecord", $ARGV[0], join " ", ($ARGV[1], $ARGV[2]));
-   #dns set mx origion pref host
+    print "$opts{'d'}: Adding NS record @ARGV \n" if defined $opts{'v'};
+    $ispman->newDNSRecord( $opts{'d'}, "nSRecord", @ARGV );
+
+    #dns set ns origion  host
 }
 
+sub set_mx {
+    print "$opts{'d'}: Adding MX record @ARGV \n" if defined $opts{'v'};
+    $ispman->newDNSRecord( $opts{'d'}, "mXRecord", $ARGV[0], join " ",
+        ( $ARGV[1], $ARGV[2] ) );
 
-sub  set_a {
-   print "$opts{'d'}: Adding A record @ARGV \n" if defined $opts{'v'};
-   print "Also setting a PTR record\n" if (defined $opts{'p'} && defined $opts{'v'});
-   my $extraHash={};
-   $extraHash->{'pTRRecord'}=$ARGV[1] if defined $opts{'p'};
-   $ispman->newDNSRecord($opts{'d'}, "aRecord", $ARGV[0], $ARGV[1], $extraHash);
-   #dns set a  host ip
+    #dns set mx origion pref host
 }
 
+sub set_a {
+    print "$opts{'d'}: Adding A record @ARGV \n" if defined $opts{'v'};
+    print "Also setting a PTR record\n"
+      if ( defined $opts{'p'} && defined $opts{'v'} );
+    my $extraHash = {};
+    $extraHash->{'pTRRecord'} = $ARGV[1] if defined $opts{'p'};
+    $ispman->newDNSRecord( $opts{'d'}, "aRecord", $ARGV[0], $ARGV[1],
+        $extraHash );
 
+    #dns set a  host ip
+}
 
 sub set_cname {
-   print "$opts{'d'}: Adding CNAME record @ARGV \n" if defined $opts{'v'};
-   $ispman->newDNSRecord($opts{'d'}, "cNAMERecord", $ARGV[0], $ARGV[1]);
-   #dns set cname alias host
+    print "$opts{'d'}: Adding CNAME record @ARGV \n" if defined $opts{'v'};
+    $ispman->newDNSRecord( $opts{'d'}, "cNAMERecord", $ARGV[0], $ARGV[1] );
+
+    #dns set cname alias host
 }
 
 sub set_soa {
-   $ispman->setDNSsOARecord($opts{'d'}, join (" ", $ARGV[0], $ARGV[1], time(), $ARGV[2], $ARGV[3], $ARGV[4], $ARGV[5] ));
-   #dns set SOA primary rootmail refresh retry expire minimum
-}
+    $ispman->setDNSsOARecord(
+        $opts{'d'},
+        join( " ",
+            $ARGV[0], $ARGV[1], time(), $ARGV[2],
+            $ARGV[3], $ARGV[4], $ARGV[5] )
+    );
 
+    #dns set SOA primary rootmail refresh retry expire minimum
+}
 
 1;



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.