LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2003, 05:23 PM   #1
Newman_SCO
Member
 
Registered: Jul 2003
Location: Scotland, Fife
Distribution: Mandrake 9.1
Posts: 31

Rep: Reputation: 15
ADSL modem fun !


Hi,
I want to make a script which allows me to reconnect to the internet.

But kill the stalled connection first.


I have a hunch that if I use the commands from the services information:

root 14687 0.0 0.3 1348 464 ? S 22:49 0:00 /sbin/ifplugd -w -b -i eth0
root 17990 0.0 0.4 1416 584 ? S 22:49 0:00 /usr/sbin/modem_run -v 0 -m -f /usr/share/speedtouch/mgmt.o
root 13797 0.0 0.6 2020 872 ? S 22:50 0:00 /usr/sbin/pppd call adsl
root 9579 0.0 0.5 5980 696 ? S< 22:50 0:00 /usr/sbin/pppoa3 -c -vpi 0 -vci 38
root 11363 0.0 0.5 5980 696 ? S< 22:50 0:00 /usr/sbin/pppoa3 -c -vpi 0 -vci 38
root 24360 0.0 0.5 5980 696 ? S< 22:50 0:00 /usr/sbin/pppoa3 -c -vpi 0 -vci 38
root 21792 0.1 0.5 5980 696 ? S< 22:50 0:00 /usr/sbin/pppoa3 -c -vpi 0 -vci 38



It will work.

don't know how to kill it though.

But how would I construct this script? (basic sh knowledge)


Thanks alot if you can help in any way at all.

Neil
 
Old 08-02-2003, 06:46 AM   #2
MadCactus
Member
 
Registered: Jul 2003
Distribution: Slackware 9.1
Posts: 195

Rep: Reputation: 30
Hi

You could kill pppd and pppoa3 using the pids kept in /var/run:

#!/bin/bash

kill $(cat /var/run/pppoa3-modemN.pid)
kill $(cat /var/run/ppp0.pid)

Where N is 0 by default. And then reconnect using

pppd call adsl

You don't need to restart modem_run afaik. There is another way to do this using named pipes, but I couldn't get it to work.
 
Old 08-02-2003, 09:17 AM   #3
Newman_SCO
Member
 
Registered: Jul 2003
Location: Scotland, Fife
Distribution: Mandrake 9.1
Posts: 31

Original Poster
Rep: Reputation: 15
Thank you MadCactus
I have things working like a treat now.
Thanks again
 
Old 08-03-2003, 12:10 PM   #4
MadCactus
Member
 
Registered: Jul 2003
Distribution: Slackware 9.1
Posts: 195

Rep: Reputation: 30
No probs - glad to help!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SUSE 9.2 detect my [B]ADSL USB-Ethernet Modem-Router [/B] as a [B]Dial up modem[/B]. myprecius Linux - Hardware 0 06-27-2005 09:21 AM
ADSL Routers Setup- Microsom Deskporte router 100 and Planet ADSL modem router mabonline Linux - Hardware 1 02-27-2004 05:36 PM
ADSL eth modem and ISDN serial modem configuration zedrob Linux - Networking 6 01-19-2004 08:02 AM
Devolo MicroLink ADSL Fun USB & SuSE 8.2 Georg Halfas Linux - Hardware 3 01-01-2004 03:03 PM
Using my ADSL modem caffeinelegacy Linux - Hardware 8 09-16-2003 04:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration