File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- version=2.0.5
3
+ version=2.0.6
4
+
5
+ # auto run grub-install if grub detected
6
+ grub_auto=1
4
7
5
8
PGM=` basename $0 `
6
9
setup_command=" $PGM -setup"
778
781
if grep -q " ^/dev/${src_partition[p]} " $fstab_tmp
779
782
then
780
783
partuuid=$( lsblk -n -o PARTUUID /dev/${src_partition[p]} )
781
- sed -i " s/\/dev\/${src_partition[p]} /$partuuid /" $fstab_tmp
784
+ sed -i " s/\/dev\/${src_partition[p]} /PARTUUID= $partuuid /" $fstab_tmp
782
785
printf " Editing $fstab , changing /dev/${src_partition[p]} to $partuuid \n"
783
786
(( ++ count))
784
787
fi
@@ -1341,7 +1344,7 @@ else
1341
1344
printf " \nAborting!\n"
1342
1345
if (( ! space_ok))
1343
1346
then
1344
- printf " Use -F to override used > space fail.\n"
1347
+ printf " Use -F to override used > space fail or -m to select mounts to clone .\n"
1345
1348
fi
1346
1349
if (( ! all_sync_mount_ok))
1347
1350
then
@@ -1475,6 +1478,11 @@ then
1475
1478
dst_root_vol_name=" no label"
1476
1479
fi
1477
1480
1481
+ if [ -d /boot/grub ] && (( grub_auto))
1482
+ then
1483
+ echo " grub-install --root-directory=$clone /dev/$dst_disk "
1484
+ grub-install --root-directory=$clone /dev/$dst_disk
1485
+ fi
1478
1486
1479
1487
if [ " $setup_args " != " " ]
1480
1488
then
You can’t perform that action at this time.
0 commit comments