mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
kata-deploy: Avoid failing on content removal
We can simply use `rm -f` all over the place and avoid the container returning any error. Fixes: #7733 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
b8990c0490
commit
5cba38c175
@ -167,7 +167,7 @@ function backup_shim() {
|
|||||||
if [ ! -f "${shim_backup}" ]; then
|
if [ ! -f "${shim_backup}" ]; then
|
||||||
mv "${shim_file}" "${shim_backup}"
|
mv "${shim_file}" "${shim_backup}"
|
||||||
else
|
else
|
||||||
rm "${shim_file}"
|
rm -f "${shim_file}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -222,12 +222,12 @@ function cleanup_different_shims_base() {
|
|||||||
local shim_binary="containerd-shim-kata-${shim}-v2"
|
local shim_binary="containerd-shim-kata-${shim}-v2"
|
||||||
local shim_file="/usr/local/bin/${shim_binary}"
|
local shim_file="/usr/local/bin/${shim_binary}"
|
||||||
|
|
||||||
rm "${shim_file}" || true
|
rm -f "${shim_file}"
|
||||||
|
|
||||||
restore_shim "${shim_file}"
|
restore_shim "${shim_file}"
|
||||||
done
|
done
|
||||||
|
|
||||||
rm "${default_shim_file}" || true
|
rm -f "${default_shim_file}"
|
||||||
restore_shim "${default_shim_file}"
|
restore_shim "${default_shim_file}"
|
||||||
|
|
||||||
if [[ "${CREATE_RUNTIMECLASSES}" == "true" ]]; then
|
if [[ "${CREATE_RUNTIMECLASSES}" == "true" ]]; then
|
||||||
@ -375,9 +375,9 @@ function cleanup_cri_runtime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup_crio() {
|
function cleanup_crio() {
|
||||||
rm $crio_drop_in_conf_file
|
rm -f $crio_drop_in_conf_file
|
||||||
if [[ "${DEBUG}" == "true" ]]; then
|
if [[ "${DEBUG}" == "true" ]]; then
|
||||||
rm $crio_drop_in_conf_file_debug
|
rm -f $crio_drop_in_conf_file_debug
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user