use warn instead of info for now

because dracut does not show info messages when kernel parameter quiet is set
This commit is contained in:
Patrick Schleizer 2023-01-09 05:34:07 -05:00
parent 7fa6946694
commit d769099db1
No known key found for this signature in database
GPG key ID: CB8D50BB77BB3C48
4 changed files with 24 additions and 24 deletions

View file

@ -11,7 +11,7 @@ ram_wipe_check_needshutdown() {
wipe_action=$(getarg wiperamaction)
if [ "$wipe_action" = "reboot" ]; then
info "wipe-ram.sh wiperamexit: reboot..."
warn "wipe-ram.sh wiperamexit: reboot..."
## Why reboot? Why not just continue to boot?
## To get rid of kernel command line options 'wiperamexit=yes wiperamaction=reboot'?
## Also RAM wipe using sdmem leads to an OOM and the following error as seen in serial console:
@ -19,13 +19,13 @@ ram_wipe_check_needshutdown() {
## In other words, the system might not boot up cleanly.
reboot --force
elif [ "$wipe_action" = "poweroff" ]; then
info "wipe-ram.sh wiperamexit: poweroff..."
warn "wipe-ram.sh wiperamexit: poweroff..."
poweroff --force
elif [ "$wipe_action" = "halt" ]; then
info "wipe-ram.sh wiperamexit: halt..."
warn "wipe-ram.sh wiperamexit: halt..."
halt --force
else
info "wipe-ram.sh wiperamexit: normal boot..."
warn "wipe-ram.sh wiperamexit: normal boot..."
fi
}

View file

@ -21,22 +21,22 @@ ram_wipe_action() {
kernel_wiperam_exit=$(getarg wiperamexit)
if [ "$kernel_wiperam_exit" = "no" ]; then
info "wipe-ram.sh wiperamexit: Skip, because wiperamexit=no kernel parameter detected, OK."
warn "wipe-ram.sh wiperamexit: Skip, because wiperamexit=no kernel parameter detected, OK."
return 0
fi
if [ "$kernel_wiperam_exit" != "yes" ]; then
info "wipe-ram.sh wiperamexit: Skip, because wiperamexit parameter is unset."
warn "wipe-ram.sh wiperamexit: Skip, because wiperamexit parameter is unset."
return 0
fi
info "wipe-ram.sh wiperamexit: wiperamexit=yes, therefore running second RAM wipe..."
warn "wipe-ram.sh wiperamexit: wiperamexit=yes, therefore running second RAM wipe..."
drop_caches
sdmem -l -l -v
drop_caches
info "wipe-ram.sh wiperamexit: Second RAM wipe completed."
warn "wipe-ram.sh wiperamexit: Second RAM wipe completed."
}
ram_wipe_action