summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINSUN PYO <insun.pyo@samsung.com>2020-03-30 21:01:37 +0900
committerINSUN PYO <insun.pyo@samsung.com>2020-04-02 12:35:13 +0900
commit27c402e9845488a0bb1e4ac297fceedf097d2a47 (patch)
tree2d3504da3aef66daed716f6ec350bd14a0b0976e
parente2b2db90fc896261827e9b71ee408506120625b5 (diff)
downloadsystem-plugin-submit/tizen/20200402.090543.tar.gz
system-plugin-submit/tizen/20200402.090543.tar.bz2
system-plugin-submit/tizen/20200402.090543.zip
If the /opt partition is not mounted, local-fs.target fails and enters emergency.target Change-Id: Ic8049c1f580463397950272f32c758792e4aca03
-rw-r--r--packaging/system-plugin.spec11
-rw-r--r--units/opt.mount16
2 files changed, 27 insertions, 0 deletions
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec
index 2ba78f8..9b8757e 100644
--- a/packaging/system-plugin.spec
+++ b/packaging/system-plugin.spec
@@ -9,6 +9,7 @@ Source1: %{name}.manifest
Requires(post): /usr/bin/systemctl
Requires(post): /usr/bin/udevadm
+Requires(post): /usr/bin/sed
BuildRequires: cmake
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libtzplatform-config)
@@ -218,6 +219,11 @@ ln -s ../opt-usr.mount %{buildroot}%{_unitdir}/local-fs.target.wants/opt-usr.mou
ln -s ../wait-mount@.service %{buildroot}%{_unitdir}/local-fs.target.wants/wait-mount@opt-usr.service
ln -s ../wait-mount@.service %{buildroot}%{_userunitdir}/basic.target.wants/wait-mount@opt-usr.service
+# check /opt partition
+mkdir -p %{buildroot}%{_unitdir}/local-fs.target.requires
+install -m 644 units/opt.mount %{buildroot}%{_unitdir}
+ln -s ../opt.mount %{buildroot}%{_unitdir}/local-fs.target.requires/opt.mount
+
# namespace
mkdir -p %{buildroot}%{_unitdir}/user@.service.d
install -m 644 units/namespace.conf %{buildroot}%{_unitdir}/user@.service.d/
@@ -232,12 +238,17 @@ rm -rf %{buildroot}
%post
systemctl daemon-reload
+%ifarch %{ix86} x86_64
+/usr/bin/sed -e 's/system-data/emulator-sysdata/g' -i /usr/lib/systemd/system/opt.mount
+%endif
%files
%manifest %{name}.manifest
%license LICENSE.Apache-2.0
%{_unitdir}/tizen-system-env.service
%{_unitdir}/basic.target.wants/tizen-system-env.service
+%{_unitdir}/opt.mount
+%{_unitdir}/local-fs.target.requires/opt.mount
%files device-spreadtrum
%manifest %{name}.manifest
diff --git a/units/opt.mount b/units/opt.mount
new file mode 100644
index 0000000..7740345
--- /dev/null
+++ b/units/opt.mount
@@ -0,0 +1,16 @@
+[Unit]
+Before=local-fs.target
+ConditionPathIsMountPoint=!/opt
+
+# Tizen mounts /opt in initrd or init-wrapper
+# and fsck and resizefs are also executed.
+# So it is not necessary here.
+# If you don't use initrd or init-wrapper, just comment it out.
+#Requires=systemd-fsck@dev-disk-by\x2dlabel-system\x2ddata.service
+#After=systemd-fsck@dev-disk-by\x2dlabel-system\x2ddata.service
+
+[Mount]
+What=/dev/disk/by-label/system-data
+Where=/opt
+Type=ext4
+Options=defaults,relatime