Forum: Cfengine Help
Subject: Re: how to redirect to /dev/null
Author: joke
Link to topic: https://cfengine.com/forum/read.php?3,18892,18897#msg-18897

I think you should just enable the shell and do shell redirecting.

classes:
"Is_SOL10_U1" expression => returnszero("/bin/grep s10s_u1wos /etc/release 
>/dev/null 2>&1", "useshell");

Enabling the shell causes overhead though.

Unfortunately cfengine prohibits using "exec /bin/grep ..." as command. This 
would prevent forking a process and save some resources but cfengine requires 
the input pattern to begin with a "/".

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

Reply via email to