@tannington:
Digging further, the “host’s name being changed” issue seems to be buried in the default DHCP configuration –
- In “/etc/dhclient.conf” –
# Request several well known/usefull dhcp options.
request subnet-mask, broadcast-address, routers, rfc3442-classless-static-routes, interface-mtu, **host-name**, **domain-name**, domain-search, domain-name-servers, nis-domain, nis-servers, nds-context, nds-servers, nds-tree-name, netbios-name-servers, netbios-dd-server, netbios-node-type, netbios-scope, ntp-servers;
# rfc4833-tz-posix-string, rfc4833-tz-name;
Meaning that, the DHCP server will always be asked to provide the client’s host name and domain name but, whether or not those strings will be applied, or not, is up to the network management being used by the client …
- As far as NetworkManager is concerned – the issue seems to be controlled in /etc/NetworkManager/NetworkManager.conf by the parameter “hostname-mode” –
If a valid static hostname is set, NetworkManager will skip the update of the hostname despite the value of this option. An hostname empty or equal to ‘localhost’, ‘localhost6’, ‘localhost.localdomain’ or ‘localhost6.localdomain’ is considered invalid.
“hostname-mode=none” seems to be the method to use if NetworkManager shall never, ever, manage the transient hostname …