Skip to contentSkip to conversation

systemd: fix ordering for machineid and run-postinsts services

PATCH In review Jonathan Liu 1 participant 2 messages May 16, 2013 – May 24, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd: fix ordering for machineid and run-postinsts services

The remount-rootfs.service unit has been renamed to systemd-remount-fs.service in systemd v183 and later.

The run-postinsts script writes to /var/log (a symbolic link to /var/volatile/log), so systemd-tmpfiles-setup.service is added to After= in run-postinsts.service to ensure /var/volatile/log is created before running the script.

[YOCTO #4490]

---
 meta/recipes-core/systemd/systemd-compat-units/machineid.service     | 2 +-
 meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/systemd/systemd-compat-units/machineid.service +1 -1
index cab8f76..f586c6d 100644
@@ -2,7 +2,7 @@
 Description=Machine ID first boot configure
 DefaultDependencies=no
 ConditionPathExists=|!/etc/machine-id
-After=remount-rootfs.service
+After=systemd-remount-fs.service
 Before=sysinit.target
 
 [Service]
meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service +1 -1
index da6fe76..02c1d86 100644
@@ -2,7 +2,7 @@
 Description=Run pending postinsts
 DefaultDependencies=no
 ConditionPathExists=|/etc/rcS.d/S98run-postinsts
-After=remount-rootfs.service tmp.mount
+After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
 Before=sysinit.target
 
 [Service]
Signature · 1 line
1.8.2.3
#1 lore raw
Quoted 34 lines · Jonathan Liu

The remount-rootfs.service unit has been renamed to systemd-remount-fs.service in systemd v183 and later.

The run-postinsts script writes to /var/log (a symbolic link to /var/volatile/log), so systemd-tmpfiles-setup.service is added to After= in run-postinsts.service to ensure /var/volatile/log is created before running the script.

[YOCTO #4490]

---
  meta/recipes-core/systemd/systemd-compat-units/machineid.service     | 2 +-
  meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/systemd/systemd-compat-units/machineid.service +1 -1
index cab8f76..f586c6d 100644
@@ -2,7 +2,7 @@
  Description=Machine ID first boot configure
  DefaultDependencies=no
  ConditionPathExists=|!/etc/machine-id
-After=remount-rootfs.service
+After=systemd-remount-fs.service
  Before=sysinit.target
 
  [Service]
meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service +0 -0
index da6fe76..02c1d86 100644

meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service line 8

Quoted 8 lines
meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service +1 -1
@@ -2,7 +2,7 @@
  Description=Run pending postinsts
  DefaultDependencies=no
  ConditionPathExists=|/etc/rcS.d/S98run-postinsts
-After=remount-rootfs.service tmp.mount
+After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
  Before=sysinit.target
 
  [Service]

Bump. This fixes the postinst service failing on startup when using systemd with an image that inherits from boot-directdisk.

Regards,
Jonathan