On Fri, 11 Mar 2005, Tim Nelson wrote:
----BEGIN SNIP
classes:
# See if we're overlimt
MailqueOverLimit = ( ReturnsZero(/bin/sh -c "expr `ls
/var/spool/mqueue/ | grep q.*| wc -l` \> 12 > /dev/null") )
Couldn't you use the control section to set a variable to the number
of whatevers (files), and then set the class based on that? It'd also allow
you to use the variable in the alerts to say how many there are.
Yah, but control: gets evaluated before classes (true)? How does one do
this without running classes: twice? I'm still a newbie, care to share an
example of how to do this?
Most of the time cfengine is easy, but sometimes I just think like it's
p{erl,php,dksh} :)
Hmm. If I were doing it, I'd make a shell script. Of course, that
would mean that alerts wouldn't work. I might also try a cfengine method.
Hmm.. I'm trying to reduce the scripties. We have one that does this now,
in fact we have like 6 :)
Thanks!
-n
--
-------------------------------------------
nathan hruby <[EMAIL PROTECTED]>
uga enterprise information technology services
production systems support
metaphysically wrinkle-free
-------------------------------------------
_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine