]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-ubuntu-cloud: Cope with spaces in paths
authorStéphane Graber <stgraber@ubuntu.com>
Tue, 8 Oct 2013 14:51:53 +0000 (10:51 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 8 Oct 2013 14:51:53 +0000 (10:51 -0400)
Reported-by: Scott Moser <smoser@ubuntu.com>
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-ubuntu-cloud.in

index a2af0035e948c6ce80b846a3c3f0a1b363e9914d..82a7f7484caa2e2355227473caad622d047482b3 100644 (file)
@@ -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