The path for the persistent VMs was incorrectly not always set

This commit is contained in:
Raphael Dannecker 2024-11-27 18:29:39 +01:00
parent 9ab774ef24
commit 3ff31771f7

View file

@ -165,6 +165,7 @@ EOF
sleep 5 sleep 5
else else
PERSISTENT=0; PERSISTENT=0;
VM_DIR="${VM_DIR_CONF}"
echo "Die VM ${VM_NAME} wird nicht persistent gestartet!" echo "Die VM ${VM_NAME} wird nicht persistent gestartet!"
sleep 5 sleep 5
fi fi
@ -181,6 +182,7 @@ GUEST_UID=0
GUEST_GID=0 GUEST_GID=0
source /etc/lmn/vm.conf source /etc/lmn/vm.conf
VM_DIR_CONF="${VM_DIR}"
TEMP=$(getopt -o no:ps --long new,no-viewer,options:,persistent,system,memory:,data-disk:,heads:,cpu:,bridge:,macvtap,os:,uid:,gid:,help -n $0 -- "$@") TEMP=$(getopt -o no:ps --long new,no-viewer,options:,persistent,system,memory:,data-disk:,heads:,cpu:,bridge:,macvtap,os:,uid:,gid:,help -n $0 -- "$@")
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
@ -191,6 +193,7 @@ while true; do
case "$1" in case "$1" in
-p | --persistent ) -p | --persistent )
PERSISTENT=1; PERSISTENT=1;
VM_DIR="${VM_DIR_PERSISTENT}"
shift shift
;; ;;
-n | --new ) -n | --new )