#!/bin/sh

if [ `pidof pppd` ] ; then
	logger "La connexion semble dj tre lance!"
	exit
fi

# Wait for modem "operational" state:
/usr/sbin/adictrl -s

# Get the ADI network interface name:
INTERFACE=`/usr/sbin/adictrl -i`

# Configure the ADI network interface:
/sbin/ifconfig $INTERFACE 192.168.60.30 netmask 255.255.255.0 up

# Start pppd:
/usr/sbin/pppd persist pty "/usr/sbin/pppoa -I $INTERFACE" file /etc/ppp/options.adsl

echo "STARTED" > /var/run/adiusbadsl

