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>
#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
#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
%files
/bin/with-dev-root-do
/usr/share/license/%{name}
%{_unitdir}/resize2fs-root.service
%{_unitdir}/local-fs.target.wants/resize2fs-root.service
/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
%{_unitdir}/resize2fs@.service
--- /dev/null
+[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
--- /dev/null
+[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