From af8b211c238f6fe83db5990dc0984d1c532456ae Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Wed, 29 Jun 2022 15:50:20 -0400 Subject: [PATCH] improvements --- usr/lib/dracut/modules.d/40sdmem-security-misc/wipe.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usr/lib/dracut/modules.d/40sdmem-security-misc/wipe.sh b/usr/lib/dracut/modules.d/40sdmem-security-misc/wipe.sh index 0244fc1..b731087 100755 --- a/usr/lib/dracut/modules.d/40sdmem-security-misc/wipe.sh +++ b/usr/lib/dracut/modules.d/40sdmem-security-misc/wipe.sh @@ -6,6 +6,10 @@ ram_wipe() { info "$0: START: COLD BOOT ATTACK DEFENSE - RAM WIPE ON SHUTDOWN" + local OLD_DRACUT_QUIET + OLD_DRACUT_QUIET="$DRACUT_QUIET" + DRACUT_QUIET='no' + info "$0: Checking if there are still mounted encrypted disks..." local dmsetup_actual_output dmsetup_expected_output @@ -21,7 +25,7 @@ $0: There are still mounted encrypted disks! RAM wipe failed! debugging information: dmsetup_expected_output: '$dmsetup_expected_output' dmsetup_actual_output: '$dmsetup_actual_output'" - sleep 10 + sleep 5 return 0 fi @@ -31,6 +35,10 @@ dmsetup_actual_output: '$dmsetup_actual_output'" sdmem -l -l -f info "$0: RAM wipe completed, OK." + + ## Restore to previous value. + DRACUT_QUIET="$OLD_DRACUT_QUIET" + info "$0: END: COLD BOOT ATTACK DEFENSE - RAM WIPE ON SHUTDOWN" sleep 3 }