Until "recently", when I mounted a SMB share from the command-line using either open ...
or Applescript with osascript -e "mount volume ..."
, it would mount the share at /Volumes/ShareName
.
The current "AppleScript Language Guide" documentation for "mount volume" does not specify how the folder under /Volumes will be named. I had read that it would use the share name, and that is what it used to do.
But now, at least with MacOS 10.14.6, 10.15.7 and 11.5.2, the folder created under /Volumes uses the server name instead.
On all machines, I tried both
open "smb://$user:$pass@elefant/R"
and
osascript -e "mount volume \"smb://$user:$pass@elefant/R/\""
On all 3 machines, the output of the osascript command is
file:R
The shortcut created on Desktop is labelled with the share name as before ("R" in this case). But that is not the name of the mount point, and I get:
$ ls -1 /Volumes/
Macintosh HD
elefant
Only on a 10.13.6 machine does it not happen, and the share is mounted using the share name at /Volumes/R
.
Is this documented somewhere?
And most importantly, can this be reverted to the old behaviour of using the share name?
mount volume "smb://ServerName/ShareName"
in Script Editor orosascript -e 'mount volume "smb://ServerName/ShareName"'
from Terminal , it mounts as/Volumes/ShareName
not/Volumes/ServerName
and I cannot reproduce your issue. When's the last time you rebooted?