diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2022-02-17 10:48:49 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2022-02-21 14:11:33 +0100 |
commit | 65233ec68d2f19fb36b085cb06ac57321976dcf7 (patch) | |
tree | 1d505e479c081575fada2529eda9a36cbb7c01f4 | |
parent | 127bb3208b41ede504b992504964c9ad9cc0619f (diff) |
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 <marcel.ziswiler@toradex.com>
-rw-r--r-- | recipes-support/libsoc/libsoc_0.8.2.bbappend | 3 |
1 files changed, 1 insertions, 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 |