Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mattt934

macrumors newbie
Original poster
Jan 21, 2015
1
0
Hi there,

We are running a fleet of MBA's on 10.9.4 connected to Active Directory and mounting DFS Shares from a Windows 2012 R2 server.
We use ControlPlane to, based on a network context, run a script to mount the network drives (will include the script below).

The issue is that when the Macs sleep or the screen is shut, after they are awakened, the drives are remounting and creating a few extra duplicates, eventually flooding the desktop throughout the day.

We assumed it was the script so we edited it as seen below, but the issue is persisting..

We have only seen this happen since the use of DFS shares was introduced instead of normal Windows shares. We have not verified this, but the issue does not seem to happen on Yosemite (NOT VERIFIED).

Any ideas? Thanks guys and gals.

Code:
roperty myDisks : {"Shared", "Media", "BOS_IB", "Emergency"}

set mountedDisks to paragraphs of (do shell script "/bin/ls /Volumes")
set username to system attribute "USER"
set urlToMount to "smb://host.local/DFS/Staff/Teachers/" & username

repeat with aDisk in myDisks
	
	if aDisk is not in mountedDisks then
		
		mount volume "smb://host.local/DFS/Staff/" & aDisk
		
	end if
	
end repeat

if username is not in mountedDisks then
	
	tell application "Finder"
		
		try
			
			mount volume urlToMount
			
		end try
		
	end tell
end if
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.