help-cfengine
[Top][All Lists]
Advanced

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

Re: ReturnsZero(): command does not return zero. Is classcreatedwith val


From: Mark . Burgess
Subject: Re: ReturnsZero(): command does not return zero. Is classcreatedwith value of false?
Date: Thu, 29 Apr 2004 17:58:15 +0200 (MEST)

I cannot think of anything that I have done, but I do remember someone
sending me a patch for something a while ago. I would be worth
checking to see if there is a difference.
M

On 28 Apr, Villalovos, John L wrote:
>> Has anything happened on this issue?
>> 
>> I just upgraded from 2.0.7p3 to 2.1.5 and now my ReturnsZero
>> statements don't seem to work anymore :(
>> 
>> 
>>     groups:
>> 
>>         # The web server is called httpd in Red Hat 8.0 forward
>>         hasWebServer_rh8 = ( ReturnsZero(/bin/rpm -q --quiet httpd) )
>>         # The web server is called apache in Red Hat 7.x
>>         hasWebServer_rh7 = ( ReturnsZero(/bin/rpm -q --quiet apache) )
>>         # See if phpMyAdmin is installed
>>         has_phpMyAdmin = ( ReturnsZero(/bin/rpm -q --quiet
>> phpMyAdmin) ) 
>> 
>>     shellcommands:
>> 
>>         webServer.redhat_7.!hasWebServer_rh7::
>>             "/usr/sbin/up2date apache"
>>             "/sbin/chkconfig httpd on"
>>             "/sbin/service httpd start"
>> 
>>         webServer.redhat_8.!hasWebServer_rh8::
>>             "/usr/sbin/up2date httpd"
>>             "/sbin/chkconfig httpd on"
>>             "/sbin/service httpd start"
>> 
>>         # Install phpMyAdmin if a phpMyAdmin server
>>         phpMyAdminServer.!has_phpMyAdmin::
>>             "/usr/sbin/up2date phpMyAdmin"
>> 
>> 
>> After upgrading to 2.1.5, none of my ReturnsZero commands are working.
>> The classes are not being created.
> 
> I played around with this some more and ran cfagent -d0 -v and found the
> following:
> 
> RVAL-FUNCTION ReturnsZero(/bin/rpm -q --quiet httpd)
> HandleFunctionObject(ReturnsZero(/bin/rpm -q --quiet httpd))
> IsBuiltinFunction(ReturnsZero(/bin/rpm -q --quiet httpd))
> IsBuiltinFunction: ReturnsZero(/bin/rpm -q --quiet httpd)
> ExpandVarstring(/bin/rpm -q --quiet httpd)
> HandleFunction: ReturnsZero(/bin/rpm -q --quiet httpd)
> HandleReturnsZero(/bin/rpm -q --quiet httpd)
> cfengine:: Wait for child failed
> ExpandVarstring(XX_CF_opposite_any_XX)
> HandleGroupRVal(XX_CF_opposite_any_XX) group (hasWebServer_rh8), type=0
> [No match of class XX_CF_opposite_any_XX]
> 
> So does anyone know why cfengine would have "Wait for child failed"?
> This did NOT happen in 2.0.7.  Did the exec code get changed?
> 
> Thanks,
> John 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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