systeminformation 5.27.3 → 5.27.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/osinfo.js CHANGED
@@ -1240,8 +1240,8 @@ echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`;
1240
1240
  if (_freebsd || _openbsd || _netbsd) {
1241
1241
  exec('sysctl -i kern.hostid kern.hostuuid', function (error, stdout) {
1242
1242
  const lines = stdout.toString().split('\n');
1243
- result.os = util.getValue(lines, 'kern.hostid', ':').toLowerCase();
1244
- result.hardware = util.getValue(lines, 'kern.hostuuid', ':').toLowerCase();
1243
+ result.hardware = util.getValue(lines, 'kern.hostid', ':').toLowerCase();
1244
+ result.os = util.getValue(lines, 'kern.hostuuid', ':').toLowerCase();
1245
1245
  if (result.os.indexOf('unknown') >= 0) { result.os = ''; }
1246
1246
  if (result.hardware.indexOf('unknown') >= 0) { result.hardware = ''; }
1247
1247
  if (callback) {
package/lib/system.js CHANGED
@@ -107,8 +107,8 @@ function system(callback) {
107
107
  }
108
108
  if (!result.virtual) {
109
109
  try {
110
- const disksById = execSync('ls -1 /dev/disk/by-id/ 2>/dev/null', util.execOptsLinux).toString();
111
- if (disksById.indexOf('_QEMU_') >= 0) {
110
+ const disksById = execSync('ls -1 /dev/disk/by-id/ 2>/dev/null; pciconf -lv 2>/dev/null', util.execOptsLinux).toString();
111
+ if (disksById.indexOf('_QEMU_') >= 0 || disksById.indexOf('QEMU ') >= 0) {
112
112
  result.virtual = true;
113
113
  result.virtualHost = 'QEMU';
114
114
  }
@@ -120,6 +120,17 @@ function system(callback) {
120
120
  util.noop();
121
121
  }
122
122
  }
123
+ if (!result.uuid && (_freebsd || _openbsd || _netbsd)) {
124
+ try {
125
+ const lines = execSync('sysctl -i kern.hostuuid kern.hostid', util.execOptsLinux).toString().split('\n');
126
+ result.uuid = util.getValue(lines, 'kern.hostuuid', ':').toLowerCase();
127
+ if (!result.serial || result.serial === '-') {
128
+ result.serial = util.getValue(lines, 'kern.hostid', ':').toLowerCase();
129
+ }
130
+ } catch (e) {
131
+ util.noop();
132
+ }
133
+ }
123
134
  if (!result.virtual && (os.release().toLowerCase().indexOf('microsoft') >= 0 || os.release().toLowerCase().endsWith('wsl2'))) {
124
135
  const kernelVersion = parseFloat(os.release().toLowerCase());
125
136
  result.virtual = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.27.3",
3
+ "version": "5.27.5",
4
4
  "description": "Advanced, lightweight system and OS information library",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",