diff --git a/+POST_INSTALL b/+POST_INSTALL index 26e1c0d19e..7fa23c1969 100644 --- a/+POST_INSTALL +++ b/+POST_INSTALL @@ -20,6 +20,9 @@ rm -f /etc/rc.bak echo "Writing OPNsense version" mkdir -p /usr/local/opnsense/version +if [ -f /usr/local/opnsense/version/opnsense ]; then + mv /usr/local/opnsense/version/opnsense /usr/local/opnsense/version/opnsense.last +fi echo "%%CORE_COMMIT%%" > /usr/local/opnsense/version/opnsense if /usr/local/etc/rc.d/configd status > /dev/null; then diff --git a/+PRE_DEINSTALL b/+PRE_DEINSTALL index ecc1984299..1263c9242a 100644 --- a/+PRE_DEINSTALL +++ b/+PRE_DEINSTALL @@ -10,6 +10,3 @@ echo "Unhooking from /etc/rc" cp /etc/rc /etc/rc.bak tail -n +5 /etc/rc.bak > /etc/rc rm -f /etc/rc.bak - -echo "Removing OPNsense version" -rm -f /usr/local/opnsense/version/opnsense diff --git a/Makefile b/Makefile index 344bc08ad9..4b02b58950 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ CORE_ORIGIN?= opnsense/${CORE_NAME} CORE_COMMENT?= OPNsense development package CORE_MAINTAINER?= franco@opnsense.org CORE_WWW?= https://opnsense.org/ +CORE_MESSAGE?= Follow the brave badger! CORE_DEPENDS?= apinger \ ataidle \ beep \ @@ -117,7 +118,11 @@ manifest: force @echo "desc: \"${CORE_HASH}\"" @echo "maintainer: \"${CORE_MAINTAINER}\"" @echo "www: \"${CORE_WWW}\"" - @echo "prefix: /" + @echo "message: \"${CORE_MESSAGE}\"" + @echo "categories: [ \"sysutils\", \"www\" ]" + @echo "licenselogic: \"single\"" + @echo "licenses: [ \"BSD2CLAUSE\" ]" + @echo "prefix: /usr/local" @echo "deps: {" @for CORE_DEPEND in ${CORE_DEPENDS}; do \ ${PKG} query ' %n: { version: "%v", origin: "%o" }' \ diff --git a/src/www/crash_reporter.php b/src/www/crash_reporter.php index be9766a871..6e7e7fff27 100644 --- a/src/www/crash_reporter.php +++ b/src/www/crash_reporter.php @@ -64,11 +64,13 @@ function upload_crash_report($files) $pgtitle = array(gettext("Diagnostics"),gettext("Crash Reporter")); include('head.inc'); +$last_version = '/usr/local/opnsense/version/opnsense.last'; $crash_report_header = sprintf( - "System Information:\n%s\n%s %s (%s)\n%s\n", + "System Information:\n%s\n%s %s%s (%s)\n%s\n", php_uname('v'), $g['product_name'], trim(file_get_contents('/usr/local/opnsense/version/opnsense')), + file_exists($last_version) ? sprintf(' [%s]', trim(file_get_contents($last_version))) : '', php_uname('m'), exec('/usr/local/bin/openssl version') );