diff --git a/files/scripts/syncd.sh b/files/scripts/syncd.sh index 2a3bd133c4..8aacfe8f6c 100755 --- a/files/scripts/syncd.sh +++ b/files/scripts/syncd.sh @@ -105,6 +105,12 @@ function stopplatform1() { fi if [[ x$sonic_asic_platform != x"mellanox" ]] || [[ x$TYPE != x"cold" ]]; then + # Invoke platform specific pre shutdown routine. + PLATFORM=`$SONIC_DB_CLI CONFIG_DB hget 'DEVICE_METADATA|localhost' platform` + PLATFORM_PRE_SHUTDOWN="/usr/share/sonic/device/$PLATFORM/plugins/syncd_request_pre_shutdown" + [ -f $PLATFORM_PRE_SHUTDOWN ] && \ + /usr/bin/docker exec -i syncd$DEV /usr/share/sonic/platform/plugins/syncd_request_pre_shutdown --${TYPE} + debug "${TYPE} shutdown syncd process ..." /usr/bin/docker exec -i syncd$DEV /usr/bin/syncd_request_shutdown --${TYPE}