#!/bin/sh
########################################################################
#                 copyright 2001, Amoco Production Company             #
#                             All Rights Reserved                      #
#                     an affiliate of BP America Inc.                  #
########################################################################
#
# This script is a part of FreeUSP - the UNIX Seismic Processing system.
#
#
# by default, auditting is turned off 
# it may be turned on for a particular program or user by setting USP_AUDIT 
# to a value other than "false". By default, auditting info goes to the
# file /tmp/.usp-audit. This may also be modified by setting the environment
# variable USP_AUDIT_FILE.
#
USP_AUDIT=${USP_AUDIT:="false"}
USP_AUDIT_FILE=${USP_AUDIT_FILE:="/tmp/.usp-audit"}
#
# This was added to keep hstd running. - Dec 1, 1999 - Joe M. Wade
#
if test "${DIST_PRODUCT}" = "hstd" 
then
. usp-set-env-old
. usp-generic-set-path-old
else
. usp-set-env
. usp-generic-set-path
fi

# if test ${OSARCH_OS:="not set"} = "Linux" 
# then
# echo "Portions of this program include material " > /dev/tty 2>&1
# echo -e "copyrighted by Absoft Corporation 1988-1997" > /dev/tty 2>&1
# fi

if test ${USP_AUDIT:-"not set"} != "false" 
then
  touch ${USP_AUDIT_FILE} > /dev/null 2>&1
  test -f ${USP_AUDIT_FILE} &&  \
  ( echo USP `uname -n -s -r` ${USER} `date +"%H:%M:%S %m/%d/%y"` ${APP} | awk '{printf("%3s : %s(%s/%s) : %6s : %s %s : %s\n",$1,$3,$2,$4,$5,$6,$7,$8)}' >> ${USP_AUDIT_FILE} ) > /dev/null 2>&1 & 
fi

