Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dockers/docker-fpm-frr/frr/supervisord/supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ dependent_startup_wait_for=bgpd:running
command=/usr/local/bin/bgpmon
priority=6
autostart=false
autorestart=false
autorestart=true
startsecs=0
stdout_logfile=syslog
stderr_logfile=syslog
Expand Down
12 changes: 10 additions & 2 deletions src/sonic-py-common/sonic_py_common/device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
PORT_CONFIG_FILE = "port_config.ini"
PLATFORM_JSON_FILE = "platform.json"

# HwSKU configuration file name
HWSKU_JSON_FILE = 'hwsku.json'

# Multi-NPU constants
# TODO: Move Multi-ASIC-related functions and constants to a "multi_asic.py" module
NPU_NAME_PREFIX = "asic"
Expand Down Expand Up @@ -247,8 +250,13 @@ def get_path_to_port_config_file(hwsku=None, asic=None):

port_config_candidates = []

# Check for 'platform.json' file presence first
port_config_candidates.append(os.path.join(platform_path, PLATFORM_JSON_FILE))
# Check for 'hwsku.json' file presence first
hwsku_json_file = os.path.join(hwsku_path, HWSKU_JSON_FILE)

# if 'hwsku.json' file is available, Check for 'platform.json' file presence,
# if 'platform.json' is available, APPEND it. Otherwise, SKIP it.
if os.path.isfile(hwsku_json_file):
port_config_candidates.append(os.path.join(platform_path, PLATFORM_JSON_FILE))

# Check for 'port_config.ini' file presence in a few locations
if asic:
Expand Down