[oe-commits] [openembedded-core] branch master updated: init-install: Fixes the install script failing when not finding any mmcblk devices
git at git.openembedded.org
git at git.openembedded.org
Tue Aug 30 06:58:15 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
The following commit(s) were added to refs/heads/master by this push:
new 384cf92 init-install: Fixes the install script failing when not finding any mmcblk devices
384cf92 is described below
commit 384cf92ca9c3e66763c2c1ff2776c53d47ae25d6
Author: Alejandro Hernandez <alejandro.hernandez at linux.intel.com>
AuthorDate: Tue Aug 30 05:08:37 2016 +0000
init-install: Fixes the install script failing when not finding any mmcblk devices
The init-install.sh and init-install-efi.sh scripts perform a check
to see which devices are available on a booted system for installation.
Recently, the way we check for these devices changed on 993bfb,
greping for devices found on /sys/block/, this change caused the installer
to fail (at least) when not finding any mmcblk devices, due to the fact
that we call sh -e to execute this script, so any command (grep)
or pipeline exiting with a non-zero status causes the whole script to exit
This patch throws in a harmless true exit status at the end of the pipeline(s)
of the grep commands to avoid the installer script from exiting, fixing the issue.
[YOCTO #10189]
Signed-off-by: Alejandro Hernandez <alejandro.hernandez at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-core/initrdscripts/files/init-install-efi.sh | 4 ++--
meta/recipes-core/initrdscripts/files/init-install.sh | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 2d20a6d..441e252 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -31,8 +31,8 @@ echo "Searching for hard drives ..."
# Some eMMC devices have special sub devices such as mmcblk0boot0 etc
# we're currently only interested in the root device so pick them wisely
-devices=`ls /sys/block/ | grep -v mmcblk`
-mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"`
+devices=`ls /sys/block/ | grep -v mmcblk` || true
+mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"` || true
devices="$devices $mmc_devices"
for device in $devices; do
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 89d5a5d..04ce5fb 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -30,8 +30,8 @@ echo "Searching for hard drives ..."
# Some eMMC devices have special sub devices such as mmcblk0boot0 etc
# we're currently only interested in the root device so pick them wisely
-devices=`ls /sys/block/ | grep -v mmcblk`
-mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"`
+devices=`ls /sys/block/ | grep -v mmcblk` || true
+mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"` || true
devices="$devices $mmc_devices"
for device in $devices; do
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list