From 01fee8a7b4a12c8c2be4173337decc37ec3e6019 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sat, 7 Jan 2023 15:06:31 -0500 Subject: [PATCH] refactoring --- .../cold-boot-attack-defense-kexec-prepare | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 3fdd4b8..0315f3e 100755 --- a/usr/libexec/security-misc/cold-boot-attack-defense-kexec-prepare +++ b/usr/libexec/security-misc/cold-boot-attack-defense-kexec-prepare @@ -29,17 +29,17 @@ else fi if systemctl list-jobs | grep "poweroff.target" | grep -q "start"; then - wram="yes" - wact="poweroff" + wiperamexit="yes" + wiperamaction="poweroff" elif systemctl list-jobs | grep "reboot.target" | grep -q "start"; then - wram="yes" - wact="reboot" + wiperamexit="yes" + wiperamaction="reboot" elif systemctl list-jobs | grep "halt.target" | grep -q "start"; then - wram="yes" - wact="halt" + wiperamexit="yes" + wiperamaction="halt" else echo "$0: ERROR: No shutdown option found!" exit 0 fi -kexec -l "$kernel" --initrd="$initrd" --reuse-cmdline --append="wiperamexit=$wram wiperamaction=$wact" +kexec -l "$kernel" --initrd="$initrd" --reuse-cmdline --append="wiperamexit=$wiperamexit wiperamaction=$wiperamaction"