From cad7c5c9e11a7440d01cff5794e87b4c3fa40c8d Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Sat, 30 May 2020 22:21:03 +0000 Subject: [PATCH] Enhance MAAS ntpd stub Using `exit 0` in the ntpd stub causes some unwanted log warnings: maas.service_monitor[151]: [warn] Service 'ntp' is on but not in the expected state of 'running', its current state is 'exited'. This change allows the stub to respond appropriately to 'systemctl status ntpd' and 'systemctl restart ntpd' and keeps MAAS happier. Change-Id: I41b95051ce595fb9001f4104a1abb48b66a657c4 --- charts/maas/templates/bin/_ntpd.sh.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/maas/templates/bin/_ntpd.sh.tpl b/charts/maas/templates/bin/_ntpd.sh.tpl index 7590a47..6188b43 100644 --- a/charts/maas/templates/bin/_ntpd.sh.tpl +++ b/charts/maas/templates/bin/_ntpd.sh.tpl @@ -1,5 +1,5 @@ #!/bin/sh -# This is a stub ntpd process that will simply do nothing - -exit 0 +# This is a stub ntpd process that will do barely enough to satisfy +# /etc/init.d/ntp stop/start/restart/status +tail -f /dev/null & echo $! > /var/run/ntpd.pid