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
9 changes: 7 additions & 2 deletions files/image_config/platform/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ update_mgmt_interface_macaddr() {
sed -i "/eth0/ s/ATTR{address}==\"$old_mac\"/ATTR{address}==\"$new_mac\"/g" /etc/udev/rules.d/70-persistent-net.rules
}

diag_install() {
echo "Diag install start ..."
sleep 200
dpkg -i /home/Ali_Diag_V2.0.4.deb
}

boot_action() {
#cleanos
CLEAN_OS_FILE="/etc/sonic/cleanos"
Expand All @@ -102,8 +108,7 @@ boot_action() {
#diag install
if [ ! -d /usr/local/CPU_Diag ];then
echo "Diag install"
sleep 200
dpkg -i /home/Ali_Diag_V2.0.4.deb
diag_install > /var/log/diagInstallLog &
fi
}

Expand Down
7 changes: 6 additions & 1 deletion files/image_config/updategraph/updategraph
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ check_system_warm_boot
copy_list="minigraph.xml snmp.yml acl.json config_db.json frr"
if [ -f /tmp/pending_config_migration ]; then
copy_config_files_and_directories $copy_list
PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
cp /usr/share/sonic/device/$PLATFORM/minigraph.xml /etc/sonic/minigraph.xml
sonic-cfggen -H -m /etc/sonic/minigraph.xml -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json
if [ x"${WARM_BOOT}" == x"true" ]; then
echo "Warm reboot detected..."
elif [ "$enabled" = "true" ]; then
Expand All @@ -74,7 +77,9 @@ if [ -f /tmp/pending_config_initialization ]; then
if [ "$enabled" != "true" ]; then
PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
PRESET=(`head -n 1 /usr/share/sonic/device/$PLATFORM/default_sku`)
sonic-cfggen -H -k ${PRESET[0]} --preset ${PRESET[1]} > /etc/sonic/config_db.json
#sonic-cfggen -H -k ${PRESET[0]} --preset ${PRESET[1]} > /etc/sonic/config_db.json
cp /usr/share/sonic/device/$PLATFORM/minigraph.xml /etc/sonic/minigraph.xml
sonic-cfggen -H -m /etc/sonic/minigraph.xml -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json
redis-cli -n $CONFIG_DB_INDEX FLUSHDB
sonic-cfggen -j /etc/sonic/config_db.json --write-to-db
redis-cli -n $CONFIG_DB_INDEX SET "CONFIG_DB_INITIALIZED" "1"
Expand Down