[PATCH wrynose] volatile-binds: order systemd-timesyncd after /var/lib

Patrick Vogelaar <[email protected]>
Newsgroups org.kernel.feeds.b4-sent,org.openembedded.lists.openembedded-core
Message-ID <[email protected]>
From: Esa Jaaskela <[email protected]>

systemd-timesyncd stores its clock file under /var/lib/systemd/timesync,
so it can fail to save state if it starts before the volatile /var/lib
is mounted. Add it to the Before= and WantedBy= entries already used for
systemd-random-seed.service.

(cherry picked from commit 1b8d8c25e46f1df7079545f4297496426fd9d371)

Signed-off-by: Esa Jaaskela <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Patrick Vogelaar <[email protected]>
---
 meta/recipes-core/volatile-binds/volatile-binds.bb | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/volatile-binds/volatile-binds.bb b/meta/recipes-core/volatile-binds/volatile-binds.bb
index 857bcc93ff..613e750c17 100644
--- a/meta/recipes-core/volatile-binds/volatile-binds.bb
+++ b/meta/recipes-core/volatile-binds/volatile-binds.bb
@@ -57,10 +57,11 @@ ${@d.getVar('VOLATILE_BINDS').replace("\\n", "\n")}
 END
 
     if [ -e "$var_lib_servicefile" ]; then
-        # As the seed is stored under /var/lib, ensure that this service runs
-        # after the volatile /var/lib is mounted.
-        sed -i -e "/^Before=/s/\$/ systemd-random-seed.service/" \
-               -e "/^WantedBy=/s/\$/ systemd-random-seed.service/" \
+        # The random seed and the timesyncd clock file are stored under
+        # /var/lib, so ensure that those services run after the volatile
+        # /var/lib is mounted.
+        sed -i -e "/^Before=/s/\$/ systemd-random-seed.service systemd-timesyncd.service/" \
+               -e "/^WantedBy=/s/\$/ systemd-random-seed.service systemd-timesyncd.service/" \
                "$var_lib_servicefile"
     fi
 }

---
base-commit: f09a0f28aeb54ddd90415dd458338e1565bb5a49
change-id: 20260812-backport_timesyncd-a95a86e8fede

Best regards,
--  
Patrick Vogelaar <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.