[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using editfiles in method
From: |
Free Ekanayaka |
Subject: |
Re: Using editfiles in method |
Date: |
Fri, 15 Oct 2004 15:06:48 +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) |
|--==> Predrag Zecevic writes:
PZ> Hi,
PZ> did you tried: ${file} instead of $(file)?
Yes I tried, but no luck :(
Cheers,
Free
>>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
>>Help-cfengine@gnu.org
>>http://lists.gnu.org/mailman/listinfo/help-cfengine
>>
>>