[baseimage]: bring down eth0 before restart networking (#1555)
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>
This commit is contained in:
parent
8572f84ea0
commit
11b0cd93e8
@ -1,5 +1,7 @@
|
||||
#!/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
|
||||
|
Loading…
Reference in New Issue
Block a user