mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-09-01 21:56:56 +00:00
feat: Sanitize environment variables (#1192)
This commit is contained in:
@@ -8,6 +8,11 @@ set -Eeuo pipefail
|
||||
: "${DISPLAY:="none"}" # Display type
|
||||
: "${RENDERNODE:="/dev/dri/renderD128"}" # Render node
|
||||
|
||||
# Sanitize variables
|
||||
VGA=$(strip "$VGA")
|
||||
DISPLAY=$(strip "$DISPLAY")
|
||||
RENDERNODE=$(strip "$RENDERNODE")
|
||||
|
||||
CPU_VENDOR=$(lscpu | awk '/Vendor ID/{print $3}')
|
||||
|
||||
if ! enabled "$GPU" || [[ "$CPU_VENDOR" != "GenuineIntel" || "$ARCH" != "amd64" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user