Listing 2: Sample /etc/profile
#
# Sample /etc/profile
#
trap '' 1 2 3 # turn off signals ... they are ignored
#
# ... system commands here
#
#
# track login
LOGNAME=`logname`
TTY=`tty`
export LOGNAME TTY
echo "LOGIN .$LOGNAME.$TTY.`date`" >> /usr/adm/logins
trap 1 2 3 # signals are restored
#
# set the trap for logout
#
trap "/usr/local/checkout $LOGNAME $TTY" 0
|