#!/bin/sh # # $Id$ # # Set 'time' to be number of seconds to wait for a required file to appear # This is only meaningful for files in AFS or NFS # time=60 # Set 'count to be the maximum number of times to wait for a required file # This is only meaningful for files in AFS or NFS # count=30 # Set OLBUSER to be the username to "su" to if the script is run as root # OLBUSER=$USER # Set OLBBASE to be the base directory where olbd version directories have been # installed. They all must be in the same base directory. # OLBBASE=/opt/xrootd # Set OLBVER to be the name of the default version directory. This directory # must be installed in the OLBBASE directory. It contains bin, etc, and lib. # OLBVER=prod # Set OLBPROG to be the name of the executable in the "bin" directory. The # start script uses '$OLBBASE/$OLBVER/bin/$OLBPROG' as the executable. # OLBPROG=olbd # Set OLBCONFIG the default config file name. Normally, this would be # '$OLBBASE/$OLBVER/etc/xrootd.cf'. # OLBCONFIGFN=$OLBBASE/$OLBVER/etc/xrootd.cf # Set 'OLBHOMEDIR' to be the working directory when olbd is started # OLBHOMEDIR=/var/adm/olbd/core # Set 'OLBLOGDIR' to be the directory where log files are placed and # Set 'OLBLOGFN' to be the base log file name. # OLBLOGDIR=/var/adm/xrootd/logs OLBLOGFN=olbdlog # Set 'OLBPIDFILE' to be where the pid file goes (it is check for w-access) # OLBPIDFILE=/tmp/olbd.pid #-#-#-#-#-#-#-#-# E N D O F C O N F I G U R A T I O N #-#-#-#-#-#-#-#-# # The following logic tries to set variables as follows: # MYOS - the current os name # MAXFD - the file descriptor limit # MYNAME - the current username # PROGRAM - the name of the start script # MYOS=`/bin/uname | /bin/awk '{print $1}'` if [ "$MYOS" = "SunOS" ]; then MAXFD=`ulimit -H -n` MYNAME=`/usr/ucb/whoami` else MAXFD=`ulimit -H -n | /bin/grep files | /bin/awk '{print $3}'` if [ "$MAXFD" = "" ]; then MAXFD=`ulimit -H -n` fi MYNAME=`/usr/bin/whoami` fi ############################################ PROGRAM=`echo $0 | /bin/awk '{n=split($0,x,"/"); print x[n]}'`