Don't use Sed's GNU extension to support MacOSX

This change removes using the Sed's GNU extensions to support BSD-Sed
in MacOSX, also moves one of them (lowercase) to the tr command.

Change-Id: I5afef3fc562443e7089b72e645b725b86781c54c
Closes-Bug: #1600793
Signed-off-by: Maksim Malchuk <mmalchuk@mirantis.com>
This commit is contained in:
Maksim Malchuk 2016-07-11 15:17:23 +03:00
parent 1f356e5b1b
commit 984547cc1f
1 changed files with 5 additions and 1 deletions

View File

@ -23,6 +23,10 @@
source ./config.sh
source ./functions/vm.sh
source ./functions/network.sh
source ./functions/shell.sh
# Add VirtualBox directory to PATH
add_virtualbox_path
# Get variables "host_nic_name" for the slave node
get_fuel_name_ifaces
@ -74,7 +78,7 @@ execute VBoxManage modifyvm $name --uart1 0x03f8 4 --uartmode1 disconnected
# Add NIC1 MAC to description
mac=$(execute VBoxManage showvminfo $name --machinereadable | grep '^macaddress1=' | cut -d'"' -f2)
if [ -n "${mac}" ]; then
mac_address=$(echo $mac | sed 's/..\B/&:/g;s/./\L&/g')
mac_address=$(echo $mac | sed 's/.\{2\}/&:/g;s/:$//' | tr '[:upper:]' '[:lower:]')
execute VBoxManage modifyvm $name --description "${mac}"
fi