SCIENTIFIC-LINUX-USERS Archives

January 2013

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Paul Robert Marino <[log in to unmask]>
Reply To:
Paul Robert Marino <[log in to unmask]>
Date:
Tue, 22 Jan 2013 17:43:59 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (58 lines)
The output of the domainname command hasn't ever worked the way you
would expect on Redhat to my recollection. quite simply the Redhat
network scripts have never set the variable unless you configure NIS
and nothing expects it to be set any more.
'hostname -d' should give you the output you are looking for.

dnsdomainname is a symlink to the hostname command which reads the $0
to determine its behavior its effectively an alias to hostname -d but
it may or may not work on various different versions and distros.

domainname returns the NIS domain names e.g.( hostname -y)  which does
not have to match the FQDN its important to know if you are using NIS
which many people still are than this becomes important but otherwise
you should ignore it.

all of this is explained in the hostname man file 'man hostname'


On Mon, Jan 21, 2013 at 2:13 PM, Torpey List <[log in to unmask]> wrote:
> -----Original Message----- From: Vladimir Mosgalin
>
>>
>> Hi Torpey List!
>>
>> On 2013.01.20 at 11:02:38 -0600, Torpey List wrote next:
>>
>>> /etc/sysconfig/network has only the following:
>>> NETWORKING=yes
>>> HOSTNAME=nala.
>>> DOMAIN=example.com
>>>
>>> I see the trailing period at the end of the Hostname and have removed it.
>>> I have also added "NM_CONTROLLED=no" to ifcfg-eth0.
>>>
>>> This certainly an improvement and fixes the issue that I was having.
>>> However, I am not sure if there is another issue that >will pop up because
>>> there is no domainname.
>>
>>
>> Glad that it helped!
>>
>> Output from "domainname" doesn't matter, this is mostly obsolete
>> command, and unless you're using NIS (and it's almost guaranteed that you
>> don't) you shouldn't care about it.
>>
>> What you probably want is "dnsdomainname" command.
>
>
> Thank you for the help.  the dnsdomainname does provide the correct domain
> name. This issue is resolve!
>
> Thanks again,
> Steve
>
> --
>
> Vladimir

ATOM RSS1 RSS2