Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!pumpkin.pangea.ca!eru.mt.luth.se!news-stkh.gsl.net!news.gsl.net!news-peer.gsl.net!news.gsl.net!howland.erols.net!newsfeed.internetmci.com!demos!news1.relcom.ru!carrier.kiev.ua!powell.cscd.kiev.ua!ranet.cscd.lviv.ua!not-for-mail
From: vitaly@ranet.cscd.lviv.ua (Vitaly Lev)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: why this script works under linux but not freebsd?
Date: 14 Dec 1996 11:24:55 +0200
Organization: Pentakom ltd.
Lines: 74
Message-ID: <58trp7$62a@ranet.cscd.lviv.ua>
References: <329eef7c.869544@netnews.hinet.net> <584ntb$8uk@rabbit.augusta.de>
NNTP-Posting-Host: ranet.cscd.lviv.ua
X-Newsreader: TIN [FreeBSD UNIX 1.3 950824BETA PL<I&Opl0>]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:32585
Andreas Kohout (shanee@rabbit.augusta.de) wrote:
>In article <329eef7c.869544@netnews.hinet.net>,
> vcba79@ms1.hinet.net (Vincent Chen) writes:
>
>> I wrote a short script to dialup and start ppp daemon only
>> if carrier detected. ( pppd can't do this and it won't return
>> dialup status. please correct me if I was wrong. :-)
>
>I use pppd to dial and connect ... and it works ...
>
>I wrote to scripts:
[...]
>There are two small disatwantages, if chat failes, I have to start pppd
>again by hand, no loop ... and I donīt know haw to redial a second number
>if the first is busy ...
hi,
this script work well if busy, no carrier etc.
=========pppxxx script=========
#!/bin/sh
#
# ppp-on
#
# Set up a PPP link
#
LOCKDIR=/var/spool/lock
DEVICE=cuaa5
while [ 1 ]
do
if [ -f $LOCKDIR/LCK..$DEVICE ]
then
echo "PPP device is locked"
exit 1
fi
(
stty 38400 -tostop hupcl 2>&1 > /dev/null
if chat -t 40 -vf /etc/ppp/xxx.chat -l LCK..$DEVICE
then
pppd defaultroute passive <your_ip_number>:<yout_provider_ip_number> mru 296 /dev/$DEVICE &
sleep 10
exit 0
else
echo "PPP call failed" 1>&2
exit 1
fi
) < /dev/$DEVICE > /dev/$DEVICE
sleep 3
done
=========end of pppxxx script=========
=========xxx.chat==========
ABORT BUSY ABORT NO\sCARRIER ABORT NO\sDIAL\sTONE '' ATZ OK ATL1M1X4E1S7=40 OK ATL1M0DP769392 TIMEOUT 45 ogin:-BREAK-ogin: <your_login_name> word: <your_password>
=========end of xxx.chat=======
--
Vitaly Lev, SysAdm of cscd.lviv.ua
E-mail: vitaly@cscd.lviv.ua