mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-08-29 12:17:07 +00:00
fix: Sanitize config variables (#1390)
This commit is contained in:
+8
-1
@@ -6,6 +6,14 @@ set -Eeuo pipefail
|
||||
: "${UUID:=""}"
|
||||
: "${MONITOR:=""}"
|
||||
|
||||
msg="Configuring QEMU..."
|
||||
enabled "$DEBUG" && echo "$msg"
|
||||
|
||||
# Sanitize variables
|
||||
QMP=$(strip "$QMP")
|
||||
UUID=$(strip "$UUID")
|
||||
MONITOR=$(strip "$MONITOR")
|
||||
|
||||
configureProcessor() {
|
||||
|
||||
# Expose one thread per core in a single socket; DSM licensing and topology
|
||||
@@ -47,7 +55,6 @@ configureMachine() {
|
||||
MAC_OPTS="-machine type=$MACHINE,smm=$smm,usb=off"
|
||||
MAC_OPTS+=",vmport=off,dump-guest-core=off,hpet=off${KVM_OPTS}"
|
||||
|
||||
UUID=$(strip "$UUID")
|
||||
[ -n "$UUID" ] && ID_OPTS+=" -uuid $UUID"
|
||||
[ -n "${SM_BIOS:-}" ] && ID_OPTS+=" $SM_BIOS"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user