This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.18 by this push:
     new 51add0a0662 systemvm: check if patchfile exists and is valid tarball 
before patching (#7953)
51add0a0662 is described below

commit 51add0a066207a4f926e8fd808b4913078f3d8a5
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Oct 6 09:41:16 2023 +0200

    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

Reply via email to