help-cfengine
[Top][All Lists]
Advanced

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

Re: Checking for the availability


From: Yves
Subject: Re: Checking for the availability
Date: Tue, 25 Nov 2003 18:35:16 +0100

Hello,

if you only want to use several nfs depots it's simple:

groups:
            nfs_depot1_available = ( ReturnsZero(cd /share/depot1) )

copy:

          nfs_depot1_available::
                                               /share/depot1/file    
dest=/local/file

          !nfs_depot1_available::
                                              /share/depot2/file    
dest=/local/file



if you want to use nfs depot by default and only use server-depot (policyhost 
tcp/5308) when amd is not working.


groups:
            nfs_depot1_available = ( ReturnsZero(cd /share/depot1) )

copy:

          nfs_depot1_available::
                                               /share/depot1/file               
dest=/local/file

          !nfs_depot1_available::
                                              /master/file                      
        dest=/local/file
                                                                                
                                        server=$(policyhost)



the problem is to minimize the code if you have many copy actions with many 
options
something like that would be nice:

control:
              nfs_depot_available::    path = ( /nfs )
              !nfs_depot_available::   path = ( /server )        

copy:

               $(path) /file            dest=/local/file
                                             priority=nfs,server


Gruß Yves

address@hidden am 25.11.2003



On Tue, 25 Nov 2003 11:26:02 -0500, Harish Chauhan wrote:
>Hi
>
>I would like to know how to check for the availability of a machine
>/ folder and perform the task on the basis of the outcome.
>
>example : If   "/<servername>/<foldername>  is not available then
>copy the files from /<anotherservername>/<foldername>



Gruß Yves

address@hidden am 25.11.2003






reply via email to

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