Moved dmidecode script from Dockerfile to own file

This commit is contained in:
NATroutter
2026-01-22 20:06:13 +02:00
parent c53ed4f620
commit e9eb3ea78a
3 changed files with 31 additions and 1 deletions

24
lib/dmidecode Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
echo "Creating local dmidecode for Docker usage."
if [ "$1" = "-s" ] && [ "$2" = "system-uuid" ]; then
UUID_FILE="$HOME/.hytale_system_uuid"
if [ -f "$UUID_FILE" ]; then
cat "$UUID_FILE"
else
if command -v uuidgen >/dev/null 2>&1; then
uuidgen | tr "A-Z" "a-z" | tee "$UUID_FILE" >/dev/null
else
cat /proc/sys/kernel/random/uuid | tee "$UUID_FILE" >/dev/null
fi
cat "$UUID_FILE"
fi
printf "\n"
exit 0
fi
echo "dmidecode shim: unsupported args: $*" >&2
exit 1