From bcffbfbf33dc8308a576648f5782484331c84ca8 Mon Sep 17 00:00:00 2001 From: Junhua Zhai Date: Wed, 13 Dec 2023 06:15:24 +0000 Subject: [PATCH] If syncd has not run, do nothing in stopplatform1 of gbsyncd.sh --- files/scripts/gbsyncd.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/scripts/gbsyncd.sh b/files/scripts/gbsyncd.sh index fc6b018b3ad7..34bcb7044bed 100755 --- a/files/scripts/gbsyncd.sh +++ b/files/scripts/gbsyncd.sh @@ -20,6 +20,11 @@ function waitplatform() { } function stopplatform1() { + if ! docker top gbsyncd$DEV | grep -q /usr/bin/syncd; then + debug "syncd process in container gbsyncd$DEV is not running" + return + fi + # 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/gbsyncd_request_pre_shutdown"