Skip to content

Commit ef5286e

Browse files
system() added uuid freebsd
1 parent e958bea commit ef5286e

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
9090

9191
| Version | Date | Comment |
9292
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
93+
| 5.27.5 | 2025-06-19 | `system()` added serial, uuid, virtual (freebsd) |
9394
| 5.27.4 | 2025-06-19 | `uuid()` fixed os, hardware uuids (freebsd) |
9495
| 5.27.3 | 2025-06-17 | `osInfo()` added macOS Tahoe detection |
9596
| 5.27.2 | 2025-06-16 | `services()` extended matching service names |

docs/history.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ <h3>Full version history</h3>
5757
</tr>
5858
</thead>
5959
<tbody>
60+
<tr>
61+
<th scope="row">5.27.5</th>
62+
<td>2025-06-19</td>
63+
<td><span class="code">system()</span> added serial, uuid, virtual (freebsd)</td>
64+
</tr>
6065
<tr>
6166
<th scope="row">5.27.4</th>
6267
<td>2025-06-19</td>

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
<img class="logo" src="assets/logo.png" alt="logo">
171171
<div class="title">systeminformation</div>
172172
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
173-
3<div class="version">New Version: <span id="version">5.27.4</span></div>
173+
3<div class="version">New Version: <span id="version">5.27.5</span></div>
174174
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
175175
</div>
176176
<div class="down">

lib/system.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ function system(callback) {
122122
}
123123
if (!result.uuid && (_freebsd || _openbsd || _netbsd)) {
124124
try {
125-
const lines = execSync('sysctl -i kern.hostuuid', util.execOptsLinux).toString().split('\n');
125+
const lines = execSync('sysctl -i kern.hostuuid kern.hostid', util.execOptsLinux).toString().split('\n');
126126
result.uuid = util.getValue(lines, 'kern.hostuuid', ':').toLowerCase();
127+
if (!result.serial) {
128+
result.serial = util.getValue(lines, 'kern.hostid', ':').toLowerCase();
129+
}
127130
} catch (e) {
128131
util.noop();
129132
}

0 commit comments

Comments
 (0)