From: Martin Mares Date: Fri, 10 Sep 1999 19:44:41 +0000 (+0000) Subject: Miscellaneous fixes. X-Git-Tag: v4.0~74 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=f3ce437c5c8e1e819584a31398493fd352413565;p=nsc-5.git Miscellaneous fixes. --- diff --git a/bin/convert b/bin/convert index fb9d853..ada6fe1 100755 --- a/bin/convert +++ b/bin/convert @@ -10,8 +10,8 @@ use lib "/home/mj/perl/lib/site_perl"; use Getopt::Std; use Net::DNS::Resolver; -getopts('v', \%opts) && @ARGV == 1 || do { - print "Usage: convert [-v] \n"; +getopts('v', \%opts) && @ARGV == 2 || do { + print "Usage: convert [-v] \n"; exit 1; }; $domain = norm_name($ARGV[0]); @@ -19,12 +19,13 @@ $domain = norm_name($ARGV[0]); $verbose = $opts{"v"}; $res = new Net::DNS::Resolver; +$res->nameservers($ARGV[1]); $res->defnames(0); $res->dnsrch(0); $res->debug(0); $verbose && print "; Fetching zone data for $domain\n"; -@zone = $res->axfr($domain) or failed("Zone transfer failed"); +@zone = $res->axfr($domain) or die("Zone transfer failed"); foreach $r (@zone) { if ($verbose) { $name = $r->string;