Created
January 1, 2014 21:20
-
-
Save purpleidea/8211614 to your computer and use it in GitHub Desktop.
Workaround for:
https://github.com/fgrehm/vagrant-cachier/issues/74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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