*BSD News Article 32885


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!panix!not-for-mail
From: rpritz@panix.com (richard)
Newsgroups: comp.os.386bsd.questions
Subject: Re: chat script
Date: 16 Jul 1994 18:24:25 -0400
Organization: usenet central
Lines: 24
Message-ID: <309mmp$m2b@panix2.panix.com>
References: <308r3f$4fk@panix2.panix.com>
NNTP-Posting-Host: panix2.panix.com
X-Newsreader: TIN [version 1.2 PL2]

 i am trying to set up a script to dial my local slip provider.  the 
 provider asks (i) what service please?, (ii) username: and (iii)password:
 the following initializes the modem, connects, then dies a bit after the 
connection. any idea why?

: #!/bin/sh

: PHONE=555-1212
: USER=rpritz
: WORD=password
: MY_IP=myip
: HOST_IP=198.7.0.124

: chat -v "" at\&fm0\&c1\&d2\&k3s7=60s11=55s36=7s95=44w1 OK  < /dev/cua01 > /dev/cua01 
: chat -v "" atdt$PHONE CONNECT "" 'ease?' slip name: $USER word: $WORD  < /dev/cua01 > /dev/cua01 echo done

: #also fails if i use ease instead of 'ease?'
: #the stuff below definately works.
: sleep 1
: slattach -c -h -s 38400 /dev/cua01 
: ifconfig sl0 $MY_IP $HOST_IP netmask 255.255.255.0
: ifconfig sl0 up
: route add default $MY_IP