Find partitions by both label and partlabel 23/278823/1 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_unified tizen_7.0 tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.063654 accepted/tizen/7.0/unified/hotfix/20221116.105727 accepted/tizen/unified/20220729.131723 submit/tizen/20220726.134408 tizen_7.0_m2_release
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Tue, 26 Jul 2022 11:44:21 +0000 (13:44 +0200)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Tue, 26 Jul 2022 11:44:21 +0000 (13:44 +0200)
Change-Id: I2abab75aca559162cbf78f7de7da9ff62c4ed1a3

scripts/fota-init.sh

index 61cf618de787c0b0f7b2ce70fc7c51e61697e8d5..8312f19e9caae56e29c0be297b0fc0576c11e51f 100755 (executable)
@@ -181,7 +181,7 @@ commit_partition()
 {
        LABEL=${1}
        MNT_POINT=${2}
-       TYPE=$(blkid --match-token LABEL="${LABEL}" -o value -s TYPE | tail -n 1)
+       TYPE=$(blkid --match-token PARTLABEL="${LABEL}" -o value -s TYPE || blkid --match-token LABEL="${LABEL}" -o value -s TYPE | tail -n 1)
        if [ "${TYPE}" = "ext4" ]; then
                commit_bow_partition "${LABEL}"
        elif [ "${TYPE}" = "f2fs" ]; then
@@ -273,7 +273,7 @@ umount_partition()
        LABEL=${1}
        DIRECTORY=${2}
 
-       TYPE=$(blkid --match-token LABEL="${LABEL}" -o value -s TYPE | tail -n 1)
+       TYPE=$(blkid --match-token PARTLABEL="${LABEL}" -o value -s TYPE || blkid --match-token LABEL="${LABEL}" -o value -s TYPE | tail -n 1)
        if [ "${TYPE}" = "ext4" ]; then
                umount_bow_partition "${LABEL}" "${DIRECTORY}"
        else