[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1472/8267] initrdscripts/init-install*: Select install target instead of looping through
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1472/8267] initrdscripts/init-install*: Select install target instead of looping through
- Date: Sat, 16 Dec 2017 21:52:31 +0000 (UTC)
commit 031c2f6ced917a81b4f39dca371773d0275ddf73
Author: California Sullivan <california l sullivan intel com>
Date: Tue Jul 12 17:41:58 2016 -0700
initrdscripts/init-install*: Select install target instead of looping through
Its not immediately apparent that more than one install target could be
available. With this change we list the available devices up front then
prompt the user for which one to use, reducing confusion.
Fixes [YOCTO #9919].
(From OE-Core rev: e68774f684543fd75250e56ea88a5e0cb0a2dd0a)
Signed-off-by: California Sullivan <california l sullivan intel com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
.../initrdscripts/files/init-install-efi.sh | 22 ++++++++++++-------
.../initrdscripts/files/init-install.sh | 22 ++++++++++++-------
2 files changed, 28 insertions(+), 16 deletions(-)
---
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index d58826a..f564f4e 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -78,17 +78,23 @@ for hdname in $hdnamelist; do
cat /sys/block/$hdname/device/uevent
fi
echo
- # Get user choice
- while true; do
- echo -n "Do you want to install this image there? [y/n] "
- read answer
- if [ "$answer" = "y" -o "$answer" = "n" ]; then
+done
+
+# Get user choice
+while true; do
+ echo "Please select an install target or press n to exit ($hdnamelist ): "
+ read answer
+ if [ "$answer" = "n" ]; then
+ echo "Installation manually aborted."
+ exit 1
+ fi
+ for hdname in $hdnamelist; do
+ if [ "$answer" = "$hdname" ]; then
+ TARGET_DEVICE_NAME=$answer
break
fi
- echo "Please answer y or n"
done
- if [ "$answer" = "y" ]; then
- TARGET_DEVICE_NAME=$hdname
+ if [ -n "$TARGET_DEVICE_NAME" ]; then
break
fi
done
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh
b/meta/recipes-core/initrdscripts/files/init-install.sh
index c5623ee..72ce92b 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -72,17 +72,23 @@ for hdname in $hdnamelist; do
cat /sys/block/$hdname/device/uevent
fi
echo
- # Get user choice
- while true; do
- echo -n "Do you want to install this image there? [y/n] "
- read answer
- if [ "$answer" = "y" -o "$answer" = "n" ]; then
+done
+
+# Get user choice
+while true; do
+ echo "Please select an install target or press n to exit ($hdnamelist ): "
+ read answer
+ if [ "$answer" = "n" ]; then
+ echo "Installation manually aborted."
+ exit 1
+ fi
+ for hdname in $hdnamelist; do
+ if [ "$answer" = "$hdname" ]; then
+ TARGET_DEVICE_NAME=$answer
break
fi
- echo "Please answer y or n"
done
- if [ "$answer" = "y" ]; then
- TARGET_DEVICE_NAME=$hdname
+ if [ -n "$TARGET_DEVICE_NAME" ]; then
break
fi
done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]