When booting the device at first time, the root partition should be
extended by using resize2fs command.
Change-Id: Ia16fd837a6c78b3d3b49e1d9bf20a7c9afef6c63
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
mkdir -p %{buildroot}/usr/share/license
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
+
%files
/bin/with-dev-root-do
/etc/fta_version.txt
/usr/bin/save_blenv
/bin/check-booting-mode.sh
/usr/share/license/%{name}
+%{_unitdir}/resize2fs-root.service
+%{_unitdir}/local-fs.target.wants/resize2fs-root.service
--- /dev/null
+[Unit]
+Description=Resize of File System on the Root Device
+DefaultDependencies=no
+Requires=systemd-fsck-root.service
+After=systemd-fsck-root.service
+Before=systemd-remount-fs.service local-fs.target shutdown.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStartPre=/bin/mount -o remount,rw /
+ExecStart=/bin/with-dev-root-do /sbin/resize2fs
+ExecStartPost=/bin/ln -s /dev/null /etc/systemd/system/resize2fs-root.service
+ExecStartPost=/bin/mount -o remount /
+StandardOutput=journal+console
+TimeoutSec=0