diff mbox series

[meta-oe] toybox-inittab: Fix serial getty reproducibility

Message ID 20240305152759.1702540-1-yoann.congal@smile.fr
State Accepted
Headers show
Series [meta-oe] toybox-inittab: Fix serial getty reproducibility | expand

Commit Message

Yoann Congal March 5, 2024, 3:27 p.m. UTC
The enable_getty test uses a bash-only syntax "[[ ... ]]".
On /bin/sh==bash hosts, it enables the serial getty.
On /bin/sh!=bash hosts, it does not enable it.

Fix this non-reproducibility by using the standard shell "[ ... ]"
syntax which should work in any POSIX shell[0].

[0]: https://www.shellcheck.net/wiki/SC3010

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb b/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb
index 603f365cf3..4cad7dce11 100644
--- a/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb
+++ b/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb
@@ -34,7 +34,7 @@  do_configure() {
 	cp orig/* .
 
 	for config in ${PACKAGECONFIG_CONFARGS}; do
-		if [[ ${config} == "enable_getty" ]]; then
+		if [ "${config}" = "enable_getty" ]; then
 			echo "# generated by bitbake recipe ${PN}" >> ${S}/inittab
 			for console in "${SERIAL_CONSOLES}"; do
 				param=$(echo ${console} | sed s/\;/\ /g)