summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-02-01 10:40:42 +0100
committerSimon Rettberg2024-02-01 10:40:42 +0100
commit3ccba6fe0b99115612a56a3e9308713a01f7a5f9 (patch)
treed52f2abc3b7be3da1708b0aef923c04ca7360fed
parentLink all services in initrd.target.wants (diff)
downloadsystemd-init-3ccba6fe0b99115612a56a3e9308713a01f7a5f9.tar.gz
systemd-init-3ccba6fe0b99115612a56a3e9308713a01f7a5f9.tar.xz
systemd-init-3ccba6fe0b99115612a56a3e9308713a01f7a5f9.zip
[config-tgz] Write config download time to dedicated file
-rwxr-xr-xmodules.d/conf-tgz/hooks/s3-fetch-config.sh2
1 files changed, 1 insertions, 1 deletions
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