mirror of
https://github.com/NATroutter/egg-hytale.git
synced 2026-03-01 11:21:13 +03:00
Moved dmidecode script from Dockerfile to own file
This commit is contained in:
24
lib/dmidecode
Normal file
24
lib/dmidecode
Normal 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
|
||||
Reference in New Issue
Block a user