:

# Copyright 1988-1990 Network Computing Devices, Inc.  All rights reserved.

#ident "@(#)install	13.6	90/08/20"

# set -x

#  Define the release
RELEASE="2.2.0"
RELEASE_DIR="Xncd.$RELEASE"

#  Define the target directories.
TFTP_RESTRICTED=false
TFTP_DIR="/tftpboot"
MOP_DIR="/usr/lib/mop"		# or /usr/lib/dnet/*.sys
FONT_DIR="/usr/lib/X11"

#
#  Define exit codes.
#
EXIT_NOT_SUPER_USER=1
EXIT_QUIT=2
EXIT_FAILED=3
EXIT_INTRUP=4

#
#  We need to be able to report what is not yet installed.
#
NOT_YET="Neither the server image(s) nor the fonts have been installed."

#
#  Enable HUP, DEL, INT, and TERM
#
trap "exit $EXIT_INTRUP" 1 2 3 15
trap "echo; echo \$NOT_YET; rm -f tf.$$ /tmp/ps.$$" 0

#
#  Define variables used to display text and to ask questions.
#
if test -r /usr/ucb/fmt
then
    SAY="/usr/ucb/fmt"
else
    SAY="cat"
fi
ASK="echo -n"
X=`$ASK XxX`
if test "$X" != "XxX"
then
    ASK="echo; echo"
else
    ASK="echo; $ASK"
fi

#
#  Figure out how to see what's running.
#

echo "Just a moment, please."

PS_OPTS="-ax"
(ps $PS_OPTS | grep '^  *1 .*init') > /dev/null 2>&1
if test $? -eq 1
then
    PS_OPTS="-e"
    (ps $PS_OPTS | grep '^  *1 .*init') > /dev/null 2>&1
    if test $? -eq 1
    then
	PS_OPTS=""
    fi
fi

#
#  Describe conventions.
#
( echo
  echo "When questions are asked they will contain a string in square brackets"
  echo "right before the question mark.  This is the default response -- that"
  echo "is the response that will be assumed if you simply depress return."
  echo
  echo "Any time a question is asked you may respond with q, quit, Q, or QUIT"
  echo "to terminate this installation script.  If you are being asked for a"
  echo "file or directory name and want to use one of these as a response,"
  echo "simply preceed it with ./ (e.g. ./q)."
) | $SAY


#
#  Do our best to make sure we're running as root.
#
if test -r /bin/id
then
    ID=`/bin/id`
else
    if test -r /usr/bin/id
    then
	ID=`/usr/bin/id`
    fi
fi
if test "$ID"
then
    ID=`expr "$ID" : "uid=\([0-9]*\)("`
    if test "$ID" = ""
    then
	ID=-1
    fi
else
    ID=-1
fi

if test $ID -ne 0
then
    ( echo
      echo "You need to be logged in as root (uid=0) to perform this"
      echo "installation.  It cannot be determined that you are logged in"
      echo "as root."
    ) | $SAY
    eval $ASK "Are you logged in as root [n]?"
    read ANSWER
    case "$ANSWER" in
	y| yes| Y| YES)
	    ;;
	q| quit| Q| QUIT)
	    exit $EXIT_QUIT
	    ;;
	*)
	    exit $EXIT_NOT_SUPER_USER
	    ;;
    esac
fi

#
#  See what networking utilities are on this system.
#

( echo
  echo "The NCD server must be placed on a system that supports a minimum"
  echo "set of network utilities.  We'll now see if we can determine which"
  echo "network utilities are available.  Please be patient..."
) | $SAY

#
#  Snapshot the state of the system.  This is necessary in order to
#  save hugh amounts of time on systems where ps is expensive.
#
ps $PS_OPTS > /tmp/ps.$$

#
#  First see if we have inetd
#
if grep inetd /tmp/ps.$$ > /dev/null
then
    INETD_PRESENT=true
else
    INETD_PRESENT=false
fi

#
#  See if we have BOOTP
#
if grep '^bootp' /etc/inetd.conf > /dev/null 2>&1
then
    BOOTP_PRESENT=$INETD_PRESENT
else
    if grep bootp /tmp/ps.$$ > /dev/null
    then
	BOOTP_PRESENT=true
    else
	BOOTP_PRESENT=false
    fi
