[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ppp and ip-up

Does ppp run the ip-up and ip-down scripts for incoming connections
as well as outgoing? I added some commands to my ip-up on the server
to set up extra routes when I dial in, but they don't seem
to get run.

# $Id: ip-up,v 1.1 1996/01/31 21:25:59 alvar Exp $
# This script is run by the pppd after the link is established.
# It should be used to add routes, set IP address, run the mailq 
# etc.
# This script is called with the following arguments:
#    Arg  Name               Example
#    $1   Interface name     ppp0
#    $2   The tty            ttyS1
#    $3   The link speed     38400
#    $4   Local IP number
#    $5   Peer  IP number

# The  environment is cleared before executing this script
# so the path must be reset
export PATH

USERNAME=`w | grep $2 | perl -e '$_ = <STDIN>; s/(.+?) .+/\$1/; print;'`

# if it's hamish, add a route to his half of the subnet
if [ $USERNAME = "hamish" ]; then
	route add -net netmask $1

# last line

I understand that $2 could include /dev/ as well, which would
break my script; I haven't checked this out yet. Or is ip-up not run at all
for incoming connections?

Hamish Moffatt, hamish@debian.org, hamish@rising.com.au, hmoffatt@mail.com
Latest Debian packages at ftp://ftp.rising.com.au/pub/hamish. PGP#EFA6B9D5
CCs of replies from mailing lists are welcome.   http://hamish.home.ml.org

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: