From b5f5798e11bb7bfe389e5c890e65638a77f1a310 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Aug 28 2018 14:10:40 +0000 Subject: Escaping for better egrep operation on strings --- diff --git a/tests/p_grub2/01_grub2_secureboot_signed.sh b/tests/p_grub2/01_grub2_secureboot_signed.sh index 3884aeb..a92f326 100755 --- a/tests/p_grub2/01_grub2_secureboot_signed.sh +++ b/tests/p_grub2/01_grub2_secureboot_signed.sh @@ -7,7 +7,7 @@ arch=$(uname -m) if [[ "$centos_ver" = "7" && "$arch" = "x86_64" ]] ; then t_InstallPackage pesign grub2-efi - pesign --show-signature --in /boot/efi/EFI/centos/grubx64.efi|egrep -q 'Red Hat Inc.|CentOS Secure Boot (key 1)' + pesign --show-signature --in /boot/efi/EFI/centos/grubx64.efi|egrep -q 'Red Hat Inc.|CentOS Secure Boot \(key 1\)' t_CheckExitStatus $? else t_Log "previous versions than CentOS 7 - or not x86_64 arch - aren't using secureboot ... skipping" diff --git a/tests/p_kernel/02_kernel_secureboot_signed.sh b/tests/p_kernel/02_kernel_secureboot_signed.sh index 3138e9c..3a4df63 100755 --- a/tests/p_kernel/02_kernel_secureboot_signed.sh +++ b/tests/p_kernel/02_kernel_secureboot_signed.sh @@ -8,7 +8,7 @@ if [[ "$centos_ver" = "7" && "$arch" = "x86_64" ]] ; then for kernel in $(rpm -q kernel --queryformat '%{version}-%{release}.%{arch}\n') do t_Log "Validating kernel $kernel ..." - pesign --show-signature --in /boot/vmlinuz-${kernel}|egrep -q 'Red Hat Inc.|CentOS Secure Boot (key 1)' + pesign --show-signature --in /boot/vmlinuz-${kernel}|egrep -q 'Red Hat Inc.|CentOS Secure Boot \(key 1\)' t_CheckExitStatus $? done else