From a33b32c164df75f4fe5150e4d2bfc76fc9729f25 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 29 Mar 2013 02:07:36 -0300 Subject: [PATCH] Speed up containers creation by removing unneded rsync call from lxc-template Was able to drop project's "/example" `vagrant up` from 42s down to 29s Closes #40 --- boxes/quantal64/lxc-template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boxes/quantal64/lxc-template b/boxes/quantal64/lxc-template index 4690955..0fdef44 100755 --- a/boxes/quantal64/lxc-template +++ b/boxes/quantal64/lxc-template @@ -161,8 +161,8 @@ copy_ubuntu() # make a local copy of the miniubuntu echo "Copying rootfs to $rootfs ..." - mkdir -p $rootfs - rsync -a $cache/rootfs-$arch/ $rootfs/ || return 1 + mkdir -p $(dirname $rootfs) + mv $cache/rootfs-$arch $rootfs || return 1 return 0 }