From d79338373f2706485e5e8f14d80af08bfad9f208 Mon Sep 17 00:00:00 2001 From: CNlukai Date: Sat, 30 Jan 2016 11:34:27 +0800 Subject: Update the method to get external nic mac address JIRA: COMPASS-295 Change-Id: Ifc72424d2627f444ec52d2875a5252f9fd898c8a Signed-off-by: CNlukai Signed-off-by: Justin-chi (cherry picked from commit ab495546af8ba0fe9ea1234e4f25a7e62ed92191) --- deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml index 9761af71..47f0f6e8 100755 --- a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml +++ b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml @@ -48,7 +48,7 @@ - name: set veth to ovs shell: > - export externamMac=`ifconfig eth1 | grep "HWaddr" | awk '{print $5}'`; + export externamMac=`ifconfig eth1 | grep -Eo '\<[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'`; ifconfig onos_port2 hw ether $externamMac; ovs-vsctl add-port br-prv onos_port1; ignore_errors: True -- cgit 1.2.3-korg