uuid() fixed os, hardware uuids (freebsd)
This commit is contained in:
+2
-2
@@ -1240,8 +1240,8 @@ echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`;
|
||||
if (_freebsd || _openbsd || _netbsd) {
|
||||
exec('sysctl -i kern.hostid kern.hostuuid', function (error, stdout) {
|
||||
const lines = stdout.toString().split('\n');
|
||||
result.os = util.getValue(lines, 'kern.hostid', ':').toLowerCase();
|
||||
result.hardware = util.getValue(lines, 'kern.hostuuid', ':').toLowerCase();
|
||||
result.hardware = util.getValue(lines, 'kern.hostid', ':').toLowerCase();
|
||||
result.os = util.getValue(lines, 'kern.hostuuid', ':').toLowerCase();
|
||||
if (result.os.indexOf('unknown') >= 0) { result.os = ''; }
|
||||
if (result.hardware.indexOf('unknown') >= 0) { result.hardware = ''; }
|
||||
if (callback) {
|
||||
|
||||
Reference in New Issue
Block a user