On Thu, Oct 25, 2012 at 03:09:31AM +0200, Christoph Anton Mitterer wrote:
> On Wed, 2012-10-24 at 00:29 +0200, Simon Paillard wrote:
> > It does work:
> >     # hostname
> >     toshi
> ok so I guess you have set something like
> <local ip> toshi.debian.org toshi
> in /etc/hosts
> and hostname -f would result in:
> toshi.debian.org

No, why do you guess that ? (and anyway, the subject is not /etc/hosts parsing)

man hostname:
   GET NAME
       When called without any arguments, the program displays the current 
names:
       hostname will print the name of the system as returned by the 
gethostname(2) function.

So there is no problem regarding this point.

> > Actually, according to glibc/resolv/res_init.c (search for _PATH_RESCONF):
> > * the first domain listed after 'search' keyword the considered the default
> >   domain (same as 'domain').
> > * as whatever is 'domain' or 'search' keyword, the default domain is
> >   overwritten, the last seen keyword applies.
> > 
> > I don't know is this is a libc bug / should be documented in manpages.
>
> Not sure whether I understand what you mean:
> Imagine I have:
> domain example.com
> search example.org example.net

example.org will be set as the default domain, then it will search in
example.net.
example.com will not be used at all.

example.com would be the default domain (and example.org ignored) if:
        search example.org example.net
        domain example.com

> > > The most options in hosts.conf seem to be ignored,.. can you update this?
> > Do you mean host.conf ? 
> > I don't understand what is your point.
> [..]
> It seems as if some of these options are no longer used (in the sense of
> they are deprecated or so)... right? Perhaps I meant that.
> 
> e.g. AFAIU "order" is nowadays controlled by nsswitch.conf.
> I vaguely remember that people were also discouraged from using any of
> the *spoof* options... but I may also be mistaken here.
> 
> Anyway, currently, I have no idea why I thought they were really
> _ignored_.
> 
> But if some of them are discouraged to be used (as maybe with the
> *spoof*) or superseded by others (as maybe with *order*)... one should
> perhaps place pointers/description to what should be done nowadays.

I'll try to review hosts.conf later.
If you already have concrete examples / tests, don't hesitate to report a
separate bug.

-- 
Simon Paillard


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to