Use BSD's 'sed' regexp on MacOSX
VirtualBox scripts tested well only with GNU version of the 'sed', but MacOSX systems without custom brew-installed packages contain BSD's version of the sed. This commit fixes regexp to use both versions. Change-Id: I058cac4eb9c2beefffc20ad05a47bc1d8ed2169d Closes-Bug: #1537822
This commit is contained in:
parent
291c8c4319
commit
ddeb2f866a
|
@ -19,7 +19,7 @@
|
||||||
source ./functions/shell.sh
|
source ./functions/shell.sh
|
||||||
|
|
||||||
get_hostonly_interfaces() {
|
get_hostonly_interfaces() {
|
||||||
local ifaces=`execute VBoxManage list hostonlyifs | egrep '^Name' | sed 's/^Name\:\s*//' | uniq | tr "\\n" ","`
|
local ifaces=`execute VBoxManage list hostonlyifs | egrep '^Name' | sed 's/^Name\:[ \t]*//' | uniq | tr "\\n" ","`
|
||||||
echo -e "${ifaces}"
|
echo -e "${ifaces}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ get_fuel_ifaces() {
|
||||||
fuel_networks+="$fuel_network "
|
fuel_networks+="$fuel_network "
|
||||||
done
|
done
|
||||||
for ip in $fuel_networks; do
|
for ip in $fuel_networks; do
|
||||||
fuel_iface=`execute VBoxManage list hostonlyifs | egrep -B3 $ip | egrep '^Name' | sed 's/^Name\:\s*//' | uniq | tr "\\n" ","`
|
fuel_iface=`execute VBoxManage list hostonlyifs | egrep -B3 $ip | egrep '^Name' | sed 's/^Name\:[ \t]*//' | uniq | tr "\\n" ","`
|
||||||
fuel_ifaces+="$fuel_iface"
|
fuel_ifaces+="$fuel_iface"
|
||||||
done
|
done
|
||||||
echo $fuel_ifaces
|
echo $fuel_ifaces
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
source ./functions/shell.sh
|
source ./functions/shell.sh
|
||||||
|
|
||||||
get_vm_base_path() {
|
get_vm_base_path() {
|
||||||
echo `execute VBoxManage list systemproperties | egrep '^Default machine folder' | sed 's/^Default machine folder\:\s*//'`
|
echo `execute VBoxManage list systemproperties | egrep '^Default machine folder' | sed 's/^Default machine folder\:[ \t]*//'`
|
||||||
}
|
}
|
||||||
|
|
||||||
get_vms_running() {
|
get_vms_running() {
|
||||||
|
|
Loading…
Reference in New Issue