From 65233ec68d2f19fb36b085cb06ac57321976dcf7 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 17 Feb 2022 10:48:49 +0100 Subject: libsoc: fix postinst script If grep does not find anything the return code is non zero and given postinst scripts are being run with set -e that means the postinst script fails! Fix this by directly using fgrep in the if condition instead to properly continue the postinst script even in such case. Signed-off-by: Marcel Ziswiler --- recipes-support/libsoc/libsoc_0.8.2.bbappend | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes-support/libsoc/libsoc_0.8.2.bbappend b/recipes-support/libsoc/libsoc_0.8.2.bbappend index 1a77694..29e684c 100644 --- a/recipes-support/libsoc/libsoc_0.8.2.bbappend +++ b/recipes-support/libsoc/libsoc_0.8.2.bbappend @@ -25,8 +25,7 @@ PACKAGECONFIG_colibri-imx7 = "allboardconfigs enableboardconfig python" PACKAGECONFIG_colibri-imx7-emmc = "allboardconfigs enableboardconfig python" pkg_postinst_ontarget_${PN}_colibri-imx6ull () { - IS_WIFI_DTB=`grep -c toradex,colibri_imx6ull-wifi /proc/device-tree/compatible` - if [ $IS_WIFI_DTB -gt 0 ]; then + if fgrep -q toradex,colibri_imx6ull-wifi /proc/device-tree/compatible; then mv -f ${datadir}/libsoc/colibri-imx6ull.conf ${datadir}/libsoc/colibri-imx6ull.conf.bak # SODIMM pins missing on Wi-Fi SKU cat ${datadir}/libsoc/colibri-imx6ull.conf.bak | grep -E -v "(SODIMM_79|SODIMM_81|SODIMM_89|SODIMM_93|SODIMM_94|SODIMM_97|SODIMM_101|SODIMM_103|SODIMM_127|SODIMM_138)" > ${datadir}/libsoc/colibri-imx6ull.conf -- cgit v1.2.3