If have come to a stage when i need to pass on the different entries in a list 
as keys in an array.

I have:
PATCHES_COMMON     = ( cpio.patch:ee.patch )

And:
PATCHDIRS_COMMON   = ( A(cpio.patch,"/usr/src/gnu/usr.bin/cpio")
                       A(ee.patch,"/usr/src/usr.bin/ee") )

What i now want to do is to pass both the filename of the patch (in 
PATCHES_COMMON) and
use each value to retrieve the corresponding patch-directory from the array. Is 
this possible in any way 
with cfengine?

When using this command, ${PATCHES_COMMON} expands successfully. But when 
passed on as 
a key, cfengine passes the whole list as a string instead of each, unique entry.

shellcommands:
        freebsd::
          "$(masterfiles)/patches/patch_common.sh ${PATCHES_COMMON} 
${PATCHDIRS_COMMON[${PATCHES_COMMON}]}"


From output:

cf:cfengine::/var/cfengine/inputs/os/cf.patch_freebsd:77: Non identifier 
character (.) in variable 
identifier (PATCHDIRS_COMMON[cpio.patch:ee.patch])


-- 

Jon-Finngard Moe                   Email: [EMAIL PROTECTED]
mnemonic AS, Wergelandsveien 25         Mob  : +47 98 64 58 62
N-0167 Oslo, Norway                     Tlf  : +47 23 20 47 45 
                                        Fax  : +47 23 20 47 01
PGP key EEAADBBA available from pgp.mit.edu

Attachment: pgp10W70Jzu9w.pgp
Description: PGP signature

_______________________________________________
Help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to