feat: Check for SHM (#590)

This commit is contained in:
Kroese 2024-01-23 03:04:47 +01:00 committed by GitHub
parent 0dea507d85
commit 739e679a66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,20 +40,20 @@ MINOR=$(uname -r | cut -d '.' -f2)
ARCH=$(dpkg --print-architecture) ARCH=$(dpkg --print-architecture)
VERS=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1) 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 # Check folder
if [ ! -d "$STORAGE" ]; then if [ ! -d "$STORAGE" ]; then
error "Storage folder ($STORAGE) not found!" && exit 13 error "Storage folder ($STORAGE) not found!" && exit 13
fi 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 # Cleanup files
rm -f /run/shm/qemu.* rm -f /run/shm/qemu.*
rm -f /run/shm/dsm.url rm -f /run/shm/dsm.url