[systemd-devel] hostname and dnsdomainname
Lennart Poettering
lennart at poettering.net
Mon Jun 22 12:14:15 PDT 2015
On Sat, 20.06.15 10:18, Kevin Wilson (wkevils at gmail.com) wrote:
> Hi,
>
> I can set a hostname with
> hostnamectl set-hostname --static newHostname
>
> I have a DNS domain server in my local LAN. so
>
> when I restart the machine, it gets this full hostname, which can be
> displayed by
>
>
> hostname -f
> newHostname.mydomanName
>
> and hostname alone shows
> newHostname
>
>
> Is there some way (for example, restarting some service) by which I
> can be assigned
> the domain name without performing a full reboot ?
I am not sure I understand the question. The FQDN that "hostname -f"
returns is usually determined at runtime by asking getaddrinfo() for
the canonical name of the system hostname. This will usually have the
effect that the configured search domains are in turn appended and
checked if the hostname exists there. and then the suffixed name is
returned.
Or in other words: the fqdn is usually not configured locally
explicitly, but via the search domain logic in conjunction with your
DNS server.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list