From 35c08c0381d12a4683681faa43452615c888c04d Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 14 Aug 2023 12:00:48 +0200 Subject: [PATCH 1/2] add check for timezone Signed-off-by: Simon L --- Containers/mastercontainer/start.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index e48a24cae97..5c252aa0880 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -253,6 +253,18 @@ if [ "$?" = 6 ]; then exit 1 fi +# Check that no changes have been made to timezone settings since AIO only supports running in UTC timezone +if [ -n "$TZ" ]; then + print_red "The environmental variable TZ has been set which is not supported by AIO since it only supports running in the default UTC timezone!" + exit 1 +elif mountpoint -q /etc/localtime; then + print_red "/etc/localtime has been mounted into the container which is not allowed because AIO only supports running in the default UTC timezone!" + exit 1 +elif mountpoint -q /etc/timezone; then + print_red "/etc/timezone has been mounted into the container which is not allowed because AIO only supports running in the default UTC timezone!" + exit 1 +fi + # Add important folders mkdir -p /mnt/docker-aio-config/data/ mkdir -p /mnt/docker-aio-config/session/ From 7f37fd70603ce9d3990fd042f915014a83cdbc83 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 14 Aug 2023 12:40:49 +0200 Subject: [PATCH 2/2] add hint how the correct timezone can be set Signed-off-by: Simon L --- Containers/mastercontainer/start.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index 5c252aa0880..2e132479f84 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -256,12 +256,15 @@ fi # Check that no changes have been made to timezone settings since AIO only supports running in UTC timezone if [ -n "$TZ" ]; then print_red "The environmental variable TZ has been set which is not supported by AIO since it only supports running in the default UTC timezone!" + echo "The correct timezone can be set in the AIO interface later on!" exit 1 elif mountpoint -q /etc/localtime; then print_red "/etc/localtime has been mounted into the container which is not allowed because AIO only supports running in the default UTC timezone!" + echo "The correct timezone can be set in the AIO interface later on!" exit 1 elif mountpoint -q /etc/timezone; then print_red "/etc/timezone has been mounted into the container which is not allowed because AIO only supports running in the default UTC timezone!" + echo "The correct timezone can be set in the AIO interface later on!" exit 1 fi