From owner-freebsd-questions Thu Jul 8 17:20:44 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail.actrix.gen.nz (mail2.actrix.gen.nz [203.96.16.37]) by hub.freebsd.org (Postfix) with ESMTP id A05D9155B3 for ; Thu, 8 Jul 1999 17:20:40 -0700 (PDT) (envelope-from dan.langille@dvl-software.com) Received: from actrix.gen.nz (www@lemuria.actrix.gen.nz [203.96.16.20]) by mail.actrix.gen.nz (8.9.1/8.9.1) with SMTP id MAA08118; Fri, 9 Jul 1999 12:20:27 +1200 (NZST) From: "Dan Langille" Reply-To: dan.langille@dvl-software.com To: Dan Nelson , Dan Langille Cc: questions@FreeBSD.ORG Date: Fri, 9 Jul 1999 12:20:27 nzst Subject: Re: lynx from /etc/crontab fails X-Mailer: DMailWeb Web to Mail Gateway 2.1t, http://netwinsite.com/top_mail.htm Message-id: <3785404b.55b8.0@actrix.gen.nz> X-User-Info: 202.37.52.5 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dan Nelson wrote: >In the last episode (Jul 09), Dan Langille said: >> I'm trying to execute a shell script from a cron job. The script >> runs fine when launched manually, but when launched from a cron job I >> get the following: >> >> lynx: Can't access startfile http://www.yi.org/bin/dyndns.fcgi?ipaddr= >> >> Any ideas why lynx has this problem only under these circumstances? > >Try ktracing it? Do you set any variables in your shell startup >scripts that might affect lynx's behaviour? 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, .*,,"` now=`date` lynx -source -auth=$user_id:$password \ http://www.yi.org/bin/dyndns.fcgi?ipaddr=$ip_addr | \ sed -e "s,^,$now: ," -e "s,<.*\?>,,g" So yes, some variables are set, but this shouldn't affect lynx would it? >Also consider using fetch, which was designed to be used in >non-interactive places like cron scripts. I don't know how/if fetch can be used in this instance. - Dan Langille To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message