Commit 71ac15e8 authored by intrigeri's avatar intrigeri
Browse files

Add memory_wipe to the prereqs of all init-top initramfs scripts that are not ours.

This is the only way to have guarantees as to the order in which those
scripts are executed. The practical effect is that when erasing memory,
our memory_wipe script will be run first, and since it shuts down the
system in the end, none of the other init-top scripts will be executed.

refs: #10733
parent 185f5387
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"/' \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment