[PC-BSD Commits] r6204 - pcbsd/trunk/pcbsd-netmanager/src/wificonfig

svn at pcbsd.org svn at pcbsd.org
Mon Feb 8 13:31:32 PST 2010


Author: kris
Date: 2010-02-08 13:31:32 -0800 (Mon, 08 Feb 2010)
New Revision: 6204

Modified:
   pcbsd/trunk/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
Log:

Fixed a few more lagg0 device bugs



Modified: pcbsd/trunk/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
===================================================================
--- pcbsd/trunk/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2010-02-08 21:02:03 UTC (rev 6203)
+++ pcbsd/trunk/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2010-02-08 21:31:32 UTC (rev 6204)
@@ -61,11 +61,14 @@
   // If we have a valid wired device, clone the MAC of it to the wireless device
   if ( ! wiredDev.isEmpty() )
   {
-    saveValue( "/etc/rc.conf", "ifconfig_" + wiredDev, "ifconfig_" + wiredDev + "=\"up\"", -1);
+    tmp = getValue( "/etc/rc.conf", "ifconfig_" + wiredDev + "=\"up\"", 1 );
+    if ( ! tmp.isEmpty() )  {
+      saveValue( "/etc/rc.conf", "ifconfig_" + wiredDev, "ifconfig_" + wiredDev + "=\"up\"", -1);
+    }
 
     // If we are using wlan device
     if ( ! DeviceNameParent.isEmpty() ) {
-      saveValue( "/etc/rc.conf", "ifconfig_" + DeviceNameParent, "ifconfig_" + DeviceNameParent + "=\"`ifconfig " + wiredDev + " ether`\"", -1);
+      saveValue( "/etc/rc.conf", "ifconfig_" + DeviceNameParent, "ifconfig_" + DeviceNameParent + "=\"`ifconfig " + wiredDev + " ether`\"", 1);
       saveValue( "/etc/rc.conf", "ifconfig_" + DeviceNameParent, "ifconfig_" + DeviceNameParent + "=\"ether ${ifconfig_" + DeviceNameParent + "##*ether }\"", 2);
       saveValue( "/etc/rc.conf", "wlans_" + DeviceNameParent, "wlans_" + DeviceNameParent + "=\"" + DeviceName + "\"", -1);
     } else {
@@ -1108,14 +1111,13 @@
 
    // Get the ifconfig string
    tmp = getValue( "/etc/rc.conf", "ifconfig_lagg0=", 1 );
-   if ( tmp != "" && tmp.indexOf(DeviceName) != -1 ) {
+   if ( ! tmp.isEmpty() )  {
    // If the device is setup, start loading the settings
 
    if ( tmp.indexOf("OFF") != -1 ) {
 	   checkDisableWireless->setChecked(TRUE);
 	   tabMainWidget->setEnabled(FALSE);
-   } else if ( tmp.indexOf("DHCP") != -1 )
-   {
+   } else if ( tmp.indexOf("DHCP") != -1 ) {
       checkDHCP->setChecked(TRUE);
       lineNetmask->setText("255.255.255.0");
       slotCheckDHCPBox();



More information about the Commits mailing list