Dear cfengine-admirers Am I missing the point or cfengine[2] is missing I would say most-often-used function which can be named like
AssignValue 'X FS' Z which I would use whenever I want change/add_a_line_with a right hand side of any assignment like X FS Y to X FS Z where X is a name FS is field separator (usually is ' *= *' or just ' *') and Y and Z are values The absense of such function and the fact that ReplaceAll doesn't quite fit due to possible recursion, led people to device monsters like http://www.shipyard.com.au/shipyard/articles/sysadmin/cfengine-configfiles.py where for a simple obioius rule like AssignValue '^LogLevel *' 'INFO' is presented as BeginGroupIfNoLineMatching '^LogLevel.*' Append 'LogLevel' EndGroup ResetSearch 1 LocateLineMatching '^LogLevel.*' BeginGroupIfNoMatch '^LogLevel INFO$' ReplaceLineWith 'LogLevel INFO' EndGroup which shows you how much duplication is necessary to handle such situation in a right way. Is there a way to fix the situation or describe me where I'm wrong? Thank you all in advance -- .-. =------------------------------ /v\ ----------------------------= Keep in touch // \\ (yoh@|www.)onerussian.com Yaroslav Halchenko /( )\ ICQ#: 60653192 Linux User ^^-^^ [175555] _______________________________________________ Help-cfengine mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-cfengine
