Date: Tue, 30 Sep 1997 00:54:35 +0100 From: Brian Somers <brian@awfulhak.org> To: Carey Nairn <cpn@ccd.tas.gov.au> Cc: Brian Somers <brian@awfulhak.org>, Terry Dwyer 61 8 9491 5161 <tdwyer@io.telstra.com.au>, questions@freefall.FreeBSD.org Subject: Re: iijppp and chat scripts Message-ID: <199709292354.AAA03835@awfulhak.demon.co.uk> In-Reply-To: Your message of "Mon, 29 Sep 1997 23:37:44 %2B1000." <Pine.BSF.3.96.970929232949.988B-100000@jumpgate.cpn.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Sat, 27 Sep 1997, Brian Somers wrote:
>
> > > On Sat, 27 Sep 1997, Carey Nairn wrote:
> > >
> > > I don't think you have to wait for the last char in the prompt string to
> > > arrive before you can do a match. It may be worthwhile to try matching
> > > on the string "name" in the termserver's prompt assuming what you've
> > > shown below is the actual prompt you see.
> >
> > Or you could do a few expect/sends for different bits of the same
> > prompt. For example, if you've got
> >
> > login on abcde:
> > or
> > login on defgh:
> >
> > (with spaces at the end of each), you could have a chat that does
> >
> > set login "login\son\s \"\" \\s MyLogin"
> >
> > > > hi guys,
> > > >
> > > > I'm looking for a chat guru...
> > > >
> > > > When I dial in to my provider, I will get a different prompt depending on
> > > > which terminal server I connect to. Is there a way in the login script to
> > > > test for on of multiple different prompts?
> > > >
> > > > e.g.
> > > >
> > > > login to ts1, prompt is ts1name>
> > > > login to ts2, prompt is ts2name#
> > > >
>
> Both pmrompts are completely unique so Terry's suggestion won't work
> unfortunately. What I need is to try Brian's idea and put in a couple of
> different expect values and hope the terminal server doesn't hangup
> waiting for the timeouts.
This isn't fair - the ISP is cheating :-(
You could also try
set login "TIMEOUT 3 assword:-MyLogin-assword: MyPassword"
So that you just wait a few seconds and then fire the logon.... The
only alternative is wild card matching. Feel free to send patches so
that you can say
set login -r ".. MyLogin assword: MyPassword"
or
set login -r "{ts1name>,ts2name#} MyLogin assword: MyPassword"
where the first bits are regular expressions ;-)
> thanks guys,
> Carey Nairn
>
--
Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <bri@OpenBSD.org>
<http://www.Awfulhak.org>
Don't _EVER_ lose your sense of humour....
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709292354.AAA03835>
