Forum: CFEngine Help
Subject: set_config_values() does different things depending on original value 
of config variable in file
Author: linuxgurugamer
Link to topic: https://cfengine.com/forum/read.php?3,26379,26379#msg-26379

I have the following excerpts in a .cf file:

      # SSHD configuration to set
      "sshd"                                string => "2";

     edit_line => set_config_values("configfiles.sshd"),

I am getting two different types of behavior, depending on the value of 
Protocol in the /etc/ssh/sshd_config file:

If it is:

     Protocol 1

it will be (properly) changed to:

     Protocol 2

However, if it is the following:

     Protocol 2,1

then that line is left alone and a new line is added at the end of the file:

     Protocol 2

So I assume that this is something simple, but since I'm using this to learn 
CF-Engine, I'm asking for help.

Thanks in advance.



JBB

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

Reply via email to