X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=0e1b2f444550c5fdb37ee0ea926eb6bdcf104cc7;hb=refs%2Ftags%2Fdebian%2F2.0.5-1;hp=169ffb430d3ea375b563d3a14e53441d891f1bd0;hpb=5be53fa805fe515ea3eb45786fa76c5bb6a7ea2d;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index 169ffb4..0e1b2f4 100755 --- a/scripts/live +++ b/scripts/live @@ -1013,8 +1013,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