From 51add0a066207a4f926e8fd808b4913078f3d8a5 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Fri, 6 Oct 2023 09:41:16 +0200 Subject: [PATCH] systemvm: check if patchfile exists and is valid tarball before patching (#7953) --- systemvm/debian/opt/cloud/bin/setup/cloud-early-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config index 78191214635..b6709c161d1 100755 --- a/systemvm/debian/opt/cloud/bin/setup/cloud-early-config +++ b/systemvm/debian/opt/cloud/bin/setup/cloud-early-config @@ -66,7 +66,7 @@ patch() { if [ "$TYPE" != "cksnode" ]; then while [ $retry -gt 0 ] do - if [ -f $patchfile ]; then + if tar tf $patchfile &> /dev/null; then eval $(validate_checksums $md5file $patchfile) if [ "$oldmd5" != "$newmd5" ] && [ -f ${patchfile} ] && [ "$newmd5" != "" ] then