Carl Lowenstein wrote:
> On 7/26/06, David Looney <[EMAIL PROTECTED]> wrote:
>> Lan Barnes wrote:

[r.e. utility to email when cox dhcp ip changes]

> 
> OK, how about this one:
> 
> $ /usr/sbin/traceroute -n -m1 2>/dev/null $(gawk '/nameserver/{print
> $2; exit}' /etc/resolv.conf) | gawk '{print $2}'

This is very nice, but as you noted:

> Of course this doesn't work if the
> DHCP server in your home router believes that it too is a nameserver.

Mine pretends to be one, putting it's own lan address in
/etc/resolv.conf and /var/lib/dhcpcd/dhcpcd-eth0.info as DNS= the lan
gateway ip.

$ /usr/sbin/traceroute -n -m1 2>/dev/null $(gawk '/nameserver/{print $2;
exit}' /etc/resolv.conf) | gawk '{print $2}'
$

David Looney


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to