# Where is hostname set now???

## Budoka

A change came down with networkmanager a while back.

 *Quote:*   

> * Messages for package net-misc/networkmanager-0.9.10.1_pre20141101: 
> 
> * Ifnet plugin is now disabled because of it being unattended 
> 
> * and unmaintained for a long time, leading to some unfixed bugs 
> ...

 

After this update my hostname is no longer being picked up from /etc/conf.d/hostname where it was defined as instructed in the original AMD64 Manual. 

In another thread https://forums.gentoo.org/viewtopic-t-1007716-postdays-0-postorder-asc-start-25.html it was indicated that I should now use /etc/Networkmanager/Networkmanager.conf. This did not exist on my system so I created it and populated it with  *Quote:*   

> [main] 
> 
> plugins=keyfile 
> 
> [keyfile] 
> ...

  of course defining the hostname I want to use.

Although it fixed the rc error indicating no networkmanager.conf file exists my system is still not picking up the hostname.

Then I found this https://wiki.gentoo.org/wiki/NetworkManager which indicates the hostname can be defined in /etc/dhcp/dhclient.conf but that doesn't work either. What gives?

----------

## comprookie2000

I added it to;

```

cat /etc/NetworkManager/NetworkManager.conf 

[keyfile]

hostname=heater

dhcp=dhcpcd

unmanaged-devices=mac:00:22:64:32:35:02

```

----------

## ppurka

comprookie2000 What are they doing, breaking configurations that have been working for over a decade!! It looks like every other developer comes up with some inane method of breaking any existing configuration.

This bug affected me badly and it was really hard to figure out what was causing it. I initially thought that the hostname init script wasn't working. It not only affected my hostname by changing it to same weird "new-host" that is not present anywhere in /etc, but it also broke my existing bluetooth configurations.

Many thanks for this solution. Really appreciated.

----------

