View previous topic :: View next topic |
Author |
Message |
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Wed Aug 21, 2002 1:56 am Post subject: rp-pppoe: No /etc/ppp/ip-up or ip-up.local |
|
|
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 |
|
|
Frumsel n00b
Joined: 02 Aug 2002 Posts: 5 Location: Breda, the Netherlands
|
Posted: Wed Aug 21, 2002 1:29 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Wed Aug 21, 2002 1:38 pm Post subject: |
|
|
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 |
|
|
kang Retired Dev
Joined: 17 May 2002 Posts: 60
|
Posted: Wed Aug 21, 2002 4:15 pm Post subject: |
|
|
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 |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Wed Aug 21, 2002 4:19 pm Post subject: |
|
|
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 |
|
|
zentek n00b
Joined: 03 Jul 2002 Posts: 41
|
Posted: Thu Aug 22, 2002 11:48 am Post subject: |
|
|
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 |
|
|
|