2846850d63
New Features: - allow function calls in promiser using universal "with" attribute. (CFE-1092) - add example of with attribute (CFE-1092) - Detect Amazon Linux and set "AmazonLinux" hard class and sys.flavour variable. - New sysctlvalue() and data_sysctlvalues() functions from /proc/sys (CFE-2513) - readdata() also auto-detects .yml files as YAML - Added support for ENV and CSV file parsing (CFE-1881) - Added vars and classes for CoreOS (ENT-3043) - cf-agent: implement --show-evaluated-vars and --show-evaluated-classes - Support for custom ports and host names as policy hub (CFE-953) - cf-promises: allows --show-vars and --show-classes to take an optional filter - Added a new tool: cf-net. cf-net is a CLI for the CFEngine network protocol, useful for debugging, testing etc. (CFE-2493) - New policy variable: sys.cf_net contains path to cf-net binary - Read /etc/os-release into sys.os_release (CFE-1881) - Full changelog at https://github.com/cfengine/core/blob/3.11.0/ChangeLog OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=164
50 lines
2.3 KiB
Diff
50 lines
2.3 KiB
Diff
From b81b3cde4794eb7a195e49f782fbfab930cd1a2c Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
|
|
Date: Thu, 30 Jul 2015 10:48:47 +0200
|
|
Subject: [PATCH 1/2] Set sys.bindir to /usr/sbin, expect cf-*components there
|
|
|
|
That's where the /var/cfengine/bin/* symlinks point to and where
|
|
the systemd .service files expect the daemons.
|
|
|
|
This path is used in 'processes' of
|
|
masterfiles/update/update_processes.cf:enable_cfengine_agents
|
|
---
|
|
libenv/sysinfo.c | 7 +++----
|
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/libenv/sysinfo.c b/libenv/sysinfo.c
|
|
index 06f2095270df..d615f5ed6e1d 100644
|
|
--- a/libenv/sysinfo.c
|
|
+++ b/libenv/sysinfo.c
|
|
@@ -586,8 +586,7 @@ static void GetNameInfo3(EvalContext *ctx)
|
|
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "masterdir", GetMasterDir(), CF_DATA_TYPE_STRING, "source=agent");
|
|
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "inputdir", GetInputDir(), CF_DATA_TYPE_STRING, "source=agent");
|
|
|
|
- snprintf(workbuf, CF_BUFSIZE, "%s%cbin", workdir, FILE_SEPARATOR);
|
|
- EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "bindir", workbuf, CF_DATA_TYPE_STRING, "source=agent");
|
|
+ EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "bindir", "/usr/bin", CF_DATA_TYPE_STRING, "source=agent");
|
|
|
|
snprintf(workbuf, CF_BUFSIZE, "%s%cfailsafe.cf", GetInputDir(), FILE_SEPARATOR);
|
|
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "failsafe_policy_path", workbuf, CF_DATA_TYPE_STRING, "source=agent");
|
|
@@ -632,7 +631,7 @@ static void GetNameInfo3(EvalContext *ctx)
|
|
components[i]);
|
|
}
|
|
#else
|
|
- snprintf(name, CF_MAXVARSIZE - 1, "%s%cbin%c%s", workdir, FILE_SEPARATOR, FILE_SEPARATOR, components[i]);
|
|
+ snprintf(name, CF_MAXVARSIZE - 1, "/usr/bin/%s", components[i]);
|
|
#endif
|
|
|
|
have_component[i] = false;
|
|
@@ -655,7 +654,7 @@ static void GetNameInfo3(EvalContext *ctx)
|
|
snprintf(name, CF_MAXVARSIZE - 1, "%s%cbin%c%s.exe", workdir, FILE_SEPARATOR, FILE_SEPARATOR,
|
|
components[1]);
|
|
#else
|
|
- snprintf(name, CF_MAXVARSIZE - 1, "%s%cbin%c%s", workdir, FILE_SEPARATOR, FILE_SEPARATOR, components[1]);
|
|
+ snprintf(name, CF_MAXVARSIZE - 1, "/usr/bin/%s", components[1]);
|
|
#endif
|
|
|
|
if (stat(name, &sb) != -1)
|
|
--
|
|
2.11.0
|
|
|