*BSD News Article 84540


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.Hawaii.Edu!news.uoregon.edu!arclight.uoregon.edu!news.sprintlink.net!news-peer.sprintlink.net!news.mathworks.com!fu-berlin.de!news-ber1.dfn.de!news-lei1.dfn.de!news-nue1.dfn.de!news-mue1.dfn.de!nntp.fh-augsburg.de!inga.augusta.de!rabbit.augusta.de!usenet
From: shanee@rabbit.augusta.de (Andreas Kohout)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: why this script works under linux but not freebsd?
Date: 4 Dec 1996 20:45:31 GMT
Organization: Privat Site running FreeBSD
Lines: 49
Message-ID: <584ntb$8uk@rabbit.augusta.de>
References: <329eef7c.869544@netnews.hinet.net>
NNTP-Posting-Host: localhost.augusta.de
X-Newsreader: knews 0.9.6

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:

rabbit:/etc/ppp# cat options
/dev/cuaa1	:my modem
115200		:speed
lock		:because of mgetty
connect "chat -f /etc/ppp/inga.chat"	:dialin script
crtscts		:error handling
modem		:it is a sirial modem, no null-modem-kable
domain augusta.de	:my domain
noipdefault	:needed if no local IP is specified
passive		:wait for remote ppp
:193.175.23.66	:I have no static IP, the IP from my ISP
defaultroute	:this way is the default

take a lock at ´man pppd´

rabbit:/etc/ppp# cat inga.chat 
ABORT BUSY ABORT "NO CARRIER" ABORT "NO ANSWER" "" ATZ OK ATD<number> \
CONNECT "" ogin: <login-name> ssword: <your-password>

In inga.chat there is only one line, I don´t know wheather it works with 
the ´\´ ...

take a look at man chat ...

I dial with ´pppd´ my ISP with the <number>, if it is busy, ´no carrier´ or 
´no answer´ the script failes and pppd stopp´s, if ist connected I wait 
for ogin: (the "" is necessary) and send my <login-name>, wait for 
ssword: and send my <password> ...

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 ...

-- 
Greeting, Andy
                                                    running FreeBSD-current
---------------------------------------------------------------------------