Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15227

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname
Date 2019-07-24 10:43 -0400
Message-ID <mailman.2138.1563979431.2688.bug-bash@gnu.org> (permalink)
References <20190724135835.110473-1-whissi@gentoo.org> <454afb04-c18a-1b82-d869-34539c194b3d@case.edu> <f1f2e8df-5921-b696-686b-de5aec362a25@gentoo.org> <91958805-f061-c73d-b702-29c8646f173f@case.edu>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 7/24/19 10:38 AM, Thomas Deutschmann wrote:
> On 2019-07-24 16:27, Chet Ramey wrote:
>> Thanks for the patch. This is system-dependent: there are systems, like
>> mine, where `hostname' returns the system's FQDN. It all depends on the
>> administrator's choices.
> 
> Can you tell me more about your system and how you (your administrator)
> set up your system so that hostname will return FQDN?

I use Mac OS X:

caleb.ins.cwru.edu(1)$ hostname
caleb.ins.cwru.edu
caleb.ins.cwru.edu(1)$ hostname -f
caleb.ins.cwru.edu
caleb.ins.cwru.edu(1)$ uname -a
Darwin caleb.ins.cwru.edu 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25
23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

> 
> I hope you are not talking about putting FQDN into a file which is
> expecting hostname only...

There is no `file', and there's no requirement that `hostname' not return
the FQDN.

> 
> Or in other words: At the moment I am wondering what should be wrong on
> my system or on Debian/Ubuntu out of the box: You set hostname to
> hostname only (no FQDN) and set domain option in /etc/resolv.conf for
> example for FQDN. But maybe I am missing something.

The world isn't all Linux.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname Chet Ramey <chet.ramey@case.edu> - 2019-07-24 10:43 -0400

csiph-web