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

svn at pcbsd.org svn at pcbsd.org
Thu Sep 4 08:36:19 PDT 2008


Author: kris
Date: 2008-09-04 08:36:18 -0700 (Thu, 04 Sep 2008)
New Revision: 2696

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FindUpdateParts.sh
Log:

Updated the partition locator for Upgrades a bit more to only show workable upgrade systems



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FindUpdateParts.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FindUpdateParts.sh	2008-09-04 15:15:45 UTC (rev 2695)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FindUpdateParts.sh	2008-09-04 15:36:18 UTC (rev 2696)
@@ -35,17 +35,25 @@
 
       # Create Script
       echo "#!/bin/sh
-      /usr/local/bin/PBReg get /PC-BSD/Version >/.pcver 2>/.pcver " >${FSMNT}/getver.sh
+      /usr/local/bin/PBReg get /PC-BSD/Version >/.pcver 2>/.pcver
+      file /bin/sh >/.fbver 2>/.fbver" >${FSMNT}/getver.sh
       chmod 755 ${FSMNT}/getver.sh
       chroot ${FSMNT} /getver.sh
       VER="`cat ${FSMNT}/.pcver`"
+      FBVER="`cat ${FSMNT}/.fbver`"
        
       # Remove old files
       rm ${FSMNT}/.pcver
+      rm ${FSMNT}/.fbver
       rm ${FSMNT}/getver.sh
 
-      # Echo our saved info
-      echo "${i}a: Running PC-BSD ${VER}" >> /tmp/AvailUpgrades
+      # Check if this is running FreeBSD 7, otherwise don't upgrade it
+      echo ${FBVER} | grep "FreeBSD 7" >/dev/null 2>/dev/null
+      if [ "$?" = "0" ]
+      then
+        # Echo our found partition / version
+        echo "${i}a: Running PC-BSD ${VER}" >> /tmp/AvailUpgrades
+      fi
 
     fi # End of if /mnt/PCBSD
 



More information about the Commits mailing list