Pick up libvirtd group membership when running cleanup
Change-Id: Ic36d2fe67c6215dbaff84f6f83fa75aefd8b7e9d
diff --git a/scripts/cord-in-a-box.sh b/scripts/cord-in-a-box.sh
index 7c475da..c37fb98 100755
--- a/scripts/cord-in-a-box.sh
+++ b/scripts/cord-in-a-box.sh
@@ -12,7 +12,7 @@
echo "Destroying all Vagrant VMs"
cd $CORDDIR/build
- vagrant destroy
+ sudo su $USER -c 'vagrant destroy'
echo "Removing $CORDDIR"
cd ~
@@ -28,7 +28,6 @@
[ -e ~/.ssh/id_rsa ] || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
- USER=$(whoami)
sudo adduser $USER libvirtd
sudo curl -o /usr/local/bin/repo https://storage.googleapis.com/git-repo-downloads/repo