From 5b11eecaecdec7487224b90708da82c10ccc4d63 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sun, 8 Jan 2023 06:45:10 -0500 Subject: [PATCH] refactoring --- .../security-misc/cold-boot-attack-defense-kexec-prepare | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/libexec/security-misc/cold-boot-attack-defense-kexec-prepare b/usr/libexec/security-misc/cold-boot-attack-defense-kexec-prepare index 2a81f97..0b432fb 100755 --- a/usr/libexec/security-misc/cold-boot-attack-defense-kexec-prepare +++ b/usr/libexec/security-misc/cold-boot-attack-defense-kexec-prepare @@ -14,13 +14,13 @@ cmdline=$(cat /proc/cmdline) kernel=$(echo "$cmdline" | grep -o 'BOOT_IMAGE=\S*' | cut -d '=' -f 2) initrd=$(echo "$kernel" | sed "s#vmlinuz#initrd.img#") -if ! test -r "$initrd"; then - echo "$0: ERROR: Initrd File '$initrd' not found or not readable!" +if ! test -r "$kernel"; then + echo "$0: ERROR: Kernel File '$kernel' not found or not readable!" exit 1 fi -if ! test -r "$kernel"; then - echo "$0: ERROR: Kernel File '$kernel' not found or not readable!" +if ! test -r "$initrd"; then + echo "$0: ERROR: Initrd File '$initrd' not found or not readable!" exit 1 fi