Merge pull request #3561 from snir911/stable-2.3-backport-3433

stable-2.3 - kata-deploy: validate conf file can be created
This commit is contained in:
snir911 2022-01-27 19:28:11 +02:00 committed by GitHub
commit 5475d7a7e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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