Cfengine Help: Re: edit_lines convergence

2010-12-12 Thread no-reply
Forum: Cfengine Help Subject: Re: edit_lines convergence Author: brawsky Link to topic: https://cfengine.com/forum/read.php?3,19673,19722#msg-19722 Thanks for the info. + +" ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/

Re: Cfengine Help: Re: edit_lines convergence

2010-12-10 Thread Daniel Dehennin
Seva Gluschenko writes: > I've proposed a generic edit_line bundle for /etc/fstab adjustment > recently which can be easily adapted to handle almost any space > separated file: > > bundle edit_line config_option_space_separated(name,value) > { > classes: > "not_there" not => regline("$(

Re: Cfengine Help: Re: edit_lines convergence

2010-12-09 Thread Daniel Dehennin
Seva Gluschenko writes: > Dan, > > the useful policy to keep in mind all the time while creating either > cfengine promises or any other piece of code is KISS (keep it safe and > simple). > > I've proposed a generic edit_line bundle for /etc/fstab adjustment > recently which can be easily adapted

Re: Cfengine Help: Re: edit_lines convergence

2010-12-09 Thread Seva Gluschenko
Dan, the useful policy to keep in mind all the time while creating either cfengine promises or any other piece of code is KISS (keep it safe and simple). I've proposed a generic edit_line bundle for /etc/fstab adjustment recently which can be easily adapted to handle almost any space separated fi

Re: Cfengine Help: Re: edit_lines convergence

2010-12-09 Thread Daniel Dehennin
Daniel Dehennin writes: [...] > The replace_patterns is always repaired: [...] Even a simple one like this: #v+ cat /tmp/main.cf: smtp_host smtp.example.net2 #v- #v+ replace_patterns: HasSMTPhost:: "^(smtp_host)\s+smtp\.example\.net$" replace_with => value("$(match.

Re: Cfengine Help: Re: edit_lines convergence

2010-12-09 Thread Daniel Dehennin
no-re...@cfengine.com writes: > I don't think that PCRE exactly matches Perl regular expressions so > beware when testing with Perl. I tend to use pcregrep to test > matches. However, that is not exactly like Cfengine's use of PCRE > since CF tends to need extra escapes here and there. So I als

Cfengine Help: Re: edit_lines convergence

2010-12-09 Thread no-reply
Forum: Cfengine Help Subject: Re: edit_lines convergence Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,19673,19693#msg-19693 I don't think that PCRE exactly matches Perl regular expressions so beware when testing with Perl. I tend to use pcregrep to test matches. Howe