1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 07:43:50 +00:00

added cpu_name for macOS

This commit is contained in:
Bryan Roe
2020-04-27 00:13:48 -07:00
parent b1872004b0
commit b8e58a37f7
2 changed files with 12 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -229,6 +229,13 @@ function macos_identifiers()
child.waitExit();
ret.identifiers.product_uuid = child.stdout.str.trim();
child = require('child_process').execFile('/bin/sh', ['sh']);
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
child.stdin.write('sysctl -n machdep.cpu.brand_string\nexit\n');
child.waitExit();
ret.identifiers.cpu_name = child.stdout.str.trim();
trimIdentifiers(ret.identifiers);
return (ret);
}