can't make PortageInstallCommand work

"Alexandre Racine" <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.bugs
Message-ID <[email protected]>
Hi all,

 

I have been trying to get help in the cfengine-help list, but the guys
now think that my cfagent is not even reading my cfagent.conf file, and
it is, so I am submitting this as a bug. The bug is : I think that
cfengine does not know what is the PortageInstallCommand or what to do
with it.

 

Attached to this email is the cfagent.conf file in question. Let's say
that I did forget something, just slap me and I'll correct it. I am
using cfengine 2.2.7 from portage with Gentoo 2.6.23-gentoo-r8.

 

When running cfagent -v -d1 I eventually saw this line:

Package manager set to none.  Not installing package item

 

I can actually confirm this since I have been hacking in the code with
some "printf" everywhere to trace stuff, and the code never enter the
first "for" line of the file do.c of the procedure CheckPackages.

 

Another point I want to make, is the ScanVariable function in the
varstring.c file. When entering this function with the value of lvalue
of "PortageInstallCommand", it gets compare with the VVNAME table witch
does not contain "PortageInstallCommand". Is this normal?

 

Thanks.

 

 

 

Alexandre Racine

[email protected]

514-461-1300 poste 3304

_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine
cfagent.conf (application/octet-stream, 1.6 KB)
# DEBUT cfagent.conf


#################################################
control:

  any::

    ## How and Where do we output stuff?
    sysadmin = ( [email protected] )
    OutputPrefix = ( "cfengine" )


    ## Set some defaults
    ExpireAfter = ( 30 ) # Don't let cfengine run longer then x minutes.
    domain = ( ExecResult(/bin/hostname -d) ) # Obtain our domain name automatically

    # Where is the good stuff
    policyhost = ( dev4.rg.local )
    workdir = ( /var/cfengine )
    rootfolder = ( /masterfiles/cfengine/rootfolder )
    PortageInstallCommand = ( "/usr/lib/portage/bin/emerge --color=n %s" )
#    PortageInstallCommand = ( "ZZZZ" )



    actionsequence = ( copy packages editfiles shellcommands )



#################################################
copy:

$(rootfolder)/etc	dest=/etc
			r=inf
			server=$(policyhost)




#################################################
packages:


#    PortageInstallCommand = ( "/usr/lib/portage/bin/emerge --color=n %s" )

#	net-analyzer/nmap	cmp=gt	version=4.20	action=install
#	=net-analyzer/nmap-4.20 action=install
>=net-analyzer/nmap-4.20 cmp=ge version=4.20 action=install
		define=joejoe
		elsedefine=peter

#>=net-analyzer/nmap-4.20 cmp=ge version=4.20 action=install


#################################################
editfiles:

gentoo::
	{ /var/spool/cron/crontabs/root
	AutoCreate
	AppendIfNoSuchLine "0,15,30,45 * * * */var/cfengine/bin/cfexecd F"
	}


#################################################
shellcommands:

joejoe::
	"/bin/echo JOEJOE"

peter::
	"/bin/echo PETER"

notexisting::
	"/bin/echo WHAT"











## FIN cfagent.conf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.