fi
#
#  See if we have RARP
#
if grep '^rarp' /etc/inetd.conf > /dev/null 2>&1
then
    RARP_PRESENT=$INETD_PRESENT
else
    if grep rarpd /tmp/ps.$$ > /dev/null
    then
	RARP_PRESENT=true
    else
	RARP_PRESENT=false
    fi
fi
#
#  See if we have TFTP
#
if grep '^tftp' /etc/inetd.conf > /dev/null 2>&1
then
    TFTP_PRESENT=$INETD_PRESENT
else
    if grep tftpd /tmp/ps.$$ > /dev/null
    then
	TFTP_PRESENT=true
    else
	TFTP_PRESENT=false
    fi
fi
#
#  See if we have MOP
#
if grep mop_mom /tmp/ps.$$ > /dev/null
then
    MOP_PRESENT=true
else
    MOP_PRESENT=false
fi
#
#  See if we could boot
#
if test \( \( $BOOTP_PRESENT = true -o $RARP_PRESENT = true \) -a \
$TFTP_PRESENT = true \) -o $MOP_PRESENT = true
then
    CAN_BOOT=true
else
    CAN_BOOT=false
fi

#
#  Make sure there's a server image here before we get too excited about
#  installing it.
#
if test -d "$RELEASE_DIR"
then
    if test $CAN_BOOT = false
    then
	#
	#  If we cannot operate as a boot server, better ask.
	#
	( echo
	  echo "This system does not appear to be capable of operating as"
	  echo "a boot server.  This is based on a quick look at the files"
	  echo "in /etc and the processes that are running.  It could be that"
	  echo "the appropriate network utilities are not enabled."
	) | $SAY
	eval $ASK "Do you want to install the server image [y]?"
	read ANSWER
	case "$ANSWER" in
	    n| no| N| NO)
		INSTALL_SERVER=false
		;;
	    q| quit| Q| QUIT)
		exit $EXIT_QUIT
		;;
	    *)
		INSTALL_SERVER=true
		;;
	esac
    fi
    if $INSTALL_SERVER
    then
	#
	#  If mop exists, ask if it's to be used.
	#
	if $MOP_PRESENT
	then
	    ( echo
	      echo "NCD units can either be booted using a combination of TFTP"
	      echo "and either BOOTP or RARP or they can be booted via MOP"
	      echo "(which is a DECnet utility)."
	    ) | $SAY
	    eval $ASK "Do you want to use MOP [n]?"
	    read ANSWER
	    case "$ANSWER" in
		y| yes| Y| YES)
		    USE_MOP=true
		    ;;
		q| quit| Q| QUIT)
		    exit $EXIT_QUIT
		    ;;
		*)
		    USE_MOP=false
		    ;;
	    esac
	else
	    USE_MOP=false
	fi
	#
	#  See if we can detect where tftp wants its files.
	#
	if $USE_MOP
	then
	    SERVER_DIR="$MOP_DIR"
	else
	    if test -r /etc/inetd.conf
	    then
		SERVER_DIR=`grep '^tftp' /etc/inetd.conf`
		SERVER_DIR=`expr "$SERVER_DIR" : '.*-[rs][ 	]*\([^ 	][^ 	]*\)'`
		if test "$SERVER_DIR"
		then
		    if test "$SERVER_DIR" = "/"
		    then
			SERVER_DIR="$TFTP_DIR"
		    else
			TFTP_RESTRICTED=true
			TFTP_DIR="$SERVER_DIR"
		    fi
		else
		    SERVER_DIR="$TFTP_DIR"
		fi
	    else
		SERVER_DIR="$TFTP_DIR"
	    fi
	fi
	#
	#  Now see if the user wants to change our idea of where the download
	#  image should go.
	#
	if $USE_MOP
	then
	    ( echo
	      echo "The server image must be installed where it can be found"
	      echo "by MOP.  This is usually /usr/lib/mop."
	    ) | $SAY
	else
	    ( echo
	      echo "The server image must be installed where it can be found"
	      echo "by the bootp or tftp daemon.  On BSD derived systems, the"
	      echo "correct place for tftpd is the directory \"$SERVER_DIR\"."
	      echo "On BSD derived systems running secure or restricted TFTP"
	      echo "the correct place is in the directory specified in the"
	      echo "TFTP daemon invocation.  With bootpd the file location"
	      echo "and name are specified by the administrator."
	    ) | $SAY
	fi
	eval $ASK "Enter the name of the server directory [$SERVER_DIR]?"
	read ANSWER
	if test "$ANSWER"
	then
	    case "$ANSWER" in
		q| quit| Q| QUIT)
		    exit $EXIT_QUIT
		    ;;
		*)
		    SERVER_DIR="$ANSWER"
		    ;;
	    esac
	fi
	while test ! -d "$SERVER_DIR"
	do
	    ( echo
	      echo "The directory you entered, \"$SERVER_DIR\", doesn't exist."
	      echo "Please enter the pathname of the directory in which to"
	      echo "install the server image, or q to quit."
	    ) | $SAY
	    eval $ASK "Enter the name of the server directory [$SERVER_DIR]?"
	    read ANSWER
	    if test "$ANSWER"
	    then
		case "$ANSWER" in
		    q| quit| Q| QUIT)
			exit $EXIT_QUIT
			;;
		    *)
			SERVER_DIR="$ANSWER"
			;;
		esac
	    fi
	done
	#
	#  Make sure we're not already in $SERVER_DIR
	#
	touch tf.$$
	if test -f "$SERVER_DIR"/tf.$$
	then
	    rm -f tf.$$
	    ( echo
	      echo "You appear to be in \"$SERVER_DIR\"."
	    ) | $SAY
	    STATUS=0
	else
	    rm -f tf.$$
	    ( echo
	      echo "The server image will be installed in \"$SERVER_DIR\"."
	    ) | $SAY
	    mkdir "$SERVER_DIR"/"$RELEASE_DIR"
	    if $USE_MOP
            then
	        mv $RELEASE_DIR/Xncd*.sys "$SERVER_DIR"/"$RELEASE_DIR"
            else
	        mv `ls $RELEASE_DIR/Xncd* | grep -v '\.sys$` "$SERVER_DIR"/"$RELEASE_DIR"
            fi
	    STATUS=$?

	fi
	if test $STATUS -eq 0
	then
	    SERVERLIST="$SERVER_DIR"/"$RELEASE_DIR"/Xncd*
	    for FILE in $SERVERLIST
	    do
		FILE=`basename "$FILE"`
		MODEL=`expr "$FILE" : "Xncd\([0-9][0-9][bce]*\)"`
                SYSEXT=`expr "$FILE" : "Xncd[0-9][0-9][bce].*\(\.sys\)"`
		case "$MODEL" in
		    15b)
			if test ! "$WANT"
			then
			    ( echo
			      echo "For the NCD15b you may choose either"
			      echo "the local client server or the server"
			      echo "without local clients as the default."
			    ) | $SAY

			    eval $ASK "Do you want to use the server without local clients as the default [y]?"
			    read ANSWER
			    case "$ANSWER" in
				n| no| N| NO)
				    WANT="L"
				    ;;
				q| quit| Q| QUIT)
				    exit $EXIT_QUIT
				    ;;
				*)
				    WANT="F"
				    ;;
			    esac
			fi
			GOT=`expr "$FILE" : "Xncd15b_lt${SYSEXT}"`
			if test $GOT -eq 0
			then
			    GOT="F"
			else
			    GOT="L"
			fi
			if test $WANT = $GOT
			then
			    if test -f "$SERVER_DIR"/Xncd15b${SYSEXT}
			    then
				rm -f "$SERVER_DIR"/Xncd15b${SYSEXT}.old
				( echo
				  echo "Moving \"$SERVER_DIR/Xncd15b${SYSEXT}\" to"
				  echo "\"$SERVER_DIR/Xncd15b${SYSEXT}.old\"."
				) | $SAY
				mv "$SERVER_DIR"/Xncd15b${SYSEXT} \
				    "$SERVER_DIR"/Xncd15b${SYSEXT}.old
			    fi
			    ( echo
			      echo "Linking "$SERVER_DIR/$RELEASE_DIR/$FILE" to"
			      echo "\"$SERVER_DIR/Xncd15b${SYSEXT}\"."
			    ) | $SAY
			    ln "$SERVER_DIR/$RELEASE_DIR"/$FILE "$SERVER_DIR"/Xncd15b${SYSEXT}
			fi
			;;
		    16)
			if test ! "$WANT"
			then
                            ( echo
                              echo "For the NCD16 you may choose the small"
                              echo "memory server, the local client server"
			      echo "or the server without local clients as"
			      echo "the default. If you have a majority of"
			      echo "1MB units you should use the small memory"
			      echo "server as the default.  If you must have"
			      echo "NFS or if most of your NCD16 units are"
			      echo "1.5MB or larger, use the server without"
			      echo "local clients.  If you need local client"
			      echo "capability, use the local client server."
			    ) | $SAY

                            eval $ASK "Do you want to use the server without local clients as the default [y]?"
			    read ANSWER
			    case "$ANSWER" in
				n| no| N| NO)
			            eval $ASK "Do you want to use the small server as the default [y]?"
			            read ANSWER
			            case "$ANSWER" in
				        n| no| N| NO)
				            WANT="L"
				            ;;
				        q| quit| Q| QUIT)
				            exit $EXIT_QUIT
				            ;;
				        *)
				            WANT="S"
				            ;;
			            esac
				    ;;
				q| quit| Q| QUIT)
				    exit $EXIT_QUIT
				    ;;
				*)
				    WANT="F"
				    ;;
			    esac
			fi
			case "$FILE" in
			    Xncd16|Xncd16.sys)
			        GOT="F"
			        ;;
			    Xncd16_s|Xncd16_s.sys)
			        GOT="S"
			        ;;
			    Xncd16_lt|Xncd16_lt.sys)
			        GOT="L"
			        ;;
			esac
			if test $WANT = $GOT
			then
			    if test -f "$SERVER_DIR"/Xncd16${SYSEXT}
			    then
				rm -f "$SERVER_DIR"/Xncd16${SYSEXT}.old
				( echo
				  echo "Moving \"$SERVER_DIR/Xncd16${SYSEXT}\" to"
				  echo "\"$SERVER_DIR/Xncd16${SYSEXT}.old\"."
				) | $SAY
				mv "$SERVER_DIR"/Xncd16${SYSEXT} \
				    "$SERVER_DIR"/Xncd16${SYSEXT}.old
			    fi
			    ( echo
			      echo "Linking "$SERVER_DIR/$RELEASE_DIR/$FILE" to"
			      echo "\"$SERVER_DIR/Xncd16${SYSEXT}\"."
			    ) | $SAY
			    ln "$SERVER_DIR/$RELEASE_DIR"/$FILE "$SERVER_DIR"/Xncd16${SYSEXT}
			fi
			;;
		    16e)
			if test ! "$WANT"
			then
                            ( echo
                              echo "For the NCD16e you may choose either"
                              echo "the local client server or the server"
                              echo "without local clients as the default."
                            ) | $SAY

                            eval $ASK "Do you want to use the server without local clients as the default [y]?"

			    read ANSWER
			    case "$ANSWER" in
				n| no| N| NO)
				    WANT="L"
				    ;;
				q| quit| Q| QUIT)
				    exit $EXIT_QUIT
				    ;;
				*)
				    WANT="F"
				    ;;
			    esac
			fi
			GOT=`expr "$FILE" : "Xncd16e_lt${SYSEXT}"`
			if test $GOT -eq 0
			then
			    GOT="F"
			else
			    GOT="L"
			fi
			if test $WANT = $GOT
			then
			    if test -f "$SERVER_DIR"/Xncd16e${SYSEXT}
			    then
				rm -f "$SERVER_DIR"/Xncd16e${SYSEXT}.old
				( echo
				  echo "Moving \"$SERVER_DIR/Xncd16e${SYSEXT}\" to"
				  echo "\"$SERVER_DIR/Xncd16e${SYSEXT}.old\"."
				) | $SAY
				mv "$SERVER_DIR"/Xncd16e${SYSEXT} \
				    "$SERVER_DIR"/Xncd16e${SYSEXT}.old
			    fi
			    ( echo
			      echo "Linking "$SERVER_DIR/$RELEASE_DIR/$FILE" to"
			      echo "\"$SERVER_DIR/Xncd16e${SYSEXT}\"."
			    ) | $SAY
			    ln "$SERVER_DIR/$RELEASE_DIR"/$FILE "$SERVER_DIR"/Xncd16e${SYSEXT}
			fi
			;;
		    17c)
			if test ! "$WANT"
			then
                            ( echo
                              echo "For the NCD17c you may choose either"
                              echo "the local client server or the server"
                              echo "without local clients as the default."
                            ) | $SAY

                            eval $ASK "Do you want to use the server without local clients as the default [y]?"
			    read ANSWER
			    case "$ANSWER" in
				n| no| N| NO)
				    WANT="L"
				    ;;
				q| quit| Q| QUIT)
				    exit $EXIT_QUIT
				    ;;
				*)
				    WANT="F"
				    ;;
			    esac
			fi
			GOT=`expr "$FILE" : "Xncd17c_lt${SYSEXT}"`
			if test $GOT -eq 0
			then
			    GOT="F"
			else
			    GOT="L"
			fi
			if test $WANT = $GOT
			then
			    if test -f "$SERVER_DIR"/Xncd17c${SYSEXT}
			    then
				rm -f "$SERVER_DIR"/Xncd17c${SYSEXT}.old
				( echo
				  echo "Moving \"$SERVER_DIR/Xncd17c${SYSEXT}\" to"
				  echo "\"$SERVER_DIR/Xncd17c${SYSEXT}.old\"."
				) | $SAY
				mv "$SERVER_DIR"/Xncd17c${SYSEXT} \
				    "$SERVER_DIR"/Xncd17c${SYSEXT}.old
			    fi
			    ( echo
			      echo "Linking "$SERVER_DIR/$RELEASE_DIR/$FILE" to"
			      echo "\"$SERVER_DIR/Xncd17c${SYSEXT}\"."
			    ) | $SAY
			    ln "$SERVER_DIR/$RELEASE_DIR"/$FILE "$SERVER_DIR"/Xncd17c${SYSEXT}
			fi
			;;
		    19)
			if test ! "$WANT"
			then
                            ( echo
                              echo "For the NCD19 you may choose either"
                              echo "the local client server or the server"
                              echo "without local clients as the default."
                            ) | $SAY

                            eval $ASK "Do you want to use the server without local clients as the default [y]?"
			    read ANSWER
			    case "$ANSWER" in
				n| no| N| NO)
				    WANT="L"
				    ;;
				q| quit| Q| QUIT)
				    exit $EXIT_QUIT
				    ;;
				*)
				    WANT="F"
				    ;;
			    esac
			fi
			GOT=`expr "$FILE" : "Xncd19_lt${SYSEXT}"`
			if test $GOT -eq 0
			then
			    GOT="F"
			else
			    GOT="L"
			fi
			if test $WANT = $GOT
			then
			    if test -f "$SERVER_DIR"/Xncd19${SYSEXT}
			    then
				rm -f "$SERVER_DIR"/Xncd19${SYSEXT}.old
				( echo
				  echo "Moving \"$SERVER_DIR/Xncd19${SYSEXT}\" to"
				  echo "\"$SERVER_DIR/Xncd19${SYSEXT}.old\"."
				) | $SAY
				mv "$SERVER_DIR"/Xncd19${SYSEXT} \
				    "$SERVER_DIR"/Xncd19${SYSEXT}.old
			    fi
			    ( echo
			      echo "Linking "$SERVER_DIR/$RELEASE_DIR/$FILE" to"
			      echo "\"$SERVER_DIR/Xncd19${SYSEXT}\"."
			    ) | $SAY
			    ln "$SERVER_DIR/$RELEASE_DIR"/$FILE "$SERVER_DIR"/Xncd19${SYSEXT}
			fi
			;;
		    19b)
			if test ! "$WANT"
			then
                            ( echo
                              echo "For the NCD19b you may choose either"
                              echo "the local client server or the server"
                              echo "without local clients as the default."
                            ) | $SAY

                            eval $ASK "Do you want to use the server without local clients as the default [y]?"
			    read ANSWER
			    case "$ANSWER" in
				n| no| N| NO)
				    WANT="L"
				    ;;
				q| quit| Q| QUIT)
				    exit $EXIT_QUIT
				    ;;
				*)
				    WANT="F"
				    ;;
			    esac
			fi
			GOT=`expr "$FILE" : "Xncd19b_lt${SYSEXT}"`
			if test $GOT -eq 0
			then
			    GOT="F"
			else
			    GOT="L"
			fi
			if test $WANT = $GOT
			then
			    if test -f "$SERVER_DIR"/Xncd19b${SYSEXT}
			    then
				rm -f "$SERVER_DIR"/Xncd19b${SYSEXT}.old
				( echo
				  echo "Moving \"$SERVER_DIR/Xncd19b${SYSEXT}\" to"
				  echo "\"$SERVER_DIR/Xncd19b${SYSEXT}.old\"."
				) | $SAY
				mv "$SERVER_DIR"/Xncd19b${SYSEXT} \
				    "$SERVER_DIR"/Xncd19b${SYSEXT}.old
			    fi
			    ( echo
			      echo "Linking "$SERVER_DIR/$RELEASE_DIR/$FILE" to"
			      echo "\"$SERVER_DIR/Xncd19b${SYSEXT}\"."
			    ) | $SAY
			    ln "$SERVER_DIR/$RELEASE_DIR"/$FILE "$SERVER_DIR"/Xncd19b${SYSEXT}
			fi
			;;
		    *)
			( echo
			  echo "An internal error in the install script has"
			  echo "been encountered.  Please contact NCD for"
			  echo "assistance."
			) | $SAY
			exit $EXIT_FAILED
			;;
		esac
	    done
	    ( echo
	      echo "The server boot image has been installed."
	    ) | $SAY
	else
	    ( echo
	      echo "The installation has failed.  Contact NCD for assistance."
	    ) | $SAY
	    exit $EXIT_FAILED
	fi
    fi
