From 1492bea7cab5998e281097e6b1dda07f9bfdbf25 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 26 Oct 2009 12:38:22 +0100 Subject: Forwardporting and extending usage of rsync when booting with toram based on a patch from Michael Prokop . --- scripts/live | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/live b/scripts/live index 1902429..0fa3900 100755 --- a/scripts/live +++ b/scripts/live @@ -673,7 +673,7 @@ copy_live_to () # begin copying (or uncompressing) mkdir "${copyto}" - echo "mount -t ${fstype} ${mount_options} ${dev} ${copyto}" + log_begin_msg "mount -t ${fstype} ${mount_options} ${dev} ${copyto}" mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}" if [ "${extension}" = "tgz" ] @@ -686,10 +686,22 @@ copy_live_to () else if [ -n "${MODULETORAMFILE}" ] then - cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module + if [ -x /bin/rsync ] + then + echo " * Copying $MODULETORAMFILE to RAM" 1>/dev/console + rsync -a --progress ${MODULETORAMFILE} ${copyto} 1>/dev/console # copy only the filesystem module + else + cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module + fi else - mkdir -p ${copyto}/${LIVE_MEDIA_PATH} - cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH} # "cp -a" from busybox also copies hidden files + if [ -x /bin/rsync ] + then + echo " * Copying whole medium to RAM" 1>/dev/console + rsync -a --progress ${copyfrom}/* ${copyto} 1>/dev/console # "cp -a" from busybox also copies hidden files + else + mkdir -p ${copyto}/${LIVE_MEDIA_PATH} + cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH} # "cp -a" from busybox also copies hidden files + fi fi umount ${copyfrom} -- cgit v1.2.3