Date: Fri, 21 Jul 1995 12:38:55 -0700 From: "Mike O'Brien" <obrien@antares.aero.org> To: Yuri Gindin <aerygis@aerodyne.technion.ac.il> Cc: freebsd-questions@FreeBSD.org Subject: Re: iij-ppp questions. Message-ID: <95Jul21.124625pdt.111106-2@aero.org> In-Reply-To: Your message of "Fri, 21 Jul 1995 08:01:36 PDT." <Pine.A32.3.91.950721164939.71714A-100000@aerodyne.technion.ac.il>
next in thread | previous in thread | raw e-mail | index | archive | help
> what does the set login string in /etc/ppp/ppp.conf means: > set login "TIMEOUT 5 login:-\\r-login: ppp word: ppp" > i.e. what is login:-\\r-login: makes ? \r is carriage > return, I suppose ? That language is stolen from the way UUCP scripts work - you can find information on this scripting language in the UUCP documentation. It's a big help to have run a big UUCP site in a past life. :-) Briefly, this is a list of pairs of expected input/generated output tokens. TIMEOUT is special and is a command; the "5" is parsed as an argument. You'd better see something within 5 seconds or the timeout expires. This is used in the next part. "login:" is what we expect to see. The hyphen marks the start of an alternate branch in the script. If we DON'T see "login:" within 5 seconds, send a carriage return. Then, expect to see "login:", also within five seconds. When you see that, send "ppp". Expect to see "word:" within five seconds, then send "ppp" and end the script. As you can see from "word:", you don't have to give the full text you expect back, just a substring from it will do. The source code shows that IIJ PPP supports all sorts of special escape characters; '\r' is only one. There are long and short pauses, tabs, and others too. You could probably handle callback entirely in the script. I thought there was something about callback in the documentation but maybe I'm wrong; my FreeBSD system is at home so I don't have the doc handy. Mike O'Brien
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?95Jul21.124625pdt.111106-2>