[PC-BSD Commits] r4575 - pcbsd/trunk/mfsroot-overlay/etc

svn at pcbsd.org svn at pcbsd.org
Thu Oct 1 08:43:13 PDT 2009


Author: kris
Date: 2009-10-01 08:43:11 -0700 (Thu, 01 Oct 2009)
New Revision: 4575

Modified:
   pcbsd/trunk/mfsroot-overlay/etc/pcbsd-rc.sh
Log:

Added extra check during our bootup, to see if we have any late-comers such as USB cd devices, etc. 



Modified: pcbsd/trunk/mfsroot-overlay/etc/pcbsd-rc.sh
===================================================================
--- pcbsd/trunk/mfsroot-overlay/etc/pcbsd-rc.sh	2009-10-01 15:28:33 UTC (rev 4574)
+++ pcbsd/trunk/mfsroot-overlay/etc/pcbsd-rc.sh	2009-10-01 15:43:11 UTC (rev 4575)
@@ -88,8 +88,40 @@
 
 fi
 
+
+# If we get here with no device, give it one last shot, with our fail-safe list
+# This is to correct some issues with devices that show up late, such as external
+# USB CD/DVD devices
 if [ "$FOUND" = "0" ]
 then
+
+CDDEVS="/dev/cd0 /dev/cd1 /dev/cd2 /dev/cd3 /dev/acd0 /dev/acd1 /dev/acd2 /dev/acd3"
+
+for i in $CDDEVS
+do
+  # Find the CD Device
+  echo "Checking for install image on: ${i}"
+  /sbin/mount_cd9660 $i /cdmnt >/dev/null 2>/dev/null
+  if [ "$?" = "0" ]
+  then
+    if [ -e "/cdmnt/uzip/usr.uzip" ]
+    then
+      FOUND=1
+      CDDEV="$i"
+      break
+    else
+      /sbin/umount /cdmnt >/dev/null 2>/dev/null
+    fi
+  else
+    echo "Unable to mount: ${i}"
+  fi
+done
+
+fi
+
+
+if [ "$FOUND" = "0" ]
+then
    cd /dev
    echo "Error mounting install image!!!"
    echo "Please report this problem to PC-BSD support!"



More information about the Commits mailing list