vibidoo Guru
Joined: 27 Nov 2002 Posts: 409
|
Posted: Tue Dec 17, 2002 12:50 pm Post subject: My adsl autostart script |
|
|
Dear ALL
I am using this script to get the ADSL connexion on defaut runlevel .
Almost time it works , but sometimes the adictrl take more than 30 seconde to initialize the ADSL line .
How could I do to detect the adictrl when it is up ??
I will use 2 scripts to get ADSL up , the first one will load ( modprobe adiusbadsl and adictrl)
And the 2nd script will load only the adsl-start .
actually my script is :
Code: |
-- /etc/init.d/net.start --
#!/sbin/runscript
depend () {
need net.eth0
}
start () {
ebegin " Connect to ADSL"
modprobe adiusbadsl #my adsl modem
/usr/local/bin/adictrl # Load the firmware into
# the modem
sleep 30 # sometimes need more than 30 s
#to get the line initialized
/usr/sbin/adsl-start # Connect to adsl
eend $? " Connexion failed"
}
stop () {
ebegin " Stop the ADSL Connexion "
kill $ (cat /var/run/ppp0.pid)
eend $? " connexion failed to stop "
}
|
I use a Sagem Fast 800 adsl modem's
Last edited by vibidoo on Wed Dec 18, 2002 11:27 am; edited 1 time in total |
|