#!/bin/tcsh -f

############################ afs-login.sh ##########################
# Mike Bydalek | mbydalek at contentconnections com
# Use 'defaults write com.apple.loginwindow LoginHook' to make this
# script run upon user login.
####################################################################
# very minor mods by bil hays (bil_hays at unc edu)
############


### Description ###
#
# This script runs aklog for the particular user upon logging in
# to grab AFS tokens.

### Debug/testing sanity check ###
if ( $#argv < 1 ) then
        echo "No user specified!"
        exit 1
endif

### Script action ###
# We just need to run aklog
/usr/local/bin/aklog
su $1 -c /usr/local/bin/aklog

### Always exit with 0 status
exit 0

