mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
firmware: clear license file if no subscription key is set
Tweak the external wording and position. Seems convenient to append to version, but ideally we add dynamic elements to the bottom.
This commit is contained in:
parent
6c43407860
commit
58f81a2064
@ -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";
|
||||
}
|
||||
|
||||
@ -842,12 +842,6 @@
|
||||
<td id="product_version"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr style='display:none'>
|
||||
<td style="width: 20px;"></td>
|
||||
<td style="width: 150px;">{{ lang._('License valid to') }}</td>
|
||||
<td id="product_license_valid_to"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20px;"></td>
|
||||
<td style="width: 150px;">{{ lang._('Architecture') }}</td>
|
||||
@ -890,6 +884,12 @@
|
||||
<td id="product_time_check"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr style='display:none'>
|
||||
<td style="width: 20px;"></td>
|
||||
<td style="width: 150px;">{{ lang._('Licensed until') }}</td>
|
||||
<td id="product_license_valid_to"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20px;"></td>
|
||||
<td style="width: 150px;"></td>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user