diff options
author | Samuli Piippo <samuli.piippo@digia.com> | 2013-10-14 08:06:18 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2013-10-15 15:06:11 +0300 |
commit | 3294a0cbd67995f1feaf1e4da7b7e65d4af6c02f (patch) | |
tree | 449d5d3862cf30636102782617f8c16fc14d5548 /recipes/mkcard/files/mkcard.sh | |
parent | 48f7d2b6ef3939417a1bf291a82fa36660b213e6 (diff) | |
download | meta-boot2qt-3294a0cbd67995f1feaf1e4da7b7e65d4af6c02f.tar.gz |
mkcard: do not use kpartx
Do not try to use kpartx when discovering partitions.
This gave false errors when kpartx was not installed, and
failed to create partition when it was installed.
Change-Id: Iefe4de0bfef4d0625469e956c5847f759888e29f
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
Diffstat (limited to 'recipes/mkcard/files/mkcard.sh')
-rwxr-xr-x | recipes/mkcard/files/mkcard.sh | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/recipes/mkcard/files/mkcard.sh b/recipes/mkcard/files/mkcard.sh index 3e70dbc..e75a176 100755 --- a/recipes/mkcard/files/mkcard.sh +++ b/recipes/mkcard/files/mkcard.sh | |||
@@ -32,11 +32,6 @@ echo ,,,- | |||
32 | 32 | ||
33 | sleep 1 | 33 | sleep 1 |
34 | 34 | ||
35 | |||
36 | if [ -x `which kpartx` ]; then | ||
37 | kpartx -a ${DRIVE} | ||
38 | fi | ||
39 | |||
40 | # handle various device names. | 35 | # handle various device names. |
41 | # note something like fdisk -l /dev/loop0 | egrep -E '^/dev' | cut -d' ' -f1 | 36 | # note something like fdisk -l /dev/loop0 | egrep -E '^/dev' | cut -d' ' -f1 |
42 | # won't work due to https://bugzilla.redhat.com/show_bug.cgi?id=649572 | 37 | # won't work due to https://bugzilla.redhat.com/show_bug.cgi?id=649572 |
@@ -46,21 +41,10 @@ if [ ! -b ${PARTITION1} ]; then | |||
46 | PARTITION1=${DRIVE}p1 | 41 | PARTITION1=${DRIVE}p1 |
47 | fi | 42 | fi |
48 | 43 | ||
49 | DRIVE_NAME=`basename $DRIVE` | ||
50 | DEV_DIR=`dirname $DRIVE` | ||
51 | |||
52 | if [ ! -b ${PARTITION1} ]; then | ||
53 | PARTITION1=$DEV_DIR/mapper/${DRIVE_NAME}p1 | ||
54 | fi | ||
55 | |||
56 | PARTITION2=${DRIVE}2 | 44 | PARTITION2=${DRIVE}2 |
57 | if [ ! -b ${PARTITION2} ]; then | 45 | if [ ! -b ${PARTITION2} ]; then |
58 | PARTITION2=${DRIVE}p2 | 46 | PARTITION2=${DRIVE}p2 |
59 | fi | 47 | fi |
60 | if [ ! -b ${PARTITION2} ]; then | ||
61 | PARTITION2=$DEV_DIR/mapper/${DRIVE_NAME}p2 | ||
62 | fi | ||
63 | |||
64 | 48 | ||
65 | # now make partitions. | 49 | # now make partitions. |
66 | if [ -b ${PARTITION1} ]; then | 50 | if [ -b ${PARTITION1} ]; then |