Posted on 03-09-2016 10:48 AM
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!
Posted on 03-09-2016 11:26 AM
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.
Posted on 03-10-2016 03:48 PM
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?