1
1
#! /bin/bash
2
2
3
- version=2.0.18
3
+ version=2.0.19
4
4
5
5
# auto run grub-install if grub detected
6
6
grub_auto=1
7
7
8
8
PGM=` basename $0 `
9
9
setup_command=" $PGM -setup"
10
10
11
- rsync_options=" --force -rltWDEgoptx "
11
+ rsync_options=" --force -rltWDEHXAgoptx "
12
12
13
13
if [ ` id -u` != 0 ]
14
14
then
@@ -1377,6 +1377,7 @@ Use -U for unattended even if initializing.
1377
1377
fi
1378
1378
fi
1379
1379
done
1380
+ ext_label=" "
1380
1381
else
1381
1382
qecho " == SYNC $src_disk file systems to $dst_disk =="
1382
1383
print_sync_actions
@@ -1474,15 +1475,33 @@ do
1474
1475
qprintf " Syncing unmounted partitions:\n"
1475
1476
fi
1476
1477
sync_msg_done=1
1478
+ dst_dev=/dev/${dst_part_base}${p}
1479
+ fs_type=${src_fs_type[$p]}
1480
+ ext_label $p $fs_type " " label
1481
+ if [ " $label " != " " ]
1482
+ then
1483
+ qecho " e2label $dst_dev $label "
1484
+ e2label $dst_dev $label
1485
+ fi
1486
+
1477
1487
mount_partition ${src_device[p]} $clone_src " "
1478
- mount_partition /dev/ ${dst_part_base} $p $clone " $clone_src "
1488
+ mount_partition $dst_dev $clone " $clone_src "
1479
1489
unmount_list=" $clone_src $clone "
1480
1490
rsync_file_system " ${clone_src} /" " ${clone} " " "
1481
1491
unmount_list " $unmount_list "
1482
1492
fi
1483
1493
done
1484
1494
1485
1495
qprintf " Syncing mounted partitions:\n"
1496
+
1497
+ fs_type=${src_fs_type[$root_part_num]}
1498
+ ext_label $root_part_num $fs_type " " label
1499
+ if [ " $label " != " " ]
1500
+ then
1501
+ qecho " e2label $dst_root_dev $label "
1502
+ e2label $dst_root_dev $label
1503
+ fi
1504
+
1486
1505
mount_partition $dst_root_dev $clone " "
1487
1506
unmount_list=" $clone "
1488
1507
@@ -1501,7 +1520,17 @@ do
1501
1520
then
1502
1521
mkdir -p $dst_dir
1503
1522
fi
1504
- mount_partition /dev/${dst_part_base} $p " $dst_dir " " $unmount_list "
1523
+
1524
+ dst_dev=/dev/${dst_part_base}${p}
1525
+ fs_type=${src_fs_type[$p]}
1526
+ ext_label $p $fs_type " " label
1527
+ if [ " $label " != " " ]
1528
+ then
1529
+ qecho " e2label $dst_dev $label "
1530
+ e2label $dst_dev $label
1531
+ fi
1532
+
1533
+ mount_partition " $dst_dev " " $dst_dir " " $unmount_list "
1505
1534
rsync_file_system " ${src_mounted_dir[p]} /" " ${dst_dir} " " "
1506
1535
unmount_list=" $dst_dir $unmount_list "
1507
1536
fi
0 commit comments