> 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

Can I offer you instead the setup I use to connect to Demon? It uses PAP to
authenticate, because it makes logging in much quicker (IME). I have an ip-up
and ip-down script in /usr/local/lib/diald, and I put the dctrl fifo there,
but I've commented these out for you. Otherwise everything is where
diald-0.98-1 expects to find things in the default make.

Follows: /etc/diald.conf, /etc/demon-connect and /etc/ppp/pap-secrets. Note
that the last should be chmod 0600.

/etc/diald.conf:

# Bearcave standard diald configuration
#
device /dev/modem
lock
speed 115200
modem
crtscts

# Timeouts and retry limits
connect-timeout 90
retry-count 0
died-retry-count 0
dial-fail-limit 4
redial-timeout 5

# Diald 0.98+ settings
scheduler other
priority -2

# Demon-specific coniguration.
#
local 194.222.88.187    # Your Demon IP
remote 158.152.1.222
mode ppp
defaultroute
connect /etc/demon-connect
pppd-options debug user bear-cave

accounting-log /var/log/diald/calls
pidfile diald.demon.pid

# Line up and down scripts
# ip-up /usr/local/lib/diald/ip-up
# ip-down /usr/local/lib/diald/ip-down

# The command fifo. There's a link to this
# in /etc/diald so dctrl will find it.
# fifo /usr/local/lib/diald/diald.ctl

# Diald 0.98+ settings
linkname Demon
linkdesc Demon and the big wide world

include /usr/lib/diald/standard.filter

/etc/demon-connect:

#!/bin/sh
#
# This script is hacked from an example provided with the most excellent
# diald.

# Configuration parameters

# The initialization string for your modem
# MODEM_INIT="ATZL0&C1&D2%C0"
MODEM_INIT="ATZ"
MODEM_INIT2="ATM0L0&C1&D2%C0W2"

# The phone number to dial
# PHONE_NUMBER="08452120666"    # Scottish Telecom
# PHONE_NUMBER="01491509666"    # Local Energis access
PHONE_NUMBER="08450798666"      # Energis, good for k56 for me

# The chat command. chat -v logs the chatting to the syslog.
CHAT="chat -v"
# CHAT="chat"

# Pass a message on to diald and the system logs.
function message () {
[ $FIFO ] && echo "message $*" >$FIFO
logger -p local2.info -t connect "$*"
}

# Initialize the modem. Usually this just resets it.
message "Initializing Modem"
$CHAT TIMEOUT 5 "" $MODEM_INIT TIMEOUT 45 OK "\c"
if [ $? != 0 ]; then
    message "Failed to initialize modem"
    exit 1
fi
$CHAT TIMEOUT 5 "" $MODEM_INIT2 TIMEOUT 45 OK "\c"
if [ $? != 0 ]; then
    message "Failed to initialize modem(2)"
    exit 1
fi

# Dial the remote system.

message "Dialing system"
$CHAT \
        TIMEOUT 45 \
        ABORT "NO CARRIER" \
        ABORT BUSY \
        ABORT "NO DIALTONE" \
        ABORT ERROR \
        "" ATDT$PHONE_NUMBER \
        CONNECT "\c"
case $? in
   0) message Connected;;
   1) message "Chat Error"; exit 1;;
   2) message "Chat Script Error"; exit 1;;
   3) message "Chat Timeout"; exit 1;;
   4) message "No Carrier"; exit 1;;
   5) message "Busy"; exit 1;;
   6) message "No DialTone"; exit 1;;
   7) message "Modem Error"; exit 1;;
   *)
esac

# Success!
message "Connection made"

/etc/ppp/pap-secrets:


# Secrets for authentication using PAP
# client        server  secret                  IP addresses
bear-cave       *       "password"              *
---
Jim Hague - [EMAIL PROTECTED] (Work), [EMAIL PROTECTED] (Play)
Never trust a computer you can't lift.

-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]

Reply via email to