projects
/
live-boot-grml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b1e77d7
)
Do not print misleading debug message if the snapshot was found correctly.
author
Marco Amadori
<amadorim@vdavda.com>
Tue, 6 Jul 2010 13:07:35 +0000
(15:07 +0200)
committer
Daniel Baumann
<daniel@debian.org>
Tue, 6 Jul 2010 13:11:04 +0000
(15:11 +0200)
scripts/live
patch
|
blob
|
history
diff --git
a/scripts/live
b/scripts/live
index
d35fb08
..
3a6094f
100755
(executable)
--- a/
scripts/live
+++ b/
scripts/live
@@
-964,19
+964,20
@@
try_snap ()
snapback="$(echo ${snapdata} | cut -f2 -d ' ')"
snapfile="$(echo ${snapdata} | cut -f3 -d ' ')"
snapback="$(echo ${snapdata} | cut -f2 -d ' ')"
snapfile="$(echo ${snapdata} | cut -f3 -d ' ')"
- RES=""
if ! try_mount "${snapdev}" "${snapback}" "ro"
then
break
fi
if ! try_mount "${snapdev}" "${snapback}" "ro"
then
break
fi
+ RES="0"
+
if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\|ext3\|ext4\|jffs2\)'
then
# squashfs, jffs2 or ext2/ext3/ext4 snapshot
dev=$(get_backing_device "${snapback}/${snapfile}")
do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"
if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\|ext3\|ext4\|jffs2\)'
then
# squashfs, jffs2 or ext2/ext3/ext4 snapshot
dev=$(get_backing_device "${snapback}/${snapfile}")
do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"
- RES=
$?
+ RES=
"$?"
else
# cpio.gz snapshot
else
# cpio.gz snapshot
@@
-992,7
+993,10
@@
try_snap ()
cpioargs='--unconditional --make-directories'
fi
cpioargs='--unconditional --make-directories'
fi
- if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | $cpiopath $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse 2>/dev/null)
+ cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | $cpiopath $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse 2>/dev/null
+ RES="$?"
+
+ if [ "${RES}" != "0" ]
then
log_warning_msg "failure to \"zcat ${snapback}/${snapfile} | $cpiopath $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse\""
fi
then
log_warning_msg "failure to \"zcat ${snapback}/${snapfile} | $cpiopath $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse\""
fi