Forum: Cfengine Help Subject: Re: maintaining /etc/security/limits.conf with cf3 Author: svenXY Link to topic: https://cfengine.com/forum/read.php?3,21465,21466#msg-21466
OK, deleting the lines before inserting new ones does the trick fine: !soft_limit_ok:: delete_lines: "${user}\s+soft\s+${what}.*"; insert_lines: "${user} soft ${what} ${soft}" classes => if_repaired('soft_limit_ok'), comment => "Add line for soft limit"; !hard_limit_ok:: delete_lines: "${user}\s+hard\s+${what}.*"; insert_lines: "${user} hard ${what} ${hard}" classes => if_repaired('hard_limit_ok'), comment => "Add line for hard limit"; but then, I'm still interested to know how either edit_field or replace_line would be used here. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine