#!/bin/bash
#
#   mount-vmware - mounts VMware Shared Folders
#
# description: mount and umount the VMware Shared Folders
# chkconfig: 345 21 86


start() {
   mount -t vmhgfs .host:/ /mnt/hgfs &&
    echo -e "Mounting VMware Shared Folders in /mnt/hgfs:$RESULT_OK" ||
    echo -e "Mounting VMware Shared Folders in /mnt/hgfs:$RESULT_FAIL"
}

stop() {
  umount -t vmhgfs -a -f -l &&
    echo -e "Unmounting VMware Shared Folders:$RESULT_OK" ||
    echo -e "Unmounting VMware Shared Folders:$RESULT_FAIL"
}

# to avoid confusion we force only these options as being valid:
case "$1" in
  start|stop) ;;
           *) echo  "Usage: $0 {start|stop}"  ;;
esac

. /lib/lsb/init-functions

