[OpenAFS-port-darwin] Example of the "correct" way to get tokens for Finder on login...

Everette Allen Everette_Allen@ncsu.edu
Tue, 07 Mar 2006 14:06:32 -0500


Ok so looks like the windows folks are using Windows Login Scripts as 
the OpenAFS blessed way of getting tokens on login.  So my question is 
what is the OpenAFS blessed way of doing this on MacOS X and can someone 
post an example that is working for them?  The equiv. to windows is of 
course the login hook set with sudo defaults write 
/var/root/Library/Preferences/com.apple.loginwindow LoginHook 
"/private/etc/hooks/login.hook"
except I could not get that mechanism to work with aklog
Then I follow the suggestion of using system (not user) LaunchAgents 
from launchd and had some success there(see attached plist) but found 
that if a user does unlog then logs out (10.4.4 at least) they do not 
get new tokens on the next login unless a different person has logged in 
or a reboot has happened.  Not good either.
So what is the "blessed" reliable mechanism?  I need to use afs folders 
as home with 10.4.x on ppc and i386.
----

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>edu.ncstate.aklog</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/bin/aklog</string>
		<string>-c</string>
		<string>unity.ncsu.edu</string>
		<string>-c</string>
		<string>eos.ncsu.edu</string>
		<string>-c</string>
		<string>bp.ncsu.edu</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>ServiceDescription</key>
	<string>gets afs tokens for cells at ncstate</string>
</dict>
</plist>


----
-- 
Everette Gray Allen		Systems Programmer II
ITD Computing Services	Macintosh Support Specialist
2620 Hillsborough St, Campus Box 7109
Raleigh, NC 27695-7109  AIM: EveretteAlln
919-515-4558		Everette_Allen@ncsu.edu