Skip to content

Commit

Permalink
packages/kata-debug-shell: fix templating
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
msanft committed Nov 25, 2024
1 parent bd76f97 commit f6be8f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/kata-debug-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit f6be8f3

Please sign in to comment.