Mounting Samba shares under /Volumes without GUI fluff
Solution 1:
The following is what I use to mount Samba shares via launchd
:
/usr/bin/osascript -e "try" -e "mount volume \"smb://guest@${host}\"" -e "end try"
Using osascript
's mount
means any keychain
access needed is done "automagically", there's no progress indicator or Finder window, and the command waits for the mount to be available before proceeding (try it with && echo -n "Done."; mount
appended to the end of the above command to test this).