Re: [vserver] [PATCH] support for busybox grep and busybox shell

From: Daniel Hokka Zakrisson <daniel_at_hozac.com>
Date: Fri 03 Aug 2007 - 15:04:04 BST
Message-ID: <39887.192.168.102.6.1186149844.squirrel@intranet>

Natanael Copa wrote:
> <snip>
>> I like the bashisms. They mean we get a defined working environment, so
>> shells different interpretations of POSIX or whatever don't affect us...
>
> well.. I'm trying to make a minimal vserver host. Now look at this:
>
> nc ~ # ls -l /bin/bash /bin/busybox
> -rwxr-xr-x 1 root root 713696 Aug 3 06:13 /bin/bash
> -rwxr-xr-x 1 root root 778696 Aug 1 17:41 /bin/busybox
>
> busybox ash is almost compatible with bash. Has cmdline completion and
> lots other nice things. Basicly it misses arrays. But in addition to the
> shell it also provides thees tools:

No arrays is a deal-breaker. We rely heavily on them, for good reason.
There's no clean way to use a single variable and be able to separate
different words that may contain spaces. (No, encasing them all in quotes
and using eval is not clean.)

>> That said, I'm not entirely opposed to the idea, given that POSIX-sh
>> doesn't make the scripts more complicated or harder to read...
>
> I don't think it will be harder to read. Maybe even easier. I could make
> a sample for you when i get time. I suspect it will require some work.

Without arrays, there's no point. We need them.

>> > Natanael Copa
>>
>> The grep patch looks sane, thanks.

-- 
Daniel Hokka Zakrisson
Received on Fri Aug 3 15:04:21 2007
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 03 Aug 2007 - 15:04:23 BST by hypermail 2.1.8