[daip] aips_gripe
Patrick P. Murphy
pmurphy at NRAO.EDU
Tue Jun 5 11:35:57 EDT 2001
On Tue, 5 Jun 2001 15:15:41 +0200 (MET DST), Chris Phillips
<phillips at jive.nl> said:
> {05-JUN-2001 15:08:30}
> {juw10 UN-REGISTERED!!!!!!!}
> { 702 31DEC00 SOL}
> {If you ssh into a remote host the display is automatically set. However,
> if seems that the form is not the usual WORKSTATION:0.0 but REMOTEHOST:10.0
Well, you caught me. I thought I had put the fix for this (the secure
shell X tunneling feature) into 31DEC01, but while I checked START_AIPS
out months ago, I never retrofited our local changes back into the
$SYSUNIX version. Note that the latter is only used by the installation
procedure, and once moved to your $AIPS_ROOT/ area, that script isn't
affected by MNJ changes.
I've now fixed it:
: orangutan_pmurphy; uname -a
Linux orangutan 2.2.19-6.2.1 #1 Mon Apr 9 21:59:11 EDT 2001 i686 unknown
: orangutan_pmurphy; echo $DISPLAY
:0
: orangutan_pmurphy; slogin valen -A
Last login: Tue Jun 5 09:28:58 2001 from orangutan.cv.nrao.edu
<snip motd>
: valen_pmurphy; echo $DISPLAY
valen:15.0
: valen_pmurphy; aips tpok pr=3
<snip usual stuff>
START_AIPS: You seem to be at a workstation called orangutan
TVDEVS.SH: Checking if orangutan is reachable via ssh...
TVDEVS.SH: Yes it is. Telling orangutan to start VERSION=TST
TVDEVS.SH: TV servers asynchronously with INET Socket...
TVDEVS.SH: ******************************************************
TVDEVS.SH: IF THIS FAILS, start AIPS yourself by hand on orangutan.
TVDEVS.SH: ******************************************************
<snip AIPS.MSG printout>
Starting up 31DEC01 AIPS with normal priority
Begin the one true AIPS number 2 (release of 31DEC01) at priority = 0
AIPS 2: You are assigned TV device/server 9
AIPS 2: You are assigned graphics device/server 9
AIPS 2: Enter user ID number
?XASERVERS: Start TV LOCK daemon TVSERV on orangutan
TVSERVER: Starting AIPS TV locking, Inet domain
XASERVERS: Start XAS on orangutan, DISPLAY orangutan:10.0
XASERVERS: Start graphics server TEKSRV on orangutan, DISPLAY orangutan:10.0
XAS: ** TrueColor FOUND!!!
XAS: Using screen width height 1270 924, max grey level 255
XAS: *** Using shared memory option for speed ***
XASERVERS: Start message server MSGSRV on orangutan, DISPLAY orangutan:10.0
370
Password:
AIPS 2: 31DEC01 AIPS:
AIPS 2: Copyright (C) 1995-2000 Associated Universities, Inc.
AIPS 2: AIPS comes with ABSOLUTELY NO WARRANTY;
AIPS 2: for details, type HELP GNUGPL
AIPS 2: This is free software, and you are welcome to redistribute it
AIPS 2: under certain conditions; type EXPLAIN GNUGPL for details.
AIPS 2: Previous session command-line history *not* recovered.
AIPS 2: TAB-key completions enabled, type HELP READLINE for details.
AIPS 2: Recovered POPS environment from last exit
>tvinit
>getn 1
AIPS 2: Got(1) disk= 1 user= 370 type=MA MANDLELBROT.MANDL.1
>tvlod
>
(the TVLOD worked).
I had a report from Cormac that 31DEC01 is installed there and will be
running a Midnight Job; good. What's needed is to merge the now fixed
START_AIPS that will come across on your next run (Thursday I think) with
what's in your $AIPS_ROOT area. Usually the only difference between the
latter and the $SYSUNIX version is the definition of $AIPS_ROOT, but you
or Cormac should check now before the new file comes across.
Technically, the way this now works depends on the SSH_CLIENT environment
variable being set. It is NOT and never will be flawless, but the now
modified code does work under most normal, predictable circumstances. In
particular, I'm not comfortable with the use of nslookup; especially as
it's essentially deprecated in favour of "host" and "dig" in newer
versions of bind. But nslookup is what most people have right now so I've
got to go with that.
I'll append the modified script here so you can get a head start on it.
- Pat
----------- cut here ----------
#!/bin/sh
#-----------------------------------------------------------------------
#; Copyright (C) 1995-1998, 2000-2001
#; Associated Universities, Inc. Washington DC, USA.
#;
#; This program is free software; you can redistribute it and/or
#; modify it under the terms of the GNU General Public License as
#; published by the Free Software Foundation; either version 2 of
#; the License, or (at your option) any later version.
#;
#; This program is distributed in the hope that it will be useful,
#; but WITHOUT ANY WARRANTY; without even the implied warranty of
#; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#; GNU General Public License for more details.
#;
#; You should have received a copy of the GNU General Public
#; License along with this program; if not, write to the Free
#; Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
#; MA 02139, USA.
#;
#; Correspondence concerning AIPS should be addressed as follows:
#; Internet email: aipsmail at nrao.edu.
#; Postal address: AIPS Project Office
#; National Radio Astronomy Observatory
#; 520 Edgemont Road
#; Charlottesville, VA 22903-2475 USA
#-----------------------------------------------------------------------
# Usage: START_AIPS [OLD, NEW, or TST]
# [TV=[disp][:][host]] [usock [unew]] [tvok] [notv]
# [DA=host,host,...] [DA=default]
# [TP=tphost,tphost,...] [tpok]
# [PR=lpdev]
# [NORL] [NOEX] [options passed to AIPSEXEC]
#-----------------------------------------------------------------------
# This script defines AIPS system variables and starts AIPS.
#
# Options: TV=d:h for the name of an AIPS TV to use. See TVDEVS.SH.
# "d" is the display host, "h" is the TV host. The
# default display host will be set by the DISPLAY
# environment variable (or if not set, current host).
# The default TV host is the current (login) host.
# If DISPLAY is, e.g. FOO:10.1, the number is used
# appropriately when launching the servers.
# TV=local Use Unix based sockets for TV and other servers.
# TV=local:n Specify which local Unix socket TV to use; n=0
# means a new instance higher than existing numbers.
# NOTE: Use extended hex, e.g. A for 10, Z for 35
# USOCK Obsolete version of TV=local.
# UNEW Obsolete version of TV=local:0
# NOTV if no TV is wanted. Also inhibits MSGSRV,TEKSRV
# TVOK to inhibit re-launching of TV, msg, tek servers
# OLD for the OLD version of AIPS, passed to AIPSEXEC
# NEW for the NEW version of AIPS, passed to AIPSEXEC
# TST for the TST version of AIPS, passed to AIPSEXEC
# CVX for the CVX version of AIPS, passed to AIPSEXEC
# REMOTE forces NOTV, passed to AIPSEXEC (also REM or TEK)
# DA=xxx Use disks from machine xxx in addition to local
# and required ones. See DADEVS.SH/PL for more...
# TP=xxx Make sure tape servers are running on machine xxx.
# TPOK Inhibit launching of TPMON's on LOCAL machine
# PR=xxx Select initial printer number xxx (see PRDEVS.LIST)
# NORL Disable use of GNU readline library for AIPS input.
# NOEX Defer AIPS execution; passed to AIPSEXEC
#
# Environment Variables:
# AIPSREMOTE Set to the remote shell command. If this variable
# is non-blank, it will override the definition of
# REMOTE_CMD. This allows per-user use of, for
# example, the secure shell (ssh) for starting remote
# daemons.
#
# NOTE: As of March 28, 2001 this script ONLY
# supports the secure shell. To override this (with,
# e.g. rsh, if you must, and you shouldn't), use the
# AIPSREMOTE variable.
#
# Notes: While every effort is made by this script to figure out if you
# are on a remote login link, there is *NO* portable and
# reliable way of doing this. Startup of TV or tape servers on
# remote hosts is NOT a feature that is likely to work without a
# significant amount of work on the part of the user.
#
# Also, it is ASSUMED that the REMOTE_ROOT (remote host's
# AIPS_ROOT) will be /AIPS unless the user has already set it.
# Change this default below as needed.
# The AIPS users SHOULD be starting their TV's locally first
# before initiating a remote AIPS session, and using TVOK on
# the aips startup command line.
#-----------------------------------------------------------------------
# Set the AIPS root directory.
AIPS_ROOT=/DEFINE_ME
# Set what it should be remotely
# CHANGE THIS if necessary.
if [ "$REMOTE_ROOT" = "" ] ; then
REMOTE_ROOT=/AIPS
fi
# Specify command used for remote
# shell (TV startup, TPMON).
# Only use secure shell!!!
REMOTE_CMD=ssh
if [ "$AIPSREMOTE" != "" ] ; then
REMOTE_CMD=$AIPSREMOTE
case $REMOTE_CMD in
*ssh*) ;;
*) echo "WARNING: overriding the remote shell command 'ssh'"
echo " with $REMOTE_CMD."
echo " This may raise security concerns." ;;
esac
fi
# Only change these if you know
# what you're doing...
USEUNIXSOCK=NO
NEWUNIXSOCK=NO
#
# --------------- do not change anything below this line ---------------
#
export AIPS_ROOT REMOTE_ROOT USEUNIXSOCK NEWUNIXSOCK UNIXTVN
# Shortcuts for output text.
ei1 () {
echo "START_AIPS: $*"
}
# Posix: echo behaves differently
# Following trick from Martin
# Shepherd (mcs at astro.caltech.edu)
# and Will Deich.
ni1 () {
if [ "`echo -n YES`" = "YES" ] ; then
echo -n "START_AIPS: $*"
else
echo "START_AIPS: $*\c"
fi
}
spc() {
echo " "
}
if [ ! -d $AIPS_ROOT ] ; then
ei1 "AIPS_ROOT is not a directory; cannot start AIPS."
exit 2
fi
# Who am I?
. $AIPS_ROOT/HOSTS.SH
#
if [ "$ARCH" = UNKNOWN -o "$ARCH" = "" ] ; then
ei1 "$HOST is not defined in HOSTS.LIST; cannot start AIPS."
exit 2
fi
if grep "^+ $HOST" $AIPS_ROOT/HOSTS.LIST >/dev/null 2>/dev/null ; then
: proceed
else
ei1 "$HOST is not a valid AIPS host and cannot run AIPS."
exit 1
fi
# BROWZ and aipsXtra, add-ons to
# AIPS from Chris Flatters
aipsXtra="$AIPS_ROOT/bin/aipsXtra-setup"
if [ -f $aipsXtra ] ; then
. $aipsXtra
fi
# Initial selection is no TV.
TVOPT=""; export TVOPT
TPOPT=""; export TPOPT
OPTIONS=""; export OPTIONS
TVOK=""
TPOK=""
LPOPT=0
REMOTE=""
UNIXTVN=0
for option in $* ; do
opt=`echo $option | tr '[A-Z]' '[a-z]'`
arg=`echo $option | sed -e 's/^...//'`
# Which version of AIPS to run.
case $opt in
old) VERSION=OLD; export VERSION;;
new) VERSION=NEW; export VERSION;;
tst|test) VERSION=TST; export VERSION;;
# CVX became TST in 15APR98...
cvx) VERSION=TST; export VERSION;;
# No tv wanted, or already ok
notv) TVOPT=NONE;;
tvok) TVOK="YES";;
# Data areas.
da=*) DAOPT=$arg; export DAOPT;;
# TV host and/or display.
tv=*)
case $arg in
local) USEUNIXSOCK=YES;;
local:*)
USEUNIXSOCK=YES
arg2=`echo $arg | awk -F: '{print $2}' | tr '[a-z]' '[A-Z]'`
[ "$DEBUG" = "YES" ] && ei1 "TV=local:$arg2 found"
case $arg2 in
0) NEWUNIXSOCK=YES;;
[1-9A-Z])
case $arg2 in
[1-9A-Z]) UNIXTVN=$arg2
[ "$DEBUG" = "YES" ] && ei1 "UNIXTVN=$arg2";;
esac;;
*) ;;
esac;;
*) TVOPT=$arg;;
esac
;;
# Printer selection.
pr=*) LPOPT=$arg; export LPOPT;;
# Tape server selection or none
tp=*) TPOPT=$arg;;
tpok) TPOK="YES";;
# Disable GNU readline library
norl) READLINE=NO; export READLINE;;
# Options to be passed to AIPSEXEC.
# Defer AIPS execution
noex) OPTIONS="$OPTIONS NOEX"; export OPTIONS;;
# Remote TEK screen
remote|rem|tek) OPTIONS="$OPTIONS REMOTE"; TVOPT=NONE; REMOTE=YES;;
usock|us) USEUNIXSOCK=YES
ei1 "Please use TV=LOCAL instead of USOCK";;
unew|un) NEWUNIXSOCK=YES
ei1 "Please use TV=LOCAL:0 instead of UNEW";;
*) OPTIONS="$OPTIONS $option"; export OPTIONS;;
esac
done
if [ $USEUNIXSOCK = YES ] ; then
if [ $NEWUNIXSOCK = YES ] ; then
ei1 "Will start a new Unix Socket based TV"
else
if [ "$UNIXTVN" != "0" ] ; then
utn=`REHEX $UNIXTVN`
ei1 "Will use Unix Socket based TV number $utn"
else
ei1 "Will use or start first available Unix Socket based TV"
fi
fi
else
if [ $NEWUNIXSOCK = YES ] ; then
USEUNIXSOCK=YES
ei1 "Will start a new Unix Socket based TV"
else
NEWUNIXSOCK=NO
fi
fi
if [ $USEUNIXSOCK = YES ] ; then
if [ "$DISPLAY" = "" ] ; then
ei1 "You must have DISPLAY defined to use local TV's"
exit 1
else
hname=`uname -n | awk -F. '{print $1}' | tr '[A-Z]' '[a-z]'`
TVOPT="`echo $DISPLAY | awk -F: '{print $1}'`:$hname"
fi
fi
# Default version of AIPS to run.
# 15JAN95 and later releases need
# to have TVDEVS.KLUDGE copied to
# $AIPS_ROOT/TVDEVS.SH if they are
# to co-exist with older versions.
[ "$VERSION" = "" ] && VERSION=TST
export VERSION
# Define AIPS user environment.
. $AIPS_ROOT/AIPSPATH.SH
. $AIPS_ROOT/AIPSASSN.SH
# See how many printers there are.
lpfile=$NET0/PRDEVS.LIST
if [ -f $lpfile ] ; then
LPDEVS=`grep '^[^# ]' $lpfile | grep -v '$PRINTER' | wc -l`
LPDEVS=`eval echo $LPDEVS`
export LPDEVS
else
# We need this file!
ei1 "Cannot proceed: $lpfile file not found!"
exit 1
fi
# Printer choice if more than one
if [ $LPDEVS -gt 1 ] ; then
n=$LPOPT
if [ $LPOPT -ge 1 -a $LPOPT -le $LPDEVS ] ; then
# Get single printer definition
: ok
elif [ $LPOPT -ne 0 ] ; then
ei1 "Sorry, there is no printer number $LPOPT (only 1 - $LPDEVS)"
n=0
fi
if [ $n -eq 0 ] ; then
spc
echo "You have a choice of $LPDEVS printers. These are:"
spc
echo " No. [ type ] Description"
echo "-------------------------------------------------------------"
grep '^[^# ]' $lpfile | awk '{
skipit=0;
for (k=4; k<=NF; k++) {
if ($k ~ /\$/) skipit=1;
}
if (skipit == 0) {
printf(" %2d. [%7s] ", NR, $2);
for (j=4; j<=NF; j++) printf "%s ", $j;
printf("\n");
}
}'
echo "-------------------------------------------------------------"
# While user is mulling over this,
# figure out the default
ndef=`grep '^[^# ]' $lpfile | awk '{if ($3 ~ /DEF/) print NR}' | \
head -1`
[ "$ndef" = "" ] && ndef=1
# and any BIG printer
nbig=`grep '^[^# ]' $lpfile | awk '{if ($3 ~ /BIG/) print NR}' | \
head -1`
if [ "$nbig" != "" ] ; then
BIGPRINT=$nbig
export BIGPRINT
# Haven't tested this in all cases
BIGTHRESH=`grep '^[^# ]' $lpfile | \
awk '{if ($3 ~ /BIG/) print $3}' | head -1 | \
sed -e 's/BIG=\([0-9]\{1,5\}\).*/\1/'`
fi
spc
n=0
while [ $n -eq 0 ] ; do
ni1 "Enter your choice, or the word QUIT [default is $ndef]: "
read n
[ "$n" = "" ] && n=$ndef
[ $n = "QUIT" -o $n = "quit" ] && exit
if [ "$n" -lt 1 -o "$n" -gt $LPDEVS ] ; then
ei1 "Please enter a number from 1 to $LPDEVS (or QUIT)"
spc
n=0
fi
done
fi
else
n=1
if [ "$LPOPT" != "" ] ; then
[ "$LPOPT" = 0 ] && LPOPT=1
if [ "$LPOPT" != "1" ] ; then
ei1 "Only one printer configured, cannot choose printer $LPOPT"
fi
fi
fi
LPDEV=$n
LPNAM=`grep '^[^# ]' $lpfile | awk '{if (NR == '$n') print $1}'`
PRTYPE=`grep '^[^# ]' $lpfile | awk '{if (NR == '$n') print $2}'`
LPOPT=`grep '^[^# ]' $lpfile | awk '{if (NR == '$n') print $3}'`
LPDESC=`grep '^[^# ]' $lpfile | awk '{if (NR == '$n') for (j=4; j<=NF; j++) printf "%s ", $j;}'`
export LPDEV LPNAM PRTYPE LPOPT LPDESC
ei1 "Your initial AIPS printer is the $LPDESC"
ei1 " - system name $LPNAM, AIPS type $PRTYPE"
# Allocate data disks.
spc
ei1 "User data area assignments:"
# If have perl, do it the fast way
pid=$$
if [ "$TMPDIR" = "" ] ; then
tmpfil=/tmp/DADEVS.$pid
else
tmpfil=$TMPDIR/DADEVS.$pid
fi
[ "$HAVE_PERL" != "" ] && $SYSUNIX/DADEVS.PL $$
if [ -f $tmpfil ] ; then
. $tmpfil
rm -f $tmpfil
else
# If not or if it broke, fall back
. $SYSUNIX/DADEVS.SH
fi
if [ "$NVOL" = "0" -o "$DA01" = "" ] ; then
ei1 "Cannot start AIPS because there are no defined data areas!"
ei1 "(check DADEVS.LIST or .dadevs files, or AIPSASSN.\*)"
exit 1
fi
# Define Tape drives
. $SYSUNIX/TPDEVS.SH
# Use default TV display? Check
# for blank or :* in command line.
case $TVOPT in "" | :*)
# Are we sitting in front of a
# workstation?
[ "$TERM" = "" ] && TERM=unknown
case $TERM in
sun*|*xterm*|*hpterm|dtterm|iris*)
# Is this a slogin from a display
# workstation? First check if
# DISPLAY is set.
# Secure shell may be forwarding X
if [ "$DISPLAY" != "" -a "$SSH_CLIENT" = "" ] ; then
WORKST=`echo $DISPLAY | awk -F: '{print $1}'`
# Tackle <blank>:* and unix:*...
[ "$WORKST" = "unix" -o "$WORKST" = "" ] && \
WORKST=`uname -n | awk -F. '{print $1}'`
# If so, do this
elif [ "$DISPLAY" != "" -a "$SSH_CLIENT" != "" ] ; then
# Get the IP address
WORKST=`echo $SSH_CLIENT | awk '{print $1}'`
# Now convert to hostname if poss.
# (nslookup replaced by host cmd!)
# Yes, this is a hack.
PATH=$PATH:/usr/sbin
WORKST=`nslookup $WORKST | grep '^Name:' | awk '{print $2}'`
# Finally, get simple hostname
WORKST=`echo $WORKST | awk -F. '{print $1}'`
else
# DISPLAY not set. Sigh... See if
# we can find where user came from
# This method WILL fail often. On
# AIX 3.1 and Solaris 2.3, utmp is
# not properly cleared out and
# hence the "head -1".
cmd="who am i"
# HP's do it differently.
[ "$ARCH" = "HP" ] && cmd="who -R am i"
[ "$ARCH" = "HP2" ] && cmd="who -R am i"
# Get the remote host field if any
WORKST=`$cmd | head -1 | awk -F\( '{print $2}' | sed -e 's/)//'`
# If none, use simple hostname
[ "$WORKST" = "" ] && WORKST=`uname -n | awk -F. '{print $1}'`
# Tackle as many possibilities as
# possible.
case $WORKST in
:* | unix:*) WORKST=`uname -n | awk -F. '{print $1}'` ;;
*:*) WORKST=`echo $WORKST | awk -F: '{print $1}'` ;;
[0-9]*.[0-9]*) ;;
*.*) WORKST=`echo $WORKST | awk -F. '{print $1}'` ;;
esac
# This should NEVER happen, but...
[ "$WORKST" = "${USER-$LOGNAME}" ] && \
WORKST=`uname -n | awk -F. '{print $1}'`
fi
ei1 "I am GUESSING you are at a workstation called $WORKST"
if [ $USEUNIXSOCK = YES ] ; then
ei1 " - but have chosen to run the TV locally on $HOST"
else
TVOPT=$WORKST$TVOPT
fi
;;
*)
# Reserved terminals (rarely used)
ttynam="`tty 2>/dev/null`"
if [ "$ttynam" = "$RESSTT1" ] ; then
ei1 "You are at reserved terminal 1."
TVOPT=$TVTT1
elif [ "$ttynam" = "$RESSTT2" ] ; then
ei1 "You are at reserved terminal 2."
TVOPT=$TVTT2
elif [ "$ttynam" = "$RESSTT3" ] ; then
ei1 "You are at reserved terminal 3."
TVOPT=$TVTT3
else
# Disable image display.
TVOPT=NONE
ei1 "You do not seem to be at a workstation (TERM=$TERM)"
fi
;;
esac
export TVOPT
;;
esac
# Start AIPS TV Servers (if any).
[ "$DEBUG" = "YES" ] && ei1 "Using $AIPS_ROOT/TVDEVS.SH"
. $AIPS_ROOT/TVDEVS.SH
if [ "$TVOPT" != NONE ] ; then
# Determine TV servers to use.
case $TVALT in
# Don't do it on hardwired TV's.
TVALT?4) ;;
*)
if [ "$TVOK" = "YES" ] ; then
ei1 "Assuming TV servers are already started (you said TVOK)"
else
if [ "$TVHOST" = "`uname -n | awk -F. '{print $1}'`" ] ; then
ei1 "Starting TV servers on $TVHOST asynchronously"
if [ "$USEUNIXSOCK" = YES ] ; then
if [ "$NEWUNIXSOCK" = YES ] ; then
ei1 " - WITH Unix Sockets (new instance) as requested..."
else
ei1 " - WITH Unix Sockets as requested..."
fi
$AIPS_ROOT/START_TVSERVERS $TVOPT $VERSION UNIX &
else
ei1 " - with Internet Sockets..."
$AIPS_ROOT/START_TVSERVERS $TVOPT $VERSION INET &
fi
elif [ "$TVHOST" != NONE ] ; then
# Do it on the remote host.
# Need .rhosts setup to do this.
ei1 "Checking if $TVHOST is reachable via $REMOTE_CMD..."
if $REMOTE_CMD $TVHOST echo "Checking" >/dev/null 2>/dev/null
then
ei1 "Yes it is. Telling $TVHOST to start VERSION=$VERSION"
ei1 "TV servers asynchronously with INET Socket..."
ei1 "******************************************************"
ei1 "IF THIS FAILS, start AIPS yourself by hand on $TVHOST."
ei1 "******************************************************"
$REMOTE_CMD $TVHOST -n \
$REMOTE_ROOT/START_TVSERVERS $TVOPT $VERSION INET &
else
ei1 "Cannot start remote TV servers on $TVHOST, sorry!"
ei1 "remote command gave this error:"
$REMOTE_CMD $TVHOST echo "This won't work"
case $REMOTE_CMD in
*ssh*)
ei1 "check your secure shell setup, in particular"
ei1 "whether you have a passphrase enabled. You may"
ei1 "wish to try '$REMOTE_CMD -v $TVHOST pwd' to see"
ei1 "what the problem is."
;;
*)
ei1 "You may want to consider using the secure shell"
ei1 "for remote startup of AIPS TVs. If you cannot,"
ei1 "start an AIPS session on $TVHOST first, then come"
ei1 "back here and say 'aips tv=$TVHOST tvok'"
;;
esac
fi
fi
fi
;;
esac
fi
if [ "$TVOPT" = NONE ] ; then
ei1 "No TV selected; operating in dumb terminal mode."
fi
# Start local tape servers.
if [ "$TPOK" = "YES" ] ; then
ei1 "Assuming TPMON daemons are running or not used (you said TPOK)"
else
ei1 "Starting TPMON daemons on $HOST asynchronously..."
$AIPS_ROOT/START_TPSERVERS &
fi
# Start AIPS tape servers.
if [ "$TPOPT" != "" ] ; then
# Convert to lowercase, and strip
# non-alphanumerics.
TPOPT=`echo $TPOPT | tr '[A-Z]' '[a-z]' | sed -e 's/[^a-z0-9]/ /g'`
for TPHOST in $TPOPT ; do
ei1 "Checking if I can reach tape host $TPHOST via $REMOTE_CMD..."
if $REMOTE_CMD $TPHOST echo "Checking" >/dev/null 2>/dev/null ; then
ei1 "Yes I can. Telling $TPHOST to start TPMON servers..."
ei1 "(This will allow you to use tape drives on $TPHOST)"
ei1 "******************************************************"
ei1 "IF THIS FAILS, start AIPS yourself by hand on $TVHOST."
ei1 "******************************************************"
$REMOTE_CMD $TPHOST -n $REMOTE_ROOT/START_TPSERVERS &
else
ei1 "Cannot start remote tape servers on $TPHOST, sorry!"
ei1 "remote command gave this error:"
$REMOTE_CMD $TPHOST echo "This won't work"
case $REMOTE_CMD in
*ssh*)
ei1 "check your secure shell setup, in particular"
ei1 "whether you have a passphrase enabled. You may"
ei1 "wish to try '$REMOTE_CMD -v $TPHOST pwd' to see"
ei1 "what the problem is."
;;
*)
ei1 "You may want to consider using the secure shell"
ei1 "for remote startup of TPMON daemons. If you cannot,"
ei1 "start an AIPS session on $TPHOST first, then come"
ei1 "back here and use the 'tpok' option in your startup."
ei1 "(see 'man aips' or HELP AIPS for more details)"
;;
esac
fi
done
fi
# Environment variables for X11
# programs started within AIPS
if [ -z "$XBMLANGPATH" ] ; then
XBMLANGPATH=$AIPS_ROOT/bitmaps/%B
else
XMBLANGPATH=$AIPS_ROOT/bitmaps/%B:$XBMLANGPATH
fi
if [ -z "$XFILESEARCHPATH" ] ; then
XFILESEARCHPATH=$AIPS_ROOT/%T/%N
else
XFILESEARCHPATH=$XFILESEARCHPATH:$AIPS_ROOT/%T/%N
fi
export XBMLANGPATH
export XFILESEARCHPATH
# Finally, start AIPS.
exec AIPSEXEC $OPTIONS
More information about the Daip
mailing list