From f1596b7169146afcb38db683eb6170a480422d73 Mon Sep 17 00:00:00 2001 From: Leonardo Sandoval Date: Fri, 31 Jul 2015 09:14:59 +0000 Subject: 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 Signed-off-by: Richard Purdie --- meta/recipes-core/initrdscripts/files/init-install-efi.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'meta/recipes-core/initrdscripts') 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 -- cgit v1.2.3