X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Flive;h=3a6094f19b9181cabb9fab992e376d808403cacb;hb=d197dfe7342a91c8c8a889a80323993705614377;hp=5b5a3b95eda8018ce556238344aaf737d9d01825;hpb=99a3dc05824d23cbc684f3af43172f31af17bb8d;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index 5b5a3b9..3a6094f 100755 --- a/scripts/live +++ b/scripts/live @@ -964,19 +964,20 @@ try_snap () snapback="$(echo ${snapdata} | cut -f2 -d ' ')" snapfile="$(echo ${snapdata} | cut -f3 -d ' ')" - RES="" 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}" - RES=$? + RES="$?" else # cpio.gz snapshot @@ -992,9 +993,12 @@ try_snap () cpioargs='--unconditional --make-directories' fi - if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio $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} | cpio $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse\"" + log_warning_msg "failure to \"zcat ${snapback}/${snapfile} | $cpiopath $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse\"" fi fi