Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pon and poff
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
roXet
n00b
n00b


Joined: 27 Jun 2002
Posts: 26

PostPosted: Wed Jul 10, 2002 1:47 am    Post subject: pon and poff Reply with quote

I saw several people asking about the pon and poff scripts somewhere on the fourm. Well I finally found them and I thought Iwould post them here.

Of course you will need to emerge and use ppp-config first, unless you want to configure your ppp stuff by hand. (have fun) =)

Ok, copy and paste these into two diffrent files, save them somewhere good, (I put them in /bin), chmod them 755 (I have been unable to get my users to be able to dial out, but I havn't worked on it much yet).

Here are the scripts
pon
Code:

#!/bin/sh
# Begin /usr/bin/pon

/usr/sbin/pppd call provider

# End /usr/bin/pon

in this script, replace 'provider' with the name of your isp that you entered when you ran ppp-config

Code:

#!/bin/sh
# Begin /usr/bin/poff
 
set -- `cat /var/run/ppp*.pid`
 
case $# in
  0)
    kill -15 `ps axw|grep "pppd call [[allnum:]]+"|grep -v grep|awk '{print $1}'`
    exit 0
    ;;
  1)
    kill -15 $1
    exit 0
    ;;
esac
 
# End /usr/bin/poff


This should work as is.

There you go, hope somebody finds this useful.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum