help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: absolute path errors in 2.1.16


From: Martin, Jason H
Subject: RE: absolute path errors in 2.1.16
Date: Tue, 4 Oct 2005 14:53:26 -0700

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: 
> help-cfengine-bounces+jason.h.martin=cingular.com@gnu.org 
> [mailto:help-cfengine-bounces+jason.h.martin=cingular.com@gnu.
> 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
> Help-cfengine@gnu.org 
> http://lists.gnu.org/mailman/listinfo/help-> cfengine
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]