[BusyBox] Fully working "test"

Alfred M. Szmidt ams at trillian.itslinux.org
Tue Sep 5 21:14:05 UTC 2000


On Tue, 05 Sep 2000, Erik Andersen wrote:

> On Sun Sep 03, 2000 at 11:34:38PM +0200, Alfred M. Szmidt wrote:
> > Ok, I got mad and ported GNU test to busybox :-)
> > (I hope that theres not a lot to fix)
> > 
> > Anyway, here is test.c (just overwrite the old one)
> 
> This is larger and twistier then the current BusyBox
> test.c, so could you elaborate the reasons why this 
> one should replace the current test.c that is already
> in BusyBox?

The Busybox test.c doesnt know how to test for files and file types
and for some scripts (init scripts for example) you need to check if a file
exists or not, if its a link, hard link etc.

One could make the "file testing part" optional.

Hmmm.... I just checked the Busybox test.c version and noticed that Busybox
does in fact support for file checking... wonder why i missed that.

Maybe i could just add all the missing features from this version (and rewrite
them to be really small of course) to the Busybox test, wonder if there is
really anything thats missing now when I'm reading the source code for test.c

Ok, now i know why i tought that Busybox test.c didnt support file testing
i didnt put my variables into a "", whoops

Sorry, just ignore that patch, next time ill read the source then trust my
scripts.

-- 
Alfred M. Szmidt





More information about the busybox mailing list