From owner-freebsd-questions@FreeBSD.ORG Sat Mar 29 07:12:01 2003 Return-Path: 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 065BF37B401 for ; Sat, 29 Mar 2003 07:12:01 -0800 (PST) Received: from ns.odessos.org (ns.odessos.org [212.50.30.193]) by mx1.FreeBSD.org (Postfix) with SMTP id 37E2043F75 for ; Sat, 29 Mar 2003 07:11:56 -0800 (PST) (envelope-from cyberzone@odessos.org) Received: (qmail 22892 invoked from network); 29 Mar 2003 15:12:07 -0000 Received: from cyberzone.odessos.org (HELO K6) (212.50.30.198) by ns.odessos.org with SMTP; 29 Mar 2003 15:12:07 -0000 Message-ID: <000801c2f60d$8373b040$0764a8c0@cyberzone.odessos.org> From: "Martin Tsanov" To: Date: Sat, 29 Mar 2003 17:09:01 +0100 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: cron job X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2003 15:12:03 -0000 Hello I have a gateway with wireless interface wi0. From time to time it = hangs down with the following log entry in /var/log/all.log Mar 28 22:19:37 morpheus /kernel: wi0: failed to allocate 1594 bytes on = NIC Mar 28 22:19:37 morpheus /kernel: wi0: tx buffer allocation failed Mar 28 22:19:37 morpheus /kernel: wi0: wi_cmd: busy bit won't clear. Mar 28 22:19:37 morpheus /kernel: wi0: failed to allocate 1594 bytes on = NIC Mar 28 22:19:37 morpheus /kernel: wi0: mgmt. buffer allocation failed Mar 28 22:20:42 morpheus /kernel: wi0: wi_cmd: busy bit won't clear. Mar 28 22:21:42 morpheus /kernel: wi0: wi_cmd: busy bit won't clear. I tried the following script, placed as a crontab entry to reboot = the system: #!/bin/sh result=3D`fping 212.50.x.xxx|cut -b 17-21` result1=3D"alive" if [ "$result1" =3D "$result" ]; then echo $result else reboot fi This script works as expected when envoked from the shell, but when = placed as th following crontab entry: */10 * * * * root /root/reb (reb is the = script name) the system reboots regardless if 212.50.x.xxx is reachable or not. What is the difference??? And what am I doing wrong?? I'm tracking FreeBSD 4-STABLE and this is 4.8-RC FreeBSD 4.8-RC #0: Any help will be appreciated.