From ef5286e6cc2c21e0130c4e148b3f92ba1bc978c2 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 19 Jun 2025 11:16:44 +0200 Subject: [PATCH] system() added uuid freebsd --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/system.js | 5 ++++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f59f382..3757948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | 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.3 | 2025-06-17 | `osInfo()` added macOS Tahoe detection | | 5.27.2 | 2025-06-16 | `services()` extended matching service names | diff --git a/docs/history.html b/docs/history.html index b6764c7..8ffac77 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.27.5 + 2025-06-19 + system() added serial, uuid, virtual (freebsd) + 5.27.4 2025-06-19 diff --git a/docs/index.html b/docs/index.html index 5a13bea..93e69fe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
- 3
New Version: 5.27.4
+ 3
New Version: 5.27.5
diff --git a/lib/system.js b/lib/system.js index fc47bea..befdb3e 100644 --- a/lib/system.js +++ b/lib/system.js @@ -122,8 +122,11 @@ function system(callback) { } if (!result.uuid && (_freebsd || _openbsd || _netbsd)) { 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(); + if (!result.serial) { + result.serial = util.getValue(lines, 'kern.hostid', ':').toLowerCase(); + } } catch (e) { util.noop(); }