[PC-BSD Commits] r5251 - pcbsd/trunk/pc-sysinstall/backend

svn at pcbsd.org svn at pcbsd.org
Sat Dec 5 10:22:49 PST 2009


Author: kris
Date: 2009-12-05 10:22:49 -0800 (Sat, 05 Dec 2009)
New Revision: 5251

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-bsdlabel.sh
Log:

Updated pc-sysinstall backend, improve to name swap labels properly



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-bsdlabel.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-bsdlabel.sh	2009-12-05 10:02:09 UTC (rev 5250)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-bsdlabel.sh	2009-12-05 18:22:49 UTC (rev 5251)
@@ -5,6 +5,7 @@
 gen_glabel_name()
 {
   MOUNT="$1"
+  TYPE="$2"
   NUM="0"
   MAXNUM="20"
 
@@ -13,7 +14,13 @@
   then
     NAME="rootfs"
   else
-    NAME="`echo $MOUNT | sed 's|/||g' | sed 's| ||g'`"
+    # If doing a swap partition, also rename it
+    if [ "${TYPE}" = "SWAP" ]
+    then
+      NAME="swap"
+    else
+      NAME="`echo $MOUNT | sed 's|/||g' | sed 's| ||g'`"
+    fi
   fi
 
   # Loop through and break when we find our first available label
@@ -151,7 +158,7 @@
       fi
 
       # Generate a unique label name for this mount
-      gen_glabel_name "${MNT}"
+      gen_glabel_name "${MNT}" "${FS}"
       PLABEL="${VAL}"
 
       # Save this data to our partition config dir



More information about the Commits mailing list