Net2/usr/src/contrib/isode/others/quipu/uips/sd/X29/startup

#!/bin/csh
set path = (/bin /usr/ucb)

# Name of the logfile
setenv LOGFILE CALL_LOG

# The directory name here should match the one the file lives in.
setenv HOME /usr/local/lib/public-widget

# These are just to make life a little more difficult for a hacker
setenv PAGER /bin/cat
setenv SHELL /bin/csh
setenv USER x29x500
setenv EDITOR /bin/false

cd $HOME

echo CALL `date` "    " `/bin/tty` $1 >> $LOGFILE

# Introductory message
#
/bin/cat <<END_OF_MESSAGE

UK.AC.BRUNEL.DIR

This is a public access point for the X.500 Directory service.

******* NEW USER INTERFACE
*******
******* On 17 January the widget user interface was replaced with
******* the sd (Screen Directory) interface.
*******
******* sd works in a similar way, but should be easier to use
******* Please let us know what you think

The user interface is an experimental one that operates in full-screen mode.
To do this, it needs to know what type of terminal you are using.
Most common types are understood, provided you type the name in lower-case
letters only. Examples are: vt100 vt52 tvi cif2605 xterm

Please give your terminal type now:
END_OF_MESSAGE

# Try to do something sensible about terminal types - difficult...
#
alias ts 'set noglob; eval `tset -s ?${TERM}`'

while ($TERM == network)
	ts
end

# Find size of remote xterm. (Fix pathname here to match your system)
# Delete this section if you do not have X
if ($TERM == xterm) then
        stty -echo
	eval /usr/local/lib/X11/share/bin/resize >/dev/null
	stty echo
endif

echo TERM `date` "    " `/bin/tty` $TERM $1 $2 >> $LOGFILE

echo "Running SD Directory Service"

# Either put a local copy of SD in this directory or change the pathname
# to match the normal installed copy
./xsd

# End of session message
cat <<END_OF_SIGNOFF

If you have any comments on the interface or the X.500 Directory service,
please mail them to X500@brunel

END_OF_SIGNOFF

echo "OFF " `date` "    " `/bin/tty` $TERM $1 >> $LOGFILE

# Delay before closing call, as some PADs clear screen and we want a chance
# to read the signoff message
sleep 2