Skip to content

Commit

Permalink
[baseimage]: bring down eth0 before restart networking (#1555)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
lguohan authored Apr 2, 2018
1 parent 8572f84 commit 11b0cd9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions files/image_config/interfaces/interfaces-config.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 11b0cd9

Please sign in to comment.