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

* dhcpcd/client.c
		- #rh147661# Don't send kernel version in DHCP requests

	* src/NetworkManagerSystem.h
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
		- Remove the nm_system_device_run_dhcp() and nm_system_device_stop_dhcp()
			functions, they are no longer used anyway

	* src/backends/NetworkManagerRedHat.c
		- (nm_system_device_flush_addresses): only flush "scope global" and "scope site"
			addresses in an attempt to keep IPv6 local-scope addresses around


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@428 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2005-02-10 16:14:19 +00:00
parent d00e99815f
commit 02bcf5aa14
7 changed files with 24 additions and 297 deletions

View File

@@ -41,76 +41,6 @@ void nm_system_init (void)
{
}
/*
* nm_system_device_run_dhcp
*
* Run the dhcp daemon for a particular interface.
*
* Returns: TRUE on success
* FALSE on dhcp error
*
*/
gboolean nm_system_device_run_dhcp (NMDevice *dev)
{
char buf [500];
int err;
g_return_val_if_fail (dev != NULL, FALSE);
/* Fake it for a test device */
if (nm_device_is_test_device (dev))
{
g_usleep (2000);
return (TRUE);
}
snprintf (buf, 500, "/sbin/dhcpcd %s", nm_device_get_iface(dev));
err = nm_spawn_process (buf);
return (err == 0);
}
/*
* nm_system_device_stop_dhcp
*
* Kill any dhcp daemon that happens to be around. We may be changing
* interfaces and we're going to bring the previous one down, so there's
* no sense in keeping the dhcp daemon running on the old interface.
*
*/
void nm_system_device_stop_dhcp (NMDevice *dev)
{
FILE *pidfile;
char buf [500];
g_return_if_fail (dev != NULL);
/* Not really applicable for test devices */
if (nm_device_is_test_device (dev))
return;
/* Find and kill the previous dhclient process for this device */
snprintf (buf, 500, "/etc/dhcpc/dhcpcd-%s.pid", nm_device_get_iface (dev));
pidfile = fopen (buf, "r");
if (pidfile)
{
int len;
unsigned char s_pid[20];
pid_t n_pid = -1;
memset (s_pid, 0, 20);
fgets (s_pid, 20, pidfile);
len = strlen (s_pid);
fclose (pidfile);
n_pid = atoi (s_pid);
if (n_pid > 0)
kill (n_pid, SIGTERM);
}
}
/*
* nm_system_device_flush_routes
*