Another workaround is to just add / before the $. Double /'s doesn't seem to hurt anything. It does seem that the check should happen after macro expansion though.
-Jason Martin > -----Original Message----- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > org] On Behalf Of Chip Seraphine > Sent: Tuesday, October 04, 2005 2:51 PM > To: Cfengine Mailing List Help > Subject: absolute path errors in 2.1.16 > > > I am seeing apparently-spurious errors like this: > > cf:cfengine::/var/cfengine/inputs/cf.networkinfo:219: > ExecResult(/command) must specify an absolute path > > The command in question is fine: > > master1_hostline= > ( ExecResult(${workdir}/bin/get-hostline master1 > master1) ) > > > The workdir variable is unconditionally set earlier in the run (in > cfagent.conf), and this line has never thrown errors in the past. > > The error seems to come from HandleExecResult in function.c, > which does > a hard check to see if the first character in the *args string is a > '/'. This appears to be part of the parser, and my guess > is that it > fires before variable expansion takes place. (A similar > situation might > exist in HandleFunctionExec in the same file.) > > If I am guessing correctly, then presumably variable > expansion needs to > take place earlier. If that can't be done, an obvious (but hacky) > workaround would be to allow $ followed by some manner of > open-brace as > an alternative to a slash character. > > I commented out the check in my own setup and recompiled, and the > problem went away. > > Personally I'm of the opinion that the forced-abspath stuff > is much more > pain than it is worth.... if we can't trust the maintainer > to set up > his PATH correctly, we are probably already doomed :) > > > _______________________________________________ > Help-cfengine mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-> cfengine > _______________________________________________ Help-cfengine mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-cfengine
