[elbe-devel] /bin/sh

John Ogness john.ogness at linutronix.de
Thu Jan 26 11:25:12 CET 2017


Hi,

There are many places in the code that are using /bin/sh to execute
commands (including the <command> tag). From what I can tell, none of it
is necessary. Can someone explain why it was implemented that way? Is
there some advantage I am unaware of?

The problem is that we are assuming that /bin/sh is available on the
target rootfs. We should not assume anything about the target
rootfs. For minimal root filesystems using the diet or tighten modes,
there may not be /bin/sh. This results in ugly finetuning
workarounds [0].

If there are no disagreements, I would provide a patch to remove all use
of /bin/sh for executing commands. And in particular, removing its use
for such simple tasks as writing text files. A quick recursive search
for "sh -c" shows some bizarre usages.

John Ogness

[0] https://github.com/Linutronix/elbe/blob/devel/elbe-2.0/examples/armel-rescue-busybox-cpio.xml




More information about the elbe-devel mailing list