help-cfengine
[Top][All Lists]
Advanced

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

Re: Overwrite a link with a file?


From: Jeremy Mates
Subject: Re: Overwrite a link with a file?
Date: Thu, 19 Mar 2009 13:40:49 -0800
User-agent: Mutt/1.4.2i

* Atom Powers <address@hidden>
> Still using cfengine 2.2.x
> How can replace a link with a real file?

Use typecheck=false in the copy statement, or ensure that the link is
cleaned up somehow prior to the copy statement:

# cfengine configuration to create a file, link to it, then replace
# the link with the real file.
#
# Usage:
# cfagent -qKf `pwd`/thisfilename

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

    pwd      = ( ExecResult(/bin/pwd) )
    realfile = ( real )
    linkfile = ( link )

files:
  any::
    ${pwd}/${realfile} mode=0600 action=touch inform=true

links:
  any::
    ${pwd}/${linkfile} -> ${pwd}/${realfile} inform=true
  
copy:
  any::
    ${pwd}/${realfile} dest=${pwd}/${linkfile} inform=true backup=false
      typecheck=false




reply via email to

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