Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
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
11 changes: 11 additions & 0 deletions files/image_config/interfaces/interfaces-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ ifdown --force eth0

sonic-cfggen -d -t /usr/share/sonic/templates/interfaces.j2 > /etc/network/interfaces

# Add usb0 interface for bfn platforms
platform=$(sonic-cfggen -H -v 'DEVICE_METADATA["localhost"]["platform"]')
if [[ "$platform" == "x86_64-accton_wedge100bf_32x-r0" || "$platform" == "x86_64-accton_wedge100bf_65x-r0" ]]; then
cat <<'EOF' >> /etc/network/interfaces
# BMC interface
auto usb0
iface usb0 inet6 auto
up ifconfig usb0 txqueuelen 64
EOF
fi

[ -f /var/run/dhclient.eth0.pid ] && kill `cat /var/run/dhclient.eth0.pid` && rm -f /var/run/dhclient.eth0.pid

systemctl restart networking
Expand Down
4 changes: 0 additions & 4 deletions files/image_config/interfaces/interfaces.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ iface lo {{ 'inet' if prefix | ipv4 else 'inet6' }} static
{% endfor %}
{% endblock loopback %}
{% block mgmt_interface %}
# BMC interface
auto usb0
iface usb0 inet6 auto
up ifconfig usb0 txqueuelen 64

# The management network interface
auto eth0
Expand Down
4 changes: 0 additions & 4 deletions src/sonic-config-engine/tests/sample_output/interfaces
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ iface lo inet static
address 10.10.0.99
netmask 255.255.255.255
#
# BMC interface
auto usb0
iface usb0 inet6 auto
up ifconfig usb0 txqueuelen 64

# The management network interface
auto eth0
Expand Down