mkvm options

This commit is contained in:
phil 2024-01-15 00:02:43 +01:00
parent beca7dbdcc
commit c03c066d41

@ -61,16 +61,19 @@ fi
if [[ $1 == "--help" ]] || [[ $1 == "-h" ]] || [[ $1 == "-V" ]] ; then
usage
fi
if [[ $1 == "-s" ]] ; then
startmode=1
shift
fi
if [[ $1 == "-r" ]] ; then
deletemode=1
shift
fi
vm="$1"
while [[ -n "$1" ]] ; do
if [[ "$1" == "-s" ]] ; then
startmode=1
shift
elif [[ "$1" == "-r" ]] ; then
deletemode=1
shift
else
parm=$1
shift
fi
done
vm="${parm}"
create_vm "${vm}"
if [[ "${vm}" == "s-adm" ]] ; then
bash addint.s-adm
@ -130,5 +133,5 @@ else
exit 2
fi
if [[ $startmode == 1 ]] ; then
vboxmanage startvm "${vm}"--type headless
vboxmanage startvm "${vm}" --type headless
fi