Resize partition for /opt and /opt/usr 32/19032/1 accepted/tizen_ivi accepted/tizen_ivi_panda accepted/tizen_mobile tizen accepted/tizen/ivi/20140410.192056 accepted/tizen/ivi/panda/20140408.203259 accepted/tizen/mobile/20140407.041645 submit/tizen/20140407.034348
authorSangjung Woo <sangjung.woo@samsung.com>
Fri, 4 Apr 2014 09:31:38 +0000 (18:31 +0900)
committerSangjung Woo <sangjung.woo@samsung.com>
Fri, 4 Apr 2014 09:31:38 +0000 (18:31 +0900)
When booting the device at first time, '/opt' and '/opt/usr' partition
should be extended by using resize2fs command.

Change-Id: I10c7be9d9deb3bc962b01514f6c04dc16ef0565b
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
packaging/system-plugin-mount.spec
usr/lib/systemd/system/resize2fs-opt-usr.service [new file with mode: 0644]
usr/lib/systemd/system/resize2fs-opt.service [new file with mode: 0644]

index 88498e5..5b1d01b 100755 (executable)
@@ -31,6 +31,9 @@ cp -f LICENSE %{buildroot}/usr/share/license/%{name}
 #resize2fs service file for systemd
 install -m0755 -d %{buildroot}%{_unitdir}/local-fs.target.wants
 ln -s ../resize2fs-root.service %{buildroot}%{_unitdir}/local-fs.target.wants/resize2fs-root.service
+ln -s ../resize2fs-opt.service %{buildroot}%{_unitdir}/local-fs.target.wants/resize2fs-opt.service
+ln -s ../resize2fs-opt-usr.service %{buildroot}%{_unitdir}/local-fs.target.wants/resize2fs-opt-usr.service
+
 
 %files
 /bin/with-dev-root-do
@@ -41,4 +44,8 @@ ln -s ../resize2fs-root.service %{buildroot}%{_unitdir}/local-fs.target.wants/re
 /usr/share/license/%{name}
 %{_unitdir}/resize2fs-root.service
 %{_unitdir}/local-fs.target.wants/resize2fs-root.service
+%{_unitdir}/resize2fs-opt.service
+%{_unitdir}/local-fs.target.wants/resize2fs-opt.service
+%{_unitdir}/resize2fs-opt-usr.service
+%{_unitdir}/local-fs.target.wants/resize2fs-opt-usr.service
 %{_unitdir}/resize2fs@.service
diff --git a/usr/lib/systemd/system/resize2fs-opt-usr.service b/usr/lib/systemd/system/resize2fs-opt-usr.service
new file mode 100644 (file)
index 0000000..cdc31b2
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=Resize /opt/usr file system
+DefaultDependencies=no
+Before=opt-usr.mount
+After=systemd-fsck@dev-mmcblk0p7.service
+Requires=systemd-fsck@dev-mmcblk0p7.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/systemctl start resize2fs@dev-mmcblk0p7.service
+ExecStartPost=/bin/ln -s /dev/null /etc/systemd/system/resize2fs-opt-usr.service
+StandardOutput=journal+console
+TimeoutSec=0
diff --git a/usr/lib/systemd/system/resize2fs-opt.service b/usr/lib/systemd/system/resize2fs-opt.service
new file mode 100644 (file)
index 0000000..164731a
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=Resize /opt file system
+DefaultDependencies=no
+Before=opt.mount
+After=systemd-fsck@dev-mmcblk0p6.service
+Requires=systemd-fsck@dev-mmcblk0p6.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/systemctl start resize2fs@dev-mmcblk0p6.service
+ExecStartPost=/bin/ln -s /dev/null /etc/systemd/system/resize2fs-opt.service
+StandardOutput=journal+console
+TimeoutSec=0