X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=18881afba40d72573347ab799ec5f7260f0fc910;hb=6f3407bdee281e933c2a80fe5c3a5a5d30194687;hp=07deb559fbc3eddf7226cb52ca1d7104ce5fca48;hpb=a926b8a0e9ea6c89f3e94611d1030bb203cbdc9e;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index 07deb55..18881af 100755 --- a/scripts/live +++ b/scripts/live @@ -1074,8 +1074,16 @@ try_snap () cpioargs='--unconditional --make-directories' fi - cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | $cpiopath $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse 2>/dev/null - RES="$?" + if [ -s "${snapback}/${snapfile}" ] + then + BEFOREDIR="$(pwd)" + cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | $cpiopath $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse 2>/dev/null + RES="$?" + cd "${BEFOREDIR}" + else + log_warning_msg "${snapback}/${snapfile} is empty, adding it for sync on reboot." + RES="0" + fi if [ "${RES}" != "0" ] then