Skip to content

Commit

Permalink
[sonic boot] disable dhcp during boot up, until updategraph service i…
Browse files Browse the repository at this point in the history
…s running (#2316)

* [sonic] disable management port eth0 during boot up

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [updategraph] enable dhcp client on management port eth0

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
  • Loading branch information
yxieca authored Nov 29, 2018
1 parent 43f6df4 commit 84bde15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions files/image_config/interfaces/init_interfaces
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
auto lo
iface lo inet loopback
#
# The management network interface
auto eth0
iface eth0 inet dhcp
# Disable the management network interface during boot up
4 changes: 4 additions & 0 deletions files/image_config/updategraph/updategraph
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ fi
ACL_URL=$acl_src

if [ "$src" = "dhcp" ]; then
# Enable dhcp client on management port eth0
/sbin/dhclient -4 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0 &
disown

while [ ! -f /tmp/dhcp_graph_url ]; do
echo "Waiting for DHCP response..."
sleep 1
Expand Down

0 comments on commit 84bde15

Please sign in to comment.