Results 1 to 10 of 13
I found a tutorial for a adsl connection that creates a startup script and a stop connection script. While the startup script works great the stop script gives errors. Here ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-11-2003 #1Just Joined!
- Join Date
- Jun 2003
- Location
- Cyprus
- Posts
- 96
Script Error!
I found a tutorial for a adsl connection that creates a startup script and a stop connection script. While the startup script works great the stop script gives errors. Here are the commands (copied & pasted) from the tutorial:
Now to create the stop adsl script
vi stopadsl
Enter the following information
#!/bin/sh
kill -INT `pidof pppd`
Save and exit file.
chmod 700 /root/stopadsl
The error is about the pidof and kill commands. I'm using Red Hat 9. Because i can't shutdown the connection properly i can't connect again because i get a message saying that the modem is already in use so i have to reboot each time in order to reconnect.
Any ideas???
Thanks. I am a nOOb
so i would appreciate it if you keep it simple
By the way the tutorial was for setting a Alcatel USB Adsl connection under linux and works great.
- 08-11-2003 #2Linux User
- Join Date
- Feb 2003
- Location
- Norway, Asker
- Posts
- 267
you could install rp-pppoe and use adsl-start and stop.
www.roaringpnguin.com/pppoe
- 08-11-2003 #3Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
What errors is it that you get?
- 08-12-2003 #4Just Joined!
- Join Date
- Jun 2003
- Location
- Cyprus
- Posts
- 96
Well its not exactly an error i kind or remember another script
but this is what i get when i run the ./stopadsl script:
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l
[sigspec]
An because of that when i try to reconnect later i get this:
Another program/driver is already accessing the modem...
So i have to reboot all the time to be able to use the modem again!
- 08-12-2003 #5Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
The scripts seems to specifie some wrong flag to the kill-command. Can you paste in the output from the command.
So we can see what aregument is passed on to kill.Code:cat stopadsl |grep kill
Regards
Andutt
- 08-12-2003 #6Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Could it be that you have used the wrong quotes to encapsulate pidof pppd? Ie. ' instead of `? Try this instead:
Code:kill -INT $(pidof pppd)
- 08-12-2003 #7Just Joined!
- Join Date
- Jun 2003
- Location
- Cyprus
- Posts
- 96
This is what i get:
[root@localhost root]# cat stopadsl |grep kill
kill -l `pidof pppd`
[root@localhost root]#
- 08-12-2003 #8Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
Edit your script with an texdteditor like emace,vi,pico and change that line to what Dolda pasted in and give it a try again.
Regards
Andutt
- 08-12-2003 #9Just Joined!
- Join Date
- Jun 2003
- Location
- Cyprus
- Posts
- 96
Well l have to go to work now so i'll give it a try tonight. Thnx!
- 08-13-2003 #10Just Joined!
- Join Date
- Jun 2003
- Location
- Cyprus
- Posts
- 96
Well i am sorry to say that this doesn't work either. Here is what i get:
cd root
[root@localhost root]# ./stopadsl
./stopadsl: line 1: pidof: command not found
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
[root@localhost root]#
And in case you are wondering:
[root@localhost root]# cat stopadsl |grep kill
kill -INT $(pidof pppd)
[root@localhost root]#


Reply With Quote
