CORBA 2.3.7 Programmer's Guide for C++
environments, see the TS/MP System Management Manual (note that in TS/MP documentation, server pools are called
server classes). The following sample OSS script illustrates how the environment might be configured:
In the following script, the trace settings have been disabled by placing the comment character open bracket [ in front of
the line. For more information about tracing, see Tracing and Debugging Applications.
#
# Bank server PATHMON start-up and configuration script.
#
# Usage: start_server [-v] [-d]
#
# The -v option displays the input used to configure the server class.
# The -d option causes extra application output to be displayed.
# This output is directed to the file "server.log".
#
export PATHMON=smon
export SERVER_CLASS=BANK-SERVER
# Get options if supplied
while getopts ":vd" opt; do
case $opt in
v ) VERBOSE="-v" ;;
d ) APPL_TRACE_ENABLED="set server env BANK_CFG_LOG=TRUE" ;;
\? ) print "usage: start_server [-v] [-d]"
return 1
esac
done
shift $(($OPTIND - 1))
print "Configuring $SERVER_CLASS"
# Set G_HOMETERM to the terminal identifier on which standard
# output is displayed.
# When HOMETERM env variable is set the script used to fail.
# The format of the HOMETERM set will be checked for $<Telservname>.<Term>,
# if it is not of the required format then it will use the default
# HOMETERM set using who -m command
DEFAULT=$(echo $HOMETERM | awk -F "." '{ print (($1 ~ /^[$][A-Za-z0-9]+/) && ($2 ~
/^[#][A-Za-z0-9]+/));}')
if [[ $DEFAULT -eq 0 ]]; then
# HOMETERM variable was not set explicitly, construct
# the Guardian form of the home terminal identifier
#
# Get information about current terminal
if [[ -n "$HOMETERM" ]] then
print "Warning: The HOMETERM set externally is not of the format $<TelServ
name>.#<Term>."
print "Proceeding with the Default Term."
fi
ID=$(who -m)
# Strip off user name
TEMP=${ID#*\ }
# Get the terminal name