[PC-BSD Commits] r461 - pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/cardDetect

svn at pcbsd.org svn at pcbsd.org
Thu Jul 12 14:09:42 PDT 2007


Author: kris
Date: 2007-07-12 22:09:42 +0100 (Thu, 12 Jul 2007)
New Revision: 461

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/cardDetect/XF86Config.default
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/cardDetect/x_config.sh
Log:

Re-implemented the auto-config script



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/cardDetect/XF86Config.default
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/cardDetect/XF86Config.default	2007-07-12 20:49:41 UTC (rev 460)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/cardDetect/XF86Config.default	2007-07-12 21:09:42 UTC (rev 461)
@@ -76,10 +76,6 @@
 	Monitor    "Monitor0"
 	DefaultDepth 16
 	SubSection "Display"
-		Depth     1
-		Modes	"640x480"
-	EndSubSection
-	SubSection "Display"
 		Depth     4
 		Modes	"1024x768"
 	EndSubSection

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/cardDetect/x_config.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/cardDetect/x_config.sh	2007-07-12 20:49:41 UTC (rev 460)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/cardDetect/x_config.sh	2007-07-12 21:09:42 UTC (rev 461)
@@ -4,15 +4,12 @@
 # Version : 0.1
 # Author  : Sergei Mozhaisky (techniX)
 # Adapted for RoFreeSBIE CD by Angelescu Ovidiu
-# Modified for PC-BSD by Kris Moore
 
 XFREE_CONF="/etc/X11/xorg.conf"
 XFREE_NEWCONF="/root/xorg.conf.new"
-XFREE_TMPCONF="/usr/local/pcbsd/scripts/cardDetect/XF86Config.default"
-XFREE_VMWARE="/usr/local/pcbsd/scripts/cardDetect/XF86Config.vmware"
+XFREE_TMPCONF="/PCBSD/xorg-gui/autoDetect/XF86Config.default"
+XFREE_VMWARE="/PCBSD/xorg-gui/autoDetect/XF86Config.vmware"
 
-mkdir -p /scripts/cardDetect
-
 if [ -f ${XFREE_CONF} ]; then
 	echo "Found config file \"${XFREE_CONF}\" - skiping autoconfiguration."
 	exit
@@ -25,13 +22,13 @@
 	cp ${XFREE_VMWARE} ${XFREE_NEWCONF}
 else
         # configuring X automatically
-	/usr/X11R6/bin/X -configure >/dev/null 2>&1
+	/usr/local/bin/X -configure >/dev/null 2>&1
 fi
 
-X_MON=`sed -n '/^Section "Monitor"$/,/^EndSection$/ p' $XFREE_NEWCONF`
-echo "$X_MON" > /scripts/cardDetect/mon
-MON_DET=`cat /scripts/cardDetect/mon | grep VendorName | awk  '{print (substr($2,2,7))}'`
-rm -f ${DIR}/cardDetect/mon
+X_MON=`/usr/bin/sed -n '/^Section "Monitor"$/,/^EndSection$/ p' $XFREE_NEWCONF`
+echo "$X_MON" > /tmp/mon
+MON_DET=`cat /tmp/mon | grep VendorName | awk  '{print (substr($2,2,7))}'`
+rm -f /tmp/mon
 if [ "$MON_DET" = "Monitor" ] ; then 
 X_MON='
 Section "Monitor"
@@ -179,17 +176,23 @@
 '
 fi
 
+X_DEV=`/usr/bin/sed -n '/^Section "Device"$/,/^EndSection$/ p' $XFREE_NEWCONF`
+
+case "${X_DEV:-NULL}" in
+    NULL)
 X_DEV='
 Section "Device"
         Identifier      "Card0"
 	Driver          "vesa"
 EndSection
 '
+;;
+esac
 
 cp $XFREE_TMPCONF $XFREE_CONF
 printf "$X_MON\n\n" >> $XFREE_CONF
 printf "$X_DEV\n\n" >> $XFREE_CONF
-touch /root/.disable
+/usr/bin/touch /root/.disable
 rm $XFREE_NEWCONF
 echo "done."
 



More information about the Commits mailing list