LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-14-2019, 02:57 PM   #31
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27

Not sure I need Network Information Service.

Well now I know more about domain-name that I did before.
 
Old 03-14-2019, 04:36 PM   #32
GazL
Senior Member
 
Registered: May 2008
Posts: 4,951
Blog Entries: 15

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Quote:
Originally Posted by Petri Kaukasoina View Post
Historically it was only the hostname and not the full canonical FQDN. Search for word 'hostname' in current's Changelog to see when it was changed in Slackware.
Yes, the rc script used to do something along the lines of:
hostname $(cut -f1 -d. /etc/HOSTNAME)

It was changed here:
Code:
Sat Mar 24 19:47:01 UTC 2018
a/sysvinit-scripts-2.1-noarch-8.txz:  Rebuilt.
  rc.M: Set default hostname using FQDN. Thanks to Andrzej Telszewski.
I disagreed with the change and commented here on LQ at the time, but as it's easy enough to workaround by simply not putting the FQDN in /etc/HOSTNAME I didn't push the issue when nothing came of it.

From hostname (1)
Code:
 THE FQDN
       The  FQDN  (Fully Qualified Domain Name) of the system is the name that
       the resolver(3) returns for the host name, such as, ursula.example.com.
       It  is  usually  the hostname followed by the DNS domain name (the part
       after the first dot).  You can check the FQDN using hostname --fqdn  or
       the domain name using dnsdomainname.

       You cannot change the FQDN with hostname or dnsdomainname.

       The  recommended  method of setting the FQDN is to make the hostname be
       an alias for the fully qualified name using /etc/hosts,  DNS,  or  NIS.
       For  example,  if  the  hostname was "ursula", one might have a line in
       /etc/hosts which reads

              127.0.1.1    ursula.example.com ursula

       Technically: The FQDN is the name getaddrinfo(3) returns for  the  host
       name returned by gethostname(2).  The DNS domain name is the part after
       the first dot.

       Therefore it depends on the configuration of the resolver  (usually  in
       /etc/host.conf) how you can change it. Usually the hosts file is parsed
       before DNS or NIS,  so  it  is  most  common  to  change  the  FQDN  in
       /etc/hosts.
That clearly says to me that Slackware is doing the wrong thing here.
 
Old 03-14-2019, 04:42 PM   #33
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 1,664

Rep: Reputation: 5135Reputation: 5135Reputation: 5135Reputation: 5135Reputation: 5135Reputation: 5135Reputation: 5135Reputation: 5135Reputation: 5135Reputation: 5135Reputation: 5135
Quote:
Originally Posted by GazL View Post
That clearly says to me that Slackware is doing the wrong thing here.
It says to me that the man page has not been updated. Everyone else switched to using "hostname" to store the FQDN long ago. I fought the change in Slackware for a long time, going so far as to write patches to keep using the short no-domain-name hostname. Perhaps I'll search my email to find out what the report was that prompted me to go with the flow on this, but given how much effort was previously put into sticking with the short hostname, I'm going to venture that it was time to make this change.

Anyway, if you really think this is the wrong thing to do, you'll need to point out what it breaks. Then perhaps I'll be motivated to dig up what using the short hostname breaks and we can compare notes.
 
2 members found this post helpful.
Old 03-14-2019, 05:29 PM   #34
GazL
Senior Member
 
Registered: May 2008
Posts: 4,951
Blog Entries: 15

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
If this is what everyone else is doing then my apologies. I can only go by what is in the docs. If they lie to me, I can't help that.

POSIX doesn't help as it simply defines it as "a name within a connected network".
The only other thing I can point at would be that HOST_NAME_MAX is 64, but dns names can go much longer, so a fqdn might potentially not fit, but people are unlikely to hit that one anyway as no one likes names that long.

I have nothing concrete to point at that I know of that this breaks. Maybe programmers have just got into the habit of assuming that gethostname(2) may or may not return a fqdn and now allow for both possibilities.
 
1 members found this post helpful.
Old 03-14-2019, 07:06 PM   #35
GazL
Senior Member
 
Registered: May 2008
Posts: 4,951
Blog Entries: 15

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Right, I've just been over in my OpenBSD box to cross-reference and over there both gethostname() and uname -n both return the domain part, so it does indeed seem that what Slackware is doing is in line with standard conventions. So egg all over face here! That's the last f***ing time I believe anything written on a linux man-page!

Sorry Pat.
 
3 members found this post helpful.
Old 03-15-2019, 08:01 AM   #36
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,141

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820

I am forever amazed how our BDFL steers a clear course. I have no clue how it is done. I put it down to Arthur C Clarke's third law.
 
2 members found this post helpful.
Old 03-20-2019, 10:26 PM   #37
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,226

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
Well, the entire "hostname" concept assumes that the machine in question either
  1. has a single name in a single network or
  2. has a single name (including domain!) in multiple networks

There are ample use-cases where neither are true, mainly around gateways of some sort.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HOSTNAME = hostname -> HOSTNAME: command not found ? thomas2004ch Linux - Software 2 08-26-2013 08:25 PM
'hostname some_name' does not change the hostname. stf92 Slackware 11 02-21-2013 07:09 PM
Not enough space to use apt-get on default partition, how do i change default? mmcm Linux - Newbie 3 01-05-2013 06:37 PM
getting errors related to hostname -- security problem? ok to change hostname? sneakyimp Linux - Server 2 11-18-2012 05:25 PM
after hostname change, syslogd still output previous hostname to messages file tiger2000 Linux - General 3 07-22-2009 09:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration