src: favour uname -p for platform

This commit is contained in:
Franco Fichtner 2016-07-21 21:44:31 +02:00
parent c221e3a8c9
commit 45396cc2d8
4 changed files with 4 additions and 4 deletions

View File

@ -2059,7 +2059,7 @@ EOD;
$platform = $g['product_name'];
$sysDescr = "{$g['product_name']} " . php_uname("n") .
" {$version} {$platform} " . php_uname("s") .
" " . php_uname("r") . " " . php_uname("m");
" " . php_uname("r") . " " . php_uname("p");
$snmpdconf .= <<<EOD
system := 1

View File

@ -35,7 +35,7 @@ require_once("util.inc");
$version = strtok(file_get_contents('/usr/local/opnsense/version/opnsense'), '-');
$flavour = strtok(shell_exec('/usr/local/bin/openssl version'), ' ');
$hostname = $config['system']['hostname'];
$machine = trim(shell_exec('uname -m'));
$machine = trim(shell_exec('uname -p'));
$domain = $config['system']['domain'];
$product = $g['product_name'];

View File

@ -69,7 +69,7 @@ $crash_report_header = sprintf(
trim(file_get_contents('/usr/local/opnsense/version/opnsense')),
file_exists($last_version) ? sprintf(' [%s]', trim(file_get_contents($last_version))) : '',
trim(shell_exec('/usr/local/bin/openssl version')),
php_uname('m'),
php_uname('p'),
shell_exec('/sbin/sysctl -b kern.hostuuid'),
date('r')
);

View File

@ -141,7 +141,7 @@ function system_api_versions()
$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[] = exec('/usr/local/bin/openssl version');