cfengine/masterfiles — pull request #4 by ed45626 (2013-09-04 16:12:40+00:00)
Title: Update files.cf

Changed set_config_values to support special characters in the RHS (so we don't confuse the regex on expansion) and:
1. if LHS exists with the wrong value correct it, else
2. if LHS is commented out and #1 did not apply, uncomment and correct, elst
3. if #1 and #2 did not apply, append it

If this is good it should be applied to edit_line functions to correct regex's and creating duplicate config lines. Original code would uncomment and correct as well as correct, so if the LHS existed commented out and uncommented (active), it would make them both active with the correct value.