From 4a0dbc6c06537c8b72a1bba1494296b970476b55 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 23 Jan 2024 03:22:40 +0100 Subject: [PATCH] fix: Shared memory path (#378) --- src/boot.sh | 6 +++--- src/config.sh | 6 ++++-- src/reset.sh | 6 +++--- web/nginx.conf | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/boot.sh b/src/boot.sh index 5d8b5dc..2272710 100644 --- a/src/boot.sh +++ b/src/boot.sh @@ -60,9 +60,9 @@ if [[ "${BOOT_MODE,,}" != "legacy" ]]; then if [[ "$TPM" == [Yy1]* ]]; then - mkdir -p /dev/shm/tpm - chmod 755 /dev/shm/tpm - swtpm socket -t -d --tpmstate dir=/dev/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --tpm2 + mkdir -p /run/shm/tpm + chmod 755 /run/shm/tpm + swtpm socket -t -d --tpmstate dir=/run/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --tpm2 for (( i = 1; i < 50; i++ )); do diff --git a/src/config.sh b/src/config.sh index fee92d1..8778de0 100644 --- a/src/config.sh +++ b/src/config.sh @@ -16,8 +16,10 @@ ARGS="$DEF_OPTS $CPU_OPTS $RAM_OPTS $MAC_OPTS $DISPLAY_OPTS $MON_OPTS $SERIAL_OP ARGS=$(echo "$ARGS" | sed 's/\t/ /g' | tr -s ' ') if [[ "${DISPLAY,,}" == "web" ]]; then - rm -f /dev/shm/msg.html - rm -f /dev/shm/index.html + [ ! -f "$INFO" ] && error "File $INFO not found?!" + rm -f "$INFO" + [ ! -f "$PAGE" ] && error "File $PAGE not found?!" + rm -f "$PAGE" else if [[ "${DISPLAY,,}" == "vnc" ]]; then html "You can now connect to VNC on port 5900." "0" diff --git a/src/reset.sh b/src/reset.sh index dffab4d..97b6281 100644 --- a/src/reset.sh +++ b/src/reset.sh @@ -28,8 +28,8 @@ echo # Helper variables STORAGE="/storage" -INFO="/dev/shm/msg.html" -PAGE="/dev/shm/index.html" +INFO="/run/shm/msg.html" +PAGE="/run/shm/index.html" TEMPLATE="/var/www/index.html" FOOTER1="$APP for Docker v$(