From 72fe0cfc12840639f41d513ae1606dadc215c76c Mon Sep 17 00:00:00 2001 From: neofang7 Date: Thu, 11 Aug 2016 13:20:28 +0000 Subject: [PATCH] Add network dependency in timesyncd 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 --- ...rget-dependency-in-systemd-timesyncd.patch | 25 +++++++++++++++++++ .../recipes-core/systemd/systemd_%.bbappend | 1 + 2 files changed, 26 insertions(+) create mode 100644 meta-ostro/recipes-core/systemd/systemd/0002-Add-network.target-dependency-in-systemd-timesyncd.patch diff --git a/meta-ostro/recipes-core/systemd/systemd/0002-Add-network.target-dependency-in-systemd-timesyncd.patch b/meta-ostro/recipes-core/systemd/systemd/0002-Add-network.target-dependency-in-systemd-timesyncd.patch new file mode 100644 index 0000000..eb9d815 --- /dev/null +++ b/meta-ostro/recipes-core/systemd/systemd/0002-Add-network.target-dependency-in-systemd-timesyncd.patch @@ -0,0 +1,25 @@ +From 415c16ff2736731a763a2f4f890de523a3bc0c11 Mon Sep 17 00:00:00 2001 +From: neofang7 +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 + diff --git a/meta-ostro/recipes-core/systemd/systemd_%.bbappend b/meta-ostro/recipes-core/systemd/systemd_%.bbappend index 148a2a8..36220fa 100644 --- a/meta-ostro/recipes-core/systemd/systemd_%.bbappend +++ b/meta-ostro/recipes-core/systemd/systemd_%.bbappend @@ -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