Skip to content

Commit

Permalink
[lldp]Fix lldp spawned after reboot when disabled (#11080)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
dgsudharsan committed Jun 22, 2022
1 parent 90a849e commit 9452095
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions files/scripts/syncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 9452095

Please sign in to comment.