]> code.ossystems Code Review - openembedded-core.git/commitdiff
init-install: Strip partition number from live_dev_name
authorDrew Moseley <drew_moseley@mentor.com>
Thu, 31 Jul 2014 00:49:31 +0000 (20:49 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 2 Aug 2014 08:25:34 +0000 (09:25 +0100)
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 <drew_moseley@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-core/initrdscripts/files/init-install-efi.sh
meta/recipes-core/initrdscripts/files/init-install.sh

index b142ed4915b5f735e17260a86c91e63ab0ccc1a6..70a2ee6073b830a11c9eaa2b099a5580fbad52ca 100644 (file)
@@ -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 ..."
 
index 486c9f2635c5b4c93e8a6d9b8196b740d1bda064..29587b0cc93c953a89f4bbcaef16ae791fe963d8 100644 (file)
@@ -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 ..."