diff options
author | jim-p <jimp@pfsense.org> | 2017-03-23 11:05:54 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-03-23 11:05:54 -0400 |
commit | 7c48e60e170352a4691530f3706e4cbcfc9bd964 (patch) | |
tree | 890f51ab81aa8e0336ac09546d8402af925f400e /src | |
parent | de380bff4613f458cd48b48de328ffab68964a1d (diff) | |
download | pfsense-7c48e60e170352a4691530f3706e4cbcfc9bd964.zip pfsense-7c48e60e170352a4691530f3706e4cbcfc9bd964.tar.gz |
Show BIOS information in the system info widget, if it exists in kenv.
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/widgets/widgets/system_information.widget.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php index fc9611e..c9b10b6 100644 --- a/src/usr/local/www/widgets/widgets/system_information.widget.php +++ b/src/usr/local/www/widgets/widgets/system_information.widget.php @@ -33,6 +33,7 @@ include_once("includes/functions.inc.php"); $sysinfo_items = array( 'name' => gettext('Name'), 'system' => gettext('System'), + 'bios' => gettext('BIOS'), 'version' => gettext('Version'), 'cpu_type' => gettext('CPU Type'), 'hwcrypto' => gettext('Hardware Crypto'), @@ -159,6 +160,33 @@ $rows_displayed = false; </tr> <?php endif; + if (!in_array('bios', $skipsysinfoitems)): + unset($biosvendor); + unset($biosversion); + unset($biosdate); + $_gb = exec('/bin/kenv -q smbios.bios.vendor 2>/dev/null', $biosvendor); + $_gb = exec('/bin/kenv -q smbios.bios.version 2>/dev/null', $biosversion); + $_gb = exec('/bin/kenv -q smbios.bios.reldate 2>/dev/null', $biosdate); + /* Only display BIOS information if there is any to show. */ + if (!empty($biosvendor[0]) || !empty($biosversion[0]) || !empty($biosdate[0])): +?> + <tr> + <th><?=gettext("BIOS");?></th> + <td> + <?php if (!empty($biosvendor[0])): ?> + <?=gettext("Vendor: ");?><strong><?=$biosvendor[0];?></strong><br/> + <?php endif; ?> + <?php if (!empty($biosversion[0])): ?> + <?=gettext("Version: ");?><strong><?=$biosversion[0];?></strong><br/> + <?php endif; ?> + <?php if (!empty($biosdate[0])): ?> + <?=gettext("Release Date: ");?><strong><?=$biosdate[0];?></strong><br/> + <?php endif; ?> + </td> + </tr> +<?php + endif; + endif; if (!in_array('version', $skipsysinfoitems)): $rows_displayed = true; ?> |