I currently use 'dip' to connect to my ISP, which I invoke manually
when needed. I'm now interested in using diald to connect as and when
necessary, but all of the examples I've seen seem to use 'chat', not
'dip'.
Could somebody give me an idea of how to use my existing method of
connection alongside 'diald' ? (Really simple will do, as I can trawl
through the filters later)
System is based upon Redhat 5.2 with kernel 2.0.36
Cheers,
Charlie
begin dip-script
----------------------------------------------------------------------
# dip script for connecting to Demon Internet
# Modified by James Mackintosh from a Red Hat default script
main:
get $local datamast.demon.co.uk
get $remote 158.152.1.222
netmask 255.255.0.0
# next line assumes COM1; use ttyS1 for COM2, etc
port modem
# this attempts the max speed; it may negotiate a lower speed if
# line poor or modem slow
speed 115200
reset
echo on
# You may need to send some modem set-up string here
#next lines may or may not turn off modem speaker. I use a Hayes
# modem, not USR, so you may need to put in USR default
# initialisation string. Hopefully not.
# send ATL0\r
# send ATM0\r
#send ATS10=100\r
# Set the idle timeout in seconds
timeout 300
# in next line put in your favourite Demon dial-up number; this is
Coventry
send ATDT 01203 289666\r
wait CONNECT 45
if $errlvl != 0 goto error
login:
# You may not need this sleep
sleep 3
wait ogin 10
if $errlvl != 0 goto error1
send HOSTNAME\r\n
if $errlvl != 0 goto error2
wait assword 10
if $errlvl != 0 goto error3
send PASSWORD\r\n
# added, for the protocol definition - needed by demon
wait otocol 10
if $errlvl != 0 goto error4
send PPP\r\n
if $errlvl != 0 goto error5
wait HELLO 30
if $errlvl != 0 goto error6
loggedin:
default
done:
print CONNECTED to $remote with address $rmtip
mode PPP
exit 0
error:
print PPP to $remote failed because no CONNECT received
exit
error1:
print PPP to $remote failed because no login prompt received
exit
error2:
print PPP to $remote failed because login couldn't be sent
exit
error3:
print PPP to $remote failed because no password prompt received
exit
error4:
print PPP to $remote failed because no protocol prompt received
exit
error5:
print PPP to $remote failed because PPP couldn't be sent
exit
error6:
print PPP to $remote failed because no HELLO prompt received
exit
# end of script
------------------------------------------------------------------------
Charlie Freckleton Home:[EMAIL PROTECTED]
Work:[EMAIL PROTECTED]
Where does M$crosoft want to take you today ?
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]