diff --git a/usr/lib/dracut/modules.d/10ram-wipe-exit/module-setup.sh b/usr/lib/dracut/modules.d/10ram-wipe-exit/module-setup.sh index 9785aa9..76d4ac2 100644 --- a/usr/lib/dracut/modules.d/10ram-wipe-exit/module-setup.sh +++ b/usr/lib/dracut/modules.d/10ram-wipe-exit/module-setup.sh @@ -46,4 +46,3 @@ install() { installkernel() { return 0 } - diff --git a/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram-needshutdown.sh b/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram-needshutdown.sh index 952e418..9621efe 100644 --- a/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram-needshutdown.sh +++ b/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram-needshutdown.sh @@ -15,21 +15,20 @@ ram_wipe_check_needshutdown() { if [ "$wipe_action" = "reboot" ]; then reboot -f fi - + if [ "$wipe_action" = "poweroff" ]; then poweroff -f fi - + if [ "$wipe_action" = "halt" ]; then halt -f fi - + if [ "$wipe_action" = "error" ]; then - info "Choice of shutdown option led to an error. Shutting down..." - sleep 5 - poweroff -f + info "Choice of shutdown option led to an error. Shutting down..." + sleep 5 + poweroff -f fi } ram_wipe_check_needshutdown - diff --git a/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram.sh b/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram.sh index e2daa84..d43ff5e 100644 --- a/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram.sh +++ b/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram.sh @@ -8,21 +8,19 @@ ram_wipe_action() { local kernel_wiperam_exit kernel_wiperam_exit=$(getarg wiperamexit) - if [ "$kernel_wiperam_exit" = "no" ]; then info "INFO: Skip, because wiperamexit=no kernel parameter detected, OK." return 0 fi - if [ "$kernel_wiperam_exit" != "yes" ]; then - info "INFO: Skip, becuase wiperamexit parameter is not used. " + info "INFO: Skip, becuase wiperamexit parameter is not used." return 0 fi - info "INFO: wiperamexit=yes. Running second RAM wipe... " - + info "INFO: wiperamexit=yes. Running second RAM wipe..." + sdmem -l -l -v } -ram_wipe_action +ram_wipe_action diff --git a/usr/lib/dracut/modules.d/40cold-boot-attack-defense/module-setup.sh b/usr/lib/dracut/modules.d/40cold-boot-attack-defense/module-setup.sh index 194fa8b..cb679e8 100755 --- a/usr/lib/dracut/modules.d/40cold-boot-attack-defense/module-setup.sh +++ b/usr/lib/dracut/modules.d/40cold-boot-attack-defense/module-setup.sh @@ -8,31 +8,31 @@ # called by dracut check() { - require_binaries sync || return 1 - require_binaries sleep || return 1 - require_binaries sdmem || return 1 - require_binaries dmsetup || return 1 - require_binaries systemd-detect-virt || return 1 - return 0 + require_binaries sync || return 1 + require_binaries sleep || return 1 + require_binaries sdmem || return 1 + require_binaries dmsetup || return 1 + require_binaries systemd-detect-virt || return 1 + return 0 } # called by dracut depends() { - return 0 + return 0 } # called by dracut install() { - inst_multiple sync - inst_multiple sleep - inst_multiple sdmem - inst_multiple dmsetup - inst_multiple systemd-detect-virt - inst_hook shutdown 40 "$moddir/wipe-ram.sh" - inst_hook cleanup 80 "$moddir/wipe-ram-needshutdown.sh" + inst_multiple sync + inst_multiple sleep + inst_multiple sdmem + inst_multiple dmsetup + inst_multiple systemd-detect-virt + inst_hook shutdown 40 "$moddir/wipe-ram.sh" + inst_hook cleanup 80 "$moddir/wipe-ram-needshutdown.sh" } # called by dracut installkernel() { - return 0 + return 0 } diff --git a/usr/lib/dracut/modules.d/40cold-boot-attack-defense/wipe-ram.sh b/usr/lib/dracut/modules.d/40cold-boot-attack-defense/wipe-ram.sh index 2346a12..edab86b 100755 --- a/usr/lib/dracut/modules.d/40cold-boot-attack-defense/wipe-ram.sh +++ b/usr/lib/dracut/modules.d/40cold-boot-attack-defense/wipe-ram.sh @@ -64,7 +64,7 @@ ram_wipe() { sleep 3 else info "\ -WARNING: wipe-ram.sh:There are still mounted encrypted disks! RAM wipe failed! +WARNING: wipe-ram.sh: There are still mounted encrypted disks! RAM wipe failed! debugging information: dmsetup_expected_output: '$dmsetup_expected_output'