home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / dnswalk / makereports < prev    next >
Encoding:
Text File  |  1996-10-25  |  495 b   |  21 lines

  1. #!/usr/local/bin/perl
  2. # This takes output from dnswalk and makes a "rep.orts" directory
  3. # with one file per contact.  Great for sending mail to all the admins.
  4.  
  5. mkdir("rep.orts",0777);
  6.  
  7. while (<>) {
  8.     if (/^Checking (.*).$/) {
  9.         $zone=$1;
  10.         next;
  11.     }
  12.     if (/^SOA.*contact=(.*).$/) {
  13.         close(REPORT);
  14.         print "writing report for $1\n";
  15.         open(REPORT,">>rep.orts/$1") || die "cannot write to rep.orts/$1: $!\n";
  16.         print REPORT "Potential errors for zone: $zone\n";
  17.     }
  18.     print REPORT;
  19. }
  20. close(REPORT);
  21.