On 8 Feb 2004 06:27:44 -0800, Campbell <(E-Mail Removed)> wrote:
> I have a script that runs every 5 minutes that runs the ifconfig
> command to detect the external IP address of my machine, which is
> connected with a DSL modem to the Internet.
>
> Whenever my IP address changes, the cron'd ifconfig doesn't seem to
> pick up this change for about 48 hours. If I log in manually and run
> ifconfig it seems to return the correct new IP address, then all of a
> sudden the cron'd one returns the correct address.
>
> I tried upgrading to the latest version of nettools (1.60 - ifconfig
> 1.42) but that didn't seem to make a difference.
>
> Has anyone else experienced this, or have any ideas how to solve it?
If using pppoe, the /etc/ppp/ip-up script will always run (with your IP as
a parameter) when you get a new ppp0 IP (I use that to update my dynamic
DNS). If using dhcp instead, then something related to whatever does your
dhcp (dhcpcd or pump) should have related scripts that can also monitor
that.
So it appears that something in your undisclosed crontab entry or script
is flawed (and apparently less reliable).
--
David Efflandt - All spam ignored
http://www.de-srv.com/