From 2681b3b7b0d610ec2d2b5bfe8378220a6e4650c4 Mon Sep 17 00:00:00 2001 From: Gerd Date: Tue, 28 Feb 2017 12:54:33 +0100 Subject: [PATCH 1/2] try to fix #6 v 0.9.19 in dev-branch hopefully fixes the mount_smbfs error --- automount.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/automount.sh b/automount.sh index 628fad3..c08c069 100755 --- a/automount.sh +++ b/automount.sh @@ -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.19" declare -r DEBUG="false" if [ "${DEBUG}" == "false" ]; then set +xv @@ -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 { @@ -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 { @@ -658,7 +658,7 @@ 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 { @@ -666,7 +666,7 @@ function processMountlist { } exp_continue } - "sword:" { + -re ".*ssword.*" { send -- "'"$(getPasswordFromKeychain | convertToHexCode)"'\r" exp_continue } @@ -685,9 +685,9 @@ 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 { @@ -695,8 +695,8 @@ function processMountlist { } exp_continue } - "sword:" { - send -- "'"$(getPasswordFromKeychain)"'\r" + -re ".*ssword.*" { + send -- "'"$(getPasswordFromKeychain | convertToHexCode)"'\r" exp_continue } timeout { @@ -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 { From c4ffb9f6428818520882bba6d103823e9db4641d Mon Sep 17 00:00:00 2001 From: Gerd Date: Tue, 28 Feb 2017 14:19:32 +0100 Subject: [PATCH 2/2] again try to fix #6 --- automount.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automount.sh b/automount.sh index c08c069..2d58d3c 100755 --- a/automount.sh +++ b/automount.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # CONSTANTS declare -r SCRIPTLASTMOD="2017-02-28" -declare -r SCRIPTVERSION="0.90.19" +declare -r SCRIPTVERSION="0.90.20" declare -r DEBUG="false" if [ "${DEBUG}" == "false" ]; then set +xv @@ -685,7 +685,7 @@ function processMountlist { _RV="$(${LAUNCHASUSER} expect -c ' set timeout '${MaxRetryInSeconds}' '"${EXPECTDEBUG}"' - spawn /sbin/mount_smbfs -o soft'"${MountOptions:+,${MountOptions}}"' //'"${Domain:+${Domain};}${Account}"'@'"${Server}"'/'"${Share}"' '"${MOUNTPOINT_APN}"'/'"${MountPoint}"' + spawn /sbin/mount_smbfs -o soft'"${MountOptions:+,${MountOptions}}"' "//'"${Domain:+${Domain};}${Account}"'@'"${Server}"'/'"${Share}"'" '"${MOUNTPOINT_APN}"'/'"${MountPoint}"' expect { -re "..*ser.*|.*name.*" { if {"'"${Domain}"'" == ""} {