From owner-freebsd-questions Thu Jul 8 19:45:12 1999 Delivered-To: freebsd-questions@freebsd.org Received: from avarice.riverstyx.net (hq-port-97.harbour-dhcp-pool.infinetgroup.com [207.23.37.97]) by hub.freebsd.org (Postfix) with ESMTP id 9F08B14D0C for ; Thu, 8 Jul 1999 19:45:08 -0700 (PDT) (envelope-from unknown@riverstyx.net) Received: from avarice (unknown@avarice [207.23.37.97]) by avarice.riverstyx.net (8.9.3/8.9.3) with ESMTP id TAA26473; Thu, 8 Jul 1999 19:43:55 -0700 Date: Thu, 8 Jul 1999 19:43:55 -0700 (PDT) From: Tani Hosokawa To: Dan Nelson Cc: Dan Langille , questions@FreeBSD.ORG Subject: Re: lynx from /etc/crontab fails In-Reply-To: <19990708213001.A25909@dan.emsphone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 8 Jul 1999, Dan Nelson wrote: > > I haven't tried ktracing it (first I've heard of ktracing). Here is > > the script: > > > > $ cat dns_update.sh > > #!/bin/sh > > > > user_id="something" > > password="secret" > > > > ip_addr=`netstat -rn | egrep ^0.0.0.0 | sed -e "s,.* ,,g" | \ > > xargs /sbin/ifconfig | grep "inet.addr" | sed -e "s,.*addr:,," \ > > -e "s, .*,,"` > > Wow. What is this thing trying to do here? It can't possibly return a > valid value, since "netstat -rn" prints "default" for the default route > (not 0.0.0.0), and ifconfig never prints the string "inet addr". > > If you're trying to get your current dialup IP number, run this script > from /etc/ppp/ppp.linkup, where you can pass the IP number directly > from ppp and skip all this "guess our IP based on our default route" > trickery. This is obviously transplanted from a Linux box... RTFM :) --- tani hosokawa river styx internet To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message