system() added uuid freebsd

This commit is contained in:
Sebastian Hildebrandt 2025-06-19 11:16:44 +02:00
parent e958beac95
commit ef5286e6cc
4 changed files with 11 additions and 2 deletions

View File

@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment | | Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- | | ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.27.5 | 2025-06-19 | `system()` added serial, uuid, virtual (freebsd) |
| 5.27.4 | 2025-06-19 | `uuid()` fixed os, hardware uuids (freebsd) | | 5.27.4 | 2025-06-19 | `uuid()` fixed os, hardware uuids (freebsd) |
| 5.27.3 | 2025-06-17 | `osInfo()` added macOS Tahoe detection | | 5.27.3 | 2025-06-17 | `osInfo()` added macOS Tahoe detection |
| 5.27.2 | 2025-06-16 | `services()` extended matching service names | | 5.27.2 | 2025-06-16 | `services()` extended matching service names |

View File

@ -57,6 +57,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">5.27.5</th>
<td>2025-06-19</td>
<td><span class="code">system()</span> added serial, uuid, virtual (freebsd)</td>
</tr>
<tr> <tr>
<th scope="row">5.27.4</th> <th scope="row">5.27.4</th>
<td>2025-06-19</td> <td>2025-06-19</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo"> <img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div> <div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div> <div class="subtitle"><span id="typed"></span>&nbsp;</div>
3<div class="version">New Version: <span id="version">5.27.4</span></div> 3<div class="version">New Version: <span id="version">5.27.5</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> <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>
<div class="down"> <div class="down">

View File

@ -122,8 +122,11 @@ function system(callback) {
} }
if (!result.uuid && (_freebsd || _openbsd || _netbsd)) { if (!result.uuid && (_freebsd || _openbsd || _netbsd)) {
try { try {
const lines = execSync('sysctl -i kern.hostuuid', util.execOptsLinux).toString().split('\n'); const lines = execSync('sysctl -i kern.hostuuid kern.hostid', util.execOptsLinux).toString().split('\n');
result.uuid = util.getValue(lines, 'kern.hostuuid', ':').toLowerCase(); result.uuid = util.getValue(lines, 'kern.hostuuid', ':').toLowerCase();
if (!result.serial) {
result.serial = util.getValue(lines, 'kern.hostid', ':').toLowerCase();
}
} catch (e) { } catch (e) {
util.noop(); util.noop();
} }