<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 24/10/2013 13:45, Mikaël Mantel a
écrit :<br>
</div>
<blockquote cite="mid:52690855.8090306@videomuseum.fr" type="cite">Hello
Matthieu,
<br>
<br>
Thank you for the information.
<br>
i had not thought of the absolute path.
<br>
<br>
I understood the rudder way.
<br>
We have a some details, like check is a database or table exist (
and create if not ) , or check one line in a conf file.
<br>
A shell script with a condition is more adjustable for these
tasks.
<br>
And the return code is for collect results on the web interface.
<br>
<br>
Maybe it's not a good idea ?
<br>
<br>
Regards,
<br>
<br>
Mikaël Mantel
<br>
</blockquote>
Hi back,<br>
<br>
To check the line in a conf file, there are quite a lot of
Techniques to do it now, like the "Enforce a file content" one that
can ensure that a specific line is present, replace a pattern or
delete specific patterns, and a Technique to run a command if the
result of another command meets certain criteria is on the tracks.<br>
<br>
I don't really think that relying on an external shell script to do
that is a good idea, because:<br>
<ul>
<li>You need to specify a "protocol" to make Rudder and your shell
bit interoperate (in your case, the return codes)</li>
<li>You are dependant on a separate component besides the Rudder
agent (the shell itself)</li>
<li>Shell scripts are not really made for idempotency by design,
which may conflict with the agent behavior.</li>
</ul>
<p>There is a builtin possibility in CFEngine to extend the agent
possibilities using any executable file: the modules. But it
should be used only in exceptionnal cases.<br>
</p>
<p>Regards,<br>
--<br>
Matthieu CERDA<br>
<br>
</p>
</body>
</html>