[launchd-dev] fork & exit in Shell Script (Revisited)

Charles Darwin darwinskernel at gmail.com
Tue Nov 11 05:28:25 PST 2008

On 11-Nov-08, at 4:23 AM, Quinn wrote:

> At 13:13 -0500 10/11/08, Charles Darwin wrote:
>> Here is the script:
> OK, I'm still looking for a high-level overview of your goals.  Do  
> you just want to mount a volume when the user logs in?

That's pretty much it. AFP volume (sharedpoint dir) needs to be  
mounted on behalf of the user in order for its mods set correctly  
which is rwx. That is why launching from /Library/LaunchDaemon/  
doesn't do it.
I hope I answersed your question but if not then please let me know  
and I will explain further.

> If so, there are /much/ easier ways to achieve that goal.

True. User's "Login Items" (AccountsPrefPane) for one. But we didn't  
want to that. For example Finder's window pops ups (showing the  
mounted volume) for no reason. I couldn't add my script (the unix exe  
file) to "Login Items" either. However, the main reason for not using  
"Login Items" was this line:

"In Mac OS X v10.4, launchd was added. This is the preferred means of  
adding background agents on a per-user basis. "

that I found here:


>  Or is this just an example of what you're trying to do, which  
> you'll extend once you get it working?

Yes. However mounting the AFP with correct permissions is the most  
important thing that I would like to do for now but we will be adding  
more administrative tasks to this script in the future.


> S+E
> -- 
> Quinn "The Eskimo!"                    <http://www.apple.com/developer/ 
> >
> Apple Developer Relations, Developer Technical Support, Core OS/ 
> Hardware
> _______________________________________________
> launchd-dev mailing list
> launchd-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev

More information about the launchd-dev mailing list