From 10975169944306244bf227198c181bd8feb7a4b4 Mon Sep 17 00:00:00 2001 From: Marco Amadori Date: Fri, 19 Jun 2009 01:12:57 +0200 Subject: [PATCH] Removed two bashisms on live-snapshot. * Thanks to Luigi Capriotti for pointing this out. --- bin/live-snapshot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/live-snapshot b/bin/live-snapshot index bf63041..18b067b 100755 --- a/bin/live-snapshot +++ b/bin/live-snapshot @@ -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="/" -- 2.1.4