I'm trying  the following which doesn't work:

 

    vars:

        # parse /etc/digitalglobe.conf into the array $(config)

        "config_count" int => readstringarray("config",
"/etc/digitalglobe.conf", "#[^\n]*", "=", 20, 2000);

 

    classes:

        # create a class named config_$RUNTIME if there is a RUNTIME
entry in digitalglobe.conf

        "runtime_$(config[RUNTIME])" expression =>
isvariable("config[RUNTIME]");

 

I get the error

 

!! Class identifier contains illegal characters

Promise (version not specified) belongs to bundle 'dg' in file
'./dgvars.cf' near line 49

 

The following entry is in the unit_report_custom.cf that ships with
Cfengine:

 

"have_$(software)" expression => fileexists("/usr/bin/$(software)");

 

which would seem to indicate that array elements cannot be used in class
definitions. So I have two questions:

 

1: Can isvariable() take an array element?

 

2: How DO you create a class based on the value of an array element?

 

Thanks,

Justin

 


This electronic communication and any attachments may contain confidential and 
proprietary 
information of DigitalGlobe, Inc. If you are not the intended recipient, or an 
agent or employee 
responsible for delivering this communication to the intended recipient, or if 
you have received 
this communication in error, please do not print, copy, retransmit, disseminate 
or 
otherwise use the information. Please indicate to the sender that you have 
received this 
communication in error, and delete the copy you received. DigitalGlobe reserves 
the 
right to monitor any electronic communication sent or received by its 
employees, agents 
or representatives.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to