ES40 T64 V 5.0a PK3, TruCluster
This cluster is running Progress DB's (single instance).
Each user has a menu built dynamically at logon time
dependent on their group (ACL) membership.
The menu script is exec'ed from their .profile.
Just sometimes when a user logs in they receive the message
You have running jobs
and are then dropped out to a shell prompt.
Does anyone know why this should happen?
Menu script below for interest
#! /usr/bin/ksh
############################################################################
##
# XXXXXXXX user application menu script.
#
# Dependencies:
# 1) /usr/local/bin/top : Draws the screen background
# 2) /usr/local/bin/appmap : Provides the group membership
# to application start command mapping.
# Action: Collect user group membership from /etc/group and match these
# to the application names and start command in appmap.
# Draw menu options on screen dependent upon results of above.
#
# Lawrie Smith - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - December 2001
############################################################################
##
############################ Global Defines
##################################
# Input file seperator for READ
IFS=":"
# Screen controls
BLNK='\033[5m'
BOLD='\033[1m'
NRML='\033[0m'
RVSE='\033[7m'
ERSE='\033[2J'
CONN='\033[?25h'
COFF='\033[?25l'
# Line at which to Start the Application menu items list
MStartLn=6
# Continue until user chooses Quit
Iterate="TRUE"
# Number of applications found for $USER and Array index
integer UserAppsIndex
# Two Arrays, one for app descriptions and one for app start commands
set -A AppDescArr
set -A AppStartArr
############################ End Defines
#####################################
function GetMenuItems
{
# First Set the array counter
UserAppsIndex=0
# Iterate to collect all USER group memberships.
grep $USER /etc/group | cut -d: -f1 | \
while read a_group
do
# Now find any associated applications
grep $a_group /usr/local/bin/appmap | cut -d: -f2,3 | \
while read app_desc app_start
do
AppDescArr["$UserAppsIndex"]="$app_desc"
AppStartArr["$UserAppsIndex"]="$app_start"
(( UserAppsIndex += 1 ))
done
done
}
# Bye Bye
function Cherio
{
. /usr/local/bin/top
echo "\033[11;010H${RVSE}
"
echo "\033[12;010H${RVSE} No Application Data Found, Please contact the
Help Desk "
echo "\033[13;010H${RVSE}
"${NRML}
sleep 5
clear
echo ${CONN}
}
function PresentOptions
{
. /usr/local/bin/top
Displayed=0
CL="$MStartLn"
echo ${COFF}
# Set the display column and line increment depending on the
# number of applications made available
if (("${#AppDescArr[*]}" < 6))
then
LineInc=2
else
LineInc=1
fi
if (("${#AppDescArr[*]}" > 10))
then
CC="010H"
else
CC="020H"
fi
while (( "$Displayed" < "${#AppDescArr[*]}" ))
do
echo "\033[$CL;$CC${BOLD}$Displayed. ${NRML} " \
"${AppDescArr[$Displayed]}"
(( Displayed += 1 ))
(( CL += $LineInc ))
if (( "$Displayed" == 10 ))
then
CC="045H"
CL="$MStartLn"
fi
done
echo "\033[18;020H${BOLD}Q. ${NRML}Quit."
echo "\033[19;020H${BOLD}Enter Choice > ${NRML}"
echo ${CONN}
echo "\033[19;036H?"
echo "\033[19;036H\c"
}
function RunTheApp
{
clear
"${AppStartArr[$1]}"
}
#################### This is where it all happens.
############################
GetMenuItems
if (( ! $UserAppsIndex ))
then
# No permissions so bye bye.
Cherio
else
# Display application options, read choice and run it
while [[ $Iterate = "TRUE" ]]
do
PresentOptions
read choice
case $choice in
q|Q) Iterate="FALSE"
clear
;;
*) RunTheApp $choice
;;
esac
done
fi
################### Thats it folks !
##########################################
Kind regards
Lawrie Smith
Capita Technical Services
West Malling
email: lawrie.smith_at_capita.co.uk
Tel: 01732 877266
www.capita.co.uk
Capita Group LTD Tel: +44 (0)8705-234567
********************** N O T I C E ********************************************
The information in this message is confidential. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful.
We do not accept legal responsibility for the contents of this message and whilst any attachments to this message may have been checked for viruses, you should rely on your own virus checker and procedures.
If you contact us by e-mail, we will store your name and address to facilitate communications.
Any statements contained in this message are those of the individual and not the organisation.
*****************************************************************************
Received on Thu Jan 10 2002 - 12:16:31 NZDT