From 721428a590482110326bc2301fbee36c54a385d4 Mon Sep 17 00:00:00 2001 From: Aaron Kollasch Date: Sun, 23 Oct 2022 05:59:07 -0400 Subject: [PATCH] Don't convert partuuids for nonexistent src parts --- rpi-clone | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpi-clone b/rpi-clone index b6baf53..4e22e48 100755 --- a/rpi-clone +++ b/rpi-clone @@ -957,6 +957,10 @@ then count=0 for ((p = 1; p <= n_src_parts; p++)) do + if ((!src_exists[p])) + then + continue + fi if grep -q "^/dev/${src_partition[p]}" $fstab_tmp then partuuid=$(lsblk -n -o PARTUUID /dev/${src_partition[p]})