[Rear-users] SF.net SVN: rear:[706] trunk/usr/share/rear/layout

jhoekx at users.sourceforge.net jhoekx at users.sourceforge.net
Thu Sep 1 13:38:18 CEST 2011


Revision: 706
          http://rear.svn.sourceforge.net/rear/?rev=706&view=rev
Author:   jhoekx
Date:     2011-09-01 11:38:17 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
layout: improve handling of GPT partitions
- support newly added (legacy_boot) or undocumented (bios_grub) flags
- explicitly name a GPT partition
- handle the case of unnamed GPT partitions

Modified Paths:
--------------
    trunk/usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh
    trunk/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh

Modified: trunk/usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh
===================================================================
--- trunk/usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh	2011-08-31 14:11:21 UTC (rev 705)
+++ trunk/usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh	2011-09-01 11:38:17 UTC (rev 706)
@@ -113,6 +113,11 @@
             fi
             echo "parted -s $disk set $number $flag on >&2" >> $LAYOUT_CODE
         done
+
+        # Explicitly name GPT partitions
+        if [[ "$label" = "gpt" ]] && [[ "$parttype" != "rear-noname" ]] ; then
+            echo "parted -s $disk name $number \"$parttype\"" >> $LAYOUT_CODE
+        fi
     done < <(grep "^part $disk" $LAYOUT_FILE)
 
 cat >> $LAYOUT_CODE <<EOF

Modified: trunk/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh
===================================================================
--- trunk/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh	2011-08-31 14:11:21 UTC (rev 705)
+++ trunk/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh	2011-09-01 11:38:17 UTC (rev 706)
@@ -78,6 +78,10 @@
                 ptype=$(get_columns "$line" "$typefield" | tr -d " " | tr -d ";")
                 pflags=$(get_columns "$line" "flags" | tr -d "," |tr -d ";")
 
+                if [ -z "$ptype" ] ; then
+                    ptype="rear-noname"
+                fi
+
                 case $device in
                     *cciss*)
                         pname="p${pnumber}"
@@ -98,7 +102,7 @@
                 flags=""
                 for flag in $pflags ; do
                     case $flag in
-                        boot|root|swap|hidden|raid|lvm|lba|palo)
+                        boot|root|swap|hidden|raid|lvm|lba|palo|legacy_boot|bios_grub)
                             flags="$flags$flag,"
                             ;;
                     esac

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rear-users mailing list