[201811] Fix radv start condition logic (#9492)

This commit is contained in:
kellyyeh 2021-12-10 18:34:47 -08:00 committed by GitHub
parent 70d87ccff4
commit 5bb59f6136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,8 +6,8 @@ supervisorctl start rsyslogd
# Router advertiser should only run on ToR (T0) devices
DEVICE_ROLE=$(sonic-cfggen -d -v "DEVICE_METADATA.localhost.type")
if [ "$DEVICE_ROLE" != "ToRRouter" || "$DEVICE_ROLE" != "MgmtToRRouter" || "$DEVICE_ROLE" != "EPMS"]; then
echo "Device role is not ToRRouter. Not starting router advertiser process."
if [[ "$DEVICE_ROLE" != "ToRRouter" && "$DEVICE_ROLE" != "MgmtToRRouter" && "$DEVICE_ROLE" != "EPMS" ]]; then
echo "Device role is not ToRRouter, MgmtToRRouter, or EPMS. Not starting router advertiser process."
exit 0
fi