Commit edd3810e by Serge Hallyn Committed by Daniel Lezcano

lxc-ubuntu-cloud: extract the right filenames from tarball

parent 42ff5f0f
...@@ -270,7 +270,7 @@ build_root_tgz() ...@@ -270,7 +270,7 @@ build_root_tgz()
xdir=`mktemp -d -p .` xdir=`mktemp -d -p .`
tarname=`basename $url` tarname=`basename $url`
imgname="`basename $tarname .tar.gz`.img" imgname="$release-*-cloudimg-$arch.img"
trap buildcleanup EXIT trap buildcleanup EXIT
if [ $flushcache -eq 1 -o ! -f $cache/$tarname ]; then if [ $flushcache -eq 1 -o ! -f $cache/$tarname ]; then
rm -f $tarname rm -f $tarname
...@@ -278,7 +278,7 @@ build_root_tgz() ...@@ -278,7 +278,7 @@ 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 zxf $tarname $imgname tar --wildcards -zxf $tarname $imgname
mount -o loop $imgname $xdir mount -o loop $imgname $xdir
(cd $xdir; tar zcf ../$filename .) (cd $xdir; tar zcf ../$filename .)
umount $xdir umount $xdir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment