diff --git a/files/build_templates/bgp.service.j2 b/files/build_templates/bgp.service.j2 index 6c3e343fcf44..bc023b7d714d 100644 --- a/files/build_templates/bgp.service.j2 +++ b/files/build_templates/bgp.service.j2 @@ -2,6 +2,7 @@ Description=BGP container Requires=updategraph.service After=updategraph.service +Before=ntp-config.service [Service] User={{ sonicadmin_user }} diff --git a/files/build_templates/dhcp_relay.service.j2 b/files/build_templates/dhcp_relay.service.j2 index ea53fa2deda4..b4d9ceb38f0c 100644 --- a/files/build_templates/dhcp_relay.service.j2 +++ b/files/build_templates/dhcp_relay.service.j2 @@ -2,6 +2,7 @@ Description=DHCP relay container Requires=updategraph.service swss.service teamd.service After=updategraph.service swss.service teamd.service +Before=ntp-config.service [Service] User={{ sonicadmin_user }} diff --git a/files/build_templates/lldp.service.j2 b/files/build_templates/lldp.service.j2 index d35cdacca0f3..d294a08900f4 100644 --- a/files/build_templates/lldp.service.j2 +++ b/files/build_templates/lldp.service.j2 @@ -2,6 +2,7 @@ Description=LLDP container Requires=updategraph.service After=updategraph.service +Before=ntp-config.service [Service] User={{ sonicadmin_user }} diff --git a/files/build_templates/pmon.service.j2 b/files/build_templates/pmon.service.j2 index 83dd8e4b648d..de4e62df5e10 100644 --- a/files/build_templates/pmon.service.j2 +++ b/files/build_templates/pmon.service.j2 @@ -2,6 +2,7 @@ Description=Platform monitor container Requires=updategraph.service After=updategraph.service +Before=ntp-config.service [Service] User={{ sonicadmin_user }} diff --git a/files/build_templates/radv.service.j2 b/files/build_templates/radv.service.j2 index 7d6da31e135f..065f01906076 100644 --- a/files/build_templates/radv.service.j2 +++ b/files/build_templates/radv.service.j2 @@ -2,6 +2,7 @@ Description=Router advertiser container Requires=updategraph.service swss.service After=updategraph.service swss.service +Before=ntp-config.service [Service] User={{ sonicadmin_user }} diff --git a/files/build_templates/snmp.service.j2 b/files/build_templates/snmp.service.j2 index 6398477ab6a1..f344f2e805ea 100644 --- a/files/build_templates/snmp.service.j2 +++ b/files/build_templates/snmp.service.j2 @@ -2,6 +2,7 @@ Description=SNMP container Requires=updategraph.service swss.service After=updategraph.service swss.service +Before=ntp-config.service [Service] ExecStartPre=/usr/bin/{{docker_container_name}}.sh start diff --git a/files/build_templates/swss.service.j2 b/files/build_templates/swss.service.j2 index 8b8d7b42d1ee..dde548b8cb7f 100644 --- a/files/build_templates/swss.service.j2 +++ b/files/build_templates/swss.service.j2 @@ -8,6 +8,7 @@ Requires=nps-modules-4.9.0-7-amd64.service {% endif %} After=database.service updategraph.service After=interfaces-config.service +Before=ntp-config.service [Service] User=root diff --git a/files/build_templates/syncd.service.j2 b/files/build_templates/syncd.service.j2 index 38b208e74b0b..08860adc8f3d 100644 --- a/files/build_templates/syncd.service.j2 +++ b/files/build_templates/syncd.service.j2 @@ -13,6 +13,7 @@ After=opennsl-modules-4.9.0-7-amd64.service {% elif sonic_asic_platform == 'nephos' %} After=nps-modules-4.9.0-7-amd64.service {% endif %} +Before=ntp-config.service [Service] User=root diff --git a/files/build_templates/teamd.service.j2 b/files/build_templates/teamd.service.j2 index bbd04a81b05b..5cd36c6748b9 100644 --- a/files/build_templates/teamd.service.j2 +++ b/files/build_templates/teamd.service.j2 @@ -2,6 +2,7 @@ Description=TEAMD container Requires=updategraph.service After=updategraph.service +Before=ntp-config.service [Service] User={{ sonicadmin_user }} diff --git a/files/build_templates/telemetry.service.j2 b/files/build_templates/telemetry.service.j2 index 5f2e81ed95ea..132924b04193 100644 --- a/files/build_templates/telemetry.service.j2 +++ b/files/build_templates/telemetry.service.j2 @@ -2,6 +2,7 @@ Description=Telemetry container Requires=swss.service After=swss.service +Before=ntp-config.service [Service] User={{ sonicadmin_user }} diff --git a/files/image_config/ntp/ntp-config.service b/files/image_config/ntp/ntp-config.service index fb7ca946197f..c86710e3d209 100644 --- a/files/image_config/ntp/ntp-config.service +++ b/files/image_config/ntp/ntp-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update NTP configuration Requires=updategraph.service -After=updategraph.service bgp.service dhcp_relay.service lldp.service pmon.service radv.service snmp.service swss.service syncd.service teamd.service +After=updategraph.service [Service] Type=oneshot