[PC-BSD Commits] r598 - pcbsd/trunk/NetworkManager

svn at pcbsd.org svn at pcbsd.org
Tue Aug 14 09:47:26 PDT 2007


Author: kris
Date: 2007-08-14 09:47:26 -0700 (Tue, 14 Aug 2007)
New Revision: 598

Modified:
   pcbsd/trunk/NetworkManager/networkman.ui.h
Log:

Fixes to the PPPoE backend for the network manager



Modified: pcbsd/trunk/NetworkManager/networkman.ui.h
===================================================================
--- pcbsd/trunk/NetworkManager/networkman.ui.h	2007-08-14 15:43:03 UTC (rev 597)
+++ pcbsd/trunk/NetworkManager/networkman.ui.h	2007-08-14 16:47:26 UTC (rev 598)
@@ -32,7 +32,7 @@
     connect(listNetDev, SIGNAL(selectionChanged()), this, SLOT(DevSelectionChanged()) );
     connect(pushConfigure, SIGNAL(clicked()), this, SLOT(PropertiesSlot()) );
     connect(checkSysTray, SIGNAL(clicked()), this, SLOT(slotSysTray()) );
-       
+    connect(checkPPPOE, SIGNAL(clicked()), this, SLOT(slotCheckGlobalText( "")) );    
     connect(listNetDev, SIGNAL(doubleClicked( QListBoxItem *) ), this, SLOT(slotDoubleClick(QListBoxItem *) ) );
          
     // Connect the slots to determine if we need to enable the apply button
@@ -646,7 +646,11 @@
 	runCommand("route add default " + lineGateway->text() );
      }
    //runCommand("/etc/rc.d/routing restart &");
-   runCommand("/etc/rc.d/ppp restart &");
+   if ( checkPPPOE->isChecked() ) {
+      runCommand("/etc/rc.d/ppp restart &");
+   } else {
+      runCommand("/etc/rc.d/ppp stop &");
+   }
 
 }
 
@@ -1031,7 +1035,7 @@
 		saveValue( "/etc/rc.conf", "ppp_nat", "ppp_nat=\"NO\"", -1);
 	}
 	
-	saveValue( "/etc/rc.conf", "ppp_profile", "ppp_profile=\"internet\"", -1);
+	saveValue( "/etc/rc.conf", "ppp_profile", "ppp_profile=\"" + linePPPService->text() + "\"", -1);
 }
 
 
@@ -1043,18 +1047,10 @@
      QFile filein( "/etc/ppp/ppp.conf" );
      QFile fileout( "/etc/ppp/ppp.conf" );
      QString SavedFile;
-     QString ProfileName = "internet";
-     QString ServiceName = "";
-     ServiceName = linePPPService->text();
-     
-     // See if we have the optional service name
-     if  (! ServiceName.isEmpty() )
-     {
-	 ServiceName = ":" + ServiceName;
-     }
+     QString ProfileName = linePPPService->text();
 
 
-	SavedFile = "default:\n set timeout 180\n enable dns\n\ninternet:\n  set device PPPoE:" + DeviceName + ServiceName + "\n  set authname " + linePPPUsername->text() + "\n  set authkey " + linePPPPassword->text() + "\n  set ifaddr 0 0\n  add default HISADDR";
+     SavedFile = "default:\n set timeout 180\n enable dns\n\n" + ProfileName + ":\n  set device PPPoE:" + DeviceName + ":" + ProfileName + "\n  set authname " + linePPPUsername->text() + "\n  set authkey " + linePPPPassword->text() + "\n  set dial\n  set login\n  set ifaddr 0 0\n  add default HISADDR";
 
     if ( fileout.open( IO_WriteOnly ) ) {
         QTextStream streamout( &fileout );



More information about the Commits mailing list