[PC-BSD Commits] r14829 - pcbsd/current/mfsroot-overlay/root

svn at pcbsd.org svn at pcbsd.org
Fri Jan 13 08:51:54 PST 2012


Author: kris
Date: 2012-01-13 16:51:54 +0000 (Fri, 13 Jan 2012)
New Revision: 14829

Added:
   pcbsd/current/mfsroot-overlay/root/functions.sh
Modified:
   pcbsd/current/mfsroot-overlay/root/PCBSDStart.sh
   pcbsd/current/mfsroot-overlay/root/PCBSDStartLive.sh
Log:

Move the xorg detection routine for install / media into a single functions file



Modified: pcbsd/current/mfsroot-overlay/root/PCBSDStart.sh
===================================================================
--- pcbsd/current/mfsroot-overlay/root/PCBSDStart.sh	2012-01-13 16:50:36 UTC (rev 14828)
+++ pcbsd/current/mfsroot-overlay/root/PCBSDStart.sh	2012-01-13 16:51:54 UTC (rev 14829)
@@ -38,6 +38,9 @@
   exit 0
 fi
 
+# Source our functions
+. /root/functions.sh
+
 # Check if we have an auto-install directive
 if [ -e "/tmp/pc-autoinstall.conf" ]
 then
@@ -67,45 +70,12 @@
   exit
 fi
 
+# Now run the X auto-detection
+detect_x
 
-# Check for VESA support
-xvesa="NO"
-v=`/bin/kenv xvesa`
-if [ $? -eq 0 ]; then xvesa="$v" ; fi
-if [ "$xvesa" = "YES" -o "$xvesa" = "yes" ] ; then
-  cp /root/cardDetect/XF86Config.compat /etc/X11/xorg.conf
-  /root/cardDetect/setuptouch.sh /etc/X11/xorg.conf
- 
-  # Notify that we are using vesa
-  echo "Running in vesa mode..."
-  sleep 2
-fi
+# Now start xorg
+start_xorg
 
-startx 2>/tmp/xstartup.log
-if [ ! -e "/tmp/.xstarted" ]
-then
-  # Failed to start X with detected driver. Now try VESA mode.
-  echo "ERROR: Failed to start GUI Installer with detected driver... Trying VESA mode..."
-  cp /root/cardDetect/XF86Config.compat /etc/X11/xorg.conf
-  /root/cardDetect/setuptouch.sh /etc/X11/xorg.conf
-  startx 2>/tmp/xstartup2.log
-  if [ ! -e "/tmp/.xstarted" ]
-  then
-    # Try the Intel driver, since nvidia/vesa will fail on optimus cards
-    cp /root/cardDetect/XF86Config.intel /etc/X11/xorg.conf
-    /root/cardDetect/setuptouch.sh /etc/X11/xorg.conf
-    startx 2>/tmp/xstartup2.log
-    if [ ! -e "/tmp/.xstarted" ]
-    then
-      echo "ERROR: Failed to start GUI Installer..." 
-      echo "Please check your settings in the /etc/X11/xorg.conf file" 
-      echo "[Press Enter to Continue]"
-      read tmp
-      /root/PCBSDtext.sh
-    fi
-  fi
-fi
-
 # Check if we had a successful SysInstaller exit
 if [ -e "/root/.exitStatus" ] ; then
   STATUS="`cat /root/.exitStatus`"

Modified: pcbsd/current/mfsroot-overlay/root/PCBSDStartLive.sh
===================================================================
--- pcbsd/current/mfsroot-overlay/root/PCBSDStartLive.sh	2012-01-13 16:50:36 UTC (rev 14828)
+++ pcbsd/current/mfsroot-overlay/root/PCBSDStartLive.sh	2012-01-13 16:51:54 UTC (rev 14829)
@@ -3,6 +3,9 @@
 
 clear
 
+# Source our functions
+. /root/functions.sh
+
 # Move our /root directory to the ramdisk
 mv /root /liveroot/root
 ln -s /liveroot/root /root
@@ -68,61 +71,11 @@
 
 
 # Now run the X auto-detection
-echo "Detecting X Setup..."
-sleep 5
-HOME="/root" ; export HOME
-X -configure >/dev/null 2>&1
-# Copy over the new xorg.conf
-cp /root/xorg.conf.new /etc/X11/xorg.conf
-/root/cardDetect/setuptouch.sh /etc/X11/xorg.conf
+detect_x
 
-# Check for VESA support
-xvesa="NO"
-v=`/bin/kenv xvesa`
-if [ $? -eq 0 ]; then
-        xvesa=$v
-fi
+# Now start xorg
+start_xorg
 
-if [ "$xvesa" = "YES" ]
-then
-  cp /root/cardDetect/XF86Config.compat /etc/X11/xorg.conf
-  /root/cardDetect/setuptouch.sh /etc/X11/xorg.conf
-fi
-
-# Run X Now
-startx
-if [ ! -e "/tmp/.xstarted" ]
-then
-  # Failed to start X with detected driver. Now try our detection mode.
-  echo "ERROR: Failed to start X with detected driver... Trying SAFE mode..."
-  rm /etc/X11/xorg.conf
-  /root/cardDetect/x_config.sh
-  startx
-  if [ ! -e "/tmp/.xstarted" ]
-  then
-    echo "ERROR: Failed to start X in SAFE mode... Trying VESA mode..."
-    rm /etc/X11/xorg.conf
-    cp /root/cardDetect/XF86Config.compat /etc/X11/xorg.conf
-    /root/cardDetect/setuptouch.sh /etc/X11/xorg.conf
-    startx
-    if [ ! -e "/tmp/.xstarted" ]
-    then
-      # Try the Intel driver, since nvidia/vesa will fail on optimus cards
-      cp /root/cardDetect/XF86Config.intel /etc/X11/xorg.conf
-      /root/cardDetect/setuptouch.sh /etc/X11/xorg.conf
-      startx
-      if [ ! -e "/tmp/.xstarted" ]
-      then
-        echo "ERROR: Failed to start X..."
-        echo "Dropping to failsafe console... Edit /etc/X11/xorg.conf, and run #startx to bring up the GUI."
-        echo "[Press Enter to Continue]"
-        read tmp
-        /bin/sh
-      fi
-    fi
-  fi
-fi
-
 # Reboot since we are finished
 echo "Live mode finished! Enter 'exit' to reboot."
 /bin/sh

Index: pcbsd/current/mfsroot-overlay/root/functions.sh
===================================================================
--- pcbsd/current/mfsroot-overlay/root/functions.sh	2012-01-13 16:50:36 UTC (rev 14828)
+++ pcbsd/current/mfsroot-overlay/root/functions.sh	2012-01-13 16:51:54 UTC (rev 14829)

Property changes on: pcbsd/current/mfsroot-overlay/root/functions.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*


More information about the Commits mailing list