Skip to content

Commit

Permalink
misc: Simplify check for k3s / rke2
Browse files Browse the repository at this point in the history
Let's make it simpler, following the same pattern introduced in the
cleanup function.

Signed-off-by: Fabiano Fidêncio <[email protected]>
  • Loading branch information
fidencio committed Mar 20, 2024
1 parent 5a8dc31 commit 1b21030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc/snapshotter/snapshotter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function main() {
fi

CONTAINER_RUNTIME=$(get_container_runtime)
if [ "${CONTAINER_RUNTIME}" == "k3s" ] || [ "${CONTAINER_RUNTIME}" == "k3s-agent" ] || [ "${CONTAINER_RUNTIME}" == "rke2-agent" ] || [ "${CONTAINER_RUNTIME}" == "rke2-server" ]; then
if [[ " k3s k3s-agent rke2-agent rke2-server " =~ " ${CONTAINER_RUNTIME} " ]]; then
CONTAINER_RUNTIME_CONFIG_TMPL="${CONTAINER_RUNTIME_CONFIG}.tmpl"
if [ ! -f "${CONTAINER_RUNTIME_CONFIG_TMPL}" ]; then
cp "${CONTAINER_RUNTIME_CONFIG}" "${CONTAINER_RUNTIME_CONFIG_TMPL}"
Expand Down

0 comments on commit 1b21030

Please sign in to comment.