Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
gniemetz committed Feb 28, 2017
2 parents ccbe17b + 1dfd9cf commit 7b5d0ea
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions automount.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# CONSTANTS
declare -r SCRIPTLASTMOD="2017-02-27"
declare -r SCRIPTVERSION="0.90.18"
declare -r SCRIPTLASTMOD="2017-02-28"
declare -r SCRIPTVERSION="0.90.20"
declare -r DEBUG="false"
if [ "${DEBUG}" == "false" ]; then
set +xv
Expand Down Expand Up @@ -603,12 +603,12 @@ function processMountlist {
'"${EXPECTDEBUG}"'
spawn /sbin/mount_webdav -s -i'"${MountOptions:+ -o ${MountOptions}}"' '"${Protocol}"'://'"${Server}"' '"${MOUNTPOINT_APN}"'/'"${MountPoint}"'
expect {
"name:" {
-re ".*ser.*|.*name.*" {
send -- "'"${Account}"'\r"
exp_continue
}
"sword:" {
send -- "'$(getPasswordFromKeychain)'\r"
-re ".*ssword.*" {
send -- "'$(getPasswordFromKeychain | convertToHexCode)'\r"
exp_continue
}
timeout {
Expand All @@ -629,11 +629,11 @@ function processMountlist {
'"${EXPECTDEBUG}"'
spawn /sbin/mount_ftp -i'"${MountOptions:+ -o ${MountOptions}}"' '"${Protocol}"'://'"${Server}"' '"${MOUNTPOINT_APN}"'/'"${MountPoint}"'
expect {
"name:" {
-re ".*ser.*|.*name.*" {
send -- "'"${Account}"'\r"
}
"sword:" {
send -- "'$(getPasswordFromKeychain)'\r"
-re ".*ssword.*" {
send -- "'$(getPasswordFromKeychain | convertToHexCode)'\r"
exp_continue
}
timeout {
Expand All @@ -658,15 +658,15 @@ function processMountlist {
'"${EXPECTDEBUG}"'
spawn /sbin/mount_afp -i -s'"${MountOptions:+ -o ${MountOptions}}"' '"${Protocol}"'://'"${Server}"'/'"${Share}"' '"${MOUNTPOINT_APN}"'/'"${MountPoint}"'
expect {
"ser:" {
-re ".*ser.*" {
if {"'"${Domain}"'" == ""} {
send -- "'"${Account}"'\r"
} else {
send -- "'"${Domain}"';'"${Account}"'\r"
}
exp_continue
}
"sword:" {
-re ".*ssword.*" {
send -- "'"$(getPasswordFromKeychain | convertToHexCode)"'\r"
exp_continue
}
Expand All @@ -685,18 +685,18 @@ function processMountlist {
_RV="$(${LAUNCHASUSER} expect -c '
set timeout '${MaxRetryInSeconds}'
'"${EXPECTDEBUG}"'
spawn /sbin/mount_smbfs -o soft'"${MountOptions:+,${MountOptions}}"' //'"${Server}"'/'"${Share}"' '"${MOUNTPOINT_APN}"'/'"${MountPoint}"'
spawn /sbin/mount_smbfs -o soft'"${MountOptions:+,${MountOptions}}"' "//'"${Domain:+${Domain};}${Account}"'@'"${Server}"'/'"${Share}"'" '"${MOUNTPOINT_APN}"'/'"${MountPoint}"'
expect {
"ser:" {
-re "..*ser.*|.*name.*" {
if {"'"${Domain}"'" == ""} {
send -- "'"${Account}"'\r"
} else {
send -- "'"${Domain}"';'"${Account}"'\r"
}
exp_continue
}
"sword:" {
send -- "'"$(getPasswordFromKeychain)"'\r"
-re ".*ssword.*" {
send -- "'"$(getPasswordFromKeychain | convertToHexCode)"'\r"
exp_continue
}
timeout {
Expand All @@ -716,8 +716,8 @@ function processMountlist {
'"${EXPECTDEBUG}"'
spawn /sbin/mount -t '"${Protocol}"''"${MountOptions:+ -o ${MountOptions}}"' //'"${Account}"'@'"${Server}"'/'"${Share}"' '"${MOUNTPOINT_APN}"'/'"${MountPoint}"'
expect {
"sword:" {
send -- "'"$(getPasswordFromKeychain)"'\r"
-re ".*ssword.*" {
send -- "'"$(getPasswordFromKeychain | convertToHexCode)"'\r"
exp_continue
}
timeout {
Expand Down

0 comments on commit 7b5d0ea

Please sign in to comment.