From owner-freebsd-questions Tue Jul 13 9:24:27 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id 0B3151532F for ; Tue, 13 Jul 1999 09:24:24 -0700 (PDT) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.8.8) id MAA08984; Tue, 13 Jul 1999 12:25:37 -0400 (EDT) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199907131625.MAA08984@cc942873-a.ewndsr1.nj.home.com> Subject: Re: [ does not work in /etc/rc In-Reply-To: from Are Bryne at "Jul 13, 99 05:58:34 pm" To: are.bryne@communique.no (Are Bryne) Date: Tue, 13 Jul 1999 12:25:37 -0400 (EDT) Cc: freebsd-questions@FreeBSD.ORG, are.bryne@communique.no Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Are Bryne wrote, > The problem seems to occur in /etc/rc. [ does not work, at least not for > -f and !=. I've md5'ed my hard linked /bin/test and /bin/[, to be certain > the binaries are the same as for the installation binaries. > > Since the tests do not work, the rc.diskless1 file is slurped in by > /etc/rc. I've tried moving rc.diskless1 elsewhere, and then I get an error > telling me the file does not exist. Odd, the tests seem to be "failing" to the affirmative. No error output either, apparently. > I've added the following after 'export PATH' in /etc/rc: > > #debugging: > echo $PATH > echo > /sbin/sysctl -n vfs.nfs.diskless_valid > echo > if [ -f /etc/rc.diskless1 ]; then echo "-f does not work"; elif then echo "-f works"; fi > if [ 0 != 0 ]; then echo "!= does not work"; elif then echo "!= works"; fi > echo [snip] > Interactively, the tests work, though... > > Does anyone know what's happening? Does using test(1) work? Oh, and the /etc/rc file _is_ using /bin/sh, right? -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message