Forum: CFEngine Help
Subject: Trying to use a variable inside a regex
Author: daveseff
Link to topic: https://cfengine.com/forum/read.php?3,27490,27490#msg-27490
bundle agent set_selinux_boolean(s, i){
classes:
"sebooloff" expression => regcmp(".*$(i)$", execresult("/usr/sbin/getsebool
$(s)", "noshell"));
reports:
sebooloff::
"$(s) is off.";
I'm passing in values:
methods:
"virt_use_nfs" usebundle => set_selinux_boolean ( "virt_use_nfs", "off");
This doesn't seem to be working. If I hardcode the regex to ".*off$" it works.
What is the proper way to do this?
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine