help-cfengine
[Top][All Lists]
Advanced

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

Using editfiles in method


From: Free Ekanayaka
Subject: Using editfiles in method
Date: Fri, 15 Oct 2004 11:40:32 +0200
User-agent: T-gnus/6.15.7 (based on Oort Gnus v0.08) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 MULE XEmacs/21.4 (patch 15) (Security Through Obscurity) (i386-debian-linux)

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





reply via email to

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