Skip to content

Commit

Permalink
firmwre: make this clearer
Browse files Browse the repository at this point in the history
Ideally, opnsense-update -M should replace this except
that -M is used to gain mirror access from other scripts
as well.  Need to think about it.
  • Loading branch information
fichtner committed Apr 7, 2021
1 parent c0a1fd3 commit 2fe4de6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/opnsense/scripts/firmware/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$ret = json_decode(@file_get_contents($metafile), true);
if ($ret != null) {
$ret['product_crypto'] = trim(shell_exec('opnsense-version -f'));
$ret['product_mirror'] = preg_replace('/\/[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}\//i', '/subscription-key/', trim(shell_exec('opnsense-update -M')));
$ret['product_mirror'] = preg_replace('/\/[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}\//i', '/${SUBSCRIPTION}/', trim(shell_exec('opnsense-update -M')));
$ret['product_time'] = date('D M j H:i:s T Y', filemtime('/usr/local/opnsense/www/index.php'));
$repos = explode("\n", trim(shell_exec('opnsense-verify -l')));
sort($repos);
Expand Down

0 comments on commit 2fe4de6

Please sign in to comment.