#!/bin/sh
# Copyright (c) 1992, 1993 Black Market Technologies, Inc.
# This is proprietary software.  You must purchase a license for each computer
# on which you want to use this software.  For complete licensing information, 
# check the license agreement that came with this software or contact
# Black Market Technologies at +1 718 522-5090.
# 
# Get config information for Administration window
# $0 port speed modem

CIN=2

PROMPT="Connect It: ${CIN}: "
APP_PATH=$1
shift
PATH="${APP_PATH}/Scripts:${APP_PATH}:/etc:/usr/etc:/usr/ucb:/bin:/usr/bin"
export PATH

YES=0
NO=1
PROBLEM=9

if test $# != 3 ; then
#  echo "${PROMPT} Not enough arguments" >&2
  exit 1
fi

PORT=$1
MODEM=$2
SPEED=$3

case "${PORT}" in
  A ) PORT=cua ;;
  B ) PORT=cub ;;
esac

if test -z "${COUNT}" ; then
  COUNT=1
fi

CONFIG_DIR=${APP_PATH}/Modems
COMMAND=configuration

if test ! -f ${CONFIG_DIR}/${MODEM}/${COMMAND} ; then
  exit ${PROBLEM}
fi

COMMAND="${CONFIG_DIR}/${MODEM}/${COMMAND}"

dial -p -lci-${PORT}-${SPEED} ${COMMAND}
STATUS=$?

exit $?
