summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Malchuk <mmalchuk@mirantis.com>2016-07-11 15:17:23 +0300
committerMaksim Malchuk <mmalchuk@mirantis.com>2016-07-12 11:50:10 +0300
commit984547cc1f9b5b622d496e07c5df343667f15fba (patch)
tree5bc3a66a3d397abadb6e53f670398efa88f371a5
parent1f356e5b1b70d43b7c886883689a68fe9bc73ad0 (diff)
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>
Notes
Notes (review): Code-Review+1: Serhii Ovsianikov <sovsianikov@mirantis.com> Code-Review+2: Maksim Malchuk <mmalchuk@mirantis.com> Workflow+1: Maksim Malchuk <mmalchuk@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 12 Jul 2016 09:39:22 +0000 Reviewed-on: https://review.openstack.org/340348 Project: openstack/fuel-virtualbox Branch: refs/heads/master
-rwxr-xr-xcontrib/add-slave/add-slave-node-and-boot.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/add-slave/add-slave-node-and-boot.sh b/contrib/add-slave/add-slave-node-and-boot.sh
index cb8bdc0..28587e8 100755
--- a/contrib/add-slave/add-slave-node-and-boot.sh
+++ b/contrib/add-slave/add-slave-node-and-boot.sh
@@ -23,6 +23,10 @@
23source ./config.sh 23source ./config.sh
24source ./functions/vm.sh 24source ./functions/vm.sh
25source ./functions/network.sh 25source ./functions/network.sh
26source ./functions/shell.sh
27
28# Add VirtualBox directory to PATH
29add_virtualbox_path
26 30
27# Get variables "host_nic_name" for the slave node 31# Get variables "host_nic_name" for the slave node
28get_fuel_name_ifaces 32get_fuel_name_ifaces
@@ -74,7 +78,7 @@ execute VBoxManage modifyvm $name --uart1 0x03f8 4 --uartmode1 disconnected
74# Add NIC1 MAC to description 78# Add NIC1 MAC to description
75mac=$(execute VBoxManage showvminfo $name --machinereadable | grep '^macaddress1=' | cut -d'"' -f2) 79mac=$(execute VBoxManage showvminfo $name --machinereadable | grep '^macaddress1=' | cut -d'"' -f2)
76if [ -n "${mac}" ]; then 80if [ -n "${mac}" ]; then
77 mac_address=$(echo $mac | sed 's/..\B/&:/g;s/./\L&/g') 81 mac_address=$(echo $mac | sed 's/.\{2\}/&:/g;s/:$//' | tr '[:upper:]' '[:lower:]')
78 execute VBoxManage modifyvm $name --description "${mac}" 82 execute VBoxManage modifyvm $name --description "${mac}"
79fi 83fi
80 84