From: Silvio Rhatto Date: Sun, 2 Apr 2017 17:22:54 +0000 (-0300) Subject: Use rsync to copy image files, falling back to cp X-Git-Tag: 0.1.0~469 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=1d3f4f80a512e907ab45e2e00b96903c519ed5da;p=kvmx.git Use rsync to copy image files, falling back to cp --- diff --git a/kvmx b/kvmx index cdd0d39..5cf833c 100755 --- a/kvmx +++ b/kvmx @@ -244,7 +244,11 @@ function kvmx_up { fi echo "Copying base image $baseimage to $image..." - cp $baseimage $image + if which rsync &> /dev/null; then + rsync -ah --progress $baseimage $image + else + cp $baseimage $image + fi if [ -e "$basekey" ]; then imagekey="`dirname $image`/ssh/`basename $image .img`.key"