Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion libenv/sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,12 @@ static void OSClasses(EvalContext *ctx)
SetFlavor(ctx, "gentoo");
}

if (stat("/etc/arch-release", &statbuf) != -1)
if (stat("/etc/manjaro-release", &statbuf) != -1)
{
Log(LOG_LEVEL_VERBOSE, "This appears to be a Manjaro Linux system.");
SetFlavor(ctx, "manjaro");
}
else if (stat("/etc/arch-release", &statbuf) != -1)
{
Log(LOG_LEVEL_VERBOSE, "This appears to be an Arch Linux system.");
SetFlavor(ctx, "archlinux");
Expand Down Expand Up @@ -3508,6 +3513,12 @@ static void SysOSNameHuman(EvalContext *ctx)
"Amazon", CF_DATA_TYPE_STRING,
"source=agent,derived-from=amazon_linux");
}
else if (EvalContextClassGet(ctx, NULL, "manjaro") != NULL)
{
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, lval,
"Manjaro", CF_DATA_TYPE_STRING,
"source=agent,derived-from=manjaro");
}
else if (EvalContextClassGet(ctx, NULL, "arch") != NULL)
{
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, lval,
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/01_vars/02_functions/001.cf
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ bundle agent test
!darwin::
"uid_bin" int => getuid("bin");

(linux.!archlinux.!SuSE.!redhat.!gentoo)|solaris|hpux|aix::
(linux.!manjaro.!archlinux.!SuSE.!redhat.!gentoo)|solaris|hpux|aix::
"num_root" int => "0";
"num_daemon" int => "1";
"num_bin" int => "2";
archlinux|SuSE|redhat|gentoo::
manjaro|archlinux|SuSE|redhat|gentoo::
"num_root" int => "0";
"num_daemon" int => "2";
"num_bin" int => "1";
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/01_vars/02_functions/002.cf
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ bundle agent test
!linux.!freebsd.!solaris.!darwin.!openbsd.!hpux.!aix::
"gid_0" string => "fixme";

archlinux|SuSE|redhat|gentoo::
manjaro|archlinux|SuSE|redhat|gentoo::
"num_daemon" int => "2";
(linux.!archlinux.!SuSE.!redhat.!gentoo)|freebsd|darwin|openbsd::
(linux.!manjaro.!archlinux.!SuSE.!redhat.!gentoo)|freebsd|darwin|openbsd::
"num_daemon" int => "1";
solaris::
"num_daemon" int => "12";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ bundle agent check
"hpux",
"suse",
"opensuse",
"manjaro",
"archlinux",
"windows",
"freebsd",
Expand Down
Loading