summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/fstab_initrd2
-rw-r--r--etc/fstab_tm13
-rw-r--r--packaging/system-plugin.spec15
-rw-r--r--units/umount-opt.service10
4 files changed, 28 insertions, 2 deletions
diff --git a/etc/fstab_initrd b/etc/fstab_initrd
index 7056f20..fd51d69 100644
--- a/etc/fstab_initrd
+++ b/etc/fstab_initrd
@@ -3,4 +3,4 @@
# Basically, initrd should consider this issue.
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/root / ext4 defaults,noatime 0 1
-PARTLABEL=user /opt/usr ext4 defaults,noatime 0 2
+PARTLABEL=user /opt ext4 defaults,noatime 0 2
diff --git a/etc/fstab_tm1 b/etc/fstab_tm1
new file mode 100644
index 0000000..04c42bc
--- /dev/null
+++ b/etc/fstab_tm1
@@ -0,0 +1,3 @@
+# <file system> <mount point> <type> <options> <dump> <pass>
+/dev/root / ext4 defaults,noatime 0 1
+LABEL=user /opt ext4 defaults,noatime 0 2
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec
index a285119..815547c 100644
--- a/packaging/system-plugin.spec
+++ b/packaging/system-plugin.spec
@@ -84,11 +84,18 @@ mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d/
install -m 644 rules/51-system-plugin-exynos.rules %{buildroot}%{_prefix}/lib/udev/rules.d/
install -m 644 rules/51-system-plugin-spreadtrum.rules %{buildroot}%{_prefix}/lib/udev/rules.d/
+# umount /opt
+install -m 644 units/umount-opt.service %{buildroot}%{_unitdir}
+mkdir -p %{buildroot}%{_unitdir}/local-fs-pre.target.wants
+ln -s ../umount-opt.service %{buildroot}%{_unitdir}/local-fs-pre.target.wants/umount-opt.service
+
# fstab
mkdir -p %{buildroot}%{_sysconfdir}
install -m 644 etc/fstab %{buildroot}%{_sysconfdir}
# ugly temporary patch for initrd wearable
install -m 644 etc/fstab_initrd %{buildroot}%{_sysconfdir}
+# fstab for tm1
+install -m 644 etc/fstab_tm1 %{buildroot}%{_sysconfdir}
%post
systemctl daemon-reload
@@ -126,11 +133,17 @@ systemctl daemon-reload
%{_unitdir}/basic.target.wants/resize2fs@dev-disk-by\x2dpartlabel-user.service
%{_unitdir}/csa.mount
%{_unitdir}/local-fs.target.wants/csa.mount
+%{_unitdir}/umount-opt.service
+%{_unitdir}/local-fs-pre.target.wants/umount-opt.service
# ugly temporary patch for initrd wearable
%post circle
rm %{_sysconfdir}/fstab
mv %{_sysconfdir}/fstab_initrd %{_sysconfdir}/fstab
+# fstab for tm1
+%post spreadtrum
+rm %{_sysconfdir}/fstab
+mv %{_sysconfdir}/fstab_tm1 %{_sysconfdir}/fstab
%files spreadtrum
%manifest %{name}.manifest
@@ -138,7 +151,7 @@ mv %{_sysconfdir}/fstab_initrd %{_sysconfdir}/fstab
/csa
%{_prefix}/lib/udev/rules.d/51-system-plugin-spreadtrum.rules
%{_unitdir}/tizen-system-env.service
-%{_sysconfdir}/fstab
+%{_sysconfdir}/fstab_tm1
%{_unitdir}/basic.target.wants/tizen-system-env.service
%{_unitdir}/basic.target.wants/resize2fs@dev-disk-by\x2dlabel-system\x2ddata.service
%{_unitdir}/basic.target.wants/resize2fs@dev-disk-by\x2dlabel-user.service
diff --git a/units/umount-opt.service b/units/umount-opt.service
new file mode 100644
index 0000000..49fa948
--- /dev/null
+++ b/units/umount-opt.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Unmount opt
+DefaultDependencies=no
+Before=local-fs-pre.target local-fs.target shutdown.target
+Requires=local-fs-pre.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/umount /opt