2008-03-09 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c - (dhclient_run): send interface-specific config files to dhclient git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3401 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2008-03-09 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/dhcp-manager/nm-dhcp-manager.c
|
||||||
|
- (dhclient_run): send interface-specific config files to dhclient
|
||||||
|
|
||||||
2008-03-07 Dan Williams <dcbw@redhat.com>
|
2008-03-07 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* system-settings/plugins/ifcfg-fedora/parser.c
|
* system-settings/plugins/ifcfg-fedora/parser.c
|
||||||
|
@@ -601,6 +601,7 @@ dhclient_run (NMDHCPDevice *device)
|
|||||||
GError * error = NULL;
|
GError * error = NULL;
|
||||||
char * pidfile = NULL;
|
char * pidfile = NULL;
|
||||||
char * leasefile = NULL;
|
char * leasefile = NULL;
|
||||||
|
char * conffile = NULL;
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
char * pid_contents = NULL;
|
char * pid_contents = NULL;
|
||||||
|
|
||||||
@@ -629,6 +630,12 @@ dhclient_run (NMDHCPDevice *device)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
conffile = g_strdup_printf (SYSCONFDIR "/dhclient-%s.conf", device->iface);
|
||||||
|
if (!conffile) {
|
||||||
|
nm_warning ("%s: not enough memory for dhclient options.", device->iface);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/* Kill any existing dhclient bound to this interface */
|
/* Kill any existing dhclient bound to this interface */
|
||||||
if (g_file_get_contents (pidfile, &pid_contents, NULL, NULL)) {
|
if (g_file_get_contents (pidfile, &pid_contents, NULL, NULL)) {
|
||||||
unsigned long int tmp = strtoul (pid_contents, NULL, 10);
|
unsigned long int tmp = strtoul (pid_contents, NULL, 10);
|
||||||
@@ -643,11 +650,6 @@ dhclient_run (NMDHCPDevice *device)
|
|||||||
|
|
||||||
g_ptr_array_add (dhclient_argv, (gpointer) "-d");
|
g_ptr_array_add (dhclient_argv, (gpointer) "-d");
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Disable until we figure out what is really needed here */
|
|
||||||
g_ptr_array_add (dhclient_argv, (gpointer) "-x");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_ptr_array_add (dhclient_argv, (gpointer) "-sf"); /* Set script file */
|
g_ptr_array_add (dhclient_argv, (gpointer) "-sf"); /* Set script file */
|
||||||
g_ptr_array_add (dhclient_argv, (gpointer) ACTION_SCRIPT_PATH );
|
g_ptr_array_add (dhclient_argv, (gpointer) ACTION_SCRIPT_PATH );
|
||||||
|
|
||||||
@@ -657,6 +659,9 @@ dhclient_run (NMDHCPDevice *device)
|
|||||||
g_ptr_array_add (dhclient_argv, (gpointer) "-lf"); /* Set lease file */
|
g_ptr_array_add (dhclient_argv, (gpointer) "-lf"); /* Set lease file */
|
||||||
g_ptr_array_add (dhclient_argv, (gpointer) leasefile);
|
g_ptr_array_add (dhclient_argv, (gpointer) leasefile);
|
||||||
|
|
||||||
|
g_ptr_array_add (dhclient_argv, (gpointer) "-cf"); /* Set interface config file */
|
||||||
|
g_ptr_array_add (dhclient_argv, (gpointer) conffile);
|
||||||
|
|
||||||
g_ptr_array_add (dhclient_argv, (gpointer) device->iface);
|
g_ptr_array_add (dhclient_argv, (gpointer) device->iface);
|
||||||
g_ptr_array_add (dhclient_argv, NULL);
|
g_ptr_array_add (dhclient_argv, NULL);
|
||||||
|
|
||||||
@@ -677,6 +682,7 @@ dhclient_run (NMDHCPDevice *device)
|
|||||||
|
|
||||||
out:
|
out:
|
||||||
g_free (pid_contents);
|
g_free (pid_contents);
|
||||||
|
g_free (conffile);
|
||||||
g_free (leasefile);
|
g_free (leasefile);
|
||||||
g_free (pidfile);
|
g_free (pidfile);
|
||||||
g_ptr_array_free (dhclient_argv, TRUE);
|
g_ptr_array_free (dhclient_argv, TRUE);
|
||||||
|
Reference in New Issue
Block a user