Last active
August 29, 2015 14:01
-
-
Save JeffreyVdb/3c0a6ec558e0bb921272 to your computer and use it in GitHub Desktop.
Vagrant lucid base box scripts
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 | |
# exit script if not run as root | |
if [[ $EUID -ne 0 ]]; then | |
cat <<END | |
you need to run this script as the root user' >&2 | |
use :privileged => true in Vagrantfile | |
END | |
exit 1 | |
fi | |
# optimize apt sources to select best mirror | |
perl -pi -e 's@^\s*(deb(\-src)?)\s+http://us.archive.*?\s+@\1 mirror://mirrors.ubuntu.com/mirrors.txt @g' /etc/apt/sources.list | |
# update repositories | |
apt-get update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment