should speed up by 20 seconds - sudo and no sleep
diff --git a/stack.sh b/stack.sh
index 7b0c900..33eb207 100755
--- a/stack.sh
+++ b/stack.sh
@@ -103,8 +103,7 @@
# since this script runs as a normal user, we need to give that user
# ability to run sudo
- apt_get update
- apt_get install sudo
+ dpkg -l sudo || apt_get update && apt_get install sudo
if ! getent passwd stack >/dev/null; then
echo "Creating a user called stack"
diff --git a/tools/build_uec.sh b/tools/build_uec.sh
index bccddaf..266356b 100755
--- a/tools/build_uec.sh
+++ b/tools/build_uec.sh
@@ -171,13 +171,14 @@
cat > $vm_dir/uec/user-data<<EOF
#!/bin/bash
apt-get update
-apt-get install git -y
+apt-get install git sudo -y
git clone https://github.com/cloudbuilders/devstack.git
cd devstack
git remote set-url origin `cd $TOP_DIR; git remote show origin | grep Fetch | awk '{print $3}'`
git fetch
git checkout `git rev-parse HEAD`
cat > localrc <<LOCAL_EOF
+ROOTSLEEP=0
`cat $TOP_DIR/localrc`
LOCAL_EOF
./stack.sh