File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ COPY --chmod=755 ./lib /egg-hytale/lib
5050RUN sed -i 's/\r $//' /egg-hytale/lib/*.sh
5151
5252# Create dmidecode shim for Docker usage
53- RUN echo "Creating local dmidecode for Docker usage." && printf '#!/bin/sh\n if [ "$1" = "-s" ] && [ "$2" = "system-uuid" ]; then\n UUID_FILE="$HOME/.hytale_system_uuid"\n\n if [ -f "$UUID_FILE" ]; then\n cat "$UUID_FILE"\n else\n if command -v uuidgen >/dev/null 2>&1; then\n uuidgen | tr "A-Z" "a-z" | tee "$UUID_FILE" >/dev/null\n else\n cat /proc/sys/kernel/random/uuid | tee "$UUID_FILE" >/dev/null\n fi\n cat "$UUID_FILE"\n fi\n\n printf "\\ n"\n exit 0\n fi\n\n echo "dmidecode shim: unsupported args: $*" >&2\n exit 1\n ' > /usr/local/bin/dmidecode && chmod +x /usr/local/bin/dmidecode
53+ COPY --chmod=755 ./lib/dmidecode /usr/local/bin/dmidecode
54+ RUN sed -i 's/\r $//' /usr/local/bin/dmidecode
5455
5556RUN sed -i 's/\r $//' /entrypoint.sh
5657
Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ if [ -n "$OVERRIDE_SESSION_TOKEN" ] && [ -n "$OVERRIDE_IDENTITY_TOKEN" ]; then
5959 SESSION_TOKEN=" $OVERRIDE_SESSION_TOKEN "
6060 IDENTITY_TOKEN=" $OVERRIDE_IDENTITY_TOKEN "
6161else
62+ # Default to persistent authentication if not specified, this is needed for backwards combability
63+ if [ -z " $USE_PERSISTENT_AUTHENTICATION " ]; then
64+ USE_PERSISTENT_AUTHENTICATION=" ENABLED"
65+ fi
66+
6267 if [ " $USE_PERSISTENT_AUTHENTICATION " = " ENABLED" ]; then
6368 # Standard mode: perform authentication
6469 if check_cached_tokens && load_cached_tokens; then
Original file line number Diff line number Diff line change 1+
2+
3+ #!/bin/sh
4+ echo "Creating local dmidecode for Docker usage."
5+ if [ "$1" = "-s" ] && [ "$2" = "system-uuid" ]; then
6+ UUID_FILE="$HOME/.hytale_system_uuid"
7+
8+ if [ -f "$UUID_FILE" ]; then
9+ cat "$UUID_FILE"
10+ else
11+ if command -v uuidgen >/dev/null 2>&1; then
12+ uuidgen | tr "A-Z" "a-z" | tee "$UUID_FILE" >/dev/null
13+ else
14+ cat /proc/sys/kernel/random/uuid | tee "$UUID_FILE" >/dev/null
15+ fi
16+ cat "$UUID_FILE"
17+ fi
18+
19+ printf "\n"
20+ exit 0
21+ fi
22+
23+ echo "dmidecode shim: unsupported args: $*" >&2
24+ exit 1
You can’t perform that action at this time.
0 commit comments