# rp-pppoe:  No /etc/ppp/ip-up or ip-up.local

## rizzo

Changed my DSL router from redhat to gentoo.   Both used rp-pppoe.  On the redhat box, after the dsl connection was made with adsl-start,  something would execute /etc/ppp/ip-up, which in turn would execute /etc/ppp/ip-up.local.  In ip-up.local I specified my wget commands to update my dynamic dns entries at http://zoneedit.com.

Also on the occasions that Ameritech would change the IP, those scripts would get called and everything would be great without me having to follow it.

However there is no such script in the gentoo /etc/ppp directory.  I copied my ip-up.local file there but of course it didn't run since there was no ip-up to call it.  I renamed it ip-up but it still didn't get executed.

Any thoughts?

----------

## Frumsel

The script /etc/ppp/ip-up should be executed by ppp when the connection is up. It is also mentioned in the man page of pppd. 

I checked the source code of ppp and found a comment that the script is only executed when it is a executable. Maybe a 'chmod +x' to the script will help?

I have a similar problem at home, will try it tonight. Can't try it here at work, sitting behind a w2k machine.   :Embarassed: 

----------

## rizzo

My /etc/ppp/ip-up is already mode 755.

In the meantime I've written a script to compare the current IP from ifconfig with the IP I had last time the script ran.  If they are different I execute the ip-up script.  This runs in cron every 5 minutes.

Here it is for your enjoyment.  Naturally I'd prefer if the ip-up ran like I expect it too.

```

#!/bin/sh

. /etc/profile

IPFILE="zoneeditip.txt"

EXTIF="ppp0"

EXTIP=`ifconfig $EXTIF | grep inet | cut -f2 -d:| cut -f1 -d" "`

if [ -f $IPFILE ]

then

        # Read in IP in IPFILE

        OLDIP=`cat $IPFILE`

        if [ $OLDIP != $EXTIP ]

        then

                echo $EXTIP > $IPFILE

                /etc/ppp/ip-up

                exit

        fi

else

        echo $EXTIP > $IPFILE

        /etc/ppp/ip-up

        exit

fi

```

Last edited by rizzo on Wed Aug 21, 2002 4:18 pm; edited 1 time in total

----------

## kang

I have the same problem of /etc/ppp/ip-up not getting exec'ed

i'm using rp-pppoe too... I think that rp-ppoe talks directly to the pppoe server and when u disconnect/reconnect (every 24h for me) it doesn't brings ppp down/up (the logs aren't showing it though)

----------

## rizzo

I forgot that cron instances don't have profile info, so I was getting problems with it not finding executables in the path.  Added the . /etc/profile line to my above code.  FYI.

----------

## zentek

My ip-up is working fine.

Same thing as whit cron it does not have any profile so i had to use complet path for each command. Check in your log, you should see why its not getting executed.

Yes, rp-pppoe will execute the script each time your connection go up and down. Im updating my domaine from that script and never had problem.

----------

