From e194253186dfd9a8fccc66caa66984398a1c4fd1 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 16 Sep 2018 20:41:51 +0200 Subject: [PATCH] firmware: kill the firmware-product.last trick On second thought it's only marginally useful and not really relevant nowadays for working on crash reports. --- +PRE_DEINSTALL | 2 -- src/www/crash_reporter.php | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/+PRE_DEINSTALL b/+PRE_DEINSTALL index ca2306467..71483468a 100644 --- a/+PRE_DEINSTALL +++ b/+PRE_DEINSTALL @@ -1,7 +1,5 @@ /usr/local/etc/rc.d/configd stop -cp /usr/local/opnsense/firmware-product /usr/local/opnsense/firmware-product.last - echo "Resetting root shell" pw usermod -n root -s /bin/csh diff --git a/src/www/crash_reporter.php b/src/www/crash_reporter.php index de580c29a..95c95bde5 100644 --- a/src/www/crash_reporter.php +++ b/src/www/crash_reporter.php @@ -64,13 +64,11 @@ include('head.inc'); $plugins = implode(' ', explode("\n", shell_exec('pkg info -g "os-*"'))); -$last = json_decode(@file_get_contents('/usr/local/opnsense/firmware-product.last'), true); $crash_report_header = sprintf( - "%s\n%s %s%s (%s/%s)\n%sTime %s\n", + "%s\n%s %s (%s/%s)\n%sTime %s\n", php_uname('v'), $g['product_name'], "{$g['product_version']}-{$g['product_hash']}", - !empty($last['product_version']) ? sprintf(' [%s]', "{$last['product_version']}-{$last['product_hash']}") : '', $g['product_arch'], $g['product_flavour'], empty($plugins) ? '' : "Plugins $plugins\n",