Merge branch 'master' of https://github.com/Ylianst/MeshCentral
This commit is contained in:
commit
467a30ba66
|
@ -1825,16 +1825,35 @@ function getSystemInformation(func) {
|
||||||
if (results.hardware.windows.osinfo) { delete results.hardware.windows.osinfo.Node; }
|
if (results.hardware.windows.osinfo) { delete results.hardware.windows.osinfo.Node; }
|
||||||
if (results.hardware.windows.partitions) { for (var i in results.hardware.windows.partitions) { delete results.hardware.windows.partitions[i].Node; } }
|
if (results.hardware.windows.partitions) { for (var i in results.hardware.windows.partitions) { delete results.hardware.windows.partitions[i].Node; } }
|
||||||
} catch (ex) { }
|
} catch (ex) { }
|
||||||
|
if (!results.hardware.identifiers['bios_serial']) {
|
||||||
try {
|
try {
|
||||||
var values = require('win-wmi').query('ROOT\\CIMV2', "SELECT * FROM Win32_Bios", ['SerialNumber']);
|
var values = require('win-wmi').query('ROOT\\CIMV2', "SELECT * FROM Win32_Bios", ['SerialNumber']);
|
||||||
results.hardware.identifiers['bios_serial'] = values[0]['SerialNumber'];
|
results.hardware.identifiers['bios_serial'] = values[0]['SerialNumber'];
|
||||||
} catch (ex) { }
|
} catch (ex) { }
|
||||||
}
|
}
|
||||||
|
if (!results.hardware.identifiers['bios_mode']) {
|
||||||
|
try {
|
||||||
|
results.hardware.identifiers['bios_mode'] = 'Legacy';
|
||||||
|
for (var i in results.hardware.windows.partitions) {
|
||||||
|
if (results.hardware.windows.partitions[i].Description=='GPT: System') {
|
||||||
|
results.hardware.identifiers['bios_mode'] = 'UEFI';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (ex) { results.hardware.identifiers['bios_mode'] = 'Legacy'; }
|
||||||
|
}
|
||||||
|
}
|
||||||
if(results.hardware && results.hardware.linux) {
|
if(results.hardware && results.hardware.linux) {
|
||||||
|
if (!results.hardware.identifiers['bios_serial']) {
|
||||||
if (require('fs').statSync('/sys/class/dmi/id/product_serial').isFile()){
|
if (require('fs').statSync('/sys/class/dmi/id/product_serial').isFile()){
|
||||||
results.hardware.identifiers['bios_serial'] = require('fs').readFileSync('/sys/class/dmi/id/product_serial').toString().trim();
|
results.hardware.identifiers['bios_serial'] = require('fs').readFileSync('/sys/class/dmi/id/product_serial').toString().trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!results.hardware.identifiers['bios_mode']) {
|
||||||
|
try {
|
||||||
|
results.hardware.identifiers['bios_mode'] = (require('fs').statSync('/sys/firmware/efi').isDirectory() ? 'UEFI': 'Legacy');
|
||||||
|
} catch (ex) { results.hardware.identifiers['bios_mode'] = 'Legacy'; }
|
||||||
|
}
|
||||||
|
}
|
||||||
results.hardware.agentvers = process.versions;
|
results.hardware.agentvers = process.versions;
|
||||||
replaceSpacesWithUnderscoresRec(results);
|
replaceSpacesWithUnderscoresRec(results);
|
||||||
var hasher = require('SHA384Stream').create();
|
var hasher = require('SHA384Stream').create();
|
||||||
|
|
|
@ -11673,6 +11673,7 @@
|
||||||
if (ident.bios_vendor) { x += addDetailItem("Vendor", EscapeHtml(ident.bios_vendor), s); }
|
if (ident.bios_vendor) { x += addDetailItem("Vendor", EscapeHtml(ident.bios_vendor), s); }
|
||||||
if (ident.bios_version) { x += addDetailItem("Version", EscapeHtml(ident.bios_version), s); }
|
if (ident.bios_version) { x += addDetailItem("Version", EscapeHtml(ident.bios_version), s); }
|
||||||
if (ident.bios_serial) { x += addDetailItem("Serial", EscapeHtml(ident.bios_serial), s); }
|
if (ident.bios_serial) { x += addDetailItem("Serial", EscapeHtml(ident.bios_serial), s); }
|
||||||
|
if (ident.bios_mode) { x += addDetailItem("Mode", EscapeHtml(ident.bios_mode), s); }
|
||||||
if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip64.png' }); }
|
if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip64.png' }); }
|
||||||
|
|
||||||
// Motherboard
|
// Motherboard
|
||||||
|
|
Loading…
Reference in New Issue