summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/live-helpers18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/live-helpers b/scripts/live-helpers
index 0b9bd5f..19cc955 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -341,16 +341,18 @@ find_files ()
if is_supported_fs ${devfstype}
then
mkdir -p "${snap_backing}"
- try_mount "${devname}" "${snap_backing}" "ro" ${devfstype}
- for filename in ${filenames}
+ if try_mount "${devname}" "${snap_backing}" "ro" "${devfstype}"
+ then
+ for filename in ${filenames}
do
- if [ -f "${snap_backing}/${filename}" ]
- then
- echo "${devname} ${snap_backing} ${filename}"
- return 0
- fi
- done
+ if [ -f "${snap_backing}/${filename}" ]
+ then
+ echo "${devname} ${snap_backing} ${filename}"
+ return 0
+ fi
+ done
+ fi
umount ${snap_backing}
fi