[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 899793b7486524d10a9564be3e68efcce676ea4f
Author: Marco Amadori <amadorim at vdavda.com>
Date: Tue Sep 16 16:24:37 2008 +0200
Included more debug and comments on persistence code.
Signed-off-by: Marco Amadori <amadorim at vdavda.com>
diff --git a/scripts/live b/scripts/live
index b7fd4ce..f9e4fe2 100755
--- a/scripts/live
+++ b/scripts/live
@@ -908,10 +908,14 @@ try_snap ()
cd "${snap_mount}"
zcat "${snapback}/${snapfile}" | /bin/cpio --extract --preserve-modification-time --no-absolute-filenames --sparse --unconditional --make-directories > /dev/null 2>&1
RES=$?
+ if [ "${RES}" != "0" ]
+ then
+ log_warning_msg "failure to \"zcat ${snapback}/${snapfile} | /bin/cpio --extract --preserve-modification-time --no-absolute-filenames --sparse --unconditional --make-directories\""
+ fi
cd "${OLDPWD}"
fi
- umount "${snapback}"
+ umount "${snapback}" || log_warning_msg "failure to \"umount ${snapback}\""
if [ "${RES}" != "0" ]
then
@@ -919,10 +923,12 @@ try_snap ()
fi
else
+ # Try to find if it could be a snapshot partition
dev=$(find_cow_device "${snap_label}")
if [ -b "${dev}" ]
then
+ log_success_msg "found snapshot device on ${dev}"
if echo "${dev}" | grep -qs loop
then
# strange things happens, user confused?
diff --git a/scripts/live-helpers b/scripts/live-helpers
index 19cc955..2641487 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -146,7 +146,7 @@ fs_size ()
mountp="/mnt/tmp_fs_size"
mkdir -p "${mountp}"
- mount -t $(get_fstype "${dev}") -o ro "${dev}" "${mountp}"
+ mount -t $(get_fstype "${dev}") -o ro "${dev}" "${mountp}" || log_warning_msg "cannot mount -t $(get_fstype ${dev}) -o ro ${dev} ${mountp}"
doumount=1
fi
@@ -163,7 +163,7 @@ fs_size ()
if [ -n "${doumount}" ]
then
- umount "${mountp}"
+ umount "${mountp}" || log_warning_msg "cannot umount ${mountp}"
rmdir "${mountp}"
fi
@@ -349,6 +349,7 @@ find_files ()
if [ -f "${snap_backing}/${filename}" ]
then
echo "${devname} ${snap_backing} ${filename}"
+ # return without mounting, it will be umounted later
return 0
fi
done
--
Debian Live initramfs hook
More information about the debian-live-changes
mailing list