[freeside] (bug?) whois and virtual domains

Ivan Kohler ivan at sisd.com
Tue Aug 3 00:41:01 PDT 1999


On Thu, Jul 29, 1999 at 12:37:14PM -0700, Joel Griffiths wrote:
> 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.

My whois implementation doesn't return that; but when Network Solutions
starting added the legalise at the top of all queries, it broke in a
similar way.

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

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

I updated the current tree to use Net::Whois instead.

As it turns out, Net::Whois also broke when NetSol added legalize to the
top of each result, so I patched that and sent the fixes on upstream. 
Hopefully we'll see a new Net::Whois release shortly; in the meantime, I
added the patch to the repository as
`htdocs/docs/Net-Whois-0.23-ivan1.patch' and added it to install.html. 

> 
> 
> 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

-- 
Ivan Kohler <ivan at sisd.com> - finger for PGP key - <moc.dsis at navi> Relhok Navi
Open-source billing and administration for ISPs - http://www.sisd.com/freeside
20 4,16 * * * saytime # please don't be surprised if you find me dreaming too



More information about the freeside-users mailing list