11b0cd93e8
cfggen generates new eth0 configuration. Need to first clean existing configuration on eth0 before bring up new configuration on eth0. Thus, we need to first bring down eth0 before putting new configuration into /etc/network/ interfaces Signed-off-by: Guohan Lu <gulv@microsoft.com>
12 lines
276 B
Bash
Executable File
12 lines
276 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ifdown eth0
|
|
|
|
sonic-cfggen -d -t /usr/share/sonic/templates/interfaces.j2 > /etc/network/interfaces
|
|
|
|
[ -f /var/run/dhclient.eth0.pid ] && kill `cat /var/run/dhclient.eth0.pid` && rm -f /var/run/dhclient.eth0.pid
|
|
|
|
systemctl restart networking
|
|
|
|
ifdown lo && ifup lo
|