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

svn at pcbsd.org svn at pcbsd.org
Wed Jun 18 09:13:54 PDT 2008


Author: kris
Date: 2008-06-18 09:13:52 -0700 (Wed, 18 Jun 2008)
New Revision: 2119

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

Updated rc script to caculate ramdisk size on the fly



Modified: pcbsd/trunk/mfsroot-overlay/etc/rc
===================================================================
--- pcbsd/trunk/mfsroot-overlay/etc/rc	2008-06-18 15:59:58 UTC (rev 2118)
+++ pcbsd/trunk/mfsroot-overlay/etc/rc	2008-06-18 16:13:52 UTC (rev 2119)
@@ -81,7 +81,10 @@
 
 # Setup the /uzip memory device
 echo "Mounting /uzip"
-/sbin/mdmfs -S -s 145M -O space md2 /uzip
+MDSIZE="`/usr/bin/du -m /mnt/uzip/usr.uzip | /usr/bin/cut -f 1`"
+MDSIZE="`/bin/expr ${MDSIZE} + 2`"
+echo "Creating ${MDSIZE}MB ramdisk..."
+/sbin/mdmfs -S -s ${MDSIZE}M -O space md2 /uzip
 
 echo "Copying setup image into memory... Please Wait..."
 /bin/cp /mnt/uzip/usr.uzip /uzip/



More information about the Commits mailing list