[SCM] Debian Live initramfs hook branch, master, updated. 1.139.1-2-19-g79d1725
Marco Amadori
amadorim at vdavda.com
Wed Sep 17 06:52:05 UTC 2008
The following commit has been merged in the master branch:
commit ccc533281fb6fc5602a79d4b4f02f0d542e27db9
Author: Marco Amadori <amadorim at vdavda.com>
Date: Tue Sep 16 16:16:08 2008 +0200
Check for files and umount only if you can mount it first.
* Another clean-up and speed up in the ugly persistance/snapshot code.
Signed-off-by: Marco Amadori <amadorim at vdavda.com>
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
--
Debian Live initramfs hook
More information about the debian-live-changes
mailing list