]> code.ossystems Code Review - openembedded-core.git/commitdiff
init-install: Fixes the install script failing when not finding any mmcblk devices
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>
Tue, 30 Aug 2016 05:08:37 +0000 (05:08 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 30 Aug 2016 06:57:46 +0000 (07:57 +0100)
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initrdscripts/files/init-install-efi.sh
meta/recipes-core/initrdscripts/files/init-install.sh

index 2d20a6dad7908f7965c46a4cf3b917eee299a913..441e25238d24485bda9ef91250ffedc68f6c0507 100644 (file)
@@ -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
index 89d5a5d9a4cf7d610b927e106cae1cea7bd3d479..04ce5fb4b5d5e8d5038ba3b7776c402947bf5624 100644 (file)
@@ -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