From c7ef5e945db2119f6688025d42eff681258a3645 Mon Sep 17 00:00:00 2001 From: lguohan Date: Wed, 21 Oct 2020 11:13:36 -0700 Subject: [PATCH] [gbsyncd] exit with zero when platform has no gearbox (#676) Signed-off-by: Guohan Lu --- syncd/scripts/gbsyncd_startup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/syncd/scripts/gbsyncd_startup.py b/syncd/scripts/gbsyncd_startup.py index 043791e41507..5c39af689944 100644 --- a/syncd/scripts/gbsyncd_startup.py +++ b/syncd/scripts/gbsyncd_startup.py @@ -19,6 +19,8 @@ import os import sys import json +import time +import syslog import subprocess @@ -39,7 +41,9 @@ def main(): with open('/usr/share/sonic/hwsku/gearbox_config.json') as file_object: gearbox_config=json.load(file_object) except: - sys.exit("No external PHY / gearbox supported on this platform, existing physycd application") + syslog.syslog(syslog.LOG_NOTICE, "No external PHY / gearbox supported on this platform, existing gbsyncd application") + time.sleep(2) + sys.exit(0) physyncd_enable(gearbox_config)