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

svn at pcbsd.org svn at pcbsd.org
Thu Jul 10 08:10:14 PDT 2008


Author: kris
Date: 2008-07-10 08:10:14 -0700 (Thu, 10 Jul 2008)
New Revision: 2308

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

Added support to rc for loading install image from USB as well as CD/DVD



Modified: pcbsd/trunk/mfsroot-overlay/etc/rc
===================================================================
--- pcbsd/trunk/mfsroot-overlay/etc/rc	2008-07-10 15:05:02 UTC (rev 2307)
+++ pcbsd/trunk/mfsroot-overlay/etc/rc	2008-07-10 15:10:14 UTC (rev 2308)
@@ -73,12 +73,45 @@
   fi
 done
 
+
+
+# No install image on CD was found, lets check for USB now
 if [ "$FOUND" = "0" ]
 then
-   echo "Error mounting CD!"
+
+CDDEVS="/dev/da0s1
+/dev/da1s1
+/dev/da2s1
+/dev/da3s1
+/dev/da4s1
+/dev/da5s1" 
+
+for i in $CDDEVS
+do
+  # Find the CD Device
+  /sbin/mount_msdosfs $i /mnt >/dev/null 2>/dev/null
+  if [ -e "/mnt/uzip/usr.uzip" ]
+  then
+   FOUND=1 
+   CDDEV="$i"
+   break
+  else
+   /sbin/umount /mnt >/dev/null 2>/dev/null
+  fi
+done
+
 fi
 
+if [ "$FOUND" = "0" ]
+then
+   echo "Error mounting install image!!!"
+   echo "Please report this problem to PC-BSD support!"
+   echo "Press ENTER to reboot"
+   read tmp
+   /sbin/reboot
+fi
 
+
 # Setup the /uzip memory device
 echo "Mounting /uzip"
 MDSIZE="`/bin/du -m /mnt/uzip/usr.uzip | /bin/cut -f 1`"



More information about the Commits mailing list