Fixed typos in config-setup (#7754)
Signed-off-by: Andriy Kokhan <andriyx.kokhan@intel.com>
This commit is contained in:
parent
b2c74afeb5
commit
6931a45ecf
@ -118,7 +118,7 @@ reload_minigraph()
|
|||||||
config save -y
|
config save -y
|
||||||
}
|
}
|
||||||
|
|
||||||
# Reload exisitng config db file on disk
|
# Reload existing config db file on disk
|
||||||
# Usage: reload_configdb <config_file>
|
# Usage: reload_configdb <config_file>
|
||||||
reload_configdb()
|
reload_configdb()
|
||||||
{
|
{
|
||||||
@ -127,8 +127,9 @@ reload_configdb()
|
|||||||
echo "Reloading existing config db..."
|
echo "Reloading existing config db..."
|
||||||
config reload ${CONFIG_FILE} -y -n
|
config reload ${CONFIG_FILE} -y -n
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restore SONiC configuration from a backup copy
|
# Restore SONiC configuration from a backup copy
|
||||||
function copy_config_files_and_directories()
|
copy_config_files_and_directories()
|
||||||
{
|
{
|
||||||
for file_dir in $@; do
|
for file_dir in $@; do
|
||||||
if [ -f /etc/sonic/old_config/${file_dir} ] || [ -d /etc/sonic/old_config/${file_dir} ]; then
|
if [ -f /etc/sonic/old_config/${file_dir} ] || [ -d /etc/sonic/old_config/${file_dir} ]; then
|
||||||
@ -140,7 +141,7 @@ function copy_config_files_and_directories()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if SONiC swich has booted after a warm reboot request
|
# Check if SONiC switch has booted after a warm reboot request
|
||||||
check_system_warm_boot()
|
check_system_warm_boot()
|
||||||
{
|
{
|
||||||
SYSTEM_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|system" enable`
|
SYSTEM_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|system" enable`
|
||||||
@ -273,7 +274,8 @@ get_config_db_file_list()
|
|||||||
|
|
||||||
echo $config_db_file_list
|
echo $config_db_file_list
|
||||||
}
|
}
|
||||||
# Check if all needed config db are prsesnt for both
|
|
||||||
|
# Check if all needed config db are present for both
|
||||||
# single and multi-npu platforms
|
# single and multi-npu platforms
|
||||||
check_all_config_db_present()
|
check_all_config_db_present()
|
||||||
{
|
{
|
||||||
@ -335,7 +337,7 @@ do_config_migration()
|
|||||||
# Take a backup of current SONiC configuration
|
# Take a backup of current SONiC configuration
|
||||||
do_config_backup()
|
do_config_backup()
|
||||||
{
|
{
|
||||||
echo "Taking backup of curent configuration"
|
echo "Taking backup of current configuration"
|
||||||
rm -rf /host/old_config
|
rm -rf /host/old_config
|
||||||
cp -ar /etc/sonic /host/old_config
|
cp -ar /etc/sonic /host/old_config
|
||||||
[ -d ${CONFIG_POST_MIGRATION_HOOKS} ] && cp -arL ${CONFIG_POST_MIGRATION_HOOKS} /host/old_config
|
[ -d ${CONFIG_POST_MIGRATION_HOOKS} ] && cp -arL ${CONFIG_POST_MIGRATION_HOOKS} /host/old_config
|
||||||
@ -357,7 +359,7 @@ boot_config()
|
|||||||
do_config_migration
|
do_config_migration
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For multi-npu platfrom we don't support config initlaiztion. Assumption
|
# For multi-npu platfrom we don't support config initialization. Assumption
|
||||||
# is there should be existing minigraph or config_db from previous image
|
# is there should be existing minigraph or config_db from previous image
|
||||||
# file system to trigger. pending_config_initialization will remain set
|
# file system to trigger. pending_config_initialization will remain set
|
||||||
# for multi-npu platforms if we reach this case.
|
# for multi-npu platforms if we reach this case.
|
||||||
|
Reference in New Issue
Block a user