Skip to content

Commit

Permalink
[configdb]: Store switch mac to configDB switch table (#1108)
Browse files Browse the repository at this point in the history
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
  • Loading branch information
jipanyang authored and lguohan committed Nov 5, 2017
1 parent c17d6a7 commit 84cbfd5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/image_config/interfaces/interfaces-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ fi

sonic-cfggen -d -a '{"hwaddr":"'$SYSTEM_MAC_ADDRESS'"}' -t /usr/share/sonic/templates/interfaces.j2 > /etc/network/interfaces

# Also store the system mac to configDB switch table. User configured switch_mac is not supported for now.
/usr/bin/docker exec database redis-cli -n 4 hset SWITCH\|SWITCH_ATTR switch_mac $SYSTEM_MAC_ADDRESS

[ -f /var/run/dhclient.eth0.pid ] && kill `cat /var/run/dhclient.eth0.pid` && rm -f /var/run/dhclient.eth0.pid

systemctl restart networking
Expand Down

0 comments on commit 84cbfd5

Please sign in to comment.