From 2bff035b73ec0fbc628fe7ad4e81c1df13108122 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 10 Nov 2023 08:48:52 +0100 Subject: [PATCH] firmware: support base/kernel hash in opnsense-version; closes #6998 --- src/sbin/opnsense-version | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sbin/opnsense-version b/src/sbin/opnsense-version index e533c6c3d..abeb401b4 100755 --- a/src/sbin/opnsense-version +++ b/src/sbin/opnsense-version @@ -193,6 +193,11 @@ core) product_arch=$(cat ${VERSION}.arch) fi fi + if [ -z "${OUTPUT%%*product_hash*}" ]; then + if [ -z "${product_hash}" -a -f ${VERSION}.hash ]; then + product_hash=$(cat ${VERSION}.hash) + fi + fi if [ -z "${OUTPUT%%*product_id*}" ]; then if [ -z "${product_id}" ]; then # mock ID target, there is no .name file