move ram-wipe scripts to dedicated ram-wipe package

This commit is contained in:
Patrick Schleizer 2023-01-24 06:34:17 -05:00
parent 11d0bb2c00
commit 7bda2ad3e8
No known key found for this signature in database
GPG key ID: CB8D50BB77BB3C48
8 changed files with 0 additions and 348 deletions

View file

@ -1,37 +0,0 @@
#!/bin/bash
## Copyright (C) 2023 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
## Copyright (C) 2023 - 2023 Friedrich Doku <friedrichdoku@gmail.com>
## See the file COPYING for copying conditions.
#set -x
set -e
## provided by helper-scripts
kernel=$(kernel-file-detect)
initrd=$(initrd-file-detect)
if systemctl list-jobs --no-legend | grep "poweroff.target" | grep -q "start"; then
wiperamexit="yes"
wiperamaction="poweroff"
elif systemctl list-jobs --no-legend | grep "reboot.target" | grep -q "start"; then
wiperamexit="yes"
wiperamaction="reboot"
elif systemctl list-jobs --no-legend | grep "halt.target" | grep -q "start"; then
wiperamexit="yes"
wiperamaction="halt"
else
## Could be kexec.target.
## Could be run during package installation.
echo "$0: INFO: Neither poweroff, reboot or halt. Therefore skipping 'kexec --load', ok."
exit 0
fi
echo "INFO: wiperamaction: $wiperamaction"
## Debugging.
echo kexec --load "$kernel" --initrd="$initrd" --reuse-cmdline --append="wiperamexit=$wiperamexit wiperamaction=$wiperamaction"
kexec --load "$kernel" --initrd="$initrd" --reuse-cmdline --append="wiperamexit=$wiperamexit wiperamaction=$wiperamaction"
echo "OK."