From bdd292713a3d58bd0e16a2f55bc4a3638ced9c4d Mon Sep 17 00:00:00 2001 From: wchang kim Date: Wed, 20 Mar 2019 16:59:03 +0900 Subject: [PATCH] Move the workaround script that erases the partition label of /opt/usr under two partitions (rootfs and system-data) into system-plugin-config-2parts Change-Id: Idf6ea90e33a157c41ecd2df66e8f930b6334cdf6 Signed-off-by: Hyotaek Shim --- packaging/system-plugin.spec | 5 +++++ scripts/2parts_env.sh | 5 +++++ scripts/headless_env.sh | 6 ------ 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 scripts/2parts_env.sh diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index c91c3d5..d155b4d 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -199,6 +199,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/ @@ -352,6 +356,7 @@ echo "" %manifest %{name}.manifest %license LICENSE.Apache-2.0 %{_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 index 0000000..7ddaa4f --- /dev/null +++ b/scripts/2parts_env.sh @@ -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 diff --git a/scripts/headless_env.sh b/scripts/headless_env.sh index cb9062d..b427ffe 100644 --- a/scripts/headless_env.sh +++ b/scripts/headless_env.sh @@ -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 -- 2.34.1