X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=f5f4ad28a007cecd48dfcf2db404af56787ae465;hb=fa4e3b7531b58edc082487cba75f772121a21201;hp=d35fb0814c758d48699e6d5e96b17a7362f74a56;hpb=b1e77d7bb3bf329a929296afc8f285e178f65370;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index d35fb08..f5f4ad2 100755 --- a/scripts/live +++ b/scripts/live @@ -88,12 +88,8 @@ Arguments () ethdevice=*) DEVICE="${ARGUMENT#ethdevice=}" - export DEVICE - ;; - - ethdevice=*) - ETHDEVICE="${ARGUMENT#ethdevice=}" - export ETHDEVICE + ETHDEVICE="${DEVICE}" + export DEVICE ETHDEVICE ;; ethdevice-timeout=*) @@ -964,19 +960,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,7 +989,10 @@ try_snap () 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 @@ -1595,6 +1595,7 @@ find_livefs () fi done elif [ "${fstype}" = "squashfs" -o \ + "${fstype}" = "btrfs" -o \ "${fstype}" = "ext2" -o \ "${fstype}" = "ext3" -o \ "${fstype}" = "ext4" -o \