* Atom Powers <[email protected]>
> 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


_______________________________________________
help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to