From 49f27995ce2688205773165001ae941026af5742 Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:47:38 +0100 Subject: [PATCH] packages/kata-debug-shell: fix templating bash doesn't perform expansion in variables, thus the `*` in `config_file` wasn't expanded correctly (i.e. at all). Go back to the `ls -1` approach, which fixes that. Also, don't template the config path into another path, which is redundant and fails, as it's an absolute path already. --- packages/kata-debug-shell.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kata-debug-shell.sh b/packages/kata-debug-shell.sh index 86acbffd4..73ef2d72e 100644 --- a/packages/kata-debug-shell.sh +++ b/packages/kata-debug-shell.sh @@ -20,6 +20,6 @@ sbx_id=$(echo "$container_info" | jq -r '.Spec.annotations."io.kubernetes.cri.sa runtime_class_name=$(echo "$container_info" | jq -r '.Snapshotter' | cut -c7-) kata_runtime="/opt/edgeless/${runtime_class_name}/bin/kata-runtime" -config_file=/opt/edgeless/${runtime_class_name}/etc/configuration-*.toml +config_file=$(ls -1 /opt/edgeless/${runtime_class_name}/etc/configuration-*.toml) -${kata_runtime} --config "/opt/edgeless/${runtime_class_name}/etc/${config_file}" exec ${sbx_id} +${kata_runtime} --config "${config_file}" exec ${sbx_id}