system() uuid lowercase as in uuid()
This commit is contained in:
+4
-4
@@ -51,7 +51,7 @@ function system(callback) {
|
||||
result.model = util.getValue(lines, 'product name');
|
||||
result.version = util.getValue(lines, 'version');
|
||||
result.serial = util.getValue(lines, 'serial number');
|
||||
result.uuid = util.getValue(lines, 'uuid');
|
||||
result.uuid = util.getValue(lines, 'uuid').toLowerCase();
|
||||
result.sku = util.getValue(lines, 'sku number');
|
||||
// }
|
||||
// Non-Root values
|
||||
@@ -66,7 +66,7 @@ function system(callback) {
|
||||
result.model = result.model === '' ? util.getValue(lines, 'product_name') : result.model;
|
||||
result.version = result.version === '' ? util.getValue(lines, 'product_version') : result.version;
|
||||
result.serial = result.serial === '' ? util.getValue(lines, 'product_serial') : result.serial;
|
||||
result.uuid = result.uuid === '' ? util.getValue(lines, 'product_uuid') : result.uuid;
|
||||
result.uuid = result.uuid === '' ? util.getValue(lines, 'product_uuid').toLowerCase() : result.uuid;
|
||||
} catch (e) {
|
||||
util.noop();
|
||||
}
|
||||
@@ -262,7 +262,7 @@ function system(callback) {
|
||||
result.model = util.getValue(lines, 'model', '=', true);
|
||||
result.version = util.getValue(lines, 'version', '=', true);
|
||||
result.serial = util.getValue(lines, 'ioplatformserialnumber', '=', true);
|
||||
result.uuid = util.getValue(lines, 'ioplatformuuid', '=', true);
|
||||
result.uuid = util.getValue(lines, 'ioplatformuuid', '=', true).toLowerCase();
|
||||
result.sku = util.getValue(lines, 'board-id', '=', true);
|
||||
}
|
||||
if (callback) { callback(result); }
|
||||
@@ -283,7 +283,7 @@ function system(callback) {
|
||||
result.model = util.getValue(lines, 'name', '=');
|
||||
result.version = util.getValue(lines, 'version', '=');
|
||||
result.serial = util.getValue(lines, 'identifyingnumber', '=');
|
||||
result.uuid = util.getValue(lines, 'uuid', '=');
|
||||
result.uuid = util.getValue(lines, 'uuid', '=').toLowerCase();
|
||||
// detect virtual (1)
|
||||
if (result.model.toLowerCase() === 'virtualbox' || result.model.toLowerCase() === 'kvm' || result.model.toLowerCase() === 'virtual machine' || result.model.toLowerCase() === 'bochs' || result.model.toLowerCase().startsWith('vmware')) {
|
||||
result.virtual = true;
|
||||
|
||||
Reference in New Issue
Block a user