Commit d12e8a14 authored by Franco Fichtner's avatar Franco Fichtner

crash reporter: provide dmesg.boot file too

parent 90cd3f99
...@@ -99,6 +99,7 @@ $crash_report_header = sprintf( ...@@ -99,6 +99,7 @@ $crash_report_header = sprintf(
} }
file_put_contents('/var/crash/crashreport_header.txt', $crash_report_header); file_put_contents('/var/crash/crashreport_header.txt', $crash_report_header);
@rename('/tmp/PHP_errors.log', '/var/crash/PHP_errors.log'); @rename('/tmp/PHP_errors.log', '/var/crash/PHP_errors.log');
@copy('/var/run/dmesg.boot', '/var/crash/dmesg.boot');
exec('/usr/bin/gzip /var/crash/*'); exec('/usr/bin/gzip /var/crash/*');
$files_to_upload = glob('/var/crash/*'); $files_to_upload = glob('/var/crash/*');
echo gettext('ok') . '<br/>' . gettext('Uploading...'); echo gettext('ok') . '<br/>' . gettext('Uploading...');
...@@ -129,6 +130,11 @@ $crash_report_header = sprintf( ...@@ -129,6 +130,11 @@ $crash_report_header = sprintf(
$crash_reports .= "\nPHP Errors:\n"; $crash_reports .= "\nPHP Errors:\n";
$crash_reports .= $php_errors; $crash_reports .= $php_errors;
} }
$dmesg_boot = @file_get_contents('/var/run/dmesg.boot');
if (!empty($dmesg_boot)) {
$crash_reports .= "\ndmesg.boot:\n";
$crash_reports .= $dmesg_boot;
}
foreach ($crash_files as $cf) { foreach ($crash_files as $cf) {
if (filesize($cf) < FILE_SIZE) { if (filesize($cf) < FILE_SIZE) {
$crash_reports .= "\nFilename: {$cf}\n"; $crash_reports .= "\nFilename: {$cf}\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment