diff options
author | jim-p <jimp@netgate.com> | 2019-04-15 10:59:39 -0400 |
---|---|---|
committer | jim-p <jimp@netgate.com> | 2019-05-10 16:19:45 -0400 |
commit | fdb7f0a54726542d848f87e9158f7f0f9aeb648d (patch) | |
tree | 607738e6e8cdbd8de5c59466fa2cf3b518e39cb3 | |
parent | c6d54302b9b47fa1322b51b1f81570b1162a0289 (diff) | |
download | pfsense-fdb7f0a54726542d848f87e9158f7f0f9aeb648d.zip pfsense-fdb7f0a54726542d848f87e9158f7f0f9aeb648d.tar.gz |
status.php updates
* Ensure firewall info is generated when run from the CLI
* For SG-1100, also include its public key
(cherry picked from commit 2309b26a2b4643d9b4d0ea9be371004a781acc09)
-rw-r--r-- | src/usr/local/www/status.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/usr/local/www/status.php b/src/usr/local/www/status.php index 1cade7c..576340a 100644 --- a/src/usr/local/www/status.php +++ b/src/usr/local/www/status.php @@ -253,7 +253,7 @@ function get_firewall_info() { } } - file_put_contents("{$output_path}/Product Info.txt", str_replace("<br/>", "\n", $firewall_info) . "\n"); + file_put_contents("{$output_path}/Product-Info.txt", str_replace("<br/>", "\n", $firewall_info) . "\n"); return $firewall_info; } @@ -266,6 +266,13 @@ global $g, $config; /* Set up all of the commands we want to execute. */ /* OS stats/info */ +if (function_exists("system_get_thothid")) { + $thothid = system_get_thothid(); + if (!empty($thothid)) { + defCmdT("Product-Public Key", "/usr/bin/openssl ec -in /etc/thoth/key.pem -noout -text | /usr/bin/sed -n '/pub:/,\$p'"); + } +} + defCmdT("OS-Uptime", "/usr/bin/uptime"); defCmdT("Network-Interfaces", "/sbin/ifconfig -vvvvvam"); defCmdT("Network-Interface Statistics", "/usr/bin/netstat -nWi"); @@ -415,6 +422,7 @@ endif; if ($console) { print(gettext("Gathering status data...") . "\n"); + get_firewall_info(); } execCmds(); |