Skip to content

Instantly share code, notes, and snippets.

@purpleidea
Created January 1, 2014 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save purpleidea/8211614 to your computer and use it in GitHub Desktop.
Save purpleidea/8211614 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$1" = '' ]; then
echo "Usage: ./`basename "$0"` <hostname>"
exit 1
fi
# NOTE: lets say you try to provision a previously provisioned host...
# $ vp foo
# [foo] Configuring cache buckets...
# The following SSH command responded with a non-zero exit status.
# Vagrant assumes that this means the command failed!
#
# mkdir -p /tmp/vagrant-cache/yum
#
# Stdout from the command:
#
#
#
# Stderr from the command:
#
# mkdir: cannot create directory `/tmp/vagrant-cache': Permission denied
#
# NOTE: this is a bug, but here's a workaround:
vagrant ssh "$1" -c 'sudo timeout 3 umount /tmp/vagrant-cache'
vagrant ssh "$1" -c 'sudo umount /tmp/vagrant-cache'
#/tmp/vagrant-cache was not found in /proc/mounts
#/tmp/vagrant-cache was not found in /proc/mounts
vagrant ssh "$1" -c 'sudo rmdir /tmp/vagrant-cache/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment