File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 692
692
#
693
693
src_partition_table=$( parted --script -m " /dev/$src_disk " unit s print | tr -d ' ;' )
694
694
src_fdisk_table=$( fdisk -l /dev/$src_disk | grep " ^/dev/" )
695
+ # Parted seems to force a partition rescan, which hides fs labels from
696
+ # lsblk output. Sleeping a bit to wait for that is rough, but works.
697
+ sleep 1;
695
698
696
699
tmp=$( df | grep -e " ^/dev/$src_disk " -e " ^/dev/root" -e " $src_root_dev " \
697
700
| tr -s " " )
@@ -1138,6 +1141,10 @@ then
1138
1141
fi
1139
1142
1140
1143
dst_partition_table=$( parted --script -m " /dev/$dst_disk " unit s print | tr -d ' ;' )
1144
+ # Parted seems to force a partition rescan, which hides fs labels from
1145
+ # lsblk output. Sleeping a bit to wait for that is rough, but works.
1146
+ sleep 1;
1147
+
1141
1148
n_dst_parts=$( echo " $dst_partition_table " | tail -n 1 | cut -d " :" -f 1)
1142
1149
if [ " $n_dst_parts " == " /dev/$dst_disk " ]
1143
1150
then
You can’t perform that action at this time.
0 commit comments