sonic-buildimage/files/image_config/interfaces/interfaces-config.sh
Taoyu Li ea372cc7c1 Add get_graph service to fetch minigraph automatically (#288)
- Add a functionality to get SNMP community from DHCP (option 224)
- Add a functionality to get minigraph from http service instead of using default minigraph
  - The url for graph service is passed through DHCP option 225
  - This feature is by default disabled. Modify rule/config to enable it on build time, or modify /etc/sonic/graph_service_url on run time.
- Fix a bug that getting hostname from DHCP is not working correctly
2017-02-17 13:47:01 -08:00

9 lines
416 B
Bash
Executable File

#!/bin/bash
sonic-cfggen -m /etc/sonic/minigraph.xml -t /etc/sonic/templates/interfaces.j2 >/etc/network/interfaces
sonic-cfggen -m /etc/sonic/minigraph.xml -t /etc/sonic/templates/vlan_interfaces.j2 >/etc/network/interfaces.d/vlan_interfaces
sonic-cfggen -m /etc/sonic/minigraph.xml -t /etc/sonic/templates/lag_interfaces.j2 >/etc/network/interfaces.d/lag_interfaces
ifdown eth0 && ifup eth0
ifdown lo && ifup lo