mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 15:53:55 +00:00
Added cpu_name for linux
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -47,6 +47,12 @@ function linux_identifiers()
|
|||||||
identifiers['board_version'] = ret['board_version'];
|
identifiers['board_version'] = ret['board_version'];
|
||||||
identifiers['product_uuid'] = ret['product_uuid'];
|
identifiers['product_uuid'] = ret['product_uuid'];
|
||||||
|
|
||||||
|
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
||||||
|
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
|
||||||
|
child.stdin.write('cat /proc/cpuinfo | grep "model name" | ' + "tr '\\n' ':' | awk -F: '{ print $2 }'\nexit\n");
|
||||||
|
child.waitExit();
|
||||||
|
identifiers['cpu_name'] = child.stdout.str.trim();
|
||||||
|
|
||||||
values.identifiers = identifiers;
|
values.identifiers = identifiers;
|
||||||
values.linux = ret;
|
values.linux = ret;
|
||||||
trimIdentifiers(values.identifiers);
|
trimIdentifiers(values.identifiers);
|
||||||
|
|||||||
Reference in New Issue
Block a user