Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rp-pppoe: No /etc/ppp/ip-up or ip-up.local
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
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Wed Aug 21, 2002 1:56 am    Post subject: rp-pppoe: No /etc/ppp/ip-up or ip-up.local Reply with quote

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?
Back to top
View user's profile Send private message
Frumsel
n00b
n00b


Joined: 02 Aug 2002
Posts: 5
Location: Breda, the Netherlands

PostPosted: Wed Aug 21, 2002 1:29 pm    Post subject: Reply with quote

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. :oops:
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Wed Aug 21, 2002 1:38 pm    Post subject: Reply with quote

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.

Code:

#!/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
Back to top
View user's profile Send private message
kang
Retired Dev
Retired Dev


Joined: 17 May 2002
Posts: 60

PostPosted: Wed Aug 21, 2002 4:15 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Wed Aug 21, 2002 4:19 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
zentek
n00b
n00b


Joined: 03 Jul 2002
Posts: 41

PostPosted: Thu Aug 22, 2002 11:48 am    Post subject: Reply with quote

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.
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