help-cfengine
[Top][All Lists]
Advanced

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

Re: Using editfiles in method


From: Predrag Zecevic - Solaris System Administrator
Subject: Re: Using editfiles in method
Date: Fri, 15 Oct 2004 14:49:21 +0200
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7.3) Gecko/20040915

Hi,

did you tried: ${file} instead of $(file)?
Regards ;-)

Free Ekanayaka wrote:

Hi all,

I'm experiencing a weird problem.

This is the conf file:

### test.conf ##################################
control:

  actionsequence = ( methods )

methods:

  EditMyFile(/my/file)

          action=cf.editmyfile
################################################

And this is the method file:

### /var/lib/cfengine2/modules/cf.editmyfile ###

control:

MethodName       = ( EditMyFile )
MethodParameters = ( file )

actionsequence = ( editfiles )

editfiles:

   { "$(file)"

     # Some commands here

   }
################################################

But then the editfile action is not taken..

From the log I can read:

[...]
cfengine::EditMyFile: Setting transmitted variable file = ( /my/file )
[...]
Method EditMyFile found, but arguments did not match
Method EditMyFile not defined

The weird thing is that if I hard-wire the parameter, e.g. :

   { /my/file

     # Some commands here

   }

then everything is fine,  and I can  even use the $(file)  variable in
the editfiles commands.

I've tried also without "" :

   { $(file)

     # Some commands here

   }

but no way..

Hints?

Cheers,

Free



_______________________________________________
Help-cfengine mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-cfengine

--
| Predrag Zecevic | e-Mail: address@hidden |
| 2e Systems GmbH |              Tel: (+49)[0]6107 989 415 |
|Im Taubengrund 12|              Fax: (+49)[0]6107 989 494 |
|65451 Kelsterbach|                                        |
|     Germany     |         Cellular: (+49)[0]174 3109 288 |
+=================+
Some of them want to use you, Some of them want to be used by you, 
...Everybody's looking for something. -- Eurythmics





reply via email to

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