[PC-BSD Commits] r20213 - in pcbsd/current: overlays/desktop-overlay/etc src-qt4/pc-firstbootgui

svn at pcbsd.org svn at pcbsd.org
Tue Nov 13 09:49:45 PST 2012


Author: kris
Date: 2012-11-13 17:49:44 +0000 (Tue, 13 Nov 2012)
New Revision: 20213

Modified:
   pcbsd/current/overlays/desktop-overlay/etc/rc
   pcbsd/current/overlays/desktop-overlay/etc/rc.conf
   pcbsd/current/src-qt4/pc-firstbootgui/firstboot.cpp
Log:

Add turbo-charged fast-booting!

Now only start loopback device at boot, delay rest of networking until after 
we hit login. This brings us back to having the shortest boot currently
possible, by delaying almost all services. 

Also fix the firstboot GUI to detect for wlan0 about 30 seconds
into the process, which should ensure we have networking up by that time



Modified: pcbsd/current/overlays/desktop-overlay/etc/rc
===================================================================
--- pcbsd/current/overlays/desktop-overlay/etc/rc	2012-11-13 16:24:48 UTC (rev 20212)
+++ pcbsd/current/overlays/desktop-overlay/etc/rc	2012-11-13 17:49:44 UTC (rev 20213)
@@ -102,6 +102,9 @@
   # List of rc.d scripts we will start before login
   preLoad="/etc/rc.d/hostname /etc/rc.d/random /etc/rc.d/adjkerntz /etc/rc.d/cleanvar /etc/rc.d/hostid /etc/rc.d/ldconfig /etc/rc.d/zfs /etc/rc.d/zvol /etc/rc.d/cleartmp $fastboot_earlyrc "
 
+  # Start loopback device
+  /etc/rc.d/netif start lo0
+
   # Run the early scripts now
   for i in $preLoad
   do
@@ -109,7 +112,7 @@
   done
 
   # Start the delayed services after the login is up
-  (sleep 20; /bin/sh /etc/rc.delay "$_rc_elem_done$preLoad")&
+  (sleep 5; nice /bin/sh /etc/rc.delay "$_rc_elem_done$preLoad")&
 else
   # Performing a normal startup
 

Modified: pcbsd/current/overlays/desktop-overlay/etc/rc.conf
===================================================================
--- pcbsd/current/overlays/desktop-overlay/etc/rc.conf	2012-11-13 16:24:48 UTC (rev 20212)
+++ pcbsd/current/overlays/desktop-overlay/etc/rc.conf	2012-11-13 17:49:44 UTC (rev 20213)
@@ -101,7 +101,7 @@
 
 # Enable fast-booting
 fastboot_enable="YES"
-fastboot_earlyrc="/etc/rc.d/netif /etc/rc.d/moused /etc/rc.d/dhclient /etc/rc.d/pf /etc/rc.d/routing /etc/rc.d/devd /usr/local/etc/rc.d/pefs /usr/local/etc/rc.d/dbus /usr/local/etc/rc.d/hald /usr/local/etc/rc.d/gdm"
+fastboot_earlyrc="/etc/rc.d/moused /usr/local/etc/rc.d/pefs /usr/local/etc/rc.d/dbus /usr/local/etc/rc.d/hald /usr/local/etc/rc.d/gdm"
 
 # Enable the Warden
 warden_enable="YES"

Modified: pcbsd/current/src-qt4/pc-firstbootgui/firstboot.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-firstbootgui/firstboot.cpp	2012-11-13 16:24:48 UTC (rev 20212)
+++ pcbsd/current/src-qt4/pc-firstbootgui/firstboot.cpp	2012-11-13 17:49:44 UTC (rev 20213)
@@ -48,15 +48,6 @@
     if (index != -1)
        comboBoxTimezone->setCurrentIndex(index);
 
-    if ( system("ifconfig wlan0") == 0 ) {
-      haveWifi = true;
-      QTimer::singleShot(500,this,SLOT(slotScanNetwork()));
-      connect(pushButtonRescan, SIGNAL(clicked()), this, SLOT(slotScanNetwork()));
-      connect(listWidgetWifi, SIGNAL(itemPressed(QListWidgetItem *)), this, SLOT(slotAddNewWifi()));
-    } else {
-      haveWifi = false;
-    }
-
     // Start on the first screen
     installStackWidget->setCurrentIndex(0);
     backButton->setVisible(false);
@@ -170,6 +161,19 @@
    if ( installStackWidget->currentIndex() == 2)
      slotCheckUser();
 
+   // Check if we have a wireless device
+   if ( installStackWidget->currentIndex() == 3) {
+     if ( system("ifconfig wlan0") == 0 ) {
+       haveWifi = true;
+       QTimer::singleShot(50,this,SLOT(slotScanNetwork()));
+       connect(pushButtonRescan, SIGNAL(clicked()), this, SLOT(slotScanNetwork()));
+       connect(listWidgetWifi, SIGNAL(itemPressed(QListWidgetItem *)), this, SLOT(slotAddNewWifi()));
+     } else {
+       haveWifi = false;
+     }
+   }
+
+   // If not doing a wireless connection
    if ( installStackWidget->currentIndex() == 3 && ! haveWifi) {
       installStackWidget->setCurrentIndex(5);
       // Save the settings



More information about the Commits mailing list