mountNetworkShare.sh Help

Lucasw
New Contributor III

Hey All,

Working on mountNetworkShare.sh script and have it working as expected. However when the script tries to execute at login it fails with:

CHECK TO SEE IF A VALUE WERE PASSED IN FOR PARAMETERS XXXXX THROUGH AND, IF SO, ASSIGN THEM Wed Mar 9 11:38:07 MST 2016 Running script Volume name will be created as DeptShares... Error: Directory /Volumes/DeptShares is not empty.

This happens because now upon login, the share i was trying to mount with this script is already mounted?!?

Is this a feature in OSX that is performing this automatically after the first mount(from script)? or something im missing?

thanks!

2 REPLIES 2

Jerod
New Contributor III

This is likely occurring, because the share was never unmounted. It's not that OS X is automatically doing anything, but usually when a volume is mounted it stays mounted until it is unmounted.

Look
Valued Contributor III

Make sure the mount point is different for each user i.e. user_share otherwise another user logged in will interfere with the curent one.
Also I like to use an osascript call to Finder to mount the shares, the resulting shares act like they were mounted by the user and tend to unmount etc... when you expect them to.

How are you running the script?