develooper Front page | perl.perl5.porters | Postings from February 2000

Re: fixing Sys::Hostname

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
February 8, 2000 07:50
Subject:
Re: fixing Sys::Hostname
Message ID:
29314.950024992@chthon
>>    % grep localhost /etc/hosts
>>    127.0.0.1	localhost	

>Which is exactly my point ;-)  there is no alias there, just the one name
>and that makes 'localhost' the official name of the address.

But I've never heard of "localhost" ever being anything but
"127.1" as an address.  It's extremely expected.

>If I do gethostbyname('localhost') on such a machine I get 'localhost'
>back. But I would "like" to get back "pluto" or "pluto.tiuk.ti.com"

>Thus my entry "should" be :

>127.0.0.1	pluto.tiuk.ti.com pluto localhost	

>and yours "should" be : 

>127.0.0.1	chthon.perl.com chthon localhost	

I think not.

--tom

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About