From 3294a0cbd67995f1feaf1e4da7b7e65d4af6c02f Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 14 Oct 2013 08:06:18 +0300 Subject: 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 --- recipes/mkcard/files/mkcard.sh | 16 ---------------- 1 file changed, 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 ,,,- sleep 1 - -if [ -x `which kpartx` ]; then - kpartx -a ${DRIVE} -fi - # handle various device names. # note something like fdisk -l /dev/loop0 | egrep -E '^/dev' | cut -d' ' -f1 # won't work due to https://bugzilla.redhat.com/show_bug.cgi?id=649572 @@ -46,21 +41,10 @@ if [ ! -b ${PARTITION1} ]; then PARTITION1=${DRIVE}p1 fi -DRIVE_NAME=`basename $DRIVE` -DEV_DIR=`dirname $DRIVE` - -if [ ! -b ${PARTITION1} ]; then - PARTITION1=$DEV_DIR/mapper/${DRIVE_NAME}p1 -fi - PARTITION2=${DRIVE}2 if [ ! -b ${PARTITION2} ]; then PARTITION2=${DRIVE}p2 fi -if [ ! -b ${PARTITION2} ]; then - PARTITION2=$DEV_DIR/mapper/${DRIVE_NAME}p2 -fi - # now make partitions. if [ -b ${PARTITION1} ]; then -- cgit v1.2.3-54-g00ecf