From: Dongwoo Lee Date: Mon, 3 May 2021 08:10:03 +0000 (+0900) Subject: 2parts_env: Remove 'user' label along with filesystem X-Git-Tag: submit/tizen/20210602.084502^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a65c40fd7e1ebf5f6449cdefd15218b4b4721949;p=platform%2Fadaptation%2Fsystem-plugin.git 2parts_env: Remove 'user' label along with filesystem This updates script for removing user label to check the filesystem and select the proper tool for changing label. Change-Id: I3b0d5ca8eee04ef681fbfea243614194d0983725 Signed-off-by: Dongwoo Lee --- diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index 7ec679a..78ba910 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -91,6 +91,7 @@ This package provides configuration files to trigger sdb with udev rule. %package config-2parts Summary: System configuration files for storage partitions Requires: %{name} = %{version}-%{release} +Requires: f2fs-tools BuildArch: noarch %description config-2parts diff --git a/scripts/2parts_env.sh b/scripts/2parts_env.sh index 7ddaa4f..3b1d7c2 100644 --- a/scripts/2parts_env.sh +++ b/scripts/2parts_env.sh @@ -1,5 +1,10 @@ # Ugly workaround to remove "user" filesystem label for two-partition headless images if [ -e /dev/disk/by-label/user ]; then -e2label /dev/disk/by-label/user '' + F2FS_USERFS=$(/sbin/blkid /dev/disk/by-label/user -t TYPE=f2fs -o device) + if [ x$F2FS_USERFS != "x" ]; then + f2fslabel /dev/disk/by-label/user '' + else + e2label /dev/disk/by-label/user '' + fi fi