Forum: Cfengine Help
Subject: Re: CFEngine hang on a custom service restart
Author: yrouxel
Link to topic: https://cfengine.com/forum/read.php?3,20265,20273#msg-20273
Hi Bernt,
Thanks for your answer.
Unfortunately, it doesn't work either.
By the way, I have noticed that command promises, don't take into account the
return code of the command executed; as a consequence, should the command fail,
cfengine would report a repaired/kept promise ... I use to work around this
problem with a test file touched at the end of the command, that I can test in
the next iteration of the bundle with a fileexists function:
...
classes:
command_ok expression => fileexists("/tmp/command.ok");
....
commands:
"/bin/bash -c \"rm -rf /tmp/command.ok; if /sbin/service foo restart;
then touch /tmp/command.ok; fi > /dev/null 2>&1 \"";
.....
The same problem is true for package promises. I think that the upcoming
version 3.1.3 will provide some means to solve these problems.
Regards,
Yann
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine