Skip to content

Commit

Permalink
Merge pull request #183 from mssonicbld/sonicbld/202305-merge
Browse files Browse the repository at this point in the history
[code sync] Merge code from sonic-net/sonic-buildimage:202305 to 202305
  • Loading branch information
mssonicbld committed Dec 10, 2023
2 parents f4be41f + 2a1f0fc commit 37ee62e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion files/image_config/config-chassisdb/config-chassisdb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
config_chassis_db() {
startdb_file="/etc/sonic/chassisdb.conf"
[ ! -e $startdb_file ] || rm $startdb_file
platform=$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
platform=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`}
# database-chassis services will start when $chassis_config file exists
chassis_config="/usr/share/sonic/device/$platform/chassisdb.conf"
if [ ! -e $chassis_config ]; then
Expand All @@ -54,6 +54,9 @@ config_chassis_db() {
fi
}

# read SONiC immutable variables
[ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment

config_chassis_db

exit 0
4 changes: 2 additions & 2 deletions files/image_config/config-topology/config-topology.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# which could be used for platform specific topology configuration
#
start() {
PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
PLATFORM=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`}
#Path to platform topology script
TOPOLOGY_SCRIPT="/usr/share/sonic/device/$PLATFORM/plugins/config-topology.sh"
#if topology script file not present, do nothing and return 0
Expand All @@ -13,7 +13,7 @@ start() {
}

stop() {
PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
PLATFORM=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`}
#Path to platform topology script
TOPOLOGY_SCRIPT="/usr/share/sonic/device/$PLATFORM/plugins/config-topology.sh"
#if topology script file not present, do nothing and return 0
Expand Down

0 comments on commit 37ee62e

Please sign in to comment.