1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added tiny core support.

This commit is contained in:
Ylian Saint-Hilaire 2021-01-24 18:43:15 -08:00
parent bbcda31008
commit 70b53b0f1c
7 changed files with 1225 additions and 1191 deletions

View file

@ -161,6 +161,9 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
if ((obj.agentCoreCheck == 1001) || (obj.agentCoreUpdate == true)) {
// If the user asked, use the recovery core.
corename = parent.parent.meshAgentsArchitectureNumbers[obj.agentInfo.agentId].rcore;
} else if (obj.agentCoreCheck == 1011) {
// If the user asked, use the tiny core.
corename = parent.parent.meshAgentsArchitectureNumbers[obj.agentInfo.agentId].tcore;
} else if (obj.agentInfo.capabilities & 0x40) {
// If this is a recovery agent, use the agent recovery core.
corename = parent.parent.meshAgentsArchitectureNumbers[obj.agentInfo.agentId].arcore;
@ -174,7 +177,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
if (corename != null) {
const meshcorehash = parent.parent.defaultMeshCoresHash[corename];
if (agentMeshCoreHash != meshcorehash) {
if ((obj.agentCoreCheck < 5) || (obj.agentCoreCheck == 1001) || (obj.agentCoreUpdate == true)) {
if ((obj.agentCoreCheck < 5) || (obj.agentCoreCheck == 1001) || (obj.agentCoreCheck == 1011) || (obj.agentCoreUpdate == true)) {
if (meshcorehash == null) {
// Clear the core
obj.sendBinary(common.ShortToStr(10) + common.ShortToStr(0)); // MeshCommand_CoreModule, ask mesh agent to clear the core