help-cfengine
[Top][All Lists]
Advanced

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

trigger class if file edited - help !


From: Zeev Fisher
Subject: trigger class if file edited - help !
Date: Thu, 20 Feb 2003 19:24:08 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0

Hi,

I'm trying to set a class which will be activated if i edit a file and it's not working.
The version i use is 2.0.5

I have the following in the control section of cf.main :

AddInstallable = ( RestartNis RestartShare )

and i have the following :

shellcommands:

      RestartShare::
               "/usr/sbin/exportfs -a"
      RestartNis::
               "/etc/init.d/ypbind restart"

The RestartNis is working :

{ /etc/sysconfig/network

               BeginGroupIfNoSuchLine "NISDOMAIN=$(domain)"
                       DeleteLinesMatching "^NISDOMAIN.*"
                       Append "NISDOMAIN=$(domain)"
               EndGroup
               DefineClasses "RestartNis"
               BeginGroupIfNoSuchLine "GATEWAY=$(defaultrouter)"
                       DeleteLinesMatching "^GATEWAY.*"
                       Append "GATEWAY=$(defaultrouter)"
               EndGroup
       }


But when i do it on :

editfiles:

       linux::

       { /etc/exports

          AutoCreate
          AppendIfNoSuchLine "/export/home/$(host) *(rw)"
          DefineClasses "RestartNis"
          }


It doesn't work.

What is the correct way for doing this ?

Any help will be appriciated :-)


--
Zeev Fisher - Unix System Administrator
Marvell Semiconductor Israel Ltd
Moshav Manof, D.N. Misgav 20184, ISRAEL
Email    -  Zeev.Fisher@il.marvell.com
Tel      -  + 972 4 8225046 ext. 2402
Cell     -  + 972 54 995402
Fax      -  + 972 4 8326420
WWW Page:     http://www.marvell.com

------------------------------------------------------------------------
This message may contain confidential, proprietary or legally privileged
information. The information is intended only for the use of the individual
or entity named above. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination, distribution
or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify us
immediately by telephone, or by e-mail and delete the message from your
computer.






reply via email to

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