Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jul 2002 08:31:08 -0400
From:      David Gilbert <dgilbert@velocet.ca>
To:        Andrew J Caines <A.J.Caines@halplant.com>
Cc:        FreeBSD-Questions <freebsd-questions@FreeBSD.ORG>
Subject:   [FBSD-Q] Re: Dynamic DNS Client experiences?
Message-ID:  <15653.37260.955780.275037@canoe.velocet.net>
In-Reply-To: <20020704233132.GR10927@hal9000.halplant.com>
References:  <20020704055534.T20112-100000@small.pukruppa.de> <20020704100946.S97579-100000@seven.slakin.net> <20020704233132.GR10927@hal9000.halplant.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "Andrew" == Andrew J Caines <Andrew> writes:

Andrew> # cd /usr/ports/net ; make search key=dynamic

I use dyndns.org.  It's the "ddup" port.  It works well, but I had to
write a little script (called form dhclient-exit-hook) to only call
ddup when the IP _changes_ (the aparently don't want to hear from you
if it doesn't).

Note that if you run ntpd, you have to kill it before running
dhclient.  I do this in /etc/rc.resume (for the internal ethernet) and
in /etc/pccard_ether for pccard devices.

#!/bin/bash
#
# Check for changes in the IP.

if [ "$reason" != "REBOOT" -a "$reason" != "BOUND" ]
then
	exit 0
fi

lastip=`cat /etc/lastip`

if [ "$new_ip_address" != "0.0.0.0" -a "$new_ip_address" != "$lastip" ]
then
	#echo $curip $lastip
	echo $new_ip_address >/etc/lastip
	/usr/local/sbin/ddup --host yourhost.homeip.net > /dev/null 2>&1
fi

if /bin/ps -ax | /usr/bin/grep -v grep | /usr/bin/grep -q ntpd
then
	:
else
	sleep 15
	/usr/bin/killall -9 ntpd
	/usr/sbin/ntpdate some.ntp.host
	/usr/sbin/ntpd -p /var/run/ntpd.pid
fi

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15653.37260.955780.275037>