Cover V09, I04
Article
Listing 1
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Figure 1

apr2000.tar


Listing 1: startup

#!/bin/sh
#################################################################
# "@(#)startup"        
# Shellprogram : startup
# Description  : Start shell for users 
# Function     : Depending on which value TERM variable have,  
#              : the right startscript for the application starts.
# Date         : 991009
# Author       : Mats Brymér WM-data
# Version      : 1.0
#################################################################


#
# Shell variable
#

trap 'kill -9 0' 1 2 3 5 15

TOP=/usr/local;export TOP
LOG=$TOP/log/startup;export LOG
if [ -f /etc/TIMEZONE ]
then
. /etc/TIMEZONE 
fi

#
# Write to logfile
#

echo `date`,`id`,$TERM,$SHELL >>$LOG

#
# Choose of application
#

case $TERM in

appl1) exec $TOP/bin/startappl1;;
appl2) exec $TOP/bin/startappl2;;
sysuser) exec $TOP/bin/startsysuser;;
*) echo "Access deneid, contact Helpdesk"
echo "CHECK,`date`,`last $LOGNAME|head -1`">>$LOG
echo "CHECK,`date`,`id`,$TERM">>$LOG
exit
esac