Skip to content

Commit 671035d

Browse files
committed
Use --follow-symlinks now
1 parent b0758a0 commit 671035d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rpi-clone

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ then
968968
cp $fstab_tmp $fstab
969969
printf "Your original fstab is backed up to $fstab_save\n"
970970

971-
cmdline_txt=$(realpath /boot/cmdline.txt)
971+
cmdline_txt=/boot/cmdline.txt
972972
cmdline_save=$cmdline_txt.${PGM}-save
973973
if [ -f $cmdline_txt ] && grep -q "$src_root_dev" $cmdline_txt
974974
then
@@ -977,7 +977,7 @@ then
977977
if [ "$partuuid" != "" ]
978978
then
979979
cp $cmdline_txt $cmdline_save
980-
sed -i "s/\/dev\/$root_part/PARTUUID=$partuuid/" $cmdline_txt
980+
sed -i --follow-symlinks "s/\/dev\/$root_part/PARTUUID=$partuuid/" $cmdline_txt
981981
printf " Editing $cmdline_txt, changing root=$src_root_dev to root=PARTUUID=$partuuid\n"
982982
printf "Your original cmdline.txt is backed up to $cmdline_save\n"
983983
fi

0 commit comments

Comments
 (0)