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 (parent:
3c6ccf7
)
Added support for empty (initial) snapshots.
author
Marco Amadori
<amadorim@vdavda.com>
Mon, 13 Sep 2010 15:15:29 +0000
(17:15 +0200)
committer
Daniel Baumann
<daniel@debian.org>
Wed, 9 Mar 2011 16:59:20 +0000
(17:59 +0100)
scripts/live
patch
|
blob
|
history
diff --git
a/scripts/live
b/scripts/live
index
07deb55
..
18881af
100755
(executable)
--- a/
scripts/live
+++ b/
scripts/live
@@
-1074,8
+1074,16
@@
try_snap ()
cpioargs='--unconditional --make-directories'
fi
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
if [ "${RES}" != "0" ]
then