Skip to content

Commit 2fa7d22

Browse files
committed
Handle sys.os_name_human on gentoo
On my Gentoo I got: warning: Operating System not properly recognized, setting sys.os_name_human to "Unknown", please submit a bug report for us to fix this This patch permit to set sys.os_name_human to Gentoo Successfully tested on cfengine-3.24.2 Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
1 parent 7b0a3fe commit 2fa7d22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libenv/sysinfo.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3685,6 +3685,12 @@ static void SysOSNameHuman(EvalContext *ctx)
36853685
"Alpine", CF_DATA_TYPE_STRING,
36863686
"source=agent,derived-from=alpine");
36873687
}
3688+
else if (EvalContextClassGet(ctx, NULL, "gentoo") != NULL)
3689+
{
3690+
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, lval,
3691+
"Gentoo", CF_DATA_TYPE_STRING,
3692+
"source=agent,derived-from=gentoo");
3693+
}
36883694
else
36893695
{
36903696
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, lval,

0 commit comments

Comments
 (0)