#!/bin/sh
# Top level program for the client piece of
# LAT's Garbiel network probe (e.g. SATAN) detector.
# 
# This script starts the correct client program
# for this machine so the user does not have to
# worry about getting the right program on each 
# platform.

# Copyright 1995 by Los Altos Technologies Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms are
# permitted provided that this entire copyright notice is
# duplicated in all such copies.  No charge, other than "at-cost"
# distribution fee may be charged for copies, derivations, or
# distributions of this material without the expressed written consent
# of the copyright holders.
# 
# THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT ANY EXPRESSED
# OR IMPLIED WARRANTIES, INCLUDING, WITHOUT FURTHER LIMITATION, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY
# PARTICULAR PURPOSE.
# 
# IN NO EVENT SHALL LOS ALTOS TECHNOLOGIES, INC., OR ANY OF ITS
# EMPLOYEES, REPRESENTATIVE, AGENTS, OFFICERS, OR DIRECTORS, OR ANY
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
# LIMITED TO, LOSS OF USE, DATA, PROFITS, OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Include dot last.  This is risky, but makes it
# easier to install and invoke the program.
PATH=/bin:/usr/bin:/usr/5bin:/usr/sbin:.

ostype=`uname`
if [ $ostype != "SunOS" ]; then
	echo "The $ostype operating system is not supported."
	exit
fi

osver=`uname -r`
case $osver in
	4.*)
#		echo Solaris 1: $ostype $osver
		suffix=sol1
		;;
	5.*)
#		echo Solaris 2: $ostype $osver
		suffix=sol2
		;;
	*)
		echo The $osver release of $ostype is not supported.
		exit
		;;
esac

# Start the appropriate client
stub=""
cmd=$0$stub.$suffix
echo Starting $0.$suffix in the background
$cmd >/dev/null 2>&1 &
