help-cfengine
[Top][All Lists]
Advanced

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

Re: action copy options


From: Chris (Ducky) Chapin
Subject: Re: action copy options
Date: Tue, 23 Jul 2002 09:38:01 -0700 (PDT)

On Tue, 23 Jul 2002 Mark.Burgess@iu.hio.no wrote:
> >> I've tried the following with the purge option set to yes:
> >> --------------------------------------------
> >> copy:
> >>   <cfengine_root>/network  dest=/etc
> >>                            r=1
> >>                            include=hostname.*
> >>                            purge=true
> >>                            server=<server_name>
> >> --------------------------------------------
> >> 
> >> But this gives the following result:
> >> --------------------------------------------
> >> server side              client side
> >>   hostname.eri0            hostname.eri0
> >> --------------------------------------------
> >> It removes all files which are not hostname.eri0... the thing is
> >> that I don't want files toto and tutu to be removed.
> 
> Then why not 
> 
> include=tot include=tutu
> also?

One way that springs to mind is to have an /etc/hostname directory and
copy the hostname.* file there with the purge option set. Then use "links"
and "files" to maintain symlinks:

===
control:
   actionsequence = ( copy links files )

copy:
   <cfengine_root>/network  dest=/etc/hostname
      r=1
      include=hostname.*
      purge=true
      server=<server_name>

links:
   /etc +> /etc/hostname

files:
   /etc include=hostname.* recurse=1 links=tidy act=fixall

===
  
Nice and neat. =)
HTH


-Ducky

--

 Christopher 'Ducky' Chapin                        ducky@qualcomm.com
 Unix Systems Administrator - Qualcomm, Inc.           (858) 651-5433
 IT Host Services - AE-209F                                 




reply via email to

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