We can now rely on systemd's ConditionFirstBoot to determine whether we
should run or not.
Signed-off-by: Tobias Schmidl <
tobias...@siemens.com>
---
.../expand-on-first-boot/files/expand-on-first-boot.service | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service b/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service
index fda5001..7c686c8 100644
--- a/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service
+++ b/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service
@@ -8,13 +8,13 @@ Description=Expand last partition
DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-remount-fs.service
-Before=local-fs-pre.target shutdown.target
-ConditionPathIsReadWrite=/etc
+Before=local-fs-pre.target shutdown.target first-boot-complete.target
+Wants=first-boot-complete.target
+ConditionFirstBoot=true
[Service]
Type=oneshot
ExecStart=/usr/share/expand-on-first-boot/expand-last-partition.sh
-ExecStartPost=-/bin/systemctl disable expand-on-first-boot.service
[Install]
WantedBy=sysinit.target
--
2.36.1