[ntp]: NTP service ordering (#6115)

Make sure ntp-config service is executed before ntpd

Updated ntp-config service files to force dependency with ntp service. Also resolved circular dependency with --no-block flag. (needed as ntp-config service internally invokes systemd to restart ntp which in turn waits for ntp-config to complete)

Signed-off-by: Prabhu Sreenivasan <prabhu.sreenivasan@broadcom.com>
This commit is contained in:
Prabhu Sreenivasan 2020-12-04 22:19:20 +05:30 committed by GitHub
parent 83f0d8240e
commit 2895b79482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
Description=Update NTP configuration
Requires=updategraph.service
After=updategraph.service
Before=ntp.service
[Service]
Type=oneshot

View File

@ -29,4 +29,4 @@ get_database_reboot_type
echo "Disabling NTP long jump for reboot type ${reboot_type} ..."
modify_ntp_default "s/NTPD_OPTS='-g'/NTPD_OPTS='-x'/"
systemctl restart ntp
systemctl --no-block restart ntp