Move the workaround script that erases the filesystem label of /opt/usr 73/201873/2
authorwchang kim <wchang.kim@samsung.com>
Wed, 20 Mar 2019 07:59:03 +0000 (16:59 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 20 Mar 2019 10:02:38 +0000 (19:02 +0900)
under two partitions (rootfs and system-data) into system-plugin-config-2parts

Change-Id: Idf6ea90e33a157c41ecd2df66e8f930b6334cdf6
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
(cherry picked from commit bdd292713a3d58bd0e16a2f55bc4a3638ced9c4d)
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
packaging/system-plugin.spec
scripts/2parts_env.sh [new file with mode: 0644]
scripts/headless_env.sh

index 66b3540e0737e62ea79789b8da6d4effe202cf90..a29b70ac154fd2cf55d454f6d733538ae67a45d4 100644 (file)
@@ -203,6 +203,10 @@ install -m 755 scripts/sdb-mode.sh %{buildroot}%{_bindir}
 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
 install -m 755 scripts/headless_env.sh %{buildroot}%{_sysconfdir}/profile.d
 
+# config-2parts
+mkdir -p %{buildroot}%{_sysconfdir}/profile.d
+install -m 755 scripts/2parts_env.sh %{buildroot}%{_sysconfdir}/profile.d
+
 # config-udev-sdbd
 mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d/
 install -m 644 rules/99-sdb-extcon.rules %{buildroot}%{_prefix}/lib/udev/rules.d/
@@ -360,6 +364,7 @@ echo ""
 %{_unitdir}/basic.target.wants/resize2fs@dev-disk-by\x2dlabel-rootfs.service
 %{_unitdir}/basic.target.wants/resize2fs@dev-disk-by\x2dlabel-system\x2ddata.service
 %{_sysconfdir}/fstab_2parts
+%{_sysconfdir}/profile.d/2parts_env.sh
 %{_unitdir}/wait-mount@.service
 %{_unitdir}/wait-mount@opt-usr.service.d/no-wait.conf
 %{_unitdir}/local-fs.target.wants/wait-mount@opt-usr.service
diff --git a/scripts/2parts_env.sh b/scripts/2parts_env.sh
new file mode 100644 (file)
index 0000000..7ddaa4f
--- /dev/null
@@ -0,0 +1,5 @@
+# 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 ''
+fi
index cb9062d931c192d9fbab3d971b13e96628bd8392..b427ffe382440c1eb8ffab02aba53e29dad18299 100644 (file)
@@ -2,9 +2,3 @@ if [ "$XDG_RUNTIME_DIR" = "" ];
 then
 export XDG_RUNTIME_DIR=/run
 fi
-
-# 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 ''
-fi