[lxc-devel] using posix shell instead of bash

Serge Hallyn serge.hallyn at canonical.com
Wed Nov 14 15:54:58 UTC 2012


Quoting Natanael Copa (ncopa at alpinelinux.org):
> Hi,
> 
> I wonder if it there are any interest to make the scripts posix shell
> compliant so they can run with for example busybox ash and dash.
> 
> I would like to provide proper LCX support for Alpine Linux, which by
> default runs from tmpfs. It uses uclibc and busybox as the base system,
> which makes it very lightweight. Looking at the scripts, it seems like
> it would be fairly easy to adjust the script to not depend on bash at
> all, making it possible to make the LCX host even lighter.
> 
> Before I start with sending patches, is this something that you would
> be interested in, or are you married with bash (like the vserver ppl)?

I don't think anyone is married to bash here.  The debian package has
changed some scripts from bash to sh.  I'm only leery of resulting
breakages and reports of subtle time-consuming bugs, and potentially
less-maintainable code.

(Note also that lxc-ls may be rewritten in python.  Is that a problem
for your use case?)

> Would you be prepared for minor sacrifices to use posix compliant shell
> scripts?

Someone else can jump in if they object, but I personally don't.  Are
you willing to subscribe to github.com/lxc/lxc#staging commits and
watch for new commits re-breaking posix compliance?

Successful runs of https://code.launchpad.net/~serge-hallyn/+junk/lxc-test
with your patches will also be reassuring.

-serge




More information about the lxc-devel mailing list