bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in hostname


From: Jim Meyering
Subject: Re: bug in hostname
Date: Fri, 23 Jan 2004 17:35:19 +0100

Bruno Haible <address@hidden> wrote:
> Jim Meyering wrote:
>> > But OTOH, I didn't follow compatibility with Linux /bin/hostname in two
>> > points:
>> >   - When the machine has multiple long names (i.e. some aliases),
>> >     my "hostname -f" prints them all, one per line. Linux "/bin/hostname 
>> > -f"
>> >     prints only the first one, but has an extra option "-a":
>> >     "/bin/hostname -a" prints the names except the first one, all in one
>> >     line, each followed by a space.
>> >   - "hostname -i" surrounds the IP address with brackets in my
>> > implementation, whereas it does not in the Linux /bin/hostname.
>>
>> Wouldn't it be better to remain compatible with the
>> Linux /bin/hostname?
>
> I don't know. Now is a good opportunity to correct things that the Linux
> /bin/hostname does wrong. Maybe a networking guru can tell
>
>   - whether there is a semantic difference between the first hostname and
>     the other ones ("aliases")?

I'm concerned about scripts that expect `hostname -f' to output
a single host name.  As written, your version of hostname would
break those scripts on systems with more than one name.  If it's
useful to provide the other names, then hostname should do that
with a new (long-named) option.  Why risk breaking such scripts?

>   - why some programs expect IP addresses with brackets and some don't?

Do some programs expect `hostname -i' to output a
bracket-enclosed IP address?  Why not remain compatible
with the Linux /bin/hostname?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]