diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index 465288790..7fd644768 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -271,8 +271,7 @@ no-auto-default=* Set the management mode of the hostname. This parameter will affect only the transient hostname. 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. + this option. A hostname empty or equal to '(none)' is considered invalid. default: NetworkManager will update the hostname with the one provided via DHCP or reverse DNS lookup of the diff --git a/src/core/nm-policy.c b/src/core/nm-policy.c index 170f066fd..02a9854a8 100644 --- a/src/core/nm-policy.c +++ b/src/core/nm-policy.c @@ -960,7 +960,7 @@ update_system_hostname(NMPolicy *self, const char *msg, gboolean reset_retry_int /* Try a persistent hostname first */ configured_hostname = nm_hostname_manager_get_static_hostname(priv->hostname_manager); - if (configured_hostname && nm_utils_is_specific_hostname(configured_hostname)) { + if (configured_hostname && nm_utils_is_not_empty_hostname(configured_hostname)) { _set_hostname(self, configured_hostname, "from system configuration", FALSE); priv->dhcp_hostname = FALSE; return;