Merge "labs: add option for VM gui type"
This commit is contained in:
commit
638b898fba
@ -698,7 +698,11 @@ function vbox_boot {
|
||||
local VM=$1
|
||||
|
||||
echo >&2 "Starting VM \"$VM\""
|
||||
$VBM startvm "$VM"
|
||||
if [ -n "${VM_UI:-}" ]; then
|
||||
$VBM startvm "$VM" --type "$VM_UI"
|
||||
else
|
||||
$VBM startvm "$VM"
|
||||
fi
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -56,11 +56,13 @@ function print_config {
|
||||
${OSBASH:+:} echo "no"
|
||||
|
||||
echo "VM access method: $VM_ACCESS"
|
||||
|
||||
echo "GUI type: ${VM_UI:-gui}"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
while getopts :e:fhnw opt; do
|
||||
while getopts :e:fg:hnw opt; do
|
||||
case $opt in
|
||||
e)
|
||||
if [ "$OPTARG" = ova ]; then
|
||||
@ -77,6 +79,15 @@ while getopts :e:fhnw opt; do
|
||||
wbatch_reset
|
||||
unset OSBASH
|
||||
;;
|
||||
g)
|
||||
if [[ "$OPTARG" =~ (headless|gui|sdl) ]]; then
|
||||
VM_UI=$OPTARG
|
||||
else
|
||||
echo "Error: -g argument must be gui (default), sdl, or" \
|
||||
"headless"
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user