Home Forums OS X Server and Client Discussion Open Directory MCX Folder redirect to make iMove save locally

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #379603
    eyoung123
    Participant

    I 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.

    [b]this works as advertised.[/b]
    login redirect
    deleteandCreateSymlink
    Destination folder path is: /Users/Shared//%@ iMovie files are here/
    Folder Path is: ~/Movies

    [b]no joy[/b]
    logout redirect

    deleteSymLinkAndRestore
    Destination folder path: ~/Movies

    I’ve also set it as just Folder Path and as both…. I always end up with the symlink just hanging out there mocking me.

    #380143
    tlarkin
    Participant

    You ever think about using a login script to set the folder via symbolic link?

    [code]
    #!/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 0
    [/code]

    Then 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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed