Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

201811 cel dev for openbmc #176

Merged
merged 5 commits into from
May 18, 2020
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
2 changes: 1 addition & 1 deletion files/image_config/interfaces/interfaces.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ iface eth0 {{ 'inet' if prefix | ipv4 else 'inet6' }} static
{# TODO: COPP policy type rules #}
{% endfor %}
{% else %}
iface eth0 inet static
iface eth0 inet manual
{% endif %}
#
{% endblock mgmt_interface %}
26 changes: 26 additions & 0 deletions files/image_config/platform/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,33 @@ 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"
if [ -f $CLEAN_OS_FILE ]; then
echo "clean up os"
sonic_installer cleanup -y
rm -f $CLEAN_OS_FILE
fi

decode-syseeprom --init

#diag install
if [ ! -d /usr/local/CPU_Diag ];then
echo "Diag install"
diag_install > /var/log/diagInstallLog &
fi
}

firsttime_exit() {
rm -rf $FIRST_BOOT_FILE
boot_action
exit 0
}

Expand Down Expand Up @@ -354,4 +379,5 @@ if [ -f $FIRST_BOOT_FILE ]; then
firsttime_exit
fi

boot_action
exit 0
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