From: Stéphane Graber Date: Tue, 8 Oct 2013 14:51:53 +0000 (-0400) Subject: lxc-ubuntu-cloud: Cope with spaces in paths X-Git-Tag: lxc-1.0.0.alpha2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c3bc32c5789b76b8c42b75d7625377d61e052c1;p=thirdparty%2Flxc.git lxc-ubuntu-cloud: Cope with spaces in paths Reported-by: Scott Moser Signed-off-by: Stéphane Graber --- diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in index a2af0035e..82a7f7484 100644 --- a/templates/lxc-ubuntu-cloud.in +++ b/templates/lxc-ubuntu-cloud.in @@ -338,9 +338,9 @@ build_root_tgz() wget $url || { echo "Couldn't find cloud image $url."; exit 1; } fi echo "Creating new cached cloud image rootfs" - tar --wildcards -zxf $tarname $imgname + tar --wildcards -zxf "$tarname" "$imgname" mount -o loop $imgname $xdir - (cd $xdir; tar --numeric-owner -cpzf ../$filename .) + (cd $xdir; tar --numeric-owner -cpzf "../$filename" .) umount $xdir rm -f $tarname $imgname rmdir $xdir @@ -371,7 +371,7 @@ do_extract_rootfs() { echo "Extracting container rootfs" mkdir -p $rootfs cd $rootfs - tar --numeric-owner -xpzf $cache/$filename + tar --numeric-owner -xpzf "$cache/$filename" } if [ -n "$tarball" ]; then