Re: PPP with multiple numbers and getting modem status
Forwarding this to the current ppp maintainer.
On Sun, 10 Aug 1997, Brandon Mitchell wrote:
>[ request to dial multiple numbers to connect to an isp ]
>
>> I have not tackled this problem, but I think a perl script would be the
>> way to go. I am not a perl programmer, so when I wanted a script to keep
>> trying to connect to my ISP to run my mirror in the early hours, I asked
>> Ralph Winslow to help me. The attached script does _that_ job but it
>> might be useful as a sort of map of how the job can be done.
>[ perl script is no longer attached ]
>
>Goodness, I thought this would take a week for me to work up, and I just
>did it in 5 minutes. Here goes:
>
>modify pon:
>#!/bin/sh
>if [ -r /etc/ppp.options_out -a -r /etc/ppp.chatscript ]; then
> /usr/sbin/pppd connect "/path/multi-chat.sh" `cat /etc/ppp.options_out`
># ^^^^ relocate
>else
> echo "You do not have permissions to access /etc/ppp.chatscript or /etc/ppp.options_out"
>fi
>
>Then make the following multi-chat.sh:
>#!/bin/sh
>
># this restarts the loop after all scripts are run
>while true; do
> # this cycles through the scripts
> for i in /etc/ppp/scripts/*; do
> # this trys the script
> if /usr/sbin/chat -v -f $i; then exit 0
> fi
>
> # didn't make it, bad script
>
> # don't really need the sleep, it just gives the modem a second
> # to catch it's breath :-)
> sleep 5
> done
>done
>
>Then place a series of scripts in /etc/ppp/scripts that you want run in
>order (should be alphabetical, I have chat.1 chat.2...). It worked
>perfectly, no delay, runs right through the list. Now I just have to make
>a bunch of chat scripts (and hope this thing hangs up ok, I only know
>that it just got me on just now).
>
>Mr. Lameter: Could this be considered as an addition/example to ppp? If
>so, all I ask is that my name is included in a comment at the top of the
>multi-chat script.
>
>Enjoy,
>Brandon
>
>-----
>Brandon Mitchell E-mail: bhmit1@mail.wm.edu
> Homepage: http://www.geocities.com/SiliconValley/7877/home.html
>
>"We all know Linux is great...it does infinite loops in 5 seconds."
> --Linus Torvalds
>
>
>
--- +++ --- +++ --- +++ --- +++ --- +++ --- +++ --- +++ ---
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: