Hello
I'm trying to add two lines into a file using the edit_line statement
My code looks as follows -
TestServers::
"/etc/auto_direct"
comment => "Installing /batch and /scripts",
create => "true",
edit_line => append_if_no_lines("/scripts
-soft server1:/export/dbm/scripts"),
edit_line => append_if_no_lines("/batch
-soft server1:/export/dbm/batch"),
perms => mog("444","root","root");
What I expected was to have both entries in /etc/auto_direct. I am
however,only getting the line -
/batch -soft server1:/export/dbm/batch"
The only way I have managed to do this is as follows -
TestServers::
"/etc/auto_direct"
comment => "Installing /batch and /scripts",
create => "true",
edit_line => append_if_no_lines("/batch
-soft server1:/export/dbm/batch"),
perms => mog("444","root","root");
TestServers::
"/etc/auto_direct"
comment => "Installing /scripts",
create => "true",
edit_line => append_if_no_lines("/scripts
-soft server1:/export/dbm/scripts"),
perms => mog("444","root","root");
Should I be able to add two lines to a file using the first piece of code
or have I misunderstood how edit_line works.
I am using the standard library that was released a few days ago and
cfengine 3.0.2
Thanks
Mark.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine