diff options
Diffstat (limited to 'network/NetworkManager/patches/policy-don-t-update-hostname-on-exit.patch')
-rw-r--r-- | network/NetworkManager/patches/policy-don-t-update-hostname-on-exit.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/network/NetworkManager/patches/policy-don-t-update-hostname-on-exit.patch b/network/NetworkManager/patches/policy-don-t-update-hostname-on-exit.patch new file mode 100644 index 0000000000..720651619d --- /dev/null +++ b/network/NetworkManager/patches/policy-don-t-update-hostname-on-exit.patch @@ -0,0 +1,42 @@ +From 2ce6f29c2151af3f34976feda6964a21431cdb5f Mon Sep 17 00:00:00 2001 +From: Dan Williams <dcbw@redhat.com> +Date: Sun, 2 Jan 2011 10:24:23 -0600 +Subject: [PATCH 7/8] policy: don't update hostname on exit + +It's a leftover from when /etc/hosts got fixed up, and since that +isn't being done anymore, there's no reason to touch the hostname +on exit. It will already have been updated in response to device +deactivation (if the hostname was DHCP-provided for example) so +it shouldn't need to be touched on exit. + +This also removes a potential crash on shutdown when systemd or +another startup manager kills D-Bus before NetworkManager, which +made the dispatcher code angry (which got executed on hostname +change). +--- + src/nm-policy.c | 9 --------- + 1 files changed, 0 insertions(+), 9 deletions(-) + +diff --git a/src/nm-policy.c b/src/nm-policy.c +index 709be09..aed2f89 100644 +--- a/src/nm-policy.c ++++ b/src/nm-policy.c +@@ -1195,15 +1195,6 @@ nm_policy_destroy (NMPolicy *policy) + } + g_slist_free (policy->dev_signal_ids); + +- /* Rewrite /etc/hosts on exit to ensure we don't leave stale IP addresses +- * lying around. FIXME: this will take out a valid IP address of an +- * ethernet device we're leaving active (ie, a connection we can "assume" +- * when NM starts again). +- */ +- policy->default_device4 = NULL; +- policy->default_device6 = NULL; +- update_system_hostname (policy, NULL, NULL); +- + g_free (policy->orig_hostname); + g_free (policy->cur_hostname); + +-- +1.7.3.4 + |