From owner-freebsd-questions Sun Nov 24 15:12:17 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85D4C37B401 for ; Sun, 24 Nov 2002 15:12:16 -0800 (PST) Received: from the-frontier.org (ns1.the-frontier.org [216.86.199.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC1B743E88 for ; Sun, 24 Nov 2002 15:12:15 -0800 (PST) (envelope-from pscott@skycoast.us) Received: from [192.168.66.249] (dhcp-249-66-168-192.the-frontier.org [192.168.66.249]) by the-frontier.org (8.9.3/8.9.3) with ESMTP id PAA05856 for ; Sun, 24 Nov 2002 15:12:15 -0800 (PST) (envelope-from pscott@skycoast.us) User-Agent: Microsoft-Entourage/10.1.1.2418 Date: Sun, 24 Nov 2002 15:12:14 -0800 Subject: Re: .sh interactive ok, from crontab, not From: "Paul A. Scott" To: Message-ID: In-Reply-To: <5.1.1.6.2.20021124234729.02d7a030@mail.go2france.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >> From: Len Conrad >> It works for me, and I suspect that it's working for you, too. > > well, it's really not. The crontab execution is trying to run the daemon > even when the daemon shows up in "ps aux". Well, it was just a guess. :) I tested against my 'named' daemon, using the code you supplied and it works fine. What version of FreeBSD? Are you using the 'stock' shell? Did you look at the output from grep to see what you get? How about splitting the test onto more than one line so that you can echo and then test the status code. ps -aux | grep -i "^root.*master" STATUS=$? echo "got $STATUS" if [ $STATUS = 0 ] ; then That might tell you something if you get a status 2. If you'd like, send me your exact script, and crontab entry; I'll test it here. Paul -- Paul A. Scott mailto:pscott@skycoast.us http://skycoast.us/pscott/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message