Mailinglist Archive: opensuse (958 mails)

< Previous Next >
Re: [opensuse] Where to set the domain name? - Leap 15.1 beta
On 05/06/2019 11:03 PM, Knurpht-openSUSE wrote:
Op dinsdag 7 mei 2019 05:59:16 CEST schreef David C. Rankin:
In the new systemd arena there is also hostnamectl that allows you to set
the hostname there.
You may have hit exactly the point I could not make lacking the proper
knowledge, i.e. an entry in /etc/hosts being necessary.

Yes, I haven't kept up with all the changes on how hostname resolution has
is handled or changed in the past few years, but I have run into cases where
if there is a mismatch between what /etc/hosts thinks the hostname is and what
the system thinks it is -- that will cause messages very similar to what
Carlos reports.

There isn't a requirement /etc/hostname even be present, but traditionally
it has always held the hostname for early-boot when there are no servers
running to provide it. It can contain the DNS domain portion of the hostname
as well, but most of the systems I have simply have the hostname without the
domain component. (I'd be more apt to include it on systems using a fixed
address)

One of these days I'll have to come out from under my digital rock and chase
down exactly how it is handled now. It's been since the dnsdomainname /
gethostbyname changes half a decade or so ago that I even looked.

One thing that is rather strange is 15.0 has no domain component in
/etc/hostname, but it is included in /etc/hosts, 42.3 is the exact opposite. I
have no recollection of intentionally setting either one way or the other, so
I don't think it is critical which way it is done, so long as the domain is
defined somewhere and the hostname is consistent between the sources...

Looking at root's history on 15, it looks like I set the hostname with the
domain component with hostname, but I have no record of what I put in the
other...

5 2018-04-13 03:21:20 hostname vlleap15.3111skyline.com
6 2018-04-13 03:21:34 vi /etc/hostname
7 2018-04-13 03:21:53 vi /etc/hosts


--
David C. Rankin, J.D.,P.E.

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
This Thread