Marius Gedminas wrote:
> On Wed, Sep 16, 2009 at 10:53:31AM -0300, Derek Broughton wrote:
>> If you don't have a static IP (and for multiple machines "at work" you
>> normally wouldn't) it's customary to get the domain name from the DHCP
> That works fine for /etc/resolv.conf, i.e. looking up other hosts in the
> same domain by using short names, but I don't recal ever seeing hostname
> --fqdn output mylocalhostname.domainreceivedfromDHCPserver. Are we
> talking about the same thing here?
Absolutely. My machine "morgen" (/etc/hostname does _not_ contain an fqdn),
is currently connected to the domain "mar.dfo-mpo.ca", and the DHCP server
there sent back that domain name in the DHCP request. So:
$ hostname --fqdn
when I'm at home, my own DHCP server sends "pointerstop.ca", and my machine
- with no special configuration at my end - is "morgen.pointerstop.ca".
request ... domain-name ...
And that's all you need (and should be set by default).
According to "man hostname", the value returned from "hostname --fqdn" IS
from the resolver (ie, generally based on what's in /etc/resolv.conf).
ubuntu-users mailing list
Modify settings or unsubscribe at: