DHCP configuration question

Rick Stevens ricks at nerd.com
Thu Aug 27 01:01:21 UTC 2009


Philip A. Prindeville wrote:
> Philip A. Prindeville wrote:
>> Rick Stevens wrote:
>>   
>>> Philip A. Prindeville wrote:
>>>     
>>>> Philip A. Prindeville wrote:
>>>>       
>>>>> Ok, dumb question, but given that my
>>>>> /var/lib/dhclient/dhclient-eth0.lease info shows that I'm clearly
>>>>> getting a hostname and domain name, why does "hostname" return
>>>>> localhost.localdomain (and "domainname" returns "(none)")?
>>>>>
>>>>> What do I need to enable to make this work?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> -Philip
>>>>>
>>>>>   
>>>>>         
>>>> Asked and answered:
>>>>
>>>> chkconfig NetworkManager off
>>>>       
>>> Huh?  All that does is disable NetworkManager.  It won't affect the
>>> hostname unless the dhclient script changes it for you or you have a
>>> hostname in /etc/sysconfig/network and run the old network startup code
>>> ("chkconfig network on").
>>>     
>> The old network code is on by default.

I missed that earlier.  Having both NM and the old code enabled 
simultaneously used to be a spectacularly bad thing to do.  They did not
play well with each other.  I don't know if that's true anymore, but I'd
either enable NM and disable classic or vice versa, but don't have them
both enabled.

> Also, have a look at where need_hostname gets called in
> /etc/sysconfig/network-scripts/ifup-post ...
> 
> -Philip
> 
> 


-- 
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer                      ricks at nerd.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-         I don't get mad and I don't get even.  I get ahead!        -
----------------------------------------------------------------------




More information about the users mailing list