mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 06:48:51 +00:00
kata-deploy: Fix unbound VERSION_ID
VERSION_ID is not guaranteed to be specified in os-release, this makes kaka-deploy breaks in rolling distros like arch linux and void linux. Note that operating system vendors may choose not to provide version information, for example to accommodate for rolling releases. In this case, VERSION and VERSION_ID may be unset. Applications should not rely on these fields to be set. Signed-off-by: vac <dot.fun@protonmail.com>
This commit is contained in:
@@ -250,6 +250,7 @@ function install_artifacts() {
|
||||
fi
|
||||
|
||||
if grep -q "tdx" <<< "$shim"; then
|
||||
VERSION_ID=version_unset # VERSION_ID may be unset, see https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Notes
|
||||
source /host/etc/os-release || source /host/usr/lib/os-release
|
||||
case ${ID} in
|
||||
ubuntu)
|
||||
|
Reference in New Issue
Block a user