[lldp]Fix lldp spawned after reboot when disabled (#11080)

- Why I did it
When LLDP is disabled through feature command, it gets spawned after reboot.

- How I did it
In syncd.sh check if the service is enabled before spawning automatically during cold reboot.

- How to verify it
Disable lldp feature. Perform cold reboot and verify its not spawned.
This commit is contained in:
Sudharsan Dhamal Gopalarathnam 2022-06-21 17:11:41 -07:00 committed by GitHub
parent 90a849ea85
commit 9452095e25
No account linked to committer's email address

View File

@ -63,9 +63,13 @@ function waitplatform() {
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"
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
}