From 46990c11ab409daa01ffb32325a8b5be0d2a54e3 Mon Sep 17 00:00:00 2001 From: Sudharsan Dhamal Gopalarathnam Date: Sat, 4 Jun 2022 03:10:56 +0000 Subject: [PATCH 1/2] [lldp]Fix lldp spawned after reboot when disabled --- files/scripts/syncd.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/files/scripts/syncd.sh b/files/scripts/syncd.sh index 628609e0a5f0..a00b0577677f 100755 --- a/files/scripts/syncd.sh +++ b/files/scripts/syncd.sh @@ -55,13 +55,6 @@ function waitplatform() { debug "Started pmon service" fi fi - if [[ x"$BOOT_TYPE" = @(x"fast"|x"warm"|x"fastfast") ]]; then - debug "LLDP service is delayed by a timer for better fast/warm boot performance" - else - debug "Starting lldp service..." - /bin/systemctl start lldp - debug "Started lldp service" - fi } function stopplatform1() { From 5b42cd0a9fdbed7e1d190479ea44d2a2dca52d9d Mon Sep 17 00:00:00 2001 From: Sudharsan Dhamal Gopalarathnam Date: Tue, 7 Jun 2022 18:35:56 +0000 Subject: [PATCH 2/2] Enabling lldp only when timer is enabled --- files/scripts/syncd.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/files/scripts/syncd.sh b/files/scripts/syncd.sh index a00b0577677f..37aa10339eb3 100755 --- a/files/scripts/syncd.sh +++ b/files/scripts/syncd.sh @@ -55,6 +55,17 @@ function waitplatform() { debug "Started pmon service" fi fi + if [[ x"$BOOT_TYPE" = @(x"fast"|x"warm"|x"fastfast") ]]; then + debug "LLDP service is delayed by a timer for better fast/warm boot performance" + else + lldp_state=$(systemctl is-enabled lldp.timer) + if [[ $lldp_state == "enabled" ]] + then + debug "Starting lldp service..." + /bin/systemctl start lldp + debug "Started lldp service" + fi + fi } function stopplatform1() {