Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=fw-control-center.git;a=commitdiff;h=2dc29774179ea65d1894c0b8e05543a8af55808d
commit 2dc29774179ea65d1894c0b8e05543a8af55808d
Author: Priyank <[EMAIL PROTECTED]>
Date: Sun Nov 18 13:25:34 2007 +0530
gnetconfig: cb_gn_save_interface_clicked(): when saving a profile, make sure
dhcp_opts is not set if dhcp_client is dhclient.
diff --git a/gnetconfig/src/gnetconfig-interface.c
b/gnetconfig/src/gnetconfig-interface.c
index 6e6ff9e..227b8b2 100644
--- a/gnetconfig/src/gnetconfig-interface.c
+++ b/gnetconfig/src/gnetconfig-interface.c
@@ -1382,12 +1382,6 @@ cb_gn_save_interface_clicked (GtkButton *button,
gpointer data)
case GN_DHCP:
{
char *dhcp_hname = NULL;
-
- dhcp_hname = (char*)gtk_entry_get_text
(GTK_ENTRY(gn_dhcp_hostname_entry));
- if (strlen(dhcp_hname))
- snprintf (interface->dhcp_opts, PATH_MAX, "-t
10 -h %s\n", dhcp_hname);
- else
- snprintf (interface->dhcp_opts, PATH_MAX, "-t
10\n");
if (interface->options == NULL)
{
@@ -1401,9 +1395,18 @@ cb_gn_save_interface_clicked (GtkButton *button,
gpointer data)
{
case GN_DHCPCD:
snprintf (interface->dhcpclient, PATH_MAX, "dhcpcd");
+ dhcp_hname = (char*)gtk_entry_get_text
(GTK_ENTRY(gn_dhcp_hostname_entry));
+ if (strlen(dhcp_hname))
+ snprintf (interface->dhcp_opts,
PATH_MAX, "-t 10 -h %s\n", dhcp_hname);
+ else
+ snprintf (interface->dhcp_opts,
PATH_MAX, "-t 10\n");
break;
case GN_DHCLIENT:
snprintf (interface->dhcpclient, PATH_MAX, "dhclient");
+ /* interface_opts is only valid when
the dhcp client
+ * is dhcpcd. So, if we use dhclient,
dhcp_opts
+ * should be blank */
+ *interface->dhcp_opts = '\0';
break;
default:
*interface->dhcpclient = '\0';
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git