summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2016-07-29 20:09:05 +0000
committerintrigeri <intrigeri@boum.org>2016-07-29 20:09:05 +0000
commit4c7a3141582ad97017d7ce8e458c7b97f8921512 (patch)
tree19514ee76f32b661cb721a977b0ece99d61ea6bb
parentde575a8b7677eb8624abecf670e33b14c18b263d (diff)
parent62f025c594f3718631ada2b90493818665c45790 (diff)
Merge branch 'bugfix/10733-run-memory-erasure-hook-earlier' into test/11588-usb-on-jenkins+10733
-rwxr-xr-xconfig/chroot_local-hooks/65-initramfs-scripts14
-rwxr-xr-xconfig/chroot_local-includes/usr/share/initramfs-tools/scripts/init-top/memory_wipe (renamed from config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-premount/memory_wipe)0
-rw-r--r--features/erase_memory.feature4
-rw-r--r--wiki/src/contribute/design/memory_erasure.mdwn3
4 files changed, 16 insertions, 5 deletions
diff --git a/config/chroot_local-hooks/65-initramfs-scripts b/config/chroot_local-hooks/65-initramfs-scripts
new file mode 100755
index 0000000..b69cb3d
--- /dev/null
+++ b/config/chroot_local-hooks/65-initramfs-scripts
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+
+echo "Adding memory_wipe to the prereqs of all other init-top initramfs scripts"
+
+(
+ cd /usr/share/initramfs-tools/scripts/init-top
+ for script in * ; do
+ [ "$script" != memory_wipe ] || continue
+ sed --regexp-extended -i \
+ -e 's/^(PREREQS?)="(.*)"/\1="memory_wipe \2"/' \
+ "$script"
+ done
+)
diff --git a/config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-premount/memory_wipe b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-top/memory_wipe
index 794f5d8..794f5d8 100755
--- a/config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-premount/memory_wipe
+++ b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-top/memory_wipe
diff --git a/features/erase_memory.feature b/features/erase_memory.feature
index d3425fd..78aefe3 100644
--- a/features/erase_memory.feature
+++ b/features/erase_memory.feature
@@ -20,8 +20,6 @@ Feature: System memory erasure on shutdown
And I stop the boot at the bootloader menu
Then I find many patterns in the guest's memory
- #10776
- @fragile
Scenario: Memory erasure on a modern computer
Given a computer
And the computer is a modern 64-bit system
@@ -53,8 +51,6 @@ Feature: System memory erasure on shutdown
And I stop the boot at the bootloader menu
Then I find many patterns in the guest's memory
- #10776
- @fragile
Scenario: Memory erasure on an old computer
Given a computer
And the computer is an old pentium without the PAE extension
diff --git a/wiki/src/contribute/design/memory_erasure.mdwn b/wiki/src/contribute/design/memory_erasure.mdwn
index 715b895..fd13b52 100644
--- a/wiki/src/contribute/design/memory_erasure.mdwn
+++ b/wiki/src/contribute/design/memory_erasure.mdwn
@@ -33,7 +33,8 @@ Additionally, the `sdmemopts` kernel command line parameter allows
fine tuning the options passed to the `sdmem` program.
- [[!tails_gitweb config/chroot_local-includes/usr/share/initramfs-tools/hooks/sdmem]]
-- [[!tails_gitweb config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-premount/memory_wipe]]
+- [[!tails_gitweb config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-top/memory_wipe]]
+- [[!tails_gitweb config/chroot_local-hooks/65-initramfs-scripts]]
These `sdmem` and `sdmemopts` are appended to the fresh kernel command
line parameters, when memory erasure is triggered, by the