virtualbox scripts translates "\r" in VM basepath

Prevents interpretation of backslashes in output of functions
get_vm_base_path(), get_vms_running(), get_vms_present() in
functions/vm.sh.

Closes-bug: #1334070
Change-Id: I74986537e3afbae05b146d2c8c2e2262684d308e
This commit is contained in:
Vasiliy Pleshakov 2014-06-25 13:26:40 -07:00
parent b6b9981710
commit aa0e11b667

View File

@ -17,15 +17,15 @@
# This file contains the functions to manage VMs in through VirtualBox CLI # This file contains the functions to manage VMs in through VirtualBox CLI
get_vm_base_path() { get_vm_base_path() {
echo -e `VBoxManage list systemproperties | grep '^Default machine folder' | sed 's/^Default machine folder\:[ \t]*//'` echo `VBoxManage list systemproperties | grep '^Default machine folder' | sed 's/^Default machine folder\:[ \t]*//'`
} }
get_vms_running() { get_vms_running() {
echo -e `VBoxManage list runningvms | sed 's/[ \t]*{.*}//' | sed 's/^"//' | sed 's/"$//'` echo `VBoxManage list runningvms | sed 's/[ \t]*{.*}//' | sed 's/^"//' | sed 's/"$//'`
} }
get_vms_present() { get_vms_present() {
echo -e `VBoxManage list vms | sed 's/[ \t]*{.*}//' | sed 's/^"//' | sed 's/"$//'` echo `VBoxManage list vms | sed 's/[ \t]*{.*}//' | sed 's/^"//' | sed 's/"$//'`
} }
is_vm_running() { is_vm_running() {