Commit 45396cc2 authored by Franco Fichtner's avatar Franco Fichtner

src: favour uname -p for platform

parent c221e3a8
...@@ -2059,7 +2059,7 @@ EOD; ...@@ -2059,7 +2059,7 @@ EOD;
$platform = $g['product_name']; $platform = $g['product_name'];
$sysDescr = "{$g['product_name']} " . php_uname("n") . $sysDescr = "{$g['product_name']} " . php_uname("n") .
" {$version} {$platform} " . php_uname("s") . " {$version} {$platform} " . php_uname("s") .
" " . php_uname("r") . " " . php_uname("m"); " " . php_uname("r") . " " . php_uname("p");
$snmpdconf .= <<<EOD $snmpdconf .= <<<EOD
system := 1 system := 1
......
...@@ -35,7 +35,7 @@ require_once("util.inc"); ...@@ -35,7 +35,7 @@ require_once("util.inc");
$version = strtok(file_get_contents('/usr/local/opnsense/version/opnsense'), '-'); $version = strtok(file_get_contents('/usr/local/opnsense/version/opnsense'), '-');
$flavour = strtok(shell_exec('/usr/local/bin/openssl version'), ' '); $flavour = strtok(shell_exec('/usr/local/bin/openssl version'), ' ');
$hostname = $config['system']['hostname']; $hostname = $config['system']['hostname'];
$machine = trim(shell_exec('uname -m')); $machine = trim(shell_exec('uname -p'));
$domain = $config['system']['domain']; $domain = $config['system']['domain'];
$product = $g['product_name']; $product = $g['product_name'];
......
...@@ -69,7 +69,7 @@ $crash_report_header = sprintf( ...@@ -69,7 +69,7 @@ $crash_report_header = sprintf(
trim(file_get_contents('/usr/local/opnsense/version/opnsense')), trim(file_get_contents('/usr/local/opnsense/version/opnsense')),
file_exists($last_version) ? sprintf(' [%s]', trim(file_get_contents($last_version))) : '', file_exists($last_version) ? sprintf(' [%s]', trim(file_get_contents($last_version))) : '',
trim(shell_exec('/usr/local/bin/openssl version')), trim(shell_exec('/usr/local/bin/openssl version')),
php_uname('m'), php_uname('p'),
shell_exec('/sbin/sysctl -b kern.hostuuid'), shell_exec('/sbin/sysctl -b kern.hostuuid'),
date('r') date('r')
); );
......
...@@ -141,7 +141,7 @@ function system_api_versions() ...@@ -141,7 +141,7 @@ function system_api_versions()
$result = array(); $result = array();
$result[] = sprintf('%s %s-%s', $g['product_name'], explode('-', trim(file_get_contents('/usr/local/opnsense/version/opnsense')))[0], php_uname('m')); $result[] = sprintf('%s %s-%s', $g['product_name'], explode('-', trim(file_get_contents('/usr/local/opnsense/version/opnsense')))[0], php_uname('p'));
$result[] = php_uname('s') . ' ' . php_uname('r'); $result[] = php_uname('s') . ' ' . php_uname('r');
$result[] = exec('/usr/local/bin/openssl version'); $result[] = exec('/usr/local/bin/openssl version');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment