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 <dwoo08.lee@samsung.com>
%package config-2parts
Summary: System configuration files for storage partitions
Requires: %{name} = %{version}-%{release}
+Requires: f2fs-tools
BuildArch: noarch
%description config-2parts
# 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