summaryrefslogtreecommitdiffstats
path: root/scripts/mount-store
diff options
context:
space:
mode:
authorSimon Rettberg2015-01-23 19:19:58 +0100
committerSimon Rettberg2015-01-23 19:19:58 +0100
commit2eb5cea8578c2884c6f30fa379212bbfc1554bed (patch)
tree12d4eb781782e07e41b084444a2185a978e90c98 /scripts/mount-store
parentPimp my boot menu (diff)
downloadtmlite-bwlp-2eb5cea8578c2884c6f30fa379212bbfc1554bed.tar.gz
tmlite-bwlp-2eb5cea8578c2884c6f30fa379212bbfc1554bed.tar.xz
tmlite-bwlp-2eb5cea8578c2884c6f30fa379212bbfc1554bed.zip
Stuff
Diffstat (limited to 'scripts/mount-store')
-rwxr-xr-xscripts/mount-store14
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"