mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-05-02 15:26:06 -04:00
move ram-wipe scripts to dedicated ram-wipe package
This commit is contained in:
parent
11d0bb2c00
commit
7bda2ad3e8
8 changed files with 0 additions and 348 deletions
|
@ -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."
|
Loading…
Add table
Add a link
Reference in a new issue