So going back and looking at the dist file again, one actually does not need to get and modify the boardID and nonSupportedModels arrays. We can fix things up just by selectively returning true.
So, change the following code from:
to
@dosdude1, if you make your code make these changes, it should work regardless of machine/boardId rather than having to test for different types.
Updating my link here #1455
So, change the following code from:
Code:
var currentModel = system.sysctl('hw.model');
if (nonSupportedModels.indexOf(currentModel) >= 0) {
my.result.message = system.localizedString('ERROR_1');
my.result.type = 'Fatal';
return false;
}
var boardId = system.ioregistry.fromPath('IOService:/')['board-id'];
if (boardIds.indexOf(boardId) == -1) {
my.result.message = system.localizedString('ERROR_1');
my.result.type = 'Fatal';
return false;
}
to
Code:
var currentModel = system.sysctl('hw.model');
if (nonSupportedModels.indexOf(currentModel) >= 0) {
my.result.message = system.localizedString('ERROR_1');
my.result.type = 'Fatal';
return true;
}
var boardId = system.ioregistry.fromPath('IOService:/')['board-id'];
if (boardIds.indexOf(boardId) == -1) {
my.result.message = system.localizedString('ERROR_1');
my.result.type = 'Fatal';
return true;
}
@dosdude1, if you make your code make these changes, it should work regardless of machine/boardId rather than having to test for different types.
Updating my link here #1455