diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc
index 33485381d..8fb283657 100644
--- a/src/etc/inc/system.inc
+++ b/src/etc/inc/system.inc
@@ -770,6 +770,11 @@ function system_firmware_configure($verbose = false)
/* rewrite the config via the defaults and possible arguments */
mwexec('/usr/local/sbin/opnsense-update -sd ' . join(' ', $args));
+ /* clear the license file when no subscription key is set */
+ if (empty(trim(shell_exec('/usr/local/sbin/opnsense-update -K')))) {
+ @unlink('/usr/local/opnsense/version/core.license');
+ }
+
if ($verbose) {
echo "done.\n";
}
diff --git a/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt b/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
index 513274d01..d2a36b950 100644
--- a/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
+++ b/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
@@ -842,12 +842,6 @@
|
|
-
- |
- {{ lang._('License valid to') }} |
- |
- |
-
|
{{ lang._('Architecture') }} |
@@ -890,6 +884,12 @@
|
|
+
+ |
+ {{ lang._('Licensed until') }} |
+ |
+ |
+
|
|
diff --git a/src/www/widgets/api/plugins/system.inc b/src/www/widgets/api/plugins/system.inc
index 13a1fd068..c47fec7ef 100644
--- a/src/www/widgets/api/plugins/system.inc
+++ b/src/www/widgets/api/plugins/system.inc
@@ -158,14 +158,13 @@ function system_api_versions($product)
$result = [];
$result[] = sprintf('%s %s-%s', $product['product_name'], $product['product_version'], $product['product_arch']);
-
- if (!empty($product['product_license']['valid_to'])) {
- $result[] = sprintf(gettext('(licensed until %s)'), $product['product_license']['valid_to']);
- }
-
$result[] = php_uname('s') . ' ' . php_uname('r');
$result[] = trim(shell_exec('/usr/local/bin/openssl version'));
+ if (!empty($product['product_license']['valid_to'])) {
+ $result[] = gettext('Licensed until') . ' ' . $product['product_license']['valid_to'];
+ }
+
return $result;
}