From: Kichan Kwon Date: Mon, 8 Jan 2018 11:00:37 +0000 (+0900) Subject: Refer config file when trigger can't find device path X-Git-Tag: accepted/tizen/4.0/unified/20180112.071746~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F166169%2F1;p=platform%2Fcore%2Fsystem%2Ftota-ua.git Refer config file when trigger can't find device path Change-Id: Idd5b34c0682dd34c53c18f8bb4dd5b2399e873fc Signed-off-by: Kichan Kwon --- diff --git a/scripts/upgrade-trigger.sh b/scripts/upgrade-trigger.sh index eb5ae09..f9c700d 100755 --- a/scripts/upgrade-trigger.sh +++ b/scripts/upgrade-trigger.sh @@ -29,14 +29,14 @@ flash_pre_image() { DEV_NUM=$(/sbin/partx -s $EMMC_DEVICE | grep $PART_NAME_L | \ { read NUM REST; echo $NUM; }) if [ -z "$DEV_NUM" ]; then - DEV_NUM=$(/sbin/blkid -L $PART_NAME_L -o device | \ + DEV_NUM=$(/sbin/blkid -L $PART_NAME_L -o device | grep $EMMC_DEVICE | \ sed 's/\/dev\/mmcblk0p//') fi if [ -z "$DEV_NUM" ]; then - echo "There is no partition for $PART_NAME" - continue + DEV=${DEV} + else + DEV="${EMMC_DEVICE}p${DEV_NUM}" fi - DEV="${EMMC_DEVICE}p${DEV_NUM}" echo "Flashing $DELTA_NAME..." dd if="$FOTA_DIR/$DELTA_NAME" of="$DEV" bs=1024