Hi all,
Please forgive if I have sent a message that is too long, but I thought
in order to get the assistance required I needed to supply all available
information.

I have installed Red Hat 6.1 and daild 0.99.4.  I  have several accounts
that a client needs to dial into at given times.  Account 1 is a 6am-6pm
business account - forced up for the 12 hours.  Outside those hours I
need to dial into account 2 on the same server - on demand.  The
problem:  I can dial - with error messages - and login but I cant start
PPP successfully!!  If I use /sbin/ifup ppp0 I get all the way. So I
figure it's to do with the connect script of the diald configuration.

any assistance greatfully appreciated.

The following is an extract from the /etc/messages log file.

Aug 21 12:59:42 eric modprobe: can't locate module tap0
Aug 21 12:59:42 eric modprobe: can't locate module tap1
Aug 21 12:59:42 eric modprobe: can't locate module tap2
Aug 21 12:59:42 eric modprobe: can't locate module tap3
Aug 21 12:59:43 eric modprobe: can't locate module tap4
Aug 21 12:59:43 eric modprobe: can't locate module tap5
Aug 21 12:59:43 eric modprobe: can't locate module tap6
Aug 21 12:59:43 eric modprobe: can't locate module tap7
Aug 21 12:59:44 eric modprobe: can't locate module tap8
Aug 21 12:59:44 eric modprobe: can't locate module tap9
Aug 21 12:59:44 eric modprobe: can't locate module tap10
Aug 21 12:59:45 eric modprobe: can't locate module tap11
Aug 21 12:59:45 eric modprobe: can't locate module tap12
Aug 21 12:59:45 eric modprobe: can't locate module tap13
Aug 21 12:59:45 eric modprobe: can't locate module tap14
Aug 21 12:59:46 eric modprobe: can't locate module tap15
Aug 21 12:59:46 eric diald[1513]: start sl0: SIOCSIFMETRIC: Operation
not supported
Aug 21 12:59:46 eric diald[1513]: Calling site 192.168.1.9
Aug 21 12:59:47 eric connect: Initializing Modem
Aug 21 12:59:48 eric connect: Dialing system
Aug 21 13:00:15 eric connect: Connected
Aug 21 13:00:15 eric connect: Loggin in
Aug 21 13:00:16 eric connect: Protocol started
Aug 21 13:00:16 eric diald[1513]: Connected to site 192.168.1.9
Aug 21 13:00:16 eric diald[1513]: Running pppd (pid = 1544).
Aug 21 13:00:16 eric modprobe: can't locate module char-major-108
Aug 21 13:00:17 eric kernel: PPP: version 2.3.7 (demand dialling)
Aug 21 13:00:17 eric kernel: PPP line discipline registered.
Aug 21 13:00:17 eric kernel: registered device ppp0
Aug 21 13:00:17 eric pppd[1544]: pppd 2.3.10 started by root, uid 0
Aug 21 13:00:17 eric pppd[1544]: Using interface ppp0
Aug 21 13:00:17 eric pppd[1544]: Connect: ppp0 <--> /dev/ttyS1
Aug 21 13:00:23 eric kernel: PPP BSD Compression module registered
Aug 21 13:00:23 eric kernel: PPP Deflate Compression module registered
Aug 21 13:00:24 eric pppd[1544]: local  IP address 203.57.114.143
Aug 21 13:00:24 eric pppd[1544]: remote IP address 203.57.114.129
Aug 21 13:00:24 eric diald[1513]: New addresses: local 203.57.114.143,
remote 203.57.114.129, broadcast 0.0.0.0
Aug 21 13:00:24 eric diald[1513]: start ppp0: SIOCSIFMETRIC: Operation
not supported


The following is my /etc/diald.conf.wdbc file  - for account 1
the /etc/diald.conf file is empty at this stage


restrict 6:01:00 17:59:00 1-5 * *
up

restrict 18:01:00 * 1-5 * *
or-restrict * * 6 * *
or-restrict * 6:00:00 0 * *
down

authsimple /etc/ppp/pap-secrets
mode ppp
connect /root/wdbcconnect
speed 115200
device /dev/ttyS1
local 192.168.1.8
remote 192.168.1.9
dynamic
include /usr/lib/diald/standard.filter
accounting-log /var/log/diald.log



The Following is my Connect script: /root/wdbcconnect     - account 1



#!/bin/sh
# Copyright (c) 1996, Eric Schenk.
#
# This script is a connection script that
# uses the "message" facility of diald to communicate progress through
# the dialing process to a diald monitoring program such as dctrl or
diald-top.
# It also reports progress to the system logs. This can be useful if you

# are seeing failed attempts to connect and you want to know when and
why
# they are failing.
#
# This script requires the use of chat-1.9 or greater for full
# functionality. It should work with older versions of chat,
# but it will not be able to report the reason for a connection failure.

# Configuration parameters

# The initialization string for your modem

MODEM_INIT="ATZ"
# &C1&D2%C0"

# The phone number to dial
PHONE_NUMBER="phone number removed"

# The chat sequence to recognize that the remote system
# is asking for your user name.
USER_CHAT_SEQ="ogin:--ogin:--ogin:--ogin:--ogin:--ogin:--ogin:"

# The string to send in response to the request for your user name.
USER_NAME="account name removed"

# The chat sequence to recongnize that the remote system
# is asking for your password.
PASSWD_CHAT_SEQ="ssword:"

# The string to send in response to the request for your password.
PASSWORD="password removed"

# The prompt the remote system will give once you are logged in
# If you do not define this then the script will assume that
# there is no command to be issued to start up the remote protocol.
# PROMPT="~"

# The command to issue to start up the remote protocol
# PROTOCOL_START="ppp"

# The string to wait for to see that the protocol on the remote
# end started OK. If this is empty then no check will be performed.
# START_ACK="Switching to PPP."

# 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"
/usr/sbin/chat TIMEOUT 5 "" $MODEM_INIT TIMEOUT 45 OK ""
if [ $? != 0 ]; then
    message "Failed to initialize modem"
    exit 1
fi

# Dial the remote system.

message "Dialing system"
/usr/sbin/chat \
 TIMEOUT 45 \
 ABORT "NO CARRIER" \
 ABORT BUSY \
 ABORT "NO DIALTONE" \
 ABORT ERROR \
 "" ATDT$PHONE_NUMBER \
 CONNECT ""
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

# We're connected try to log in.
message "Loggin in"
/usr/sbin/chat \
 TIMEOUT 5 \
 $USER_CHAT_SEQ \\q$USER_NAME \
 TIMEOUT 45 \
 $PASSWD_CHAT_SEQ $PASSWORD
if [ $? != 0 ]; then
    message "Failed to log in"
    exit 1
fi

# We logged in, try to start up the protocol (provided that the
# user has specified how to do this)

if [ $PROMPT ]; then
    message "Starting Comm Protocol"
    /usr/sbin/chat TIMEOUT 15 $PROMPT $PROTOCOL_START
    if [ $? != 0 ]; then
        message "Prompt not received"
        exit 1
    fi
fi

if [ $START_ACK ]; then
    /usr/sbin/chat TIMEOUT 15 $START_ACK ""
    if [ $? != 0 ]; then
 message "Failed to start Protocol"
 exit 1
    fi
fi

# Success!
message "Protocol started"


Tanks in advance
Lindsay McPhee



--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to