diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18ad8c3e..b2220dd0 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.23.21 | 2024-12-24 | `osInfo()` fix fqdn |
| 5.23.20 | 2024-12-24 | `cpu()` fix timeout |
| 5.23.19 | 2024-12-24 | `cpu()` refactored using internal node functions |
| 5.23.18 | 2024-12-24 | `cpu()` Handle RISC-V CPU Manufacturer and Brand |
diff --git a/docs/history.html b/docs/history.html
index 402db4e1..aa3fb198 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -58,7 +58,12 @@
Full version history
- 5.23.19 |
+ 5.23.21 |
+ 2024-12-24 |
+ osInfo() fix fqdn (linux) |
+
+
+ 5.23.20 |
2024-12-24 |
inetChecksite() fix timeout |
diff --git a/docs/index.html b/docs/index.html
index a84b89ec..db8ade0e 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -170,7 +170,7 @@
systeminformation
- New Version: 5.23.20
+ New Version: 5.23.21
diff --git a/lib/osinfo.js b/lib/osinfo.js
index cf645172..bac305c5 100644
--- a/lib/osinfo.js
+++ b/lib/osinfo.js
@@ -190,17 +190,10 @@ function getFQDN() {
let fqdn = os.hostname;
if (_linux || _darwin) {
try {
- const stdout = execSync('hostnamectl --json short 2>/dev/null', util.execOptsLinux);
- const json = JSON.parse(stdout.toString());
-
- fqdn = json['StaticHostname'];
+ const stdout = execSync('hostname -f 2>/dev/null', util.execOptsLinux);
+ fqdn = stdout.toString().split(os.EOL)[0];
} catch (e) {
- try {
- const stdout = execSync('hostname -f 2>/dev/null', util.execOptsLinux);
- fqdn = stdout.toString().split(os.EOL)[0];
- } catch (e) {
- util.noop();
- }
+ util.noop();
}
}
if (_freebsd || _openbsd || _netbsd) {