[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH 2/3] init-install: Strip partition number from live_dev_name
From:       drew_moseley () mentor ! com (Drew Moseley)
Date:       2014-07-31 0:49:31
Message-ID: 1406767772-7963-2-git-send-email-drew_moseley () mentor ! com
[Download RAW message or body]

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 at mentor.com>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 1 +
 meta/recipes-core/initrdscripts/files/init-install.sh     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh \
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index b142ed4..70a2ee6 \
                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 486c9f2..29587b0 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 ..."
 
-- 
1.9.1


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic