Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Add network dependency in timesyncd
Browse files Browse the repository at this point in the history
Fixes: IOTOS-1743

During Ostro shutdown, systemd-timesyncd service will start up to sync
with time server. However, network services are very possible to be
stopped before timesyncd starts up. So, add network.target dependency to
timesyncd.service to garantee that timesyncd will be triggered before
network services stop.

Signed-off-by: neofang7 <[email protected]>
  • Loading branch information
neofang7 committed Aug 11, 2016
1 parent 0cd7136 commit 72fe0cf
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 415c16ff2736731a763a2f4f890de523a3bc0c11 Mon Sep 17 00:00:00 2001
From: neofang7 <[email protected]>
Date: Mon, 8 Aug 2016 10:50:43 +0000
Subject: [PATCH] Add network.target dependency in systemd-timesyncd.service

---
units/systemd-timesyncd.service.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/units/systemd-timesyncd.service.in b/units/systemd-timesyncd.service.in
index df1e339..28d38d6 100644
--- a/units/systemd-timesyncd.service.in
+++ b/units/systemd-timesyncd.service.in
@@ -12,7 +12,7 @@ ConditionCapability=CAP_SYS_TIME
ConditionVirtualization=!container
DefaultDependencies=no
RequiresMountsFor=/var/lib/systemd/clock
-After=systemd-remount-fs.service systemd-tmpfiles-setup.service systemd-sysusers.service
+After=systemd-remount-fs.service systemd-tmpfiles-setup.service systemd-sysusers.service network.target
Before=time-sync.target sysinit.target shutdown.target
Conflicts=shutdown.target
Wants=time-sync.target
--
2.7.4

1 change: 1 addition & 0 deletions meta-ostro/recipes-core/systemd/systemd_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ DEPENDS += " ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'gnu-efi', '', d)}"

SRC_URI_append = " \
file://0001-Workaround-remove-handling-of-custom-cmdline.patch \
file://0002-Add-network.target-dependency-in-systemd-timesyncd.patch \
"

# Needed to be able to find gnu-efi headers/libs
Expand Down

0 comments on commit 72fe0cf

Please sign in to comment.