Forum: CFEngine Help
Subject: Re: Different versions of standard library in 3.2.3
Author: phnakarin
Link to topic: https://cfengine.com/forum/read.php?3,23911,23917#msg-23917

I did a diff command and found that many template bodies were added to r95. If 
you don't need it then there is no particular reason to keep it up-to-date.

Also, I believe that you already have your own custom body library in place, 
haven't you? 

:-)


# diff masterfiles/cfengine_stdlib.cf examples/cfengine_stdlib.cf 
42c42
< # Subversion : $Rev: 84 $
---
> # Subversion : $Rev: 95 $
181a182,218
> bundle edit_line replace_line_end(start,end)
> #
> # Lines starting with "$(start)" will get the ending given in "$(end)",
> # whitespaces will be left unmodified.
> # For example, replace_line_end("ftp", "2121/tcp") would replace
> # "ftp             21/tcp"
> # with 
> # "ftp             2121/tcp"
> {
> field_edits:
> 
>    "\s*$(start)\s.*"
>       edit_field => line("(^|\s)$(start)\s*", "2", "$(end)","set");
> }
> 
> ##
> 
> bundle edit_line append_to_line_end(start,end)
> #
> # Lines starting with "$(start)" and not ending with "$(end)"
> # will get appended with "$(end)", whitespaces will be left unmodified.
> # For example, append_to_line_end("kernel", "vga=791") would replace
> # "kernel /boot/vmlinuz root=/dev/sda7"
> # with 
> # "kernel /boot/vmlinuz root=/dev/sda7 resume=/dev/sda9 vga=791"
> #
> # WARNING: Be careful not to have multiple promises matching the same line,
> #          which would result in the line growing indefinetively.
> {
> field_edits:
> 
>    "\s*$(start)\s.*"
>       edit_field => line("(^|\s)$(start)\s*", "2", "$(end)","append");
> }
> 
> ##
> 
399a437
> !windows::
404,405c442,444
<      edit_line => append_if_no_line("$(mins) $(hours) * * * $(commands)"),
<      perms => mo("644","$(user)");
---
>   edit_line => append_if_no_line("$(mins) $(hours) * * * $(commands)"),
>       perms => mo("644","$(user)"),
>     classes => if_repaired("changed_crontab");
408a448
> changed_crontab::
444a485,496
> ##
> 
> body edit_field line(split,col,newval,method)
> {
> field_separator    => "$(split)";
> select_field       => "$(col)";
> value_separator    => " ";
> field_value        => "$(newval)";
> field_operation    => "$(method)";
> extend_fields      => "true";
> allow_blank_fields => "true";
> }
953a1006,1014
> body acl ntfs(acl)
> {
> acl_type => "ntfs";
> acl_method => "overwrite";
> aces => { "@(acl)" };
> }
> 
> ##
> 
985a1047,1053
> 
> body depth_search include_base
> {
> include_basedir => "true";
> }
> 
> ##
1389a1458,1485
> #
> # The following bundle is part of a package setup for solaris, see unit 
> examples
> #
> 
> bundle edit_line create_solaris_admin_file
> {
> insert_lines:
>               
>   "mail=
> instance=unique
> partial=nocheck
> runlevel=nocheck
> idepend=nocheck
> rdepend=nocheck
> space=nocheck
> setuid=nocheck
> conflict=nocheck
> action=nocheck
> networktimeout=60
> networkretries=3
> authentication=quit
> keystore=/var/sadm/security
> proxy=
> basedir=default";
> }
> 
> ##
> 
1604a1701,1708
> body match_value scan_changing_file(line)
> {
> select_line_matching => "$(line)";
> track_growing_file => "false";
> }
> 
> ##
> 
1610d1713
<


Cheers,
--Nakarin

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to