Skip to content

Commit

Permalink
Merge pull request #5679 from victormlg/ENT-10078-add-cfedition-variable
Browse files Browse the repository at this point in the history
Added default:sys.cf_edition variable
  • Loading branch information
olehermanse authored Jan 16, 2025
2 parents f23c912 + 81a56e8 commit 8bf3d06
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion libpromises/generic_agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,17 @@ void GenericAgentInitialize(EvalContext *ctx, GenericAgentConfig *config)

EvalContextClassPutHard(ctx, "any", "source=agent");

GenericAgentAddEditionClasses(ctx);
GenericAgentAddEditionClasses(ctx); // May set "enterprise_edition" class

const Class *enterprise_edition = EvalContextClassGet(ctx, "default", "enterprise_edition");
if (enterprise_edition == NULL)
{
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_edition", "community", CF_DATA_TYPE_STRING, "derived-from=enterprise_edition,report");
}
else
{
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_edition", "enterprise", CF_DATA_TYPE_STRING, "derived-from=enterprise_edition,report");
}

/* Make sure the chroot for recording changes this process would normally
* make on the system is setup if that was requested. */
Expand Down

0 comments on commit 8bf3d06

Please sign in to comment.