diff --git a/scripts/mkvm b/scripts/mkvm index 1477ddd..9f7e463 100755 --- a/scripts/mkvm +++ b/scripts/mkvm @@ -1,19 +1,21 @@ #!/bin/bash -mkvmrelease="v1.3.1" +mkvmrelease="v1.3.2" ovarelease="2023c" ovafogrelease="2024a" #ovafile="$HOME/Téléchargements/debian-bullseye-gsb-${ovarelease}.ova" ovafile="$HOME/Téléchargements/debian-bookworm-gsb-${ovarelease}.ova" ovafilefog="$HOME/Téléchargements/debian-bullseye-gsb-${ovafogrelease}.ova" +startmode=0 deletemode=0 usage () { echo "$0 - version ${mkvmrelease} - Ova version ${ovarelease}" echo "$0 : creation VM et parametrage interfaces" - echo "usage : $0 [-r] " - echo " option -r : efface vm existante avant creation nouvelle" + echo "usage : $0 [-r] [-s] " + echo " option -r : efface VM existante avant creation nouvelle" + echo " option -s : start VM apres creation" exit 1 } @@ -59,6 +61,10 @@ 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 @@ -123,3 +129,6 @@ else echo "$0 : vm ${vm} non prevue " exit 2 fi +if [[ $startmode == 1 ]] ; then + vboxmanage startvm "${vm}"--type headless +fi