On Mon, 26 Jul 1999 12:42:34 +0200 (CEST), hai scritto:

>Try using the ifsetup script (supported by diald >= 0.99). If you define a
>ifsetup script in diald.conf, diald will use that instead of all ifconfig
>and routing calls.

>The ifsetup script is called when:
>1) diald starts (ifsetup start proxy <proxy devicename>)
>2) the link is brought up (ifsetup start link <link devicename>)
>3) the link is brought down (ifsetup stop link <link devicename>)
>4) diald quits (ifsetup stop proxy <proxy devicename>)

Thanks, this is the right solution for me. However I have a problem: when the
link goes up I have the parameter containing the link device, but I don't know
the proxy device, how can I shut down the proxy dev?

For now I have setup interfaces manually since they'll always be eth0 and
tap0, but I'd like to use the parameters diald gives me.

This is the test script I used to test the ifsetup functionality; when I get
"start link" I need to know the proxy interface to deactivate it. Have you
suggestions about this issue?


====== ifsetup script
export ROUTER_IP=10.0.0.88
export LINK_DEV=eth0
export PROXY_DEV=tap0
export LOCAL_IP=10.0.0.117
 
 
proxy_start () {
        /sbin/ifconfig $PROXY_DEV $LOCAL_IP pointopoint $ROUTER_IP broadcast
0.0.0.0 netmask 255.255.255.255 metric 0 mtu 576 up
        /sbin/route add default metric 0  netmask 0.0.0.0 dev $PROXY_DEV
}
proxy_stop () {
        /sbin/ifconfig $PROXY_DEV down
}
link_start () {
        /sbin/route add default gw $ROUTER_IP dev $LINK_DEV
}
link_stop () {
        route del default dev $LINK_DEV
}
 
if [ "$1" = "start" ]; then
        if [ "$2" = "proxy" ]; then
                proxy_start
        elif [ "$2" = "link" ]; then
                link_start
                proxy_stop
        fi
elif [ "$1" = "stop" ]; then
        if [ "$2" = "proxy" ]; then
                proxy_stop
        elif [ "$2" = "link" ]; then
                link_stop
                proxy_start
        fi
fi
=====

Thanks.

-- 
[EMAIL PROTECTED]

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

Reply via email to