Fix parsing hexdump output

hexdump output on i586 contained odd symbol '|' in the line where the word 'Modules' began,
it broke previously used awk command.
This commit is contained in:
Mikhail Novosyolov 2019-11-12 01:32:36 +03:00
parent 4dc2157aaa
commit cc3afd8669

View file

@ -1030,7 +1030,7 @@ mkdir -p "%{certs_dir_rnd}"
echo 0 > %{certs_verify_tmp}
_verify_signature(){
if [ -z "$1" ] || [ ! -f "$1" ]; then return; fi
if hexdump -C "$1" | awk -F '|' '{print $2}' | tr -d '\n' | \
if hexdump -C "$1" | rev | cut -f 2 -d '|' | rev | tr -d '\n' | \
grep -q '~Module signature appended~'
then
echo $(($(cat %{certs_verify_tmp})+1)) > %{certs_verify_tmp}