When working on plymouth I always have "plymouth.debug=stream:/dev/null"
on the kernel commandline. This enables tracing without logging anything
to the console and causes the entire trace to be logged to
/var/log/plymouth-debug.log when plymouth quits.
This is very useful for debugging (non crash) issues with plymouth at boot.
With the recent "main: Cleanly quit on SIGTERM" change plymouth will now
also write a trace log to /var/log/plymouth-debug.log on shutdown/reboot,
but this will be overwritten again on boot by the boot log.
This commit changes the default debug_buffer_path value from:
/var/log/plymouth-debug.log to /var/log/plymouth-shutdown-debug.log
when in shutdown or reboot mode so that it does not get overwritten
by the debug-log written at boot.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
}
if (debug_buffer != NULL) {
- if (debug_buffer_path == NULL)
- debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-debug.log");
+ if (debug_buffer_path == NULL) {
+ if (state->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN ||
+ state->mode == PLY_BOOT_SPLASH_MODE_REBOOT)
+ debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-shutdown-debug.log");
+ else
+ debug_buffer_path = strdup (PLYMOUTH_LOG_DIRECTORY "/plymouth-debug.log");
+ }
ply_logger_add_filter (ply_logger_get_error_default (),
(ply_logger_filter_handler_t)