mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 13:47:41 +00:00
lxc-ubuntu-cloud: Cope with spaces in paths
Reported-by: Scott Moser <smoser@ubuntu.com> Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
494fd6b390
commit
9c3bc32c57
@ -338,9 +338,9 @@ build_root_tgz()
|
|||||||
wget $url || { echo "Couldn't find cloud image $url."; exit 1; }
|
wget $url || { echo "Couldn't find cloud image $url."; exit 1; }
|
||||||
fi
|
fi
|
||||||
echo "Creating new cached cloud image rootfs"
|
echo "Creating new cached cloud image rootfs"
|
||||||
tar --wildcards -zxf $tarname $imgname
|
tar --wildcards -zxf "$tarname" "$imgname"
|
||||||
mount -o loop $imgname $xdir
|
mount -o loop $imgname $xdir
|
||||||
(cd $xdir; tar --numeric-owner -cpzf ../$filename .)
|
(cd $xdir; tar --numeric-owner -cpzf "../$filename" .)
|
||||||
umount $xdir
|
umount $xdir
|
||||||
rm -f $tarname $imgname
|
rm -f $tarname $imgname
|
||||||
rmdir $xdir
|
rmdir $xdir
|
||||||
@ -371,7 +371,7 @@ do_extract_rootfs() {
|
|||||||
echo "Extracting container rootfs"
|
echo "Extracting container rootfs"
|
||||||
mkdir -p $rootfs
|
mkdir -p $rootfs
|
||||||
cd $rootfs
|
cd $rootfs
|
||||||
tar --numeric-owner -xpzf $cache/$filename
|
tar --numeric-owner -xpzf "$cache/$filename"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -n "$tarball" ]; then
|
if [ -n "$tarball" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user