diff options
Diffstat (limited to 'scripts/mount-store')
-rwxr-xr-x | scripts/mount-store | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/mount-store b/scripts/mount-store index cd31952..f138c5f 100755 --- a/scripts/mount-store +++ b/scripts/mount-store @@ -60,14 +60,20 @@ touch "${DEST}/.notmounted" if grep -E -q '^[^/].+:.+' <<<$SOURCE; then # seems to be NFS - mount -t nfs -o rw,async,nolock,vers=3,fg,ac,retry=1,timeo=600 "$SOURCE" "$DEST" - RET=$? + for i in 1 2 3; do + mount -t nfs -o rw,async,nolock,vers=3,fg,ac,retry=1,timeo=100,sec=sys "$SOURCE" "$DEST" + RET=$? + [ "$RET" -eq "0" ] && break + done elif grep -E -q '^//' <<<$SOURCE; then # seens to be SMB export USER="$USERNAME" export PASSWD="$PASSWORD" - mount -t cifs -o rw,uid=0,gid=12345,forceuid,forcegid,file_mode=0664,dir_mode=0775,sec=ntlm "$SOURCE" "$DEST" - RET=$? + for sec in ntlmv2 ntlm; do + mount -t cifs -o rw,uid=0,gid=12345,forceuid,forcegid,file_mode=0664,dir_mode=0775,sec=$sec "$SOURCE" "$DEST" + RET=$? + [ "$RET" -eq "0" ] && break + done unset USER PASSWD else echo "Unknown mount type: $SOURCE" |