firmware: opnsense-version will do the trick

This commit is contained in:
Franco Fichtner 2021-02-05 10:22:55 +01:00
parent 024bb6a003
commit b35843fdbc

View File

@ -31,7 +31,7 @@ $metafile = '/usr/local/opnsense/version/core';
$ret = json_decode(@file_get_contents($metafile), true);
if ($ret != null) {
$ret['product_crypto'] = explode(' ', trim(shell_exec('/usr/local/bin/openssl version')))[0];
$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_time'] = date(DATE_RFC2822, filemtime($metafile));
ksort($ret);