Hello everyone,
platform: 10.11.5/6 , iMac, MacBook Pro/Air
We are running into a situation where a jss deployed .dmg from a policy remains mounted on the desktop after completing execution. In this case it is a policy that deploys a dock.apple....plist file to the users home library followed by : killall cfprefsd, killall Dock; in the Files and Process section of the Jss policy.
I did some digging and found that running:
FinderPID=$(ps axco pid,command | grep Finder | awk '{print $1;}')
kill $FinderPID
does in fact restart the finder but the dmg image does not unmount.
I then tried appending "umount /Volumes/mountedimagename" to the 'Files and Processes' section of the policy in the JSS and saw that it will unmount the dmg, but then the policy fails as AppleDockFixUp reloads the default dock - which it did not do before appending the above mentioned command after killall cprefsd; killall Dock; in 'Files and Processes'.
We're grateful for any suggestions/experience others have had in this area.
Sincerely,
LPS
