[oe-commits] Leonardo Sandoval : init-install-efi.sh: Check if an installation device is present

git at git.openembedded.org git at git.openembedded.org
Sat Aug 1 06:39:12 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: f1596b7169146afcb38db683eb6170a480422d73
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f1596b7169146afcb38db683eb6170a480422d73

Author: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
Date:   Fri Jul 31 09:14:59 2015 +0000

init-install-efi.sh: Check if an installation device is present

In case there is no installation device present, give a better
message to the user and abort installation.

[YOCTO #7971]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f339b30..a3ed74b 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -55,6 +55,11 @@ for device in `ls /sys/block/`; do
     esac
 done
 
+if [ -z "${hdnamelist}" ]; then
+    echo "You need another device (besides the live device /dev/${live_dev_name}) to install the image. Installation aborted."
+    exit 1
+fi
+
 TARGET_DEVICE_NAME=""
 for hdname in $hdnamelist; do
     # Display found hard drives and their basic info



More information about the Openembedded-commits mailing list