From 739e679a66f1113a3d3ac73187863004e442f9a3 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 23 Jan 2024 03:04:47 +0100 Subject: [PATCH] feat: Check for SHM (#590) --- src/reset.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/reset.sh b/src/reset.sh index 2b223a3..7f5d713 100644 --- a/src/reset.sh +++ b/src/reset.sh @@ -40,20 +40,20 @@ MINOR=$(uname -r | cut -d '.' -f2) ARCH=$(dpkg --print-architecture) VERS=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1) +# Check system + +if [ ! -d "/dev/shm" ]; then + error "Directory /dev/shm not found!" && exit 14 +else + [ ! -d "/run/shm" ] && ln -s /dev/shm /run/shm +fi + # Check folder if [ ! -d "$STORAGE" ]; then error "Storage folder ($STORAGE) not found!" && exit 13 fi -if [ ! -d "/run/shm" ]; then - if [ -d "/dev/shm" ]; then - ln -s /dev/shm /run/shm - else - error "Folder /dev/shm not found!" && exit 14 - fi -fi - # Cleanup files rm -f /run/shm/qemu.* rm -f /run/shm/dsm.url