Home › Forums › OS X Server and Client Discussion › Open Directory › MCX Folder redirect to make iMove save locally
- This topic has 1 reply, 2 voices, and was last updated 15 years, 11 months ago by
tlarkin.
-
AuthorPosts
-
October 5, 2010 at 3:35 pm #379603
eyoung123
ParticipantI am using Folder redirects successfully to pull off some very handy actions. Along those lines, I have written one up that is almost working… but I cannot get the logout action to work correctly.
My environment is all networked users via OD split between faculty and students on their own respective servers. We limit the storage pretty severely, to stop use of things like iTunes wasting space etc…
iMovie is becoming popular for classwork in our labs. So I did up a redirect to make the ~/Movies folder store locally in /Users/Shared. What I cannot get to work correctly is the restore of the original ~/Movies folder at log out. My setup is below. Any insight as to where I’ve screwed up would be greatly appreciated.
this works as advertised.
login redirect
deleteandCreateSymlink
Destination folder path is: /Users/Shared//%@ iMovie files are here/
Folder Path is: ~/Moviesno joy
logout redirectdeleteSymLinkAndRestore
Destination folder path: ~/MoviesI’ve also set it as just Folder Path and as both…. I always end up with the symlink just hanging out there mocking me.
December 14, 2010 at 6:07 pm #380143tlarkin
ParticipantYou ever think about using a login script to set the folder via symbolic link?
#!/bin/bash # log in hooks will return current user as $1, this only works for login hooks target="/Users/Shared/" /bin/mkdir $target$1 /bin/ln -s /Users/$1/Movies $target$1 exit 0Then in OD, open up WGM and click on the computer list you want this to run on and click on log the in preference. Then select to run your script at log in. This method only seems to allow you to do this via Computer groups. Alternatively, you can copy the script to the local machine and have the loginwidnow.plist run the script at log in. You could also use launchd and create a user agent that runs in every user’s ~/Library/LaunchAgents so every time they log in, it runs. You could probably put some testing and error checking and if everything checks good the script just exits, otherwise it applies the settings.
-
AuthorPosts
- You must be logged in to reply to this topic.