[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-diald
Subject: Re: Diald + syncppp +dynamics ip....
From: Mathieu Clabaut <mathieu.clabaut () free ! fr>
Date: 1999-08-30 17:32:29
[Download RAW message or body]
En réponse à Mike Jagdis <jaggy@purplet.demon.co.uk>:
> > My problem is how can diald get back the dynamic IP (only ipppd nows
> them) to
> > give them to the addroute scripts ?
>
> If you are using diald 0.99.1 the code to handle mode dev will
> lift the addresses off the device just like mode ppp. The trick
> is to make sure your connect script doesn't exit until you have
> valid addresses. One way of doing this is to have your disconnect
> script set the interface address to 0.0.0.0 (or some other known
> value) and have your connect script watch for the address being
> set.
Yeahhh... I just try your recommandations, and it works wonderfully well !!!
I join my scripts bellow for info.... (It may help somebody... who knows ?)
-mat
=============================================================================
/etc/diald.conf
================
mode dev
device ippp0
debug
dynamic
defaultroute
local 192.168.0.1
remote 192.168.0.2
fifo /etc/diald/diald.ctl
tcpport 1665
accounting-log /var/log/diald.log
connect /etc/diald/connect
disconnect /etc/diald/disconnect
/etc/diald/connect
===================
#!/bin/sh
/sbin/isdnctrl dial ippp0 1> /dev/null 2> /dev/null
pid=$$
trap "logger -i -t connect 'Stop connection process (timeout)'; /sbin/isdnctrl
hangup ippp0; ifconfig ippp0 0.0.0.0; exit 3" 10
#waiting for max 10 seconds before giving up
(sonpid=$$;sleep 10; kill -10 $pid) 1> /dev/null 2> /dev/null &
#waiting for dynamic address on ippp0
res=`ifconfig ippp0 | grep NONE`
while test "x$res" != "x"
do
logger -i -t connect "No address on ippp0 : $res"
sleep 1
res=`ifconfig ippp0 | grep NONE`
done
logger -i -t connect "address set on ippp0"
kill -9 $sonpid 1> /dev/null 2> /dev/null
exit 0
/etc/diald/disconnect
======================
#!/bin/sh
#hanging up ippp0
logger -i -t disconnect "Disconnecting !"
/sbin/isdnctrl hangup ippp0 1> /dev/null 2> /dev/null
logger -i -t disconnect "Setting ippp0 route to 0.0.0.0"
ifconfig ippp0 0.0.0.0 1> /dev/null 2> /dev/null
______________________________________________________________________________
Mathieu CLABAUT mailto:mathieu.clabaut@free.fr
DIGINEXT http://www.multimania.com/~clabault
Le Tertia II, Pôle d'activité des Milles tel: 04 42 97 56 47
13851 Aix En Provence - cedex 3 fax: 04 42 97 56 49
------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to majordomo@vger.rutgers.edu
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic