[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting an OS-specific class
From: |
Tod Oace |
Subject: |
Re: Setting an OS-specific class |
Date: |
Thu, 21 Oct 2004 14:23:57 -0700 |
On Sep 22, 2004, at 15:05, Wil Cooley wrote:
On Tue, 2004-09-21 at 17:08 -0700, Tod Oace wrote:
I looked at the reference manual and it says that the "redhat::" is
ANDed with the ReturnsZero, so I guess it's working the way it's
supposed to, but it's what I expected. And I don't know how else to
easily limit the egrep to redhat.
This is on 2.1.10. Any ideas?
How about this:
control:
redhat::
grepcmd = ( /bin/egrep -q foo )
!redhat::
grepcmd = ( /bin/egrep foo )
classes:
someclass = ( ReturnsZero($(grepcmd))
Or: grepcmd = ( "/bin/sh -c '/bin/egrep foo /whatever >/dev/null'" )
so I don't see "foo" from all the non-redhat systems.
Yeah... I guess that's probably the best way to work around it. I ended
up not needing to do what I was trying to do, but in future it would be
nice if cfengine would only do the thing on the right if the rule on
the left is true. That's how it works outside the classes: section and
it would be useful if classes: would operate the same way.
Anyway, thanks for the suggestion, Wil!
--
Tod Oace, Intel Corporation <tod@intel.com>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Setting an OS-specific class,
Tod Oace <=