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
This commit is contained in:
Phil Sphicas 2020-05-30 22:21:03 +00:00
parent 1f13d56418
commit cad7c5c9e1
1 changed files with 3 additions and 3 deletions

View File

@ -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