CFEngine Help: Re: Trying to use a variable inside a regex

2012-09-24 Thread no-reply
Forum: CFEngine Help Subject: Re: Trying to use a variable inside a regex Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,27490,27545#msg-27545 Unrelated, but if you want a literal $ in the regex string, shouldn't you be using $(const.dollar)? I generally try to use \z to avoi

CFEngine Help: Re: Trying to use a variable inside a regex

2012-09-24 Thread no-reply
Forum: CFEngine Help Subject: Re: Trying to use a variable inside a regex Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,27490,27536#msg-27536 Yes. Silly me. I did actually get my library function to work properly. bundle agent set_selinux_boolean(s, i){ classes: "BOO

CFEngine Help: Re: Trying to use a variable inside a regex

2012-09-21 Thread no-reply
Forum: CFEngine Help Subject: Re: Trying to use a variable inside a regex Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,27490,27496#msg-27496 "sebooloff" expression => regcmp(".*$(i)$", execresult("/usr/sbin/getsebool $(s)", "noshell")); "seboolon" expression => r

CFEngine Help: Re: Trying to use a variable inside a regex

2012-09-21 Thread no-reply
Forum: CFEngine Help Subject: Re: Trying to use a variable inside a regex Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,27490,27495#msg-27495 You might have a bug here. Can you duplicate my results below? Made a wrapper to simulate getsebool. #!/bin/sh STRING=$* pri

CFEngine Help: Re: Trying to use a variable inside a regex

2012-09-21 Thread no-reply
Forum: CFEngine Help Subject: Re: Trying to use a variable inside a regex Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,27490,27494#msg-27494 What's even more strange, is if I take your example, and use my bundle it prints both reports: # REgex test body common control {

CFEngine Help: Re: Trying to use a variable inside a regex

2012-09-21 Thread no-reply
Forum: CFEngine Help Subject: Re: Trying to use a variable inside a regex Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,27490,27493#msg-27493 It's odd Neil, If I copy/paste your code it works fine. Here is my code as a whole: bundle agent security { vars: packages:

CFEngine Help: Re: Trying to use a variable inside a regex

2012-09-21 Thread no-reply
Forum: CFEngine Help Subject: Re: Trying to use a variable inside a regex Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,27490,27492#msg-27492 # getsebool virt_use_nfs virt_use_nfs --> off I'm using 3.3.5 ___ Help-cfengine mail

CFEngine Help: Re: Trying to use a variable inside a regex

2012-09-21 Thread no-reply
Forum: CFEngine Help Subject: Re: Trying to use a variable inside a regex Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,27490,27491#msg-27491 What does getsebool return? The following works in 3.4.0b1. body common control { bundlesequence => { "main", }; inputs => {