diff options
author | Manuel Bentele | 2021-07-05 13:05:10 +0200 |
---|---|---|
committer | Manuel Bentele | 2021-07-05 13:05:10 +0200 |
commit | f74a7b719242642e8e822df16da3829b421117f7 (patch) | |
tree | cf5a0cdf9bda23ad4daf4f832bc1d1eed688b852 /core/modules/qemu/data | |
parent | Merge branch 'master' into installer (diff) | |
parent | [qemu] Add user to 'dialout' group for serial/parport access (diff) | |
download | mltk-f74a7b719242642e8e822df16da3829b421117f7.tar.gz mltk-f74a7b719242642e8e822df16da3829b421117f7.tar.xz mltk-f74a7b719242642e8e822df16da3829b421117f7.zip |
Merge branch 'master' into installer
Diffstat (limited to 'core/modules/qemu/data')
-rw-r--r-- | core/modules/qemu/data/opt/openslx/pam/hooks/auth-final-exec.d/40-add-to-dialout.sh | 5 | ||||
-rw-r--r-- | core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/core/modules/qemu/data/opt/openslx/pam/hooks/auth-final-exec.d/40-add-to-dialout.sh b/core/modules/qemu/data/opt/openslx/pam/hooks/auth-final-exec.d/40-add-to-dialout.sh new file mode 100644 index 00000000..752344a2 --- /dev/null +++ b/core/modules/qemu/data/opt/openslx/pam/hooks/auth-final-exec.d/40-add-to-dialout.sh @@ -0,0 +1,5 @@ +#!/bin/ash + +adduser "${PAM_USER}" "dialout" + +exit 0 diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include index c3dfd21d..04dca832 100644 --- a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include +++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include @@ -35,8 +35,10 @@ run_plugin() { vm_diskfile="${VM_DISKFILE_RW}" fi - # write finalized config to temporary folder for debugging purposes - local vm_final_run_file="/tmp/qemu-last-config.xml" + # write finalized config in debug mode to temporary folder for debugging purposes + if [ "${DEBUG}" = "true" ]; then + local vm_final_config="/tmp/qemu-last-config.xml" + fi # call the Libvirt Java tool to finalize configuration and start VM declare -rg VIRTCMD="java" @@ -47,7 +49,7 @@ run_plugin() { notempty VM_DISPLAYNAME && VIRTCMDOPTS+=( "-vmdsplname" "${VM_DISPLAYNAME}" ) notempty VM_OS_TYPE && VIRTCMDOPTS+=( "-vmos" "${VM_OS_TYPE}" ) notempty TMPCONFIG && VIRTCMDOPTS+=( "-vmcfginp" "${TMPCONFIG}" ) - notempty vm_final_run_file && VIRTCMDOPTS+=( "-vmcfgout" "${vm_final_run_file}" ) + notempty vm_final_config && VIRTCMDOPTS+=( "-vmcfgout" "${vm_final_config}" ) notempty IMGUUID && VIRTCMDOPTS+=( "-vmuuid" "${IMGUUID}" ) notempty HW_CORES && VIRTCMDOPTS+=( "-vmncpus" "${HW_CORES}" ) notempty VM_MEM && VIRTCMDOPTS+=( "-vmmem" "${VM_MEM}" ) |