Skip to contentSkip to conversation

chrony: install chrony-wait.service

PATCH In review [email protected] 2 participants 4 messages Nov 19, 2019 – Nov 20, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 chrony: install chrony-wait.service

From: Peter Morrow <[email protected]>

Any systemd service which needs to wait on ntp synchronization before starting can order themselves after chrony-wait.service. It's useful to install this service as part of the recipe as it saves needing to install it via a bbappend file. Note that even if the service is installed no start up delay is introduced unless another service orders itself after the systemd target time-sync.target.

---
 meta-networking/recipes-support/chrony/chrony_3.5.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-networking/recipes-support/chrony/chrony_3.5.bb +3 -0
index 7c6356d26..fa11c443e 100644
@@ -103,6 +103,9 @@ do_install() {
     install -d ${D}${systemd_unitdir}/system
     install -m 0644 ${S}/examples/chronyd.service ${D}${systemd_unitdir}/system/
 
+    # systemd chronyd synchronization unit configuration file
+    install -m 0644 ${S}/examples/chrony-wait.service ${D}${systemd_unitdir}/system/
+
     # Variable data (for drift and/or rtc file)
     install -d ${D}${localstatedir}/lib/chrony
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 20 lines · On Tue, Nov 19, 2019 at 7:46 AM <[email protected]> wrote:

From: Peter Morrow <[email protected]>

Any systemd service which needs to wait on ntp synchronization before starting can order themselves after chrony-wait.service. It's useful to install this service as part of the recipe as it saves needing to install it via a bbappend file. Note that even if the service is installed no start up delay is introduced unless another service orders itself after the systemd target time-sync.target.

---
 meta-networking/recipes-support/chrony/chrony_3.5.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-networking/recipes-support/chrony/chrony_3.5.bb +0 -0
index 7c6356d26..fa11c443e 100644

meta-networking/recipes-support/chrony/chrony_3.5.bb do_install() { · line 108

Quoted 6 lines
meta-networking/recipes-support/chrony/chrony_3.5.bb +3 -0
@@ -103,6 +103,9 @@ do_install() {
     install -d ${D}${systemd_unitdir}/system
     install -m 0644 ${S}/examples/chronyd.service ${D}${systemd_unitdir}/system/
 
+    # systemd chronyd synchronization unit configuration file
+    install -m 0644 ${S}/examples/chrony-wait.service ${D}${systemd_unitdir}/system/
+

thiis needs to be packages as well something like

FILES_${PN} = "${systemd_unitdir}/system/"

Quoted 12 lines
meta-networking/recipes-support/chrony/chrony_3.5.bb +1 -1
+
     # Variable data (for drift and/or rtc file)
     install -d ${D}${localstatedir}/lib/chrony
 
--

2.20.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 25 lines · Khem Raj
Quoted 23 lines · On Tue, Nov 19, 2019 at 7:46 AM <[email protected]> wrote:

From: Peter Morrow <[email protected]>

Any systemd service which needs to wait on ntp synchronization before starting can order themselves after chrony-wait.service. It's useful to install this service as part of the recipe as it saves needing to install it via a bbappend file. Note that even if the service is installed no start up delay is introduced unless another service orders itself after the systemd target time-sync.target.

---
 meta-networking/recipes-support/chrony/chrony_3.5.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-networking/recipes-support/chrony/chrony_3.5.bb +0 -0
index 7c6356d26..fa11c443e 100644
@@ -103,6 +103,9 @@ do_install() {
     install -d ${D}${systemd_unitdir}/system
     install -m 0644 ${S}/examples/chronyd.service ${D}${systemd_unitdir}/system/
 
Quoted 7 lines

meta-networking/recipes-support/chrony/chrony_3.5.bb do_install() { · line 108

Quoted 3 lines
meta-networking/recipes-support/chrony/chrony_3.5.bb +3 -0
+    # systemd chronyd synchronization unit configuration file
+    install -m 0644 ${S}/examples/chrony-wait.service ${D}${systemd_unitdir}/system/
+

thiis needs to be packages as well something like

FILES_${PN} = "${systemd_unitdir}/system/"

Thanks Khem. Strange my build did not show this up, I'll do some more testing and re-submit.

Quoted 12 lines
Quoted 12 lines
meta-networking/recipes-support/chrony/chrony_3.5.bb +1 -1
+
     # Variable data (for drift and/or rtc file)
     install -d ${D}${localstatedir}/lib/chrony
 
--

2.20.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#3 lore raw
Quoted 33 lines · Peter Morrow
Quoted 31 lines · Khem Raj
Quoted 20 lines · On Tue, Nov 19, 2019 at 7:46 AM <[email protected]> wrote:

From: Peter Morrow <[email protected]>

Any systemd service which needs to wait on ntp synchronization before starting can order themselves after chrony-wait.service. It's useful to install this service as part of the recipe as it saves needing to install it via a bbappend file. Note that even if the service is installed no start up delay is introduced unless another service orders itself after the systemd target time-sync.target.

---
 meta-networking/recipes-support/chrony/chrony_3.5.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-networking/recipes-support/chrony/chrony_3.5.bb +0 -0
index 7c6356d26..fa11c443e 100644

meta-networking/recipes-support/chrony/chrony_3.5.bb do_install() { · line 108

Quoted 6 lines
meta-networking/recipes-support/chrony/chrony_3.5.bb +3 -0
@@ -103,6 +103,9 @@ do_install() {
     install -d ${D}${systemd_unitdir}/system
     install -m 0644 ${S}/examples/chronyd.service ${D}${systemd_unitdir}/system/
 
+    # systemd chronyd synchronization unit configuration file
+    install -m 0644 ${S}/examples/chrony-wait.service ${D}${systemd_unitdir}/system/
+

thiis needs to be packages as well something like

Quoted 4 lines
Quoted 1 line

FILES_${PN} = "${systemd_unitdir}/system/"

Thanks Khem. Strange my build did not show this up, I'll do some more testing and re-submit.

I also wonder, how this was tested as well if it never showed up on image. Please describe the testing part as well.

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
meta-networking/recipes-support/chrony/chrony_3.5.bb +1 -1
+
     # Variable data (for drift and/or rtc file)
     install -d ${D}${localstatedir}/lib/chrony
 
--

2.20.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel