mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-07-31 06:08:41 -04:00
Change echo to info. Included more reliable way of getting initrd and kernel. Allow user custom kexec
This commit is contained in:
parent
8da3b9c40c
commit
78a4fad667
5 changed files with 32 additions and 33 deletions
|
@ -16,10 +16,6 @@ ram_wipe_check_needshutdown() {
|
|||
reboot -f
|
||||
fi
|
||||
|
||||
if [ "$wipe_action" = "kexec" ]; then
|
||||
reboot -f
|
||||
fi
|
||||
|
||||
if [ "$wipe_action" = "poweroff" ]; then
|
||||
poweroff -f
|
||||
fi
|
||||
|
@ -29,7 +25,7 @@ ram_wipe_check_needshutdown() {
|
|||
fi
|
||||
|
||||
if [ "$wipe_action" = "error" ]; then
|
||||
echo "Choice of shutdown option led to an error. Shutting down..."
|
||||
info "Choice of shutdown option led to an error. Shutting down..."
|
||||
sleep 5
|
||||
poweroff -f
|
||||
fi
|
||||
|
|
|
@ -6,19 +6,18 @@
|
|||
|
||||
ram_wipe_action() {
|
||||
local kernel_wiperam_exit
|
||||
## getarg returns the last parameter only.
|
||||
## if /proc/cmdline contains 'wiperam=skip wiperam=force' the last one wins.
|
||||
kernel_wiperam_exit=$(getarg wiperamexit)
|
||||
|
||||
|
||||
if [ "$kernel_wiperam_exit" = "no" ]; then
|
||||
info "INFO: Skip, because wiperamexit=no kernel parameter detected, OK."
|
||||
return 0
|
||||
else
|
||||
if [ "$kernel_wiperam_exit" != "yes" ]; then
|
||||
info "INFO: Skip, becuase wiperamexit parameter is not used. "
|
||||
return 0
|
||||
fi
|
||||
info "INFO: Skip, because wiperamexit=no kernel parameter detected, OK."
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
if [ "$kernel_wiperam_exit" != "yes" ]; then
|
||||
info "INFO: Skip, becuase wiperamexit parameter is not used. "
|
||||
return 0
|
||||
fi
|
||||
|
||||
info "INFO: wiperamexit=yes. Running second RAM wipe... "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue