File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 10
10
# This updated code is located in a fork of Bill Wilson's git repository
11
11
# at https://github.com/geerlingguy/rpi-clone
12
12
13
- version=2.0.24
13
+ version=2.0.25
14
+
15
+ # prefix debug statements with line numbers when -x is used
16
+ declare -r PS4=' |${LINENO}> \011${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
14
17
15
18
# setup trusted paths for dependancies (like rsync, grub, fdisk, etc)
16
19
export PATH=" /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
@@ -294,6 +297,19 @@ rsync_file_system()
294
297
295
298
qprintf " => rsync $1 $2 $3 ..."
296
299
300
+ # make sure the partition is mounted
301
+ # sometimes it happens on RPi5 /boot is no longer mounted and then
302
+ # the cloned boot partition will be empty
303
+ if ! findmnt " $src_dir " & > /dev/null; then
304
+ if ! mount " $src_dir " ; then
305
+ echo " ??? Remount failure of $1 ."
306
+ echo " Aborting!"
307
+ exit 1
308
+ else
309
+ qecho " Remounting $1 "
310
+ fi
311
+ fi
312
+
297
313
if [ " $3 " == " with-root-excludes" ]
298
314
then
299
315
rsync $rsync_options --delete \
You can’t perform that action at this time.
0 commit comments