To recursively copy a directory, "copy_from" must be used. The "when_no_source" option is not available under "copy_from"
To provide more information. I'm currently running version 2. I use a script to copy version 3 to a local staged directory. Once copied, I shut down cfexecd. I rename /var/cfengine/bin to /var/cfengine/bin.v2 I rename /var/cfengine/lib to /var/cfengine/lib.v2 I rename the staged directories to bin and lib respectively. Because of the missing symlinks in lib, the cf-* binaries all fail. So it won't converge cause it breaks itself. What is missing is the ability in "copy_from" to specify that symlinks (if missing the source) should still be created. Comments? ----- Original Message ----- From: Daniel V. Klein <d...@lonewolf.com> To: JIM AMANATIDIS (BLOOMBERG/ 731 LEXIN) Cc: HELP-CFENGINE@CFENGINE.ORG At: 11/17 16:24:59 You could use: body link_from example { when_no_source => "force"; } But why worry if you're copying the whole tree? Cfengine will converge on the correct solution, and the ultimate goal is what you seek, and Cfengine will provide that. -Dan On Nov 17, 2010, at 12:41 PM, JIM AMANATIDIS, BLOOMBERG/ 731 LEXIN wrote: > Hi all, > Don't know why I haven't noticed this before, but when copying directories > recursively for the first time, and the source has symlinks in it, depending > on the sequence of how files are seen, the symlink does not get created if > the source file isn't copied first. This behavior is seen in both version 2 > and version 3. Is there any way to do this in copy_from body, similar to how > when_no_source in link_from body is used? > > Thanks, Jim > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine