[PC-BSD Commits] r4605 - pcbsd/trunk/SysInstaller/phases

svn at pcbsd.org svn at pcbsd.org
Wed Oct 7 13:00:35 PDT 2009


Author: kris
Date: 2009-10-07 13:00:35 -0700 (Wed, 07 Oct 2009)
New Revision: 4605

Modified:
   pcbsd/trunk/SysInstaller/phases/anteinstall.cpp
Log:

Added NIC detection to the installer from backend



Modified: pcbsd/trunk/SysInstaller/phases/anteinstall.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/phases/anteinstall.cpp	2009-10-07 19:49:49 UTC (rev 4604)
+++ pcbsd/trunk/SysInstaller/phases/anteinstall.cpp	2009-10-07 20:00:35 UTC (rev 4605)
@@ -107,7 +107,7 @@
 
     QString laycode, line, laydesc;
 
-    // Create process to load the languages from the backend
+    // Create process to load the layouts from the backend
     QProcess getLayoutProc;
     QString prog = PCSYSINSTALL;
     QStringList args;
@@ -146,7 +146,30 @@
 
 void AnteInstall::detectNetworkDevices()
 {
-    //detected network devices and append to comboNetworkDevices
+    //detected network devices and append to comboNetworkDevice
+    QStringList nics;
+    QString line;
+
+    // Create process to load the nics from the backend
+    QProcess getNicProc;
+    QString prog = PCSYSINSTALL;
+    QStringList args;
+    args << "detect-nics";
+    getNicProc.setReadChannel(QProcess::StandardOutput);
+    getNicProc.start(prog, args);
+
+    // Wait for the process to finish
+    if ( getNicProc.waitForFinished() )
+    {
+     // load keyboards in "keyboards" stringlist
+      while (getNicProc.canReadLine()) {
+        line = getNicProc.readLine();
+        nics.append(line.simplified());
+      }
+    }
+    
+    comboNetworkDevice->addItems(nics);
+    
 }
 
 void AnteInstall::detectHardDrives()



More information about the Commits mailing list