{admin_uri} substitution
Rafal
rafal at poczta.homelinux.com
Fri Sep 9 06:31:57 PDT 2005
> Rafal wrote:
> > ...
> > So I assume, that I have my configuration *exactly* as the command
> > 'hostname' expects. It spills out FQDN only when requested
> > explicitly.
>
> But what does "gethostname()" produce?
----------------t.c------------------
main() {
if (gethostname(buff, BSIZE) == 0) {
printf("%s\n", buff);
}
}
------------------------------------
anonymous at model:~/work/tmp$ ./a.out
model
-----------------------------------
This output is quite obvious to me. The FQDN is only returned by hostname when it's called with "--fqdn" option. That option makes it do some extra resolver calls (apart from plain gethostname). And I think the intention really was to have `hostname --fqdn` return more then plain `hostname` -- otherwise the option would be spuriuse. Presumably to have gethostname() return none-FQDN (just host part) -- but the explanation of that in `hostname` manpages, although visible, is not so clear to me.
-R
More information about the cups
mailing list