Bug #8933
Updated by François ARMAND about 6 years ago
Hooks with dashes (m.b. other chars) are broken till now. E.g.:
Write hook (in my example it is "Download a file from the shared folder" directive for Ubuntu 14.04):
<pre>
/sbin/initctl 'reload-configuration'; stop bond-check; start bond-check
</pre>
Then agent logs a couple of error lines:
<pre>
Sep 1 10:18:01 m630-43 rudder[114618]: CFEngine(agent) rudder Finished command related to promiser '/sbin/initctl 'reload-configuration'; stop bond-check; start bond-check' -- an error occurred, returned 127
Sep 1 10:18:01 m630-43 rudder[114618]: CFEngine(agent) rudder Q: "...in/initctl 'rel": sh: 1: stop: not found#012Q: "...in/initctl 'rel": sh: 1: start: not found
</pre>
when is running as daemon.
* Note, that "rudder agent run -i" works ok.
Hooks looks like shell scripts and must to work in accordance with shell rules. Otherwise, limitations must be documented.
As for now, hooks text is scrubbing in obscure manner, and then executing selectively.
for example, in:
<pre>
cat <<EOF > /path/to/file
some line 1
other line
etc.
EOF
</pre>
Spaces became broken.