65-initramfs-scripts 331 B

123456789101112131415
  1. #!/bin/sh
  2. set -e
  3. echo "Adding memory_wipe to the prereqs of all other init-top initramfs scripts"
  4. (
  5. cd /usr/share/initramfs-tools/scripts/init-top
  6. for script in * ; do
  7. [ "$script" != memory_wipe ] || continue
  8. sed --regexp-extended -i \
  9. -e 's/^(PREREQS?)="(.*)"/\1="memory_wipe \2"/' \
  10. "$script"
  11. done
  12. )