diff options
-rw-r--r-- | lib/beam/s3.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/beam/s3.sh b/lib/beam/s3.sh index 5f7235c..b365a54 100644 --- a/lib/beam/s3.sh +++ b/lib/beam/s3.sh @@ -69,7 +69,12 @@ s3_getmpoint() mount -tfuse.s3backer | awk '/https?:\/\/'$backup_bucket_name'/ { print $3 }';; s3) - mount | grep "^${backup_mp_s3backer}/file" | awk '{ print $3 }';; + s=$(mount | grep "^${backup_mp_s3backer}/file" | awk '{ print $3 }') + if [ -z "$s" ]; then + # Some kernels print device name instead of the actual mount file: + s=$(mount | grep "^/dev/loop[0-9] on ${backup_mp_s3}" | awk '{ print $3 }') + fi + echo $s;; *) abent 1 "invalid usage of getmpoint" esac @@ -80,6 +85,6 @@ s3_unmount() for id in s3 backer do mpoint=$(s3_getmpoint $id) - test -n "$mpoint" && umount $mpoint + test -n "$mpoint" && $dry_run umount $mpoint done } |