2005-02-22 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerPolicy.c
		- (nm_policy_activation_finish): Deactivate a device if its activation fails,
			and NULL out data->active_device so that we have to choose another one.
			This may make NetworkManager keep attempting to connect to a wired network
			if it fails, but if it keeps failing the wired network has more problems than
			just NetworkManager.

	* src/backends/NetworkManagerRedHat.c
		- (nm_system_update_dns): fix to actually run nscd -i hosts when nscd
			is already running

	* named/nm-named-manager.c
		- (rewrite_resolv_conf): Call nm_system_update_dns() when not using
			named so that the distro can flush whatever name service caching
			daemon it uses


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@468 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2005-02-22 21:46:32 +00:00
parent c320da0bd5
commit 5ffb71cab5
4 changed files with 33 additions and 5 deletions

View File

@@ -1,3 +1,21 @@
2005-02-22 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
- (nm_policy_activation_finish): Deactivate a device if its activation fails,
and NULL out data->active_device so that we have to choose another one.
This may make NetworkManager keep attempting to connect to a wired network
if it fails, but if it keeps failing the wired network has more problems than
just NetworkManager.
* src/backends/NetworkManagerRedHat.c
- (nm_system_update_dns): fix to actually run nscd -i hosts when nscd
is already running
* named/nm-named-manager.c
- (rewrite_resolv_conf): Call nm_system_update_dns() when not using
named so that the distro can flush whatever name service caching
daemon it uses
2005-02-21 Dan Williams <dcbw@redhat.com> 2005-02-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDHCP.[ch] * src/NetworkManagerDHCP.[ch]

View File

@@ -45,6 +45,9 @@
#define RESOLV_CONF "/etc/resolv.conf" #define RESOLV_CONF "/etc/resolv.conf"
#endif #endif
/* From NetworkManagerSystem.h/.c */
void nm_system_update_dns (void);
enum enum
{ {
PROP_0, PROP_0,
@@ -640,6 +643,7 @@ rewrite_resolv_conf (NMNamedManager *mgr, GError **error)
if (rename (tmp_resolv_conf, RESOLV_CONF) < 0) if (rename (tmp_resolv_conf, RESOLV_CONF) < 0)
goto lose; goto lose;
nm_system_update_dns ();
return TRUE; return TRUE;
lose: lose:

View File

@@ -282,6 +282,9 @@ gboolean nm_policy_activation_finish (gpointer user_data)
} }
else else
syslog (LOG_INFO, "Activation (%s) failed.", nm_device_get_iface (dev)); syslog (LOG_INFO, "Activation (%s) failed.", nm_device_get_iface (dev));
if (data->active_device == dev)
data->active_device = NULL;
nm_device_deactivate (dev, FALSE);
break; break;
case DEVICE_ACTIVATION_CANCELED: case DEVICE_ACTIVATION_CANCELED:

View File

@@ -283,12 +283,15 @@ void nm_system_kill_all_dhcp_daemons (void)
*/ */
void nm_system_update_dns (void) void nm_system_update_dns (void)
{ {
#if 0 #ifdef NM_NO_NAMED
/* This doesn't acutally seem to work very well... */ if(nm_spawn_process ("/etc/init.d/nscd status") == 0)
if(nm_spawn_process ("/etc/init.d/nscd status")) {
nm_spawn_process ("nscd -i hosts"); syslog (LOG_ERR, "Clearing nscd hosts cache.");
#endif nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
#else
nm_spawn_process ("/usr/bin/killall -q nscd"); nm_spawn_process ("/usr/bin/killall -q nscd");
#endif
} }