We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bf2012 commit a3da1d2Copy full SHA for a3da1d2
files/image_config/config-chassisdb/config-chassisdb
@@ -27,7 +27,7 @@
27
config_chassis_db() {
28
startdb_file="/etc/sonic/chassisdb.conf"
29
[ ! -e $startdb_file ] || rm $startdb_file
30
- platform=$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
+ platform=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`}
31
# database-chassis services will start when $chassis_config file exists
32
chassis_config="/usr/share/sonic/device/$platform/chassisdb.conf"
33
if [ ! -e $chassis_config ]; then
@@ -54,6 +54,9 @@ config_chassis_db() {
54
fi
55
}
56
57
+# read SONiC immutable variables
58
+[ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment
59
+
60
config_chassis_db
61
62
exit 0
0 commit comments