From 75a92ce48509c516adb34f7de507b8e86d278b57 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Wed, 4 Oct 2023 19:51:59 +0000 Subject: [PATCH] add linux bios serial Signed-off-by: Simon Smith --- agents/meshcore.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agents/meshcore.js b/agents/meshcore.js index 92c79ae8..174a7c04 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1830,6 +1830,11 @@ function getSystemInformation(func) { results.hardware.identifiers['bios_serial'] = values[0]['SerialNumber']; } catch (ex) { } } + if(results.hardware && results.hardware.linux) { + 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.agentvers = process.versions; replaceSpacesWithUnderscoresRec(results); var hasher = require('SHA384Stream').create();