X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=bin%2Flive-snapshot;h=1e080c33d00f68b53323e91eeafc8f5da93b14fc;hb=a47e683b094c749bb6c62e582ba15f26c5d21c00;hp=bf630416f5b2063d74d2f6d7e063829be8bb7217;hpb=c5e99d4a0d54ec199c5a229c9478a50629f14aa8;p=live-boot-grml.git diff --git a/bin/live-snapshot b/bin/live-snapshot index bf63041..1e080c3 100755 --- a/bin/live-snapshot +++ b/bin/live-snapshot @@ -4,7 +4,7 @@ # # This program mounts a device (fallback to /tmpfs under $MOUNTP # and saves the /live/cow (or a different directory) filesystem in it -# for reuse in another live-initramfs session. +# for reuse in another live-boot session. # Look at the manpage for more informations. # # Copyright (C) 2006-2008 Marco Amadori @@ -238,7 +238,7 @@ Defaults () # Parse resync string if [ -n "${SNAP_RESYNC_STRING}" ] then - SNAP_COW=$(echo "${SNAP_RESYNC_STRING/\/root/${DEF_SNAP_COW}}" | cut -f1 -d ':') + SNAP_COW=$(echo "${SNAP_RESYNC_STRING}" | sed -e 's|^/root\([^:.]*\).*$|'"${DEF_SNAP_COW}"'\1|') SNAP_DEV=$(echo "${SNAP_RESYNC_STRING}" | cut -f2 -d ':') SNAP_MNT=$(echo "${SNAP_RESYNC_STRING}" | cut -f3 -d ':') DEST="${MOUNTP}/${SNAP_MNT}" @@ -362,7 +362,7 @@ Do_filelist () if [ -f "${SNAP_LIST}" ] then # if SNAP_COW == /live/cow/home, SNAP_RW = /home - SNAP_RW="${SNAP_COW/${DEF_SNAP_COW}}" + SNAP_RW=$(echo "${SNAP_COW}" | sed -e "s|${DEF_SNAP_COW}||g") if [ -z "${SNAP_RW}" ] then SNAP_RW="/" @@ -443,10 +443,10 @@ Do_snapshot () grep -F -v -f "${EXCLUDE_LIST}" | \ tr '\n' '\0' | \ tr '\1' '\n' | \ - $COPY_CMD || exit 1 + eval $COPY_CMD || exit 1 else cat "${TMP_FILELIST}" | \ - $COPY_CMD || exit 1 + eval $COPY_CMD || exit 1 fi cd "${OLDPWD}" ;;