help-cfengine
[Top][All Lists]
Advanced

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

Cfengine 2.1.10 - variable not set by ExecResult ?


From: Christian Korschan
Subject: Cfengine 2.1.10 - variable not set by ExecResult ?
Date: Tue, 28 Sep 2004 05:31:28 GMT
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0; hi, Mom) Gecko/20020604

I have the following problem when using one of the following
statements in control:

   osversion = ( ExecResult(/bin/echo `/bin/uname -s`-`/bin/uname -r`) )
   osversion = ( ExecResult(PATH/osversion) )
   osversion = ( "exec PATH/osversion" )
   osversion = ( "exec /bin/echo `/bin/uname -s`-`/bin/uname -r`" )

osversion is not set at all (it's empty) in a copy statement like

copy:
  any::
$(masterfiles)/site/$(site)/$(osversion)/etc/defaultrouter dest=/etc/defaultrouter owner=root group=sys mode=444 type=checksum stealth=on

although cfagent's debug (-d9) output shows

...
Scanning variable osversion
GetMacroValue(main,osversion)
EXPAND $(osversion) -> SunOS-5.9
   295 : osversion=SunOS-5.9

Everything works as expected when osversion is set in cfagent's
executing environment with "export osversion=`uname -s`-`uname -r`"
and ExecResult is not used. Obviously this is weird because one has
to take care that osversion *is* set in the executing environment, but
using ExecResult would make it clear in cfagent.conf what osversion is set to without having to care about what has (not) been done
outside cfagent.conf

Does anybody know how to make ExecResult work in Cfengine 2.1.10 ?

Thanks
--
Christian Korschan                     Systems Specialist CTBTO/IDC
Vienna International Centre
P.O. BOX 1200, A-1400 Vienna, Austria       Phone: +43(1)26030 6184
PGP Fingerprint: FD2E E684 C1A4 6AA8 B342  F73E 946B 7DC7 A3F8 8666

reply via email to

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