#
#     tiger - A UN*X security checking system
#     Copyright (C) 1993 Douglas Lee Schales, David K. Hess, David R. Safford
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 1, or (at your option)
#    any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#     Please see the file `COPYING' for the complete copyright notice.
#
#
# IRIX/4/config - 06/14/93
#
# Thanks to Steve Rikli for the revised config file
#
# jfs - 09/19/2003 - Added UUID and USERNAME definition
#
# ----------------------------------------------------------------------
#
UUID=`id -u`
USERNAME=`whoami`
export UUID USERNAME
AWK=/usr/bin/awk
export AWK
BASENAME=/bin/basename
export BASENAME
CAT=/bin/cat
export CAT
CC=/usr/bin/cc
export CC
CHMOD=/bin/chmod
export CHMOD
CHOWN=/bin/chown
export CHOWN
COMM=/usr/bin/comm
export COMM
DATE=/bin/date
export DATE
EGREP=/usr/bin/egrep
export EGREP
EXPR=/bin/expr
export EXPR
FILECMD=/bin/file
export FILECMD
FIND=/bin/find
export FIND
FMT=/bin/cat
export FMT
GETHOSTNAME='/bin/uname -n'
export GETHOSTNAME
GREP=/bin/grep
export GREP
GROUPSS=/usr/bin/groups
export GROUPSS
JOIN=/usr/bin/join
export JOIN
LN=/bin/ln
export LN
LS=/bin/ls
export LS
MV=/bin/mv
export MV
PS=/bin/ps
export PS
RM=/bin/rm
export RM
SED=/bin/sed
export SED
SORT=/bin/sort
export SORT
STRINGS=/bin/strings
export STRINGS
TAIL=/bin/tail
export TAIL
TR=/usr/bin/tr
export TR
UNAME=/bin/uname
export UNAME
UNIQ=/usr/bin/uniq
export UNIQ
PASTE=/usr/bin/paste
export PASTE
YPCAT=/usr/bin/ypcat
export YPCAT
WAIT=wait
export WAIT
DIFF=/bin/diff
export DIFF
MAILER=/usr/sbin/Mail
export MAILER
SENDMAILS="/usr/lib/sendmail"
SENDMAILCF="/usr/lib/sendmail.cf"
export SENDMAILS SENDMAILCF
#
# How to get different effects
#
DATECMD="$DATE +%y%m%d"
TIMECMD="$DATE +%H:%M"
export DATECMD TIMECMD
SGREP="$EGREP -s"
export SGREP
LSGROUP=-l
export LSGROUP
LSLINK=-L
export LSLINK
TESTLINK=-l
export TESTLINK
TESTEXEC=-x
export TESTEXEC
FINDXDEV=-mount
export FINDXDEV
#
# Geez... how can you compile anything in SGI's default mode
#
CFLAGS=-cckr
export CFLAGS
CLIBS=-lsun
export CLIBS
#
MAILSPOOL=/usr/mail
export MAILSPOOL
CRONTAB=/usr/spool/cron/crontabs
export CRONTAB
# This isn't implemented in IRIX.  -sr.
#ETCSHELLS=/etc/shell
#export ETCSHELLS

#
# Segment of code to find system specific tiger parts
#

CDIR="$BASEDIR/systems"
eval `
  while read var file
  do
    if [ -f "$CONFIG_DIR/$file" ]; then
      loc="$CONFIG_DIR"
    elif [ -f "$CDIR/$OS/$REL/$REV/$ARCH/$file" ]; then
      loc="$CDIR/$OS/$REL/$REV/$ARCH"
    elif [ -f "$CDIR/$OS/$REL/$REV/$file" ]; then
      loc="$CDIR/$OS/$REL/$REV"
    elif [ -f "$CDIR/$OS/$REL/$file" ]; then
      loc="$CDIR/$OS/$REL"
    elif [ -f "$CDIR/$OS/$file" ]; then
      loc="$CDIR/$OS"
    else
      loc=""
    fi
    if [ "$loc" != "" ]; then
      echo $var="$loc/$file;"
    else
      echo "$var=;"
    fi
    echo "export $var;"
  done << EOL
GETFS gen_mounts
GEN_PASSWD_SETS gen_passwd_sets
GEN_GROUP_SETS gen_group_sets
GEN_ALIAS_SETS gen_alias_sets
CHECK_CRON check_cron
GEN_BOOTPARAM_SETS gen_bootparam_sets
GEN_EXPORT_SETS gen_export_sets
GEN_SERVICES_SETS gen_services
GET_MOUNTS gen_mounts
SIGNATURE_FILE signatures
SERVICESFILE services
INETDFILE inetd
FILE_ACL file_access_list
SUID_LIST suid_list
REL_FILE_EXCP rel_file_exp_list
GEN_INETD_SETS gen_inetd
GETDISKS getdisks
EMBEDDEDLIST embedlist
GETUSERHOME getuserhome
EOL
`
