From d12e8a14ecaa1efac9c0508a2acf11069c5d853d Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 27 Jul 2015 18:53:03 +0200 Subject: [PATCH] crash reporter: provide dmesg.boot file too --- src/www/crash_reporter.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/www/crash_reporter.php b/src/www/crash_reporter.php index e6a34957f..99d405571 100644 --- a/src/www/crash_reporter.php +++ b/src/www/crash_reporter.php @@ -99,6 +99,7 @@ $crash_report_header = sprintf( } file_put_contents('/var/crash/crashreport_header.txt', $crash_report_header); @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/*'); $files_to_upload = glob('/var/crash/*'); echo gettext('ok') . '
' . gettext('Uploading...'); @@ -129,6 +130,11 @@ $crash_report_header = sprintf( $crash_reports .= "\nPHP Errors:\n"; $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) { if (filesize($cf) < FILE_SIZE) { $crash_reports .= "\nFilename: {$cf}\n";