#!/bin/bash
# Run ppp daemon, with user-specified parameters. Daemon is run in 
# a loop, so that if connection is dropped, we attempt reconnection
# automatically.
#
# These parameters work for the DataRadios; note that ppp compression
# schemes are turned OFF. - T.O'R.

if [ ! -n "$4" ]
then
  echo "usage: `basename $0` port baud from to"
  exit 1
fi


port=$1
baud=$2
from=$3
to=$4

delay=3

hndshk=""

echo Setting up the ppp link from $from to $to at ${baud} baud on $port
date
/usr/sbin/pppd nodeflate nobsdcomp novj novjccomp -detach noauth lock passive persist $hndshk $from:$to $port $baud
