#!/bin/ksh

UNAME=/bin/uname
OSTYPE=`$UNAME -s`

###############################################
# OS Specific Utilities
###############################################
if [ "$OSTYPE" = "SunOS" ]; then
  AWK=/usr/bin/awk
  BASENAME=/usr/bin/basename
  CAT=/usr/bin/cat
  CHMOD=/usr/bin/chmod
  CLEAR=/usr/bin/clear
  CP=/usr/bin/cp
  CUT=/usr/bin/cut
  DATE=/usr/bin/date
  DD=/usr/bin/dd
  DIFF=/usr/bin/diff
  DIRNAME=/usr/bin/dirname
  DOMAINNAME=/usr/bin/domainname
  DU=/usr/bin/du
  ECHO=/usr/bin/echo
  EGREP=/usr/bin/egrep
  ENV=/usr/bin/env
  EXPR=/usr/bin/expr
  FIND=/usr/bin/find
  GETTEXT=/usr/bin/gettext
  GREP=/usr/bin/grep
  HEAD=/usr/bin/head
  HOSTNAME=/usr/bin/hostname
  ID=/usr/bin/id
  INSTALLF=/usr/sbin/installf
  KILL=/usr/bin/kill
  LINE=/usr/bin/line
  LN=/usr/bin/ln
  LS=/usr/bin/ls
  MKDIR=/usr/bin/mkdir
  MV=/usr/bin/mv
  NAWK=/usr/bin/nawk
  NETSTAT=/usr/bin/netstat
  PATCHADD=/usr/sbin/patchadd
  PKGADD=/usr/sbin/pkgadd
  PKGINFO=/usr/bin/pkginfo
  PRTCONF=/usr/sbin/prtconf
  PS=/usr/bin/ps
  PWDCMD=/usr/bin/pwd
  READ=/usr/bin/read
  RM=/usr/bin/rm
  SED=/usr/bin/sed
  SLEEP=/usr/bin/sleep
  STTY=/usr/bin/stty
  TAIL=/usr/bin/tail
  TEST=/bin/test
  TOUCH=/usr/bin/touch
  UNAME=/usr/bin/uname
  UNIQ=/usr/bin/uniq
  VMSTAT=/usr/bin/vmstat
  WC=/usr/bin/wc
fi

if [ "$OSTYPE" = "Linux" ]; then
  AWK=/usr/bin/awk
  BASENAME=/bin/basename
  CAT=/bin/cat
  CHMOD=/bin/chmod
  CLEAR=/usr/bin/clear
  CP=/bin/cp
  CUT=/bin/cut
  DATE=/bin/date
  DD=/usr/bin/dd
  DIFF=/usr/bin/diff
  DIRNAME=/usr/bin/dirname
  DOMAINNAME=/bin/domainname
  DU=/usr/bin/du
  ECHO=/bin/echo
  EGREP=/bin/egrep
  ENV=/usr/bin/env
  EXPR=/usr/bin/expr
  FIND=/usr/bin/find
  GETTEXT=/usr/bin/gettext
  GREP=/bin/grep
  HEAD=/usr/bin/head
  HOSTNAME=/bin/hostname
  ID=/usr/bin/id
  KILL=/bin/kill
  LN=/bin/ln
  LS=/bin/ls
  MKDIR=/bin/mkdir
  MV=/bin/mv
  NAWK=/bin/gawk
  NETSTAT=/bin/netstat
  PS=/bin/ps
  PWDCMD=/bin/pwd
  READ=read
  RM=/bin/rm
  SED=/bin/sed
  SLEEP=/bin/sleep
  STTY=/bin/stty
  TAIL=/usr/bin/tail
  TEST=/usr/bin/test
  TOUCH=/bin/touch
  UNAME=/usr/bin/uname
  UNIQ=/usr/bin/uniq
  VMSTAT=/usr/bin/vmstat
  WC=/usr/bin/wc
fi
##### End of OS Specific Utilities #####

###############################################
# Shared components locations
###############################################
if [ "$OSTYPE" = "SunOS" ]; then
  # search shared component
  KTSEARCH_LIB_DIR=/usr/share/lib

  # jss/nss/nspr shared component
  JSS_JAR_LIB_DIR=/usr/share/lib/mps/secv1
  JSS_NSS_NSPR_LIB_DIR=/usr/lib/mps/secv1

  JSS_CERT7_JAR_LIB_DIR=/usr/share/lib/mps
  JSS_NSS_NSPR_CERT7_LIB_DIR=/usr/lib/mps

  # jato shared component
  JATO_LIB_DIR=/usr/share/lib/jato

  # wireless shared component
  MA_CONFIG_DIR=/etc/opt/SUNWma
  MA_DIR=/opt/SUNWma
  MA_LIB_DIR=/opt/SUNWma/lib

  #im shared component
  IM_LIB_DIR=/usr/share/lib
fi

if [ "$OSTYPE" = "Linux" ]; then
  # search shared component
  KTSEARCH_LIB_DIR=/opt/sun/private/share/lib

  # jss/nss/nspr shared component
  JSS_JAR_LIB_DIR=/opt/sun/private/share/lib
  JSS_NSS_NSPR_LIB_DIR=/opt/sun/private/lib

  #Note on linux the cert7 version is not installed
  #So pointing to the cert 8 version now
  JSS_CERT7_JAR_LIB_DIR=/opt/sun/private/share/lib
  JSS_NSS_NSPR_CERT7_LIB_DIR=/opt/sun/private/lib

  # jato shared component
  JATO_LIB_DIR=/opt/sun/private/share/lib

  # wireless shared component
  MA_CONFIG_DIR=/etc/opt/sun/mobileaccess
  MA_DIR=/opt/sun/mobileaccess
  MA_LIB_DIR=/opt/sun/mobileaccess/share/lib

  #im shared component
  IM_LIB_DIR=/opt/sun/share/lib
fi
#####End of Shared components locations #####

###############################################
# Stack component locations
###############################################

if [ "$OSTYPE" = "SunOS" ]; then
  # Portal
  PS_PRODUCT_DIR=SUNWps
  PS_CONFIG_DIR=/etc/opt/SUNWps
  PS_VAR_DIR=/var/opt/SUNWps

  # Identity
  IDSAME_PRODUCT_DIR=SUNWam
  IDSAME_CONFIG_DIR=/etc/opt/SUNWam
  IDSAME_VAR_DIR=/var/opt/SUNWam
  IDSAME_SHARELIB_DIR=/usr/share/lib/identity

  # S1AS 70 App Server
  S1AS70_VAR_DIR=/var/opt/SUNWappserver7
fi

if [ "$OSTYPE" = "Linux" ]; then
  # Portal
  PS_PRODUCT_DIR=portal
  PS_CONFIG_DIR=/etc/opt/sun/portal
  PS_VAR_DIR=/var/opt/sun/portal

  # Identity
  IDSAME_PRODUCT_DIR=identity
  IDSAME_CONFIG_DIR=/etc/opt/sun/identity
  IDSAME_VAR_DIR=/var/opt/sun/identity
  IDSAME_SHARELIB_DIR=/usr/share/lib/identity

  # S1AS 70 App Server
  S1AS70_VAR_DIR=/var/opt/SUNWappserver7
fi
#####End of Stack component locations #####
