summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2015-07-31 09:14:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 07:38:31 +0100
commitf1596b7169146afcb38db683eb6170a480422d73 (patch)
tree7b88166c27bd710354a5b2b93d22eee38c54ba7e
parentdd5c87900b73bf44cf96735706d7d06e56b4d20e (diff)
downloadopenembedded-core-contrib-f1596b7169146afcb38db683eb6170a480422d73.tar.gz
openembedded-core-contrib-f1596b7169146afcb38db683eb6170a480422d73.tar.bz2
openembedded-core-contrib-f1596b7169146afcb38db683eb6170a480422d73.zip
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@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f339b30ebe..a3ed74b989 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