diff --git a/CHANGELOG.md b/CHANGELOG.md index 598d4b4..2a2adb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 5.11.1 | 2022-02-03 | `osInfo()` fixed issue fqdn (openBSD) | | 5.11.0 | 2022-01-26 | `networkInterfaces()` added default property and parameter | | 5.10.7 | 2022-01-21 | `processes()` reverted PR #560 (windows) | | 5.10.6 | 2022-01-21 | `usb()` fix `users()` fix tty (windows) | diff --git a/docs/history.html b/docs/history.html index 70e7c73..f31d656 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.11.1 + 2022-02-03 + osInfo() fixed issue fqdn (openBSD) + 5.11.0 2022-01-26 diff --git a/docs/index.html b/docs/index.html index 2134dd1..9eb2f4e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.11.0
+
New Version: 5.11.1
diff --git a/lib/osinfo.js b/lib/osinfo.js index 92d27cc..2da776f 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -167,7 +167,7 @@ function getLogoFile(distro) { function getFQDN() { let fqdn = os.hostname; - if (_linux || _darwin || _freebsd || _openbsd || _netbsd) { + if (_linux || _darwin) { try { const stdout = execSync('hostname -f'); fqdn = stdout.toString().split(os.EOL)[0]; @@ -175,6 +175,14 @@ function getFQDN() { util.noop(); } } + if (_freebsd || _openbsd || _netbsd) { + try { + const stdout = execSync('hostname'); + fqdn = stdout.toString().split(os.EOL)[0]; + } catch (e) { + util.noop(); + } + } if (_windows) { try { const stdout = execSync('echo %COMPUTERNAME%.%USERDNSDOMAIN%', util.execOptsWin);