On Thu, Jun 22, 2000 at 03:35:26PM +1000, Howard Lowndes wrote:
> Be carefull tho, there is a bug in there.  Try these modified scripts,
> note the use of basename:
> 
> #!/bin/bash
> # /etc/ppp/ip-up
> REALDEVICE=`/bin/basename $2`

except that the original poster only wanted the interface (ppp*),
which is given as $1, not the serial device (/dev/ttyS*), given as $2
(see pppd(8)).


on a debian system (at least), just plonk your script in
/etc/ppp/ip-up.d and use $PPP_IFACE:

  #! /bin/sh
  route add -host 192.168.0.13/32 dev $PPP_IFACE

(and $PPP_TTYNAME is already `basename $PPP_TTY`, in case you have a
need of it)


the kernel should remove the route once the interface goes down, but
if there is any other state you want to cleanup, use the corresponding
ip-down script

-- 
 - Gus
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to