]> code.ossystems Code Review - openembedded-core.git/commitdiff
init-install-efi.sh: Check if an installation device is present
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Fri, 31 Jul 2015 09:14:59 +0000 (09:14 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 Aug 2015 06:38:31 +0000 (07:38 +0100)
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initrdscripts/files/init-install-efi.sh

index f339b30ebeaa289e88efe92e056de63b38233fde..a3ed74b989336b1f4807df7a70a18769d1e51380 100644 (file)
@@ -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