osInfo() improved parsing (FreeBSD)
This commit is contained in:
parent
00d67ceee6
commit
1af7ee408b
@ -42,6 +42,7 @@ We had to make **several interface changes** to keep systeminformation as consis
|
||||
|
||||
- `baseboard()`: added memMax, memSlots
|
||||
- `bios()`: added language and features (linux)
|
||||
- `blockDevices()` added raid group member (linux)
|
||||
- `cpu()`: extended AMD processor list
|
||||
- `cpu()`: extended socket list (win)
|
||||
- `cpu()`: added virtualization if cpu supports virtualization
|
||||
@ -81,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
|
||||
| 5.14.2 | 2022-11-20 | `osInfo()` improved parsing (FreeBSD) |
|
||||
| 5.14.1 | 2022-11-20 | `memLayout()` bank descriptor cleanup (linux) |
|
||||
| 5.14.0 | 2022-11-19 | `blockDevices()` added raid group member (linux) |
|
||||
| 5.13.5 | 2022-11-18 | `users()` fix parsing issue (windows) |
|
||||
|
||||
@ -57,6 +57,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">5.14.2</th>
|
||||
<td>2022-11-20</td>
|
||||
<td><span class="code">osInfo()</span> improved parsing (FreeBSD)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.14.1</th>
|
||||
<td>2022-11-20</td>
|
||||
|
||||
@ -170,7 +170,7 @@
|
||||
<img class="logo" src="assets/logo.png" alt="logo">
|
||||
<div class="title">systeminformation</div>
|
||||
<div class="subtitle"><span id="typed"></span> </div>
|
||||
<div class="version">New Version: <span id="version">5.14.1</span></div>
|
||||
<div class="version">New Version: <span id="version">5.14.2</span></div>
|
||||
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
||||
</div>
|
||||
<div class="down">
|
||||
|
||||
@ -263,16 +263,19 @@ function osInfo(callback) {
|
||||
if (_freebsd || _openbsd || _netbsd) {
|
||||
|
||||
exec('sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod', function (error, stdout) {
|
||||
if (!error) {
|
||||
let lines = stdout.toString().split('\n');
|
||||
result.distro = util.getValue(lines, 'kern.ostype');
|
||||
result.logofile = getLogoFile(result.distro);
|
||||
result.release = util.getValue(lines, 'kern.osrelease').split('-')[0];
|
||||
result.serial = util.getValue(lines, 'kern.uuid');
|
||||
result.codename = '';
|
||||
result.codepage = util.getCodepage();
|
||||
result.uefi = util.getValue(lines, 'machdep.bootmethod').toLowerCase().indexOf('uefi') >= 0;
|
||||
}
|
||||
let lines = stdout.toString().split('\n');
|
||||
const distro = util.getValue(lines, 'kern.ostype');
|
||||
const logofile = util.getValue(lines, 'kern.ostype');
|
||||
const release = util.getValue(lines, 'kern.osrelease').split('-')[0];
|
||||
const serial = util.getValue(lines, 'kern.uuid');
|
||||
const uefi = util.getValue(lines, 'machdep.bootmethod').toLowerCase().indexOf('uefi') >= 0;
|
||||
result.distro = distro || result.distro;
|
||||
result.logofile = logofile || result.logofile;
|
||||
result.release = release || result.release;
|
||||
result.serial = serial || result.serial;
|
||||
result.codename = '';
|
||||
result.codepage = util.getCodepage();
|
||||
result.uefi = uefi || result.uefi;
|
||||
if (callback) {
|
||||
callback(result);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user