- Timestamp:
- Dec 23, 2014, 7:49:06 AM (10 years ago)
- Location:
- branches/3.2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/mindi
r3326 r3330 1366 1366 label="$uuid" 1367 1367 fi 1368 1369 # On RHEL 7 they use UUID concretely, even when not mentioned in fstab 1370 # in order to mount the root part e.g. in grub. 1371 # One way to solve this is to add the UUID now, if there wasn't one so it's 1372 # restored correctly 1373 if [ _"$label" = _"" ]; then 1374 label=`blkid $current_partition | perl -p -e 's/.* UUID="([A-z0-9-]+)" .*/$1/'` 1375 fi 1376 1368 1377 partition_format="`echo "$partition_format" | cut -d',' -f1`"; # in case user has ext3,ext2 or something dumb like that 1369 1378 [ "$partition_format" = "auto" ] && partition_format="`mount | grep -w $current_partition | $AWK '{print$5;}'`"; # in case user uses 'auto' (dumb!) -
branches/3.2/mindi/parted2fdisk.pl
r3143 r3330 152 152 "ext4" => "83", 153 153 "xfs" => "83", 154 "btrfs" => "83", 154 155 "reiserfs" => "83", 155 156 "linux-swap" => "82", -
branches/3.2/mondo/src/mondorestore/mondo-prep.c
r3301 r3330 1837 1837 || strcmp(format, "xfs") == 0 1838 1838 || strcmp(format, "jfs") == 0 1839 1839 || strcmp(format, "btrfs") == 0) { 1840 1840 mr_asprintf(partcode, "83"); 1841 1841 } else if (strcmp(format, "minix") == 0) { -
branches/3.2/mondo/src/restore-scripts/mondo/label-partitions-as-necessary
r3328 r3330 7 7 8 8 read_partition_line() { 9 local label mountpt command format 9 local label mountpt command format device d m 10 10 11 label=`echo "$1" | awk '{print $1}' | cut -d'=' -f2` 11 device=`echo "$1" | awk '{print $1}'` 12 d=`echo "$device" | cut -c1` 12 13 format=`echo "$1" | awk '{print $3}'` 14 label=`echo "$device" | cut -s -d'=' -f2` 15 if [ "$d" = "/" ] && [ "$label" = "" ]; then 16 m=`echo "$1" | awk '{print $2}'` 17 # We force UUID even if nothing in fstab as some new distro like RHEL7 rely on it 18 [ "$format" = "reiserfs" ] && opttun="-u" || opttun="-U" 19 label=`awk '{print $2,$5}' $mountlist | grep -E "^$m " | awk '{print $2}'` 20 else 21 if [ "`echo "$1" | grep -E 'LABEL='`" != "" ] ; then 22 [ "$format" = "reiserfs" ] && opttun="-l" || opttun="-L" 23 elif [ "`echo "$1" | grep -E 'UUID='`" != "" ] ; then 24 [ "$format" = "reiserfs" ] && opttun="-u" || opttun="-U" 25 else 26 LogIt "Nothing to do on $1" 27 return 28 fi 29 fi 13 30 mountpt=`awk '{print $1,$5}' $mountlist | grep " $label$" | awk '{print $1}'` 14 15 if [ "`echo "$1" | grep -E 'LABEL='`" != "" ] ; then16 [ "$format" = "reiserfs" ] && opttun="-l" || opttun="-L"17 elif [ "`echo "$1" | grep -E 'UUID='`" != "" ] ; then18 [ "$format" = "reiserfs" ] && opttun="-u" || opttun="-U"19 else20 LogIt "Nothing to do on $1"21 return22 fi23 31 24 32 if [ ! "$mountpt" ] ; then 25 33 LogIt "Not labeling anything as ($label) because ($mountpt) is not a mountpoint" 26 34 elif [ ! "$label" ] ; then 27 LogIt "Not labeling ($mountpt) as anything because ($label) is not a label "35 LogIt "Not labeling ($mountpt) as anything because ($label) is not a label/uuid" 28 36 else 29 37 if [ "$format" = "ext2" ] || [ "$format" = "ext3" ] || [ "$format" = "ext4" ]; then … … 37 45 elif [ "$format" = "reiserfs" ]; then 38 46 command="reiserfstune $opttun $label $mountpt" 47 LogIt "Running $command" 48 $command 49 elif [ "$format" = "btrfs" ]; then 50 # Also see https://btrfs.wiki.kernel.org/index.php/Project_ideas#Filesystem_UUID_change_-_off-line 51 command="btrfs filesystem label $mountpt $label" 39 52 LogIt "Running $command" 40 53 $command
Note:
See TracChangeset
for help on using the changeset viewer.