Revision 21ac56c6846a2d304c9ddb2a68722492d0684cbf authored by APipe Tester on 30 July 2015, 12:19:39 UTC, committed by APipe Tester on 30 July 2015, 12:19:39 UTC
1 parent f9d4e66
Raw File
mount.sh
#!/bin/bash

# This will mount VBox shared folders.
# It assumes the following names have been added to VBox:
#   gscmnt
#   var
#   lsf

if [ "$UID" -ne "0" ]
then
  echo "You must be root."
  exit 1
fi

USERUID=$1

if [ -z "$1" ]
then
  echo "You must set the first arg to your UID."
  echo "If you intend to use LSF, it must be the same"
  echo "as on your workstation (e.g. echo \$UID)"
  exit 1
fi

if [ ! -d "/gscmnt" ]
then
  mkdir /gscmnt
fi
mount -t vboxsf gscmnt /gscmnt -o uid=$USERUID,gid=100,umask=007

if [ ! -d "/gsc/var" ]
then
  mkdir -p /gsc/var
fi
mount -t vboxsf var /gsc/var -o uid=$USERUID,gid=100,umask=007

if [ ! -d "/usr/local/lsf" ]
then
  mkdir -p /usr/local/lsf
fi
mount -t vboxsf lsf /usr/local/lsf -o uid=$USERUID,gid=100,umask=007

if [ ! -d "/gsc/scripts" ]
then
  mkdir -p /gsc/scripts
fi
mount -t vboxsf scripts /gsc/scripts -o uid=$USERUID,gid=100,umask=007
back to top