From 585311cedd86fb06973239485027e248e2751877 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 18 Jan 2023 15:02:38 +0100 Subject: [PATCH] system: support tier here in core as well #5983 --- LICENSE | 2 +- src/man/man8/opnsense-version.8 | 6 ++++-- src/opnsense/version/core.in | 1 + src/sbin/opnsense-version | 9 ++++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/LICENSE b/LICENSE index 12115dfb9..da86dc7bb 100644 --- a/LICENSE +++ b/LICENSE @@ -19,7 +19,7 @@ Copyright (c) 2005 Espen Johansen Copyright (c) 2016-2019 EURO-LOG AG Copyright (c) 2017-2019 Fabian Franz Copyright (c) 2006 Fernando Lemos -Copyright (c) 2014-2022 Franco Fichtner +Copyright (c) 2014-2023 Franco Fichtner Copyright (c) 2004 Fred Mol Copyright (c) 2010 Gabriel B. Copyright (c) 2016 IT-assistans Sverige AB diff --git a/src/man/man8/opnsense-version.8 b/src/man/man8/opnsense-version.8 index 429b4b6f5..152450a90 100644 --- a/src/man/man8/opnsense-version.8 +++ b/src/man/man8/opnsense-version.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2018-2022 Franco Fichtner +.\" Copyright (c) 2018-2023 Franco Fichtner .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 24, 2022 +.Dd January 18, 2023 .Dt OPNSENSE-VERSION 8 .Os .Sh NAME @@ -93,6 +93,8 @@ Return the package name. Return the raw version data. .It Fl s Return the accumulated file size of the package. +.It Fl t +Return the support tier level of the package. .It Fl V Return the package series. .It Fl v diff --git a/src/opnsense/version/core.in b/src/opnsense/version/core.in index e7aa1b5c9..288457e52 100644 --- a/src/opnsense/version/core.in +++ b/src/opnsense/version/core.in @@ -11,6 +11,7 @@ "product_name": "%%CORE_PRODUCT%%", "product_nickname": "%%CORE_NICKNAME%%", "product_series": "%%CORE_SERIES%%", + "product_tier": "1", "product_version": "%%CORE_PKGVERSION%%", "product_website": "%%CORE_WWW%%" } diff --git a/src/sbin/opnsense-version b/src/sbin/opnsense-version index f436f79c3..e9cc02e28 100755 --- a/src/sbin/opnsense-version +++ b/src/sbin/opnsense-version @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2018-2022 Franco Fichtner +# Copyright (c) 2018-2023 Franco Fichtner # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -34,7 +34,7 @@ OUTPUT= DO_CHECK= DO_ORIGIN= -while getopts AacefHilNnOsVvwx OPT; do +while getopts AacefHilNnOstVvwx OPT; do case ${OPT} in A) OUTPUT="${OUTPUT} \${product_arch}" @@ -72,6 +72,9 @@ while getopts AacefHilNnOsVvwx OPT; do s) OUTPUT="${OUTPUT} \${product_size}" ;; + t) + OUTPUT="${OUTPUT} \${product_tier}" + ;; V) OUTPUT="${OUTPUT} \${product_series}" ;; @@ -130,7 +133,7 @@ fi case "${TARGET}" in core) if [ -z "${OUTPUT}" ]; then - OUTPUT="${DEFAULTS} \(\${product_arch}/\${product_flavour}\)" + OUTPUT="${DEFAULTS}" fi if [ -z "${OUTPUT%%*product_flavour*}" -a -f ${OPENSSL} ]; then