fi
else
# cpio.gz snapshot
- if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio -i -u -d 2>/dev/null)
+ if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio --extract --preserve-modification-time --no-absolute-filenames --sparse --unconditional --make-directories > /dev/null 2>&1)
then
log_warning_msg "Impossible to include the ${snapfile} Snapshot"
return 1
rofslist="${image} ${rofslist}"
elif [ -f "${image}" ]
then
- backdev=$(get_backing_device "${image}" "-r")
+ if /sbin/losetup --help 2>&1 | grep -q -- "-r\b"
+ then
+ backdev=$(get_backing_device "${image}" "-r")
+ else
+ backdev=$(get_backing_device "${image}")
+ fi
fstype=$(get_fstype "${backdev}")
if [ "${fstype}" = "unknown" ]
# shows cow fs on /cow for use by live-snapshot
mkdir -p "${rootmnt}/live/cow"
- mount -o move /cow "${rootmnt}/live/cow"
+ mount -o move /cow "${rootmnt}/live/cow" || mount -o bind /cow "${rootmnt}/live/cow" || [ "${quiet}" != "y" ] && log_warning_msg "Unable to move or bind /cow to ${rootmnt}/live/cow"
}
check_dev ()