diff --git a/files/build_templates/pmon.service.j2 b/files/build_templates/pmon.service.j2 index 33f3173b488..9c422625681 100644 --- a/files/build_templates/pmon.service.j2 +++ b/files/build_templates/pmon.service.j2 @@ -2,6 +2,9 @@ Description=Platform monitor container Requires=updategraph.service After=updategraph.service +{% if sonic_asic_platform == 'mellanox' %} +After=syncd.service +{% endif %} Before=ntp-config.service [Service] diff --git a/files/scripts/syncd.sh b/files/scripts/syncd.sh index e282731980d..c9064657321 100755 --- a/files/scripts/syncd.sh +++ b/files/scripts/syncd.sh @@ -109,10 +109,6 @@ start() { /usr/bin/hw-management.sh chipdown fi - debug "Starting pmon service..." - /bin/systemctl start pmon - debug "Started pmon service" - if [[ x"$BOOT_TYPE" == x"fast" ]]; then /usr/bin/hw-management.sh chipupdis fi @@ -136,6 +132,11 @@ start() { } wait() { + if [[ x"$sonic_asic_platform" == x"mellanox" ]]; then + debug "Starting pmon service..." + /bin/systemctl start pmon + debug "Started pmon service" + fi /usr/bin/${SERVICE}.sh wait }