Cfengine Help: Re: Strange behaviour with insert_lines

2010-10-19 Thread no-reply
Forum: Cfengine Help Subject: Re: Strange behaviour with insert_lines Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,18780,18795#msg-18795 I have written an edit_line body called replace_or_add, which I think could be useful for what you want to achieve. It takes a regular

Cfengine Help: Re: Cfengine Help: Re: Strange behaviour with insert_lines

2010-10-19 Thread no-reply
Forum: Cfengine Help Subject: Re: Cfengine Help: Re: Strange behaviour with insert_lines Author: babudro Link to topic: https://cfengine.com/forum/read.php?3,18791,18794#msg-18794 Daniel V. Klein Wrote: --- > Look at "empty_file_before

Cfengine Help: Re: Strange behaviour with insert_lines

2010-10-19 Thread no-reply
Forum: Cfengine Help Subject: Re: Strange behaviour with insert_lines Author: babudro Link to topic: https://cfengine.com/forum/read.php?3,18780,18792#msg-18792 Yes, agreed, I understand that, and this is what I thought I was doing, but as I wrote above when I empty the file first I thought it wo

Re: Cfengine Help: Re: Strange behaviour with insert_lines

2010-10-19 Thread Daniel V. Klein
Look at "empty_file_before_editing". You need to know that cfengine doesn't actually empty the file that you are promising - it makes a copy, does the edits on the copy, and overwrites the existing file if it needs to. So when you say "empty_file_before_editing", it starts the edits on a clean

Cfengine Help: Re: Strange behaviour with insert_lines

2010-10-19 Thread no-reply
Forum: Cfengine Help Subject: Re: Strange behaviour with insert_lines Author: mark Link to topic: https://cfengine.com/forum/read.php?3,18780,18789#msg-18789 Don't make it harder than it needs to be. Unless you need to preserve something that is already there, just use a complete template for th

Cfengine Help: Re: Strange behaviour with insert_lines

2010-10-19 Thread no-reply
Forum: Cfengine Help Subject: Re: Strange behaviour with insert_lines Author: babudro Link to topic: https://cfengine.com/forum/read.php?3,18780,18788#msg-18788 Hmmm, I'm not seeing the "light" yet. What then would be the recommended method of re-writing an entire file (such as ntp.conf) so that

Cfengine Help: Re: Strange behaviour with insert_lines

2010-10-19 Thread no-reply
Forum: Cfengine Help Subject: Re: Strange behaviour with insert_lines Author: babudro Link to topic: https://cfengine.com/forum/read.php?3,18780,18782#msg-18782 Okay, that was the enlightenment I needed. Thanks, Mark! ___ Help-cfengine mailing list Hel

Cfengine Help: Re: Strange behaviour with insert_lines

2010-10-19 Thread no-reply
Forum: Cfengine Help Subject: Re: Strange behaviour with insert_lines Author: mark Link to topic: https://cfengine.com/forum/read.php?3,18780,18781#msg-18781 I think you are stumbling over convergent behaviour, and forgetting that each promise is an independent entity. Try putting everything in o