help-cfengine
[Top][All Lists]
Advanced

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

Re: Module class contained an illegal character (-)


From: Chris (Ducky) Chapin
Subject: Re: Module class contained an illegal character (-)
Date: Fri, 23 Aug 2002 08:47:12 -0700 (PDT)

Right before this statement:

     print "+$class_install_patch\n";

try adding this:

     $class_install_patch =~ tr/-/_/ ;

-Ducky
--

 Christopher 'Ducky' Chapin                        ducky@qualcomm.com
 Unix Systems Administrator - Qualcomm, Inc.           (858) 651-5433
 IT Host Services - AE-209F                                 

On Fri, 23 Aug 2002, Sabrina Lautier wrote:

> Hi all !
> 
> Here is the error message I get when my cfengine script call a module 
> I wrote:
> -------------------------------------------------------------------
> cfengine:<servername>: Module class contained an illegal character (-
> ).
> Only alphanumeric or underscores in classes.
> -------------------------------------------------------------------
> This is more a warning message than an error one as the script keep 
> running and doesn't return an error code.
> 
> The module (module:test) is called with the following arguments:
> module:test module_exec_ok install_patch patchlist $(path1) $(path2) 
> $(serverfullname) $(domainname) $(allclasses)
> 
> The first 2 arguments are module classes previously defined 
> in 'AddInstallable' and as you can see don't contain any dash (-).
> $(path1) and $(path2) are in the form /aaa/bbb/ccc and don't contain 
> any dash.
> $(serverfullname) and $(domainname) are in the form xxx.yyy.zzz and 
> don't contain any dash either.
> On the other hand, the variable $(allclasses) does contain dashes.
> Some are classes defined with the cfagent -D option:
>  * patch_108528-15
>  * patch_108456-11
> with cfagent called this way: cfagent -Dpatch_108528-15 -
> Dpatch_108456-11)
> Some are system's specific like : pin-23
> 
> My module looks like this:
> -------------------------------------------------------------------
> #!/usr/bin/perl
> # Set parameters
> my ($class_ok,$class_install_patch,$macro_patcheslist, ...) = @_;
> # lots of computation
> if (<condition>)
>   {
>     printf("=$macro_patcheslist=%s\n",108528-15:108456-11));
>     print "+$class_install_patch\n";
>   }
> print "+$class_ok\n";
> -------------------------------------------------------------------
> 
> Thinking that the pb might be due to the '-' in patch_xxxxxx-xx, I've 
> replaced it with a '_' but this didn't changed anything and the 
> warning message still appeared.
> 
> I don't know where the pb is from as none of my module classes 
> contain any dash... Why does the function CheckClass (in cfagent.c) 
> find one ?
> Any idea ?
> 
> Thanks in advance for any help.
> 
> Sabrina





reply via email to

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