[Buildroot] shell issues when /bin/sh is 'dash' instead of 'bash'

Wade Berrier wberrier at gmail.com
Wed Dec 31 23:04:37 UTC 2008


Hi,

There are a few Makefiles that rely on some bash specific code:

findutils
sed
tar
tftpd

(grep used to, but was fixed by Jacmet circa 6 months ago)

The culprit is the "-ot" operator.  From the advanced bash scripting guide:

[ FILE1 -ot FILE2 ]	True if FILE1 is older than FILE2, or is FILE2
exists and FILE1 does not.

'dash' doesn't follow the "or is FILE2 exists and FILE1 does not." portion.

The result is that some files don't get installed into the target
system when /bin/sh points to dash (like on recent ubuntu and debian?
distros)

Attached is a patch to use CONFIG_SHELL.

Question: is this the best way to fix this?  Or maybe these packages
should be fixed more in the style of how Jacmet fixed grep? (see
http://sources.uclibc.org/index.py/trunk/buildroot/package/grep/grep.mk?r1=22930&r2=22931
)

Feedback?

Wade
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildroot-CONFIG_SHELL.patch
Type: text/x-diff
Size: 4161 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20081231/8cefe290/attachment.patch>


More information about the buildroot mailing list