else
    ( echo
      echo "Since there is no server image in the current directory, it"
      echo "is assumed that a font or XRemote tape is being installed."
    ) | $SAY
fi
NOT_YET="The fonts have not been installed."

if $TFTP_RESTRICTED
then
    if test "$TFTP_DIR" = "/"
    then
	TFTP_DIR=""
    fi
else
    TFTP_DIR=""
fi

( echo
  echo "The font directories must be installed where they can be"
  echo "accessed by the TFTP daemon, NFS, or DAP.  If you are planning"
  echo "to use TFTP, the correct place appears to be the directory"
  echo "\"$TFTP_DIR$FONT_DIR\".  If you are not planning to use TFTP,"
  echo "the correct place (assuming the default font path) is"
  echo "\"$FONT_DIR\"."
) | $SAY
FONT_DIR="$TFTP_DIR$FONT_DIR"

eval $ASK "Enter the name of the directory which will contain the font directories [$FONT_DIR]?"
read ANSWER
if test "$ANSWER"
then
    case "$ANSWER" in
	q| quit| Q| QUIT)
	    exit $EXIT_QUIT
	    ;;
	*)
	    FONT_DIR="$ANSWER"
	    ;;
    esac
fi

while test ! -d "$FONT_DIR"
do
    ( echo
      echo "The directory you entered, $FONT_DIR, doesn't exist."
      echo "Please enter the pathname of the directory in which to"
      echo "install the font directories, or q to quit."
    ) | $SAY

    eval $ASK "Enter the name of the directory which will contain the font directories [$FONT_DIR]?"
    read ANSWER
    if test "$ANSWER"
    then
	case "$ANSWER" in
	    q| quit| Q| QUIT)
		exit $EXIT_QUIT
		;;
	    *)
		FONT_DIR="$ANSWER"
		;;
	esac
    fi
