Created
July 8, 2014 01:11
-
-
Save bguiz/a5a42ffbccfc46d74d23 to your computer and use it in GitHub Desktop.
mounts virtualbox shared directories
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 | |
# Mounts all known drives shared via virtual box | |
# configuration | |
MOUNT_POINT="${HOME}/media" | |
MOUNT_DIRS="foo bar" #replace with the ones you have configured for your virtual machine | |
USERID=$( id -u ) | |
GROUPID=$( id -g ) | |
for DIR in ${MOUNT_DIRS} ; do | |
mkdir -p ${MOUNT_POINT}/${DIR} | |
sudo mount -t vboxsf -o rw,uid=${USERID},gid=${GROUPID} ${DIR} ${MOUNT_POINT}/${DIR} | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment