[config-topology] use cached variables (#17343)
- Why I did it Improve boot performance mostly needed for fast and warmboot - How I did it Use cached variable. - How to verify it Boot the system. Simply do "systemd-analyze blame" and look at service start time. Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
This commit is contained in:
parent
000a2ef818
commit
6435df1056
@ -4,7 +4,7 @@
|
|||||||
# which could be used for platform specific topology configuration
|
# which could be used for platform specific topology configuration
|
||||||
#
|
#
|
||||||
start() {
|
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
|
#Path to platform topology script
|
||||||
TOPOLOGY_SCRIPT="/usr/share/sonic/device/$PLATFORM/plugins/config-topology.sh"
|
TOPOLOGY_SCRIPT="/usr/share/sonic/device/$PLATFORM/plugins/config-topology.sh"
|
||||||
#if topology script file not present, do nothing and return 0
|
#if topology script file not present, do nothing and return 0
|
||||||
@ -13,7 +13,7 @@ start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
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
|
#Path to platform topology script
|
||||||
TOPOLOGY_SCRIPT="/usr/share/sonic/device/$PLATFORM/plugins/config-topology.sh"
|
TOPOLOGY_SCRIPT="/usr/share/sonic/device/$PLATFORM/plugins/config-topology.sh"
|
||||||
#if topology script file not present, do nothing and return 0
|
#if topology script file not present, do nothing and return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user