From: Drew Moseley Date: Thu, 31 Jul 2014 00:49:31 +0000 (-0400) Subject: init-install: Strip partition number from live_dev_name X-Git-Tag: 2015-4~2100 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=9f6d7d42eaad225698de730d5c76bfe9523f4a78;p=openembedded-core.git init-install: Strip partition number from live_dev_name This is needed in case the boot disk was created with mkdiskimage. In that case the parameter passed is a variant of /dev/sda4 which includes the partition number. Without this change this install script will offer to install onto the live media. Signed-off-by: Drew Moseley Signed-off-by: Saul Wold --- diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index b142ed4915..70a2ee6073 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh @@ -17,6 +17,7 @@ swap_ratio=5 # Get a list of hard drives hdnamelist="" live_dev_name=${1%%/*} +live_dev_name=${live_dev_name%%[0-9]*} echo "Searching for hard drives ..." diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index 486c9f2635..29587b0cc9 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.sh @@ -16,6 +16,7 @@ swap_ratio=5 # Get a list of hard drives hdnamelist="" live_dev_name=${1%%/*} +live_dev_name=${live_dev_name%%[0-9]*} echo "Searching for hard drives ..."