[PC-BSD Commits] r2962 - in pcbsd: branches/7.0/mfsroot-overlay/root trunk/mfsroot-overlay/root

svn at pcbsd.org svn at pcbsd.org
Tue Nov 11 11:43:47 PST 2008


Author: kris
Date: 2008-11-11 11:43:47 -0800 (Tue, 11 Nov 2008)
New Revision: 2962

Modified:
   pcbsd/branches/7.0/mfsroot-overlay/root/PCBSDStart.sh
   pcbsd/trunk/mfsroot-overlay/root/PCBSDStart.sh
Log:

Updated the PC-BSD install script to detect if the user is below 1GB of memory when trying to use ZFS, and stop them.



Modified: pcbsd/branches/7.0/mfsroot-overlay/root/PCBSDStart.sh
===================================================================
--- pcbsd/branches/7.0/mfsroot-overlay/root/PCBSDStart.sh	2008-11-11 17:05:42 UTC (rev 2961)
+++ pcbsd/branches/7.0/mfsroot-overlay/root/PCBSDStart.sh	2008-11-11 19:43:47 UTC (rev 2962)
@@ -65,10 +65,20 @@
 
 if [ "$bootzfs" = "YES" ]
 then
-  echo '
+  MEM=`sysctl hw.realmem | cut -d " " -f 2`
+  if [ $MEM -gt 1000000000 ]
+  then
+    echo '
 zfs_enable="YES"' >> /etc/rc.conf
-  /etc/rc.d/zfs start
-  touch /tmp/zfsEnabled
+    /etc/rc.d/zfs start
+    touch /tmp/zfsEnabled
+  else
+     echo "WARNING: ZFS was enabled, but the system does not have the required 1GB of memory!"
+     echo "Please increase the memory to 1GB or above to install with ZFS."
+     echo "You may still install normally with UFS2 or UFS2 + Journaling."
+     echo "[Press Enter to Continue]"
+     read tmp
+  fi 
 fi
 
 

Modified: pcbsd/trunk/mfsroot-overlay/root/PCBSDStart.sh
===================================================================
--- pcbsd/trunk/mfsroot-overlay/root/PCBSDStart.sh	2008-11-11 17:05:42 UTC (rev 2961)
+++ pcbsd/trunk/mfsroot-overlay/root/PCBSDStart.sh	2008-11-11 19:43:47 UTC (rev 2962)
@@ -65,10 +65,20 @@
 
 if [ "$bootzfs" = "YES" ]
 then
-  echo '
+  MEM=`sysctl hw.realmem | cut -d " " -f 2`
+  if [ $MEM -gt 1000000000 ]
+  then
+    echo '
 zfs_enable="YES"' >> /etc/rc.conf
-  /etc/rc.d/zfs start
-  touch /tmp/zfsEnabled
+    /etc/rc.d/zfs start
+    touch /tmp/zfsEnabled
+  else
+     echo "WARNING: ZFS was enabled, but the system does not have the required 1GB of memory!"
+     echo "Please increase the memory to 1GB or above to install with ZFS."
+     echo "You may still install normally with UFS2 or UFS2 + Journaling."
+     echo "[Press Enter to Continue]"
+     read tmp
+  fi 
 fi
 
 



More information about the Commits mailing list