summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorboseong choi <boseong.choi@samsung.com>2016-03-16 20:15:19 +0900
committerboseong choi <boseong.choi@samsung.com>2016-03-17 08:28:19 +0900
commitaa18fe45cd0188b520c4d477be790777557e4576 (patch)
tree2ed4ed484e94f415906cc453f9a678b46d0fb7b6
parent4ead57dbfaa9dec1c98abd5bd7063b4437116702 (diff)
downloadsystem-plugin-aa18fe45cd0188b520c4d477be790777557e4576.tar.gz
system-plugin-aa18fe45cd0188b520c4d477be790777557e4576.tar.bz2
system-plugin-aa18fe45cd0188b520c4d477be790777557e4576.zip
merge system-data partition and user partition add fstab_tm1(TM1), change fstab_initrd(circle) add umount-opt.service for umount /opt (symlink in local-fs-pre.target.wants) Change-Id: I44bfc2d6daea54af6da356552ddc91335d12a4de Signed-off-by: boseong choi <boseong.choi@samsung.com>
-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