done

touch tf.$$
if test -f "$FONT_DIR"/tf.$$
then
    rm -f tf.$$
    ( echo
      echo "You appear to be in \"$FONT_DIR\"."
    ) | $SAY
    STATUS=0
else
    rm -f tf.$$
    ( echo
      echo "The font directories will be installed in \"$FONT_DIR\"."
    ) | $SAY
    (tar cf - ncd | (cd "$FONT_DIR"; tar xf -))
    STATUS=$?
fi
if test $STATUS -eq 0
then
    ( echo
      echo "The fonts have been installed."
    ) | $SAY
    NOT_YET=""
else
    ( echo
      echo "The installation has failed.  Contact NCD for assistance."
    ) | $SAY
    exit $EXIT_FAILED
fi

if test -f "binSun3/Xremote"
then
    ( echo
      echo "You have an Xremote tape.  Please install the Xremote"
      echo "and xinitremote binaries appropriate for your computer."
      echo "They are found in the binSun3 and binSun4 directories"
      echo "subordinate to the current directory."
    ) | $SAY
fi

if test -f "src/Xremote"
then
    ( echo
      echo "You have an Xremote source tape.  Please install the"
      echo "sources found in the src directory subordinate to"
      echo "the current directory."
    ) | $SAY
fi

exit 0
