help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make "action: processes" silent


From: rader
Subject: Re: make "action: processes" silent
Date: Mon, 11 Apr 2005 08:51:30 -0500

You're config says "if there are >1 ypserv daemons then warn me and
define nis_slave".  (You could use "if there are no ypserv serve
daemons then warn me else define nis_slave", but then you'll get
output on non-YP systems.)

I went down this path with AFS.  It would be nice if there was a way
to always make "processes" silent, but I don't think there is one.
I ended up using a module:

 #!/bin/bash
 if ( /usr/bin/fs wscell > /dev/null 2>&1 ) ; then 
   echo +has_afs
 fi

with this config...

 control:
   addinstallable = ( has_afs )
   [...]
   actionsequence = ( module:HasAFS ... )
   moduledirectory = ( /var/cfengine/modules )
 [...]

 copy: 
   has_afs::
     [...]

steve 
- - - 
systems & network manager
high energy physics
university of wisconsin

 > ---- Original Message ----
 > From: Yves
 > I use the following code to define the class "nis_slave" dynamic.
 > 
 > --------------------------------------------------------------------------
 > --
 > processes:
 >                         "ypserv"   matches=>1  define=nis_slave
 > copy:
 >                      nis_slave::
 >                                              ...
 > --------------------------------------------------------------------------
 > --
 > 
 > On a nis client I get the following output:
 > 
 > cfengine:wfes02:Mon_Apr_11_12:37:40_2005: 0 processes matched ypserv (shou
 > ld be >=1)
 > 
 > How can I prevent the output.
 > I already tried to use the option inform=false, but this doesn't work or d
 > o I have to use ReturnsZero for this test.
 > I just wonder, because if I want a warning, then I would use "action=warn"
 > 
 > environment:
 >      cfengine v2.1.10
 > 
 > 
 > Yves
 > 
 >  Y99@gmx.de am 11.04.2005 12:35:49Uhr
 > 
 > 
 > 
 > _______________________________________________
 > Help-cfengine mailing list
 > Help-cfengine@gnu.org
 > http://lists.gnu.org/mailman/listinfo/help-cfengine





reply via email to

[Prev in Thread] Current Thread [Next in Thread]