From: Serge Hallyn Date: Tue, 31 Jul 2012 14:04:33 +0000 (+0200) Subject: lxc-ubuntu-cloud: extract the right filenames from tarball X-Git-Tag: lxc-0.8.0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edd3810e951ec1b20af761955e6100ab75a66534;p=thirdparty%2Flxc.git lxc-ubuntu-cloud: extract the right filenames from tarball Signed-off-by: Ben Howard Signed-off-by: Serge Hallyn Signed-off-by: Daniel Lezcano --- diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in index 29d1bea5f..d215e158d 100644 --- a/templates/lxc-ubuntu-cloud.in +++ b/templates/lxc-ubuntu-cloud.in @@ -270,7 +270,7 @@ build_root_tgz() xdir=`mktemp -d -p .` tarname=`basename $url` - imgname="`basename $tarname .tar.gz`.img" + imgname="$release-*-cloudimg-$arch.img" trap buildcleanup EXIT if [ $flushcache -eq 1 -o ! -f $cache/$tarname ]; then rm -f $tarname @@ -278,7 +278,7 @@ build_root_tgz() wget $url || { echo "Couldn't find cloud image $url."; exit 1; } fi echo "Creating new cached cloud image rootfs" - tar zxf $tarname $imgname + tar --wildcards -zxf $tarname $imgname mount -o loop $imgname $xdir (cd $xdir; tar zcf ../$filename .) umount $xdir