[SCM] Debian Live initramfs hook branch, master, updated. 1.157.2-1-13-gb23da5c

Marco Amadori marco.amadori at gmail.com
Fri Jun 19 06:04:44 UTC 2009


The following commit has been merged in the master branch:
commit b23da5c79d2250b2f62cf1975a405f447fe95635
Author: Marco Amadori <marco.amadori at gmail.com>
Date:   Fri Jun 19 01:12:57 2009 +0200

    Removed two bashisms on live-snapshot.
    
    * Thanks to Luigi Capriotti <l.capriotti at xbmc.org> 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="/"

-- 
Debian Live initramfs hook



More information about the debian-live-changes mailing list