Forum: CFEngine Help
Subject: Re: Read files once instead of a bunch?
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,26052,26053#msg-26053
Isn't your class expression backwards? I think it should be like this
(untested):
!g_counted_lines::
"line_count" int => countlinesmatching( ".*", "$(g.file)" ),
classes => if_repaired("g_counted_lines");
I changed g_counted_lines to !g_counted_lines, and if_ok to if_repaired, so
that the class is set the first time the variable is set.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine