(bug?) whois and virtual domains

Joel Griffiths griff at aver-computer.com
Thu Jul 29 12:51:39 PDT 1999


FYI:

Don't know whether this is a bug or not, but it appears that the $whois
variable only contains the first line "[rs.internic.net]" of the whois output
in svc_domain.pm; therefore, the creation of the new domain always fails with
"Domain already exists" (or somesuch) even when it doesn't.

In addition, I cannot see where the whois pipe is closed. It might be closed
automatically, but I'm not sure.

To fix these problems in the svc_domain.pm file, I made the following mods to
my svc_domain.pm file.....


my $whois = ($self->_whois)[0];
return "Domain in use (see whois)"
if ( $self->action eq "N" && $whois !~ /No match for/ );
  return "Domain not found (see whois) $whois X"
if ( $self->action eq "M" && $whois =~ /No match for/ );



sub _whois {
  my $self = shift;
  my $domain = $self->domain;
  my $whois;
  return ( "No match for domain \"$domain\"." ) if $whois_hack;
  open(WHOIS, "whois $domain |");
  while (<WHOIS>)
  {
    $whois .= $_;
  }
  close WHOIS;
  return $whois;
}


-- Joel Griffiths --
Senior Internet Engineer                  Aver, Inc.
(760) 568-4351 Phone              (760) 341-8694 Fax
"The world won't change just because I complain."
               Martina McBride



More information about the freeside-users mailing list