#!/bin/sh
defaultHost=//192.168.0.1/proj
defaultUserName=root
mountPath=/path/proj
host=$defaultHost
userName=$defaultUserName
if [ $# -eq 1 ]
then
host=$1
umount -l $mountPath
elif [ $# -eq 2 ]
then
host=$1
userName=$2
umount -l $mountPath
elif [ $# -eq 3 ]
then
host=$1
userName=$2
mountPath=$3
umount -l $mountPath
fi
scmd="mount -t cifs -o user=$userName,password=workstation,rw,file_mode=0777,dir_mode=0777 $host $mountPath"
echo $scmd
eval $scmd