From 3ccba6fe0b99115612a56a3e9308713a01f7a5f9 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 1 Feb 2024 10:40:42 +0100 Subject: [config-tgz] Write config download time to dedicated file --- modules.d/conf-tgz/hooks/s3-fetch-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.d/conf-tgz/hooks/s3-fetch-config.sh b/modules.d/conf-tgz/hooks/s3-fetch-config.sh index 021a4c06..67ee26c1 100755 --- a/modules.d/conf-tgz/hooks/s3-fetch-config.sh +++ b/modules.d/conf-tgz/hooks/s3-fetch-config.sh @@ -37,6 +37,7 @@ config_path="/etc/openslx.tmp" echo "Downloading '$config_url'..." slx-tools download_retry --slx-time 20 -sS "$config_url" > "$config_path" return_code="$?" +sed -r 's/^([0-9]+)\.([0-9][0-9]).*$/\1\2/' /proc/uptime > /tmp/config-download-time if [ ! -s "$config_path" ] ; then emergency_shell "Downloading netboot configuration file from '$config_url' failed with: $return_code" @@ -51,7 +52,6 @@ fi echo "SLX_KCL_SERVERS='$slx_server'" echo "SLX_BASE_PATH='$slx_server_base'" echo "# Config fetched from $config_url" - echo "CONFIG_DOWNLOAD_TIME=$(sed -r 's/^([0-9]+)\.([0-9]+).*$/\1\2/' /proc/uptime)" echo '#_RCONFIG_TAG' } > /etc/openslx -- cgit v1.2.3-55-g7522