systemvm: check if patchfile exists and is valid tarball before patching (#7953)

This commit is contained in:
Wei Zhou 2023-10-06 09:41:16 +02:00 committed by GitHub
parent 3d8cc63bc3
commit 51add0a066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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