Skip to content

Commit 9452095

Browse files
authored
[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.
1 parent 90a849e commit 9452095

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

files/scripts/syncd.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@ function waitplatform() {
6363
if [[ x"$BOOT_TYPE" = @(x"fast"|x"warm"|x"fastfast") ]]; then
6464
debug "LLDP service is delayed by a timer for better fast/warm boot performance"
6565
else
66-
debug "Starting lldp service..."
67-
/bin/systemctl start lldp
68-
debug "Started lldp service"
66+
lldp_state=$(systemctl is-enabled lldp.timer)
67+
if [[ $lldp_state == "enabled" ]]
68+
then
69+
debug "Starting lldp service..."
70+
/bin/systemctl start lldp
71+
debug "Started lldp service"
72+
fi
6973
fi
7074
}
7175

0 commit comments

Comments
 (0)