Browse Source

Fix mac generate for non-GNU awk.

Default awk in MacOSX has no gensub function.

Closes-Bug: #1517145

Change-Id: I7cda2e0ed6cdc29dc16ef74fd2cab7b8e3d735ea
Ivan Suzdal 3 years ago
parent
commit
7bbe98976d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      actions/slave-nodes-create-and-boot.sh

+ 1
- 1
actions/slave-nodes-create-and-boot.sh View File

@@ -50,7 +50,7 @@ for idx in $(eval echo {1..$cluster_size}); do
50 50
   add_disk_to_vm $name 2 $vm_slave_third_disk_mb
51 51
 
52 52
   #add NIC1 MAC to description
53
-  mac=$(execute VBoxManage showvminfo $name |awk -F ': ' '$1~/NIC 1/ {mac=gensub(/^.+ MAC: ([0-9A-F]{12}).+$/,"\\1","g",$0);print mac}')
53
+  mac=$(execute VBoxManage showvminfo $name --machinereadable |awk -F '=' '{ if ($1 == "macaddress1") print $2}')
54 54
   execute VBoxManage modifyvm $name --description $mac
55 55
 
56 56
   #add RDP connection

Loading…
Cancel
Save