Skip to content

Instantly share code, notes, and snippets.

@brennanfee
Last active July 11, 2016 02:23
Show Gist options
  • Save brennanfee/e6e851f8e4e6142713d57b68241cd1fe to your computer and use it in GitHub Desktop.
Save brennanfee/e6e851f8e4e6142713d57b68241cd1fe to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Bash "strict" mode
set -euo pipefail
IFS=$'\n\t'
apt-get update
apt-get install -y --reinstall virtualbox-guest-utils virtualbox-guest-dkms virtualbox-guest-x11
vagrant_user_exists=$(id -u vagrant > /dev/null 2>&1; echo $?)
if [[ "$vagrant_user_exists" -eq "1" ]]; then
usermod -a -G vboxsf vagrant
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment