Skip to content

Commit 5e68497

Browse files
committed
Remount missing /boot/firmware before rsync if it's not mounted
1 parent 3e924c6 commit 5e68497

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
@@ -292,6 +292,16 @@ rsync_file_system()
292292

293293
qprintf " => lsblk $(lsblk)\n"
294294

295+
if ! findmnt "$src_dir" &>/dev/null; then
296+
if ! mount "$src_dir"; then
297+
echo " Mount failure of $1 on $2."
298+
echo "Aborting!"
299+
exit 1
300+
else
301+
qecho " Remounting $1"
302+
fi
303+
fi
304+
295305
qprintf " => rsync $1 $2 $3 ..."
296306

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

0 commit comments

Comments
 (0)