Merge pull request #3433 from snir911/fix-kata-deploy-2

kata-deploy: validate conf file can be created
This commit is contained in:
snir911
2022-01-13 15:16:25 +02:00
committed by GitHub

View File

@@ -268,7 +268,8 @@ function main() {
containerd_conf_file_backup="${containerd_conf_file}.bak"
else
# runtime == containerd
if [ ! -f "$containerd_conf_file" ]; then
if [ ! -f "$containerd_conf_file" ] && [ -d $(dirname "$containerd_conf_file") ] && \
[ -x $(command -v containerd) ]; then
containerd config default > "$containerd_conf_file"
fi
fi