aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Zaharia <Adrian.Zaharia@windriver.com>2021-06-28 12:02:16 +0300
committerArmin Kuster <akuster808@gmail.com>2021-07-10 11:27:56 -0700
commitf52ce99b468eff95b6e36caf41fb50808a26f8d5 (patch)
tree278e59a27c7fa9e463b4b40d36785ab63435ae53
parentace5cd9a8bb6ba0058caf8a148437820a9336b9c (diff)
downloadmeta-openembedded-f52ce99b468eff95b6e36caf41fb50808a26f8d5.tar.gz
meta-openembedded-f52ce99b468eff95b6e36caf41fb50808a26f8d5.tar.bz2
meta-openembedded-f52ce99b468eff95b6e36caf41fb50808a26f8d5.zip
ntp: fix ntpdate to wait for subprocesses
When using systemd, ntpdate-sync script will start in background triggering the start of ntpd without actually exiting. This results in an bind error in ntpd startup. Add wait at the end of ntpdate script to ensure that when the ntpdate.service is marked as finished the oneshot script ntpdate-sync finished and unbind the ntp port Fixes #386 Signed-off-by: Adrian Zaharia <Adrian.Zaharia@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 73d5cd5e8d9d8a922b6a8a9d90adf0470a99314e) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rwxr-xr-xmeta-networking/recipes-support/ntp/ntp/ntpdate5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpdate b/meta-networking/recipes-support/ntp/ntp/ntpdate
index 17b64d133..be3bacfcd 100755
--- a/meta-networking/recipes-support/ntp/ntp/ntpdate
+++ b/meta-networking/recipes-support/ntp/ntp/ntpdate
@@ -52,3 +52,8 @@ if [ -x /usr/bin/lockfile-create ] ; then
fi
) &
+
+# wait for all subprocesses to finish
+# this is required when using systemd service as ntpd will start before ntpdate finishes
+# and results in a bind error (port 123)
+wait