Re: my ip-up.d script doesn't work
>
> I just freshly reinstalled ppp on one machine here. My
> custom script in /etc/ppp/ip-up.d does not work; it
> doesn't appear to run. I tested it form the command
> line with the named parameters and it worked. Here it is:
>
> #!/bin/sh
> # 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 12.34.56.78
> # $5 Peer IP number 12.34.56.99
> # $6 Optional ``ipparam'' value foo
Are you certain that the script is called with those arguments?
I don't believe the $[1-6] variables are available to the scripts
in ip-up.d. Instead, use the environment variables set in ip-up:
PPP_IFACE="$1"
PPP_TTY="$2"
PPP_SPEED="$3"
PPP_LOCAL="$4"
PPP_REMOTE="$5"
PPP_IPPARAM="$6"
PPP_TTYNAME=`/usr/bin/basename "$2"`
>
> # This script routes all of RMIT via the dialup to RMIT, if
> # that's where we've just called.
>
> case "$4" in
> 131.170.*)
> route add -net 131.170.0.0 netmask 255.255.0.0 $1
> ;;
>
> esac
try: case "$PPP_LOCAL" in
Marc
----------
Marc Mongeon <mongeon@bankoe.com>
Unix Specialist
Ban-Koe Systems
9100 W Bloomington Fwy
Bloomington, MN 55431-2200
(612)888-0123, x417 | FAX: (612)888-3344
----------
"It's such a fine line between clever and stupid."
-- David St. Hubbins and Nigel Tufnel of "Spinal Tap"
Reply to: