6

How to prevent dhcpcd from setting hostname got from server? Change of it breaks a lot of things (including X session).

My current distribution is Gentoo, init system is systemd and dhcpcd is spawn by networkmanager.

1

2 Answers 2

3

From n.m.'s link - the solution is described on NM webpage under 'Persistent Hostname'. One need to add to /etc/NetworkManager/NetworkManager.conf:

 [main]
 plugins=keyfile

 [keyfile]
 hostname=deepspace9
0

I believe you should add smth like following to your /etc/conf.d/net:

dhcpcd_eth0="-h yourhostname -H yourhostname"

P.S. You may want to check:

P.P.S. Personally I use dhclient because dhcpcd looks buggy for me.

1
  • Dhcpcd is spawned by NM so I cannot control the flags passed. Besides I use systemd so openrc's configuration flags are not applicable for that reason as well. Aug 9, 2013 at 6:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .