From: Marco Amadori Date: Thu, 18 Jun 2009 23:12:57 +0000 (+0200) Subject: Removed two bashisms on live-snapshot. X-Git-Tag: debian/1.157.3-1~16 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=10975169944306244bf227198c181bd8feb7a4b4;p=live-boot-grml.git Removed two bashisms on live-snapshot. * Thanks to Luigi Capriotti for pointing this out. --- 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="/"