Skip to content

Commit 07f2828

Browse files
committed
Remount missing /boot/firmware before rsync if it's not mounted
1 parent 882043a commit 07f2828

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rpi-clone

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,16 @@ rsync_file_system()
296296

297297
qprintf " => lsblk $(lsblk)\n"
298298

299+
if ! findmnt "$src_dir" &>/dev/null; then
300+
if ! mount "$src_dir"; then
301+
echo " Mount failure of $1 on $2."
302+
echo "Aborting!"
303+
exit 1
304+
else
305+
qecho " Remounting $1"
306+
fi
307+
fi
308+
299309
qprintf " => rsync $1 $2 $3 ..."
300310

301311
if [ "$3" == "with-root-excludes" ]

0 commit comments

Comments
 (0)