Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jul 1999 17:58:34 +0200 (CEST)
From:      Are Bryne <are.bryne@communique.no>
To:        FreeBSD questions list <freebsd-questions@freebsd.org>
Cc:        Are Bryne <are.bryne@communique.no>
Subject:   [ does not work in /etc/rc
Message-ID:  <Pine.BSF.4.05.9907131755330.11317-100000@rune.communique.no>

next in thread | raw e-mail | index | archive | help
Hello,

I am working on a pc whose / partition unfortunately was nuked. After
restoring everything as should be (to my knowledge), I am having problems
booting the machine. It is a 3.2-RELEASE install.

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.

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


Here is the relevant output:

...
npx0: INT 16 interface
changing root device to wd0s1a
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin

0

-f does not work

!= does not work

.: Can't open /etc/rc.diskless1
Enter full pathname of shell or RETURN for /bin/sh:


Interactively, the tests work, though...

Does anyone know what's happening?

Thank you in advance.

Regards,
Are Bryne
Communiqué DA                            Phone:        +47 22 44 33 99
Parkveien 51b                            E-mail:   admin@communique.no
N-0256 Oslo                              URL: http://www.communique.no



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9907131755330.11317-100000>