mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-08-03 00:30:41 +07:00
added files
This commit is contained in:
27
usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram.sh
Normal file
27
usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
## Author: friedy10 friedrichdoku@gmail.com
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
info "INFO: wiperamexit=yes. Running second RAM wipe... "
|
||||
|
||||
sdmem -l -l -v
|
||||
}
|
||||
ram_wipe_action
|
||||
|
Reference in New Issue
Block a user