Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 1997 13:33:54 -0400 (EDT)
From:      Nathan Dorfman <nathan@senate.org>
To:        freebsd-questions@freebsd.org
Subject:   pppd and /etc/ttys
Message-ID:  <199707061733.NAA00247@deimos.senate.org>

next in thread | raw e-mail | index | archive | help
I have set up an /etc/ppp/dialer (chat script) and /etc/ppp/options so          
that I can just type pppd and it will connect. However, I wanted to make        
it so when pppd dies it will automatically get restarted. I tried this:         
                                                                                
ttyv5   "/usr/sbin/pppd"                cons25 off secure                       
                                                                                
(obviously I had off turned to on when I tried to get it to work)               
in my /etc/ttys file. This spawned like five pppd's so I added a                
-detach flag to the options file to make it stay in the foreground.             
Now it more or less starts but chat logs alarm and dies every time              
I try to connect. I even added a sleep 15 to /etc/ppp/dialer right              
before the chat command so the modem has time to do whatever it needs           
to do, to no avail. I can still connect with a pppd command. Here are
my dialer and options files:

#!/bin/sh
#chat connection script for pppd
sleep 15                                                                       
exec chat -v                                            \                       
        TIMEOUT         5                               \                       
        ''              \rAT                            \                       
        'OK-+++\c-OK'   ATH0                            \                       
        TIMEOUT         30                              \                       
        OK              ATDT348-6272                    \                       
        CONNECT         ''                              \                       
        ogin:--ogin:    nathan                          \                       
        assword:       	[password] 

#pppd options file                                                             
                                                                                
0.0.0.0:0.0.0.0                         # let the server worry about it         
                                                                                
/dev/cuaa3      38400                   # modem and speed to use                
crtscts                                 # enable hardware flow control          
modem                                   # modem control line                    
passive                                 # wait for LCP packets                  
defaultroute                            # make ppp the default router           
connect         /etc/ppp/dialer         # dial first! :-)                       
-detach                                 # foreground please             

Anyone have any ideas on why it is not working?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707061733.NAA00247>